initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
3
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/get-artifact.d.ts
generated
vendored
Normal file
3
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/get-artifact.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { GetArtifactResponse } from '../shared/interfaces';
|
||||
export declare function getArtifactPublic(artifactName: string, workflowRunId: number, repositoryOwner: string, repositoryName: string, token: string): Promise<GetArtifactResponse>;
|
||||
export declare function getArtifactInternal(artifactName: string): Promise<GetArtifactResponse>;
|
||||
122
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/get-artifact.js
generated
vendored
Normal file
122
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/get-artifact.js
generated
vendored
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (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.prototype.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) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getArtifactInternal = exports.getArtifactPublic = void 0;
|
||||
const github_1 = require("@actions/github");
|
||||
const plugin_retry_1 = require("@octokit/plugin-retry");
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const utils_1 = require("@actions/github/lib/utils");
|
||||
const retry_options_1 = require("./retry-options");
|
||||
const plugin_request_log_1 = require("@octokit/plugin-request-log");
|
||||
const util_1 = require("../shared/util");
|
||||
const user_agent_1 = require("../shared/user-agent");
|
||||
const artifact_twirp_client_1 = require("../shared/artifact-twirp-client");
|
||||
const generated_1 = require("../../generated");
|
||||
const errors_1 = require("../shared/errors");
|
||||
function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
|
||||
const opts = {
|
||||
log: undefined,
|
||||
userAgent: (0, user_agent_1.getUserAgentString)(),
|
||||
previews: undefined,
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
const getArtifactResp = yield github.request('GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts{?name}', {
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
name: artifactName
|
||||
});
|
||||
if (getArtifactResp.status !== 200) {
|
||||
throw new errors_1.InvalidResponseError(`Invalid response from GitHub API: ${getArtifactResp.status} (${(_a = getArtifactResp === null || getArtifactResp === void 0 ? void 0 : getArtifactResp.headers) === null || _a === void 0 ? void 0 : _a['x-github-request-id']})`);
|
||||
}
|
||||
if (getArtifactResp.data.artifacts.length === 0) {
|
||||
throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);
|
||||
}
|
||||
let artifact = getArtifactResp.data.artifacts[0];
|
||||
if (getArtifactResp.data.artifacts.length > 1) {
|
||||
artifact = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0];
|
||||
core.debug(`More than one artifact found for a single name, returning newest (id: ${artifact.id})`);
|
||||
}
|
||||
return {
|
||||
artifact: {
|
||||
name: artifact.name,
|
||||
id: artifact.id,
|
||||
size: artifact.size_in_bytes,
|
||||
createdAt: artifact.created_at ? new Date(artifact.created_at) : undefined
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.getArtifactPublic = getArtifactPublic;
|
||||
function getArtifactInternal(artifactName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
|
||||
const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
|
||||
const req = {
|
||||
workflowRunBackendId,
|
||||
workflowJobRunBackendId,
|
||||
nameFilter: generated_1.StringValue.create({ value: artifactName })
|
||||
};
|
||||
const res = yield artifactClient.ListArtifacts(req);
|
||||
if (res.artifacts.length === 0) {
|
||||
throw new errors_1.ArtifactNotFoundError(`Artifact not found for name: ${artifactName}
|
||||
Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
|
||||
For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md`);
|
||||
}
|
||||
let artifact = res.artifacts[0];
|
||||
if (res.artifacts.length > 1) {
|
||||
artifact = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0];
|
||||
core.debug(`More than one artifact found for a single name, returning newest (id: ${artifact.databaseId})`);
|
||||
}
|
||||
return {
|
||||
artifact: {
|
||||
name: artifact.name,
|
||||
id: Number(artifact.databaseId),
|
||||
size: Number(artifact.size),
|
||||
createdAt: artifact.createdAt
|
||||
? generated_1.Timestamp.toDate(artifact.createdAt)
|
||||
: undefined
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.getArtifactInternal = getArtifactInternal;
|
||||
//# sourceMappingURL=get-artifact.js.map
|
||||
1
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/get-artifact.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/get-artifact.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"get-artifact.js","sourceRoot":"","sources":["../../../src/internal/find/get-artifact.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA0C;AAC1C,wDAA2C;AAC3C,oDAAqC;AAErC,qDAA0E;AAC1E,mDAA+C;AAC/C,oEAAsD;AAEtD,yCAAqD;AACrD,qDAAuD;AACvD,2EAA2E;AAC3E,+CAA4E;AAC5E,6CAA4E;AAE5E,SAAsB,iBAAiB,CACrC,YAAoB,EACpB,aAAqB,EACrB,eAAuB,EACvB,cAAsB,EACtB,KAAa;;;QAEb,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,IAAA,+BAAe,EAAC,gBAAoB,CAAC,CAAA;QAEtE,MAAM,IAAI,GAAmB;YAC3B,GAAG,EAAE,SAAS;YACd,SAAS,EAAE,IAAA,+BAAk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AE,EAAE,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC/B,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAC3B,SAAS,EAAE,QAAQ,CAAC,SAAS;oBAC3B,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;oBACtC,CAAC,CAAC,SAAS;aACd;SACF,CAAA;IACH,CAAC;CAAA;AA7CD,kDA6CC"}
|
||||
3
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/list-artifacts.d.ts
generated
vendored
Normal file
3
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/list-artifacts.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import { ListArtifactsResponse } from '../shared/interfaces';
|
||||
export declare function listArtifactsPublic(workflowRunId: number, repositoryOwner: string, repositoryName: string, token: string, latest?: boolean): Promise<ListArtifactsResponse>;
|
||||
export declare function listArtifactsInternal(latest?: boolean): Promise<ListArtifactsResponse>;
|
||||
139
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/list-artifacts.js
generated
vendored
Normal file
139
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/list-artifacts.js
generated
vendored
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
"use strict";
|
||||
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) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.listArtifactsInternal = exports.listArtifactsPublic = void 0;
|
||||
const core_1 = require("@actions/core");
|
||||
const github_1 = require("@actions/github");
|
||||
const user_agent_1 = require("../shared/user-agent");
|
||||
const retry_options_1 = require("./retry-options");
|
||||
const utils_1 = require("@actions/github/lib/utils");
|
||||
const plugin_request_log_1 = require("@octokit/plugin-request-log");
|
||||
const plugin_retry_1 = require("@octokit/plugin-retry");
|
||||
const artifact_twirp_client_1 = require("../shared/artifact-twirp-client");
|
||||
const util_1 = require("../shared/util");
|
||||
const generated_1 = require("../../generated");
|
||||
// Limiting to 1000 for perf reasons
|
||||
const maximumArtifactCount = 1000;
|
||||
const paginationCount = 100;
|
||||
const maxNumberOfPages = maximumArtifactCount / paginationCount;
|
||||
function listArtifactsPublic(workflowRunId, repositoryOwner, repositoryName, token, latest = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
(0, core_1.info)(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`);
|
||||
let artifacts = [];
|
||||
const [retryOpts, requestOpts] = (0, retry_options_1.getRetryOptions)(utils_1.defaults);
|
||||
const opts = {
|
||||
log: undefined,
|
||||
userAgent: (0, user_agent_1.getUserAgentString)(),
|
||||
previews: undefined,
|
||||
retry: retryOpts,
|
||||
request: requestOpts
|
||||
};
|
||||
const github = (0, github_1.getOctokit)(token, opts, plugin_retry_1.retry, plugin_request_log_1.requestLog);
|
||||
let currentPageNumber = 1;
|
||||
const { data: listArtifactResponse } = yield github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
per_page: paginationCount,
|
||||
page: currentPageNumber
|
||||
});
|
||||
let numberOfPages = Math.ceil(listArtifactResponse.total_count / paginationCount);
|
||||
const totalArtifactCount = listArtifactResponse.total_count;
|
||||
if (totalArtifactCount > maximumArtifactCount) {
|
||||
(0, core_1.warning)(`Workflow run ${workflowRunId} has more than 1000 artifacts. Results will be incomplete as only the first ${maximumArtifactCount} artifacts will be returned`);
|
||||
numberOfPages = maxNumberOfPages;
|
||||
}
|
||||
// Iterate over the first page
|
||||
for (const artifact of listArtifactResponse.artifacts) {
|
||||
artifacts.push({
|
||||
name: artifact.name,
|
||||
id: artifact.id,
|
||||
size: artifact.size_in_bytes,
|
||||
createdAt: artifact.created_at ? new Date(artifact.created_at) : undefined
|
||||
});
|
||||
}
|
||||
// Iterate over any remaining pages
|
||||
for (currentPageNumber; currentPageNumber < numberOfPages; currentPageNumber++) {
|
||||
currentPageNumber++;
|
||||
(0, core_1.debug)(`Fetching page ${currentPageNumber} of artifact list`);
|
||||
const { data: listArtifactResponse } = yield github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: repositoryOwner,
|
||||
repo: repositoryName,
|
||||
run_id: workflowRunId,
|
||||
per_page: paginationCount,
|
||||
page: currentPageNumber
|
||||
});
|
||||
for (const artifact of listArtifactResponse.artifacts) {
|
||||
artifacts.push({
|
||||
name: artifact.name,
|
||||
id: artifact.id,
|
||||
size: artifact.size_in_bytes,
|
||||
createdAt: artifact.created_at
|
||||
? new Date(artifact.created_at)
|
||||
: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
if (latest) {
|
||||
artifacts = filterLatest(artifacts);
|
||||
}
|
||||
(0, core_1.info)(`Found ${artifacts.length} artifact(s)`);
|
||||
return {
|
||||
artifacts
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.listArtifactsPublic = listArtifactsPublic;
|
||||
function listArtifactsInternal(latest = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const artifactClient = (0, artifact_twirp_client_1.internalArtifactTwirpClient)();
|
||||
const { workflowRunBackendId, workflowJobRunBackendId } = (0, util_1.getBackendIdsFromToken)();
|
||||
const req = {
|
||||
workflowRunBackendId,
|
||||
workflowJobRunBackendId
|
||||
};
|
||||
const res = yield artifactClient.ListArtifacts(req);
|
||||
let artifacts = res.artifacts.map(artifact => ({
|
||||
name: artifact.name,
|
||||
id: Number(artifact.databaseId),
|
||||
size: Number(artifact.size),
|
||||
createdAt: artifact.createdAt
|
||||
? generated_1.Timestamp.toDate(artifact.createdAt)
|
||||
: undefined
|
||||
}));
|
||||
if (latest) {
|
||||
artifacts = filterLatest(artifacts);
|
||||
}
|
||||
(0, core_1.info)(`Found ${artifacts.length} artifact(s)`);
|
||||
return {
|
||||
artifacts
|
||||
};
|
||||
});
|
||||
}
|
||||
exports.listArtifactsInternal = listArtifactsInternal;
|
||||
/**
|
||||
* Filters a list of artifacts to only include the latest artifact for each name
|
||||
* @param artifacts The artifacts to filter
|
||||
* @returns The filtered list of artifacts
|
||||
*/
|
||||
function filterLatest(artifacts) {
|
||||
artifacts.sort((a, b) => b.id - a.id);
|
||||
const latestArtifacts = [];
|
||||
const seenArtifactNames = new Set();
|
||||
for (const artifact of artifacts) {
|
||||
if (!seenArtifactNames.has(artifact.name)) {
|
||||
latestArtifacts.push(artifact);
|
||||
seenArtifactNames.add(artifact.name);
|
||||
}
|
||||
}
|
||||
return latestArtifacts;
|
||||
}
|
||||
//# sourceMappingURL=list-artifacts.js.map
|
||||
1
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/list-artifacts.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/list-artifacts.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"list-artifacts.js","sourceRoot":"","sources":["../../../src/internal/find/list-artifacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAkD;AAClD,4CAA0C;AAE1C,qDAAuD;AACvD,mDAA+C;AAC/C,qDAA0E;AAC1E,oEAAsD;AACtD,wDAA2C;AAE3C,2EAA2E;AAC3E,yCAAqD;AACrD,+CAA+D;AAE/D,oCAAoC;AACpC,MAAM,oBAAoB,GAAG,IAAI,CAAA;AACjC,MAAM,eAAe,GAAG,GAAG,CAAA;AAC3B,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,eAAe,CAAA;AAE/D,SAAs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CAAA;IAC3C,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAChC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACzC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;YAC9B,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;SACrC;KACF;IACD,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
||||
7
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/retry-options.d.ts
generated
vendored
Normal file
7
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/retry-options.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { OctokitOptions } from '@octokit/core/dist-types/types';
|
||||
import { RequestRequestOptions } from '@octokit/types';
|
||||
export type RetryOptions = {
|
||||
doNotRetry?: number[];
|
||||
enabled?: boolean;
|
||||
};
|
||||
export declare function getRetryOptions(defaultOptions: OctokitOptions, retries?: number, exemptStatusCodes?: number[]): [RetryOptions, RequestRequestOptions | undefined];
|
||||
50
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/retry-options.js
generated
vendored
Normal file
50
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/retry-options.js
generated
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (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.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRetryOptions = void 0;
|
||||
const core = __importStar(require("@actions/core"));
|
||||
// Defaults for fetching artifacts
|
||||
const defaultMaxRetryNumber = 5;
|
||||
const defaultExemptStatusCodes = [400, 401, 403, 404, 422]; // https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
|
||||
function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) {
|
||||
var _a;
|
||||
if (retries <= 0) {
|
||||
return [{ enabled: false }, defaultOptions.request];
|
||||
}
|
||||
const retryOptions = {
|
||||
enabled: true
|
||||
};
|
||||
if (exemptStatusCodes.length > 0) {
|
||||
retryOptions.doNotRetry = exemptStatusCodes;
|
||||
}
|
||||
// The GitHub type has some defaults for `options.request`
|
||||
// see: https://github.com/actions/toolkit/blob/4fbc5c941a57249b19562015edbd72add14be93d/packages/github/src/utils.ts#L15
|
||||
// We pass these in here so they are not overridden.
|
||||
const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries });
|
||||
core.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : 'octokit default: [400, 401, 403, 404, 422]'})`);
|
||||
return [retryOptions, requestOptions];
|
||||
}
|
||||
exports.getRetryOptions = getRetryOptions;
|
||||
//# sourceMappingURL=retry-options.js.map
|
||||
1
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/retry-options.js.map
generated
vendored
Normal file
1
github/codeql-action-v2/node_modules/@actions/artifact/lib/internal/find/retry-options.js.map
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"retry-options.js","sourceRoot":"","sources":["../../../src/internal/find/retry-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAqC;AASrC,kCAAkC;AAClC,MAAM,qBAAqB,GAAG,CAAC,CAAA;AAC/B,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA,CAAC,4GAA4G;AAEvK,SAAgB,eAAe,CAC7B,cAA8B,EAC9B,UAAkB,qBAAqB,EACvC,oBAA8B,wBAAwB;;IAEtD,IAAI,OAAO,IAAI,CAAC,EAAE;QAChB,OAAO,CAAC,EAAC,OAAO,EAAE,KAAK,EAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;KAClD;IAED,MAAM,YAAY,GAAiB;QACjC,OAAO,EAAE,IAAI;KACd,CAAA;IAED,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;QAChC,YAAY,CAAC,UAAU,GAAG,iBAAiB,CAAA;KAC5C;IAED,0DAA0D;IAC1D,yHAAyH;IACzH,oDAAoD;IACpD,MAAM,cAAc,mCACf,cAAc,CAAC,OAAO,KACzB,OAAO,GACR,CAAA;IAED,IAAI,CAAC,KAAK,CACR,4CACE,cAAc,CAAC,OACjB,+BACE,MAAA,YAAY,CAAC,UAAU,mCAAI,4CAC7B,GAAG,CACJ,CAAA;IAED,OAAO,CAAC,YAAY,EAAE,cAAc,CAAC,CAAA;AACvC,CAAC;AAlCD,0CAkCC"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue