@vscode/vsce 3.2.2-4 → 3.2.2-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main.js +25 -23
- package/package.json +2 -2
package/out/main.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const commander_1 =
|
|
29
|
+
const commander_1 = require("commander");
|
|
30
30
|
const leven_1 = __importDefault(require("leven"));
|
|
31
31
|
const package_1 = require("./package");
|
|
32
32
|
const publish_1 = require("./publish");
|
|
@@ -73,8 +73,9 @@ function main(task) {
|
|
|
73
73
|
}
|
|
74
74
|
const ValidTargets = [...package_1.Targets].join(', ');
|
|
75
75
|
module.exports = function (argv) {
|
|
76
|
-
commander_1.
|
|
77
|
-
|
|
76
|
+
const program = new commander_1.Command();
|
|
77
|
+
program.version(pkg.version).usage('<command>');
|
|
78
|
+
program
|
|
78
79
|
.command('ls')
|
|
79
80
|
.description('Lists all the files that will be published/packaged')
|
|
80
81
|
.option('--tree', 'Prints the files in a tree format', false)
|
|
@@ -88,7 +89,7 @@ module.exports = function (argv) {
|
|
|
88
89
|
.option('--readme-path <path>', 'Path to README file (defaults to README.md)')
|
|
89
90
|
.option('--follow-symlinks', 'Recurse into symlinked directories instead of treating them as files')
|
|
90
91
|
.action(({ tree, yarn, packagedDependencies, ignoreFile, dependencies, readmePath, followSymlinks }) => main((0, package_1.ls)({ tree, useYarn: yarn, packagedDependencies, ignoreFile, dependencies, readmePath, followSymlinks })));
|
|
91
|
-
|
|
92
|
+
program
|
|
92
93
|
.command('package [version]')
|
|
93
94
|
.alias('pack')
|
|
94
95
|
.description('Packages an extension')
|
|
@@ -148,7 +149,7 @@ module.exports = function (argv) {
|
|
|
148
149
|
signTool,
|
|
149
150
|
followSymlinks,
|
|
150
151
|
})));
|
|
151
|
-
|
|
152
|
+
program
|
|
152
153
|
.command('publish [version]')
|
|
153
154
|
.description('Publishes an extension')
|
|
154
155
|
.option('-p, --pat <token>', 'Personal Access Token (defaults to VSCE_PAT environment variable)', process.env['VSCE_PAT'])
|
|
@@ -171,7 +172,8 @@ module.exports = function (argv) {
|
|
|
171
172
|
.option('--baseImagesUrl <url>', 'Prepend all relative image links in README.md with the specified URL.')
|
|
172
173
|
.option('--yarn', 'Use yarn instead of npm (default inferred from presence of yarn.lock or .yarnrc)')
|
|
173
174
|
.option('--no-yarn', 'Use npm instead of yarn (default inferred from absence of yarn.lock or .yarnrc)')
|
|
174
|
-
.option('--
|
|
175
|
+
.option('--no-verify', 'Allow all proposed APIs (deprecated: use --allow-all-proposed-apis instead)')
|
|
176
|
+
.addOption(new commander_1.Option('--noVerify', 'Allow all proposed APIs (deprecated: use --allow-all-proposed-apis instead)').hideHelp(true))
|
|
175
177
|
.option('--allow-proposed-apis <apis...>', 'Allow specific proposed APIs')
|
|
176
178
|
.option('--allow-all-proposed-apis', 'Allow all proposed APIs')
|
|
177
179
|
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
|
|
@@ -185,7 +187,7 @@ module.exports = function (argv) {
|
|
|
185
187
|
.option('--skip-duplicate', 'Fail silently if version already exists on the marketplace')
|
|
186
188
|
.option('--skip-license', 'Allow publishing without license file')
|
|
187
189
|
.option('--follow-symlinks', 'Recurse into symlinked directories instead of treating them as files')
|
|
188
|
-
.action((version, { pat, azureCredential, target, ignoreOtherTargetFolders, readmePath, changelogPath, message, gitTagVersion, updatePackageJson, packagePath, manifestPath, signaturePath, sigzipPath, githubBranch, gitlabBranch, baseContentUrl, baseImagesUrl, yarn, noVerify, allowProposedApis, allowAllProposedApis, ignoreFile, dependencies, preRelease, allowStarActivation, allowMissingRepository, allowUnusedFilesPattern, skipDuplicate, skipLicense, signTool, followSymlinks, }) => main((0, publish_1.publish)({
|
|
190
|
+
.action((version, { pat, azureCredential, target, ignoreOtherTargetFolders, readmePath, changelogPath, message, gitTagVersion, updatePackageJson, packagePath, manifestPath, signaturePath, sigzipPath, githubBranch, gitlabBranch, baseContentUrl, baseImagesUrl, yarn, verify, noVerify, allowProposedApis, allowAllProposedApis, ignoreFile, dependencies, preRelease, allowStarActivation, allowMissingRepository, allowUnusedFilesPattern, skipDuplicate, skipLicense, signTool, followSymlinks, }) => main((0, publish_1.publish)({
|
|
189
191
|
pat,
|
|
190
192
|
azureCredential,
|
|
191
193
|
version,
|
|
@@ -205,7 +207,7 @@ module.exports = function (argv) {
|
|
|
205
207
|
baseContentUrl,
|
|
206
208
|
baseImagesUrl,
|
|
207
209
|
useYarn: yarn,
|
|
208
|
-
noVerify,
|
|
210
|
+
noVerify: noVerify || !verify,
|
|
209
211
|
allowProposedApis,
|
|
210
212
|
allowAllProposedApis,
|
|
211
213
|
ignoreFile,
|
|
@@ -219,76 +221,76 @@ module.exports = function (argv) {
|
|
|
219
221
|
signTool,
|
|
220
222
|
followSymlinks
|
|
221
223
|
})));
|
|
222
|
-
|
|
224
|
+
program
|
|
223
225
|
.command('unpublish [extensionid]')
|
|
224
226
|
.description('Unpublishes an extension. Example extension id: ms-vscode.live-server.')
|
|
225
227
|
.option('-p, --pat <token>', 'Personal Access Token')
|
|
226
228
|
.option('--azure-credential', 'Use Microsoft Entra ID for authentication')
|
|
227
229
|
.option('-f, --force', 'Skip confirmation prompt when unpublishing an extension')
|
|
228
230
|
.action((id, { pat, azureCredential, force }) => main((0, publish_1.unpublish)({ id, pat, azureCredential, force })));
|
|
229
|
-
|
|
231
|
+
program
|
|
230
232
|
.command('generate-manifest')
|
|
231
233
|
.description('Generates the extension manifest from the provided VSIX package.')
|
|
232
234
|
.requiredOption('-i, --packagePath <path>', 'Path to the VSIX package')
|
|
233
235
|
.option('-o, --out <path>', 'Output the extension manifest to <path> location (defaults to <packagename>.manifest)')
|
|
234
236
|
.action(({ packagePath, out }) => main((0, package_1.generateManifest)(packagePath, out)));
|
|
235
|
-
|
|
237
|
+
program
|
|
236
238
|
.command('verify-signature')
|
|
237
239
|
.description('Verifies the provided signature file against the provided VSIX package and manifest.')
|
|
238
240
|
.requiredOption('-i, --packagePath <path>', 'Path to the VSIX package')
|
|
239
241
|
.requiredOption('-m, --manifestPath <path>', 'Path to the Manifest file')
|
|
240
242
|
.requiredOption('-s, --signaturePath <path>', 'Path to the Signature file')
|
|
241
243
|
.action(({ packagePath, manifestPath, signaturePath }) => main((0, package_1.verifySignature)(packagePath, manifestPath, signaturePath)));
|
|
242
|
-
|
|
244
|
+
program
|
|
243
245
|
.command('ls-publishers')
|
|
244
246
|
.description('Lists all known publishers')
|
|
245
247
|
.action(() => main((0, store_1.listPublishers)()));
|
|
246
|
-
|
|
248
|
+
program
|
|
247
249
|
.command('delete-publisher <publisher>')
|
|
248
250
|
.description('Deletes a publisher from marketplace')
|
|
249
251
|
.action(publisher => main((0, store_1.deletePublisher)(publisher)));
|
|
250
|
-
|
|
252
|
+
program
|
|
251
253
|
.command('login <publisher>')
|
|
252
254
|
.description('Adds a publisher to the list of known publishers')
|
|
253
255
|
.action(name => main((0, store_1.loginPublisher)(name)));
|
|
254
|
-
|
|
256
|
+
program
|
|
255
257
|
.command('logout <publisher>')
|
|
256
258
|
.description('Removes a publisher from the list of known publishers')
|
|
257
259
|
.action(name => main((0, store_1.logoutPublisher)(name)));
|
|
258
|
-
|
|
260
|
+
program
|
|
259
261
|
.command('verify-pat [publisher]')
|
|
260
262
|
.description('Verifies if the Personal Access Token or Azure identity has publish rights for the publisher')
|
|
261
263
|
.option('-p, --pat <token>', 'Personal Access Token (defaults to VSCE_PAT environment variable)', process.env['VSCE_PAT'])
|
|
262
264
|
.option('--azure-credential', 'Use Microsoft Entra ID for authentication')
|
|
263
265
|
.action((publisherName, { pat, azureCredential }) => main((0, store_1.verifyPat)({ publisherName, pat, azureCredential })));
|
|
264
|
-
|
|
266
|
+
program
|
|
265
267
|
.command('show <extensionid>')
|
|
266
268
|
.description(`Shows an extension's metadata`)
|
|
267
269
|
.option('--json', 'Outputs data in json format', false)
|
|
268
270
|
.action((extensionid, { json }) => main((0, show_1.show)(extensionid, json)));
|
|
269
|
-
|
|
271
|
+
program
|
|
270
272
|
.command('search <text>')
|
|
271
273
|
.description('Searches extension gallery')
|
|
272
274
|
.option('--json', 'Output results in json format', false)
|
|
273
275
|
.option('--stats', 'Shows extensions rating and download count', false)
|
|
274
276
|
.option('-p, --pagesize [value]', 'Number of results to return', '100')
|
|
275
277
|
.action((text, { json, pagesize, stats }) => main((0, search_1.search)(text, json, parseInt(pagesize), stats)));
|
|
276
|
-
|
|
278
|
+
program.on('command:*', ([cmd]) => {
|
|
277
279
|
if (cmd === 'create-publisher') {
|
|
278
280
|
util_1.log.error(`The 'create-publisher' command is no longer available. You can create a publisher directly in the Marketplace: https://aka.ms/vscode-create-publisher`);
|
|
279
281
|
process.exit(1);
|
|
280
282
|
}
|
|
281
|
-
|
|
282
|
-
const availableCommands =
|
|
283
|
+
program.outputHelp(help => {
|
|
284
|
+
const availableCommands = program.commands.map(c => c.name());
|
|
283
285
|
const suggestion = availableCommands.find(c => (0, leven_1.default)(c, cmd) < c.length * 0.4);
|
|
284
286
|
help = `${help}\n Unknown command '${cmd}'`;
|
|
285
287
|
return suggestion ? `${help}, did you mean '${suggestion}'?\n` : `${help}.\n`;
|
|
286
288
|
});
|
|
287
289
|
process.exit(1);
|
|
288
290
|
});
|
|
289
|
-
|
|
291
|
+
program.description(`${pkg.description}
|
|
290
292
|
To learn more about the VS Code extension API: https://aka.ms/vscode-extension-api
|
|
291
293
|
To connect with the VS Code extension developer community: https://aka.ms/vscode-discussions`);
|
|
292
|
-
|
|
294
|
+
program.parse(argv);
|
|
293
295
|
};
|
|
294
296
|
//# sourceMappingURL=main.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/vsce",
|
|
3
|
-
"version": "3.2.2-
|
|
3
|
+
"version": "3.2.2-5",
|
|
4
4
|
"description": "VS Code Extensions Manager",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"chalk": "^2.4.2",
|
|
45
45
|
"cheerio": "^1.0.0-rc.9",
|
|
46
46
|
"cockatiel": "^3.1.2",
|
|
47
|
-
"commander": "^
|
|
47
|
+
"commander": "^12.1.0",
|
|
48
48
|
"form-data": "^4.0.0",
|
|
49
49
|
"glob": "^11.0.0",
|
|
50
50
|
"hosted-git-info": "^4.0.2",
|