@actions/artifact 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE.md +8 -8
  2. package/README.md +213 -213
  3. package/lib/artifact-client.d.ts +10 -10
  4. package/lib/artifact-client.js +10 -10
  5. package/lib/internal/artifact-client.d.ts +41 -41
  6. package/lib/internal/artifact-client.js +164 -148
  7. package/lib/internal/artifact-client.js.map +1 -1
  8. package/lib/internal/config-variables.d.ts +11 -11
  9. package/lib/internal/config-variables.js +70 -70
  10. package/lib/internal/contracts.d.ts +67 -57
  11. package/lib/internal/contracts.js +2 -2
  12. package/lib/internal/download-http-client.d.ts +39 -39
  13. package/lib/internal/download-http-client.js +271 -274
  14. package/lib/internal/download-http-client.js.map +1 -1
  15. package/lib/internal/download-options.d.ts +7 -7
  16. package/lib/internal/download-options.js +2 -2
  17. package/lib/internal/download-response.d.ts +10 -10
  18. package/lib/internal/download-response.js +2 -2
  19. package/lib/internal/download-specification.d.ts +19 -19
  20. package/lib/internal/download-specification.js +60 -60
  21. package/lib/internal/http-manager.d.ts +12 -12
  22. package/lib/internal/http-manager.js +30 -30
  23. package/lib/internal/path-and-artifact-name-validation.d.ts +8 -0
  24. package/lib/internal/path-and-artifact-name-validation.js +66 -0
  25. package/lib/internal/path-and-artifact-name-validation.js.map +1 -0
  26. package/lib/internal/requestUtils.d.ts +3 -3
  27. package/lib/internal/requestUtils.js +74 -74
  28. package/lib/internal/status-reporter.d.ts +21 -22
  29. package/lib/internal/status-reporter.js +50 -63
  30. package/lib/internal/status-reporter.js.map +1 -1
  31. package/lib/internal/upload-gzip.d.ts +14 -14
  32. package/lib/internal/upload-gzip.js +107 -88
  33. package/lib/internal/upload-gzip.js.map +1 -1
  34. package/lib/internal/upload-http-client.d.ts +48 -48
  35. package/lib/internal/upload-http-client.js +393 -378
  36. package/lib/internal/upload-http-client.js.map +1 -1
  37. package/lib/internal/upload-options.d.ts +34 -34
  38. package/lib/internal/upload-options.js +2 -2
  39. package/lib/internal/upload-response.d.ts +19 -19
  40. package/lib/internal/upload-response.js +2 -2
  41. package/lib/internal/upload-specification.d.ts +11 -11
  42. package/lib/internal/upload-specification.js +87 -87
  43. package/lib/internal/upload-specification.js.map +1 -1
  44. package/lib/internal/utils.d.ts +66 -74
  45. package/lib/internal/utils.js +262 -303
  46. package/lib/internal/utils.js.map +1 -1
  47. package/package.json +49 -49
@@ -1,149 +1,165 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importStar = (this && this.__importStar) || function (mod) {
12
- if (mod && mod.__esModule) return mod;
13
- var result = {};
14
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15
- result["default"] = mod;
16
- return result;
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- const core = __importStar(require("@actions/core"));
20
- const upload_specification_1 = require("./upload-specification");
21
- const upload_http_client_1 = require("./upload-http-client");
22
- const utils_1 = require("./utils");
23
- const download_http_client_1 = require("./download-http-client");
24
- const download_specification_1 = require("./download-specification");
25
- const config_variables_1 = require("./config-variables");
26
- const path_1 = require("path");
27
- class DefaultArtifactClient {
28
- /**
29
- * Constructs a DefaultArtifactClient
30
- */
31
- static create() {
32
- return new DefaultArtifactClient();
33
- }
34
- /**
35
- * Uploads an artifact
36
- */
37
- uploadArtifact(name, files, rootDirectory, options) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- utils_1.checkArtifactName(name);
40
- // Get specification for the files being uploaded
41
- const uploadSpecification = upload_specification_1.getUploadSpecification(name, rootDirectory, files);
42
- const uploadResponse = {
43
- artifactName: name,
44
- artifactItems: [],
45
- size: 0,
46
- failedItems: []
47
- };
48
- const uploadHttpClient = new upload_http_client_1.UploadHttpClient();
49
- if (uploadSpecification.length === 0) {
50
- core.warning(`No files found that can be uploaded`);
51
- }
52
- else {
53
- // Create an entry for the artifact in the file container
54
- const response = yield uploadHttpClient.createArtifactInFileContainer(name, options);
55
- if (!response.fileContainerResourceUrl) {
56
- core.debug(response.toString());
57
- throw new Error('No URL provided by the Artifact Service to upload an artifact to');
58
- }
59
- core.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`);
60
- // Upload each of the files that were found concurrently
61
- const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options);
62
- // Update the size of the artifact to indicate we are done uploading
63
- // The uncompressed size is used for display when downloading a zip of the artifact from the UI
64
- yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name);
65
- core.info(`Finished uploading artifact ${name}. Reported size is ${uploadResult.uploadSize} bytes. There were ${uploadResult.failedItems.length} items that failed to upload`);
66
- uploadResponse.artifactItems = uploadSpecification.map(item => item.absoluteFilePath);
67
- uploadResponse.size = uploadResult.uploadSize;
68
- uploadResponse.failedItems = uploadResult.failedItems;
69
- }
70
- return uploadResponse;
71
- });
72
- }
73
- downloadArtifact(name, path, options) {
74
- return __awaiter(this, void 0, void 0, function* () {
75
- const downloadHttpClient = new download_http_client_1.DownloadHttpClient();
76
- const artifacts = yield downloadHttpClient.listArtifacts();
77
- if (artifacts.count === 0) {
78
- throw new Error(`Unable to find any artifacts for the associated workflow`);
79
- }
80
- const artifactToDownload = artifacts.value.find(artifact => {
81
- return artifact.name === name;
82
- });
83
- if (!artifactToDownload) {
84
- throw new Error(`Unable to find an artifact with the name: ${name}`);
85
- }
86
- const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);
87
- if (!path) {
88
- path = config_variables_1.getWorkSpaceDirectory();
89
- }
90
- path = path_1.normalize(path);
91
- path = path_1.resolve(path);
92
- // During upload, empty directories are rejected by the remote server so there should be no artifacts that consist of only empty directories
93
- const downloadSpecification = download_specification_1.getDownloadSpecification(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
94
- if (downloadSpecification.filesToDownload.length === 0) {
95
- core.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);
96
- }
97
- else {
98
- // Create all necessary directories recursively before starting any download
99
- yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
100
- core.info('Directory structure has been setup for the artifact');
101
- yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
102
- yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
103
- }
104
- return {
105
- artifactName: name,
106
- downloadPath: downloadSpecification.rootDownloadLocation
107
- };
108
- });
109
- }
110
- downloadAllArtifacts(path) {
111
- return __awaiter(this, void 0, void 0, function* () {
112
- const downloadHttpClient = new download_http_client_1.DownloadHttpClient();
113
- const response = [];
114
- const artifacts = yield downloadHttpClient.listArtifacts();
115
- if (artifacts.count === 0) {
116
- core.info('Unable to find any artifacts for the associated workflow');
117
- return response;
118
- }
119
- if (!path) {
120
- path = config_variables_1.getWorkSpaceDirectory();
121
- }
122
- path = path_1.normalize(path);
123
- path = path_1.resolve(path);
124
- let downloadedArtifacts = 0;
125
- while (downloadedArtifacts < artifacts.count) {
126
- const currentArtifactToDownload = artifacts.value[downloadedArtifacts];
127
- downloadedArtifacts += 1;
128
- // Get container entries for the specific artifact
129
- const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl);
130
- const downloadSpecification = download_specification_1.getDownloadSpecification(currentArtifactToDownload.name, items.value, path, true);
131
- if (downloadSpecification.filesToDownload.length === 0) {
132
- core.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);
133
- }
134
- else {
135
- yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
136
- yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
137
- yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
138
- }
139
- response.push({
140
- artifactName: currentArtifactToDownload.name,
141
- downloadPath: downloadSpecification.rootDownloadLocation
142
- });
143
- }
144
- return response;
145
- });
146
- }
147
- }
148
- exports.DefaultArtifactClient = DefaultArtifactClient;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importStar = (this && this.__importStar) || function (mod) {
12
+ if (mod && mod.__esModule) return mod;
13
+ var result = {};
14
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15
+ result["default"] = mod;
16
+ return result;
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ const core = __importStar(require("@actions/core"));
20
+ const upload_specification_1 = require("./upload-specification");
21
+ const upload_http_client_1 = require("./upload-http-client");
22
+ const utils_1 = require("./utils");
23
+ const path_and_artifact_name_validation_1 = require("./path-and-artifact-name-validation");
24
+ const download_http_client_1 = require("./download-http-client");
25
+ const download_specification_1 = require("./download-specification");
26
+ const config_variables_1 = require("./config-variables");
27
+ const path_1 = require("path");
28
+ class DefaultArtifactClient {
29
+ /**
30
+ * Constructs a DefaultArtifactClient
31
+ */
32
+ static create() {
33
+ return new DefaultArtifactClient();
34
+ }
35
+ /**
36
+ * Uploads an artifact
37
+ */
38
+ uploadArtifact(name, files, rootDirectory, options) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ core.info(`Starting artifact upload
41
+ 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`);
42
+ path_and_artifact_name_validation_1.checkArtifactName(name);
43
+ // Get specification for the files being uploaded
44
+ const uploadSpecification = upload_specification_1.getUploadSpecification(name, rootDirectory, files);
45
+ const uploadResponse = {
46
+ artifactName: name,
47
+ artifactItems: [],
48
+ size: 0,
49
+ failedItems: []
50
+ };
51
+ const uploadHttpClient = new upload_http_client_1.UploadHttpClient();
52
+ if (uploadSpecification.length === 0) {
53
+ core.warning(`No files found that can be uploaded`);
54
+ }
55
+ else {
56
+ // Create an entry for the artifact in the file container
57
+ const response = yield uploadHttpClient.createArtifactInFileContainer(name, options);
58
+ if (!response.fileContainerResourceUrl) {
59
+ core.debug(response.toString());
60
+ throw new Error('No URL provided by the Artifact Service to upload an artifact to');
61
+ }
62
+ core.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`);
63
+ core.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`);
64
+ // Upload each of the files that were found concurrently
65
+ const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options);
66
+ // Update the size of the artifact to indicate we are done uploading
67
+ // The uncompressed size is used for display when downloading a zip of the artifact from the UI
68
+ core.info(`File upload process has finished. Finalizing the artifact upload`);
69
+ yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name);
70
+ if (uploadResult.failedItems.length > 0) {
71
+ core.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`);
72
+ }
73
+ else {
74
+ core.info(`Artifact has been finalized. All files have been successfully uploaded!`);
75
+ }
76
+ core.info(`
77
+ The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes
78
+ 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
79
+
80
+ 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`);
81
+ uploadResponse.artifactItems = uploadSpecification.map(item => item.absoluteFilePath);
82
+ uploadResponse.size = uploadResult.uploadSize;
83
+ uploadResponse.failedItems = uploadResult.failedItems;
84
+ }
85
+ return uploadResponse;
86
+ });
87
+ }
88
+ downloadArtifact(name, path, options) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ const downloadHttpClient = new download_http_client_1.DownloadHttpClient();
91
+ const artifacts = yield downloadHttpClient.listArtifacts();
92
+ if (artifacts.count === 0) {
93
+ throw new Error(`Unable to find any artifacts for the associated workflow`);
94
+ }
95
+ const artifactToDownload = artifacts.value.find(artifact => {
96
+ return artifact.name === name;
97
+ });
98
+ if (!artifactToDownload) {
99
+ throw new Error(`Unable to find an artifact with the name: ${name}`);
100
+ }
101
+ const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);
102
+ if (!path) {
103
+ path = config_variables_1.getWorkSpaceDirectory();
104
+ }
105
+ path = path_1.normalize(path);
106
+ path = path_1.resolve(path);
107
+ // During upload, empty directories are rejected by the remote server so there should be no artifacts that consist of only empty directories
108
+ const downloadSpecification = download_specification_1.getDownloadSpecification(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
109
+ if (downloadSpecification.filesToDownload.length === 0) {
110
+ core.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);
111
+ }
112
+ else {
113
+ // Create all necessary directories recursively before starting any download
114
+ yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
115
+ core.info('Directory structure has been setup for the artifact');
116
+ yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
117
+ yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
118
+ }
119
+ return {
120
+ artifactName: name,
121
+ downloadPath: downloadSpecification.rootDownloadLocation
122
+ };
123
+ });
124
+ }
125
+ downloadAllArtifacts(path) {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ const downloadHttpClient = new download_http_client_1.DownloadHttpClient();
128
+ const response = [];
129
+ const artifacts = yield downloadHttpClient.listArtifacts();
130
+ if (artifacts.count === 0) {
131
+ core.info('Unable to find any artifacts for the associated workflow');
132
+ return response;
133
+ }
134
+ if (!path) {
135
+ path = config_variables_1.getWorkSpaceDirectory();
136
+ }
137
+ path = path_1.normalize(path);
138
+ path = path_1.resolve(path);
139
+ let downloadedArtifacts = 0;
140
+ while (downloadedArtifacts < artifacts.count) {
141
+ const currentArtifactToDownload = artifacts.value[downloadedArtifacts];
142
+ downloadedArtifacts += 1;
143
+ core.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`);
144
+ // Get container entries for the specific artifact
145
+ const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl);
146
+ const downloadSpecification = download_specification_1.getDownloadSpecification(currentArtifactToDownload.name, items.value, path, true);
147
+ if (downloadSpecification.filesToDownload.length === 0) {
148
+ core.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);
149
+ }
150
+ else {
151
+ yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
152
+ yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
153
+ yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
154
+ }
155
+ response.push({
156
+ artifactName: currentArtifactToDownload.name,
157
+ downloadPath: downloadSpecification.rootDownloadLocation
158
+ });
159
+ }
160
+ return response;
161
+ });
162
+ }
163
+ }
164
+ exports.DefaultArtifactClient = DefaultArtifactClient;
149
165
  //# sourceMappingURL=artifact-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../../src/internal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G,wCAAqB,EAAE,CAAA;aAC/B;YACD,IAAI,GAAG,gBAAS,CAAC,IAAI,CAAC,CAAA;YACtB,IAAI,GAAG,cAAO,CAAC,IAAI,CAAC,CAAA;YAEpB,IAAI,mBAAmB,GAAG,CAAC,CAAA;YAC3B,OAAO,mBAAmB,GAAG,SAAS,CAAC,KAAK,EAAE;gBAC5C,MAAM,yBAAyB,GAAG,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAA;gBACtE,mBAAmB,IAAI,CAAC,CAAA;gBAExB,kDAAkD;gBAClD,MAAM,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;AApMD,sDAoMC"}
1
+ {"version":3,"file":"artifact-client.js","sourceRoot":"","sources":["../../src/internal/artifact-client.ts"],"names":[],"mappings":";;;;;;;;;;;;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C,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"}
@@ -1,11 +1,11 @@
1
- export declare function getUploadFileConcurrency(): number;
2
- export declare function getUploadChunkSize(): number;
3
- export declare function getRetryLimit(): number;
4
- export declare function getRetryMultiplier(): number;
5
- export declare function getInitialRetryIntervalInMilliseconds(): number;
6
- export declare function getDownloadFileConcurrency(): number;
7
- export declare function getRuntimeToken(): string;
8
- export declare function getRuntimeUrl(): string;
9
- export declare function getWorkFlowRunId(): string;
10
- export declare function getWorkSpaceDirectory(): string;
11
- export declare function getRetentionDays(): string | undefined;
1
+ export declare function getUploadFileConcurrency(): number;
2
+ export declare function getUploadChunkSize(): number;
3
+ export declare function getRetryLimit(): number;
4
+ export declare function getRetryMultiplier(): number;
5
+ export declare function getInitialRetryIntervalInMilliseconds(): number;
6
+ export declare function getDownloadFileConcurrency(): number;
7
+ export declare function getRuntimeToken(): string;
8
+ export declare function getRuntimeUrl(): string;
9
+ export declare function getWorkFlowRunId(): string;
10
+ export declare function getWorkSpaceDirectory(): string;
11
+ export declare function getRetentionDays(): string | undefined;
@@ -1,71 +1,71 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // The number of concurrent uploads that happens at the same time
4
- function getUploadFileConcurrency() {
5
- return 2;
6
- }
7
- exports.getUploadFileConcurrency = getUploadFileConcurrency;
8
- // When uploading large files that can't be uploaded with a single http call, this controls
9
- // the chunk size that is used during upload
10
- function getUploadChunkSize() {
11
- return 8 * 1024 * 1024; // 8 MB Chunks
12
- }
13
- exports.getUploadChunkSize = getUploadChunkSize;
14
- // The maximum number of retries that can be attempted before an upload or download fails
15
- function getRetryLimit() {
16
- return 5;
17
- }
18
- exports.getRetryLimit = getRetryLimit;
19
- // With exponential backoff, the larger the retry count, the larger the wait time before another attempt
20
- // The retry multiplier controls by how much the backOff time increases depending on the number of retries
21
- function getRetryMultiplier() {
22
- return 1.5;
23
- }
24
- exports.getRetryMultiplier = getRetryMultiplier;
25
- // The initial wait time if an upload or download fails and a retry is being attempted for the first time
26
- function getInitialRetryIntervalInMilliseconds() {
27
- return 3000;
28
- }
29
- exports.getInitialRetryIntervalInMilliseconds = getInitialRetryIntervalInMilliseconds;
30
- // The number of concurrent downloads that happens at the same time
31
- function getDownloadFileConcurrency() {
32
- return 2;
33
- }
34
- exports.getDownloadFileConcurrency = getDownloadFileConcurrency;
35
- function getRuntimeToken() {
36
- const token = process.env['ACTIONS_RUNTIME_TOKEN'];
37
- if (!token) {
38
- throw new Error('Unable to get ACTIONS_RUNTIME_TOKEN env variable');
39
- }
40
- return token;
41
- }
42
- exports.getRuntimeToken = getRuntimeToken;
43
- function getRuntimeUrl() {
44
- const runtimeUrl = process.env['ACTIONS_RUNTIME_URL'];
45
- if (!runtimeUrl) {
46
- throw new Error('Unable to get ACTIONS_RUNTIME_URL env variable');
47
- }
48
- return runtimeUrl;
49
- }
50
- exports.getRuntimeUrl = getRuntimeUrl;
51
- function getWorkFlowRunId() {
52
- const workFlowRunId = process.env['GITHUB_RUN_ID'];
53
- if (!workFlowRunId) {
54
- throw new Error('Unable to get GITHUB_RUN_ID env variable');
55
- }
56
- return workFlowRunId;
57
- }
58
- exports.getWorkFlowRunId = getWorkFlowRunId;
59
- function getWorkSpaceDirectory() {
60
- const workspaceDirectory = process.env['GITHUB_WORKSPACE'];
61
- if (!workspaceDirectory) {
62
- throw new Error('Unable to get GITHUB_WORKSPACE env variable');
63
- }
64
- return workspaceDirectory;
65
- }
66
- exports.getWorkSpaceDirectory = getWorkSpaceDirectory;
67
- function getRetentionDays() {
68
- return process.env['GITHUB_RETENTION_DAYS'];
69
- }
70
- exports.getRetentionDays = getRetentionDays;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // The number of concurrent uploads that happens at the same time
4
+ function getUploadFileConcurrency() {
5
+ return 2;
6
+ }
7
+ exports.getUploadFileConcurrency = getUploadFileConcurrency;
8
+ // When uploading large files that can't be uploaded with a single http call, this controls
9
+ // the chunk size that is used during upload
10
+ function getUploadChunkSize() {
11
+ return 8 * 1024 * 1024; // 8 MB Chunks
12
+ }
13
+ exports.getUploadChunkSize = getUploadChunkSize;
14
+ // The maximum number of retries that can be attempted before an upload or download fails
15
+ function getRetryLimit() {
16
+ return 5;
17
+ }
18
+ exports.getRetryLimit = getRetryLimit;
19
+ // With exponential backoff, the larger the retry count, the larger the wait time before another attempt
20
+ // The retry multiplier controls by how much the backOff time increases depending on the number of retries
21
+ function getRetryMultiplier() {
22
+ return 1.5;
23
+ }
24
+ exports.getRetryMultiplier = getRetryMultiplier;
25
+ // The initial wait time if an upload or download fails and a retry is being attempted for the first time
26
+ function getInitialRetryIntervalInMilliseconds() {
27
+ return 3000;
28
+ }
29
+ exports.getInitialRetryIntervalInMilliseconds = getInitialRetryIntervalInMilliseconds;
30
+ // The number of concurrent downloads that happens at the same time
31
+ function getDownloadFileConcurrency() {
32
+ return 2;
33
+ }
34
+ exports.getDownloadFileConcurrency = getDownloadFileConcurrency;
35
+ function getRuntimeToken() {
36
+ const token = process.env['ACTIONS_RUNTIME_TOKEN'];
37
+ if (!token) {
38
+ throw new Error('Unable to get ACTIONS_RUNTIME_TOKEN env variable');
39
+ }
40
+ return token;
41
+ }
42
+ exports.getRuntimeToken = getRuntimeToken;
43
+ function getRuntimeUrl() {
44
+ const runtimeUrl = process.env['ACTIONS_RUNTIME_URL'];
45
+ if (!runtimeUrl) {
46
+ throw new Error('Unable to get ACTIONS_RUNTIME_URL env variable');
47
+ }
48
+ return runtimeUrl;
49
+ }
50
+ exports.getRuntimeUrl = getRuntimeUrl;
51
+ function getWorkFlowRunId() {
52
+ const workFlowRunId = process.env['GITHUB_RUN_ID'];
53
+ if (!workFlowRunId) {
54
+ throw new Error('Unable to get GITHUB_RUN_ID env variable');
55
+ }
56
+ return workFlowRunId;
57
+ }
58
+ exports.getWorkFlowRunId = getWorkFlowRunId;
59
+ function getWorkSpaceDirectory() {
60
+ const workspaceDirectory = process.env['GITHUB_WORKSPACE'];
61
+ if (!workspaceDirectory) {
62
+ throw new Error('Unable to get GITHUB_WORKSPACE env variable');
63
+ }
64
+ return workspaceDirectory;
65
+ }
66
+ exports.getWorkSpaceDirectory = getWorkSpaceDirectory;
67
+ function getRetentionDays() {
68
+ return process.env['GITHUB_RETENTION_DAYS'];
69
+ }
70
+ exports.getRetentionDays = getRetentionDays;
71
71
  //# sourceMappingURL=config-variables.js.map
@@ -1,57 +1,67 @@
1
- export interface ArtifactResponse {
2
- containerId: string;
3
- size: number;
4
- signedContent: string;
5
- fileContainerResourceUrl: string;
6
- type: string;
7
- name: string;
8
- url: string;
9
- }
10
- export interface CreateArtifactParameters {
11
- Type: string;
12
- Name: string;
13
- RetentionDays?: number;
14
- }
15
- export interface PatchArtifactSize {
16
- Size: number;
17
- }
18
- export interface PatchArtifactSizeSuccessResponse {
19
- containerId: number;
20
- size: number;
21
- signedContent: string;
22
- type: string;
23
- name: string;
24
- url: string;
25
- uploadUrl: string;
26
- }
27
- export interface UploadResults {
28
- uploadSize: number;
29
- totalSize: number;
30
- failedItems: string[];
31
- }
32
- export interface ListArtifactsResponse {
33
- count: number;
34
- value: ArtifactResponse[];
35
- }
36
- export interface QueryArtifactResponse {
37
- count: number;
38
- value: ContainerEntry[];
39
- }
40
- export interface ContainerEntry {
41
- containerId: number;
42
- scopeIdentifier: string;
43
- path: string;
44
- itemType: string;
45
- status: string;
46
- fileLength?: number;
47
- fileEncoding?: number;
48
- fileType?: number;
49
- dateCreated: string;
50
- dateLastModified: string;
51
- createdBy: string;
52
- lastModifiedBy: string;
53
- itemLocation: string;
54
- contentLocation: string;
55
- fileId?: number;
56
- contentId: string;
57
- }
1
+ export interface ArtifactResponse {
2
+ containerId: string;
3
+ size: number;
4
+ signedContent: string;
5
+ fileContainerResourceUrl: string;
6
+ type: string;
7
+ name: string;
8
+ url: string;
9
+ }
10
+ export interface CreateArtifactParameters {
11
+ Type: string;
12
+ Name: string;
13
+ RetentionDays?: number;
14
+ }
15
+ export interface PatchArtifactSize {
16
+ Size: number;
17
+ }
18
+ export interface PatchArtifactSizeSuccessResponse {
19
+ containerId: number;
20
+ size: number;
21
+ signedContent: string;
22
+ type: string;
23
+ name: string;
24
+ url: string;
25
+ uploadUrl: string;
26
+ }
27
+ export interface UploadResults {
28
+ /**
29
+ * The size in bytes of data that was transferred during the upload process to the actions backend service. This takes into account possible
30
+ * gzip compression to reduce the amount of data that needs to be transferred
31
+ */
32
+ uploadSize: number;
33
+ /**
34
+ * The raw size of the files that were specified for upload
35
+ */
36
+ totalSize: number;
37
+ /**
38
+ * An array of files that failed to upload
39
+ */
40
+ failedItems: string[];
41
+ }
42
+ export interface ListArtifactsResponse {
43
+ count: number;
44
+ value: ArtifactResponse[];
45
+ }
46
+ export interface QueryArtifactResponse {
47
+ count: number;
48
+ value: ContainerEntry[];
49
+ }
50
+ export interface ContainerEntry {
51
+ containerId: number;
52
+ scopeIdentifier: string;
53
+ path: string;
54
+ itemType: string;
55
+ status: string;
56
+ fileLength?: number;
57
+ fileEncoding?: number;
58
+ fileType?: number;
59
+ dateCreated: string;
60
+ dateLastModified: string;
61
+ createdBy: string;
62
+ lastModifiedBy: string;
63
+ itemLocation: string;
64
+ contentLocation: string;
65
+ fileId?: number;
66
+ contentId: string;
67
+ }