@vscode/vsce
Advanced tools
Comparing version 2.25.1-1 to 2.25.1-2
@@ -227,3 +227,3 @@ "use strict"; | ||
.option('-p, --pat <token>', 'Personal Access Token (defaults to VSCE_PAT environment variable)', process.env['VSCE_PAT']) | ||
.action((name, { pat }) => main((0, store_1.verifyPat)(pat, name))); | ||
.action((publisherName, { pat }) => main((0, store_1.verifyPat)({ publisherName, pat }))); | ||
commander_1.default | ||
@@ -230,0 +230,0 @@ .command('show <extensionid>') |
@@ -114,14 +114,5 @@ "use strict"; | ||
exports.KeytarStore = KeytarStore; | ||
async function verifyPat(pat, publisherName) { | ||
if (!pat) { | ||
throw new Error('The Personal Access Token is mandatory.'); | ||
} | ||
if (!publisherName) { | ||
try { | ||
publisherName = (await (0, package_1.readManifest)()).publisher; | ||
} | ||
catch (error) { | ||
throw new Error(`Can not read the publisher's name. Either supply it as an argument or run vsce from the extension folder. Additional information:\n\n${error}`); | ||
} | ||
} | ||
async function verifyPat(options) { | ||
const publisherName = options.publisherName ?? (await (0, package_1.readManifest)()).publisher; | ||
const pat = options.pat ?? (await getPublisher(publisherName)).pat; | ||
try { | ||
@@ -143,3 +134,3 @@ // If the caller of the `getRoleAssignments` API has any of the roles | ||
const pat = await (0, util_1.read)(`Personal Access Token for publisher '${publisherName}':`, { silent: true, replace: '*' }); | ||
await verifyPat(pat, publisherName); | ||
await verifyPat({ publisherName, pat }); | ||
return pat; | ||
@@ -146,0 +137,0 @@ } |
{ | ||
"name": "@vscode/vsce", | ||
"version": "2.25.1-1", | ||
"version": "2.25.1-2", | ||
"description": "VS Code Extensions Manager", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
158565
3206