@vscode/vsce 3.6.1-5 → 3.6.1-7

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.
Files changed (2) hide show
  1. package/out/package.js +8 -2
  2. package/package.json +1 -1
package/out/package.js CHANGED
@@ -1414,14 +1414,20 @@ async function pack(options = {}) {
1414
1414
  }
1415
1415
  exports.pack = pack;
1416
1416
  async function signPackage(packageFile, signTool) {
1417
+ if (!fs.existsSync(packageFile)) {
1418
+ throw new Error(`Package file not found: ${packageFile}`);
1419
+ }
1420
+ if (!fs.existsSync(signTool)) {
1421
+ throw new Error(`Sign tool not found: ${signTool}`);
1422
+ }
1417
1423
  const packageFolder = path.dirname(packageFile);
1418
1424
  const packageName = path.basename(packageFile, '.vsix');
1419
1425
  const manifestFile = path.join(packageFolder, `${packageName}.signature.manifest`);
1420
- const signatureFile = path.join(packageFolder, `${packageName}.signature.p7s`);
1426
+ const signatureFile = path.join(packageFolder, `${packageName}.signature.p7s`); // CodeQL [SM03609] the parameters to execSync are checked above.
1421
1427
  const signatureZip = path.join(packageFolder, `${packageName}.signature.zip`);
1422
1428
  await generateManifest(packageFile, manifestFile);
1423
1429
  // Sign the manifest file to generate the signature file
1424
- cp.execSync(`${signTool} "${manifestFile}" "${signatureFile}"`, { stdio: 'inherit' });
1430
+ cp.execSync(`"${signTool}" "${manifestFile}" "${signatureFile}"`, { stdio: 'inherit' });
1425
1431
  return createSignatureArchive(manifestFile, signatureFile, signatureZip);
1426
1432
  }
1427
1433
  exports.signPackage = signPackage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/vsce",
3
- "version": "3.6.1-5",
3
+ "version": "3.6.1-7",
4
4
  "description": "VS Code Extensions Manager",
5
5
  "repository": {
6
6
  "type": "git",