Add v5 tasks with WIF support
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:26:43.150Z
|
||||
created: 2023-03-03T12:26:43.159Z
|
||||
patch: {}
|
|
@ -0,0 +1,548 @@
|
|||
import * as path from "path";
|
||||
import * as stream from "stream";
|
||||
import * as fs from "fs";
|
||||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as trl from "azure-pipelines-task-lib/toolrunner";
|
||||
import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi";
|
||||
import * as fse from "fs-extra";
|
||||
import ToolRunner = trl.ToolRunner;
|
||||
import uuidv5 from "uuidv5";
|
||||
import * as tmp from "tmp";
|
||||
|
||||
function writeBuildTempFile(taskName: string, data: any): string {
|
||||
const tempDir = tl.getVariable("Agent.TempDirectory");
|
||||
const tempFile = tmp.tmpNameSync({ prefix: taskName, postfix: ".tmp", tmpdir: tempDir });
|
||||
|
||||
tl.debug(`Generating Build temp file: ${tempFile}`);
|
||||
tl.writeFile(tempFile, data, { mode: 0o600, encoding: "utf8", flag: "wx+" });
|
||||
|
||||
return tempFile;
|
||||
}
|
||||
|
||||
function deleteBuildTempFile(tempFile: string) {
|
||||
if (tempFile && tl.exist(tempFile)) {
|
||||
tl.debug(`Deleting temp file: ${tempFile}`);
|
||||
fs.unlinkSync(tempFile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set manifest related arguments for "tfx extension" command, such as
|
||||
* the --root or the --manifest-globs switches.
|
||||
* @param {ToolRunner} tfx
|
||||
* @returns {() => void} Cleaner function that the caller should use to cleanup temporary files created to be used as arguments
|
||||
*/
|
||||
export function validateAndSetTfxManifestArguments(tfx: ToolRunner): (() => void) {
|
||||
const rootFolder = tl.getInput("rootFolder", false);
|
||||
tfx.argIf(rootFolder, ["--root", rootFolder]);
|
||||
|
||||
|
||||
const globsManifest = tl.getDelimitedInput("patternManifest", "\n", false);
|
||||
tfx.argIf(globsManifest.length, ["--manifest-globs"]);
|
||||
tfx.argIf(globsManifest.length, globsManifest);
|
||||
|
||||
// Overrides manifest file
|
||||
const publisher = tl.getInput("publisherId", false);
|
||||
|
||||
const localizationRoot = tl.getInput("localizationRoot", false);
|
||||
tfx.argIf(localizationRoot, ["--loc-root", localizationRoot]);
|
||||
|
||||
let extensionId = tl.getInput("extensionId", false);
|
||||
const extensionTag = tl.getInput("extensionTag", false);
|
||||
|
||||
if (extensionId && extensionTag) {
|
||||
extensionId += extensionTag;
|
||||
tl.debug(`Overriding extension id to: ${extensionId}`);
|
||||
}
|
||||
|
||||
// for backwards compat check both "method" and "fileType"
|
||||
switch (tl.getInput("method", false) || tl.getInput("fileType", false)) {
|
||||
// for backwards compat trigger on both "manifest" and "id"
|
||||
case "manifest":
|
||||
case "id":
|
||||
default: {
|
||||
tfx.argIf(publisher, ["--publisher", publisher]);
|
||||
tfx.argIf(extensionId, ["--extension-id", extensionId]);
|
||||
break;
|
||||
}
|
||||
case "vsix": {
|
||||
const vsixFilePattern = tl.getPathInput("vsixFile", true);
|
||||
let matchingVsixFile: string[];
|
||||
if (vsixFilePattern.indexOf("*") >= 0 || vsixFilePattern.indexOf("?") >= 0) {
|
||||
tl.debug("Pattern found in vsixFile parameter.");
|
||||
matchingVsixFile = tl.findMatch(process.cwd(), vsixFilePattern);
|
||||
}
|
||||
else {
|
||||
tl.debug("No pattern found in vsixFile parameter.");
|
||||
matchingVsixFile = [vsixFilePattern];
|
||||
}
|
||||
|
||||
if (!matchingVsixFile || matchingVsixFile.length === 0) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Found no vsix files matching: ${vsixFilePattern}.`);
|
||||
throw "failed";
|
||||
}
|
||||
if (matchingVsixFile.length !== 1) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Found multiple vsix files matching: ${vsixFilePattern}.`);
|
||||
throw "failed";
|
||||
}
|
||||
tfx.arg(["--vsix", matchingVsixFile[0]]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let jsonOverrides: any;
|
||||
const extensionName = tl.getInput("extensionName", false);
|
||||
if (extensionName) {
|
||||
tl.debug(`Overriding extension name to: ${extensionName}`);
|
||||
jsonOverrides = (jsonOverrides || {});
|
||||
jsonOverrides.name = extensionName;
|
||||
}
|
||||
|
||||
const extensionVisibility = tl.getInput("extensionVisibility", false);
|
||||
if (extensionVisibility && extensionVisibility !== "default") {
|
||||
tl.debug(`Overriding extension visibility to: ${extensionVisibility}`);
|
||||
jsonOverrides = (jsonOverrides || {});
|
||||
|
||||
const isPublic = extensionVisibility.indexOf("public") >= 0;
|
||||
const isPreview = extensionVisibility.indexOf("preview") >= 0;
|
||||
|
||||
jsonOverrides.public = isPublic;
|
||||
|
||||
if (isPreview) {
|
||||
jsonOverrides.galleryFlags = jsonOverrides.galleryFlags || [];
|
||||
jsonOverrides.galleryFlags.push("Preview");
|
||||
}
|
||||
}
|
||||
|
||||
const extensionPricing = tl.getInput("extensionPricing", false);
|
||||
if (extensionPricing && extensionPricing !== "default") {
|
||||
tl.debug(`Overriding extension pricing to: ${extensionPricing}`);
|
||||
jsonOverrides = (jsonOverrides || {});
|
||||
|
||||
const isPaid = extensionPricing.indexOf("paid") >= 0;
|
||||
|
||||
if (isPaid) {
|
||||
jsonOverrides.galleryFlags = jsonOverrides.galleryFlags || [];
|
||||
jsonOverrides.galleryFlags.push("Paid");
|
||||
}
|
||||
}
|
||||
|
||||
const extensionVersion = getExtensionVersion();
|
||||
if (extensionVersion) {
|
||||
tl.debug(`Overriding extension version to: ${extensionVersion}`);
|
||||
jsonOverrides = (jsonOverrides || {});
|
||||
jsonOverrides.version = extensionVersion;
|
||||
}
|
||||
|
||||
const noWaitValidation = tl.getBoolInput("noWaitValidation", false);
|
||||
if (noWaitValidation) {
|
||||
tl.debug(`Not waiting for validation.`);
|
||||
tfx.arg("--no-wait-validation");
|
||||
}
|
||||
|
||||
const bypassLocalValidation = tl.getBoolInput("bypassLocalValidation", false);
|
||||
if (bypassLocalValidation) {
|
||||
tl.debug(`Bypassing local validation.`);
|
||||
tfx.arg("--bypass-validation");
|
||||
}
|
||||
|
||||
let overrideFilePath: string;
|
||||
if (jsonOverrides) {
|
||||
// Generate a temp file
|
||||
overrideFilePath = writeBuildTempFile("PackageTask", JSON.stringify(jsonOverrides));
|
||||
tl.debug(`Generated a JSON temp file to override manifest values Path: ${overrideFilePath}`);
|
||||
|
||||
tfx.arg(["--overrides-file", overrideFilePath]);
|
||||
}
|
||||
|
||||
const args = tl.getInput("arguments", false);
|
||||
if (args) {
|
||||
tl.debug(`Adding additional arguments: ${args}.`);
|
||||
tfx.line(args);
|
||||
}
|
||||
|
||||
return () => deleteBuildTempFile(overrideFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a tfx command by ensuring that "tfx" exists, installing it on the fly if needed.
|
||||
* @param {(tfx:ToolRunner)=>void} cmd
|
||||
*/
|
||||
export async function runTfx(cmd: (tfx: ToolRunner) => void): Promise<boolean> {
|
||||
let tfx: ToolRunner;
|
||||
let tfxPath: string;
|
||||
|
||||
const tryRunCmd = async (tfx: ToolRunner) => {
|
||||
try {
|
||||
// Set working folder
|
||||
const cwd = tl.getInput("cwd", false);
|
||||
if (cwd) {
|
||||
tl.cd(cwd);
|
||||
}
|
||||
|
||||
cmd(tfx);
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Error running task: ${err}`);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const tfxInstallerPath = tl.getVariable("__tfxpath");
|
||||
if (tfxInstallerPath) {
|
||||
tfxPath = tl.which(path.join(tfxInstallerPath, "/tfx"));
|
||||
}
|
||||
|
||||
if (tfxPath) {
|
||||
tl.debug(`using: ${tfxPath}`);
|
||||
tfx = new trl.ToolRunner(tfxPath);
|
||||
await tryRunCmd(tfx);
|
||||
return;
|
||||
}
|
||||
|
||||
tl.setResult(tl.TaskResult.Failed, "Could not find tfx. To resolve, add the 'Use Node CLI for Azure DevOps' task to your pipeline before this task.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the extension version from the 'extensionVersion' variable, extracting
|
||||
* just the part that is compatible with the versioning scheme used in the Marketplace.
|
||||
*
|
||||
* @returns string
|
||||
*/
|
||||
export function getExtensionVersion(): string {
|
||||
const extensionVersion = tl.getInput("extensionVersion", false);
|
||||
if (extensionVersion) {
|
||||
const extractedVersions = extensionVersion.match(/[0-9]+\.[0-9]+\.[0-9]+(?:\.[0-9]+)?/);
|
||||
if (extractedVersions && extractedVersions.length === 1) {
|
||||
return extractedVersions[0];
|
||||
}
|
||||
else {
|
||||
throw new Error(`Supplied ExtensionVersion must contain a string matching '##.##.##(.##)'.`);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Marketplace endpoint details to be used while publishing or installing an extension.
|
||||
*
|
||||
* @param {string="connectedServiceName"} inputFieldName
|
||||
* @returns string
|
||||
*/
|
||||
export function getMarketplaceEndpointDetails(inputFieldName: string): any {
|
||||
const marketplaceEndpoint = tl.getInput(inputFieldName, true);
|
||||
|
||||
const hostUrl = tl.getEndpointUrl(marketplaceEndpoint, false);
|
||||
const auth = tl.getEndpointAuthorization(marketplaceEndpoint, false);
|
||||
const password = auth.parameters["password"];
|
||||
const username = auth.parameters["username"];
|
||||
const apitoken = auth.parameters["apitoken"];
|
||||
|
||||
return {
|
||||
"url": hostUrl,
|
||||
"username": username,
|
||||
"password": password,
|
||||
"apitoken": apitoken
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the marketplace endpoint details (url, credentials) for the toolrunner.
|
||||
*
|
||||
* @param {ToolRunner} tfx
|
||||
*/
|
||||
export async function setTfxMarketplaceArguments(tfx: ToolRunner, setServiceUrl = true): Promise<void> {
|
||||
const connectTo = tl.getInput("connectTo", false) || "VsTeam";
|
||||
|
||||
if (connectTo === "VsTeam") {
|
||||
const galleryEndpoint = getMarketplaceEndpointDetails("connectedServiceName");
|
||||
tfx.argIf(setServiceUrl, ["--service-url", galleryEndpoint.url]);
|
||||
tfx.arg(["--auth-type", "pat"]);
|
||||
tfx.arg(["--token", galleryEndpoint.password]);
|
||||
} else if (connectTo === "AzureRM") {
|
||||
const token = await getFederatedToken("connectedServiceNameAzureRM");
|
||||
tfx.argIf(setServiceUrl, ["--service-url", "https://marketplace.visualstudio.com"]);
|
||||
tfx.arg(["--auth-type", "pat"]);
|
||||
tfx.arg(["--token", token]);
|
||||
} else {
|
||||
const galleryEndpoint = getMarketplaceEndpointDetails("connectedServiceNameTFS");
|
||||
tfx.argIf(setServiceUrl, ["--service-url", galleryEndpoint.url]);
|
||||
|
||||
if (galleryEndpoint.username) {
|
||||
tfx.arg(["--auth-type", "basic"]);
|
||||
tfx.arg(["--username", galleryEndpoint.username]);
|
||||
tfx.arg(["--password", galleryEndpoint.password]);
|
||||
}
|
||||
else {
|
||||
tfx.arg(["--auth-type", "pat"]);
|
||||
tfx.arg(["--token", galleryEndpoint.apitoken]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A writable stream intended to be used with Tfx when using JSON output.
|
||||
* This class overcomes the problem of having tfx warnings being displayed
|
||||
* in stdout as regular messages, even when using --json switch in tfx.
|
||||
*
|
||||
*/
|
||||
export class TfxJsonOutputStream extends stream.Writable {
|
||||
|
||||
jsonString = "";
|
||||
messages: string[] = [];
|
||||
|
||||
constructor(public out: (message: string) => void) {
|
||||
super();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
_write(chunk: any, enc: string, cb: (Function)): void {
|
||||
const chunkStr: string = chunk.toString();
|
||||
if (chunkStr.startsWith("[command]")) {
|
||||
this.taskOutput(chunkStr, this.out);
|
||||
}
|
||||
else if (!this.jsonString && (chunkStr.toString()[0] !== "{" && chunkStr.toString()[0] !== "[")) {
|
||||
this.messages.push(chunkStr);
|
||||
this.taskOutput(chunkStr, this.out);
|
||||
}
|
||||
else {
|
||||
this.jsonString += chunkStr;
|
||||
this.taskOutput(chunkStr, tl.debug);
|
||||
}
|
||||
|
||||
cb();
|
||||
}
|
||||
|
||||
private taskOutput(messages: string, lineWriter: (m: string) => void) {
|
||||
if (!messages) { return; }
|
||||
// Split messages to be sure that we are invoking the write lineWriter for each lineWriter
|
||||
// Otherwise we could get messages in console with the wrong prefix used by azure-pipelines-task-lib
|
||||
messages.split("\n").forEach(lineWriter);
|
||||
}
|
||||
}
|
||||
|
||||
function getTaskPathContributions(manifest: any): string[] {
|
||||
// Check for task contributions
|
||||
if (!manifest.contributions) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return manifest.contributions
|
||||
.filter((c: any) => c.type === "ms.vss-distributed-task.task" && c.properties && c.properties["name"])
|
||||
.map((c: any) => c.properties["name"]);
|
||||
}
|
||||
|
||||
function updateTaskId(manifest: any, publisherId: string, extensionId: string): unknown {
|
||||
tl.debug(`Task manifest ${manifest.name} id before: ${manifest.id}`);
|
||||
|
||||
const extensionNs = uuidv5("url", "https://marketplace.visualstudio.com/vsts", true);
|
||||
manifest.id = uuidv5(extensionNs, `${publisherId}.${extensionId}.${manifest.name}`, false);
|
||||
|
||||
tl.debug(`Task manifest ${manifest.name} id after: ${manifest.id}`);
|
||||
return manifest;
|
||||
}
|
||||
|
||||
function updateExtensionManifestTaskIds(manifest: any, originalTaskId: string, newTaskId: string): unknown {
|
||||
if (!manifest.contributions) {
|
||||
tl.debug(`No contributions found`);
|
||||
return manifest;
|
||||
}
|
||||
|
||||
manifest.contributions
|
||||
.filter((c: any) => c.type !== "ms.vss-distributed-task.task" && c.properties && c.properties.supportsTasks)
|
||||
.forEach((c: any) => {
|
||||
const supportsTasks = [...c.properties.supportsTasks];
|
||||
const index = supportsTasks.indexOf(originalTaskId);
|
||||
if (index != -1) {
|
||||
|
||||
tl.debug(`Extension manifest supportsTasks before: ${c.properties.supportsTasks}`);
|
||||
|
||||
supportsTasks[index] = newTaskId;
|
||||
c.properties.supportsTasks = supportsTasks;
|
||||
|
||||
tl.debug(`Extension manifest supportsTasks after: ${c.properties.supportsTasks}`);
|
||||
} else {
|
||||
tl.debug(`No supportTasks entry found in manifest contribution`);
|
||||
}
|
||||
});
|
||||
|
||||
return manifest;
|
||||
}
|
||||
|
||||
function updateTaskVersion(manifest: any, extensionVersionString: string, extensionVersionType: string): unknown {
|
||||
const versionParts = extensionVersionString.split(".");
|
||||
if (versionParts.length > 3) {
|
||||
tl.warning("Detected a version that consists of more than 3 parts. Build tasks support only 3 parts, ignoring the rest.");
|
||||
}
|
||||
|
||||
const extensionversion = { major: +versionParts[0], minor: +versionParts[1], patch: +versionParts[2] };
|
||||
|
||||
if (!manifest.version && extensionVersionType !== "major") {
|
||||
tl.warning("Detected no version in task manifest. Forcing major.");
|
||||
manifest.version = extensionversion;
|
||||
} else {
|
||||
tl.debug(`Task manifest ${manifest.name} version before: ${JSON.stringify(manifest.version)}`);
|
||||
|
||||
switch (extensionVersionType) {
|
||||
default:
|
||||
case "major": manifest.version.Major = `${extensionversion.major}`;
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "minor": manifest.version.Minor = `${extensionversion.minor}`;
|
||||
// eslint-disable-next-line no-fallthrough
|
||||
case "patch": manifest.version.Patch = `${extensionversion.patch}`;
|
||||
}
|
||||
}
|
||||
tl.debug(`Task manifest ${manifest.name} version after: ${JSON.stringify(manifest.version)}`);
|
||||
return manifest;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Check whether the version update should be propagated to tasks included
|
||||
* in the extension.
|
||||
*
|
||||
*/
|
||||
export async function updateManifests(manifestPaths: string[]): Promise<void> {
|
||||
const updateTasksVersion = tl.getBoolInput("updateTasksVersion", false);
|
||||
const updateTasksId = tl.getBoolInput("updateTasksId", false);
|
||||
|
||||
if (updateTasksVersion || updateTasksId) {
|
||||
if (!(manifestPaths && manifestPaths.length)) {
|
||||
manifestPaths = getExtensionManifestPaths();
|
||||
}
|
||||
|
||||
tl.debug(`Found manifests: ${manifestPaths.join(", ")}`);
|
||||
|
||||
const tasksIds = await updateTaskManifests(manifestPaths, updateTasksId, updateTasksVersion);
|
||||
await updateExtensionManifests(manifestPaths, tasksIds);
|
||||
}
|
||||
}
|
||||
|
||||
async function updateTaskManifests(manifestPaths: string[], updateTasksId: boolean, updateTasksVersion: boolean): Promise<[string, string][]> {
|
||||
const tasksIds: [string, string][] = [];
|
||||
|
||||
await Promise.all(manifestPaths.map(async (extensionPath) => {
|
||||
const manifest: any = await getManifest(extensionPath);
|
||||
const taskManifestPaths: string[] = getTaskManifestPaths(extensionPath, manifest);
|
||||
|
||||
if (taskManifestPaths && taskManifestPaths.length) {
|
||||
await Promise.all(taskManifestPaths.map(async (taskPath) => {
|
||||
tl.debug(`Patching: ${taskPath}.`);
|
||||
let taskManifest: any = await getManifest(taskPath);
|
||||
|
||||
if (updateTasksId) {
|
||||
tl.debug(`Updating Id...`);
|
||||
const publisherId = tl.getInput("publisherId", false) || manifest.publisher;
|
||||
const extensionTag = tl.getInput("extensionTag", false) || "";
|
||||
const extensionId = `${(tl.getInput("extensionId", false) || manifest.id)}${extensionTag}`;
|
||||
|
||||
const originalTaskId: string = taskManifest.id || null;
|
||||
taskManifest = updateTaskId(taskManifest, publisherId, extensionId);
|
||||
const newTaskId: string = taskManifest.id;
|
||||
|
||||
if (originalTaskId && (originalTaskId !== newTaskId)) {
|
||||
tasksIds.push([originalTaskId, newTaskId])
|
||||
}
|
||||
}
|
||||
|
||||
if (updateTasksVersion) {
|
||||
tl.debug(`Updating version...`);
|
||||
const extensionVersion = tl.getInput("extensionVersion", false) || manifest.version;
|
||||
if (!extensionVersion) {
|
||||
throw new Error(
|
||||
"Extension Version was not supplied nor does the extension manifest define one.");
|
||||
}
|
||||
const extensionVersionType = tl.getInput("updateTasksVersionType", false) || "major";
|
||||
|
||||
taskManifest = updateTaskVersion(taskManifest, extensionVersion, extensionVersionType);
|
||||
}
|
||||
|
||||
await writeManifest(taskManifest, taskPath);
|
||||
tl.debug(`Updated: ${taskPath}.`);
|
||||
}));
|
||||
}
|
||||
}));
|
||||
|
||||
return tasksIds;
|
||||
}
|
||||
|
||||
async function updateExtensionManifests(manifestPaths: string[], updatedTaskIds: [string, string][]): Promise<void> {
|
||||
await Promise.all(manifestPaths.map(async (path) => {
|
||||
tl.debug(`Patching: ${path}.`);
|
||||
let originalManifest = await getManifest(path);
|
||||
|
||||
updatedTaskIds.map(([originalTaskId, newTaskId]) => {
|
||||
tl.debug(`Updating: ${originalTaskId} => ${newTaskId}.`)
|
||||
originalManifest = updateExtensionManifestTaskIds(originalManifest, originalTaskId, newTaskId);
|
||||
});
|
||||
|
||||
await writeManifest(originalManifest, path);
|
||||
}));
|
||||
}
|
||||
|
||||
function getExtensionManifestPaths(): string[] {
|
||||
// Search for extension manifests given the rootFolder and patternManifest inputs
|
||||
const rootFolder = tl.getInput("rootFolder", false) || tl.getInput("System.DefaultWorkingDirectory");
|
||||
const manifestsPatterns = tl.getDelimitedInput("patternManifest", "\n", false) || ["vss-extension.json"];
|
||||
|
||||
tl.debug(`Searching for extension manifests: ${manifestsPatterns.join(", ")}`);
|
||||
|
||||
return tl.findMatch(rootFolder, manifestsPatterns);
|
||||
}
|
||||
|
||||
function getManifest(path: string): Promise<unknown> {
|
||||
return fse.readFile(path, "utf8").then((data: string) => {
|
||||
try {
|
||||
data = data.replace(/^\uFEFF/,
|
||||
() => {
|
||||
tl.warning(`Removing Unicode BOM from manifest file: ${path}.`);
|
||||
return "";
|
||||
});
|
||||
return JSON.parse(data);
|
||||
} catch (jsonError) {
|
||||
throw new Error(`Error parsing task manifest: ${path} - ${jsonError}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getTaskManifestPaths(manifestPath: string, manifest: any): string[] {
|
||||
const tasks = getTaskPathContributions(manifest);
|
||||
const rootFolder = path.dirname(manifestPath);
|
||||
|
||||
return tasks.reduce((result: string[], task: string) => {
|
||||
tl.debug(`Found task: ${task}`);
|
||||
const taskRoot: string = path.join(rootFolder, task);
|
||||
const rootManifest: string = path.join(taskRoot, "task.json");
|
||||
|
||||
let localizationRoot = tl.filePathSupplied("localizationRoot") ? tl.getPathInput("localizationRoot", false) : taskRoot;
|
||||
if (localizationRoot) {
|
||||
localizationRoot = path.resolve(localizationRoot);
|
||||
}
|
||||
|
||||
if (tl.exist(rootManifest)) {
|
||||
tl.debug(`Found single-task manifest: ${rootManifest}`);
|
||||
const rootManifests: string[] = [rootManifest];
|
||||
const rootLocManifest: string = path.join(localizationRoot, "task.loc.json");
|
||||
if (tl.exist(rootLocManifest)) {
|
||||
tl.debug(`Found localized single-task manifest: ${rootLocManifest}`);
|
||||
rootManifests.push(rootLocManifest);
|
||||
}
|
||||
return (result).concat(rootManifests);
|
||||
} else {
|
||||
const versionManifests = tl.findMatch(taskRoot, "*/task.json");
|
||||
const locVersionManifests = tl.findMatch(localizationRoot, "*/task.loc.json");
|
||||
tl.debug(`Found multi-task manifests: ${versionManifests.join(", ")}`);
|
||||
tl.debug(`Found multi-task localized manifests: ${locVersionManifests.join(", ")}`);
|
||||
return (result).concat(versionManifests).concat(locVersionManifests);
|
||||
}
|
||||
}, []);
|
||||
}
|
||||
|
||||
export function writeManifest(manifest: any, path: string): Promise<void> {
|
||||
return fse.writeJSON(path, manifest);
|
||||
}
|
||||
|
||||
export function checkUpdateTasksManifests(manifestFile?: string): Promise<void> {
|
||||
return updateManifests(manifestFile ? [manifestFile] : []);
|
||||
}
|
|
@ -0,0 +1,711 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.commonv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.commonv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"azure-pipelines-tasks-artifacts-common": "^2.230.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/tmp": "^0.2.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/fs-extra": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz",
|
||||
"integrity": "sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q==",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mocha": {
|
||||
"version": "5.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz",
|
||||
"integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ=="
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.18.97",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.97.tgz",
|
||||
"integrity": "sha512-4muilE1Lbfn57unR+/nT9AFjWk0MtWi5muwCEJqnOvfRQDbSfLCUdN7vCIg8TYuaANfhLOV85ve+FNpiUsbSRg=="
|
||||
},
|
||||
"node_modules/@types/tmp": {
|
||||
"version": "0.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.2.6.tgz",
|
||||
"integrity": "sha512-chhaNf2oKHlRkDGt+tiKE2Z5aJ6qalm7Z9rlLdBwmOiAAf09YQvvoLXjWK4HWPF1xU/fqvMgfNfpVoBscA/tKA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-devops-node-api": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz",
|
||||
"integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==",
|
||||
"dependencies": {
|
||||
"tunnel": "0.0.6",
|
||||
"typed-rest-client": "^1.8.4"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common": {
|
||||
"version": "2.230.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-tasks-artifacts-common/-/azure-pipelines-tasks-artifacts-common-2.230.0.tgz",
|
||||
"integrity": "sha512-FWyRjR+eqNjjVvXwiIJVcfLN+DTmbS3icRgrL6zAGx7iIKJOJn+sjlKOuCIR36TaWU4KOVfDGJujDK6Z+WPY8g==",
|
||||
"dependencies": {
|
||||
"@types/fs-extra": "8.0.0",
|
||||
"@types/mocha": "^5.2.6",
|
||||
"@types/node": "^16.11.39",
|
||||
"azure-devops-node-api": "12.0.0",
|
||||
"azure-pipelines-task-lib": "^4.2.0",
|
||||
"fs-extra": "8.1.0",
|
||||
"semver": "6.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common/node_modules/fs-extra": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6 <7 || >=8"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common/node_modules/jsonfile": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common/node_modules/universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||
"engines": {
|
||||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/define-data-property": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-proto": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
|
||||
"integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.12.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz",
|
||||
"integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"object-inspect": "^1.13.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/typed-rest-client": {
|
||||
"version": "1.8.11",
|
||||
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz",
|
||||
"integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==",
|
||||
"dependencies": {
|
||||
"qs": "^6.9.1",
|
||||
"tunnel": "0.0.6",
|
||||
"underscore": "^1.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/underscore": {
|
||||
"version": "1.13.6",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
|
||||
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.commonv5",
|
||||
"version": "5.0.0",
|
||||
"description": "common",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"azure-pipelines-tasks-artifacts-common": "^2.230.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/tmp": "^0.2.6"
|
||||
},
|
||||
"types": "./uuidv5.d.ts"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./Common",
|
||||
"sourceRoot": "./"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
declare module 'uuidv5' {
|
||||
type uuid = string | Buffer;
|
||||
type space = "dns" | "url" | "oid" | "x500" | "null" | "default";
|
||||
type ns = uuid | space;
|
||||
|
||||
interface createUUIDv5 {
|
||||
(namespace: ns, name: uuid): uuid;
|
||||
(namespace: ns, name: uuid, binary: boolean): uuid;
|
||||
|
||||
uuidToString(uuid: Buffer): string;
|
||||
uuidFromString(uuid: string): Buffer;
|
||||
createUUIDv5: createUUIDv5;
|
||||
spaces: space;
|
||||
}
|
||||
const exp: createUUIDv5;
|
||||
export = exp;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:26:47.007Z
|
||||
created: 2023-03-03T12:26:47.015Z
|
||||
patch: {}
|
|
@ -0,0 +1,85 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as tr from "azure-pipelines-task-lib/toolrunner.js";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
|
||||
const extensionVersionOverrideVariable = tl.getInput("extensionVersionOverride", false);
|
||||
let usingOverride = false;
|
||||
|
||||
function setVersion(version: string) {
|
||||
if (tl.getBoolInput("setBuildNumber", false)) {
|
||||
tl.command("build.updatebuildnumber", null, version);
|
||||
}
|
||||
|
||||
console.log("Setting local variable 'Extension.Version'.");
|
||||
tl.setVariable("Extension.Version", version, false, false);
|
||||
console.log("Setting output variable '{{StepName}}.Extension.Version'.");
|
||||
tl.setVariable("Extension.Version", version, false, true);
|
||||
}
|
||||
|
||||
if (extensionVersionOverrideVariable) {
|
||||
tl.debug(`Override variable specified checking for value.`);
|
||||
const version = tl.getVariable(extensionVersionOverrideVariable);
|
||||
|
||||
if (version) {
|
||||
console.log(`Ignoring Marketplace version and using supplied override: ${version}.`);
|
||||
setVersion(version);
|
||||
usingOverride = true;
|
||||
}
|
||||
}
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
await common.runTfx(async tfx => {
|
||||
try {
|
||||
tfx.arg(["extension", "show", "--json", "--no-color"]);
|
||||
|
||||
await common.setTfxMarketplaceArguments(tfx);
|
||||
common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
const versionAction = tl.getInput("versionAction", false);
|
||||
|
||||
const outputStream = new common.TfxJsonOutputStream(console.log);
|
||||
const errorStream = new common.TfxJsonOutputStream(tl.error);
|
||||
|
||||
const code: number = await tfx.execAsync(<any>{ outStream: outputStream, errorStream: errorStream, failOnStdErr: false, ignoreReturnCode: false } as tr.IExecOptions);
|
||||
if (code !== 0) {
|
||||
throw `tfx exited with return code: ${code}`
|
||||
}
|
||||
const json = JSON.parse(outputStream.jsonString);
|
||||
let version: string = json.versions[0].version;
|
||||
|
||||
console.log(`Latest version : ${version}.`);
|
||||
console.log(`Requested action : ${versionAction}.`);
|
||||
|
||||
if (versionAction !== "None") {
|
||||
let versionparts: number[] = version.split(".").map(v => +v);
|
||||
switch (versionAction) {
|
||||
case "Major":
|
||||
versionparts = [++versionparts[0], 0, 0];
|
||||
break;
|
||||
case "Minor":
|
||||
versionparts = [versionparts[0], ++versionparts[1], 0];
|
||||
break;
|
||||
case "Patch":
|
||||
versionparts = [versionparts[0], versionparts[1], ++versionparts[2]];
|
||||
break;
|
||||
}
|
||||
version = versionparts.join(".");
|
||||
console.log(`Updated to : ${version}.`);
|
||||
}
|
||||
|
||||
setVersion(version);
|
||||
tl.setResult(tl.TaskResult.Succeeded, `tfx exited with return code: ${code}`);
|
||||
}
|
||||
catch (err: any) {
|
||||
tl.setResult(tl.TaskResult.Failed, err.message);
|
||||
}
|
||||
});
|
||||
} catch (err: any) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Extension Version task failed: ${err}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!usingOverride) {
|
||||
await run();
|
||||
}
|
После Ширина: | Высота: | Размер: 3.8 KiB |
|
@ -0,0 +1,415 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.extensionversionv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.extensionversionv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.extensionversionv5",
|
||||
"description": "Query Extension Version Task",
|
||||
"version": "5.0.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
{
|
||||
"id": "5c6fa59e-1d5a-4516-9127-b9efd05df306",
|
||||
"name": "QueryAzureDevOpsExtensionVersion",
|
||||
"friendlyName": "Query Extension Version",
|
||||
"description": "Queries the current version from the Visual Studio Marketplace",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Utility",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "extension",
|
||||
"displayName": "Extension",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "version",
|
||||
"displayName": "Version",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"displayName": "Advanced",
|
||||
"isExpanded": false
|
||||
},
|
||||
{
|
||||
"name": "backcompat",
|
||||
"displayName": "Backward Compatibility",
|
||||
"isExpanded": false
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Query Extension Version: $(publisherId).$(extensionId)",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)",
|
||||
"TFS": "Azure DevOps Server"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameTFS",
|
||||
"type": "connectedService:TfsMarketplacePublishing",
|
||||
"label": "TFS Local Gallery connection",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=TFS"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Publisher ID of the extension to be installed.",
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension ID of the extension to be installed",
|
||||
"required": true,
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension ID",
|
||||
"required": false,
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"defaultValue": "None",
|
||||
"helpMarkdown": "Increase a part of the version.",
|
||||
"label": "Increase version",
|
||||
"name": "versionAction",
|
||||
"required": true,
|
||||
"options": {
|
||||
"None": "None",
|
||||
"Patch": "Patch",
|
||||
"Minor": "Minor",
|
||||
"Major": "Major"
|
||||
},
|
||||
"type": "pickList",
|
||||
"groupName": "version"
|
||||
},
|
||||
{
|
||||
"name": "setBuildNumber",
|
||||
"type": "checkbox",
|
||||
"label": "Set Build Number",
|
||||
"defaultValue": false,
|
||||
"required": false,
|
||||
"helpMarkDown": "Updates the Build Number with the new version number.",
|
||||
"groupName": "version"
|
||||
},
|
||||
{
|
||||
"name": "extensionVersionOverride",
|
||||
"type": "string",
|
||||
"label": "Override Variable",
|
||||
"defaultValue": "Extension.VersionOverride",
|
||||
"helpMarkDown": "When this value is specified the extension version task will take it regardless of the version returned from the marketplace. You can use this variable at Queue time to move to the next major version. When the variable value is empty or when the variable doesn't exist the Marketplace will be queried.",
|
||||
"required": false,
|
||||
"groupName": "version"
|
||||
},
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "string",
|
||||
"label": "Arguments",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Additional arguments passed to the package and publishing tool.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"type": "filePath",
|
||||
"label": "Working Directory",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Working directory to run the package and publishing process from. Defaults to the folder where the manifest is located.",
|
||||
"groupName": "advanced"
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "ExtensionVersion/v5/ExtensionVersion.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"ExtensionVersion.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:26:50.732Z
|
||||
created: 2023-03-03T12:26:50.739Z
|
||||
patch: {}
|
|
@ -0,0 +1,29 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
|
||||
const accounts = tl.getDelimitedInput("accounts", ",", true).map((value) => { return value.trim(); });
|
||||
|
||||
accounts.forEach(async (account) => await common.runTfx(async tfx => {
|
||||
try {
|
||||
tfx.arg(["extension", "install", "--no-color"]);
|
||||
|
||||
await common.setTfxMarketplaceArguments(tfx, false);
|
||||
common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
// Installation targets
|
||||
tfx.arg(["--service-url", account]);
|
||||
|
||||
const result = tfx.execSync(<any>{ silent: false, failOnStdErr: false });
|
||||
if (result.stderr.search("error: Error: (?=.*TF1590010)") >= 0) {
|
||||
tl.warning("Task already installed in target account - Ignoring error TF1590010 returned by tfx.");
|
||||
tl.setResult(tl.TaskResult.Succeeded, "Ignored");
|
||||
}
|
||||
|
||||
if (result.stderr.search("error: Error: (?!.*TF1590010)") >= 0) {
|
||||
tl.setResult(tl.TaskResult.Failed, "Failed");
|
||||
}
|
||||
tl.setResult(tl.TaskResult.Succeeded, "Installed");
|
||||
} catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Failed: ${err}`);
|
||||
}
|
||||
}));
|
После Ширина: | Высота: | Размер: 3.7 KiB |
|
@ -0,0 +1,415 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.installextensionv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.installextensionv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.installextensionv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Install Extension Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
{
|
||||
"id": "47a0f73c-f8e6-4fc5-a759-4d560031ef75",
|
||||
"name": "InstallAzureDevOpsExtension",
|
||||
"friendlyName": "Install Extension",
|
||||
"description": "Install a published extension to an Azure DevOps organisation or Team Foundation Server",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "extension",
|
||||
"displayName": "Extension",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "installation",
|
||||
"displayName": "Installation",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"displayName": "Advanced",
|
||||
"isExpanded": false
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Install Extension",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)",
|
||||
"TFS": "Azure DevOps Server"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameTFS",
|
||||
"type": "connectedService:TfsMarketplacePublishing",
|
||||
"label": "TFS Local Gallery connection",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=TFS"
|
||||
},
|
||||
{
|
||||
"name": "method",
|
||||
"type": "radio",
|
||||
"label": "Install using",
|
||||
"required": true,
|
||||
"defaultValue": "id",
|
||||
"helpMarkDown": "Install using either an existing VSIX or using the Publisher and Extension ID.",
|
||||
"options": {
|
||||
"id": "Publisher + Extension ID",
|
||||
"vsix": "VSIX file"
|
||||
},
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Publisher ID of the extension to be installed.",
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension ID of the extension to be installed",
|
||||
"required": true,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension ID",
|
||||
"required": false,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "vsixFile",
|
||||
"type": "filePath",
|
||||
"label": "VSIX file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "VSIX file of the extension to be installed. Supports wildcards.",
|
||||
"visibleRule": "method = vsix",
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "accounts",
|
||||
"type": "string",
|
||||
"label": "Install in",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Comma separated list of organisation urls where to install the extension (e.g. `https://devops.azure.com/org_a,https://devops.azure.com/org_b`) Or fully qualified TFS Collection URL (e.g. `https://yourserver/tfs/DefaultCollection`).",
|
||||
"required": true,
|
||||
"groupName": "installation"
|
||||
},
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "string",
|
||||
"label": "Arguments",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Additional arguments passed to the package and publishing tool.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"type": "filePath",
|
||||
"label": "Working Directory",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Working directory to run the package and publishing process from. Defaults to the folder where the manifest is located.",
|
||||
"groupName": "advanced"
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "InstallExtension/v5/InstallExtension.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"InstallExtension.ts"
|
||||
]
|
||||
}
|
|
@ -7,8 +7,8 @@
|
|||
"helpMarkDown": "",
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 4,
|
||||
"Minor": 3,
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
|
@ -113,4 +113,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:26:54.166Z
|
||||
created: 2023-03-03T12:26:54.172Z
|
||||
patch: {}
|
|
@ -0,0 +1,38 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
import promiseRetry from "promise-retry";
|
||||
|
||||
await common.runTfx(async tfx => {
|
||||
try {
|
||||
tfx.arg(["extension", "isvalid", "--json", "--no-color"]);
|
||||
|
||||
await common.setTfxMarketplaceArguments(tfx);
|
||||
common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
const options = {
|
||||
retries: +tl.getInput("maxRetries", false) || 10,
|
||||
factor: 1,
|
||||
minTimeout: 1000 * 60 * (+tl.getInput("minTimeout", false) || 1),
|
||||
maxTimeout: 1000 * 60 * (+tl.getInput("maxTimeout", false) || 15),
|
||||
randomize: false
|
||||
};
|
||||
|
||||
await promiseRetry(options,
|
||||
(retry, attempt) => {
|
||||
tl.debug(`Attempt: ${attempt}`);
|
||||
const result = tfx.execSync({ silent: false, failOnStdErr: false } as any);
|
||||
const json = JSON.parse(result.stdout);
|
||||
switch (json.status) {
|
||||
case "pending":
|
||||
return retry(json.status);
|
||||
case "success":
|
||||
return json.status;
|
||||
default:
|
||||
throw json.status;
|
||||
}
|
||||
});
|
||||
tl.setResult(tl.TaskResult.Succeeded, "Extension is valid.");
|
||||
} catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Extension validation failed: ${err}`);
|
||||
}
|
||||
});
|
После Ширина: | Высота: | Размер: 3.7 KiB |
|
@ -0,0 +1,438 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.isvalidextensionagentv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.isvalidextensionagentv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"promise-retry": "^2.0.1",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/err-code": {
|
||||
"version": "2.0.3",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/promise-retry": {
|
||||
"version": "2.0.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"err-code": "^2.0.2",
|
||||
"retry": "^0.12.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/retry": {
|
||||
"version": "0.12.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.isvalidextensionagentv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Is Valid Extension Agent Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"promise-retry": "^2.0.1",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
"id": "b86cdd2a-0579-4d40-b28f-18197ffaf520",
|
||||
"name": "IsAzureDevOpsExtensionValid",
|
||||
"friendlyName": "Is valid Extension",
|
||||
"description": "Check Visual Studio Marketplace validation status.",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "extension",
|
||||
"displayName": "Extension",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "retry",
|
||||
"displayName": "Retry",
|
||||
"isExpanded": true
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Check Marketplace validation status: $(extensionId)",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "method",
|
||||
"type": "radio",
|
||||
"label": "Validate using",
|
||||
"required": true,
|
||||
"defaultValue": "id",
|
||||
"helpMarkDown": "Validate using either an existing VSIX or using the Publisher, Extension ID and version.",
|
||||
"options": {
|
||||
"id": "Publisher + Extension ID",
|
||||
"vsix": "VSIX"
|
||||
},
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Publisher ID of the extension to be installed.",
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension ID of the extension to be installed",
|
||||
"required": true,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension ID",
|
||||
"required": false,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionVersion",
|
||||
"type": "string",
|
||||
"label": "Extension Version",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension version (leave the value empty to check the last submitted version).",
|
||||
"required": false,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "vsixFile",
|
||||
"type": "filePath",
|
||||
"label": "VSIX file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "VSIX file of the extension to be installed. Supports wildcards.",
|
||||
"visibleRule": "method = vsix",
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "string",
|
||||
"label": "Maximum number of retries",
|
||||
"defaultValue": "10",
|
||||
"required": false,
|
||||
"helpMarkDown": "Maximum number of retries.",
|
||||
"groupName": "retry"
|
||||
},
|
||||
{
|
||||
"name": "minTimeout",
|
||||
"type": "string",
|
||||
"label": "Time between retries",
|
||||
"defaultValue": "1",
|
||||
"required": false,
|
||||
"helpMarkDown": "Time between retries (minutes).",
|
||||
"groupName": "retry"
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "IsValidExtensionAgent/v5/IsValidExtension.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"IsValidExtension.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:26:57.474Z
|
||||
created: 2023-03-03T12:26:57.482Z
|
||||
patch: {}
|
|
@ -0,0 +1,49 @@
|
|||
import * as tl from "azure-pipelines-task-lib/task.js";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
|
||||
try {
|
||||
await common.runTfx(async tfx => {
|
||||
let cleanupTfxArgs: () => void = null;
|
||||
try {
|
||||
tfx.arg(["extension", "create", "--json", "--no-color"]);
|
||||
const outputVariable = tl.getInput("outputVariable", false);
|
||||
|
||||
// Set tfx manifest arguments
|
||||
cleanupTfxArgs = common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
// Set vsix output path
|
||||
const outputPath = tl.getInput("outputPath", false);
|
||||
tfx.argIf(outputPath, ["--output-path", outputPath]);
|
||||
|
||||
// Before executing check update on tasks version
|
||||
await common.checkUpdateTasksManifests();
|
||||
const outputStream = new common.TfxJsonOutputStream(console.log);
|
||||
|
||||
const code = await tfx.execAsync(<any>{ outStream: outputStream, failOnStdErr: false });
|
||||
if (code !== 0) {
|
||||
throw `tfx exited with return code: ${code}`
|
||||
}
|
||||
const json = JSON.parse(outputStream.jsonString);
|
||||
|
||||
if (outputVariable) {
|
||||
tl.setVariable(outputVariable, json.path);
|
||||
}
|
||||
tl.setVariable("Extension.OutputPath", json.path);
|
||||
|
||||
console.log(`Packaged extension: ${json.path}.`);
|
||||
tl.setResult(tl.TaskResult.Succeeded, `tfx exited with return code: ${code}`);
|
||||
}
|
||||
catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `${err}`);
|
||||
}
|
||||
finally {
|
||||
if (cleanupTfxArgs) {
|
||||
cleanupTfxArgs();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
console.log(`Error packaging extension: ${err}.`);
|
||||
tl.setResult(tl.TaskResult.Failed, `Error packaging extension: ${err}`);
|
||||
}
|
После Ширина: | Высота: | Размер: 4.0 KiB |
|
@ -0,0 +1,415 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.packageextensionv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.packageextensionv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.packageextensionv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Package Extension Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
{
|
||||
"id": "e59022e0-667a-11e5-ad4c-dd75b69a0d2c",
|
||||
"name": "PackageAzureDevOpsExtension",
|
||||
"friendlyName": "Package Extension",
|
||||
"description": "Package an Azure DevOps extension into a VSIX file",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Package",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "overrides",
|
||||
"displayName": "Overrides manifest",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"displayName": "Advanced",
|
||||
"isExpanded": false
|
||||
},
|
||||
{
|
||||
"name": "backcompat",
|
||||
"displayName": "Backward Compatibility",
|
||||
"isExpanded": false
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Package Extension: $(rootFolder)",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "rootFolder",
|
||||
"type": "filePath",
|
||||
"label": "Root manifests folder",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Root folder from which the manifests are searched."
|
||||
},
|
||||
{
|
||||
"name": "localizationRoot",
|
||||
"type": "filePath",
|
||||
"label": "Localization Root folder",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Folder where localization file(s) exist."
|
||||
},
|
||||
{
|
||||
"name": "patternManifest",
|
||||
"type": "multiLine",
|
||||
"properties": {
|
||||
"resizable": true,
|
||||
"rows": "1"
|
||||
},
|
||||
"label": "Manifest file(s)",
|
||||
"defaultValue": "vss-extension.json",
|
||||
"required": false,
|
||||
"helpMarkDown": "Specify the pattern for manifest files. One file per line."
|
||||
},
|
||||
{
|
||||
"name": "outputPath",
|
||||
"type": "filePath",
|
||||
"label": "Package output file",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Specify the path and file name of the generated vsix."
|
||||
},
|
||||
{
|
||||
"name": "outputVariable",
|
||||
"type": "string",
|
||||
"label": "Output Variable (deprecated)",
|
||||
"defaultValue": "Extension.OutputPath",
|
||||
"required": false,
|
||||
"helpMarkDown": "The variable name to assign the location of the generated package to. Specify only the name, e.g.: `Extension.OutputPath`, not `$(Extension.OutputPath)`.",
|
||||
"groupName": "backcompat"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Extension publisher ID. If not specified, the publisher specified in the manifest will be used.",
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Overrides extension ID. If not specified, the extension ID specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension ID",
|
||||
"required": false,
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "extensionName",
|
||||
"type": "string",
|
||||
"label": "Extension name",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Overrides extension name. If not specified, the extension name specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "extensionVersion",
|
||||
"type": "string",
|
||||
"label": "Extension version",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Overrides extension version. If not specified, the extension version specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "updateTasksVersion",
|
||||
"type": "boolean",
|
||||
"label": "Override tasks version",
|
||||
"defaultValue": "false",
|
||||
"required": true,
|
||||
"helpMarkDown": "Search for contributed tasks in extension manifests and updates the version specified in each Build and Release task found.",
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "updateTasksVersionType",
|
||||
"type": "pickList",
|
||||
"label": "Override Type",
|
||||
"defaultValue": "major",
|
||||
"options": {
|
||||
"major": "Replace Major, Minor, Patch (x.y.r)",
|
||||
"minor": "Replace Minor, Patch (1.y.r)",
|
||||
"patch": "Replace Only Patch (1.0.r)"
|
||||
},
|
||||
"required": false,
|
||||
"helpMarkDown": "The Task version replacement format. You can select which part(s) of the version number to update (Major (x.y.r), Minor (1.y.r), or Patch (1.0.r)). The value (x.y.r) is taken from the Extension Version input or the extension manifest.",
|
||||
"visibleRule": "updateTasksVersion=true",
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "updateTasksId",
|
||||
"type": "boolean",
|
||||
"label": "Override task id",
|
||||
"defaultValue": "false",
|
||||
"required": false,
|
||||
"helpMarkDown": "Search for contributed tasks in extension manifests and updates the id specified in each Build and Release task found based on the Publisher, ExtensionId and TaskName.",
|
||||
"groupName": "overrides"
|
||||
},
|
||||
{
|
||||
"name": "extensionVisibility",
|
||||
"type": "pickList",
|
||||
"label": "Extension visibility",
|
||||
"defaultValue": "default",
|
||||
"helpMarkDown": "Overrides extension visibility (Public vs Private) and optionally adds the Preview flag. If not specified, the extension visibility specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "overrides",
|
||||
"options": {
|
||||
"default": "Not set",
|
||||
"private": "Private",
|
||||
"private_preview": "Private Preview",
|
||||
"public_preview": "Public Preview",
|
||||
"public": "Public"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "extensionPricing",
|
||||
"type": "pickList",
|
||||
"label": "Extension pricing",
|
||||
"defaultValue": "default",
|
||||
"helpMarkDown": "Overrides extension pricing (Free vs Paid). If not specified, the extension pricing specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "overrides",
|
||||
"options": {
|
||||
"default": "Not set",
|
||||
"free": "Free",
|
||||
"paid": "Paid"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bypassLocalValidation",
|
||||
"type": "boolean",
|
||||
"label": "Bypass local validation",
|
||||
"defaultValue": "false",
|
||||
"helpMarkDown": "Bypass local validation.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "string",
|
||||
"label": "Arguments",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Additional arguments passed to tfx.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"type": "filePath",
|
||||
"label": "Working Directory",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Current working directory when tfx is run. Defaults to the folder where the manifest is located.",
|
||||
"groupName": "advanced"
|
||||
}
|
||||
],
|
||||
"outputVariables": [
|
||||
{
|
||||
"name": "Extension.OutputPath",
|
||||
"description": "Is set with the generated vsix path."
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "PackageExtension/v5/PackageExtension.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"PackageExtension.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-XMLDOM-1534562:
|
||||
- xmldom:
|
||||
reason: None given
|
||||
expires: '2021-12-16T15:01:03.783Z'
|
||||
- x2js > xmldom:
|
||||
reason: None given
|
||||
expires: '2021-12-16T15:01:03.783Z'
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2022-11-12T12:46:16.699Z
|
||||
created: 2022-10-13T12:46:16.704Z
|
||||
SNYK-JS-XMLDOM-3042242:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2022-11-12T12:46:39.870Z
|
||||
created: 2022-10-13T12:46:39.875Z
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:27:01.635Z
|
||||
created: 2023-03-03T12:27:01.642Z
|
||||
patch: {}
|
|
@ -0,0 +1,168 @@
|
|||
import "core-js";
|
||||
import * as tl from "azure-pipelines-task-lib/task.js";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
import * as vsixeditor from "./vsixeditor.js";
|
||||
|
||||
await common.runTfx(async tfx => {
|
||||
let cleanupTfxArgs: () => void;
|
||||
|
||||
try {
|
||||
tfx.arg(["extension", "publish", "--json", "--no-color"]);
|
||||
const outputVariable = tl.getInput("outputVariable", false);
|
||||
|
||||
await common.setTfxMarketplaceArguments(tfx);
|
||||
|
||||
// Read file type
|
||||
const fileType = tl.getInput("fileType", true);
|
||||
let vsixOutput;
|
||||
|
||||
if (fileType === "manifest") {
|
||||
// Set tfx manifest arguments
|
||||
cleanupTfxArgs = common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
// Update tasks version if needed
|
||||
await common.checkUpdateTasksManifests();
|
||||
} else {
|
||||
// Set vsix file argument
|
||||
const vsixFilePattern = tl.getPathInput("vsixFile", true);
|
||||
let matchingVsixFile: string[];
|
||||
if (vsixFilePattern.indexOf("*") >= 0 || vsixFilePattern.indexOf("?") >= 0) {
|
||||
tl.debug("Pattern found in vsixFile parameter");
|
||||
matchingVsixFile = tl.findMatch(tl.getInput("cwd", false) || process.cwd(), vsixFilePattern);
|
||||
}
|
||||
else {
|
||||
tl.debug("No pattern found in vsixFile parameter");
|
||||
matchingVsixFile = [vsixFilePattern];
|
||||
}
|
||||
|
||||
if (!matchingVsixFile || matchingVsixFile.length === 0) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Found no vsix files matching: ${vsixFilePattern}.`);
|
||||
return false;
|
||||
}
|
||||
if (matchingVsixFile.length !== 1) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Found multiple vsix files matching: ${vsixFilePattern}.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
const vsixFile = matchingVsixFile[0];
|
||||
tl.checkPath(vsixFile, "vsixPath");
|
||||
|
||||
vsixOutput = tl.getVariable("System.DefaultWorkingDirectory");
|
||||
|
||||
const publisher = tl.getInput("publisherId", false);
|
||||
|
||||
const extensionId = tl.getInput("extensionId", false);
|
||||
const extensionTag = tl.getInput("extensionTag", false);
|
||||
|
||||
const extensionName = tl.getInput("extensionName", false);
|
||||
const extensionVisibility = tl.getInput("extensionVisibility", false) || "";
|
||||
const extensionPricing = tl.getInput("extensionPricing", false);
|
||||
const extensionVersion = common.getExtensionVersion();
|
||||
const updateTasksId = tl.getBoolInput("updateTasksId", false);
|
||||
const updateTasksVersion = tl.getBoolInput("updateTasksVersion", false);
|
||||
|
||||
if (publisher
|
||||
|| extensionId
|
||||
|| extensionTag
|
||||
|| extensionName
|
||||
|| (extensionPricing && extensionPricing !== "default")
|
||||
|| (extensionVisibility && extensionVisibility !== "default")
|
||||
|| extensionVersion
|
||||
|| updateTasksId) {
|
||||
|
||||
tl.debug("Start editing of VSIX");
|
||||
const ve = new vsixeditor.VSIXEditor(vsixFile, vsixOutput);
|
||||
ve.startEdit();
|
||||
|
||||
if (publisher) { ve.editPublisher(publisher); }
|
||||
if (extensionId) { ve.editId(extensionId); }
|
||||
if (extensionTag) { ve.editIdTag(extensionTag); }
|
||||
if (extensionName) { ve.editExtensionName(extensionName); }
|
||||
if (extensionVisibility) { ve.editExtensionVisibility(extensionVisibility); }
|
||||
if (extensionPricing) { ve.editExtensionPricing(extensionPricing); }
|
||||
if (extensionVersion) {
|
||||
ve.editVersion(extensionVersion);
|
||||
ve.editUpdateTasksVersion(updateTasksVersion);
|
||||
}
|
||||
if (updateTasksId) {
|
||||
ve.editUpdateTasksId(updateTasksId);
|
||||
}
|
||||
|
||||
const vsixGeneratedFile = await ve.endEdit();
|
||||
tfx.arg(["--vsix", vsixGeneratedFile]);
|
||||
vsixOutput = vsixGeneratedFile;
|
||||
}
|
||||
else {
|
||||
vsixOutput = vsixFile;
|
||||
tfx.arg(["--vsix", vsixOutput]);
|
||||
}
|
||||
}
|
||||
|
||||
// Share with
|
||||
const shareWith = tl.getDelimitedInput("shareWith", ",", false).map((value) => { return value.trim(); });
|
||||
const extensionVisibility = tl.getInput("extensionVisibility", false) || "";
|
||||
const connectTo = tl.getInput("connectTo", true);
|
||||
if (shareWith) {
|
||||
if (connectTo === "TFS") {
|
||||
tl.warning("Ignoring Share - Not available on TFS.");
|
||||
}
|
||||
else if (extensionVisibility.indexOf("public") < 0) {
|
||||
// Only handle shareWith if the extension is not public
|
||||
tfx.argIf(shareWith && shareWith.length > 0, ["--share-with"].concat(shareWith));
|
||||
} else if (shareWith && shareWith.length > 0) {
|
||||
tl.warning("Ignoring Share - Not available on public extensions.");
|
||||
}
|
||||
}
|
||||
|
||||
const noWaitValidation = tl.getBoolInput("noWaitValidation", false);
|
||||
if (noWaitValidation) {
|
||||
tl.debug(`Not waiting for validation.`);
|
||||
tfx.arg("--no-wait-validation");
|
||||
}
|
||||
|
||||
const bypassLocalValidation = tl.getBoolInput("bypassLocalValidation", false);
|
||||
if (bypassLocalValidation) {
|
||||
tl.debug(`Bypassing local validation.`);
|
||||
tfx.arg("--bypass-validation");
|
||||
}
|
||||
|
||||
const args = tl.getInput("arguments", false);
|
||||
if (args) {
|
||||
tl.debug(`Adding additional arguments: ${args}.`);
|
||||
tfx.line(args);
|
||||
}
|
||||
|
||||
tl.debug(`Redirecting output to stderr.`);
|
||||
tfx.arg(['--debug-log-stream', 'stderr']);
|
||||
|
||||
tl.debug(`Run tfx.`);
|
||||
const outputStream = new common.TfxJsonOutputStream(console.log);
|
||||
const errorStream = new common.TfxJsonOutputStream(tl.error);
|
||||
|
||||
const code = await tfx.execAsync({ outStream: outputStream, errorStream: errorStream, failOnStdErr: false } as any);
|
||||
if (code !== 0) {
|
||||
throw `tfx exited with return code: ${code}`
|
||||
}
|
||||
const json = JSON.parse(outputStream.jsonString);
|
||||
|
||||
if (json && json.published) {
|
||||
const publishedVsix = fileType === "manifest" ? json.packaged : vsixOutput;
|
||||
|
||||
if (outputVariable) {
|
||||
tl.setVariable(outputVariable, publishedVsix);
|
||||
}
|
||||
tl.setVariable("Extension.OutputPath", publishedVsix);
|
||||
|
||||
console.log(`Published VSIX: ${publishedVsix}.`);
|
||||
tl.setResult(tl.TaskResult.Succeeded, `tfx exited with return code: ${code}`);
|
||||
}
|
||||
else {
|
||||
tl.setResult(tl.TaskResult.Failed, `Publishing failed`);
|
||||
}
|
||||
} catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `tfx failed with error: ${err}`);
|
||||
} finally {
|
||||
if (cleanupTfxArgs) { cleanupTfxArgs(); }
|
||||
}
|
||||
return Promise.resolve(true);
|
||||
});
|
После Ширина: | Высота: | Размер: 3.9 KiB |
|
@ -0,0 +1,487 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.publishextensionv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.publishextensionv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
"7zip-bin": "^5.2.0",
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"core-js": "^3.37.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"temp": "^0.9.4",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0",
|
||||
"x2js": "^3.4.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@xmldom/xmldom": {
|
||||
"version": "0.8.10",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/7zip-bin": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-5.2.0.tgz",
|
||||
"integrity": "sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A=="
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "3.37.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz",
|
||||
"integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==",
|
||||
"hasInstallScript": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/core-js"
|
||||
}
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.7",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/mkdirp": {
|
||||
"version": "0.5.6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.6"
|
||||
},
|
||||
"bin": {
|
||||
"mkdirp": "bin/cmd.js"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/rimraf": {
|
||||
"version": "2.6.3",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"glob": "^7.1.3"
|
||||
},
|
||||
"bin": {
|
||||
"rimraf": "bin.js"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/temp": {
|
||||
"version": "0.9.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mkdirp": "^0.5.1",
|
||||
"rimraf": "~2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/x2js": {
|
||||
"version": "3.4.4",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@xmldom/xmldom": "^0.8.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.publishextensionv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Publish Extension Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@xmldom/xmldom": "^0.8.10",
|
||||
"7zip-bin": "^5.2.0",
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"core-js": "^3.37.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"temp": "^0.9.4",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0",
|
||||
"x2js": "^3.4.4"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,310 @@
|
|||
{
|
||||
"id": "631511B4-50AB-47C8-B766-7AE2AA672733",
|
||||
"name": "PublishAzureDevOpsExtension",
|
||||
"friendlyName": "Publish Extension",
|
||||
"description": "Publish an Azure DevOps extension to the Visual Studio Marketplace",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "manifest",
|
||||
"displayName": "Extension manifest",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"displayName": "Advanced",
|
||||
"isExpanded": false
|
||||
},
|
||||
{
|
||||
"name": "backcompat",
|
||||
"displayName": "Backward Compatibility",
|
||||
"isExpanded": false
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Publish Extension",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)",
|
||||
"TFS": "Azure DevOps Server"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameTFS",
|
||||
"type": "connectedService:TfsMarketplacePublishing",
|
||||
"label": "TFS Local Gallery connection",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=TFS"
|
||||
},
|
||||
{
|
||||
"name": "fileType",
|
||||
"type": "radio",
|
||||
"label": "Input file type",
|
||||
"required": true,
|
||||
"defaultValue": "manifest",
|
||||
"options": {
|
||||
"manifest": "Extension manifest file",
|
||||
"vsix": "VSIX file"
|
||||
},
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "vsixFile",
|
||||
"type": "filePath",
|
||||
"label": "VSIX file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "VSIX file to publish. Supports wildcards.",
|
||||
"visibleRule": "fileType = vsix",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "rootFolder",
|
||||
"type": "filePath",
|
||||
"label": "Root manifest folder",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Folder where manifest file(s) exist.",
|
||||
"visibleRule": "fileType = manifest",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "localizationRoot",
|
||||
"type": "filePath",
|
||||
"label": "Localization Root folder",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Folder where localization file(s) exist.",
|
||||
"visibleRule": "fileType = manifest",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "patternManifest",
|
||||
"type": "multiLine",
|
||||
"properties": {
|
||||
"resizable": true,
|
||||
"rows": "1"
|
||||
},
|
||||
"label": "Manifest file(s)",
|
||||
"defaultValue": "vss-extension.json",
|
||||
"required": false,
|
||||
"helpMarkDown": "Specify the pattern for manifest files. One file per line.",
|
||||
"visibleRule": "fileType = manifest",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Extension publisher ID. If not specified, the publisher specified in the manifest will be used.",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Overrides extension ID. If not specified, the extension ID specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension ID",
|
||||
"required": false,
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "extensionName",
|
||||
"type": "string",
|
||||
"label": "Extension name",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Overrides extension name. If not specified, the extension name specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "extensionVersion",
|
||||
"type": "string",
|
||||
"label": "Extension version",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Overrides extension version. If not specified, the extension version specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "updateTasksVersion",
|
||||
"type": "boolean",
|
||||
"label": "Override task version",
|
||||
"defaultValue": "true",
|
||||
"required": false,
|
||||
"helpMarkDown": "Search for contributed tasks in extension manifests and updates the version specified in each Build and Release task found.",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "updateTasksVersionType",
|
||||
"type": "pickList",
|
||||
"label": "Override Type",
|
||||
"defaultValue": "major",
|
||||
"options": {
|
||||
"major": "Replace Major, Minor, Patch (x.y.r)",
|
||||
"minor": "Replace Minor, Patch (1.y.r)",
|
||||
"patch": "Replace Only Patch (1.0.r)"
|
||||
},
|
||||
"required": false,
|
||||
"helpMarkDown": "The Task version replacement format. You can select which part(s) of the version number to update (Major (x.y.r), Minor (1.y.r), or Patch (1.0.r)). The value (x.y.r) is taken from the Extension Version input or the extension manifest.",
|
||||
"visibleRule": "updateTasksVersion=true",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "updateTasksId",
|
||||
"type": "boolean",
|
||||
"label": "Override task id",
|
||||
"defaultValue": "false",
|
||||
"required": false,
|
||||
"helpMarkDown": "Search for contributed tasks in extension manifests and updates the id specified in each Build and Release task found based on the Publisher, ExtensionId and TaskName.",
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "extensionVisibility",
|
||||
"type": "pickList",
|
||||
"label": "Extension visibility",
|
||||
"defaultValue": "default",
|
||||
"helpMarkDown": "Overrides extension visibility (Public vs Private) and optionally adds the Preview flag. If not specified, the extension visibility specified in the manifest will be used",
|
||||
"required": false,
|
||||
"options": {
|
||||
"default": "Not set",
|
||||
"private": "Private",
|
||||
"privatepreview": "Private Preview",
|
||||
"publicpreview": "Public Preview",
|
||||
"public": "Public"
|
||||
},
|
||||
"groupName": "manifest"
|
||||
},
|
||||
{
|
||||
"name": "extensionPricing",
|
||||
"type": "pickList",
|
||||
"label": "Extension pricing",
|
||||
"defaultValue": "default",
|
||||
"helpMarkDown": "Overrides extension pricing (Free vs Paid). If not specified, the extension pricing specified in the manifest will be used",
|
||||
"required": false,
|
||||
"groupName": "manifest",
|
||||
"options": {
|
||||
"default": "Not set",
|
||||
"free": "Free",
|
||||
"paid": "Paid"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "outputVariable",
|
||||
"type": "string",
|
||||
"label": "Output Variable (deprecated)",
|
||||
"defaultValue": "Extension.OutputPath",
|
||||
"required": false,
|
||||
"helpMarkDown": "The variable name to assign the location of the generated package to. Specify only the name, e.g.: `Extension.OutputPath`, not `$(Extension.OutputPath)`.",
|
||||
"groupName": "backcompat"
|
||||
},
|
||||
{
|
||||
"name": "shareWith",
|
||||
"type": "string",
|
||||
"label": "Share with",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Comma separated list of organisations with which to share the extension if it's private (e.g. org_x,org_y,org_z). Share is ignored for public extensions and when publishing to TFS.",
|
||||
"required": false,
|
||||
"groupName": "manifest",
|
||||
"visibleRule": "extensionVisibility = private || extensionVisibility = privatepreview || extensionVisibility = default"
|
||||
},
|
||||
{
|
||||
"name": "bypassLocalValidation",
|
||||
"type": "boolean",
|
||||
"label": "Bypass local validation",
|
||||
"defaultValue": "false",
|
||||
"helpMarkDown": "Bypass local validation.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "noWaitValidation",
|
||||
"type": "boolean",
|
||||
"label": "Don't wait for validation",
|
||||
"defaultValue": "false",
|
||||
"helpMarkDown": "Don't block command for extension validation.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "string",
|
||||
"label": "Arguments",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Additional arguments passed to the package and publishing tool.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"type": "filePath",
|
||||
"label": "Working Directory",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Working directory to run the package and publishing process from. Defaults to the folder where the manifest is located.",
|
||||
"groupName": "advanced"
|
||||
}
|
||||
],
|
||||
"outputVariables": [
|
||||
{
|
||||
"name": "Extension.OutputPath",
|
||||
"description": "Is set with the generated vsix path."
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "PublishExtension/v5/PublishExtension.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"vsixeditor.ts",
|
||||
"PublishExtension.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,352 @@
|
|||
import "core-js";
|
||||
import * as temp from "temp";
|
||||
import * as fs from "fs";
|
||||
import * as fse from "fs-extra";
|
||||
import * as path from "path";
|
||||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as tr from "azure-pipelines-task-lib/toolrunner.js";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
|
||||
interface VsixManifest {
|
||||
PackageManifest: {
|
||||
Metadata: {
|
||||
Identity: {
|
||||
_Id: string;
|
||||
_Version: string;
|
||||
_Publisher: string;
|
||||
};
|
||||
DisplayName: string;
|
||||
GalleryFlags: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
class ManifestData {
|
||||
public outputFileName: string;
|
||||
constructor(public version: string,
|
||||
public id: string,
|
||||
public publisher: string,
|
||||
public visibility: string,
|
||||
public pricing: string,
|
||||
public name: string,
|
||||
public dirPath: string) { }
|
||||
|
||||
public createOutputFilePath(outputPath: string): string {
|
||||
const fileName = `${this.publisher}.${this.id}-${this.version}.gen.vsix`;
|
||||
|
||||
const updateFileName = (fileName: string, iteration: number) => {
|
||||
if (iteration > 0) {
|
||||
const gen = iteration.toString().padStart(2, "0");
|
||||
fileName = `${this.publisher}.${this.id}-${this.version}.gen${gen}.vsix`;
|
||||
}
|
||||
fs.exists(path.join(outputPath, fileName), result => {
|
||||
if (result) {
|
||||
updateFileName(fileName, ++iteration);
|
||||
} else {
|
||||
tl.debug("Generated filename: " + fileName);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
updateFileName(fileName, 0);
|
||||
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
|
||||
class GalleryFlagsEditor {
|
||||
flags: string[] = [];
|
||||
constructor(galleryFlagsEditor: string) {
|
||||
if (galleryFlagsEditor) {
|
||||
this.flags = galleryFlagsEditor.split(" ").filter(f => f != null && f !== "");
|
||||
}
|
||||
}
|
||||
|
||||
private addFlag(flag: string) {
|
||||
if (this.flags.indexOf(flag) < 0) { this.flags.push(flag); }
|
||||
}
|
||||
|
||||
private removeFlag(flag: string) {
|
||||
const index = this.flags.indexOf(flag);
|
||||
if (index >= 0) { this.flags.splice(index, 1); }
|
||||
}
|
||||
|
||||
addPublicFlag() {
|
||||
this.addFlag("Public");
|
||||
}
|
||||
|
||||
removePublicFlag() {
|
||||
this.removeFlag("Public");
|
||||
}
|
||||
|
||||
removePaidFlag() {
|
||||
this.removeFlag("Paid");
|
||||
}
|
||||
|
||||
addPaidFlag() {
|
||||
this.addFlag("Paid");
|
||||
}
|
||||
|
||||
addPreviewFlag() {
|
||||
this.addFlag("Preview");
|
||||
}
|
||||
|
||||
removePreviewFlag() {
|
||||
this.removeFlag("Preview");
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return this.flags.join(" ");
|
||||
}
|
||||
}
|
||||
|
||||
export class VSIXEditor {
|
||||
private edit = false;
|
||||
private versionNumber: string = null;
|
||||
private id: string = null;
|
||||
private idTag: string = null;
|
||||
private publisher: string = null;
|
||||
private extensionName: string = null;
|
||||
private extensionVisibility: string = null;
|
||||
private extensionPricing: string = null;
|
||||
private updateTasksVersion = true;
|
||||
private updateTasksId = true;
|
||||
|
||||
constructor(
|
||||
public inputFile: string,
|
||||
public outputPath: string) {
|
||||
}
|
||||
|
||||
public startEdit() {
|
||||
if (this.edit) { throw new Error("Edit is already started"); }
|
||||
this.edit = true;
|
||||
tl.debug("Editing started");
|
||||
}
|
||||
|
||||
private async extractArchive(vsix: string, tmpPath: string): Promise<void> {
|
||||
const cwd = tl.cwd();
|
||||
|
||||
if (tl.getPlatform() === tl.Platform.Windows) {
|
||||
const sevenZip = (await import("7zip-bin")).default;
|
||||
const zip = new tr.ToolRunner(sevenZip.path7za);
|
||||
|
||||
zip.arg("x");
|
||||
zip.arg(vsix); // file to extract
|
||||
zip.arg(`-o${tmpPath}`); // redirect output to dir
|
||||
zip.arg("task.json");
|
||||
zip.arg("task.loc.json");
|
||||
zip.arg("extension.vsixmanifest");
|
||||
zip.arg("extension.vsomanifest");
|
||||
zip.arg("-y"); // assume yes on all queries
|
||||
zip.arg("-r"); // recurse
|
||||
zip.arg("-bd"); // disable progress indicator
|
||||
zip.arg("-aoa"); // overwrite all
|
||||
zip.arg("-spd"); // disable wildcards
|
||||
zip.execSync();
|
||||
}
|
||||
else {
|
||||
const zip = new tr.ToolRunner(tl.which("unzip", true));
|
||||
|
||||
zip.arg("-o"); // overwrite all
|
||||
zip.arg("-C"); // match case insensitive
|
||||
zip.arg("-d"); // redirect output to
|
||||
zip.arg(tmpPath); // output directory
|
||||
zip.arg(vsix); // file to extract
|
||||
zip.arg("*/task.json");
|
||||
zip.arg("*/task.loc.json");
|
||||
zip.arg("extension.vsixmanifest");
|
||||
zip.arg("extension.vsomanifest");
|
||||
zip.execSync();
|
||||
}
|
||||
tl.cd(cwd);
|
||||
}
|
||||
|
||||
private async createArchive(originalVsix: string, tmpPath: string, targetVsix: string): Promise<void> {
|
||||
const cwd = tl.cwd();
|
||||
|
||||
if (originalVsix !== targetVsix) { tl.cp(originalVsix, targetVsix, "-f"); }
|
||||
|
||||
if (tl.getPlatform() === tl.Platform.Windows) {
|
||||
const sevenZip = await import("7zip-bin");
|
||||
const zip = new tr.ToolRunner(sevenZip.path7za);
|
||||
|
||||
zip.arg("u");
|
||||
zip.arg(targetVsix); // redirect output to file
|
||||
zip.arg(path.join(tmpPath, "\\*"));
|
||||
zip.arg("-r"); // recursive
|
||||
zip.arg("-y"); // assume yes on all queries
|
||||
zip.arg("-tzip"); // zip format
|
||||
zip.arg("-mx9"); // max compression level
|
||||
zip.arg("-bd"); // disable progress indicator
|
||||
zip.execSync();
|
||||
}
|
||||
else {
|
||||
const zip = new tr.ToolRunner(tl.which("zip", true));
|
||||
|
||||
tl.cd(tmpPath);
|
||||
zip.arg(path.join(cwd, targetVsix)); // redirect output to file
|
||||
zip.arg(".");
|
||||
zip.arg("-r"); // recursive
|
||||
zip.arg("-9"); // max compression level
|
||||
zip.arg("-f"); // update changed files only
|
||||
zip.execSync();
|
||||
}
|
||||
tl.cd(cwd);
|
||||
}
|
||||
|
||||
public async endEdit(): Promise<string> {
|
||||
this.validateEditMode();
|
||||
|
||||
if (!this.hasEdits()) { return this.inputFile; }
|
||||
|
||||
temp.track();
|
||||
|
||||
const dirPath = await temp.mkdir("vsixeditor");
|
||||
tl.debug("Extracting files to " + dirPath);
|
||||
|
||||
await this.extractArchive(this.inputFile, dirPath);
|
||||
if (this.versionNumber && this.updateTasksVersion || this.updateTasksId) {
|
||||
tl.debug("Look for build tasks manifest");
|
||||
const extensionManifest = path.join(dirPath, "extension.vsomanifest");
|
||||
await common.checkUpdateTasksManifests(extensionManifest);
|
||||
}
|
||||
|
||||
tl.debug("Editing VSIX manifest");
|
||||
const manifestData = await this.editVsixManifest(dirPath);
|
||||
manifestData.outputFileName = manifestData.createOutputFilePath(this.outputPath);
|
||||
|
||||
tl.debug(`Creating final archive file at ${this.outputPath}`);
|
||||
await this.createArchive(this.inputFile, manifestData.dirPath, manifestData.outputFileName);
|
||||
tl.debug("Final archive file created");
|
||||
|
||||
return manifestData.outputFileName;
|
||||
}
|
||||
|
||||
private async editVsixManifest(dirPath: string): Promise<ManifestData> {
|
||||
const x2jsLib = (await import("x2js")).default;
|
||||
const x2js = new x2jsLib();
|
||||
|
||||
const vsixManifestPath = path.join(dirPath, "extension.vsixmanifest");
|
||||
|
||||
let vsixManifestData = await fse.readFile(vsixManifestPath, "utf8");
|
||||
|
||||
const vsixmanifest = x2js.xml2js<VsixManifest>(vsixManifestData);
|
||||
const identity = vsixmanifest.PackageManifest.Metadata.Identity;
|
||||
|
||||
if (this.versionNumber) { identity._Version = this.versionNumber; }
|
||||
if (this.id) { identity._Id = this.id; }
|
||||
if (this.idTag) { identity._Id += this.idTag; }
|
||||
if (this.publisher) { identity._Publisher = this.publisher; }
|
||||
if (this.extensionName) { vsixmanifest.PackageManifest.Metadata.DisplayName = this.extensionName; }
|
||||
if (this.extensionVisibility && this.extensionVisibility !== "default") {
|
||||
const flagsEditor = new GalleryFlagsEditor(vsixmanifest.PackageManifest.Metadata.GalleryFlags);
|
||||
|
||||
const isPublic = this.extensionVisibility.indexOf("public") >= 0;
|
||||
const isPreview = this.extensionVisibility.indexOf("preview") >= 0;
|
||||
|
||||
if (isPublic) {
|
||||
flagsEditor.addPublicFlag();
|
||||
}
|
||||
else {
|
||||
flagsEditor.removePublicFlag();
|
||||
}
|
||||
|
||||
if (isPreview) {
|
||||
flagsEditor.addPreviewFlag();
|
||||
}
|
||||
else {
|
||||
flagsEditor.removePreviewFlag();
|
||||
}
|
||||
|
||||
vsixmanifest.PackageManifest.Metadata.GalleryFlags = flagsEditor.toString();
|
||||
}
|
||||
if (this.extensionPricing && this.extensionPricing !== "default") {
|
||||
const flagsEditor = new GalleryFlagsEditor(vsixmanifest.PackageManifest.Metadata.GalleryFlags);
|
||||
|
||||
const isFree = this.extensionPricing.indexOf("free") >= 0;
|
||||
const isPaid = this.extensionPricing.indexOf("paid") >= 0;
|
||||
|
||||
if (isFree) {
|
||||
flagsEditor.removePaidFlag();
|
||||
}
|
||||
|
||||
if (isPaid) {
|
||||
flagsEditor.addPaidFlag();
|
||||
}
|
||||
|
||||
vsixmanifest.PackageManifest.Metadata.GalleryFlags = flagsEditor.toString();
|
||||
}
|
||||
|
||||
vsixManifestData = x2js.js2xml(vsixmanifest);
|
||||
const manifestData = new ManifestData(identity._Version,
|
||||
identity._Id,
|
||||
identity._Publisher,
|
||||
this.extensionVisibility,
|
||||
this.extensionPricing,
|
||||
vsixmanifest.PackageManifest.Metadata.DisplayName,
|
||||
dirPath);
|
||||
|
||||
await fse.writeFile(vsixManifestPath, vsixManifestData, { encoding: "utf8" });
|
||||
return manifestData;
|
||||
}
|
||||
|
||||
public hasEdits(): boolean {
|
||||
return <boolean>(this.versionNumber
|
||||
|| this.id
|
||||
|| this.idTag
|
||||
|| this.publisher
|
||||
|| this.extensionName
|
||||
|| (this.extensionVisibility && this.extensionVisibility !== "default")
|
||||
|| (this.extensionPricing && this.extensionPricing !== "default"))
|
||||
|| this.updateTasksId;
|
||||
}
|
||||
|
||||
public editVersion(version: string) {
|
||||
this.validateEditMode();
|
||||
this.versionNumber = version;
|
||||
}
|
||||
|
||||
public editExtensionName(name: string) {
|
||||
this.validateEditMode();
|
||||
this.extensionName = name;
|
||||
}
|
||||
|
||||
public editExtensionVisibility(visibility: string) {
|
||||
this.validateEditMode();
|
||||
this.extensionVisibility = visibility;
|
||||
}
|
||||
|
||||
public editExtensionPricing(pricing: string) {
|
||||
this.validateEditMode();
|
||||
this.extensionPricing = pricing;
|
||||
}
|
||||
|
||||
public editId(id: string) {
|
||||
this.validateEditMode();
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public editIdTag(tag: string) {
|
||||
this.validateEditMode();
|
||||
this.idTag = tag;
|
||||
}
|
||||
|
||||
public editPublisher(publisher: string) {
|
||||
this.validateEditMode();
|
||||
this.publisher = publisher;
|
||||
}
|
||||
|
||||
public editUpdateTasksVersion(updateTasksVersion: boolean) {
|
||||
this.validateEditMode();
|
||||
this.updateTasksVersion = updateTasksVersion;
|
||||
}
|
||||
|
||||
public editUpdateTasksId(updateTasksId: boolean) {
|
||||
this.validateEditMode();
|
||||
this.updateTasksId = updateTasksId;
|
||||
}
|
||||
|
||||
private validateEditMode() {
|
||||
if (!this.edit) { throw new Error("Editing is not started"); }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:27:05.479Z
|
||||
created: 2023-03-03T12:27:05.484Z
|
||||
patch: {}
|
|
@ -0,0 +1,37 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import { getFederatedToken } from "azure-pipelines-tasks-artifacts-common/webapi.js";
|
||||
import * as util from "./Utils.js";
|
||||
|
||||
let publisher = "";
|
||||
|
||||
try {
|
||||
const connectTo = tl.getInput("connectTo", false) ?? "VsTeam";
|
||||
let token: string;
|
||||
if (connectTo === "VsTeam") {
|
||||
const connectedService = tl.getInput("connectedServiceName", true);
|
||||
token = tl.getEndpointAuthorizationParameter(connectedService, "password", true);
|
||||
} else {
|
||||
token = await getFederatedToken("connectedServiceNameAzureRM");
|
||||
}
|
||||
|
||||
const vsixFile = tl.getPathInput("vsixFile", true, true);
|
||||
const manifestFile = tl.getPathInput("manifestFile", true, true);
|
||||
const publisherId = tl.getInput("publisherId", true);
|
||||
publisher = publisherId;
|
||||
const ignoreWarnings = tl.getInput("ignoreWarnings", false);
|
||||
|
||||
console.info(`Logging in as '${publisherId}'`);
|
||||
util.login(publisherId, token);
|
||||
|
||||
console.info(`Publishing '${vsixFile}' to Visual Studio marketplace`)
|
||||
util.publish(vsixFile, manifestFile, ignoreWarnings);
|
||||
} catch (error) {
|
||||
const { message } = (error as Error);
|
||||
tl.error(message);
|
||||
tl.setResult(tl.TaskResult.Failed, message);
|
||||
}
|
||||
finally {
|
||||
console.info(`Logging out publisher '${publisher}'`);
|
||||
util.logout(publisher);
|
||||
console.log("All done");
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as tr from "azure-pipelines-task-lib/toolrunner.js";
|
||||
import * as path from "path";
|
||||
|
||||
let cacheVsixPublisherExe = "";
|
||||
let loggedIn = false;
|
||||
|
||||
export function getVsixPublisherExe(): string {
|
||||
if (cacheVsixPublisherExe === "") {
|
||||
const vswhereTool = tl.tool(path.join(__dirname, "tools", "vswhere.exe"));
|
||||
vswhereTool.line("-version [15.0,) -latest -requires Microsoft.VisualStudio.Component.VSSDK -find VSSDK\\VisualStudioIntegration\\Tools\\Bin\\VsixPublisher.exe");
|
||||
const vswhereResult = vswhereTool.execSync({ silent: true } as tr.IExecSyncOptions);
|
||||
const vsixPublisherExe = vswhereResult.stdout.trim();
|
||||
if (vswhereResult.code === 0 && vsixPublisherExe && tl.exist(vsixPublisherExe)) {
|
||||
tl.debug('VsixPublisher.exe installed path: ' + vsixPublisherExe);
|
||||
cacheVsixPublisherExe = vsixPublisherExe;
|
||||
}
|
||||
else {
|
||||
throw new Error("Could not locate vsixpublisher.exe. Ensure the Visual Studio SDK is installed on the agent.");
|
||||
}
|
||||
}
|
||||
return cacheVsixPublisherExe;
|
||||
}
|
||||
|
||||
export function login(publisher: string, token: string) {
|
||||
const vsixPublisherExe = getVsixPublisherExe();
|
||||
const vsixPublisher = tl.tool(vsixPublisherExe);
|
||||
|
||||
vsixPublisher.arg("login");
|
||||
vsixPublisher.arg(["-personalAccessToken", token]);
|
||||
vsixPublisher.arg(["-publisherName", publisher]);
|
||||
|
||||
if (vsixPublisher.execSync({ failOnStdErr: true } as tr.IExecOptions).code !== 0) {
|
||||
throw new Error("Login failed.");
|
||||
}
|
||||
|
||||
loggedIn = true;
|
||||
console.info(`Login successful.`)
|
||||
}
|
||||
|
||||
export function logout(publisher: string) {
|
||||
if (loggedIn) {
|
||||
const vsixPublisherExe = getVsixPublisherExe();
|
||||
const vsixPublisher = tl.tool(vsixPublisherExe);
|
||||
|
||||
vsixPublisher.arg("logout");
|
||||
vsixPublisher.arg(["-publisherName", publisher]);
|
||||
vsixPublisher.arg("-ignoreMissingPublisher");
|
||||
|
||||
if (vsixPublisher.execSync({ failOnStdErr: true } as tr.IExecOptions).code !== 0) {
|
||||
throw new Error("Logout failed.");
|
||||
}
|
||||
loggedIn = false;
|
||||
}
|
||||
console.info(`Logout successful.`)
|
||||
}
|
||||
|
||||
export function publish(vsixPath: string, manifestPath: string, warningsToIgnore: string) {
|
||||
const vsixPublisherExe = getVsixPublisherExe();
|
||||
const vsixPublisher = tl.tool(vsixPublisherExe);
|
||||
|
||||
vsixPublisher.arg("publish");
|
||||
vsixPublisher.arg(["-payload", vsixPath]);
|
||||
vsixPublisher.arg(["-publishManifest", manifestPath]);
|
||||
vsixPublisher.arg(["-ignoreWarnings", warningsToIgnore]);
|
||||
|
||||
if (vsixPublisher.execSync({ failOnStdErr: true } as tr.IExecOptions).code !== 0) {
|
||||
throw new Error("Publish failed.");
|
||||
}
|
||||
|
||||
console.info(`Published successfully.`)
|
||||
}
|
После Ширина: | Высота: | Размер: 1.4 KiB |
|
@ -0,0 +1,678 @@
|
|||
{
|
||||
"name": "publishvsextension",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "publishvsextension",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"azure-pipelines-tasks-artifacts-common": "^2.230.0",
|
||||
"core-js": "^3.37.0",
|
||||
"tmp": "^0.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/fs-extra": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.0.0.tgz",
|
||||
"integrity": "sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q==",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/mocha": {
|
||||
"version": "5.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz",
|
||||
"integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ=="
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.18.97",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.97.tgz",
|
||||
"integrity": "sha512-4muilE1Lbfn57unR+/nT9AFjWk0MtWi5muwCEJqnOvfRQDbSfLCUdN7vCIg8TYuaANfhLOV85ve+FNpiUsbSRg=="
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-devops-node-api": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.0.0.tgz",
|
||||
"integrity": "sha512-S6Il++7dQeMlZDokBDWw7YVoPeb90tWF10pYxnoauRMnkuL91jq9M7SOYRVhtO3FUC5URPkB/qzGa7jTLft0Xw==",
|
||||
"dependencies": {
|
||||
"tunnel": "0.0.6",
|
||||
"typed-rest-client": "^1.8.4"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common": {
|
||||
"version": "2.230.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-tasks-artifacts-common/-/azure-pipelines-tasks-artifacts-common-2.230.0.tgz",
|
||||
"integrity": "sha512-FWyRjR+eqNjjVvXwiIJVcfLN+DTmbS3icRgrL6zAGx7iIKJOJn+sjlKOuCIR36TaWU4KOVfDGJujDK6Z+WPY8g==",
|
||||
"dependencies": {
|
||||
"@types/fs-extra": "8.0.0",
|
||||
"@types/mocha": "^5.2.6",
|
||||
"@types/node": "^16.11.39",
|
||||
"azure-devops-node-api": "12.0.0",
|
||||
"azure-pipelines-task-lib": "^4.2.0",
|
||||
"fs-extra": "8.1.0",
|
||||
"semver": "6.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tasks-artifacts-common/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "3.37.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz",
|
||||
"integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==",
|
||||
"hasInstallScript": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/core-js"
|
||||
}
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/define-data-property": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6 <7 || >=8"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-proto": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.3",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
|
||||
"integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.12.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz",
|
||||
"integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
"integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.7",
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"object-inspect": "^1.13.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/typed-rest-client": {
|
||||
"version": "1.8.11",
|
||||
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz",
|
||||
"integrity": "sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==",
|
||||
"dependencies": {
|
||||
"qs": "^6.9.1",
|
||||
"tunnel": "0.0.6",
|
||||
"underscore": "^1.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/underscore": {
|
||||
"version": "1.13.6",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
|
||||
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
||||
"engines": {
|
||||
"node": ">= 4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "publishvsextension",
|
||||
"version": "5.0.0",
|
||||
"description": "Publish Visual Studio Extension Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"type": "module",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"azure-pipelines-tasks-artifacts-common": "^2.230.0",
|
||||
"core-js": "^3.37.0",
|
||||
"tmp": "^0.2.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
## Publish Visual Studio Extension task
|
||||
|
||||
With this task you will be able to publish a Visual Studio extension to Marketplace.
|
||||
|
||||
This task uses [VSIXPublisher](https://docs.microsoft.com/en-us/visualstudio/extensibility/walkthrough-publishing-a-visual-studio-extension-via-command-line?view=vs-2017) program to publish Visual Studio extension to Marketplace.
|
||||
|
||||
> VSIXPublisher executable is not shipped with this task, hence this task needs to be run on an agent where at least Visual Studio 2017 with `Microsoft.VisualStudio.Component.VSSDK` workload installed. `Hosted VS 2017` pool contains agents with both Visual Studio and Microsoft.VisualStudio.Component.VSSDK installed.
|
||||
|
||||
### Screenshot
|
||||
|
||||
![screenshot](screenshot.png)
|
||||
|
После Ширина: | Высота: | Размер: 74 KiB |
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"id": "17654839-813a-4e5f-a724-223a68ec647c",
|
||||
"name": "PublishVisualStudioExtension",
|
||||
"friendlyName": "Publish Visual Studio Extension",
|
||||
"description": "Publish Visual Studio extension to the Visual Studio Marketplace",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "[More Information](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-developer-tools-build-tasks)",
|
||||
"preview": true,
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"visualstudio"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [],
|
||||
"instanceNameFormat": "Publish Visual Studio Extension",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "vsixFile",
|
||||
"type": "filePath",
|
||||
"label": "VSIX file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "VSIX file to publish."
|
||||
},
|
||||
{
|
||||
"name": "manifestFile",
|
||||
"type": "filePath",
|
||||
"label": "Manifest file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Path for the manifest file. [more](https://docs.microsoft.com/en-us/visualstudio/extensibility/walkthrough-publishing-a-visual-studio-extension-via-command-line?view=vs-2017#publishmanifest-file)"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Extension publisher ID."
|
||||
},
|
||||
{
|
||||
"name": "ignoreWarnings",
|
||||
"type": "string",
|
||||
"label": "Warnings to ignore",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "List of warnings to ignore when publishing an extension. These warnings are shown as command line messages when publishing an extension. (for example, \"VSIXValidatorWarning01, VSIXValidatorWarning02\")",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "PublishVSExtension.js",
|
||||
"argumentFormat": "",
|
||||
"platforms": [
|
||||
"windows"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"PublishVSExtension.ts",
|
||||
"Utils.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:27:08.858Z
|
||||
created: 2023-03-03T12:27:08.865Z
|
||||
patch: {}
|
|
@ -0,0 +1,20 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
|
||||
await common.runTfx(async tfx => {
|
||||
tfx.arg(["extension", "share", "--no-color"]);
|
||||
|
||||
await common.setTfxMarketplaceArguments(tfx);
|
||||
common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
// Installation targets
|
||||
const accounts = tl.getDelimitedInput("accounts", ",", true);
|
||||
tfx.arg(["--share-with"].concat(accounts).map((value) => { return value.trim(); }));
|
||||
|
||||
try {
|
||||
const code = await tfx.execAsync();
|
||||
tl.setResult(tl.TaskResult.Succeeded, `tfx exited with return code: ${code}`);
|
||||
} catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `tfx failed with error: ${err}`);
|
||||
}
|
||||
});
|
После Ширина: | Высота: | Размер: 3.9 KiB |
|
@ -0,0 +1,415 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.shareextensionv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.shareextensionv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.shareextensionv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Share Extension Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
{
|
||||
"id": "22683a08-0dbe-4fe8-8c53-4606fcb32752",
|
||||
"name": "ShareAzureDevOpsExtension",
|
||||
"friendlyName": "Share Extension",
|
||||
"description": "Share a published extension with a Azure Devops organisation",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "extension",
|
||||
"displayName": "Extension",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "share",
|
||||
"displayName": "Share",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"displayName": "Advanced",
|
||||
"isExpanded": false
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Share Extension",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "method",
|
||||
"type": "radio",
|
||||
"label": "Share using",
|
||||
"required": true,
|
||||
"defaultValue": "id",
|
||||
"helpMarkDown": "Share using either an existing VSIX or using the Publisher and Extension ID.",
|
||||
"options": {
|
||||
"id": "Publisher + Extension ID",
|
||||
"vsix": "VSIX file"
|
||||
},
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Publisher ID of the extension to be shared.",
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension ID of the extension to be shared",
|
||||
"required": true,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension id",
|
||||
"required": false,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "vsixFile",
|
||||
"type": "filePath",
|
||||
"label": "VSIX file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "VSIX file of the extension to be shared. Supports wildcards.",
|
||||
"visibleRule": "method = vsix",
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "accounts",
|
||||
"type": "string",
|
||||
"label": "Share with",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Comma separated list of organisations where to install the extension (e.g. org_x,org_y,org_z)",
|
||||
"required": true,
|
||||
"groupName": "share"
|
||||
},
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "string",
|
||||
"label": "Arguments",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Additional arguments passed to the package and publishing tool.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"type": "filePath",
|
||||
"label": "Working Directory",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Working directory to run the package and publishing process from. Defaults to the folder where the manifest is located.",
|
||||
"groupName": "advanced"
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "ShareExtension/v5/ShareExtension.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"ShareExtension.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-PATHPARSE-1077067:
|
||||
- azure-pipelines-task-lib > shelljs > rechoir > resolve > path-parse:
|
||||
reason: No update available as of yet.
|
||||
expires: '2021-06-05T17:42:01.715Z'
|
||||
- azure-pipelines-tool-lib > azure-pipelines-task-lib > shelljs > rechoir > resolve > path-parse:
|
||||
reason: None given
|
||||
expires: '2021-06-05T17:45:51.228Z'
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:27:12.558Z
|
||||
created: 2023-03-03T12:27:12.565Z
|
||||
patch: {}
|
|
@ -0,0 +1,107 @@
|
|||
import * as tr from 'azure-pipelines-task-lib/toolrunner.js';
|
||||
|
||||
import * as taskLib from 'azure-pipelines-task-lib/task.js';
|
||||
import * as toolLib from 'azure-pipelines-tool-lib/tool.js';
|
||||
|
||||
import * as path from 'path';
|
||||
import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
|
||||
const debug = taskLib.getVariable("system.debug") || false;
|
||||
|
||||
try {
|
||||
const version = taskLib.getInput("version", true);
|
||||
const checkLatest = taskLib.getBoolInput("checkLatest", false) || false;
|
||||
|
||||
await getTfx(version, checkLatest);
|
||||
await taskLib.tool("tfx").arg(["version", "--no-color"]).execAsync();
|
||||
}
|
||||
catch (error: any) {
|
||||
taskLib.setResult(taskLib.TaskResult.Failed, error.message);
|
||||
}
|
||||
|
||||
async function getTfx(versionSpec: string, checkLatest: boolean) {
|
||||
if (toolLib.isExplicitVersion(versionSpec)) {
|
||||
checkLatest = false; // check latest doesn't make sense when explicit version
|
||||
}
|
||||
|
||||
let toolPath: string;
|
||||
if (!checkLatest) {
|
||||
toolPath = toolLib.findLocalTool('tfx', versionSpec);
|
||||
}
|
||||
|
||||
if (!toolPath) {
|
||||
let version: string;
|
||||
if (toolLib.isExplicitVersion(versionSpec)) {
|
||||
version = versionSpec;
|
||||
}
|
||||
else {
|
||||
version = queryLatestMatch(versionSpec);
|
||||
if (!version) {
|
||||
throw new Error(`Unable to find Tfx version '${versionSpec}'`);
|
||||
}
|
||||
|
||||
toolPath = toolLib.findLocalTool('tfx', version);
|
||||
}
|
||||
|
||||
if (!toolPath) {
|
||||
toolPath = await acquireTfx(version);
|
||||
}
|
||||
}
|
||||
|
||||
if (os.platform() !== "win32")
|
||||
{
|
||||
// Depending on target platform npm behaves slightly different. This seems to differ between distros and npm versions too.
|
||||
const probePaths = [toolPath, path.join(toolPath, "/bin"), path.join(toolPath, "/node_modules/.bin/")];
|
||||
toolPath = probePaths.find((probePath) => {
|
||||
return taskLib.exist(path.join(probePath, "/tfx"));
|
||||
});
|
||||
}
|
||||
|
||||
taskLib.setVariable("__tfxpath", toolPath, false);
|
||||
toolLib.prependPath(toolPath);
|
||||
}
|
||||
|
||||
function queryLatestMatch(versionSpec: string): string {
|
||||
const npmRunner = new tr.ToolRunner("npm");
|
||||
npmRunner.arg(["show", "tfx-cli", "versions", "--json"]);
|
||||
const result = npmRunner.execSync({ failOnStdErr: false, silent: !debug, ignoreReturnCode: false} as tr.IExecOptions);
|
||||
if (result.code === 0)
|
||||
{
|
||||
const versions: string[] = JSON.parse(result.stdout.trim());
|
||||
const version: string = toolLib.evaluateVersions(versions, versionSpec);
|
||||
return version;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
async function acquireTfx(version: string): Promise<string> {
|
||||
try{
|
||||
version = toolLib.cleanVersion(version);
|
||||
|
||||
let extPath: string;
|
||||
taskLib.assertAgent('2.115.0');
|
||||
extPath = taskLib.getVariable('Agent.TempDirectory');
|
||||
if (!extPath) {
|
||||
throw new Error('Expected Agent.TempDirectory to be set');
|
||||
}
|
||||
extPath = path.join(extPath, 'tfx'); // use as short a path as possible due to nested node_modules folders
|
||||
|
||||
taskLib.mkdirP(path.join(extPath));
|
||||
const npmRunner = new tr.ToolRunner("npm");
|
||||
npmRunner.arg(["install", "tfx-cli@" + version, "-g", "--prefix", extPath, '--no-fund']);
|
||||
|
||||
const result = npmRunner.execSync({ failOnStdErr: false, silent: !debug, ignoreReturnCode: false} as tr.IExecOptions);
|
||||
if (result.code === 0)
|
||||
{
|
||||
if (os.platform() === "win32")
|
||||
{
|
||||
fs.unlinkSync(path.join(extPath, "/tfx"));
|
||||
}
|
||||
return await toolLib.cacheDir(extPath, 'tfx', version);
|
||||
}
|
||||
}
|
||||
catch {
|
||||
return Promise.reject(new Error("Failed to install tfx"));
|
||||
}
|
||||
}
|
После Ширина: | Высота: | Размер: 3.8 KiB |
|
@ -0,0 +1,473 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.tfxinstallerv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.tfxinstallerv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"azure-pipelines-tool-lib": "^2.0.7",
|
||||
"tmp": "^0.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
"version": "5.5.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/uuid": {
|
||||
"version": "3.4.9",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-tool-lib": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-tool-lib/-/azure-pipelines-tool-lib-2.0.7.tgz",
|
||||
"integrity": "sha512-1FN67ypNwNhgZllYSm4/pAQdffSfEZJhwW8YeNvm/cKDTS6t6bukTBIkt04c1CsaQe7Ot+eDOVMn41wX1ketXw==",
|
||||
"dependencies": {
|
||||
"@types/semver": "^5.3.0",
|
||||
"@types/uuid": "^3.4.5",
|
||||
"azure-pipelines-task-lib": "^4.1.0",
|
||||
"semver": "^5.7.0",
|
||||
"semver-compare": "^1.0.0",
|
||||
"typed-rest-client": "^1.8.6",
|
||||
"uuid": "^3.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.1.7",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.2",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.4.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.48.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.31",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.48.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.10.3",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.11.0",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"side-channel": "^1.0.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.20.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.2.0",
|
||||
"path-parse": "^1.0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/semver-compare": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.0",
|
||||
"get-intrinsic": "^1.0.2",
|
||||
"object-inspect": "^1.9.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/typed-rest-client": {
|
||||
"version": "1.8.9",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"qs": "^6.9.1",
|
||||
"tunnel": "0.0.6",
|
||||
"underscore": "^1.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/underscore": {
|
||||
"version": "1.13.6",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.tfxinstallerv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Node CLI for Azure DevOps Installer Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"azure-pipelines-tool-lib": "^2.0.7",
|
||||
"tmp": "^0.2.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"id": "f7c56a03-d9d3-4019-b144-6283b88a66a8",
|
||||
"name": "TfxInstaller",
|
||||
"friendlyName": "Use Node CLI for Azure DevOps (tfx-cli)",
|
||||
"description": "Installs the Node CLI for Azure DevOps (tfx-cli) on your agent.",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Tool",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"preview": false,
|
||||
"satisfies": [
|
||||
"tfx-cli"
|
||||
],
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"groups": [],
|
||||
"instanceNameFormat": "Use Node CLI for Azure DevOps (tfx-cli): $(version)",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "version",
|
||||
"type": "string",
|
||||
"label": "Version",
|
||||
"defaultValue": "v0.x",
|
||||
"helpMarkDown": "Specify which `tfx-cli` version you want to use. Examples: `v0.9.x`, `>=v0.5.x`.",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "checkLatest",
|
||||
"type": "boolean",
|
||||
"label": "Auto update",
|
||||
"defaultValue": "true",
|
||||
"required": false,
|
||||
"helpMarkDown": "Automatically download the latest version."
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "TfxInstaller/TfxInstaller.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./TfxInstaller",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"TfxInstaller.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.25.0
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-MOCKERY-3043117:
|
||||
- '*':
|
||||
reason: None Given
|
||||
expires: 2023-04-02T12:27:16.294Z
|
||||
created: 2023-03-03T12:27:16.302Z
|
||||
patch: {}
|
|
@ -0,0 +1,19 @@
|
|||
import * as tl from "azure-pipelines-task-lib";
|
||||
import * as common from "../../Common/v5/Common.js";
|
||||
|
||||
await common.runTfx(async tfx => {
|
||||
try {
|
||||
tfx.arg(["extension", "unpublish", "--no-color"]);
|
||||
|
||||
await common.setTfxMarketplaceArguments(tfx);
|
||||
common.validateAndSetTfxManifestArguments(tfx);
|
||||
|
||||
const result = await tfx.execAsync({ silent: false, failOnStdErr: false });
|
||||
if (result !== 0) {
|
||||
tl.setResult(tl.TaskResult.Failed, "Failed");
|
||||
}
|
||||
tl.setResult(tl.TaskResult.Succeeded, "Unpublished");
|
||||
} catch (err) {
|
||||
tl.setResult(tl.TaskResult.Failed, `Failed: ${err}`);
|
||||
}
|
||||
});
|
После Ширина: | Высота: | Размер: 3.5 KiB |
|
@ -0,0 +1,415 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.unpublishextensionv5",
|
||||
"version": "5.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "vsts-developer-tools.unpublishextensionv5",
|
||||
"version": "5.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/adm-zip": {
|
||||
"version": "0.5.10",
|
||||
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.10.tgz",
|
||||
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==",
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/azure-pipelines-task-lib": {
|
||||
"version": "4.12.0",
|
||||
"resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-4.12.0.tgz",
|
||||
"integrity": "sha512-vGrcE/Y1aP9MqtCB9lR7l+0gCO5TaR4RM+JHAIDwJB0o9fI3GsIcjWTJqmcVscPbKw9p/7zpaBgwTcEESHdMwA==",
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.10",
|
||||
"deasync": "^0.1.28",
|
||||
"minimatch": "3.0.5",
|
||||
"nodejs-file-downloader": "^4.11.1",
|
||||
"q": "^1.5.1",
|
||||
"semver": "^5.1.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"uuid": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/deasync": {
|
||||
"version": "0.1.28",
|
||||
"resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.28.tgz",
|
||||
"integrity": "sha512-QqLF6inIDwiATrfROIyQtwOQxjZuek13WRYZ7donU5wJPLoP67MnYxA6QtqdvdBy2mMqv5m3UefBVdJjvevOYg==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"node-addon-api": "^1.7.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "11.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.10",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/interpret": {
|
||||
"version": "1.4.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.8.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.51.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.34",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.51.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.5",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
|
||||
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
|
||||
},
|
||||
"node_modules/nodejs-file-downloader": {
|
||||
"version": "4.12.1",
|
||||
"resolved": "https://registry.npmjs.org/nodejs-file-downloader/-/nodejs-file-downloader-4.12.1.tgz",
|
||||
"integrity": "sha512-LpfCTNhh805AlLnJnzt1PuEj+RmbrccbAQZ6hBRw2e6QPVR0Qntuo6qqyvPHG5s77/0w0IEKgRAD4nbSnr/X4w==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.1",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"mime-types": "^2.1.27",
|
||||
"sanitize-filename": "^1.6.3"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/q": {
|
||||
"version": "1.5.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.0",
|
||||
"teleport": ">=0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rechoir": {
|
||||
"version": "0.6.2",
|
||||
"dependencies": {
|
||||
"resolve": "^1.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.8.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"supports-preserve-symlinks-flag": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"resolve": "bin/resolve"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-filename": {
|
||||
"version": "1.6.3",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
|
||||
"integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
|
||||
"dependencies": {
|
||||
"truncate-utf8-bytes": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/shelljs": {
|
||||
"version": "0.8.5",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
},
|
||||
"bin": {
|
||||
"shjs": "bin/shjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-preserve-symlinks-flag": {
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.2.3",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
|
||||
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
|
||||
"engines": {
|
||||
"node": ">=14.14"
|
||||
}
|
||||
},
|
||||
"node_modules/truncate-utf8-bytes": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
|
||||
"integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
|
||||
"dependencies": {
|
||||
"utf8-byte-length": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/utf8-byte-length": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz",
|
||||
"integrity": "sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA=="
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/uuidv5": {
|
||||
"version": "1.0.0",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"license": "ISC"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "vsts-developer-tools.unpublishextensionv5",
|
||||
"version": "5.0.0",
|
||||
"description": "Unpublish Extension Task",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/azure-devops-extension-tasks.git"
|
||||
},
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"azure-pipelines-task-lib": "^4.12.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
"tmp": "^0.2.3",
|
||||
"uuidv5": "^1.0.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
{
|
||||
"id": "b2664b33-2f30-40a4-b75f-bb9456ad27d2",
|
||||
"name": "UnpublishAzureDevOpsExtension",
|
||||
"friendlyName": "Unpublish Extension",
|
||||
"description": "Unpublish a published extension from the marketplace",
|
||||
"author": "Microsoft Corporation",
|
||||
"helpMarkDown": "",
|
||||
"category": "Deploy",
|
||||
"version": {
|
||||
"Major": 5,
|
||||
"Minor": 0,
|
||||
"Patch": 0
|
||||
},
|
||||
"visibility": [
|
||||
"Build",
|
||||
"Release"
|
||||
],
|
||||
"demands": [
|
||||
"npm"
|
||||
],
|
||||
"minimumAgentVersion": "2.206.1",
|
||||
"groups": [
|
||||
{
|
||||
"name": "extension",
|
||||
"displayName": "Extension",
|
||||
"isExpanded": true
|
||||
},
|
||||
{
|
||||
"name": "advanced",
|
||||
"displayName": "Advanced",
|
||||
"isExpanded": false
|
||||
}
|
||||
],
|
||||
"instanceNameFormat": "Unpublish Extension",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "connectTo",
|
||||
"type": "radio",
|
||||
"label": "Connect to",
|
||||
"required": true,
|
||||
"defaultValue": "AzureRM",
|
||||
"helpMarkDown": "Connect to Visual Studio Marketplace or a local Azure DevOps Server.",
|
||||
"options": {
|
||||
"VsTeam": "Visual Studio Marketplace (personal access token)",
|
||||
"AzureRM": "Visual Studio Marketplace (workload identity federation)",
|
||||
"TFS": "Azure DevOps Server"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceName",
|
||||
"type": "connectedService:VstsMarketplacePublishing",
|
||||
"label": "Visual Studio Marketplace (personal access token)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=VsTeam"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameAzureRM",
|
||||
"type": "connectedService:AzureRM",
|
||||
"label": "Visual Studio Marketplace (workload identity federation)",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to install the extension.",
|
||||
"visibleRule": "connectTo=AzureRM"
|
||||
},
|
||||
{
|
||||
"name": "connectedServiceNameTFS",
|
||||
"type": "connectedService:TfsMarketplacePublishing",
|
||||
"label": "TFS Local Gallery connection",
|
||||
"required": true,
|
||||
"helpMarkDown": "Service endpoint connection to unpublish the extension.",
|
||||
"visibleRule": "connectTo=TFS"
|
||||
},
|
||||
{
|
||||
"name": "method",
|
||||
"type": "radio",
|
||||
"label": "Unpublish using",
|
||||
"required": true,
|
||||
"defaultValue": "id",
|
||||
"helpMarkDown": "Unpublish using either an existing VSIX or using the Publisher and Extension ID.",
|
||||
"options": {
|
||||
"id": "Publisher + Extension ID",
|
||||
"vsix": "VSIX file"
|
||||
},
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "publisherId",
|
||||
"type": "string",
|
||||
"label": "Publisher ID",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "Publisher ID of the extension to be unpublished.",
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionId",
|
||||
"type": "string",
|
||||
"label": "Extension ID",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension ID of the extension to be unpublished",
|
||||
"required": true,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "extensionTag",
|
||||
"type": "string",
|
||||
"label": "Extension Tag",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Extension Tag to append to the extension ID",
|
||||
"required": false,
|
||||
"groupName": "extension",
|
||||
"visibleRule": "method = id"
|
||||
},
|
||||
{
|
||||
"name": "vsixFile",
|
||||
"type": "filePath",
|
||||
"label": "VSIX file",
|
||||
"defaultValue": "",
|
||||
"required": true,
|
||||
"helpMarkDown": "VSIX file of the extension to be unpublished. Supports wildcards.",
|
||||
"visibleRule": "method = vsix",
|
||||
"groupName": "extension"
|
||||
},
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "string",
|
||||
"label": "Arguments",
|
||||
"defaultValue": "",
|
||||
"helpMarkDown": "Additional arguments passed to the package and publishing tool.",
|
||||
"required": false,
|
||||
"groupName": "advanced"
|
||||
},
|
||||
{
|
||||
"name": "cwd",
|
||||
"type": "filePath",
|
||||
"label": "Working Directory",
|
||||
"defaultValue": "",
|
||||
"required": false,
|
||||
"helpMarkDown": "Working directory to run the package and publishing process from. Defaults to the folder where the manifest is located.",
|
||||
"groupName": "advanced"
|
||||
}
|
||||
],
|
||||
"execution": {
|
||||
"Node16": {
|
||||
"target": "UnpublishExtension/v5/UnpublishExtension.js",
|
||||
"argumentFormat": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"extends": "../../tsconfig.v5.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./",
|
||||
"sourceRoot": "./"
|
||||
},
|
||||
"files": [
|
||||
"UnpublishExtension.ts"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"compileOnSave": true,
|
||||
"compilerOptions": {
|
||||
"module": "Node16",
|
||||
"target": "ES2022",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"strictNullChecks": false,
|
||||
"removeComments": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"./Common/v5/Common.ts"
|
||||
],
|
||||
"include": [
|
||||
"./Common/v5/uuidv5.d.ts"
|
||||
]
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"manifestVersion": 1,
|
||||
"id": "vsts-developer-tools-build-tasks",
|
||||
"publisher": "ms-devlabs",
|
||||
"publisher": "winstonliu",
|
||||
"name": "Azure DevOps Extension Tasks",
|
||||
"version": "4.3.0",
|
||||
"version": "5.0.0",
|
||||
"description": "Azure Pipelines tasks for packaging and publishing Azure Devops and Visual Studio extensions to the Visual Studio Marketplace.",
|
||||
"tags": [
|
||||
"Extension",
|
||||
|
|