@vscode/vsce 2.24.1-1 → 2.24.1-2

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/publish.js +8 -1
  2. package/package.json +4 -3
package/out/publish.js CHANGED
@@ -39,6 +39,7 @@ const zip_1 = require("./zip");
39
39
  const validation_1 = require("./validation");
40
40
  const form_data_1 = __importDefault(require("form-data"));
41
41
  const path_1 = require("path");
42
+ const cockatiel_1 = require("cockatiel");
42
43
  const tmpName = (0, util_1.promisify)(tmp.tmpName);
43
44
  async function publish(options = {}) {
44
45
  if (options.packagePath) {
@@ -185,7 +186,13 @@ async function _publishSignedPackage(api, packageName, packageStream, sigzipName
185
186
  form.append('sigzip', sigzipStream, {
186
187
  header: `--${form.getBoundary()}${lineBreak}Content-Disposition: attachment; name=sigzip; filename=${sigzipName}${lineBreak}Content-Type: application/octet-stream${lineBreak}${lineBreak}`
187
188
  });
188
- return await api.publishExtensionWithPublisherSignature(undefined, form, manifest.publisher, manifest.name, extensionType);
189
+ const publishWithRetry = (0, cockatiel_1.retry)((0, cockatiel_1.handleWhen)(err => err.message.includes('timeout')), {
190
+ maxAttempts: 3,
191
+ backoff: new cockatiel_1.IterableBackoff([5000, 10000, 20000])
192
+ });
193
+ return await publishWithRetry.execute(async () => {
194
+ return await api.publishExtensionWithPublisherSignature(undefined, form, manifest.publisher, manifest.name, extensionType);
195
+ });
189
196
  }
190
197
  async function unpublish(options = {}) {
191
198
  let publisher, name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/vsce",
3
- "version": "2.24.1-1",
3
+ "version": "2.24.1-2",
4
4
  "description": "VS Code Extensions Manager",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,12 +35,13 @@
35
35
  "watch:test": "npm run test -- --watch"
36
36
  },
37
37
  "engines": {
38
- "node": ">= 14"
38
+ "node": ">= 16"
39
39
  },
40
40
  "dependencies": {
41
41
  "azure-devops-node-api": "^12.5.0",
42
42
  "chalk": "^2.4.2",
43
43
  "cheerio": "^1.0.0-rc.9",
44
+ "cockatiel": "^3.1.2",
44
45
  "commander": "^6.2.1",
45
46
  "form-data": "^4.0.0",
46
47
  "glob": "^7.0.6",
@@ -69,7 +70,7 @@
69
70
  "@types/mime": "^1",
70
71
  "@types/minimatch": "^3.0.3",
71
72
  "@types/mocha": "^7.0.2",
72
- "@types/node": "^14.17.32",
73
+ "@types/node": "^16.11.7",
73
74
  "@types/read": "^0.0.28",
74
75
  "@types/semver": "^6.0.0",
75
76
  "@types/tmp": "^0.2.2",