From 75e4d9f1408eaa077c320b5452795dbc99484658 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Mar 2022 17:01:31 +0000 Subject: [PATCH 1/2] Bump @actions/artifact from 0.5.2 to 1.0.0 Bumps [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) from 0.5.2 to 1.0.0. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/@actions/io@1.0.0/packages/artifact) --- updated-dependencies: - dependency-name: "@actions/artifact" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 81 ++++++++++++++++------------------------------- package.json | 2 +- 2 files changed, 29 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index bcaf008701..99ba01ab96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.1.4", "license": "MIT", "dependencies": { - "@actions/artifact": "^0.5.2", + "@actions/artifact": "^1.0.0", "@actions/core": "^1.4.0", "@actions/exec": "^1.1.0", "@actions/github": "^4.0.0", @@ -58,15 +58,14 @@ } }, "node_modules/@actions/artifact": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-0.5.2.tgz", - "integrity": "sha512-q/r8WSqyxBJ0ffLCRrtjCBTGnAYqP+ID4yG7f7YSlhrQ4thNg/d+Tq9f1YkLPKX46ZR97OWtGDY+oU/nxcqvLw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.0.0.tgz", + "integrity": "sha512-oje+cCiM2maVwoiN+LT9kh2C6UqiTcS1tDKins+nRfckX+C8JJD2kAmzpD5fn/p5Dibjrqk1mtwreAzgNxHrDg==", "dependencies": { "@actions/core": "^1.2.6", "@actions/http-client": "^1.0.11", - "@types/tmp": "^0.1.0", - "tmp": "^0.1.0", - "tmp-promise": "^2.0.2" + "tmp": "^0.2.1", + "tmp-promise": "^3.0.2" } }, "node_modules/@actions/core": { @@ -554,10 +553,6 @@ "@sinonjs/fake-timers": "^7.1.0" } }, - "node_modules/@types/tmp": { - "version": "0.1.0", - "integrity": "sha512-6IwZ9HzWbCq6XoQWhxLpDjuADodH/MKXRUIDFudvgjcVdjFknvmR+DNsoUeer4XPrEnrZs04Jj+kfV9pFsrhmA==" - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "4.28.5", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.5.tgz", @@ -4987,30 +4982,22 @@ } }, "node_modules/tmp": { - "version": "0.1.0", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dependencies": { - "rimraf": "^2.6.3" + "rimraf": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8.17.0" } }, "node_modules/tmp-promise": { - "version": "2.1.1", - "integrity": "sha512-Z048AOz/w9b6lCbJUpevIJpRpUztENl8zdv1bmAKVHimfqRFl92ROkmT9rp7TVBnrEw2gtMTol/2Cp2S2kJa4Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", "dependencies": { - "tmp": "0.1.0" - } - }, - "node_modules/tmp/node_modules/rimraf": { - "version": "2.7.1", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "tmp": "^0.2.0" } }, "node_modules/to-regex-range": { @@ -5369,15 +5356,14 @@ }, "dependencies": { "@actions/artifact": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-0.5.2.tgz", - "integrity": "sha512-q/r8WSqyxBJ0ffLCRrtjCBTGnAYqP+ID4yG7f7YSlhrQ4thNg/d+Tq9f1YkLPKX46ZR97OWtGDY+oU/nxcqvLw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.0.0.tgz", + "integrity": "sha512-oje+cCiM2maVwoiN+LT9kh2C6UqiTcS1tDKins+nRfckX+C8JJD2kAmzpD5fn/p5Dibjrqk1mtwreAzgNxHrDg==", "requires": { "@actions/core": "^1.2.6", "@actions/http-client": "^1.0.11", - "@types/tmp": "^0.1.0", - "tmp": "^0.1.0", - "tmp-promise": "^2.0.2" + "tmp": "^0.2.1", + "tmp-promise": "^3.0.2" } }, "@actions/core": { @@ -5834,10 +5820,6 @@ "@sinonjs/fake-timers": "^7.1.0" } }, - "@types/tmp": { - "version": "0.1.0", - "integrity": "sha512-6IwZ9HzWbCq6XoQWhxLpDjuADodH/MKXRUIDFudvgjcVdjFknvmR+DNsoUeer4XPrEnrZs04Jj+kfV9pFsrhmA==" - }, "@typescript-eslint/eslint-plugin": { "version": "4.28.5", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.5.tgz", @@ -8979,26 +8961,19 @@ "dev": true }, "tmp": { - "version": "0.1.0", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "requires": { - "rimraf": "^2.6.3" - }, - "dependencies": { - "rimraf": { - "version": "2.7.1", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - } + "rimraf": "^3.0.0" } }, "tmp-promise": { - "version": "2.1.1", - "integrity": "sha512-Z048AOz/w9b6lCbJUpevIJpRpUztENl8zdv1bmAKVHimfqRFl92ROkmT9rp7TVBnrEw2gtMTol/2Cp2S2kJa4Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", "requires": { - "tmp": "0.1.0" + "tmp": "^0.2.0" } }, "to-regex-range": { diff --git a/package.json b/package.json index 2781d74134..71a5dc88de 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "license": "MIT", "dependencies": { - "@actions/artifact": "^0.5.2", + "@actions/artifact": "^1.0.0", "@actions/core": "^1.4.0", "@actions/exec": "^1.1.0", "@actions/github": "^4.0.0", From 4154eaf0e90664d1f7cc06fbdf5ed029ab17e76b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 3 Mar 2022 17:18:51 +0000 Subject: [PATCH 2/2] Update checked-in dependencies --- node_modules/.package-lock.json | 41 +- .../@actions/artifact/lib/artifact-client.js | 1 + .../artifact/lib/artifact-client.js.map | 2 +- .../artifact/lib/internal/artifact-client.js | 47 +- .../lib/internal/artifact-client.js.map | 2 +- .../artifact/lib/internal/config-variables.js | 1 + .../lib/internal/config-variables.js.map | 2 +- .../artifact/lib/internal/contracts.d.ts | 10 + .../lib/internal/download-http-client.js | 30 +- .../lib/internal/download-http-client.js.map | 2 +- .../lib/internal/download-specification.js | 17 +- .../internal/download-specification.js.map | 2 +- .../artifact/lib/internal/http-manager.js | 1 + .../artifact/lib/internal/http-manager.js.map | 2 +- .../path-and-artifact-name-validation.d.ts | 8 + .../path-and-artifact-name-validation.js | 67 ++ .../path-and-artifact-name-validation.js.map | 1 + .../artifact/lib/internal/requestUtils.js | 27 +- .../artifact/lib/internal/requestUtils.js.map | 2 +- .../lib/internal/status-reporter.d.ts | 3 +- .../artifact/lib/internal/status-reporter.js | 22 +- .../lib/internal/status-reporter.js.map | 2 +- .../artifact/lib/internal/upload-gzip.js | 46 +- .../artifact/lib/internal/upload-gzip.js.map | 2 +- .../lib/internal/upload-http-client.js | 70 +- .../lib/internal/upload-http-client.js.map | 2 +- .../lib/internal/upload-specification.js | 23 +- .../lib/internal/upload-specification.js.map | 2 +- .../@actions/artifact/lib/internal/utils.d.ts | 8 - .../@actions/artifact/lib/internal/utils.js | 45 +- .../artifact/lib/internal/utils.js.map | 2 +- node_modules/@actions/artifact/package.json | 8 +- node_modules/@types/tmp/LICENSE | 21 - node_modules/@types/tmp/README.md | 16 - node_modules/@types/tmp/index.d.ts | 70 -- node_modules/@types/tmp/package.json | 34 - node_modules/tmp-promise/.circleci/config.yml | 106 +-- node_modules/tmp-promise/README.md | 632 ++++++++-------- node_modules/tmp-promise/example-usage.js | 16 +- node_modules/tmp-promise/index.d.ts | 54 +- node_modules/tmp-promise/index.js | 98 +-- node_modules/tmp-promise/index.test-d.ts | 62 +- node_modules/tmp-promise/package.json | 15 +- node_modules/tmp-promise/publish.js | 8 + node_modules/tmp-promise/test.js | 305 ++++---- node_modules/tmp/CHANGELOG.md | 288 ++++++++ node_modules/tmp/README.md | 95 +-- node_modules/tmp/lib/tmp.js | 690 +++++++++--------- node_modules/tmp/node_modules/.bin/rimraf | 1 - node_modules/tmp/node_modules/rimraf/LICENSE | 15 - .../tmp/node_modules/rimraf/README.md | 101 --- node_modules/tmp/node_modules/rimraf/bin.js | 50 -- .../tmp/node_modules/rimraf/package.json | 29 - .../tmp/node_modules/rimraf/rimraf.js | 372 ---------- node_modules/tmp/package.json | 29 +- 55 files changed, 1695 insertions(+), 1912 deletions(-) create mode 100644 node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.d.ts create mode 100644 node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js create mode 100644 node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js.map delete mode 100644 node_modules/@types/tmp/LICENSE delete mode 100644 node_modules/@types/tmp/README.md delete mode 100644 node_modules/@types/tmp/index.d.ts delete mode 100644 node_modules/@types/tmp/package.json create mode 100644 node_modules/tmp-promise/publish.js create mode 100644 node_modules/tmp/CHANGELOG.md delete mode 120000 node_modules/tmp/node_modules/.bin/rimraf delete mode 100644 node_modules/tmp/node_modules/rimraf/LICENSE delete mode 100644 node_modules/tmp/node_modules/rimraf/README.md delete mode 100755 node_modules/tmp/node_modules/rimraf/bin.js delete mode 100644 node_modules/tmp/node_modules/rimraf/package.json delete mode 100644 node_modules/tmp/node_modules/rimraf/rimraf.js diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index d853949e29..3c832f45ea 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -5,15 +5,14 @@ "requires": true, "packages": { "node_modules/@actions/artifact": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-0.5.2.tgz", - "integrity": "sha512-q/r8WSqyxBJ0ffLCRrtjCBTGnAYqP+ID4yG7f7YSlhrQ4thNg/d+Tq9f1YkLPKX46ZR97OWtGDY+oU/nxcqvLw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.0.0.tgz", + "integrity": "sha512-oje+cCiM2maVwoiN+LT9kh2C6UqiTcS1tDKins+nRfckX+C8JJD2kAmzpD5fn/p5Dibjrqk1mtwreAzgNxHrDg==", "dependencies": { "@actions/core": "^1.2.6", "@actions/http-client": "^1.0.11", - "@types/tmp": "^0.1.0", - "tmp": "^0.1.0", - "tmp-promise": "^2.0.2" + "tmp": "^0.2.1", + "tmp-promise": "^3.0.2" } }, "node_modules/@actions/core": { @@ -501,10 +500,6 @@ "@sinonjs/fake-timers": "^7.1.0" } }, - "node_modules/@types/tmp": { - "version": "0.1.0", - "integrity": "sha512-6IwZ9HzWbCq6XoQWhxLpDjuADodH/MKXRUIDFudvgjcVdjFknvmR+DNsoUeer4XPrEnrZs04Jj+kfV9pFsrhmA==" - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "4.28.5", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.5.tgz", @@ -4934,30 +4929,22 @@ } }, "node_modules/tmp": { - "version": "0.1.0", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dependencies": { - "rimraf": "^2.6.3" + "rimraf": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=8.17.0" } }, "node_modules/tmp-promise": { - "version": "2.1.1", - "integrity": "sha512-Z048AOz/w9b6lCbJUpevIJpRpUztENl8zdv1bmAKVHimfqRFl92ROkmT9rp7TVBnrEw2gtMTol/2Cp2S2kJa4Q==", - "dependencies": { - "tmp": "0.1.0" - } - }, - "node_modules/tmp/node_modules/rimraf": { - "version": "2.7.1", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "tmp": "^0.2.0" } }, "node_modules/to-regex-range": { diff --git a/node_modules/@actions/artifact/lib/artifact-client.js b/node_modules/@actions/artifact/lib/artifact-client.js index 64f1bea094..3374f4bd9d 100644 --- a/node_modules/@actions/artifact/lib/artifact-client.js +++ b/node_modules/@actions/artifact/lib/artifact-client.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.create = void 0; const artifact_client_1 = require("./internal/artifact-client"); /** * Constructs an ArtifactClient diff --git a/node_modules/@actions/artifact/lib/artifact-client.js.map b/node_modules/@actions/artifact/lib/artifact-client.js.map index ee1a4929bd..6aadc1b0b4 100644 --- a/node_modules/@actions/artifact/lib/artifact-client.js.map +++ b/node_modules/@actions/artifact/lib/artifact-client.js.map @@ -1 +1 @@ -{"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../src/artifact-client.ts"],"names":[],"mappings":";;AAIA,gEAAgF;AAUhF;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,uCAAqB,CAAC,MAAM,EAAE,CAAA;AACvC,CAAC;AAFD,wBAEC"} \ No newline at end of file +{"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../src/artifact-client.ts"],"names":[],"mappings":";;;AAIA,gEAAgF;AAUhF;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,uCAAqB,CAAC,MAAM,EAAE,CAAA;AACvC,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/artifact-client.js b/node_modules/@actions/artifact/lib/internal/artifact-client.js index 1a5a7f8f86..d937578a87 100644 --- a/node_modules/@actions/artifact/lib/internal/artifact-client.js +++ b/node_modules/@actions/artifact/lib/internal/artifact-client.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,18 +27,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.DefaultArtifactClient = void 0; const core = __importStar(require("@actions/core")); const upload_specification_1 = require("./upload-specification"); const upload_http_client_1 = require("./upload-http-client"); const utils_1 = require("./utils"); +const path_and_artifact_name_validation_1 = require("./path-and-artifact-name-validation"); const download_http_client_1 = require("./download-http-client"); const download_specification_1 = require("./download-specification"); const config_variables_1 = require("./config-variables"); @@ -36,7 +50,9 @@ class DefaultArtifactClient { */ uploadArtifact(name, files, rootDirectory, options) { return __awaiter(this, void 0, void 0, function* () { - utils_1.checkArtifactName(name); + core.info(`Starting artifact upload +For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); + path_and_artifact_name_validation_1.checkArtifactName(name); // Get specification for the files being uploaded const uploadSpecification = upload_specification_1.getUploadSpecification(name, rootDirectory, files); const uploadResponse = { @@ -57,12 +73,24 @@ class DefaultArtifactClient { throw new Error('No URL provided by the Artifact Service to upload an artifact to'); } core.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); + core.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); // Upload each of the files that were found concurrently const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); // Update the size of the artifact to indicate we are done uploading // The uncompressed size is used for display when downloading a zip of the artifact from the UI + core.info(`File upload process has finished. Finalizing the artifact upload`); yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); - core.info(`Finished uploading artifact ${name}. Reported size is ${uploadResult.uploadSize} bytes. There were ${uploadResult.failedItems.length} items that failed to upload`); + if (uploadResult.failedItems.length > 0) { + core.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + } + else { + core.info(`Artifact has been finalized. All files have been successfully uploaded!`); + } + core.info(` +The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes +The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage + +Note: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r\n`); uploadResponse.artifactItems = uploadSpecification.map(item => item.absoluteFilePath); uploadResponse.size = uploadResult.uploadSize; uploadResponse.failedItems = uploadResult.failedItems; @@ -125,6 +153,7 @@ class DefaultArtifactClient { while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; + core.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); // Get container entries for the specific artifact const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); const downloadSpecification = download_specification_1.getDownloadSpecification(currentArtifactToDownload.name, items.value, path, true); diff --git a/node_modules/@actions/artifact/lib/internal/artifact-client.js.map b/node_modules/@actions/artifact/lib/internal/artifact-client.js.map index d29dc29dc7..00240ef27b 100644 --- a/node_modules/@actions/artifact/lib/internal/artifact-client.js.map +++ b/node_modules/@actions/artifact/lib/internal/artifact-client.js.map @@ -1 +1 @@ -{"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../../src/internal/artifact-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,iEAG+B;AAC/B,6DAAqD;AAKrD,mCAIgB;AAChB,iEAAyD;AACzD,qEAAiE;AACjE,yDAAwD;AACxD,+BAAuC;AAuCvC,MAAa,qBAAqB;IAChC;;OAEG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,qBAAqB,EAAE,CAAA;IACpC,CAAC;IAED;;OAEG;IACG,cAAc,CAClB,IAAY,EACZ,KAAe,EACf,aAAqB,EACrB,OAAmC;;YAEnC,yBAAiB,CAAC,IAAI,CAAC,CAAA;YAEvB,iDAAiD;YACjD,MAAM,mBAAmB,GAA0B,6CAAsB,CACvE,IAAI,EACJ,aAAa,EACb,KAAK,CACN,CAAA;YACD,MAAM,cAAc,GAAmB;gBACrC,YAAY,EAAE,IAAI;gBAClB,aAAa,EAAE,EAAE;gBACjB,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,EAAE;aAChB,CAAA;YAED,MAAM,gBAAgB,GAAG,IAAI,qCAAgB,EAAE,CAAA;YAE/C,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpC,IAAI,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAA;aACpD;iBAAM;gBACL,yDAAyD;gBACzD,MAA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A2B,CAC/B,qBAAqB,CAAC,kBAAkB,CACzC,CAAA;oBACD,MAAM,kBAAkB,CAAC,sBAAsB,CAC7C,qBAAqB,CAAC,eAAe,CACtC,CAAA;iBACF;gBAED,QAAQ,CAAC,IAAI,CAAC;oBACZ,YAAY,EAAE,yBAAyB,CAAC,IAAI;oBAC5C,YAAY,EAAE,qBAAqB,CAAC,oBAAoB;iBACzD,CAAC,CAAA;aACH;YACD,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;CACF;AApMD,sDAoMC"} \ No newline at end of file +{"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../../src/internal/artifact-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AACrC,iEAG+B;AAC/B,6DAAqD;AAKrD,mCAGgB;AAChB,2FAAqE;AACrE,iEAAyD;AACzD,qEAAiE;AACjE,yDAAwD;AACxD,+BAAuC;AAuCvC,MAAa,qBAAqB;IAChC;;OAEG;IACH,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,qBAAqB,EAAE,CAAA;IACpC,CAAC;IAED;;OAEG;IACG,cAAc,CAClB,IAAY,EACZ,KAAe,EACf,aAAqB,EACrB,OAAmC;;YAEnC,IAAI,CAAC,IAAI,CACP;8MACwM,CACzM,CAAA;YACD,qDAAiB,CAAC,IAAI,CAAC,CAAA;YAEvB,iDAAiD;YACjD,MAAM,mBAAmB,GAA0B,6CAAsB,CACvE,IAAI,EACJ,aAAa,EACb,KAAK,CACN,CAAA;YACD,MAAM,cAAc,GAAmB;gBACrC,YAAY,EAAE,IAAI;gBAClB,aAAa,EAAE,EAAE;gBACjB,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,EAAE;aAChB,CAAA;YAED,MAAM,gBAAgB,GAAG,IAAI,qCAAgB,EAAE,CAAA;YAE/C,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpC,IAAI,CAAC,OAAO,CAAC,qCAAqC,CAAC,C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AAM,KAAK,GAAG,MAAM,kBAAkB,CAAC,iBAAiB,CACtD,yBAAyB,CAAC,IAAI,EAC9B,yBAAyB,CAAC,wBAAwB,CACnD,CAAA;gBAED,MAAM,qBAAqB,GAAG,iDAAwB,CACpD,yBAAyB,CAAC,IAAI,EAC9B,KAAK,CAAC,KAAK,EACX,IAAI,EACJ,IAAI,CACL,CAAA;gBACD,IAAI,qBAAqB,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;oBACtD,IAAI,CAAC,IAAI,CACP,qDAAqD,yBAAyB,CAAC,IAAI,EAAE,CACtF,CAAA;iBACF;qBAAM;oBACL,MAAM,oCAA4B,CAChC,qBAAqB,CAAC,kBAAkB,CACzC,CAAA;oBACD,MAAM,mCAA2B,CAC/B,qBAAqB,CAAC,kBAAkB,CACzC,CAAA;oBACD,MAAM,kBAAkB,CAAC,sBAAsB,CAC7C,qBAAqB,CAAC,eAAe,CACtC,CAAA;iBACF;gBAED,QAAQ,CAAC,IAAI,CAAC;oBACZ,YAAY,EAAE,yBAAyB,CAAC,IAAI;oBAC5C,YAAY,EAAE,qBAAqB,CAAC,oBAAoB;iBACzD,CAAC,CAAA;aACH;YACD,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;CACF;AAhOD,sDAgOC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/config-variables.js b/node_modules/@actions/artifact/lib/internal/config-variables.js index c6925aa671..f8a1828ebd 100644 --- a/node_modules/@actions/artifact/lib/internal/config-variables.js +++ b/node_modules/@actions/artifact/lib/internal/config-variables.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getRetentionDays = exports.getWorkSpaceDirectory = exports.getWorkFlowRunId = exports.getRuntimeUrl = exports.getRuntimeToken = exports.getDownloadFileConcurrency = exports.getInitialRetryIntervalInMilliseconds = exports.getRetryMultiplier = exports.getRetryLimit = exports.getUploadChunkSize = exports.getUploadFileConcurrency = void 0; // The number of concurrent uploads that happens at the same time function getUploadFileConcurrency() { return 2; diff --git a/node_modules/@actions/artifact/lib/internal/config-variables.js.map b/node_modules/@actions/artifact/lib/internal/config-variables.js.map index 1226552c68..3032dd4e73 100644 --- a/node_modules/@actions/artifact/lib/internal/config-variables.js.map +++ b/node_modules/@actions/artifact/lib/internal/config-variables.js.map @@ -1 +1 @@ -{"version":3,"file":"config-variables.js","sourceRoot":"","sources":["../../src/internal/config-variables.ts"],"names":[],"mappings":";;AAAA,iEAAiE;AACjE,SAAgB,wBAAwB;IACtC,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,4DAEC;AAED,2FAA2F;AAC3F,4CAA4C;AAC5C,SAAgB,kBAAkB;IAChC,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA,CAAC,cAAc;AACvC,CAAC;AAFD,gDAEC;AAED,yFAAyF;AACzF,SAAgB,aAAa;IAC3B,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,sCAEC;AAED,wGAAwG;AACxG,0GAA0G;AAC1G,SAAgB,kBAAkB;IAChC,OAAO,GAAG,CAAA;AACZ,CAAC;AAFD,gDAEC;AAED,yGAAyG;AACzG,SAAgB,qCAAqC;IACnD,OAAO,IAAI,CAAA;AACb,CAAC;AAFD,sFAEC;AAED,mEAAmE;AACnE,SAAgB,0BAA0B;IACxC,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,gEAEC;AAED,SAAgB,eAAe;IAC7B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAClD,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;KACpE;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAND,0CAMC;AAED,SAAgB,aAAa;IAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACrD,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;KAClE;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAND,sCAMC;AAED,SAAgB,gBAAgB;IAC9B,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAClD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;KAC5D;IACD,OAAO,aAAa,CAAA;AACtB,CAAC;AAND,4CAMC;AAED,SAAgB,qBAAqB;IACnC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;IAC1D,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;KAC/D;IACD,OAAO,kBAAkB,CAAA;AAC3B,CAAC;AAND,sDAMC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;AAC7C,CAAC;AAFD,4CAEC"} \ No newline at end of file +{"version":3,"file":"config-variables.js","sourceRoot":"","sources":["../../src/internal/config-variables.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,SAAgB,wBAAwB;IACtC,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,4DAEC;AAED,2FAA2F;AAC3F,4CAA4C;AAC5C,SAAgB,kBAAkB;IAChC,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA,CAAC,cAAc;AACvC,CAAC;AAFD,gDAEC;AAED,yFAAyF;AACzF,SAAgB,aAAa;IAC3B,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,sCAEC;AAED,wGAAwG;AACxG,0GAA0G;AAC1G,SAAgB,kBAAkB;IAChC,OAAO,GAAG,CAAA;AACZ,CAAC;AAFD,gDAEC;AAED,yGAAyG;AACzG,SAAgB,qCAAqC;IACnD,OAAO,IAAI,CAAA;AACb,CAAC;AAFD,sFAEC;AAED,mEAAmE;AACnE,SAAgB,0BAA0B;IACxC,OAAO,CAAC,CAAA;AACV,CAAC;AAFD,gEAEC;AAED,SAAgB,eAAe;IAC7B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAClD,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;KACpE;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAND,0CAMC;AAED,SAAgB,aAAa;IAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACrD,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;KAClE;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAND,sCAMC;AAED,SAAgB,gBAAgB;IAC9B,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAClD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;KAC5D;IACD,OAAO,aAAa,CAAA;AACtB,CAAC;AAND,4CAMC;AAED,SAAgB,qBAAqB;IACnC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;IAC1D,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;KAC/D;IACD,OAAO,kBAAkB,CAAA;AAC3B,CAAC;AAND,sDAMC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;AAC7C,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/contracts.d.ts b/node_modules/@actions/artifact/lib/internal/contracts.d.ts index 154e0e8f1c..943f689fce 100644 --- a/node_modules/@actions/artifact/lib/internal/contracts.d.ts +++ b/node_modules/@actions/artifact/lib/internal/contracts.d.ts @@ -25,8 +25,18 @@ export interface PatchArtifactSizeSuccessResponse { uploadUrl: string; } export interface UploadResults { + /** + * The size in bytes of data that was transferred during the upload process to the actions backend service. This takes into account possible + * gzip compression to reduce the amount of data that needs to be transferred + */ uploadSize: number; + /** + * The raw size of the files that were specified for upload + */ totalSize: number; + /** + * An array of files that failed to upload + */ failedItems: string[]; } export interface ListArtifactsResponse { diff --git a/node_modules/@actions/artifact/lib/internal/download-http-client.js b/node_modules/@actions/artifact/lib/internal/download-http-client.js index 9a8d7076d3..a3d16f8c8d 100644 --- a/node_modules/@actions/artifact/lib/internal/download-http-client.js +++ b/node_modules/@actions/artifact/lib/internal/download-http-client.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,14 +27,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.DownloadHttpClient = void 0; const fs = __importStar(require("fs")); const core = __importStar(require("@actions/core")); const zlib = __importStar(require("zlib")); @@ -167,9 +180,6 @@ class DownloadHttpClient { let response; try { response = yield makeDownloadRequest(); - if (core.isDebug()) { - utils_1.displayHttpDiagnostics(response); - } } catch (error) { // if an error is caught, it is usually indicative of a timeout so retry the download diff --git a/node_modules/@actions/artifact/lib/internal/download-http-client.js.map b/node_modules/@actions/artifact/lib/internal/download-http-client.js.map index 6dcfc771f2..b46f0c5da7 100644 --- a/node_modules/@actions/artifact/lib/internal/download-http-client.js.map +++ b/node_modules/@actions/artifact/lib/internal/download-http-client.js.map @@ -1 +1 @@ -{"version":3,"file":"download-http-client.js","sourceRoot":"","sources":["../../src/internal/download-http-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,oDAAqC;AACrC,2CAA4B;AAC5B,mCAYgB;AAChB,6BAAuB;AACvB,uDAAgD;AAChD,2CAAsC;AAGtC,iDAA0C;AAE1C,yDAA4E;AAE5E,iDAAqD;AAErD,MAAa,kBAAkB;IAK7B;QACE,IAAI,CAAC,mBAAmB,GAAG,IAAI,0BAAW,CACxC,6CAA0B,EAAE,EAC5B,4BAA4B,CAC7B,CAAA;QACD,qGAAqG;QACrG,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC;IAED;;OAEG;IACG,aAAa;;YACjB,MAAM,WAAW,GAAG,sBAAc,EAAE,CAAA;YAEpC,+GAA+G;YAC/G,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;YACpD,MAAM,OAAO,GAAG,0BAAkB,CAAC,kBAAkB,CAAC,CAAA;YACtD,MAAM,QAAQ,GAAG,MAAM,qCAAsB,CAAC,gBAAgB,EAAE,GAAS,EAAE,gDACzE,OAAA,MAAM,CAAC,GAAG,CA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AAA;wBACD,iBAAiB,CAAC,KAAK,EAAE,CAAA;wBACzB,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC;yBACD,IAAI,CAAC,iBAAiB,CAAC;yBACvB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;wBAChB,OAAO,EAAE,CAAA;oBACX,CAAC,CAAC;yBACD,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;wBACnB,IAAI,CAAC,KAAK,CACR,wDAAwD,iBAAiB,CAAC,IAAI,EAAE,CACjF,CAAA;wBACD,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC,CAAA;iBACL;YACH,CAAC,CAAC,CAAA;YACF,OAAM;QACR,CAAC;KAAA;CACF;AA1UD,gDA0UC"} \ No newline at end of file +{"version":3,"file":"download-http-client.js","sourceRoot":"","sources":["../../src/internal/download-http-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,oDAAqC;AACrC,2CAA4B;AAC5B,mCAYgB;AAChB,6BAAuB;AACvB,uDAAgD;AAChD,2CAAsC;AAGtC,iDAA0C;AAE1C,yDAA4E;AAE5E,iDAAqD;AAErD,MAAa,kBAAkB;IAK7B;QACE,IAAI,CAAC,mBAAmB,GAAG,IAAI,0BAAW,CACxC,6CAA0B,EAAE,EAC5B,4BAA4B,CAC7B,CAAA;QACD,qGAAqG;QACrG,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC;IAED;;OAEG;IACG,aAAa;;YACjB,MAAM,WAAW,GAAG,sBAAc,EAAE,CAAA;YAEpC,+GAA+G;YAC/G,MAAM,MAAM,GAAG,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;YACpD,MAAM,OAAO,GAAG,0BAAkB,CAAC,kBAAkB,CAAC,CAAA;YACtD,MAAM,QAAQ,GAAG,MAAM,qCAAsB,CAAC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K,EAAE,CAAA;wBACzB,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC;yBACD,IAAI,CAAC,iBAAiB,CAAC;yBACvB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;wBAChB,OAAO,EAAE,CAAA;oBACX,CAAC,CAAC;yBACD,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;wBACnB,IAAI,CAAC,KAAK,CACR,wDAAwD,iBAAiB,CAAC,IAAI,EAAE,CACjF,CAAA;wBACD,MAAM,CAAC,KAAK,CAAC,CAAA;oBACf,CAAC,CAAC,CAAA;iBACL;YACH,CAAC,CAAC,CAAA;YACF,OAAM;QACR,CAAC;KAAA;CACF;AAvUD,gDAuUC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/download-specification.js b/node_modules/@actions/artifact/lib/internal/download-specification.js index ef656d7a5b..8981abe95b 100644 --- a/node_modules/@actions/artifact/lib/internal/download-specification.js +++ b/node_modules/@actions/artifact/lib/internal/download-specification.js @@ -1,12 +1,25 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDownloadSpecification = void 0; const path = __importStar(require("path")); /** * Creates a specification for a set of files that will be downloaded diff --git a/node_modules/@actions/artifact/lib/internal/download-specification.js.map b/node_modules/@actions/artifact/lib/internal/download-specification.js.map index fb48c31408..17e505e1f0 100644 --- a/node_modules/@actions/artifact/lib/internal/download-specification.js.map +++ b/node_modules/@actions/artifact/lib/internal/download-specification.js.map @@ -1 +1 @@ -{"version":3,"file":"download-specification.js","sourceRoot":"","sources":["../../src/internal/download-specification.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4B;AAyB5B;;;;;;GAMG;AACH,SAAgB,wBAAwB,CACtC,YAAoB,EACpB,eAAiC,EACjC,YAAoB,EACpB,oBAA6B;IAE7B,oEAAoE;IACpE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAA;IAErC,MAAM,cAAc,GAA0B;QAC5C,oBAAoB,EAAE,oBAAoB;YACxC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;YACvC,CAAC,CAAC,YAAY;QAChB,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,EAAE;QACtB,eAAe,EAAE,EAAE;KACpB,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE;QACnC,wEAAwE;QACxE,IACE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,YAAY,GAAG,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,YAAY,IAAI,CAAC,EAC1C;YACA,2CAA2C;YAC3C,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACtD,oIAAoI;YACpI,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CACxB,YAAY,EACZ,oBAAoB;gBAClB,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAClD,CAAA;YAED,2GAA2G;YAC3G,6FAA6F;YAC7F,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE;gBAC7B,wFAAwF;gBACxF,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;gBACvC,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,EAAE;oBAC1B,kGAAkG;oBAClG,cAAc,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;iBACjD;qBAAM;oBACL,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC;wBAClC,cAAc,EAAE,KAAK,CAAC,eAAe;wBACrC,UAAU,EAAE,QAAQ;qBACrB,CAAC,CAAA;iBACH;aACF;SACF;KACF;IAED,cAAc,CAAC,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAC3D,OAAO,cAAc,CAAA;AACvB,CAAC;AAtDD,4DAsDC"} \ No newline at end of file +{"version":3,"file":"download-specification.js","sourceRoot":"","sources":["../../src/internal/download-specification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAyB5B;;;;;;GAMG;AACH,SAAgB,wBAAwB,CACtC,YAAoB,EACpB,eAAiC,EACjC,YAAoB,EACpB,oBAA6B;IAE7B,oEAAoE;IACpE,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAA;IAErC,MAAM,cAAc,GAA0B;QAC5C,oBAAoB,EAAE,oBAAoB;YACxC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;YACvC,CAAC,CAAC,YAAY;QAChB,kBAAkB,EAAE,EAAE;QACtB,kBAAkB,EAAE,EAAE;QACtB,eAAe,EAAE,EAAE;KACpB,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE;QACnC,wEAAwE;QACxE,IACE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,YAAY,GAAG,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,YAAY,IAAI,CAAC,EAC1C;YACA,2CAA2C;YAC3C,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACtD,oIAAoI;YACpI,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CACxB,YAAY,EACZ,oBAAoB;gBAClB,CAAC,CAAC,mBAAmB;gBACrB,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAClD,CAAA;YAED,2GAA2G;YAC3G,6FAA6F;YAC7F,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE;gBAC7B,wFAAwF;gBACxF,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;gBACvC,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,EAAE;oBAC1B,kGAAkG;oBAClG,cAAc,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;iBACjD;qBAAM;oBACL,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC;wBAClC,cAAc,EAAE,KAAK,CAAC,eAAe;wBACrC,UAAU,EAAE,QAAQ;qBACrB,CAAC,CAAA;iBACH;aACF;SACF;KACF;IAED,cAAc,CAAC,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAC3D,OAAO,cAAc,CAAA;AACvB,CAAC;AAtDD,4DAsDC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/http-manager.js b/node_modules/@actions/artifact/lib/internal/http-manager.js index 0c757cab5b..3c5eb476a5 100644 --- a/node_modules/@actions/artifact/lib/internal/http-manager.js +++ b/node_modules/@actions/artifact/lib/internal/http-manager.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpManager = void 0; const utils_1 = require("./utils"); /** * Used for managing http clients during either upload or download diff --git a/node_modules/@actions/artifact/lib/internal/http-manager.js.map b/node_modules/@actions/artifact/lib/internal/http-manager.js.map index de9e267f62..7c7a4acd99 100644 --- a/node_modules/@actions/artifact/lib/internal/http-manager.js.map +++ b/node_modules/@actions/artifact/lib/internal/http-manager.js.map @@ -1 +1 @@ -{"version":3,"file":"http-manager.js","sourceRoot":"","sources":["../../src/internal/http-manager.ts"],"names":[],"mappings":";;AACA,mCAAwC;AAExC;;GAEG;AACH,MAAa,WAAW;IAItB,YAAY,WAAmB,EAAE,SAAiB;QAChD,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;SACrD;QACD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,SAAS,CAAC,CAAC,CAAA;IACzE,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;IAED,mGAAmG;IACnG,+HAA+H;IAC/H,uBAAuB,CAAC,KAAa;QACnC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAA;QAC7B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,wBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACxD,CAAC;IAED,2BAA2B;QACzB,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC5C,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAA;SACpC;IACH,CAAC;CACF;AA5BD,kCA4BC"} \ No newline at end of file +{"version":3,"file":"http-manager.js","sourceRoot":"","sources":["../../src/internal/http-manager.ts"],"names":[],"mappings":";;;AACA,mCAAwC;AAExC;;GAEG;AACH,MAAa,WAAW;IAItB,YAAY,WAAmB,EAAE,SAAiB;QAChD,IAAI,WAAW,GAAG,CAAC,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;SACrD;QACD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,SAAS,CAAC,CAAC,CAAA;IACzE,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC5B,CAAC;IAED,mGAAmG;IACnG,+HAA+H;IAC/H,uBAAuB,CAAC,KAAa;QACnC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAA;QAC7B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,wBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACxD,CAAC;IAED,2BAA2B;QACzB,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC5C,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAA;SACpC;IACH,CAAC;CACF;AA5BD,kCA4BC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.d.ts b/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.d.ts new file mode 100644 index 0000000000..04aea3d282 --- /dev/null +++ b/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.d.ts @@ -0,0 +1,8 @@ +/** + * Scans the name of the artifact to make sure there are no illegal characters + */ +export declare function checkArtifactName(name: string): void; +/** + * Scans the name of the filePath used to make sure there are no illegal characters + */ +export declare function checkArtifactFilePath(path: string): void; diff --git a/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js b/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js new file mode 100644 index 0000000000..7fb2b02b9b --- /dev/null +++ b/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js @@ -0,0 +1,67 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkArtifactFilePath = exports.checkArtifactName = void 0; +const core_1 = require("@actions/core"); +/** + * Invalid characters that cannot be in the artifact name or an uploaded file. Will be rejected + * from the server if attempted to be sent over. These characters are not allowed due to limitations with certain + * file systems such as NTFS. To maintain platform-agnostic behavior, all characters that are not supported by an + * individual filesystem/platform will not be supported on all fileSystems/platforms + * + * FilePaths can include characters such as \ and / which are not permitted in the artifact name alone + */ +const invalidArtifactFilePathCharacters = new Map([ + ['"', ' Double quote "'], + [':', ' Colon :'], + ['<', ' Less than <'], + ['>', ' Greater than >'], + ['|', ' Vertical bar |'], + ['*', ' Asterisk *'], + ['?', ' Question mark ?'], + ['\r', ' Carriage return \\r'], + ['\n', ' Line feed \\n'] +]); +const invalidArtifactNameCharacters = new Map([ + ...invalidArtifactFilePathCharacters, + ['\\', ' Backslash \\'], + ['/', ' Forward slash /'] +]); +/** + * Scans the name of the artifact to make sure there are no illegal characters + */ +function checkArtifactName(name) { + if (!name) { + throw new Error(`Artifact name: ${name}, is incorrectly provided`); + } + for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactNameCharacters) { + if (name.includes(invalidCharacterKey)) { + throw new Error(`Artifact name is not valid: ${name}. Contains the following character: ${errorMessageForCharacter} + +Invalid characters include: ${Array.from(invalidArtifactNameCharacters.values()).toString()} + +These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`); + } + } + core_1.info(`Artifact name is valid!`); +} +exports.checkArtifactName = checkArtifactName; +/** + * Scans the name of the filePath used to make sure there are no illegal characters + */ +function checkArtifactFilePath(path) { + if (!path) { + throw new Error(`Artifact path: ${path}, is incorrectly provided`); + } + for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { + if (path.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path}. Contains the following character: ${errorMessageForCharacter} + +Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} + +The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems. + `); + } + } +} +exports.checkArtifactFilePath = checkArtifactFilePath; +//# sourceMappingURL=path-and-artifact-name-validation.js.map \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js.map b/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js.map new file mode 100644 index 0000000000..2070858da2 --- /dev/null +++ b/node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-and-artifact-name-validation.js","sourceRoot":"","sources":["../../src/internal/path-and-artifact-name-validation.ts"],"names":[],"mappings":";;;AAAA,wCAAkC;AAElC;;;;;;;GAOG;AACH,MAAM,iCAAiC,GAAG,IAAI,GAAG,CAAiB;IAChE,CAAC,GAAG,EAAE,iBAAiB,CAAC;IACxB,CAAC,GAAG,EAAE,UAAU,CAAC;IACjB,CAAC,GAAG,EAAE,cAAc,CAAC;IACrB,CAAC,GAAG,EAAE,iBAAiB,CAAC;IACxB,CAAC,GAAG,EAAE,iBAAiB,CAAC;IACxB,CAAC,GAAG,EAAE,aAAa,CAAC;IACpB,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACzB,CAAC,IAAI,EAAE,sBAAsB,CAAC;IAC9B,CAAC,IAAI,EAAE,gBAAgB,CAAC;CACzB,CAAC,CAAA;AAEF,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAAiB;IAC5D,GAAG,iCAAiC;IACpC,CAAC,IAAI,EAAE,eAAe,CAAC;IACvB,CAAC,GAAG,EAAE,kBAAkB,CAAC;CAC1B,CAAC,CAAA;AAEF;;GAEG;AACH,SAAgB,iBAAiB,CAAC,IAAY;IAC5C,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,2BAA2B,CAAC,CAAA;KACnE;IAED,KAAK,MAAM,CACT,mBAAmB,EACnB,wBAAwB,CACzB,IAAI,6BAA6B,EAAE;QAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;YACtC,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,uCAAuC,wBAAwB;;8BAE5E,KAAK,CAAC,IAAI,CAC9B,6BAA6B,CAAC,MAAM,EAAE,CACvC,CAAC,QAAQ,EAAE;;mRAE+P,CAC5Q,CAAA;SACF;KACF;IAED,WAAI,CAAC,yBAAyB,CAAC,CAAA;AACjC,CAAC;AAvBD,8CAuBC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,IAAY;IAChD,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,2BAA2B,CAAC,CAAA;KACnE;IAED,KAAK,MAAM,CACT,mBAAmB,EACnB,wBAAwB,CACzB,IAAI,iCAAiC,EAAE;QACtC,IAAI,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;YACtC,MAAM,IAAI,KAAK,CACb,+BAA+B,IAAI,uCAAuC,wBAAwB;;8BAE5E,KAAK,CAAC,IAAI,CAC9B,iCAAiC,CAAC,MAAM,EAAE,CAC3C,CAAC,QAAQ,EAAE;;;WAGT,CACJ,CAAA;SACF;KACF;AACH,CAAC;AAtBD,sDAsBC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/requestUtils.js b/node_modules/@actions/artifact/lib/internal/requestUtils.js index ca0b0f86e7..2d3dfca8ce 100644 --- a/node_modules/@actions/artifact/lib/internal/requestUtils.js +++ b/node_modules/@actions/artifact/lib/internal/requestUtils.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,14 +27,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.retryHttpClientRequest = exports.retry = void 0; const utils_1 = require("./utils"); const core = __importStar(require("@actions/core")); const config_variables_1 = require("./config-variables"); diff --git a/node_modules/@actions/artifact/lib/internal/requestUtils.js.map b/node_modules/@actions/artifact/lib/internal/requestUtils.js.map index 6d16218bd8..5a1943fe8a 100644 --- a/node_modules/@actions/artifact/lib/internal/requestUtils.js.map +++ b/node_modules/@actions/artifact/lib/internal/requestUtils.js.map @@ -1 +1 @@ -{"version":3,"file":"requestUtils.js","sourceRoot":"","sources":["../../src/internal/requestUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,mCAMgB;AAChB,oDAAqC;AACrC,yDAAgD;AAEhD,SAAsB,KAAK,CACzB,IAAY,EACZ,SAA6C,EAC7C,mBAAwC,EACxC,WAAmB;;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,sBAAsB,EAAE;YAC1B,MAAM,KAAK,CAAC,GAAG,IAAI,YAAY,sBAAsB,EAAE,CAAC,CAAA;SACzD;QACD,MAAM,KAAK,CAAC,GAAG,IAAI,YAAY,YAAY,EAAE,CAAC,CAAA;IAChD,CAAC;CAAA;AA1DD,sBA0DC;AAED,SAAsB,sBAAsB,CAC1C,IAAY,EACZ,MAA0C,EAC1C,sBAA2C,IAAI,GAAG,EAAE,EACpD,WAAW,GAAG,gCAAa,EAAE;;QAE7B,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IACpE,CAAC;CAAA;AAPD,wDAOC"} \ No newline at end of file +{"version":3,"file":"requestUtils.js","sourceRoot":"","sources":["../../src/internal/requestUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mCAMgB;AAChB,oDAAqC;AACrC,yDAAgD;AAEhD,SAAsB,KAAK,CACzB,IAAY,EACZ,SAA6C,EAC7C,mBAAwC,EACxC,WAAmB;;QAEnB,IAAI,QAAQ,GAAoC,SAAS,CAAA;QACzD,IAAI,UAAU,GAAuB,SAAS,CAAA;QAC9C,IAAI,WAAW,GAAG,KAAK,CAAA;QACvB,IAAI,YAAY,GAAG,EAAE,CAAA;QACrB,IAAI,sBAAsB,GAAuB,SAAS,CAAA;QAC1D,IAAI,OAAO,GAAG,CAAC,CAAA;QAEf,OAAO,OAAO,IAAI,WAAW,EAAE;YAC7B,IAAI;gBACF,QAAQ,GAAG,MAAM,SAAS,EAAE,CAAA;gBAC5B,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAA;gBAExC,IAAI,2BAAmB,CAAC,UAAU,CAAC,EAAE;oBACnC,OAAO,QAAQ,CAAA;iBAChB;gBAED,uFAAuF;gBACvF,IAAI,UAAU,EAAE;oBACd,sBAAsB,GAAG,mBAAmB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;iBAC7D;gBAED,WAAW,GAAG,6BAAqB,CAAC,UAAU,CAAC,CAAA;gBAC/C,YAAY,GAAG,mCAAmC,UAAU,EAAE,CAAA;aAC/D;YAAC,OAAO,KAAK,EAAE;gBACd,WAAW,GAAG,IAAI,CAAA;gBAClB,YAAY,GAAG,KAAK,CAAC,OAAO,CAAA;aAC7B;YAED,IAAI,CAAC,WAAW,EAAE;gBAChB,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,2BAA2B,CAAC,CAAA;gBAC7C,IAAI,QAAQ,EAAE;oBACZ,8BAAsB,CAAC,QAAQ,CAAC,CAAA;iBACjC;gBACD,MAAK;aACN;YAED,IAAI,CAAC,IAAI,CACP,GAAG,IAAI,cAAc,OAAO,OAAO,WAAW,uBAAuB,YAAY,EAAE,CACpF,CAAA;YAED,MAAM,aAAK,CAAC,6CAAqC,CAAC,OAAO,CAAC,CAAC,CAAA;YAC3D,OAAO,EAAE,CAAA;SACV;QAED,IAAI,QAAQ,EAAE;YACZ,8BAAsB,CAAC,QAAQ,CAAC,CAAA;SACjC;QAED,IAAI,sBAAsB,EAAE;YAC1B,MAAM,KAAK,CAAC,GAAG,IAAI,YAAY,sBAAsB,EAAE,CAAC,CAAA;SACzD;QACD,MAAM,KAAK,CAAC,GAAG,IAAI,YAAY,YAAY,EAAE,CAAC,CAAA;IAChD,CAAC;CAAA;AA1DD,sBA0DC;AAED,SAAsB,sBAAsB,CAC1C,IAAY,EACZ,MAA0C,EAC1C,sBAA2C,IAAI,GAAG,EAAE,EACpD,WAAW,GAAG,gCAAa,EAAE;;QAE7B,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IACpE,CAAC;CAAA;AAPD,wDAOC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/status-reporter.d.ts b/node_modules/@actions/artifact/lib/internal/status-reporter.d.ts index a3e44862c8..e301f7ac62 100644 --- a/node_modules/@actions/artifact/lib/internal/status-reporter.d.ts +++ b/node_modules/@actions/artifact/lib/internal/status-reporter.d.ts @@ -11,11 +11,10 @@ export declare class StatusReporter { private displayFrequencyInMilliseconds; private largeFiles; private totalFileStatus; - private largeFileStatus; constructor(displayFrequencyInMilliseconds: number); setTotalNumberOfFilesToProcess(fileTotal: number): void; start(): void; - updateLargeFileStatus(fileName: string, numerator: number, denominator: number): void; + updateLargeFileStatus(fileName: string, chunkStartIndex: number, chunkEndIndex: number, totalUploadFileSize: number): void; stop(): void; incrementProcessedCount(): void; private formatPercentage; diff --git a/node_modules/@actions/artifact/lib/internal/status-reporter.js b/node_modules/@actions/artifact/lib/internal/status-reporter.js index 9f29886ad3..46b77a4254 100644 --- a/node_modules/@actions/artifact/lib/internal/status-reporter.js +++ b/node_modules/@actions/artifact/lib/internal/status-reporter.js @@ -1,5 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.StatusReporter = void 0; const core_1 = require("@actions/core"); /** * Status Reporter that displays information about the progress/status of an artifact that is being uploaded or downloaded @@ -14,11 +15,11 @@ class StatusReporter { this.processedCount = 0; this.largeFiles = new Map(); this.totalFileStatus = undefined; - this.largeFileStatus = undefined; this.displayFrequencyInMilliseconds = displayFrequencyInMilliseconds; } setTotalNumberOfFilesToProcess(fileTotal) { this.totalNumberOfFilesToProcess = fileTotal; + this.processedCount = 0; } start() { // displays information about the total upload/download status @@ -27,30 +28,17 @@ class StatusReporter { const percentage = this.formatPercentage(this.processedCount, this.totalNumberOfFilesToProcess); core_1.info(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${percentage.slice(0, percentage.indexOf('.') + 2)}%)`); }, this.displayFrequencyInMilliseconds); - // displays extra information about any large files that take a significant amount of time to upload or download every 1 second - this.largeFileStatus = setInterval(() => { - for (const value of Array.from(this.largeFiles.values())) { - core_1.info(value); - } - // delete all entries in the map after displaying the information so it will not be displayed again unless explicitly added - this.largeFiles.clear(); - }, 1000); } // if there is a large file that is being uploaded in chunks, this is used to display extra information about the status of the upload - updateLargeFileStatus(fileName, numerator, denominator) { + updateLargeFileStatus(fileName, chunkStartIndex, chunkEndIndex, totalUploadFileSize) { // display 1 decimal place without any rounding - const percentage = this.formatPercentage(numerator, denominator); - const displayInformation = `Uploading ${fileName} (${percentage.slice(0, percentage.indexOf('.') + 2)}%)`; - // any previously added display information should be overwritten for the specific large file because a map is being used - this.largeFiles.set(fileName, displayInformation); + const percentage = this.formatPercentage(chunkEndIndex, totalUploadFileSize); + core_1.info(`Uploaded ${fileName} (${percentage.slice(0, percentage.indexOf('.') + 2)}%) bytes ${chunkStartIndex}:${chunkEndIndex}`); } stop() { if (this.totalFileStatus) { clearInterval(this.totalFileStatus); } - if (this.largeFileStatus) { - clearInterval(this.largeFileStatus); - } } incrementProcessedCount() { this.processedCount++; diff --git a/node_modules/@actions/artifact/lib/internal/status-reporter.js.map b/node_modules/@actions/artifact/lib/internal/status-reporter.js.map index 6108484134..ce4bb697ea 100644 --- a/node_modules/@actions/artifact/lib/internal/status-reporter.js.map +++ b/node_modules/@actions/artifact/lib/internal/status-reporter.js.map @@ -1 +1 @@ -{"version":3,"file":"status-reporter.js","sourceRoot":"","sources":["../../src/internal/status-reporter.ts"],"names":[],"mappings":";;AAAA,wCAAkC;AAElC;;;;;;GAMG;AAEH,MAAa,cAAc;IAQzB,YAAY,8BAAsC;QAP1C,gCAA2B,GAAG,CAAC,CAAA;QAC/B,mBAAc,GAAG,CAAC,CAAA;QAElB,eAAU,GAAG,IAAI,GAAG,EAAkB,CAAA;QAK5C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAA;QAChC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAA;QAChC,IAAI,CAAC,8BAA8B,GAAG,8BAA8B,CAAA;IACtE,CAAC;IAED,8BAA8B,CAAC,SAAiB;QAC9C,IAAI,CAAC,2BAA2B,GAAG,SAAS,CAAA;IAC9C,CAAC;IAED,KAAK;QACH,8DAA8D;QAC9D,IAAI,CAAC,eAAe,GAAG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AI,CAAC,eAAe,EAAE;YACxB,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;SACpC;IACH,CAAC;IAED,uBAAuB;QACrB,IAAI,CAAC,cAAc,EAAE,CAAA;IACvB,CAAC;IAEO,gBAAgB,CAAC,SAAiB,EAAE,WAAmB;QAC7D,0HAA0H;QAC1H,OAAO,CAAC,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IAChE,CAAC;CACF;AAjFD,wCAiFC"} \ No newline at end of file +{"version":3,"file":"status-reporter.js","sourceRoot":"","sources":["../../src/internal/status-reporter.ts"],"names":[],"mappings":";;;AAAA,wCAAkC;AAElC;;;;;;GAMG;AAEH,MAAa,cAAc;IAOzB,YAAY,8BAAsC;QAN1C,gCAA2B,GAAG,CAAC,CAAA;QAC/B,mBAAc,GAAG,CAAC,CAAA;QAElB,eAAU,GAAG,IAAI,GAAG,EAAkB,CAAA;QAI5C,IAAI,CAAC,eAAe,GAAG,SAAS,CAAA;QAChC,IAAI,CAAC,8BAA8B,GAAG,8BAA8B,CAAA;IACtE,CAAC;IAED,8BAA8B,CAAC,SAAiB;QAC9C,IAAI,CAAC,2BAA2B,GAAG,SAAS,CAAA;QAC5C,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;IACzB,CAAC;IAED,KAAK;QACH,8DAA8D;QAC9D,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,GAAG,EAAE;YACtC,+CAA+C;YAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CACtC,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,2BAA2B,CACjC,CAAA;YACD,WAAI,CACF,qBACE,IAAI,CAAC,2BACP,yBAAyB,IAAI,CAAC,cAAc,KAAK,UAAU,CAAC,KAAK,CAC/D,CAAC,EACD,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAC5B,IAAI,CACN,CAAA;QACH,CAAC,EAAE,IAAI,CAAC,8BAA8B,CAAC,CAAA;IACzC,CAAC;IAED,sIAAsI;IACtI,qBAAqB,CACnB,QAAgB,EAChB,eAAuB,EACvB,aAAqB,EACrB,mBAA2B;QAE3B,+CAA+C;QAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAA;QAC5E,WAAI,CACF,YAAY,QAAQ,KAAK,UAAU,CAAC,KAAK,CACvC,CAAC,EACD,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAC5B,YAAY,eAAe,IAAI,aAAa,EAAE,CAChD,CAAA;IACH,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;SACpC;IACH,CAAC;IAED,uBAAuB;QACrB,IAAI,CAAC,cAAc,EAAE,CAAA;IACvB,CAAC;IAEO,gBAAgB,CAAC,SAAiB,EAAE,WAAmB;QAC7D,0HAA0H;QAC1H,OAAO,CAAC,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IAChE,CAAC;CACF;AAnED,wCAmEC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/upload-gzip.js b/node_modules/@actions/artifact/lib/internal/upload-gzip.js index a13f12d6c6..b8e2e46820 100644 --- a/node_modules/@actions/artifact/lib/internal/upload-gzip.js +++ b/node_modules/@actions/artifact/lib/internal/upload-gzip.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -15,18 +34,25 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createGZipFileInBuffer = exports.createGZipFileOnDisk = void 0; const fs = __importStar(require("fs")); const zlib = __importStar(require("zlib")); const util_1 = require("util"); const stat = util_1.promisify(fs.stat); +/** + * GZipping certain files that are already compressed will likely not yield further size reductions. Creating large temporary gzip + * files then will just waste a lot of time before ultimately being discarded (especially for very large files). + * If any of these types of files are encountered then on-disk gzip creation will be skipped and the original file will be uploaded as-is + */ +const gzipExemptFileExtensions = [ + '.gzip', + '.zip', + '.tar.lz', + '.tar.gz', + '.tar.bz2', + '.7z' +]; /** * Creates a Gzip compressed file of an original file at the provided temporary filepath location * @param {string} originalFilePath filepath of whatever will be compressed. The original file will be unmodified @@ -35,6 +61,12 @@ const stat = util_1.promisify(fs.stat); */ function createGZipFileOnDisk(originalFilePath, tempFilePath) { return __awaiter(this, void 0, void 0, function* () { + for (const gzipExemptExtension of gzipExemptFileExtensions) { + if (originalFilePath.endsWith(gzipExemptExtension)) { + // return a really large number so that the original file gets uploaded + return Number.MAX_SAFE_INTEGER; + } + } return new Promise((resolve, reject) => { const inputStream = fs.createReadStream(originalFilePath); const gzip = zlib.createGzip(); diff --git a/node_modules/@actions/artifact/lib/internal/upload-gzip.js.map b/node_modules/@actions/artifact/lib/internal/upload-gzip.js.map index 25c7de1b87..b649695d46 100644 --- a/node_modules/@actions/artifact/lib/internal/upload-gzip.js.map +++ b/node_modules/@actions/artifact/lib/internal/upload-gzip.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-gzip.js","sourceRoot":"","sources":["../../src/internal/upload-gzip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAC5B,+BAA8B;AAC9B,MAAM,IAAI,GAAG,gBAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAE/B;;;;;GAKG;AACH,SAAsB,oBAAoB,CACxC,gBAAwB,EACxB,YAAoB;;QAEpB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;YACzD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;YAC9B,MAAM,YAAY,GAAG,EAAE,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAA;YACvD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;YACzC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAS,EAAE;gBACnC,qIAAqI;gBACrI,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAA;gBAC5C,OAAO,CAAC,IAAI,CAAC,CAAA;YACf,CAAC,CAAA,CAAC,CAAA;YACF,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;gBAC/B,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBAClB,MAAM,CAAA;YACR,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA;AApBD,oDAoBC;AAED;;;;GAIG;AACH,SAAsB,sBAAsB,CAC1C,gBAAwB;;QAExB,OAAO,IAAI,OAAO,CAAC,CAAM,OAAO,EAAC,EAAE;;YACjC,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;YACzD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAA;YAC9B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACtB,8IAA8I;YAC9I,MAAM,MAAM,GAAG,EAAE,CAAA;;gBACjB,KAA0B,IAAA,SAAA,cAAA,IAAI,CAAA,UAAA;oBAAnB,MAAM,KAAK,iBAAA,CAAA;oBACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;iBACnB;;;;;;;;;YACD,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;QAChC,CAAC,CAAA,CAAC,CAAA;IACJ,CAAC;CAAA;AAdD,wDAcC"} \ No newline at end of file +{"version":3,"file":"upload-gzip.js","sourceRoot":"","sources":["../../src/internal/upload-gzip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,2CAA4B;AAC5B,+BAA8B;AAC9B,MAAM,IAAI,GAAG,gBAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAE/B;;;;GAIG;AACH,MAAM,wBAAwB,GAAG;IAC/B,OAAO;IACP,MAAM;IACN,SAAS;IACT,SAAS;IACT,UAAU;IACV,KAAK;CACN,CAAA;AAED;;;;;GAKG;AACH,SAAsB,oBAAoB,CACx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W,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACtB,8IAA8I;YAC9I,MAAM,MAAM,GAAG,EAAE,CAAA;;gBACjB,KAA0B,IAAA,SAAA,cAAA,IAAI,CAAA,UAAA;oBAAnB,MAAM,KAAK,iBAAA,CAAA;oBACpB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;iBACnB;;;;;;;;;YACD,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;QAChC,CAAC,CAAA,CAAC,CAAA;IACJ,CAAC;CAAA;AAdD,wDAcC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/upload-http-client.js b/node_modules/@actions/artifact/lib/internal/upload-http-client.js index cb576028d9..f68027b5df 100644 --- a/node_modules/@actions/artifact/lib/internal/upload-http-client.js +++ b/node_modules/@actions/artifact/lib/internal/upload-http-client.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,14 +27,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.UploadHttpClient = void 0; const fs = __importStar(require("fs")); const core = __importStar(require("@actions/core")); const tmp = __importStar(require("tmp-promise")); @@ -161,27 +174,33 @@ class UploadHttpClient { */ uploadFileAsync(httpClientIndex, parameters) { return __awaiter(this, void 0, void 0, function* () { - const totalFileSize = (yield stat(parameters.file)).size; + const fileStat = yield stat(parameters.file); + const totalFileSize = fileStat.size; + const isFIFO = fileStat.isFIFO(); let offset = 0; let isUploadSuccessful = true; let failedChunkSizes = 0; let uploadFileSize = 0; let isGzip = true; - // the file that is being uploaded is less than 64k in size, to increase throughput and to minimize disk I/O + // the file that is being uploaded is less than 64k in size to increase throughput and to minimize disk I/O // for creating a new GZip file, an in-memory buffer is used for compression - if (totalFileSize < 65536) { + // with named pipes the file size is reported as zero in that case don't read the file in memory + if (!isFIFO && totalFileSize < 65536) { + core.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); const buffer = yield upload_gzip_1.createGZipFileInBuffer(parameters.file); - //An open stream is needed in the event of a failure and we need to retry. If a NodeJS.ReadableStream is directly passed in, + // An open stream is needed in the event of a failure and we need to retry. If a NodeJS.ReadableStream is directly passed in, // it will not properly get reset to the start of the stream if a chunk upload needs to be retried let openUploadStream; if (totalFileSize < buffer.byteLength) { // compression did not help with reducing the size, use a readable stream from the original file for upload + core.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); openUploadStream = () => fs.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { // create a readable stream using a PassThrough stream that is both readable and writable + core.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); openUploadStream = () => { const passThrough = new stream.PassThrough(); passThrough.end(buffer); @@ -206,25 +225,27 @@ class UploadHttpClient { // the file that is being uploaded is greater than 64k in size, a temporary file gets created on disk using the // npm tmp-promise package and this file gets used to create a GZipped file const tempFile = yield tmp.file(); + core.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); // create a GZip file of the original file being uploaded, the original file should not be modified in any way uploadFileSize = yield upload_gzip_1.createGZipFileOnDisk(parameters.file, tempFile.path); let uploadFilePath = tempFile.path; // compression did not help with size reduction, use the original file for upload and delete the temp GZip file - if (totalFileSize < uploadFileSize) { + // for named pipes totalFileSize is zero, this assumes compression did help + if (!isFIFO && totalFileSize < uploadFileSize) { + core.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); uploadFileSize = totalFileSize; uploadFilePath = parameters.file; isGzip = false; } + else { + core.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); + } let abortFileUpload = false; // upload only a single chunk at a time while (offset < uploadFileSize) { const chunkSize = Math.min(uploadFileSize - offset, parameters.maxChunkSize); - // if an individual file is greater than 100MB (1024*1024*100) in size, display extra information about the upload status - if (uploadFileSize > 104857600) { - this.statusReporter.updateLargeFileStatus(parameters.file, offset, uploadFileSize); - } - const start = offset; - const end = offset + chunkSize - 1; + const startChunkIndex = offset; + const endChunkIndex = offset + chunkSize - 1; offset += parameters.maxChunkSize; if (abortFileUpload) { // if we don't want to continue in the event of an error, any pending upload chunks will be marked as failed @@ -232,10 +253,10 @@ class UploadHttpClient { continue; } const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs.createReadStream(uploadFilePath, { - start, - end, + start: startChunkIndex, + end: endChunkIndex, autoClose: false - }), start, end, uploadFileSize, isGzip, totalFileSize); + }), startChunkIndex, endChunkIndex, uploadFileSize, isGzip, totalFileSize); if (!result) { // Chunk failed to upload, report as failed and do not continue uploading any more chunks for the file. It is possible that part of a chunk was // successfully uploaded so the server may report a different size for what was uploaded @@ -244,9 +265,16 @@ class UploadHttpClient { core.warning(`Aborting upload for ${parameters.file} due to failure`); abortFileUpload = true; } + else { + // if an individual file is greater than 8MB (1024*1024*8) in size, display extra information about the upload status + if (uploadFileSize > 8388608) { + this.statusReporter.updateLargeFileStatus(parameters.file, startChunkIndex, endChunkIndex, uploadFileSize); + } + } } // Delete the temporary file that was created as part of the upload. If the temp file does not get manually deleted by // calling cleanup, it gets removed when the node process exits. For more info see: https://www.npmjs.com/package/tmp-promise#about + core.debug(`deleting temporary gzip file ${tempFile.path}`); yield tempFile.cleanup(); return { isSuccess: isUploadSuccessful, diff --git a/node_modules/@actions/artifact/lib/internal/upload-http-client.js.map b/node_modules/@actions/artifact/lib/internal/upload-http-client.js.map index 1758285054..3347380fbb 100644 --- a/node_modules/@actions/artifact/lib/internal/upload-http-client.js.map +++ b/node_modules/@actions/artifact/lib/internal/upload-http-client.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-http-client.js","sourceRoot":"","sources":["../../src/internal/upload-http-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,oDAAqC;AACrC,iDAAkC;AAClC,+CAAgC;AAOhC,mCAYgB;AAChB,yDAK2B;AAC3B,+BAA8B;AAC9B,6BAAuB;AACvB,2CAAsC;AACtC,uDAAgD;AAChD,sDAA8C;AAE9C,iDAA0C;AAG1C,+CAA0E;AAC1E,iDAAqD;AACrD,MAAM,IAAI,GAAG,gBAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAE/B,MAAa,gBAAgB;IAI3B;QACE,IAAI,CAAC,iBAAiB,GAAG,IAAI,0BAAW,CACtC,2CAAwB,EAAE,EAC1B,0BAA0B,CAC3B,CAAA;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,CAAC,KAAK,CAAC,CAAA;IACjD,CAAC;IAED;;;;OAIG;IACG,6BAA6B,CACjC,YAAoB,EACpB,OAAmC;;YAEnC,MAAM,UAAU,GAA6B;gBAC3C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YAAY,yDAAyD,IAAI,EAAE,CACxF,CAAA;QACH,CAAC;KAAA;CACF;AAleD,4CAkeC"} \ No newline at end of file +{"version":3,"file":"upload-http-client.js","sourceRoot":"","sources":["../../src/internal/upload-http-client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,oDAAqC;AACrC,iDAAkC;AAClC,+CAAgC;AAOhC,mCAYgB;AAChB,yDAK2B;AAC3B,+BAA8B;AAC9B,6BAAuB;AACvB,2CAAsC;AACtC,uDAAgD;AAChD,sDAA8C;AAE9C,iDAA0C;AAG1C,+CAA0E;AAC1E,iDAAqD;AACrD,MAAM,IAAI,GAAG,gBAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAE/B,MAAa,gBAAgB;IAI3B;QACE,IAAI,CAAC,iBAAiB,GAAG,IAAI,0BAAW,CACtC,2CAAwB,EAAE,EAC1B,0BAA0B,CAC3B,CAAA;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,gCAAc,CAAC,KAAK,CAAC,CAAA;IACjD,CAAC;IAED;;;;OAIG;IACG,6BAA6B,CACjC,YAAoB,EACpB,OAAmC;;YAEnC,MAAM,UAAU,GAA6B;gBAC3C,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,YAAY;aACnB,CAAA;YAED,6BAA6B;YAC7B,IAAI,OAAO,IAAI,OAAO,CAAC,aAAa,EAAE;gBACpC,MAAM,eAAe,GAAG,mCAAgB,EAAE,CAAA;gBAC1C,UAAU,CAAC,aAAa,GAAG,0BAAkB,CAC3C,OAAO,CAAC,aAAa,EACrB,eAAe,CAChB,CAAA;aACF;YAED,MAAM,IAAI,GAAW,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;YACxD,MAAM,WAAW,GAAG,sBAAc,EAAE,CAAA;YAEpC,+GAA+G;YAC/G,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,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A;YAEF,0IAA0I;YAC1I,MAAM,QAAQ,GAAG,MAAM,qCAAsB,CAC3C,0BAA0B,EAC1B,GAAS,EAAE,gDAAC,OAAA,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA,GAAA,EAC/D,mBAAmB,CACpB,CAAA;YACD,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAA;YACzB,IAAI,CAAC,KAAK,CACR,YAAY,YAAY,yDAAyD,IAAI,EAAE,CACxF,CAAA;QACH,CAAC;KAAA;CACF;AA3fD,4CA2fC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/upload-specification.js b/node_modules/@actions/artifact/lib/internal/upload-specification.js index ad222223f7..214cfc8b5c 100644 --- a/node_modules/@actions/artifact/lib/internal/upload-specification.js +++ b/node_modules/@actions/artifact/lib/internal/upload-specification.js @@ -1,16 +1,29 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getUploadSpecification = void 0; const fs = __importStar(require("fs")); const core_1 = require("@actions/core"); const path_1 = require("path"); -const utils_1 = require("./utils"); +const path_and_artifact_name_validation_1 = require("./path-and-artifact-name-validation"); /** * Creates a specification that describes how each file that is part of the artifact will be uploaded * @param artifactName the name of the artifact being uploaded. Used during upload to denote where the artifact is stored on the server @@ -18,7 +31,7 @@ const utils_1 = require("./utils"); * @param artifactFiles a list of absolute file paths that denote what should be uploaded as part of the artifact */ function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { - utils_1.checkArtifactName(artifactName); + // artifact name was checked earlier on, no need to check again const specifications = []; if (!fs.existsSync(rootDirectory)) { throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`); @@ -61,7 +74,7 @@ function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { } // Check for forbidden characters in file paths that will be rejected during upload const uploadPath = file.replace(rootDirectory, ''); - utils_1.checkArtifactFilePath(uploadPath); + path_and_artifact_name_validation_1.checkArtifactFilePath(uploadPath); /* uploadFilePath denotes where the file will be uploaded in the file container on the server. During a run, if multiple artifacts are uploaded, they will all be saved in the same container. The artifact name is used as the root directory in the container to separate and distinguish uploaded artifacts diff --git a/node_modules/@actions/artifact/lib/internal/upload-specification.js.map b/node_modules/@actions/artifact/lib/internal/upload-specification.js.map index b0415ef96a..dfc17d359f 100644 --- a/node_modules/@actions/artifact/lib/internal/upload-specification.js.map +++ b/node_modules/@actions/artifact/lib/internal/upload-specification.js.map @@ -1 +1 @@ -{"version":3,"file":"upload-specification.js","sourceRoot":"","sources":["../../src/internal/upload-specification.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AACxB,wCAAmC;AACnC,+BAA6C;AAC7C,mCAAgE;AAOhE;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,YAAoB,EACpB,aAAqB,EACrB,aAAuB;IAEvB,yBAAiB,CAAC,YAAY,CAAC,CAAA;IAE/B,MAAM,cAAc,GAA0B,EAAE,CAAA;IAEhD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,0BAA0B,aAAa,iBAAiB,CAAC,CAAA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at end of file +{"version":3,"file":"upload-specification.js","sourceRoot":"","sources":["../../src/internal/upload-specification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,wCAAmC;AACnC,+BAA6C;AAC7C,2FAAyE;AAOzE;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,YAAoB,EACpB,aAAqB,EACrB,aAAuB;IAEvB,+DAA+D;IAC/D,MAAM,cAAc,GAA0B,EAAE,CAAA;IAEhD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,0BAA0B,aAAa,iBAAiB,CAAC,CAAA;KAC1E;IACD,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE,EAAE;QAC9C,MAAM,IAAI,KAAK,CACb,0BAA0B,aAAa,2BAA2B,CACnE,CAAA;KACF;IACD,sFAAsF;IACtF,aAAa,GAAG,gBAAS,CAAC,aAAa,CAAC,CAAA;IACxC,aAAa,GAAG,cAAO,CAAC,aAAa,CAAC,CAAA;IAEtC;;;;;;;;;;;;;;;;;;MAkBE;IACF,KAAK,IAAI,IAAI,IAAI,aAAa,EAAE;QAC9B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,iBAAiB,CAAC,CAAA;SAC/C;QACD,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE;YACrC,sFAAsF;YACtF,IAAI,GAAG,gBAAS,CAAC,IAAI,CAAC,CAAA;YACtB,IAAI,GAAG,cAAO,CAAC,IAAI,CAAC,CAAA;YACpB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;gBACnC,MAAM,IAAI,KAAK,CACb,sBAAsB,aAAa,2CAA2C,IAAI,EAAE,CACrF,CAAA;aACF;YAED,mFAAmF;YACnF,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;YAClD,yDAAqB,CAAC,UAAU,CAAC,CAAA;YAEjC;;;;;;;;;cASE;YACF,cAAc,CAAC,IAAI,CAAC;gBAClB,gBAAgB,EAAE,IAAI;gBACtB,cAAc,EAAE,WAAI,CAAC,YAAY,EAAE,UAAU,CAAC;aAC/C,CAAC,CAAA;SACH;aAAM;YACL,uDAAuD;YACvD,YAAK,CAAC,YAAY,IAAI,kDAAkD,CAAC,CAAA;SAC1E;KACF;IACD,OAAO,cAAc,CAAA;AACvB,CAAC;AA7ED,wDA6EC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/lib/internal/utils.d.ts b/node_modules/@actions/artifact/lib/internal/utils.d.ts index 8121049910..64b37f86bb 100644 --- a/node_modules/@actions/artifact/lib/internal/utils.d.ts +++ b/node_modules/@actions/artifact/lib/internal/utils.d.ts @@ -58,14 +58,6 @@ export declare function getArtifactUrl(): string; * Other information such as the headers, the response code and message might be useful, so this is displayed. */ export declare function displayHttpDiagnostics(response: IHttpClientResponse): void; -/** - * Scans the name of the artifact to make sure there are no illegal characters - */ -export declare function checkArtifactName(name: string): void; -/** - * Scans the name of the filePath used to make sure there are no illegal characters - */ -export declare function checkArtifactFilePath(path: string): void; export declare function createDirectoriesForArtifact(directories: string[]): Promise; export declare function createEmptyFilesForArtifact(emptyFilesToCreate: string[]): Promise; export declare function getFileSize(filePath: string): Promise; diff --git a/node_modules/@actions/artifact/lib/internal/utils.js b/node_modules/@actions/artifact/lib/internal/utils.js index 7313992a4d..8d3e2740e3 100644 --- a/node_modules/@actions/artifact/lib/internal/utils.js +++ b/node_modules/@actions/artifact/lib/internal/utils.js @@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.sleep = exports.getProperRetention = exports.rmFile = exports.getFileSize = exports.createEmptyFilesForArtifact = exports.createDirectoriesForArtifact = exports.displayHttpDiagnostics = exports.getArtifactUrl = exports.createHttpClient = exports.getUploadHeaders = exports.getDownloadHeaders = exports.getContentRange = exports.tryGetRetryAfterValueTimeInMilliseconds = exports.isThrottledStatusCode = exports.isRetryableStatusCode = exports.isForbiddenStatusCode = exports.isSuccessStatusCode = exports.getApiVersion = exports.parseEnvNumber = exports.getExponentialRetryTimeInMilliseconds = void 0; const core_1 = require("@actions/core"); const fs_1 = require("fs"); const http_client_1 = require("@actions/http-client"); @@ -28,7 +29,7 @@ function getExponentialRetryTimeInMilliseconds(retryCount) { const minTime = config_variables_1.getInitialRetryIntervalInMilliseconds() * config_variables_1.getRetryMultiplier() * retryCount; const maxTime = minTime * config_variables_1.getRetryMultiplier(); // returns a random number between the minTime (inclusive) and the maxTime (exclusive) - return Math.random() * (maxTime - minTime) + minTime; + return Math.trunc(Math.random() * (maxTime - minTime) + minTime); } exports.getExponentialRetryTimeInMilliseconds = getExponentialRetryTimeInMilliseconds; /** @@ -207,48 +208,6 @@ Header Information: ${JSON.stringify(response.message.headers, undefined, 2)} ###### End Diagnostic HTTP information ######`); } exports.displayHttpDiagnostics = displayHttpDiagnostics; -/** - * Invalid characters that cannot be in the artifact name or an uploaded file. Will be rejected - * from the server if attempted to be sent over. These characters are not allowed due to limitations with certain - * file systems such as NTFS. To maintain platform-agnostic behavior, all characters that are not supported by an - * individual filesystem/platform will not be supported on all fileSystems/platforms - * - * FilePaths can include characters such as \ and / which are not permitted in the artifact name alone - */ -const invalidArtifactFilePathCharacters = ['"', ':', '<', '>', '|', '*', '?']; -const invalidArtifactNameCharacters = [ - ...invalidArtifactFilePathCharacters, - '\\', - '/' -]; -/** - * Scans the name of the artifact to make sure there are no illegal characters - */ -function checkArtifactName(name) { - if (!name) { - throw new Error(`Artifact name: ${name}, is incorrectly provided`); - } - for (const invalidChar of invalidArtifactNameCharacters) { - if (name.includes(invalidChar)) { - throw new Error(`Artifact name is not valid: ${name}. Contains character: "${invalidChar}". Invalid artifact name characters include: ${invalidArtifactNameCharacters.toString()}.`); - } - } -} -exports.checkArtifactName = checkArtifactName; -/** - * Scans the name of the filePath used to make sure there are no illegal characters - */ -function checkArtifactFilePath(path) { - if (!path) { - throw new Error(`Artifact path: ${path}, is incorrectly provided`); - } - for (const invalidChar of invalidArtifactFilePathCharacters) { - if (path.includes(invalidChar)) { - throw new Error(`Artifact path is not valid: ${path}. Contains character: "${invalidChar}". Invalid characters include: ${invalidArtifactFilePathCharacters.toString()}.`); - } - } -} -exports.checkArtifactFilePath = checkArtifactFilePath; function createDirectoriesForArtifact(directories) { return __awaiter(this, void 0, void 0, function* () { for (const directory of directories) { diff --git a/node_modules/@actions/artifact/lib/internal/utils.js.map b/node_modules/@actions/artifact/lib/internal/utils.js.map index b17039d64d..6c8ab495a0 100644 --- a/node_modules/@actions/artifact/lib/internal/utils.js.map +++ b/node_modules/@actions/artifact/lib/internal/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,wCAAkD;AAClD,2BAAiC;AACjC,sDAA0D;AAC1D,oDAAiE;AAGjE,yDAM2B;AAE3B;;;GAGG;AACH,SAAgB,qCAAqC,CACnD,UAAkB;IAElB,IAAI,UAAU,GAAG,CAAC,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;KACrD;SAAM,IAAI,UAAU,KAAK,CAAC,EAAE;QAC3B,OAAO,wDAAqC,EAAE,CAAA;KAC/C;IAED,MAAM,OAAO,GACX,wDAAqC,EAAE,GAAG,qCAAkB,EAAE,GAAG,UAAU,CAAA;IAC7E,MAAM,OAAO,GAAG,OAAO,GAAG,qCAAkB,EAAE,CAAA;IAE9C,sFAAsF;IACtF,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,OAAO,CAAA;AACtD,CAAC;AAfD,sFAeC;A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gBAAgB,CAAC,CAAA;QAC/C,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,YAAY,GAAG,SAAS,EAAE;YACpD,cAAO,CACL,uGAAuG,YAAY,OAAO,CAC3H,CAAA;YACD,SAAS,GAAG,YAAY,CAAA;SACzB;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAnBD,gDAmBC;AAED,SAAsB,KAAK,CAAC,YAAoB;;QAC9C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAA;IAClE,CAAC;CAAA;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAkD;AAClD,2BAAiC;AACjC,sDAA0D;AAC1D,oDAAiE;AAGjE,yDAM2B;AAE3B;;;GAGG;AACH,SAAgB,qCAAqC,CACnD,UAAkB;IAElB,IAAI,UAAU,GAAG,CAAC,EAAE;QAClB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;KACrD;SAAM,IAAI,UAAU,KAAK,CAAC,EAAE;QAC3B,OAAO,wDAAqC,EAAE,CAAA;KAC/C;IAED,MAAM,OAAO,GACX,wDAAqC,EAAE,GAAG,qCAAkB,EAAE,GAAG,UAAU,CAAA;IAC7E,MAAM,OAAO,GAAG,OAAO,GAAG,qCAAkB,EAAE,CAAA;IAE9C,sFAAsF;IACtF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,CAAA;AAClE,CAAC;AAfD,sFAeC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;IACtC,IAAI,MAAM,CAAC,KA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c,CAAA;IAC9B,IAAI,gBAAgB,EAAE;QACpB,MAAM,YAAY,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAA;QAC/C,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,YAAY,GAAG,SAAS,EAAE;YACpD,cAAO,CACL,uGAAuG,YAAY,OAAO,CAC3H,CAAA;YACD,SAAS,GAAG,YAAY,CAAA;SACzB;KACF;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAnBD,gDAmBC;AAED,SAAsB,KAAK,CAAC,YAAoB;;QAC9C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAA;IAClE,CAAC;CAAA;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/@actions/artifact/package.json b/node_modules/@actions/artifact/package.json index 981aaf8950..6dd84aa236 100644 --- a/node_modules/@actions/artifact/package.json +++ b/node_modules/@actions/artifact/package.json @@ -1,6 +1,6 @@ { "name": "@actions/artifact", - "version": "0.5.2", + "version": "1.0.0", "preview": true, "description": "Actions artifact lib", "keywords": [ @@ -39,11 +39,11 @@ "dependencies": { "@actions/core": "^1.2.6", "@actions/http-client": "^1.0.11", - "@types/tmp": "^0.1.0", - "tmp": "^0.1.0", - "tmp-promise": "^2.0.2" + "tmp": "^0.2.1", + "tmp-promise": "^3.0.2" }, "devDependencies": { + "@types/tmp": "^0.2.1", "typescript": "^3.8.3" } } diff --git a/node_modules/@types/tmp/LICENSE b/node_modules/@types/tmp/LICENSE deleted file mode 100644 index 4b1ad51b2f..0000000000 --- a/node_modules/@types/tmp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/tmp/README.md b/node_modules/@types/tmp/README.md deleted file mode 100644 index 69f6ed5610..0000000000 --- a/node_modules/@types/tmp/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/tmp` - -# Summary -This package contains type definitions for tmp ( http://github.com/raszi/node-tmp ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tmp - -Additional Details - * Last updated: Mon, 01 Apr 2019 20:55:52 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Jared Klopper , Gyusun Yeom , Alan Plum . diff --git a/node_modules/@types/tmp/index.d.ts b/node_modules/@types/tmp/index.d.ts deleted file mode 100644 index b761fd3717..0000000000 --- a/node_modules/@types/tmp/index.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Type definitions for tmp 0.1 -// Project: http://github.com/raszi/node-tmp -// Definitions by: Jared Klopper -// Gyusun Yeom -// Alan Plum -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export interface TmpNameOptions { - prefix?: string; - postfix?: string; - template?: string; - dir?: string; - tries?: number; -} - -export interface FileOptions extends TmpNameOptions { - mode?: number; - keep?: boolean; - discardDescriptor?: boolean; - detachDescriptor?: boolean; -} - -export interface DirOptions extends TmpNameOptions { - mode?: number; - keep?: boolean; - unsafeCleanup?: boolean; -} - -export interface FileResult { - name: string; - fd: number; - removeCallback: () => void; -} - -export interface DirResult { - name: string; - removeCallback: () => void; -} - -export type FileCallback = ( - err: any, - name: string, - fd: number, - removeCallback: () => void -) => void; - -export type DirCallback = ( - err: any, - name: string, - removeCallback: () => void -) => void; - -export type TmpNameCallback = (err: any, name: string) => void; - -export function file(options: FileOptions, cb: FileCallback): void; -export function file(cb: FileCallback): void; - -export function fileSync(options?: FileOptions): FileResult; - -export function dir(options: DirOptions, cb: DirCallback): void; -export function dir(cb: DirCallback): void; - -export function dirSync(options?: DirOptions): DirResult; - -export function tmpName(options: TmpNameOptions, cb: TmpNameCallback): void; -export function tmpName(cb: TmpNameCallback): void; - -export function tmpNameSync(options?: TmpNameOptions): string; - -export function setGracefulCleanup(): void; diff --git a/node_modules/@types/tmp/package.json b/node_modules/@types/tmp/package.json deleted file mode 100644 index 7bc8899523..0000000000 --- a/node_modules/@types/tmp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@types/tmp", - "version": "0.1.0", - "description": "TypeScript definitions for tmp", - "license": "MIT", - "contributors": [ - { - "name": "Jared Klopper", - "url": "https://github.com/optical", - "githubUsername": "optical" - }, - { - "name": "Gyusun Yeom", - "url": "https://github.com/Perlmint", - "githubUsername": "Perlmint" - }, - { - "name": "Alan Plum", - "url": "https://github.com/pluma", - "githubUsername": "pluma" - } - ], - "main": "", - "types": "index", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/tmp" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "d148a6fe31794f2a5b222ae9d0f38d575acbb5e0fed205877913f4e52e33a357", - "typeScriptVersion": "2.0" -} \ No newline at end of file diff --git a/node_modules/tmp-promise/.circleci/config.yml b/node_modules/tmp-promise/.circleci/config.yml index 8c92782787..918b120891 100644 --- a/node_modules/tmp-promise/.circleci/config.yml +++ b/node_modules/tmp-promise/.circleci/config.yml @@ -1,53 +1,53 @@ -version: 2 - -common_steps: &common_steps - steps: - - checkout - - - run: - name: Install dependencies - command: npm install - - - run: - name: Run tests - command: npm run mocha - - - run: - name: Check Typescript types - command: npm run check-types - when: always - -jobs: - node-8: - docker: - - image: circleci/node:8 - - <<: *common_steps - - node-10: - docker: - - image: circleci/node:10 - - <<: *common_steps - - node-11: - docker: - - image: circleci/node:11 - - <<: *common_steps - - node-12: - docker: - - image: circleci/node:12 - - <<: *common_steps - -workflows: - version: 2 - - on-commit: - jobs: - - node-8 - - node-10 - - node-11 - - node-12 +version: 2 + +common_steps: &common_steps + steps: + - checkout + + - run: + name: Install dependencies + command: npm install + + - run: + name: Run tests + command: npm run mocha + + - run: + name: Check Typescript types + command: npm run check-types + when: always + +jobs: + node-8: + docker: + - image: circleci/node:8 + + <<: *common_steps + + node-10: + docker: + - image: circleci/node:10 + + <<: *common_steps + + node-11: + docker: + - image: circleci/node:11 + + <<: *common_steps + + node-12: + docker: + - image: circleci/node:12 + + <<: *common_steps + +workflows: + version: 2 + + on-commit: + jobs: + - node-8 + - node-10 + - node-11 + - node-12 diff --git a/node_modules/tmp-promise/README.md b/node_modules/tmp-promise/README.md index 3877eebafc..49f667f3c6 100644 --- a/node_modules/tmp-promise/README.md +++ b/node_modules/tmp-promise/README.md @@ -1,316 +1,316 @@ -# tmp-promise - -[![CircleCI](https://circleci.com/gh/benjamingr/tmp-promise.svg?style=svg)](https://circleci.com/gh/benjamingr/tmp-promise) -[![npm version](https://badge.fury.io/js/tmp-promise.svg)](https://badge.fury.io/js/tmp-promise) - -A simple utility for creating temporary files or directories. - -The [tmp](https://github.com/raszi/node-tmp) package with promises support. If you want to use `tmp` with `async/await` then this helper might be for you. - -This documentation is mostly copied from that package's - but with promise usage instead of callback usage adapted. - -## Installation - - npm i tmp-promise - -**Note:** Node.js 8+ is supported - older versions of Node.js are not supported by the Node.js foundation. If you need to use an older version of Node.js install tmp-promise@1.10 - - npm i tmp-promise@1.1.0 - -## About - -This adds promises support to a [widely used library][2]. This package is used to create temporary files and directories in a [Node.js][1] environment. - - -tmp-promise offers both an asynchronous and a synchronous API. For all API calls, all -the parameters are optional. - -Internally, tmp uses crypto for determining random file names, or, when using templates, a six letter random identifier. And just in case that you do not have that much entropy left on your system, tmp will fall back to pseudo random numbers. - -You can set whether you want to remove the temporary file on process exit or not, and the destination directory can also be set. - -tmp-promise also uses promise [disposers](http://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern) to provide a nice way to perform cleanup when you're done working with the files. - -## Usage (API Reference) - -### Asynchronous file creation - -Simple temporary file creation, the file will be closed and unlinked on process exit. - -With Node.js 10 and es - modules: - -```js -import { file } from 'tmp-promise' - -(async () => { - const {fd, path, cleanup} = await file(); - // work with file here in fd - cleanup(); -})(); -``` - -Or the older way: - -```javascript -var tmp = require('tmp-promise'); - -tmp.file().then(o => { - console.log("File: ", o.path); - console.log("Filedescriptor: ", o.fd); - - // If we don't need the file anymore we could manually call cleanup - // But that is not necessary if we didn't pass the keep option because the library - // will clean after itself. - o.cleanup(); -}); -``` - -Simple temporary file creation with a [disposer](http://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern): - -With Node.js 10 and es - modules: - -```js -import { withFile } from 'tmp-promise' - -withFile(async ({path, fd}) => { - // when this function returns or throws - release the file - await doSomethingWithFile(db); -}); -``` - -Or the older way: - -```js -tmp.withFile(o => { - console.log("File: ", o.path); - console.log("Filedescriptor: ", o.fd); - // the file remains opens until the below promise resolves - return somePromiseReturningFn(); -}).then(v => { - // file is closed here automatically, v is the value of somePromiseReturningFn -}); -``` - - -### Synchronous file creation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp-promise'); - -var tmpobj = tmp.fileSync(); -console.log("File: ", tmpobj.name); -console.log("Filedescriptor: ", tmpobj.fd); - -// If we don't need the file anymore we could manually call the removeCallback -// But that is not necessary if we didn't pass the keep option because the library -// will clean after itself. -tmpobj.removeCallback(); -``` - -Note that this might throw an exception if either the maximum limit of retries -for creating a temporary name fails, or, in case that you do not have the permission -to write to the directory where the temporary file should be created in. - -### Asynchronous directory creation - -Simple temporary directory creation, it will be removed on process exit. - -If the directory still contains items on process exit, then it won't be removed. - -```javascript -var tmp = require('tmp-promise'); - -tmp.dir().then(o => { - console.log("Dir: ", o.path); - - // Manual cleanup - o.cleanup(); -}); -``` - -If you want to cleanup the directory even when there are entries in it, then -you can pass the `unsafeCleanup` option when creating it. - -You can also use a [disposer](http://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern) here which takes care of cleanup automatically: - -```javascript -var tmp = require('tmp-promise'); - -tmp.withDir(o => { - console.log("Dir: ", o.path); - - // automatic cleanup when the below promise resolves - return somePromiseReturningFn(); -}).then(v => { - // the directory has been cleaned here -}); -``` - -### Synchronous directory creation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp-promise'); - -var tmpobj = tmp.dirSync(); -console.log("Dir: ", tmpobj.name); -// Manual cleanup -tmpobj.removeCallback(); -``` - -Note that this might throw an exception if either the maximum limit of retries -for creating a temporary name fails, or, in case that you do not have the permission -to write to the directory where the temporary directory should be created in. - -### Asynchronous filename generation - -It is possible with this library to generate a unique filename in the specified -directory. - -```javascript -var tmp = require('tmp-promise'); - -tmp.tmpName().then(path => { - console.log("Created temporary filename: ", path); -}); -``` - -### Synchronous filename generation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp-promise'); - -var name = tmp.tmpNameSync(); -console.log("Created temporary filename: ", name); -``` - -## Advanced usage - -### Asynchronous file creation - -Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`. - -```javascript -var tmp = require('tmp-promise'); - -tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }).then(o => { - console.log("File: ", o.path); - console.log("Filedescriptor: ", o.fd); -}); -``` - -### Synchronous file creation - -A synchronous version of the above. - -```javascript -var tmp = require('tmp-promise'); - -var tmpobj = tmp.fileSync({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }); -console.log("File: ", tmpobj.name); -console.log("Filedescriptor: ", tmpobj.fd); -``` - -### Asynchronous directory creation - -Creates a directory with mode `0755`, prefix will be `myTmpDir_`. - -```javascript -var tmp = require('tmp-promise'); - -tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }).then(o => { - console.log("Dir: ", o.path); -}); -``` - -### Synchronous directory creation - -Again, a synchronous version of the above. - -```javascript -var tmp = require('tmp-promise'); - -var tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' }); -console.log("Dir: ", tmpobj.name); -``` - - -### mkstemp like, asynchronously - -Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`. - -```javascript -var tmp = require('tmp-promise'); -tmp.dir({ template: '/tmp/tmp-XXXXXX' }).then(console.log); -``` - - -### mkstemp like, synchronously - -This will behave similarly to the asynchronous version. - -```javascript -var tmp = require('tmp-promise'); - -var tmpobj = tmp.dirSync({ template: '/tmp/tmp-XXXXXX' }); -console.log("Dir: ", tmpobj.name); -``` - -### Asynchronous filename generation - -The `tmpName()` function accepts the `prefix`, `postfix`, `dir`, etc. parameters also: - -```javascript -var tmp = require('tmp-promise'); - -tmp.tmpName({ template: '/tmp/tmp-XXXXXX' }).then(path => - console.log("Created temporary filename: ", path); -); -``` - -### Synchronous filename generation - -The `tmpNameSync()` function works similarly to `tmpName()`. - -```javascript -var tmp = require('tmp-promise'); -var tmpname = tmp.tmpNameSync({ template: '/tmp/tmp-XXXXXX' }); -console.log("Created temporary filename: ", tmpname); -``` - - -## Graceful cleanup - -One may want to cleanup the temporary files even when an uncaught exception -occurs. To enforce this, you can call the `setGracefulCleanup()` method: - -```javascript -var tmp = require('tmp'); - -tmp.setGracefulCleanup(); -``` - -## Options - -All options are optional :) - - * `mode`: the file mode to create with, it fallbacks to `0600` on file creation and `0700` on directory creation - * `prefix`: the optional prefix, fallbacks to `tmp-` if not provided - * `postfix`: the optional postfix, fallbacks to `.tmp` on file creation - * `template`: [`mkstemp`][3] like filename template, no default - * `dir`: the optional temporary directory, fallbacks to system default (guesses from environment) - * `tries`: how many times should the function try to get a unique filename before giving up, default `3` - * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false`, means delete - * Please keep in mind that it is recommended in this case to call the provided `cleanupCallback` function manually. - * `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false` - - - -[1]: http://nodejs.org/ -[2]: https://www.npmjs.com/browse/depended/tmp -[3]: http://www.kernel.org/doc/man-pages/online/pages/man3/mkstemp.3.html +# tmp-promise + +[![CircleCI](https://circleci.com/gh/benjamingr/tmp-promise.svg?style=svg)](https://circleci.com/gh/benjamingr/tmp-promise) +[![npm version](https://badge.fury.io/js/tmp-promise.svg)](https://badge.fury.io/js/tmp-promise) + +A simple utility for creating temporary files or directories. + +The [tmp](https://github.com/raszi/node-tmp) package with promises support. If you want to use `tmp` with `async/await` then this helper might be for you. + +This documentation is mostly copied from that package's - but with promise usage instead of callback usage adapted. + +## Installation + + npm i tmp-promise + +**Note:** Node.js 8+ is supported - older versions of Node.js are not supported by the Node.js foundation. If you need to use an older version of Node.js install tmp-promise@1.10 + + npm i tmp-promise@1.1.0 + +## About + +This adds promises support to a [widely used library][2]. This package is used to create temporary files and directories in a [Node.js][1] environment. + + +tmp-promise offers both an asynchronous and a synchronous API. For all API calls, all +the parameters are optional. + +Internally, tmp uses crypto for determining random file names, or, when using templates, a six letter random identifier. And just in case that you do not have that much entropy left on your system, tmp will fall back to pseudo random numbers. + +You can set whether you want to remove the temporary file on process exit or not, and the destination directory can also be set. + +tmp-promise also uses promise [disposers](http://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern) to provide a nice way to perform cleanup when you're done working with the files. + +## Usage (API Reference) + +### Asynchronous file creation + +Simple temporary file creation, the file will be closed and unlinked on process exit. + +With Node.js 10 and es - modules: + +```js +import { file } from 'tmp-promise' + +(async () => { + const {fd, path, cleanup} = await file(); + // work with file here in fd + cleanup(); +})(); +``` + +Or the older way: + +```javascript +var tmp = require('tmp-promise'); + +tmp.file().then(o => { + console.log("File: ", o.path); + console.log("Filedescriptor: ", o.fd); + + // If we don't need the file anymore we could manually call cleanup + // But that is not necessary if we didn't pass the keep option because the library + // will clean after itself. + o.cleanup(); +}); +``` + +Simple temporary file creation with a [disposer](http://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern): + +With Node.js 10 and es - modules: + +```js +import { withFile } from 'tmp-promise' + +withFile(async ({path, fd}) => { + // when this function returns or throws - release the file + await doSomethingWithFile(db); +}); +``` + +Or the older way: + +```js +tmp.withFile(o => { + console.log("File: ", o.path); + console.log("Filedescriptor: ", o.fd); + // the file remains opens until the below promise resolves + return somePromiseReturningFn(); +}).then(v => { + // file is closed here automatically, v is the value of somePromiseReturningFn +}); +``` + + +### Synchronous file creation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp-promise'); + +var tmpobj = tmp.fileSync(); +console.log("File: ", tmpobj.name); +console.log("Filedescriptor: ", tmpobj.fd); + +// If we don't need the file anymore we could manually call the removeCallback +// But that is not necessary if we didn't pass the keep option because the library +// will clean after itself. +tmpobj.removeCallback(); +``` + +Note that this might throw an exception if either the maximum limit of retries +for creating a temporary name fails, or, in case that you do not have the permission +to write to the directory where the temporary file should be created in. + +### Asynchronous directory creation + +Simple temporary directory creation, it will be removed on process exit. + +If the directory still contains items on process exit, then it won't be removed. + +```javascript +var tmp = require('tmp-promise'); + +tmp.dir().then(o => { + console.log("Dir: ", o.path); + + // Manual cleanup + o.cleanup(); +}); +``` + +If you want to cleanup the directory even when there are entries in it, then +you can pass the `unsafeCleanup` option when creating it. + +You can also use a [disposer](http://stackoverflow.com/questions/28915677/what-is-the-promise-disposer-pattern) here which takes care of cleanup automatically: + +```javascript +var tmp = require('tmp-promise'); + +tmp.withDir(o => { + console.log("Dir: ", o.path); + + // automatic cleanup when the below promise resolves + return somePromiseReturningFn(); +}).then(v => { + // the directory has been cleaned here +}); +``` + +### Synchronous directory creation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp-promise'); + +var tmpobj = tmp.dirSync(); +console.log("Dir: ", tmpobj.name); +// Manual cleanup +tmpobj.removeCallback(); +``` + +Note that this might throw an exception if either the maximum limit of retries +for creating a temporary name fails, or, in case that you do not have the permission +to write to the directory where the temporary directory should be created in. + +### Asynchronous filename generation + +It is possible with this library to generate a unique filename in the specified +directory. + +```javascript +var tmp = require('tmp-promise'); + +tmp.tmpName().then(path => { + console.log("Created temporary filename: ", path); +}); +``` + +### Synchronous filename generation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp-promise'); + +var name = tmp.tmpNameSync(); +console.log("Created temporary filename: ", name); +``` + +## Advanced usage + +### Asynchronous file creation + +Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`. + +```javascript +var tmp = require('tmp-promise'); + +tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }).then(o => { + console.log("File: ", o.path); + console.log("Filedescriptor: ", o.fd); +}); +``` + +### Synchronous file creation + +A synchronous version of the above. + +```javascript +var tmp = require('tmp-promise'); + +var tmpobj = tmp.fileSync({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }); +console.log("File: ", tmpobj.name); +console.log("Filedescriptor: ", tmpobj.fd); +``` + +### Asynchronous directory creation + +Creates a directory with mode `0755`, prefix will be `myTmpDir_`. + +```javascript +var tmp = require('tmp-promise'); + +tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }).then(o => { + console.log("Dir: ", o.path); +}); +``` + +### Synchronous directory creation + +Again, a synchronous version of the above. + +```javascript +var tmp = require('tmp-promise'); + +var tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' }); +console.log("Dir: ", tmpobj.name); +``` + + +### mkstemp like, asynchronously + +Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`. + +```javascript +var tmp = require('tmp-promise'); +tmp.dir({ template: '/tmp/tmp-XXXXXX' }).then(console.log); +``` + + +### mkstemp like, synchronously + +This will behave similarly to the asynchronous version. + +```javascript +var tmp = require('tmp-promise'); + +var tmpobj = tmp.dirSync({ template: '/tmp/tmp-XXXXXX' }); +console.log("Dir: ", tmpobj.name); +``` + +### Asynchronous filename generation + +The `tmpName()` function accepts the `prefix`, `postfix`, `dir`, etc. parameters also: + +```javascript +var tmp = require('tmp-promise'); + +tmp.tmpName({ template: '/tmp/tmp-XXXXXX' }).then(path => + console.log("Created temporary filename: ", path); +); +``` + +### Synchronous filename generation + +The `tmpNameSync()` function works similarly to `tmpName()`. + +```javascript +var tmp = require('tmp-promise'); +var tmpname = tmp.tmpNameSync({ template: '/tmp/tmp-XXXXXX' }); +console.log("Created temporary filename: ", tmpname); +``` + + +## Graceful cleanup + +One may want to cleanup the temporary files even when an uncaught exception +occurs. To enforce this, you can call the `setGracefulCleanup()` method: + +```javascript +var tmp = require('tmp'); + +tmp.setGracefulCleanup(); +``` + +## Options + +All options are optional :) + + * `mode`: the file mode to create with, it fallbacks to `0600` on file creation and `0700` on directory creation + * `prefix`: the optional prefix, fallbacks to `tmp-` if not provided + * `postfix`: the optional postfix, fallbacks to `.tmp` on file creation + * `template`: [`mkstemp`][3] like filename template, no default + * `dir`: the optional temporary directory, fallbacks to system default (guesses from environment) + * `tries`: how many times should the function try to get a unique filename before giving up, default `3` + * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false`, means delete + * Please keep in mind that it is recommended in this case to call the provided `cleanupCallback` function manually. + * `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false` + + + +[1]: http://nodejs.org/ +[2]: https://www.npmjs.com/browse/depended/tmp +[3]: http://www.kernel.org/doc/man-pages/online/pages/man3/mkstemp.3.html diff --git a/node_modules/tmp-promise/example-usage.js b/node_modules/tmp-promise/example-usage.js index 261421656f..1ea9ca5847 100644 --- a/node_modules/tmp-promise/example-usage.js +++ b/node_modules/tmp-promise/example-usage.js @@ -1,9 +1,9 @@ -var tmp = require("./index.js"); -var Promise = require("bluebird"); // just for delay, this works with native promises -// disposer -tmp.withFile((path) => { - console.log("Created at path", path); - return Promise.delay(1000); -}).then(() => { - console.log("File automatically disposed"); +var tmp = require("./index.js"); +var Promise = require("bluebird"); // just for delay, this works with native promises +// disposer +tmp.withFile((path) => { + console.log("Created at path", path); + return Promise.delay(1000); +}).then(() => { + console.log("File automatically disposed"); }); \ No newline at end of file diff --git a/node_modules/tmp-promise/index.d.ts b/node_modules/tmp-promise/index.d.ts index cffd32f3f0..055da8a097 100644 --- a/node_modules/tmp-promise/index.d.ts +++ b/node_modules/tmp-promise/index.d.ts @@ -1,27 +1,27 @@ -import { fileSync, dirSync, tmpNameSync, setGracefulCleanup } from "tmp"; -import { FileOptions, DirOptions, TmpNameOptions } from "tmp"; - -export interface DirectoryResult { - path: string; - cleanup(): Promise; -} - -export interface FileResult extends DirectoryResult { - fd: number; -} - -export function file(options?: FileOptions): Promise; -export function withFile( - fn: (result: FileResult) => Promise, - options?: FileOptions -): Promise; - -export function dir(options?: DirOptions): Promise; -export function withDir( - fn: (results: DirectoryResult) => Promise, - options?: DirOptions -): Promise; - -export function tmpName(options?: TmpNameOptions): Promise; - -export { fileSync, dirSync, tmpNameSync, setGracefulCleanup }; +import { fileSync, dirSync, tmpNameSync, setGracefulCleanup } from "tmp"; +import { FileOptions, DirOptions, TmpNameOptions } from "tmp"; + +export interface DirectoryResult { + path: string; + cleanup: () => Promise; +} + +export interface FileResult extends DirectoryResult { + fd: number; +} + +export function file(options?: FileOptions): Promise; +export function withFile( + fn: (result: FileResult) => Promise, + options?: FileOptions +): Promise; + +export function dir(options?: DirOptions): Promise; +export function withDir( + fn: (results: DirectoryResult) => Promise, + options?: DirOptions +): Promise; + +export function tmpName(options?: TmpNameOptions): Promise; + +export { fileSync, dirSync, tmpNameSync, setGracefulCleanup }; diff --git a/node_modules/tmp-promise/index.js b/node_modules/tmp-promise/index.js index 55d2a03971..0a39d0fa7a 100644 --- a/node_modules/tmp-promise/index.js +++ b/node_modules/tmp-promise/index.js @@ -1,48 +1,50 @@ -const {promisify} = require("util"); -const tmp = require("tmp"); - -// file -module.exports.fileSync = tmp.fileSync; -const fileWithOptions = promisify((options, cb) => - tmp.file(options, (err, path, fd, cleanup) => - err ? cb(err) : cb(undefined, { path, fd, cleanup: promisify(cleanup) }) - ) -); -module.exports.file = async (options) => fileWithOptions(options); - -module.exports.withFile = async function withFile(fn, options) { - const { path, fd, cleanup } = await module.exports.file(options); - try { - return await fn({ path, fd }); - } finally { - await cleanup(); - } -}; - - -// directory -module.exports.dirSync = tmp.dirSync; -const dirWithOptions = promisify((options, cb) => - tmp.dir(options, (err, path, cleanup) => - err ? cb(err) : cb(undefined, { path, cleanup: promisify(cleanup) }) - ) -); -module.exports.dir = async (options) => dirWithOptions(options); - -module.exports.withDir = async function withDir(fn, options) { - const { path, cleanup } = await module.exports.dir(options); - try { - return await fn({ path }); - } finally { - await cleanup(); - } -}; - - -// name generation -module.exports.tmpNameSync = tmp.tmpNameSync; -module.exports.tmpName = promisify(tmp.tmpName); - -module.exports.tmpdir = tmp.tmpdir; - -module.exports.setGracefulCleanup = tmp.setGracefulCleanup; +'use strict'; + +const { promisify } = require("util"); +const tmp = require("tmp"); + +// file +module.exports.fileSync = tmp.fileSync; +const fileWithOptions = promisify((options, cb) => + tmp.file(options, (err, path, fd, cleanup) => + err ? cb(err) : cb(undefined, { path, fd, cleanup: promisify(cleanup) }) + ) +); +module.exports.file = async (options) => fileWithOptions(options); + +module.exports.withFile = async function withFile(fn, options) { + const { path, fd, cleanup } = await module.exports.file(options); + try { + return await fn({ path, fd }); + } finally { + await cleanup(); + } +}; + + +// directory +module.exports.dirSync = tmp.dirSync; +const dirWithOptions = promisify((options, cb) => + tmp.dir(options, (err, path, cleanup) => + err ? cb(err) : cb(undefined, { path, cleanup: promisify(cleanup) }) + ) +); +module.exports.dir = async (options) => dirWithOptions(options); + +module.exports.withDir = async function withDir(fn, options) { + const { path, cleanup } = await module.exports.dir(options); + try { + return await fn({ path }); + } finally { + await cleanup(); + } +}; + + +// name generation +module.exports.tmpNameSync = tmp.tmpNameSync; +module.exports.tmpName = promisify(tmp.tmpName); + +module.exports.tmpdir = tmp.tmpdir; + +module.exports.setGracefulCleanup = tmp.setGracefulCleanup; diff --git a/node_modules/tmp-promise/index.test-d.ts b/node_modules/tmp-promise/index.test-d.ts index f60bd2e0ef..375f0ec089 100644 --- a/node_modules/tmp-promise/index.test-d.ts +++ b/node_modules/tmp-promise/index.test-d.ts @@ -1,31 +1,31 @@ -import { file, withFile, dir, withDir, tmpName } from "."; - -async function fileExample() { - const { path, fd, cleanup } = await file({ discardDescriptor: true }); - await cleanup(); - - await withFile( - async ({ path, fd, cleanup }) => { - console.log(fd); - await cleanup(); - }, - { discardDescriptor: true } - ); -} - -async function dirExample() { - const { path, cleanup } = await dir({ unsafeCleanup: true }); - await cleanup(); - - await withDir( - async ({ path, cleanup }) => { - console.log(path); - await cleanup(); - }, - { unsafeCleanup: true } - ); -} - -async function tmpNameExample() { - const name = await tmpName({ tries: 3 }); -} +import { file, withFile, dir, withDir, tmpName } from "."; + +async function fileExample() { + const { path, fd, cleanup } = await file({ discardDescriptor: true }); + await cleanup(); + + await withFile( + async ({ path, fd, cleanup }) => { + console.log(fd); + await cleanup(); + }, + { discardDescriptor: true } + ); +} + +async function dirExample() { + const { path, cleanup } = await dir({ unsafeCleanup: true }); + await cleanup(); + + await withDir( + async ({ path, cleanup }) => { + console.log(path); + await cleanup(); + }, + { unsafeCleanup: true } + ); +} + +async function tmpNameExample() { + const name = await tmpName({ tries: 3 }); +} diff --git a/node_modules/tmp-promise/package.json b/node_modules/tmp-promise/package.json index ceb347d3ea..029a1f9722 100644 --- a/node_modules/tmp-promise/package.json +++ b/node_modules/tmp-promise/package.json @@ -1,13 +1,14 @@ { "name": "tmp-promise", - "version": "2.1.1", + "version": "3.0.3", "description": "The tmp package with promises support and disposers.", "main": "index.js", "types": "index.d.ts", "scripts": { "mocha": "mocha", "check-types": "tsd", - "test": "npm run mocha && npm run check-types" + "test": "npm run mocha && npm run check-types", + "publish": "node publish" }, "keywords": [ "tmp", @@ -16,18 +17,18 @@ "mkdtemp", "mktemp" ], - "author": "Benjamin Gruenbaum and collaborators.", + "author": "Benjamin Gruenbaum and Collaborators.", "license": "MIT", "repository": { "type": "git", "url": "git://github.com/benjamingr/tmp-promise.git" }, "dependencies": { - "tmp": "0.1.0" + "tmp": "^0.2.0" }, "devDependencies": { - "@types/tmp": "^0.1.0", - "mocha": "^6.1.4", - "tsd": "^0.7.2" + "@types/tmp": "^0.2.0", + "mocha": "7.1.2", + "tsd": "0.11.0" } } diff --git a/node_modules/tmp-promise/publish.js b/node_modules/tmp-promise/publish.js new file mode 100644 index 0000000000..21feefa501 --- /dev/null +++ b/node_modules/tmp-promise/publish.js @@ -0,0 +1,8 @@ +'use strict'; + +const { execSync } = require('child_process'); +const { version } = require('./package'); + +execSync('npm run test'); +execSync(`git tag v${version}`); +execSync('npm publish'); \ No newline at end of file diff --git a/node_modules/tmp-promise/test.js b/node_modules/tmp-promise/test.js index e0c69fa8fa..eb956658b9 100644 --- a/node_modules/tmp-promise/test.js +++ b/node_modules/tmp-promise/test.js @@ -1,152 +1,153 @@ -const fs = require('fs') -const {promisify} = require('util') -const assert = require('assert') -const {extname} = require('path') - -const tmp = require('.') - -async function checkFileResult(result) { - assert.deepEqual(Object.keys(result).sort(), ['cleanup', 'fd', 'path']) - - const { path, fd, cleanup } = result - assert.ok(typeof path === 'string') - assert.ok(typeof fd === 'number') - assert.ok(typeof cleanup === 'function') - - // Check that the path is a fille. - assert.ok(fs.statSync(path).isFile()) - - // Check that the fd is correct and points to the file. - const message = 'hello there!' - fs.writeSync(fd, message) - fs.fdatasyncSync(fd) - assert.equal(fs.readFileSync(path), message) - - // Check that the cleanup works. - await cleanup() - assert.throws(() => fs.statSync(path)) -} - -describe('file()', function() -{ - context('when called without options', function() - { - it('creates the file, returns the expected result, and the cleanup function works', async function() - { - const result = await tmp.file() - await checkFileResult(result) - }) - }) - - context('when called with options', function() - { - it('creates the file, returns the expected result, and the cleanup function works', async function() - { - const prefix = 'myTmpDir_' - const result = await tmp.file({ prefix }) - await checkFileResult(result) - assert.ok(result.path.includes(prefix)) - }) - }) - - it('propagates errors', async function() { - try { - await tmp.file({ dir: 'nonexistent-path' }); - throw Error('Expected to throw'); - } catch (e) { - assert.ok(e.message.startsWith('ENOENT: no such file or directory')); - } - }); -}) - -async function checkDirResult(result) { - assert.deepEqual(Object.keys(result).sort(), ['cleanup', 'path']) - - const { path, cleanup } = result - assert.ok(typeof path === 'string') - assert.ok(typeof cleanup === 'function') - - assert.ok(fs.statSync(path).isDirectory()) - - await cleanup() - assert.throws(() => fs.statSync(path)) -} - -describe('dir()', function() -{ - context('when called without options', function() - { - it('creates the directory, returns the expected result, and the cleanup function works', async function() - { - const result = await tmp.dir() - await checkDirResult(result) - }) - }) - - context('when called with options', function() - { - it('creates the directory, returns the expected result, and the cleanup function works', async function() - { - const prefix = 'myTmpDir_' - const result = await tmp.dir({ prefix }) - await checkDirResult(result) - assert.ok(result.path.includes(prefix)) - }) - }) - - it('propagates errors', async function() { - try { - await tmp.dir({ dir: 'nonexistent-path' }); - throw Error('Expected to throw'); - } catch (e) { - assert.ok(e.message.startsWith('ENOENT: no such file or directory')); - } - }); -}) - -describe('withFile()', function() -{ - it("file doesn't exist after going out of scope", function() - { - var filepath - - return tmp.withFile(function(o) - { - filepath = o.path - - fs.accessSync(filepath) - assert.strictEqual(extname(filepath), '.txt') - }, {discardDescriptor: true, postfix: '.txt'}) - .then(function() - { - assert.throws(function() - { - fs.accessSync(filepath) - }, filepath + ' still exists') - }) - }) -}) - - -describe('withDir()', function() -{ - it("dir doesn't exist after going out of scope", function() - { - var filepath - - return tmp.withDir(function(o) - { - filepath = o.path - - fs.accessSync(filepath) - assert.strictEqual(extname(filepath), '.dir') - }, {postfix: '.dir'}) - .then(function() - { - assert.throws(function() - { - fs.accessSync(filepath) - }, filepath + ' still exists') - }) - }) -}) +'use strict'; + +const fs = require('fs') +const assert = require('assert') +const { extname } = require('path') + +const tmp = require('.') + +async function checkFileResult(result) { + assert.deepEqual(Object.keys(result).sort(), ['cleanup', 'fd', 'path']) + + const { path, fd, cleanup } = result + assert.ok(typeof path === 'string') + assert.ok(typeof fd === 'number') + assert.ok(typeof cleanup === 'function') + + // Check that the path is a fille. + assert.ok(fs.statSync(path).isFile()) + + // Check that the fd is correct and points to the file. + const message = 'hello there!' + fs.writeSync(fd, message) + fs.fdatasyncSync(fd) + assert.equal(fs.readFileSync(path), message) + + // Check that the cleanup works. + await cleanup() + assert.throws(() => fs.statSync(path)) +} + +describe('file()', function() +{ + context('when called without options', function() + { + it('creates the file, returns the expected result, and the cleanup function works', async function() + { + const result = await tmp.file() + await checkFileResult(result) + }) + }) + + context('when called with options', function() + { + it('creates the file, returns the expected result, and the cleanup function works', async function() + { + const prefix = 'myTmpDir_' + const result = await tmp.file({ prefix }) + await checkFileResult(result) + assert.ok(result.path.includes(prefix)) + }) + }) + + it('propagates errors', async function() { + try { + await tmp.file({ dir: 'nonexistent-path' }); + throw Error('Expected to throw'); + } catch (e) { + assert.ok(e.message.startsWith('ENOENT: no such file or directory')); + } + }); +}) + +async function checkDirResult(result) { + assert.deepEqual(Object.keys(result).sort(), ['cleanup', 'path']) + + const { path, cleanup } = result + assert.ok(typeof path === 'string') + assert.ok(typeof cleanup === 'function') + + assert.ok(fs.statSync(path).isDirectory()) + + await cleanup() + assert.throws(() => fs.statSync(path)) +} + +describe('dir()', function() +{ + context('when called without options', function() + { + it('creates the directory, returns the expected result, and the cleanup function works', async function() + { + const result = await tmp.dir() + await checkDirResult(result) + }) + }) + + context('when called with options', function() + { + it('creates the directory, returns the expected result, and the cleanup function works', async function() + { + const prefix = 'myTmpDir_' + const result = await tmp.dir({ prefix }) + await checkDirResult(result) + assert.ok(result.path.includes(prefix)) + }) + }) + + it('propagates errors', async function() { + try { + await tmp.dir({ dir: 'nonexistent-path' }); + throw Error('Expected to throw'); + } catch (e) { + assert.ok(e.message.startsWith('ENOENT: no such file or directory')); + } + }); +}) + +describe('withFile()', function() +{ + it("file doesn't exist after going out of scope", function() + { + var filepath + + return tmp.withFile(function(o) + { + filepath = o.path + + fs.accessSync(filepath) + assert.strictEqual(extname(filepath), '.txt') + }, {discardDescriptor: true, postfix: '.txt'}) + .then(function() + { + assert.throws(function() + { + fs.accessSync(filepath) + }, filepath + ' still exists') + }) + }) +}) + + +describe('withDir()', function() +{ + it("dir doesn't exist after going out of scope", function() + { + var filepath + + return tmp.withDir(function(o) + { + filepath = o.path + + fs.accessSync(filepath) + assert.strictEqual(extname(filepath), '.dir') + }, {postfix: '.dir'}) + .then(function() + { + assert.throws(function() + { + fs.accessSync(filepath) + }, filepath + ' still exists') + }) + }) +}) diff --git a/node_modules/tmp/CHANGELOG.md b/node_modules/tmp/CHANGELOG.md new file mode 100644 index 0000000000..0aa5488224 --- /dev/null +++ b/node_modules/tmp/CHANGELOG.md @@ -0,0 +1,288 @@ + + +## v0.2.1 (2020-04-28) + +#### :rocket: Enhancement +* [#252](https://github.com/raszi/node-tmp/pull/252) Closes [#250](https://github.com/raszi/node-tmp/issues/250): introduce tmpdir option for overriding the system tmp dir ([@silkentrance](https://github.com/silkentrance)) + +#### :house: Internal +* [#253](https://github.com/raszi/node-tmp/pull/253) Closes [#191](https://github.com/raszi/node-tmp/issues/191): generate changelog from pull requests using lerna-changelog ([@silkentrance](https://github.com/silkentrance)) + +#### Committers: 1 +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) + + +## v0.2.0 (2020-04-25) + +#### :rocket: Enhancement +* [#234](https://github.com/raszi/node-tmp/pull/234) feat: stabilize tmp for v0.2.0 release ([@silkentrance](https://github.com/silkentrance)) + +#### :bug: Bug Fix +* [#231](https://github.com/raszi/node-tmp/pull/231) Closes [#230](https://github.com/raszi/node-tmp/issues/230): regression after fix for #197 ([@silkentrance](https://github.com/silkentrance)) +* [#220](https://github.com/raszi/node-tmp/pull/220) Closes [#197](https://github.com/raszi/node-tmp/issues/197): return sync callback when using the sync interface, otherwise return the async callback ([@silkentrance](https://github.com/silkentrance)) +* [#193](https://github.com/raszi/node-tmp/pull/193) Closes [#192](https://github.com/raszi/node-tmp/issues/192): tmp must not exit the process on its own ([@silkentrance](https://github.com/silkentrance)) + +#### :memo: Documentation +* [#221](https://github.com/raszi/node-tmp/pull/221) Gh 206 document name option ([@silkentrance](https://github.com/silkentrance)) + +#### :house: Internal +* [#226](https://github.com/raszi/node-tmp/pull/226) Closes [#212](https://github.com/raszi/node-tmp/issues/212): enable direct name option test ([@silkentrance](https://github.com/silkentrance)) +* [#225](https://github.com/raszi/node-tmp/pull/225) Closes [#211](https://github.com/raszi/node-tmp/issues/211): existing tests must clean up after themselves ([@silkentrance](https://github.com/silkentrance)) +* [#224](https://github.com/raszi/node-tmp/pull/224) Closes [#217](https://github.com/raszi/node-tmp/issues/217): name tests must use tmpName ([@silkentrance](https://github.com/silkentrance)) +* [#223](https://github.com/raszi/node-tmp/pull/223) Closes [#214](https://github.com/raszi/node-tmp/issues/214): refactor tests and lib ([@silkentrance](https://github.com/silkentrance)) +* [#198](https://github.com/raszi/node-tmp/pull/198) Update dependencies to latest versions ([@matsev](https://github.com/matsev)) + +#### Committers: 2 +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) +- Mattias Severson ([@matsev](https://github.com/matsev)) + + +## v0.1.0 (2019-03-20) + +#### :rocket: Enhancement +* [#177](https://github.com/raszi/node-tmp/pull/177) fix: fail early if there is no tmp dir specified ([@silkentrance](https://github.com/silkentrance)) +* [#159](https://github.com/raszi/node-tmp/pull/159) Closes [#121](https://github.com/raszi/node-tmp/issues/121) ([@silkentrance](https://github.com/silkentrance)) +* [#161](https://github.com/raszi/node-tmp/pull/161) Closes [#155](https://github.com/raszi/node-tmp/issues/155) ([@silkentrance](https://github.com/silkentrance)) +* [#166](https://github.com/raszi/node-tmp/pull/166) fix: avoid relying on Node’s internals ([@addaleax](https://github.com/addaleax)) +* [#144](https://github.com/raszi/node-tmp/pull/144) prepend opts.dir || tmpDir to template if no path is given ([@silkentrance](https://github.com/silkentrance)) + +#### :bug: Bug Fix +* [#183](https://github.com/raszi/node-tmp/pull/183) Closes [#182](https://github.com/raszi/node-tmp/issues/182) fileSync takes empty string postfix option ([@gutte](https://github.com/gutte)) +* [#130](https://github.com/raszi/node-tmp/pull/130) Closes [#129](https://github.com/raszi/node-tmp/issues/129) install process listeners safely ([@silkentrance](https://github.com/silkentrance)) + +#### :memo: Documentation +* [#188](https://github.com/raszi/node-tmp/pull/188) HOTCloses [#187](https://github.com/raszi/node-tmp/issues/187): restore behaviour for #182 ([@silkentrance](https://github.com/silkentrance)) +* [#180](https://github.com/raszi/node-tmp/pull/180) fix gh-179: template no longer accepts arbitrary paths ([@silkentrance](https://github.com/silkentrance)) +* [#175](https://github.com/raszi/node-tmp/pull/175) docs: add `unsafeCleanup` option to jsdoc ([@kerimdzhanov](https://github.com/kerimdzhanov)) +* [#151](https://github.com/raszi/node-tmp/pull/151) docs: fix link to tmp-promise ([@silkentrance](https://github.com/silkentrance)) + +#### :house: Internal +* [#184](https://github.com/raszi/node-tmp/pull/184) test: add missing tests for #182 ([@silkentrance](https://github.com/silkentrance)) +* [#171](https://github.com/raszi/node-tmp/pull/171) chore: drop old NodeJS support ([@poppinlp](https://github.com/poppinlp)) +* [#170](https://github.com/raszi/node-tmp/pull/170) chore: update dependencies ([@raszi](https://github.com/raszi)) +* [#165](https://github.com/raszi/node-tmp/pull/165) test: add missing tests ([@raszi](https://github.com/raszi)) +* [#163](https://github.com/raszi/node-tmp/pull/163) chore: add lint npm task ([@raszi](https://github.com/raszi)) +* [#107](https://github.com/raszi/node-tmp/pull/107) chore: add coverage report ([@raszi](https://github.com/raszi)) +* [#141](https://github.com/raszi/node-tmp/pull/141) test: refactor tests for mocha ([@silkentrance](https://github.com/silkentrance)) +* [#154](https://github.com/raszi/node-tmp/pull/154) chore: change Travis configuration ([@raszi](https://github.com/raszi)) +* [#152](https://github.com/raszi/node-tmp/pull/152) fix: drop Node v0.6.0 ([@raszi](https://github.com/raszi)) + +#### Committers: 6 +- Anna Henningsen ([@addaleax](https://github.com/addaleax)) +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) +- Dan Kerimdzhanov ([@kerimdzhanov](https://github.com/kerimdzhanov)) +- Gustav Klingstedt ([@gutte](https://github.com/gutte)) +- KARASZI István ([@raszi](https://github.com/raszi)) +- PoppinL ([@poppinlp](https://github.com/poppinlp)) + + +## v0.0.33 (2017-08-12) + +#### :rocket: Enhancement +* [#147](https://github.com/raszi/node-tmp/pull/147) fix: with name option try at most once to get a unique tmp name ([@silkentrance](https://github.com/silkentrance)) + +#### :bug: Bug Fix +* [#149](https://github.com/raszi/node-tmp/pull/149) fix(fileSync): must honor detachDescriptor and discardDescriptor options ([@silkentrance](https://github.com/silkentrance)) +* [#119](https://github.com/raszi/node-tmp/pull/119) Closes [#115](https://github.com/raszi/node-tmp/issues/115) ([@silkentrance](https://github.com/silkentrance)) + +#### :memo: Documentation +* [#128](https://github.com/raszi/node-tmp/pull/128) Closes [#127](https://github.com/raszi/node-tmp/issues/127) add reference to tmp-promise ([@silkentrance](https://github.com/silkentrance)) + +#### :house: Internal +* [#135](https://github.com/raszi/node-tmp/pull/135) Closes [#133](https://github.com/raszi/node-tmp/issues/133), #134 ([@silkentrance](https://github.com/silkentrance)) +* [#123](https://github.com/raszi/node-tmp/pull/123) docs: update tmp.js MIT license header to 2017 ([@madnight](https://github.com/madnight)) +* [#122](https://github.com/raszi/node-tmp/pull/122) chore: add issue template ([@silkentrance](https://github.com/silkentrance)) + +#### Committers: 2 +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) +- Fabian Beuke ([@madnight](https://github.com/madnight)) + + +## v0.0.32 (2017-03-24) + +#### :memo: Documentation +* [#106](https://github.com/raszi/node-tmp/pull/106) doc: add proper JSDoc documentation ([@raszi](https://github.com/raszi)) + +#### :house: Internal +* [#111](https://github.com/raszi/node-tmp/pull/111) test: add Windows tests ([@binki](https://github.com/binki)) +* [#110](https://github.com/raszi/node-tmp/pull/110) chore: add AppVeyor ([@binki](https://github.com/binki)) +* [#105](https://github.com/raszi/node-tmp/pull/105) chore: use const where possible ([@raszi](https://github.com/raszi)) +* [#104](https://github.com/raszi/node-tmp/pull/104) style: fix various style issues ([@raszi](https://github.com/raszi)) + +#### Committers: 2 +- KARASZI István ([@raszi](https://github.com/raszi)) +- Nathan Phillip Brink ([@binki](https://github.com/binki)) + + +## v0.0.31 (2016-11-21) + +#### :rocket: Enhancement +* [#99](https://github.com/raszi/node-tmp/pull/99) feat: add next callback functionality ([@silkentrance](https://github.com/silkentrance)) +* [#94](https://github.com/raszi/node-tmp/pull/94) feat: add options to control descriptor management ([@pabigot](https://github.com/pabigot)) + +#### :house: Internal +* [#101](https://github.com/raszi/node-tmp/pull/101) fix: Include files in the package.json ([@raszi](https://github.com/raszi)) + +#### Committers: 3 +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) +- KARASZI István ([@raszi](https://github.com/raszi)) +- Peter A. Bigot ([@pabigot](https://github.com/pabigot)) + + +## v0.0.30 (2016-11-01) + +#### :bug: Bug Fix +* [#96](https://github.com/raszi/node-tmp/pull/96) fix: constants for Node 6 ([@jnj16180340](https://github.com/jnj16180340)) +* [#98](https://github.com/raszi/node-tmp/pull/98) fix: garbage collector ([@Ari-H](https://github.com/Ari-H)) + +#### Committers: 2 +- Nate Johnson ([@jnj16180340](https://github.com/jnj16180340)) +- [@Ari-H](https://github.com/Ari-H) + + +## v0.0.29 (2016-09-18) + +#### :rocket: Enhancement +* [#87](https://github.com/raszi/node-tmp/pull/87) fix: replace calls to deprecated fs API functions ([@OlliV](https://github.com/OlliV)) + +#### :bug: Bug Fix +* [#70](https://github.com/raszi/node-tmp/pull/70) fix: prune `_removeObjects` correctly ([@joliss](https://github.com/joliss)) +* [#71](https://github.com/raszi/node-tmp/pull/71) Fix typo ([@gcampax](https://github.com/gcampax)) + +#### :memo: Documentation +* [#77](https://github.com/raszi/node-tmp/pull/77) docs: change mkstemps to mkstemp ([@thefourtheye](https://github.com/thefourtheye)) + +#### :house: Internal +* [#92](https://github.com/raszi/node-tmp/pull/92) chore: add Travis CI support for Node 6 ([@amilajack](https://github.com/amilajack)) +* [#79](https://github.com/raszi/node-tmp/pull/79) fix: remove unneeded require statement ([@whmountains](https://github.com/whmountains)) + +#### Committers: 6 +- Amila Welihinda ([@amilajack](https://github.com/amilajack)) +- Caleb Whiting ([@whmountains](https://github.com/whmountains)) +- Giovanni Campagna ([@gcampax](https://github.com/gcampax)) +- Jo Liss ([@joliss](https://github.com/joliss)) +- Olli Vanhoja ([@OlliV](https://github.com/OlliV)) +- Sakthipriyan Vairamani ([@thefourtheye](https://github.com/thefourtheye)) + + +## v0.0.28 (2015-09-27) + +#### :bug: Bug Fix +* [#63](https://github.com/raszi/node-tmp/pull/63) fix: delete for _rmdirRecursiveSync ([@voltrevo](https://github.com/voltrevo)) + +#### :memo: Documentation +* [#64](https://github.com/raszi/node-tmp/pull/64) docs: fix typo in the README ([@JTKnox91](https://github.com/JTKnox91)) + +#### :house: Internal +* [#67](https://github.com/raszi/node-tmp/pull/67) test: add node v4.0 v4.1 to travis config ([@raszi](https://github.com/raszi)) +* [#66](https://github.com/raszi/node-tmp/pull/66) chore(deps): update deps ([@raszi](https://github.com/raszi)) + +#### Committers: 3 +- Andrew Morris ([@voltrevo](https://github.com/voltrevo)) +- John T. Knox ([@JTKnox91](https://github.com/JTKnox91)) +- KARASZI István ([@raszi](https://github.com/raszi)) + + +## v0.0.27 (2015-08-15) + +#### :bug: Bug Fix +* [#60](https://github.com/raszi/node-tmp/pull/60) fix: unlinking when the file has been already removed ([@silkentrance](https://github.com/silkentrance)) + +#### :memo: Documentation +* [#55](https://github.com/raszi/node-tmp/pull/55) docs(README): update README ([@raszi](https://github.com/raszi)) + +#### :house: Internal +* [#56](https://github.com/raszi/node-tmp/pull/56) style(jshint): fix JSHint error ([@raszi](https://github.com/raszi)) +* [#53](https://github.com/raszi/node-tmp/pull/53) chore: update license attribute ([@pdehaan](https://github.com/pdehaan)) + +#### Committers: 3 +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) +- KARASZI István ([@raszi](https://github.com/raszi)) +- Peter deHaan ([@pdehaan](https://github.com/pdehaan)) + + +## v0.0.26 (2015-05-12) + +#### :rocket: Enhancement +* [#40](https://github.com/raszi/node-tmp/pull/40) Fix for #39 ([@silkentrance](https://github.com/silkentrance)) +* [#42](https://github.com/raszi/node-tmp/pull/42) Fix for #17 ([@silkentrance](https://github.com/silkentrance)) +* [#41](https://github.com/raszi/node-tmp/pull/41) Fix for #37 ([@silkentrance](https://github.com/silkentrance)) +* [#32](https://github.com/raszi/node-tmp/pull/32) add ability to customize file/dir names ([@shime](https://github.com/shime)) +* [#29](https://github.com/raszi/node-tmp/pull/29) tmp.file have responsibility to close file, not only unlink file ([@vhain](https://github.com/vhain)) + +#### :bug: Bug Fix +* [#51](https://github.com/raszi/node-tmp/pull/51) fix(windows): fix tempDir on windows ([@raszi](https://github.com/raszi)) +* [#49](https://github.com/raszi/node-tmp/pull/49) remove object from _removeObjects if cleanup fn is called Closes [#48](https://github.com/raszi/node-tmp/issues/48) ([@bmeck](https://github.com/bmeck)) + +#### :memo: Documentation +* [#45](https://github.com/raszi/node-tmp/pull/45) Fix for #44 ([@silkentrance](https://github.com/silkentrance)) + +#### :house: Internal +* [#34](https://github.com/raszi/node-tmp/pull/34) Create LICENSE ([@ScottWeinstein](https://github.com/ScottWeinstein)) + +#### Committers: 6 +- Bradley Farias ([@bmeck](https://github.com/bmeck)) +- Carsten Klein ([@silkentrance](https://github.com/silkentrance)) +- Hrvoje Šimić ([@shime](https://github.com/shime)) +- Juwan Yoo ([@vhain](https://github.com/vhain)) +- KARASZI István ([@raszi](https://github.com/raszi)) +- Scott Weinstein ([@ScottWeinstein](https://github.com/ScottWeinstein)) + + +## v0.0.24 (2014-07-11) + +#### :rocket: Enhancement +* [#25](https://github.com/raszi/node-tmp/pull/25) Added removeCallback passing ([@foxel](https://github.com/foxel)) + +#### Committers: 1 +- Andrey Kupreychik ([@foxel](https://github.com/foxel)) + + +## v0.0.23 (2013-12-03) + +#### :rocket: Enhancement +* [#21](https://github.com/raszi/node-tmp/pull/21) If we are not on node 0.8, don't register an uncaughtException handler ([@wibblymat](https://github.com/wibblymat)) + +#### Committers: 1 +- Mat Scales ([@wibblymat](https://github.com/wibblymat)) + + +## v0.0.22 (2013-11-29) + +#### :rocket: Enhancement +* [#19](https://github.com/raszi/node-tmp/pull/19) Rethrow only on node v0.8. ([@mcollina](https://github.com/mcollina)) + +#### Committers: 1 +- Matteo Collina ([@mcollina](https://github.com/mcollina)) + + +## v0.0.21 (2013-08-07) + +#### :bug: Bug Fix +* [#16](https://github.com/raszi/node-tmp/pull/16) Fix bug where we delete contents of symlinks ([@lightsofapollo](https://github.com/lightsofapollo)) + +#### Committers: 1 +- James Lal ([@lightsofapollo](https://github.com/lightsofapollo)) + + +## v0.0.17 (2013-04-09) + +#### :rocket: Enhancement +* [#9](https://github.com/raszi/node-tmp/pull/9) add recursive remove option ([@oscar-broman](https://github.com/oscar-broman)) + +#### Committers: 1 +- [@oscar-broman](https://github.com/oscar-broman) + + +## v0.0.14 (2012-08-26) + +#### :rocket: Enhancement +* [#5](https://github.com/raszi/node-tmp/pull/5) Export _getTmpName for temporary file name creation ([@joscha](https://github.com/joscha)) + +#### Committers: 1 +- Joscha Feth ([@joscha](https://github.com/joscha)) + + +## Previous Releases < v0.0.14 + +- no information available diff --git a/node_modules/tmp/README.md b/node_modules/tmp/README.md index 859a3d708f..bb20fb7be3 100644 --- a/node_modules/tmp/README.md +++ b/node_modules/tmp/README.md @@ -29,6 +29,8 @@ standard OS temporary directory, then you are free to override that as well. ## An Important Note on Compatibility +See the [CHANGELOG](./CHANGELOG.md) for more information. + ### Version 0.1.0 Since version 0.1.0, all support for node versions < 0.10.0 has been dropped. @@ -48,15 +50,6 @@ dependency to version 0.0.33. For node versions < 0.8 you must limit your node-tmp dependency to versions < 0.0.33. -### Node Versions < 8.12.0 - -The SIGINT handler will not work correctly with versions of NodeJS < 8.12.0. - -### Windows - -Signal handlers for SIGINT will not work. Pressing CTRL-C will leave behind -temporary files and directories. - ## How to install ```bash @@ -72,7 +65,7 @@ Please also check [API docs][4]. Simple temporary file creation, the file will be closed and unlinked on process exit. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) { if (err) throw err; @@ -92,9 +85,9 @@ tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) { A synchronous version of the above. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var tmpobj = tmp.fileSync(); +const tmpobj = tmp.fileSync(); console.log('File: ', tmpobj.name); console.log('Filedescriptor: ', tmpobj.fd); @@ -115,7 +108,7 @@ Simple temporary directory creation, it will be removed on process exit. If the directory still contains items on process exit, then it won't be removed. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.dir(function _tempDirCreated(err, path, cleanupCallback) { if (err) throw err; @@ -135,9 +128,9 @@ you can pass the `unsafeCleanup` option when creating it. A synchronous version of the above. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var tmpobj = tmp.dirSync(); +const tmpobj = tmp.dirSync(); console.log('Dir: ', tmpobj.name); // Manual cleanup tmpobj.removeCallback(); @@ -153,7 +146,7 @@ It is possible with this library to generate a unique filename in the specified directory. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.tmpName(function _tempNameGenerated(err, path) { if (err) throw err; @@ -167,9 +160,9 @@ tmp.tmpName(function _tempNameGenerated(err, path) { A synchronous version of the above. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var name = tmp.tmpNameSync(); +const name = tmp.tmpNameSync(); console.log('Created temporary filename: ', name); ``` @@ -180,9 +173,9 @@ console.log('Created temporary filename: ', name); Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) { +tmp.file({ mode: 0o644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) { if (err) throw err; console.log('File: ', path); @@ -195,9 +188,9 @@ tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileC A synchronous version of the above. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var tmpobj = tmp.fileSync({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }); +const tmpobj = tmp.fileSync({ mode: 0o644, prefix: 'prefix-', postfix: '.txt' }); console.log('File: ', tmpobj.name); console.log('Filedescriptor: ', tmpobj.fd); ``` @@ -219,7 +212,7 @@ descriptor. Two options control how the descriptor is managed: longer needed. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.file({ discardDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) { if (err) throw err; @@ -229,7 +222,7 @@ tmp.file({ discardDescriptor: true }, function _tempFileCreated(err, path, fd, c ``` ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.file({ detachDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) { if (err) throw err; @@ -246,9 +239,9 @@ tmp.file({ detachDescriptor: true }, function _tempFileCreated(err, path, fd, cl Creates a directory with mode `0755`, prefix will be `myTmpDir_`. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) { +tmp.dir({ mode: 0o750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) { if (err) throw err; console.log('Dir: ', path); @@ -260,9 +253,9 @@ tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) Again, a synchronous version of the above. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' }); +const tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' }); console.log('Dir: ', tmpobj.name); ``` @@ -275,7 +268,7 @@ require tmp to create your temporary filesystem object in a different place than default `tmp.tmpdir`. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.dir({ template: 'tmp-XXXXXX' }, function _tempDirCreated(err, path) { if (err) throw err; @@ -289,9 +282,9 @@ tmp.dir({ template: 'tmp-XXXXXX' }, function _tempDirCreated(err, path) { This will behave similarly to the asynchronous version. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var tmpobj = tmp.dirSync({ template: 'tmp-XXXXXX' }); +const tmpobj = tmp.dirSync({ template: 'tmp-XXXXXX' }); console.log('Dir: ', tmpobj.name); ``` @@ -303,9 +296,9 @@ The function accepts all standard options, e.g. `prefix`, `postfix`, `dir`, and You can also leave out the options altogether and just call the function with a callback as first parameter. ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); -var options = {}; +const options = {}; tmp.tmpName(options, function _tempNameGenerated(err, path) { if (err) throw err; @@ -320,19 +313,22 @@ The `tmpNameSync()` function works similarly to `tmpName()`. Again, you can leave out the options altogether and just invoke the function without any parameters. ```javascript -var tmp = require('tmp'); -var options = {}; -var tmpname = tmp.tmpNameSync(options); +const tmp = require('tmp'); +const options = {}; +const tmpname = tmp.tmpNameSync(options); console.log('Created temporary filename: ', tmpname); ``` ## Graceful cleanup -One may want to cleanup the temporary files even when an uncaught exception -occurs. To enforce this, you can call the `setGracefulCleanup()` method: +If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the +temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary +object removal. + +To enforce this, you can call the `setGracefulCleanup()` method: ```javascript -var tmp = require('tmp'); +const tmp = require('tmp'); tmp.setGracefulCleanup(); ``` @@ -341,15 +337,26 @@ tmp.setGracefulCleanup(); All options are optional :) - * `mode`: the file mode to create with, it fallbacks to `0600` on file creation and `0700` on directory creation - * `prefix`: the optional prefix, fallbacks to `tmp-` if not provided - * `postfix`: the optional postfix, fallbacks to `.tmp` on file creation - * `template`: [`mkstemp`][3] like filename template, no default - * `dir`: the optional temporary directory, fallbacks to system default (guesses from environment) + * `name`: a fixed name that overrides random name generation, the name must be relative and must not contain path segments + * `mode`: the file mode to create with, falls back to `0o600` on file creation and `0o700` on directory creation + * `prefix`: the optional prefix, defaults to `tmp` + * `postfix`: the optional postfix + * `template`: [`mkstemp`][3] like filename template, no default, can be either an absolute or a relative path that resolves + to a relative path of the system's default temporary directory, must include `XXXXXX` once for random name generation, e.g. + 'foo/bar/XXXXXX'. Absolute paths are also fine as long as they are relative to os.tmpdir(). + Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access, + as tmp will not check the availability of the path, nor will it establish the requested path for you. + * `dir`: the optional temporary directory that must be relative to the system's default temporary directory. + absolute paths are fine as long as they point to a location under the system's default temporary directory. + Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access, + as tmp will not check the availability of the path, nor will it establish the requested path for you. + * `tmpdir`: allows you to override the system's root tmp directory * `tries`: how many times should the function try to get a unique filename before giving up, default `3` * `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false` * In order to clean up, you will have to call the provided `cleanupCallback` function manually. * `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false` + * `detachDescriptor`: detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection + * `discardDescriptor`: discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection [1]: http://nodejs.org/ [2]: https://www.npmjs.com/browse/depended/tmp diff --git a/node_modules/tmp/lib/tmp.js b/node_modules/tmp/lib/tmp.js index 2bc50abb20..b41c29d4aa 100644 --- a/node_modules/tmp/lib/tmp.js +++ b/node_modules/tmp/lib/tmp.js @@ -13,9 +13,7 @@ const fs = require('fs'); const os = require('os'); const path = require('path'); const crypto = require('crypto'); -const _c = fs.constants && os.constants ? - { fs: fs.constants, os: os.constants } : - process.binding('constants'); +const _c = { fs: fs.constants, os: os.constants }; const rimraf = require('rimraf'); /* @@ -31,127 +29,25 @@ const CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR), + // constants are off on the windows platform and will not match the actual errno codes + IS_WIN32 = os.platform() === 'win32', EBADF = _c.EBADF || _c.os.errno.EBADF, ENOENT = _c.ENOENT || _c.os.errno.ENOENT, - DIR_MODE = 448 /* 0o700 */, - FILE_MODE = 384 /* 0o600 */, + DIR_MODE = 0o700 /* 448 */, + FILE_MODE = 0o600 /* 384 */, EXIT = 'exit', - SIGINT = 'SIGINT', - // this will hold the objects need to be removed on exit - _removeObjects = []; - -var - _gracefulCleanup = false; - -/** - * Random name generator based on crypto. - * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript - * - * @param {number} howMany - * @returns {string} the generated random name - * @private - */ -function _randomChars(howMany) { - var - value = [], - rnd = null; - - // make sure that we do not fail because we ran out of entropy - try { - rnd = crypto.randomBytes(howMany); - } catch (e) { - rnd = crypto.pseudoRandomBytes(howMany); - } - - for (var i = 0; i < howMany; i++) { - value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); - } - - return value.join(''); -} - -/** - * Checks whether the `obj` parameter is defined or not. - * - * @param {Object} obj - * @returns {boolean} true if the object is undefined - * @private - */ -function _isUndefined(obj) { - return typeof obj === 'undefined'; -} - -/** - * Parses the function arguments. - * - * This function helps to have optional arguments. - * - * @param {(Options|Function)} options - * @param {Function} callback - * @returns {Array} parsed arguments - * @private - */ -function _parseArguments(options, callback) { - /* istanbul ignore else */ - if (typeof options === 'function') { - return [{}, options]; - } - - /* istanbul ignore else */ - if (_isUndefined(options)) { - return [{}, callback]; - } + _removeObjects = [], - return [options, callback]; -} + // API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback + FN_RMDIR_SYNC = fs.rmdirSync.bind(fs), + FN_RIMRAF_SYNC = rimraf.sync; -/** - * Generates a new temporary name. - * - * @param {Object} opts - * @returns {string} the new random name according to opts - * @private - */ -function _generateTmpName(opts) { - - const tmpDir = _getTmpDir(); - - // fail early on missing tmp dir - if (isBlank(opts.dir) && isBlank(tmpDir)) { - throw new Error('No tmp dir specified'); - } - - /* istanbul ignore else */ - if (!isBlank(opts.name)) { - return path.join(opts.dir || tmpDir, opts.name); - } - - // mkstemps like template - // opts.template has already been guarded in tmpName() below - /* istanbul ignore else */ - if (opts.template) { - var template = opts.template; - // make sure that we prepend the tmp path if none was given - /* istanbul ignore else */ - if (path.basename(template) === template) - template = path.join(opts.dir || tmpDir, template); - return template.replace(TEMPLATE_PATTERN, _randomChars(6)); - } - - // prefix and postfix - const name = [ - (isBlank(opts.prefix) ? 'tmp-' : opts.prefix), - process.pid, - _randomChars(12), - (opts.postfix ? opts.postfix : '') - ].join(''); - - return path.join(opts.dir || tmpDir, name); -} +let + _gracefulCleanup = false; /** * Gets a temporary file name. @@ -160,20 +56,18 @@ function _generateTmpName(opts) { * @param {?tmpNameCallback} callback the callback function */ function tmpName(options, callback) { - var + const args = _parseArguments(options, callback), opts = args[0], - cb = args[1], - tries = !isBlank(opts.name) ? 1 : opts.tries || DEFAULT_TRIES; - - /* istanbul ignore else */ - if (isNaN(tries) || tries < 0) - return cb(new Error('Invalid tries')); + cb = args[1]; - /* istanbul ignore else */ - if (opts.template && !opts.template.match(TEMPLATE_PATTERN)) - return cb(new Error('Invalid template provided')); + try { + _assertAndSanitizeOptions(opts); + } catch (err) { + return cb(err); + } + let tries = opts.tries; (function _getUniqueName() { try { const name = _generateTmpName(opts); @@ -204,19 +98,13 @@ function tmpName(options, callback) { * @throws {Error} if the options are invalid or could not generate a filename */ function tmpNameSync(options) { - var + const args = _parseArguments(options), - opts = args[0], - tries = !isBlank(opts.name) ? 1 : opts.tries || DEFAULT_TRIES; + opts = args[0]; - /* istanbul ignore else */ - if (isNaN(tries) || tries < 0) - throw new Error('Invalid tries'); - - /* istanbul ignore else */ - if (opts.template && !opts.template.match(TEMPLATE_PATTERN)) - throw new Error('Invalid template provided'); + _assertAndSanitizeOptions(opts); + let tries = opts.tries; do { const name = _generateTmpName(opts); try { @@ -232,11 +120,11 @@ function tmpNameSync(options) { /** * Creates and opens a temporary file. * - * @param {(Options|fileCallback)} options the config options or the callback function + * @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined * @param {?fileCallback} callback */ function file(options, callback) { - var + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; @@ -248,34 +136,20 @@ function file(options, callback) { // create and open the file fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) { - /* istanbul ignore else */ + /* istanbu ignore else */ if (err) return cb(err); if (opts.discardDescriptor) { - return fs.close(fd, function _discardCallback(err) { - /* istanbul ignore else */ - if (err) { - // Low probability, and the file exists, so this could be - // ignored. If it isn't we certainly need to unlink the - // file, and if that fails too its error is more - // important. - try { - fs.unlinkSync(name); - } catch (e) { - if (!isENOENT(e)) { - err = e; - } - } - return cb(err); - } - cb(null, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts)); + return fs.close(fd, function _discardCallback(possibleErr) { + // the chance of getting an error on close here is rather low and might occur in the most edgiest cases only + return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); + } else { + // detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care + // about the descriptor + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); } - /* istanbul ignore else */ - if (opts.detachDescriptor) { - return cb(null, name, fd, _prepareTmpFileRemoveCallback(name, -1, opts)); - } - cb(null, name, fd, _prepareTmpFileRemoveCallback(name, fd, opts)); }); }); } @@ -288,7 +162,7 @@ function file(options, callback) { * @throws {Error} if cannot create a file */ function fileSync(options) { - var + const args = _parseArguments(options), opts = args[0]; @@ -304,7 +178,7 @@ function fileSync(options) { return { name: name, fd: fd, - removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts) + removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) }; } @@ -315,7 +189,7 @@ function fileSync(options) { * @param {?dirCallback} callback */ function dir(options, callback) { - var + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; @@ -330,7 +204,7 @@ function dir(options, callback) { /* istanbul ignore else */ if (err) return cb(err); - cb(null, name, _prepareTmpDirRemoveCallback(name, opts)); + cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); }); } @@ -343,7 +217,7 @@ function dir(options, callback) { * @throws {Error} if it cannot create a directory */ function dirSync(options) { - var + const args = _parseArguments(options), opts = args[0]; @@ -352,7 +226,7 @@ function dirSync(options) { return { name: name, - removeCallback: _prepareTmpDirRemoveCallback(name, opts) + removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) }; } @@ -365,15 +239,15 @@ function dirSync(options) { */ function _removeFileAsync(fdPath, next) { const _handler = function (err) { - if (err && !isENOENT(err)) { + if (err && !_isENOENT(err)) { // reraise any unanticipated error return next(err); } next(); - } + }; if (0 <= fdPath[0]) - fs.close(fdPath[0], function (err) { + fs.close(fdPath[0], function () { fs.unlink(fdPath[1], _handler); }); else fs.unlink(fdPath[1], _handler); @@ -386,117 +260,104 @@ function _removeFileAsync(fdPath, next) { * @private */ function _removeFileSync(fdPath) { + let rethrownException = null; try { if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); } catch (e) { // reraise any unanticipated error - if (!isEBADF(e) && !isENOENT(e)) throw e; + if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { fs.unlinkSync(fdPath[1]); } catch (e) { // reraise any unanticipated error - if (!isENOENT(e)) throw e; + if (!_isENOENT(e)) rethrownException = e; } } + if (rethrownException !== null) { + throw rethrownException; + } } /** * Prepares the callback for removal of the temporary file. * + * Returns either a sync callback or a async callback depending on whether + * fileSync or file was called, which is expressed by the sync parameter. + * * @param {string} name the path of the file * @param {number} fd file descriptor * @param {Object} opts - * @returns {fileCallback} + * @param {boolean} sync + * @returns {fileCallback | fileCallbackSync} * @private */ -function _prepareTmpFileRemoveCallback(name, fd, opts) { - const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name]); - const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], removeCallbackSync); +function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { + const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); + const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); - return removeCallback; -} - -/** - * Simple wrapper for rimraf. - * - * @param {string} dirPath - * @param {Function} next - * @private - */ -function _rimrafRemoveDirWrapper(dirPath, next) { - rimraf(dirPath, next); -} - -/** - * Simple wrapper for rimraf.sync. - * - * @param {string} dirPath - * @private - */ -function _rimrafRemoveDirSyncWrapper(dirPath, next) { - try { - return next(null, rimraf.sync(dirPath)); - } catch (err) { - return next(err); - } + return sync ? removeCallbackSync : removeCallback; } /** * Prepares the callback for removal of the temporary directory. * + * Returns either a sync callback or a async callback depending on whether + * tmpFileSync or tmpFile was called, which is expressed by the sync parameter. + * * @param {string} name * @param {Object} opts + * @param {boolean} sync * @returns {Function} the callback * @private */ -function _prepareTmpDirRemoveCallback(name, opts) { - const removeFunction = opts.unsafeCleanup ? _rimrafRemoveDirWrapper : fs.rmdir.bind(fs); - const removeFunctionSync = opts.unsafeCleanup ? _rimrafRemoveDirSyncWrapper : fs.rmdirSync.bind(fs); - const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name); - const removeCallback = _prepareRemoveCallback(removeFunction, name, removeCallbackSync); +function _prepareTmpDirRemoveCallback(name, opts, sync) { + const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); + const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; + const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); + const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); - return removeCallback; + return sync ? removeCallbackSync : removeCallback; } /** * Creates a guarded function wrapping the removeFunction call. * + * The cleanup callback is save to be called multiple times. + * Subsequent invocations will be ignored. + * * @param {Function} removeFunction - * @param {Object} arg - * @returns {Function} + * @param {string} fileOrDirName + * @param {boolean} sync + * @param {cleanupCallbackSync?} cleanupCallbackSync + * @returns {cleanupCallback | cleanupCallbackSync} * @private */ -function _prepareRemoveCallback(removeFunction, arg, cleanupCallbackSync) { - var called = false; +function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { + let called = false; + // if sync is true, the next parameter will be ignored return function _cleanupCallback(next) { - next = next || function () {}; + + /* istanbul ignore else */ if (!called) { + // remove cleanupCallback from cache const toRemove = cleanupCallbackSync || _cleanupCallback; const index = _removeObjects.indexOf(toRemove); /* istanbul ignore else */ if (index >= 0) _removeObjects.splice(index, 1); called = true; - // sync? - if (removeFunction.length === 1) { - try { - removeFunction(arg); - return next(null); - } - catch (err) { - // if no next is provided and since we are - // in silent cleanup mode on process exit, - // we will ignore the error - return next(err); - } - } else return removeFunction(arg, next); - } else return next(new Error('cleanup callback has already been called')); + if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { + return removeFunction(fileOrDirName); + } else { + return removeFunction(fileOrDirName, next || function() {}); + } + } }; } @@ -521,179 +382,315 @@ function _garbageCollector() { } /** - * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows. + * Random name generator based on crypto. + * Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript + * + * @param {number} howMany + * @returns {string} the generated random name + * @private */ -function isEBADF(error) { - return isExpectedError(error, -EBADF, 'EBADF'); +function _randomChars(howMany) { + let + value = [], + rnd = null; + + // make sure that we do not fail because we ran out of entropy + try { + rnd = crypto.randomBytes(howMany); + } catch (e) { + rnd = crypto.pseudoRandomBytes(howMany); + } + + for (var i = 0; i < howMany; i++) { + value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); + } + + return value.join(''); } /** - * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows. + * Helper which determines whether a string s is blank, that is undefined, or empty or null. + * + * @private + * @param {string} s + * @returns {Boolean} true whether the string s is blank, false otherwise */ -function isENOENT(error) { - return isExpectedError(error, -ENOENT, 'ENOENT'); +function _isBlank(s) { + return s === null || _isUndefined(s) || !s.trim(); } /** - * Helper to determine whether the expected error code matches the actual code and errno, - * which will differ between the supported node versions. - * - * - Node >= 7.0: - * error.code {string} - * error.errno {string|number} any numerical value will be negated + * Checks whether the `obj` parameter is defined or not. * - * - Node >= 6.0 < 7.0: - * error.code {string} - * error.errno {number} negated + * @param {Object} obj + * @returns {boolean} true if the object is undefined + * @private + */ +function _isUndefined(obj) { + return typeof obj === 'undefined'; +} + +/** + * Parses the function arguments. * - * - Node >= 4.0 < 6.0: introduces SystemError - * error.code {string} - * error.errno {number} negated + * This function helps to have optional arguments. * - * - Node >= 0.10 < 4.0: - * error.code {number} negated - * error.errno n/a + * @param {(Options|null|undefined|Function)} options + * @param {?Function} callback + * @returns {Array} parsed arguments + * @private */ -function isExpectedError(error, code, errno) { - return error.code === code || error.code === errno; +function _parseArguments(options, callback) { + /* istanbul ignore else */ + if (typeof options === 'function') { + return [{}, options]; + } + + /* istanbul ignore else */ + if (_isUndefined(options)) { + return [{}, callback]; + } + + // copy options so we do not leak the changes we make internally + const actualOptions = {}; + for (const key of Object.getOwnPropertyNames(options)) { + actualOptions[key] = options[key]; + } + + return [actualOptions, callback]; } /** - * Helper which determines whether a string s is blank, that is undefined, or empty or null. + * Generates a new temporary name. * + * @param {Object} opts + * @returns {string} the new random name according to opts * @private - * @param {string} s - * @returns {Boolean} true whether the string s is blank, false otherwise */ -function isBlank(s) { - return s === null || s === undefined || !s.trim(); +function _generateTmpName(opts) { + + const tmpDir = opts.tmpdir; + + /* istanbul ignore else */ + if (!_isUndefined(opts.name)) + return path.join(tmpDir, opts.dir, opts.name); + + /* istanbul ignore else */ + if (!_isUndefined(opts.template)) + return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + + // prefix and postfix + const name = [ + opts.prefix ? opts.prefix : 'tmp', + '-', + process.pid, + '-', + _randomChars(12), + opts.postfix ? '-' + opts.postfix : '' + ].join(''); + + return path.join(tmpDir, opts.dir, name); } /** - * Sets the graceful cleanup. + * Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing + * options. + * + * @param {Options} options + * @private */ -function setGracefulCleanup() { - _gracefulCleanup = true; +function _assertAndSanitizeOptions(options) { + + options.tmpdir = _getTmpDir(options); + + const tmpDir = options.tmpdir; + + /* istanbul ignore else */ + if (!_isUndefined(options.name)) + _assertIsRelative(options.name, 'name', tmpDir); + /* istanbul ignore else */ + if (!_isUndefined(options.dir)) + _assertIsRelative(options.dir, 'dir', tmpDir); + /* istanbul ignore else */ + if (!_isUndefined(options.template)) { + _assertIsRelative(options.template, 'template', tmpDir); + if (!options.template.match(TEMPLATE_PATTERN)) + throw new Error(`Invalid template, found "${options.template}".`); + } + /* istanbul ignore else */ + if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) + throw new Error(`Invalid tries, found "${options.tries}".`); + + // if a name was specified we will try once + options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1; + options.keep = !!options.keep; + options.detachDescriptor = !!options.detachDescriptor; + options.discardDescriptor = !!options.discardDescriptor; + options.unsafeCleanup = !!options.unsafeCleanup; + + // sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to + options.dir = _isUndefined(options.dir) ? '' : path.relative(tmpDir, _resolvePath(options.dir, tmpDir)); + options.template = _isUndefined(options.template) ? undefined : path.relative(tmpDir, _resolvePath(options.template, tmpDir)); + // sanitize further if template is relative to options.dir + options.template = _isBlank(options.template) ? undefined : path.relative(options.dir, options.template); + + // for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to + options.name = _isUndefined(options.name) ? undefined : _sanitizeName(options.name); + options.prefix = _isUndefined(options.prefix) ? '' : options.prefix; + options.postfix = _isUndefined(options.postfix) ? '' : options.postfix; } /** - * Returns the currently configured tmp dir from os.tmpdir(). + * Resolve the specified path name in respect to tmpDir. + * + * The specified name might include relative path components, e.g. ../ + * so we need to resolve in order to be sure that is is located inside tmpDir * + * @param name + * @param tmpDir + * @returns {string} * @private - * @returns {string} the currently configured tmp dir */ -function _getTmpDir() { - return os.tmpdir(); +function _resolvePath(name, tmpDir) { + const sanitizedName = _sanitizeName(name); + if (sanitizedName.startsWith(tmpDir)) { + return path.resolve(sanitizedName); + } else { + return path.resolve(path.join(tmpDir, sanitizedName)); + } } /** - * If there are multiple different versions of tmp in place, make sure that - * we recognize the old listeners. + * Sanitize the specified path name by removing all quote characters. * - * @param {Function} listener + * @param name + * @returns {string} * @private - * @returns {Boolean} true whether listener is a legacy listener */ -function _is_legacy_listener(listener) { - return (listener.name === '_exit' || listener.name === '_uncaughtExceptionThrown') - && listener.toString().indexOf('_garbageCollector();') > -1; +function _sanitizeName(name) { + if (_isBlank(name)) { + return name; + } + return name.replace(/["']/g, ''); } /** - * Safely install SIGINT listener. - * - * NOTE: this will only work on OSX and Linux. + * Asserts whether specified name is relative to the specified tmpDir. * + * @param {string} name + * @param {string} option + * @param {string} tmpDir + * @throws {Error} * @private */ -function _safely_install_sigint_listener() { - - const listeners = process.listeners(SIGINT); - const existingListeners = []; - for (let i = 0, length = listeners.length; i < length; i++) { - const lstnr = listeners[i]; - /* istanbul ignore else */ - if (lstnr.name === '_tmp$sigint_listener') { - existingListeners.push(lstnr); - process.removeListener(SIGINT, lstnr); - } +function _assertIsRelative(name, option, tmpDir) { + if (option === 'name') { + // assert that name is not absolute and does not contain a path + if (path.isAbsolute(name)) + throw new Error(`${option} option must not contain an absolute path, found "${name}".`); + // must not fail on valid . or .. or similar such constructs + let basename = path.basename(name); + if (basename === '..' || basename === '.' || basename !== name) + throw new Error(`${option} option must not contain a path, found "${name}".`); } - process.on(SIGINT, function _tmp$sigint_listener(doExit) { - for (let i = 0, length = existingListeners.length; i < length; i++) { - // let the existing listener do the garbage collection (e.g. jest sandbox) - try { - existingListeners[i](false); - } catch (err) { - // ignore - } - } - try { - // force the garbage collector even it is called again in the exit listener - _garbageCollector(); - } finally { - if (!!doExit) { - process.exit(0); - } + else { // if (option === 'dir' || option === 'template') { + // assert that dir or template are relative to tmpDir + if (path.isAbsolute(name) && !name.startsWith(tmpDir)) { + throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`); } - }); + let resolvedPath = _resolvePath(name, tmpDir); + if (!resolvedPath.startsWith(tmpDir)) + throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`); + } } /** - * Safely install process exit listener. + * Helper for testing against EBADF to compensate changes made to Node 7.x under Windows. * * @private */ -function _safely_install_exit_listener() { - const listeners = process.listeners(EXIT); +function _isEBADF(error) { + return _isExpectedError(error, -EBADF, 'EBADF'); +} - // collect any existing listeners - const existingListeners = []; - for (let i = 0, length = listeners.length; i < length; i++) { - const lstnr = listeners[i]; - /* istanbul ignore else */ - // TODO: remove support for legacy listeners once release 1.0.0 is out - if (lstnr.name === '_tmp$safe_listener' || _is_legacy_listener(lstnr)) { - // we must forget about the uncaughtException listener, hopefully it is ours - if (lstnr.name !== '_uncaughtExceptionThrown') { - existingListeners.push(lstnr); - } - process.removeListener(EXIT, lstnr); - } - } - // TODO: what was the data parameter good for? - process.addListener(EXIT, function _tmp$safe_listener(data) { - for (let i = 0, length = existingListeners.length; i < length; i++) { - // let the existing listener do the garbage collection (e.g. jest sandbox) - try { - existingListeners[i](data); - } catch (err) { - // ignore - } - } - _garbageCollector(); - }); +/** + * Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows. + * + * @private + */ +function _isENOENT(error) { + return _isExpectedError(error, -ENOENT, 'ENOENT'); } -_safely_install_exit_listener(); -_safely_install_sigint_listener(); +/** + * Helper to determine whether the expected error code matches the actual code and errno, + * which will differ between the supported node versions. + * + * - Node >= 7.0: + * error.code {string} + * error.errno {number} any numerical value will be negated + * + * CAVEAT + * + * On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT + * is no different here. + * + * @param {SystemError} error + * @param {number} errno + * @param {string} code + * @private + */ +function _isExpectedError(error, errno, code) { + return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; +} + +/** + * Sets the graceful cleanup. + * + * If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the + * temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary + * object removals. + */ +function setGracefulCleanup() { + _gracefulCleanup = true; +} + +/** + * Returns the currently configured tmp dir from os.tmpdir(). + * + * @private + * @param {?Options} options + * @returns {string} the currently configured tmp dir + */ +function _getTmpDir(options) { + return path.resolve(_sanitizeName(options && options.tmpdir || os.tmpdir())); +} + +// Install process exit listener +process.addListener(EXIT, _garbageCollector); /** * Configuration options. * * @typedef {Object} Options + * @property {?boolean} keep the temporary object (file or dir) will not be garbage collected * @property {?number} tries the number of tries before give up the name generation + * @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files * @property {?string} template the "mkstemp" like filename template - * @property {?string} name fix name - * @property {?string} dir the tmp directory to use + * @property {?string} name fixed name relative to tmpdir or the specified dir option + * @property {?string} dir tmp directory relative to the root tmp directory in use * @property {?string} prefix prefix for the generated name * @property {?string} postfix postfix for the generated name + * @property {?string} tmpdir the root tmp directory which overrides the os tmpdir * @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty + * @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection + * @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection */ /** * @typedef {Object} FileSyncObject * @property {string} name the name of the file - * @property {string} fd the file descriptor + * @property {string} fd the file descriptor or -1 if the fd has been discarded * @property {fileCallback} removeCallback the callback function to remove the file */ @@ -713,10 +710,18 @@ _safely_install_sigint_listener(); * @callback fileCallback * @param {?Error} err the error object if anything goes wrong * @param {string} name the temporary file name - * @param {number} fd the file descriptor + * @param {number} fd the file descriptor or -1 if the fd had been discarded * @param {cleanupCallback} fn the cleanup callback function */ +/** + * @callback fileCallbackSync + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + * @param {number} fd the file descriptor or -1 if the fd had been discarded + * @param {cleanupCallbackSync} fn the cleanup callback function + */ + /** * @callback dirCallback * @param {?Error} err the error object if anything goes wrong @@ -724,11 +729,24 @@ _safely_install_sigint_listener(); * @param {cleanupCallback} fn the cleanup callback function */ +/** + * @callback dirCallbackSync + * @param {?Error} err the error object if anything goes wrong + * @param {string} name the temporary file name + * @param {cleanupCallbackSync} fn the cleanup callback function + */ + /** * Removes the temporary created file or directory. * * @callback cleanupCallback - * @param {simpleCallback} [next] function to call after entry was removed + * @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed + */ + +/** + * Removes the temporary created file or directory. + * + * @callback cleanupCallbackSync */ /** @@ -740,7 +758,7 @@ _safely_install_sigint_listener(); // exporting all the needed methods -// evaluate os.tmpdir() lazily, mainly for simplifying testing but it also will +// evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will // allow users to reconfigure the temporary directory Object.defineProperty(module.exports, 'tmpdir', { enumerable: true, diff --git a/node_modules/tmp/node_modules/.bin/rimraf b/node_modules/tmp/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49dd..0000000000 --- a/node_modules/tmp/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/tmp/node_modules/rimraf/LICENSE b/node_modules/tmp/node_modules/rimraf/LICENSE deleted file mode 100644 index 19129e315f..0000000000 --- a/node_modules/tmp/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/tmp/node_modules/rimraf/README.md b/node_modules/tmp/node_modules/rimraf/README.md deleted file mode 100644 index 423b8cf854..0000000000 --- a/node_modules/tmp/node_modules/rimraf/README.md +++ /dev/null @@ -1,101 +0,0 @@ -[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) - -The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, [opts], callback)` - -The first parameter will be interpreted as a globbing pattern for files. If you -want to disable globbing you can do so with `opts.disableGlob` (defaults to -`false`). This might be handy, for instance, if you have filenames that contain -globbing wildcard characters. - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up, adding 100ms of wait - between each attempt. The default `maxBusyTries` is 3. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. -* `EMFILE` - Since `readdir` requires opening a file descriptor, it's - possible to hit `EMFILE` if too many file descriptors are in use. - In the sync case, there's nothing to be done for this. But in the - async case, rimraf will gradually back off with timeouts up to - `opts.emfileWait` ms, which defaults to 1000. - -## options - -* unlink, chmod, stat, lstat, rmdir, readdir, - unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync - - In order to use a custom file system library, you can override - specific fs functions on the options object. - - If any of these functions are present on the options object, then - the supplied function will be used instead of the default fs - method. - - Sync methods are only relevant for `rimraf.sync()`, of course. - - For example: - - ```javascript - var myCustomFS = require('some-custom-fs') - - rimraf('some-thing', myCustomFS, callback) - ``` - -* maxBusyTries - - If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered - on Windows systems, then rimraf will retry with a linear backoff - wait of 100ms longer on each try. The default maxBusyTries is 3. - - Only relevant for async usage. - -* emfileWait - - If an `EMFILE` error is encountered, then rimraf will retry - repeatedly with a linear backoff of 1ms longer on each try, until - the timeout counter hits this max. The default limit is 1000. - - If you repeatedly encounter `EMFILE` errors, then consider using - [graceful-fs](http://npm.im/graceful-fs) in your program. - - Only relevant for async usage. - -* glob - - Set to `false` to disable [glob](http://npm.im/glob) pattern - matching. - - Set to an object to pass options to the glob module. The default - glob options are `{ nosort: true, silent: true }`. - - Glob version 6 is used in this module. - - Relevant for both sync and async usage. - -* disableGlob - - Set to any non-falsey value to disable globbing entirely. - (Equivalent to setting `glob: false`.) - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf [ ...]` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/tmp/node_modules/rimraf/bin.js b/node_modules/tmp/node_modules/rimraf/bin.js deleted file mode 100755 index 0d1e17be70..0000000000 --- a/node_modules/tmp/node_modules/rimraf/bin.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var noglob = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg === '--no-glob' || arg === '-G') - noglob = true - else if (arg === '--glob' || arg === '-g') - noglob = false - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}) - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf [ ...]') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - log(' -G, --no-glob Do not expand glob patterns in arguments') - log(' -g, --glob Expand glob patterns in arguments (default)') - process.exit(help ? 0 : 1) -} else - go(0) - -function go (n) { - if (n >= args.length) - return - var options = {} - if (noglob) - options = { glob: false } - rimraf(args[n], options, function (er) { - if (er) - throw er - go(n+1) - }) -} diff --git a/node_modules/tmp/node_modules/rimraf/package.json b/node_modules/tmp/node_modules/rimraf/package.json deleted file mode 100644 index 26e05d85ea..0000000000 --- a/node_modules/tmp/node_modules/rimraf/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "rimraf", - "version": "2.7.1", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "repository": "git://github.com/isaacs/rimraf.git", - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags", - "test": "tap test/*.js" - }, - "bin": "./bin.js", - "dependencies": { - "glob": "^7.1.3" - }, - "files": [ - "LICENSE", - "README.md", - "bin.js", - "rimraf.js" - ], - "devDependencies": { - "mkdirp": "^0.5.1", - "tap": "^12.1.1" - } -} diff --git a/node_modules/tmp/node_modules/rimraf/rimraf.js b/node_modules/tmp/node_modules/rimraf/rimraf.js deleted file mode 100644 index a90ad029f3..0000000000 --- a/node_modules/tmp/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,372 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var assert = require("assert") -var path = require("path") -var fs = require("fs") -var glob = undefined -try { - glob = require("glob") -} catch (_err) { - // treat glob as optional. -} -var _0666 = parseInt('666', 8) - -var defaultGlobOpts = { - nosort: true, - silent: true -} - -// for EMFILE handling -var timeout = 0 - -var isWindows = (process.platform === "win32") - -function defaults (options) { - var methods = [ - 'unlink', - 'chmod', - 'stat', - 'lstat', - 'rmdir', - 'readdir' - ] - methods.forEach(function(m) { - options[m] = options[m] || fs[m] - m = m + 'Sync' - options[m] = options[m] || fs[m] - }) - - options.maxBusyTries = options.maxBusyTries || 3 - options.emfileWait = options.emfileWait || 1000 - if (options.glob === false) { - options.disableGlob = true - } - if (options.disableGlob !== true && glob === undefined) { - throw Error('glob dependency not found, set `options.disableGlob = true` if intentional') - } - options.disableGlob = options.disableGlob || false - options.glob = options.glob || defaultGlobOpts -} - -function rimraf (p, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert.equal(typeof cb, 'function', 'rimraf: callback function required') - assert(options, 'rimraf: invalid options argument provided') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - defaults(options) - - var busyTries = 0 - var errState = null - var n = 0 - - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]) - - options.lstat(p, function (er, stat) { - if (!er) - return afterGlob(null, [p]) - - glob(p, options.glob, afterGlob) - }) - - function next (er) { - errState = errState || er - if (--n === 0) - cb(errState) - } - - function afterGlob (er, results) { - if (er) - return cb(er) - - n = results.length - if (n === 0) - return cb() - - results.forEach(function (p) { - rimraf_(p, options, function CB (er) { - if (er) { - if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") && - busyTries < options.maxBusyTries) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, options, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(function () { - rimraf_(p, options, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - next(er) - }) - }) - } -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - // sunos lets the root user unlink directories, which is... weird. - // so we have to lstat here and make sure it's not a dir. - options.lstat(p, function (er, st) { - if (er && er.code === "ENOENT") - return cb(null) - - // Windows can EPERM on stat. Life is suffering. - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb) - - if (st && st.isDirectory()) - return rmdir(p, options, er, cb) - - options.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) - ? fixWinEPERM(p, options, er, cb) - : rmdir(p, options, er, cb) - if (er.code === "EISDIR") - return rmdir(p, options, er, cb) - } - return cb(er) - }) - }) -} - -function fixWinEPERM (p, options, er, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - if (er) - assert(er instanceof Error) - - options.chmod(p, _0666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - options.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, options, er, cb) - else - options.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, options, er) { - assert(p) - assert(options) - if (er) - assert(er instanceof Error) - - try { - options.chmodSync(p, _0666) - } catch (er2) { - if (er2.code === "ENOENT") - return - else - throw er - } - - try { - var stats = options.statSync(p) - } catch (er3) { - if (er3.code === "ENOENT") - return - else - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, options, er) - else - options.unlinkSync(p) -} - -function rmdir (p, options, originalEr, cb) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - assert(typeof cb === 'function') - - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - options.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, options, cb) { - assert(p) - assert(options) - assert(typeof cb === 'function') - - options.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return options.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), options, function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - options.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p, options) { - options = options || {} - defaults(options) - - assert(p, 'rimraf: missing path') - assert.equal(typeof p, 'string', 'rimraf: path should be a string') - assert(options, 'rimraf: missing options') - assert.equal(typeof options, 'object', 'rimraf: options should be object') - - var results - - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p] - } else { - try { - options.lstatSync(p) - results = [p] - } catch (er) { - results = glob.sync(p, options.glob) - } - } - - if (!results.length) - return - - for (var i = 0; i < results.length; i++) { - var p = results[i] - - try { - var st = options.lstatSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - - // Windows can EPERM on stat. Life is suffering. - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p, options, er) - } - - try { - // sunos lets the root user unlink directories, which is... weird. - if (st && st.isDirectory()) - rmdirSync(p, options, null) - else - options.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) - if (er.code !== "EISDIR") - throw er - - rmdirSync(p, options, er) - } - } -} - -function rmdirSync (p, options, originalEr) { - assert(p) - assert(options) - if (originalEr) - assert(originalEr instanceof Error) - - try { - options.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options) - } -} - -function rmkidsSync (p, options) { - assert(p) - assert(options) - options.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f), options) - }) - - // We only end up here once we got ENOTEMPTY at least once, and - // at this point, we are guaranteed to have removed all the kids. - // So, we know that it won't be ENOENT or ENOTDIR or anything else. - // try really hard to delete stuff on windows, because it has a - // PROFOUNDLY annoying habit of not closing handles promptly when - // files are deleted, resulting in spurious ENOTEMPTY errors. - var retries = isWindows ? 100 : 1 - var i = 0 - do { - var threw = true - try { - var ret = options.rmdirSync(p, options) - threw = false - return ret - } finally { - if (++i < retries && threw) - continue - } - } while (true) -} diff --git a/node_modules/tmp/package.json b/node_modules/tmp/package.json index 6d28fc73ab..d98a9108f3 100644 --- a/node_modules/tmp/package.json +++ b/node_modules/tmp/package.json @@ -1,8 +1,11 @@ { "name": "tmp", - "version": "0.1.0", + "version": "0.2.1", "description": "Temporary file and directory creator", "author": "KARASZI István (http://raszi.hu/)", + "contributors": [ + "Carsten Klein (https://github.com/silkentrance)" + ], "keywords": [ "temporary", "tmp", @@ -13,28 +16,40 @@ "tmpfile" ], "license": "MIT", - "repository": "raszi/node-tmp", + "repository": "https://github.com/raszi/node-tmp.git", "homepage": "http://github.com/raszi/node-tmp", "bugs": { "url": "http://github.com/raszi/node-tmp/issues" }, "engines": { - "node": ">=6" + "node": ">=8.17.0" }, "dependencies": { - "rimraf": "^2.6.3" + "rimraf": "^3.0.0" }, "devDependencies": { - "eslint": "^4.19.1", - "eslint-plugin-mocha": "^5.0.0", + "eslint": "^6.3.0", + "eslint-plugin-mocha": "^6.1.1", "istanbul": "^0.4.5", - "mocha": "^5.1.1" + "lerna-changelog": "^1.0.1", + "mocha": "^6.2.0" }, "main": "lib/tmp.js", "files": [ "lib/" ], + "changelog": { + "labels": { + "breaking": ":boom: Breaking Change", + "enhancement": ":rocket: Enhancement", + "bug": ":bug: Bug Fix", + "documentation": ":memo: Documentation", + "internal": ":house: Internal" + }, + "cacheDir": ".changelog" + }, "scripts": { + "changelog": "lerna-changelog", "lint": "eslint lib --env mocha test", "clean": "rm -Rf ./coverage", "test": "npm run clean && istanbul cover ./node_modules/mocha/bin/_mocha --report none --print none --dir ./coverage/json -u exports -R test/*-test.js && istanbul report --root ./coverage/json html && istanbul report text-summary",