mirror of
https://github.com/github/codeql-action.git
synced 2025-12-08 08:48:19 +08:00
Compare commits
62 Commits
codeql-bun
...
v2.21.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddccb87388 | ||
|
|
d8cb5a2a0f | ||
|
|
27cb1e1de5 | ||
|
|
4818fdd8ec | ||
|
|
e548601be3 | ||
|
|
cc6542087a | ||
|
|
c95737bb43 | ||
|
|
41d2ffad87 | ||
|
|
650a85ef6d | ||
|
|
0de36d4594 | ||
|
|
0dfaf4ef65 | ||
|
|
d1a917f445 | ||
|
|
431174f620 | ||
|
|
3078f51bf0 | ||
|
|
d0c18ba23e | ||
|
|
724d64319a | ||
|
|
49aaa9a420 | ||
|
|
c21e1dd0da | ||
|
|
53bed11e0b | ||
|
|
ab8159054c | ||
|
|
765807bee7 | ||
|
|
bf2187592f | ||
|
|
c4c06786f2 | ||
|
|
59aaff8718 | ||
|
|
5897cf73c4 | ||
|
|
8e0b1c74b1 | ||
|
|
01b8760f90 | ||
|
|
74e25cdac8 | ||
|
|
eac8f8cd93 | ||
|
|
6a28655e3d | ||
|
|
2ca983a793 | ||
|
|
dd1128f4f1 | ||
|
|
f3a128e0fe | ||
|
|
6846be007d | ||
|
|
0e74cd1660 | ||
|
|
379f89dc53 | ||
|
|
253d9cf358 | ||
|
|
4254f3a4c1 | ||
|
|
9bfb9ba527 | ||
|
|
d4c26876d3 | ||
|
|
d6f9faae0d | ||
|
|
c459726691 | ||
|
|
a087b01cdd | ||
|
|
f3051ed54e | ||
|
|
860e98cc4a | ||
|
|
3ffd6c071a | ||
|
|
2d646a3990 | ||
|
|
a9313c9016 | ||
|
|
5f18c9ab80 | ||
|
|
2c22b37a68 | ||
|
|
c07fd68e12 | ||
|
|
c33f0b4fc7 | ||
|
|
04daf014b5 | ||
|
|
bb3bc25861 | ||
|
|
ac4145f467 | ||
|
|
87a64c9c4c | ||
|
|
897ddf2662 | ||
|
|
74714a34ca | ||
|
|
e982de4fb4 | ||
|
|
19c02a4d16 | ||
|
|
71c7e82837 | ||
|
|
8b733e71a6 |
69
.github/workflows/__language-aliases.yml
generated
vendored
Normal file
69
.github/workflows/__language-aliases.yml
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
# Warning: This file is generated automatically, and should not be modified.
|
||||
# Instead, please modify the template in the pr-checks directory and run:
|
||||
# (cd pr-checks; pip install ruamel.yaml@0.17.31 && python3 sync.py)
|
||||
# to regenerate this file.
|
||||
|
||||
name: PR Check - Language aliases
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GO111MODULE: auto
|
||||
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: 'true'
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/v2
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch: {}
|
||||
jobs:
|
||||
language-aliases:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
version: latest
|
||||
name: Language aliases
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
timeout-minutes: 45
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Prepare test
|
||||
id: prepare-test
|
||||
uses: ./.github/actions/prepare-test
|
||||
with:
|
||||
version: ${{ matrix.version }}
|
||||
use-all-platform-bundle: 'false'
|
||||
- name: Set environment variable for Swift enablement
|
||||
if: >-
|
||||
runner.os != 'Windows' && (
|
||||
matrix.version == '20220908' ||
|
||||
matrix.version == '20221211'
|
||||
)
|
||||
shell: bash
|
||||
run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: C#,java-kotlin,swift,typescript
|
||||
tools: ${{ steps.prepare-test.outputs.tools-url }}
|
||||
|
||||
- name: Check languages
|
||||
run: |
|
||||
expected_languages="csharp,java,swift,javascript"
|
||||
actual_languages=$(jq -r '.languages | join(",")' "$RUNNER_TEMP"/config)
|
||||
|
||||
if [ "$expected_languages" != "$actual_languages" ]; then
|
||||
echo "Resolved languages did not match expected list. " \
|
||||
"Expected languages: $expected_languages. Actual languages: $actual_languages."
|
||||
exit 1
|
||||
fi
|
||||
env:
|
||||
CODEQL_ACTION_TEST_MODE: true
|
||||
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@@ -73,7 +73,7 @@ jobs:
|
||||
needs: [check-codeql-versions]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest,windows-latest,macos-latest]
|
||||
os: [ubuntu-20.04,ubuntu-22.04,windows-2019,windows-2022,macos-11,macos-12,macos-13]
|
||||
tools: ${{ fromJson(needs.check-codeql-versions.outputs.versions) }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
||||
3
.github/workflows/update-dependencies.yml
vendored
3
.github/workflows/update-dependencies.yml
vendored
@@ -15,15 +15,16 @@ jobs:
|
||||
|
||||
- name: Remove PR label
|
||||
env:
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
REPOSITORY: '${{ github.repository }}'
|
||||
PR_NUMBER: '${{ github.event.pull_request.number }}'
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
run: |
|
||||
gh api "repos/$REPOSITORY/issues/$PR_NUMBER/labels/Update%20dependencies" -X DELETE
|
||||
|
||||
- name: Push updated dependencies
|
||||
env:
|
||||
BRANCH: '${{ github.head_ref }}'
|
||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||
run: |
|
||||
git fetch origin "$BRANCH" --depth=1
|
||||
git checkout "origin/$BRANCH"
|
||||
|
||||
@@ -17,8 +17,8 @@ def main():
|
||||
releases = json.loads(_RELEASE_FILE_PATH.read_text())
|
||||
|
||||
# Remove GHES version using a previous version numbering scheme.
|
||||
if "11.10.340" in releases:
|
||||
del releases["11.10.340"]
|
||||
if "11.10" in releases:
|
||||
del releases["11.10"]
|
||||
|
||||
oldest_supported_release = None
|
||||
newest_supported_release = semver.VersionInfo.parse(api_compatibility_data["maximumVersion"] + ".0")
|
||||
|
||||
18
CHANGELOG.md
18
CHANGELOG.md
@@ -2,9 +2,23 @@
|
||||
|
||||
See the [releases page](https://github.com/github/codeql-action/releases) for the relevant changes to the CodeQL CLI and language packs.
|
||||
|
||||
## [UNRELEASED]
|
||||
## 2.21.9 - 27 Sep 2023
|
||||
|
||||
No user facing changes.
|
||||
- Update default CodeQL bundle version to 2.14.6. [#1897](https://github.com/github/codeql-action/pull/1897)
|
||||
- We are rolling out a feature in October 2023 that will improve the success rate of C/C++ autobuild. [#1889](https://github.com/github/codeql-action/pull/1889)
|
||||
- We are rolling out a feature in October 2023 that will provide specific file coverage information for C and C++, Java and Kotlin, and JavaScript and TypeScript. Currently file coverage information for each of these pairs of languages is grouped together. [#1903](https://github.com/github/codeql-action/pull/1903)
|
||||
- Add a warning to help customers avoid inadvertently analyzing the same CodeQL language in multiple matrix jobs. [#1901](https://github.com/github/codeql-action/pull/1901)
|
||||
|
||||
## 2.21.8 - 19 Sep 2023
|
||||
|
||||
- Add a deprecation warning for customers using CodeQL version 2.10.4 and earlier. These versions of CodeQL were discontinued on 12 September 2023 alongside GitHub Enterprise Server 3.6, and will be unsupported by the next minor release of the CodeQL Action. [#1884](https://github.com/github/codeql-action/pull/1884)
|
||||
- If you are using one of these versions, please update to CodeQL CLI version 2.10.5 or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version.
|
||||
- Alternatively, if you want to continue using a version of the CodeQL CLI between 2.9.5 and 2.10.4, you can replace `github/codeql-action/*@v2` by `github/codeql-action/*@v2.21.7` in your code scanning workflow to ensure you continue using this version of the CodeQL Action.
|
||||
- Enable the following language aliases when using CodeQL 2.14.4 and later: `c-cpp` for C/C++ analysis, `java-kotlin` for Java/Kotlin analysis, and `javascript-typescript` for JavaScript/TypeScript analysis. [#1883](https://github.com/github/codeql-action/pull/1883)
|
||||
|
||||
## 2.21.7 - 14 Sep 2023
|
||||
|
||||
- Update default CodeQL bundle version to 2.14.5. [#1882](https://github.com/github/codeql-action/pull/1882)
|
||||
|
||||
## 2.21.6 - 13 Sep 2023
|
||||
|
||||
|
||||
2
lib/analyze-action.js
generated
2
lib/analyze-action.js
generated
@@ -163,7 +163,7 @@ async function run() {
|
||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)(util.getRequiredEnvParam("GITHUB_REPOSITORY"));
|
||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, actionsUtil.getTemporaryDirectory(), logger);
|
||||
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"]);
|
||||
const memory = util.getMemoryFlag(actionsUtil.getOptionalInput("ram") || process.env["CODEQL_RAM"], logger);
|
||||
await runAutobuildIfLegacyGoWorkflow(config, logger);
|
||||
dbCreationTimings = await (0, analyze_1.runFinalize)(outputDir, threads, memory, config, logger, features);
|
||||
if (actionsUtil.getRequiredInput("skip-queries") !== "true") {
|
||||
|
||||
File diff suppressed because one or more lines are too long
58
lib/autobuild.js
generated
58
lib/autobuild.js
generated
@@ -1,8 +1,37 @@
|
||||
"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.runAutobuild = exports.determineAutobuildLanguages = void 0;
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
const api_client_1 = require("./api-client");
|
||||
const codeql_1 = require("./codeql");
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const languages_1 = require("./languages");
|
||||
const repository_1 = require("./repository");
|
||||
const util_1 = require("./util");
|
||||
async function determineAutobuildLanguages(config, logger) {
|
||||
// Attempt to find a language to autobuild
|
||||
// We want pick the dominant language in the repo from the ones we're able to build
|
||||
@@ -70,9 +99,38 @@ async function determineAutobuildLanguages(config, logger) {
|
||||
return languages;
|
||||
}
|
||||
exports.determineAutobuildLanguages = determineAutobuildLanguages;
|
||||
async function setupCppAutobuild(codeql, logger) {
|
||||
const envVar = feature_flags_1.featureConfig[feature_flags_1.Feature.CppDependencyInstallation].envVar;
|
||||
const featureName = "C++ automatic installation of dependencies";
|
||||
const envDoc = "https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow";
|
||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||
const repositoryNwo = (0, repository_1.parseRepositoryNwo)((0, util_1.getRequiredEnvParam)("GITHUB_REPOSITORY"));
|
||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||
if (await features.getValue(feature_flags_1.Feature.CppDependencyInstallation, codeql)) {
|
||||
// disable autoinstall on self-hosted runners unless explicitly requested
|
||||
if (process.env["RUNNER_ENVIRONMENT"] === "self-hosted" &&
|
||||
process.env[envVar] !== "true") {
|
||||
logger.info(`Disabling ${featureName} as we are on a self-hosted runner.${(0, actions_util_1.getWorkflowEventName)() !== "dynamic"
|
||||
? ` To override this, set the ${envVar} environment variable to 'true' in your workflow (see ${envDoc}).`
|
||||
: ""}`);
|
||||
core.exportVariable(envVar, "false");
|
||||
}
|
||||
else {
|
||||
logger.info(`Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false' (see ${envDoc}).`);
|
||||
core.exportVariable(envVar, "true");
|
||||
}
|
||||
}
|
||||
else {
|
||||
logger.info(`Disabling ${featureName}.`);
|
||||
core.exportVariable(envVar, "false");
|
||||
}
|
||||
}
|
||||
async function runAutobuild(language, config, logger) {
|
||||
logger.startGroup(`Attempting to automatically build ${language} code`);
|
||||
const codeQL = await (0, codeql_1.getCodeQL)(config.codeQLCmd);
|
||||
if (language === languages_1.Language.cpp) {
|
||||
await setupCppAutobuild(codeQL, logger);
|
||||
}
|
||||
await codeQL.runAutobuild(language);
|
||||
logger.endGroup();
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;AAAA,qCAAqC;AAErC,2CAAyD;AAGlD,KAAK,UAAU,2BAA2B,CAC/C,MAA0B,EAC1B,MAAc;IAEd,0CAA0C;IAC1C,mFAAmF;IACnF,oFAAoF;IACpF,4EAA4E;IAC5E,MAAM,kBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvD,IAAA,4BAAgB,EAAC,CAAC,CAAC,CACpB,CAAC;IAEF,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,CAAC,IAAI,CACT,iEAAiE,CAClE,CAAC;QACF,OAAO,SAAS,CAAC;KAClB;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WAAW,sCACtB,IAAA,mCAAoB,GAAE,KAAK,SAAS;gBAClC,CAAC,CAAC,8BAA8B,MAAM,yDAAyD,MAAM,IAAI;gBACzG,CAAC,CAAC,EACN,EAAE,CACH,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACtC;aAAM;YACL,MAAM,CAAC,IAAI,CACT,YAAY,WAAW,yCAAyC,MAAM,yCAAyC,MAAM,IAAI,CAC1H,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACrC;KACF;SAAM;QACL,MAAM,CAAC,IAAI,CAAC,aAAa,WAAW,GAAG,CAAC,CAAC;QACzC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACtC;AACH,CAAC;AAEM,KAAK,UAAU,YAAY,CAChC,QAAkB,EAClB,MAA0B,EAC1B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,QAAQ,KAAK,oBAAQ,CAAC,GAAG,EAAE;QAC7B,MAAM,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACzC;IACD,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AAZD,oCAYC"}
|
||||
44
lib/codeql.js
generated
44
lib/codeql.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0;
|
||||
exports.getGeneratedCodeScanningConfigPath = exports.getTrapCachingExtractorConfigArgsForLang = exports.getTrapCachingExtractorConfigArgs = exports.getExtraOptions = exports.getCodeQLForCmd = exports.getCodeQLForTesting = exports.getCachedCodeQL = exports.setCodeQL = exports.getCodeQL = exports.setupCodeQL = exports.CODEQL_VERSION_LANGUAGE_ALIASING = exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = exports.CODEQL_VERSION_DIAGNOSTICS_EXPORT_FIXED = exports.CODEQL_VERSION_BETTER_NO_CODE_ERROR_MESSAGE = exports.CODEQL_VERSION_INIT_WITH_QLCONFIG = exports.CODEQL_VERSION_EXPORT_CODE_SCANNING_CONFIG = exports.CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = exports.CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = exports.CODEQL_VERSION_GHES_PACK_DOWNLOAD = exports.CommandInvocationError = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
@@ -66,7 +66,15 @@ const CODEQL_MINIMUM_VERSION = "2.9.4";
|
||||
/**
|
||||
* This version will shortly become the oldest version of CodeQL that the Action will run with.
|
||||
*/
|
||||
const CODEQL_NEXT_MINIMUM_VERSION = "2.9.4";
|
||||
const CODEQL_NEXT_MINIMUM_VERSION = "2.10.5";
|
||||
/**
|
||||
* This is the version of GHES that was most recently deprecated.
|
||||
*/
|
||||
const GHES_VERSION_MOST_RECENTLY_DEPRECATED = "3.6";
|
||||
/**
|
||||
* This is the deprecation date for the version of GHES that was most recently deprecated.
|
||||
*/
|
||||
const GHES_MOST_RECENT_DEPRECATION_DATE = "2023-09-12";
|
||||
/**
|
||||
* Versions of CodeQL that version-flag certain functionality in the Action.
|
||||
* For convenience, please keep these in descending order. Once a version
|
||||
@@ -112,6 +120,10 @@ exports.CODEQL_VERSION_RESOLVE_ENVIRONMENT = "2.13.4";
|
||||
* Versions 2.14.2+ of the CodeQL CLI support language-specific baseline configuration.
|
||||
*/
|
||||
exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG = "2.14.2";
|
||||
/**
|
||||
* Versions 2.14.4+ of the CodeQL CLI support language aliasing.
|
||||
*/
|
||||
exports.CODEQL_VERSION_LANGUAGE_ALIASING = "2.14.4";
|
||||
/**
|
||||
* Set up CodeQL CLI access.
|
||||
*
|
||||
@@ -285,6 +297,12 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_LANGUAGE_BASELINE_CONFIG)) {
|
||||
extraArgs.push("--calculate-language-specific-baseline");
|
||||
}
|
||||
if (await features.getValue(feature_flags_1.Feature.SublanguageFileCoverageEnabled, this)) {
|
||||
extraArgs.push("--sublanguage-file-coverage");
|
||||
}
|
||||
else if (await util.codeQlVersionAbove(this, feature_flags_1.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE)) {
|
||||
extraArgs.push("--no-sublanguage-file-coverage");
|
||||
}
|
||||
await runTool(cmd, [
|
||||
"database",
|
||||
"init",
|
||||
@@ -378,11 +396,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
}
|
||||
},
|
||||
async betterResolveLanguages() {
|
||||
const extraArgs = [];
|
||||
if (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
||||
extraArgs.push("--extractor-include-aliases");
|
||||
}
|
||||
const codeqlArgs = [
|
||||
"resolve",
|
||||
"languages",
|
||||
"--format=betterjson",
|
||||
"--extractor-options-verbosity=4",
|
||||
...extraArgs,
|
||||
...getExtraOptionsFromEnv(["resolve", "languages"]),
|
||||
];
|
||||
const output = await runTool(cmd, codeqlArgs);
|
||||
@@ -664,16 +687,17 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
else if (checkVersion &&
|
||||
process.env[environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING] !== "true" &&
|
||||
!(await util.codeQlVersionAbove(codeql, CODEQL_NEXT_MINIMUM_VERSION))) {
|
||||
core.warning(`CodeQL CLI version ${await codeql.getVersion()} was deprecated on 2023-06-20 alongside ` +
|
||||
"GitHub Enterprise Server 3.5 and will not be supported by the next release of the " +
|
||||
`CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or ` +
|
||||
"later. For instance, if you have specified a custom version of the CLI using the " +
|
||||
"'tools' input to the 'init' Action, you can remove this input to use the default " +
|
||||
"version.\n\n" +
|
||||
core.warning(`CodeQL CLI version ${await codeql.getVersion()} was discontinued on ` +
|
||||
`${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ` +
|
||||
`${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor ` +
|
||||
`release of the CodeQL Action. Please update to CodeQL CLI version ` +
|
||||
`${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom ` +
|
||||
"version of the CLI using the 'tools' input to the 'init' Action, you can remove this " +
|
||||
"input to use the default version.\n\n" +
|
||||
"Alternatively, if you want to continue using CodeQL CLI version " +
|
||||
`${await codeql.getVersion()}, you can replace 'github/codeql-action/*@v2' by ` +
|
||||
"'github/codeql-action/*@v2.20.4' in your code scanning workflow to ensure you continue " +
|
||||
"using this version of the CodeQL Action.");
|
||||
`'github/codeql-action/*@v${(0, actions_util_1.getActionVersion)()}' in your code scanning workflow to ` +
|
||||
"continue using this version of the CodeQL Action.");
|
||||
core.exportVariable(environment_1.EnvVar.SUPPRESS_DEPRECATED_SOON_WARNING, "true");
|
||||
}
|
||||
return codeql;
|
||||
|
||||
File diff suppressed because one or more lines are too long
29
lib/config-utils.js
generated
29
lib/config-utils.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.wrapEnvironment = exports.generateRegistries = exports.downloadPacks = exports.getConfig = exports.getPathToParsedConfigFile = exports.initConfig = exports.getMlPoweredJsQueriesStatus = exports.parsePacks = exports.validatePackSpecification = exports.parsePacksSpecification = exports.parsePacksFromConfig = exports.calculateAugmentation = exports.getDefaultConfig = exports.getRawLanguages = exports.getLanguages = exports.getLanguagesInRepo = exports.getUnknownLanguagesError = exports.getNoLanguagesError = exports.getConfigFileDirectoryGivenMessage = exports.getConfigFileFormatInvalidMessage = exports.getConfigFileRepoFormatInvalidMessage = exports.getConfigFileDoesNotExistErrorMessage = exports.getConfigFileOutsideWorkspaceErrorMessage = exports.getLocalPathDoesNotExist = exports.getLocalPathOutsideOfRepository = exports.getPacksStrInvalid = exports.getPacksInvalid = exports.getPacksInvalidSplit = exports.getPathsInvalid = exports.getPathsIgnoreInvalid = exports.getQueryUsesInvalid = exports.getQueriesMissingUses = exports.getQueriesInvalid = exports.getDisableDefaultQueriesInvalid = exports.getNameInvalid = exports.validateAndSanitisePath = exports.defaultAugmentationProperties = void 0;
|
||||
exports.wrapEnvironment = exports.generateRegistries = exports.downloadPacks = exports.getConfig = exports.getPathToParsedConfigFile = exports.initConfig = exports.getMlPoweredJsQueriesStatus = exports.parsePacks = exports.validatePackSpecification = exports.parsePacksSpecification = exports.parsePacksFromConfig = exports.calculateAugmentation = exports.getDefaultConfig = exports.getRawLanguages = exports.getLanguageAliases = exports.getLanguages = exports.getLanguagesInRepo = exports.getUnknownLanguagesError = exports.getNoLanguagesError = exports.getConfigFileDirectoryGivenMessage = exports.getConfigFileFormatInvalidMessage = exports.getConfigFileRepoFormatInvalidMessage = exports.getConfigFileDoesNotExistErrorMessage = exports.getConfigFileOutsideWorkspaceErrorMessage = exports.getLocalPathDoesNotExist = exports.getLocalPathOutsideOfRepository = exports.getPacksStrInvalid = exports.getPacksInvalid = exports.getPacksInvalidSplit = exports.getPathsInvalid = exports.getPathsIgnoreInvalid = exports.getQueryUsesInvalid = exports.getQueriesMissingUses = exports.getQueriesInvalid = exports.getDisableDefaultQueriesInvalid = exports.getNameInvalid = exports.validateAndSanitisePath = exports.defaultAugmentationProperties = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const perf_hooks_1 = require("perf_hooks");
|
||||
@@ -395,7 +395,7 @@ function getNoLanguagesError() {
|
||||
}
|
||||
exports.getNoLanguagesError = getNoLanguagesError;
|
||||
function getUnknownLanguagesError(languages) {
|
||||
return `Did not recognise the following languages: ${languages.join(", ")}`;
|
||||
return `Did not recognize the following languages: ${languages.join(", ")}`;
|
||||
}
|
||||
exports.getUnknownLanguagesError = getUnknownLanguagesError;
|
||||
/**
|
||||
@@ -436,13 +436,20 @@ exports.getLanguagesInRepo = getLanguagesInRepo;
|
||||
async function getLanguages(codeQL, languagesInput, repository, logger) {
|
||||
// Obtain languages without filtering them.
|
||||
const { rawLanguages, autodetected } = await getRawLanguages(languagesInput, repository, logger);
|
||||
let languages = rawLanguages.map(languages_1.resolveAlias);
|
||||
let languages = rawLanguages;
|
||||
if (autodetected) {
|
||||
const availableLanguages = await codeQL.resolveLanguages();
|
||||
languages = languages.filter((value) => value in availableLanguages);
|
||||
const supportedLanguages = Object.keys(await codeQL.resolveLanguages());
|
||||
languages = languages
|
||||
.map(languages_1.parseLanguage)
|
||||
.filter((value) => value && supportedLanguages.includes(value))
|
||||
.map((value) => value);
|
||||
logger.info(`Automatically detected languages: ${languages.join(", ")}`);
|
||||
}
|
||||
else {
|
||||
const aliases = await getLanguageAliases(codeQL);
|
||||
if (aliases) {
|
||||
languages = languages.map((lang) => aliases[lang] || lang);
|
||||
}
|
||||
logger.info(`Languages from configuration: ${languages.join(", ")}`);
|
||||
}
|
||||
// If the languages parameter was not given and no languages were
|
||||
@@ -454,7 +461,6 @@ async function getLanguages(codeQL, languagesInput, repository, logger) {
|
||||
const parsedLanguages = [];
|
||||
const unknownLanguages = [];
|
||||
for (const language of languages) {
|
||||
// We know this is not an alias since we resolved it above.
|
||||
const parsedLanguage = (0, languages_1.parseLanguage)(language);
|
||||
if (parsedLanguage === undefined) {
|
||||
unknownLanguages.push(language);
|
||||
@@ -471,6 +477,17 @@ async function getLanguages(codeQL, languagesInput, repository, logger) {
|
||||
return parsedLanguages;
|
||||
}
|
||||
exports.getLanguages = getLanguages;
|
||||
/**
|
||||
* Gets the set of languages supported by CodeQL, along with their aliases if supported by the
|
||||
* version of the CLI.
|
||||
*/
|
||||
async function getLanguageAliases(codeql) {
|
||||
if (await (0, util_1.codeQlVersionAbove)(codeql, codeql_1.CODEQL_VERSION_LANGUAGE_ALIASING)) {
|
||||
return (await codeql.betterResolveLanguages()).aliases;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
exports.getLanguageAliases = getLanguageAliases;
|
||||
/**
|
||||
* Gets the set of languages in the current repository without checking to
|
||||
* see if these languages are actually supported by CodeQL.
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
lib/debug-artifacts.js
generated
2
lib/debug-artifacts.js
generated
@@ -56,7 +56,7 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName) {
|
||||
core.info("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.");
|
||||
}
|
||||
}
|
||||
await artifact.create().uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir));
|
||||
await artifact.create().uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), { continueOnError: true });
|
||||
}
|
||||
exports.uploadDebugArtifacts = uploadDebugArtifacts;
|
||||
async function uploadSarifDebugArtifact(config, outputDir) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"debug-artifacts.js","sourceRoot":"","sources":["../src/debug-artifacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAE7B,4DAA8C;AAC9C,oDAAsC;AACtC,sDAA6B;AAC7B,8CAAsB;AAEtB,iDAAkD;AAClD,uCAA0C;AAC1C,qCAAqC;AAIrC,iCAKgB;AAEhB,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAFD,kDAEC;AAEM,KAAK,UAAU,oBAAoB,CACxC,QAAkB,EAClB,OAAe,EACf,YAAoB;IAEpB,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,OAAO;KACR;IACD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,MAAM,GAAG,IAAA,+BAAgB,EAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,MAAM,EAAE;QACV,IAAI;YACF,KAAK,MAAM,CAAC,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CACxC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAY,CAC9B,CAAC,IAAI,EAAE;gBACN,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;SAC7B;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,IAAI,CACP,+HAA+H,CAChI,CAAC;SACH;KACF;IACD,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC,cAAc,CACpC,mBAAmB,CAAC,GAAG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jB,MAAM,CAAC,iBAAiB,CACzB,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,IAAI,CACP,8CAA8C,MAAM,CAAC,iBAAiB,IAAI,QAAQ,KAAK,KAAK,EAAE,CAC/F,CAAC;SACH;KACF;AACH,CAAC;AA1BD,8EA0BC"}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"bundleVersion": "codeql-bundle-v2.14.4",
|
||||
"cliVersion": "2.14.4",
|
||||
"priorBundleVersion": "codeql-bundle-v2.14.3",
|
||||
"priorCliVersion": "2.14.3"
|
||||
"bundleVersion": "codeql-bundle-v2.14.6",
|
||||
"cliVersion": "2.14.6",
|
||||
"priorBundleVersion": "codeql-bundle-v2.14.5",
|
||||
"priorCliVersion": "2.14.5"
|
||||
}
|
||||
|
||||
23
lib/feature-flags.js
generated
23
lib/feature-flags.js
generated
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||
exports.logCodeScanningConfigInCli = exports.useCodeScanningConfigInCli = exports.Features = exports.FEATURE_FLAGS_FILE_NAME = exports.featureConfig = exports.Feature = exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const path = __importStar(require("path"));
|
||||
const semver = __importStar(require("semver"));
|
||||
@@ -41,9 +41,14 @@ exports.CODEQL_VERSION_BUNDLE_SEMANTICALLY_VERSIONED = "2.13.4";
|
||||
*/
|
||||
exports.CODEQL_VERSION_ANALYSIS_SUMMARY_V2 = "2.14.0";
|
||||
/**
|
||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options.
|
||||
* Versions 2.14.0+ of the CodeQL CLI support intra-layer parallelism (aka fine-grained parallelism) options, but we
|
||||
* limit to 2.14.6 onwards, since that's the version that has mitigations against OOM failures.
|
||||
*/
|
||||
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.0";
|
||||
exports.CODEQL_VERSION_INTRA_LAYER_PARALLELISM = "2.14.6";
|
||||
/**
|
||||
* Versions 2.15.0+ of the CodeQL CLI support sub-language file coverage information.
|
||||
*/
|
||||
exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE = "2.15.0";
|
||||
/**
|
||||
* Feature enablement as returned by the GitHub API endpoint.
|
||||
*
|
||||
@@ -54,12 +59,14 @@ var Feature;
|
||||
Feature["AnalysisSummaryV2Enabled"] = "analysis_summary_v2_enabled";
|
||||
Feature["CliConfigFileEnabled"] = "cli_config_file_enabled";
|
||||
Feature["CodeqlJavaLombokEnabled"] = "codeql_java_lombok_enabled";
|
||||
Feature["CppDependencyInstallation"] = "cpp_dependency_installation_enabled";
|
||||
Feature["DisableKotlinAnalysisEnabled"] = "disable_kotlin_analysis_enabled";
|
||||
Feature["DisablePythonDependencyInstallationEnabled"] = "disable_python_dependency_installation_enabled";
|
||||
Feature["EvaluatorIntraLayerParallelismEnabled"] = "evaluator_intra_layer_parallelism_enabled";
|
||||
Feature["ExportDiagnosticsEnabled"] = "export_diagnostics_enabled";
|
||||
Feature["MlPoweredQueriesEnabled"] = "ml_powered_queries_enabled";
|
||||
Feature["QaTelemetryEnabled"] = "qa_telemetry_enabled";
|
||||
Feature["SublanguageFileCoverageEnabled"] = "sublanguage_file_coverage_enabled";
|
||||
Feature["UploadFailedSarifEnabled"] = "upload_failed_sarif_enabled";
|
||||
})(Feature || (exports.Feature = Feature = {}));
|
||||
exports.featureConfig = {
|
||||
@@ -73,6 +80,11 @@ exports.featureConfig = {
|
||||
minimumVersion: "2.14.0",
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.CppDependencyInstallation]: {
|
||||
envVar: "CODEQL_EXTRACTOR_CPP_AUTOINSTALL_DEPENDENCIES",
|
||||
minimumVersion: "2.15.0",
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.DisableKotlinAnalysisEnabled]: {
|
||||
envVar: "CODEQL_DISABLE_KOTLIN_ANALYSIS",
|
||||
minimumVersion: undefined,
|
||||
@@ -103,6 +115,11 @@ exports.featureConfig = {
|
||||
minimumVersion: undefined,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.SublanguageFileCoverageEnabled]: {
|
||||
envVar: "CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE",
|
||||
minimumVersion: exports.CODEQL_VERSION_SUBLANGUAGE_FILE_COVERAGE,
|
||||
defaultValue: false,
|
||||
},
|
||||
[Feature.UploadFailedSarifEnabled]: {
|
||||
envVar: "CODEQL_ACTION_UPLOAD_FAILED_SARIF",
|
||||
minimumVersion: "2.11.3",
|
||||
|
||||
File diff suppressed because one or more lines are too long
6
lib/init-action.js
generated
6
lib/init-action.js
generated
@@ -121,8 +121,7 @@ async function run() {
|
||||
const features = new feature_flags_1.Features(gitHubVersion, repositoryNwo, (0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||
core.exportVariable(environment_1.EnvVar.JOB_RUN_UUID, (0, uuid_1.v4)());
|
||||
try {
|
||||
const workflowErrors = await (0, workflow_1.validateWorkflow)(logger);
|
||||
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)("init", "starting", startedAt, await (0, util_1.checkDiskUsage)(logger), workflowErrors)))) {
|
||||
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)("init", "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
|
||||
return;
|
||||
}
|
||||
const codeQLDefaultVersionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||
@@ -132,6 +131,7 @@ async function run() {
|
||||
toolsDownloadDurationMs = initCodeQLResult.toolsDownloadDurationMs;
|
||||
toolsVersion = initCodeQLResult.toolsVersion;
|
||||
toolsSource = initCodeQLResult.toolsSource;
|
||||
await (0, workflow_1.validateWorkflow)(codeql, logger);
|
||||
config = await (0, init_1.initConfig)((0, actions_util_1.getOptionalInput)("languages"), (0, actions_util_1.getOptionalInput)("queries"), (0, actions_util_1.getOptionalInput)("packs"), registriesInput, (0, actions_util_1.getOptionalInput)("config-file"), (0, actions_util_1.getOptionalInput)("db-location"), (0, actions_util_1.getOptionalInput)("config"), getTrapCachingEnabled(),
|
||||
// Debug mode is enabled if:
|
||||
// - The `init` Action is passed `debug: true`.
|
||||
@@ -173,7 +173,7 @@ async function run() {
|
||||
// options at https://codeql.github.com/docs/codeql-cli/manual/database-trace-command/
|
||||
// for details.
|
||||
core.exportVariable("CODEQL_RAM", process.env["CODEQL_RAM"] ||
|
||||
(0, util_1.getMemoryFlagValue)((0, actions_util_1.getOptionalInput)("ram")).toString());
|
||||
(0, util_1.getMemoryFlagValue)((0, actions_util_1.getOptionalInput)("ram"), logger).toString());
|
||||
core.exportVariable("CODEQL_THREADS", (0, util_1.getThreadsFlagValue)((0, actions_util_1.getOptionalInput)("threads"), logger).toString());
|
||||
// Disable Kotlin extractor if feature flag set
|
||||
if (await features.getValue(feature_flags_1.Feature.DisableKotlinAnalysisEnabled)) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
13
lib/languages.js
generated
13
lib/languages.js
generated
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isScannedLanguage = exports.isTracedLanguage = exports.parseLanguage = exports.resolveAlias = exports.LANGUAGE_ALIASES = exports.Language = void 0;
|
||||
exports.isScannedLanguage = exports.isTracedLanguage = exports.parseLanguage = exports.LANGUAGE_ALIASES = exports.Language = void 0;
|
||||
// All the languages supported by CodeQL
|
||||
var Language;
|
||||
(function (Language) {
|
||||
@@ -21,18 +21,13 @@ exports.LANGUAGE_ALIASES = {
|
||||
kotlin: Language.java,
|
||||
typescript: Language.javascript,
|
||||
};
|
||||
function resolveAlias(lang) {
|
||||
return exports.LANGUAGE_ALIASES[lang] || lang;
|
||||
}
|
||||
exports.resolveAlias = resolveAlias;
|
||||
/**
|
||||
* Translate from user input or GitHub's API names for languages to CodeQL's
|
||||
* names for languages. This does not translate a language alias to the actual
|
||||
* language used by CodeQL.
|
||||
* names for languages.
|
||||
*
|
||||
* @param language The language to translate.
|
||||
* @returns A language supported by CodeQL, an alias for a language, or
|
||||
* `undefined` if the input language cannot be parsed into a langauge supported
|
||||
* `undefined` if the input language cannot be parsed into a language supported
|
||||
* by CodeQL.
|
||||
*/
|
||||
function parseLanguage(language) {
|
||||
@@ -45,7 +40,7 @@ function parseLanguage(language) {
|
||||
// Check language aliases, but return the original language name,
|
||||
// the alias will be resolved later.
|
||||
if (language in exports.LANGUAGE_ALIASES) {
|
||||
return language;
|
||||
return exports.LANGUAGE_ALIASES[language];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"languages.js","sourceRoot":"","sources":["../src/languages.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,qBAAS,CAAA;IACT,yBAAa,CAAA;IACb,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EATW,QAAQ,wBAAR,QAAQ,QASnB;AAED,iCAAiC;AACpB,QAAA,gBAAgB,GAAiC;IAC5D,CAAC,EAAE,QAAQ,CAAC,GAAG;IACf,KAAK,EA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;IACb,2BAAe,CAAA;AACjB,CAAC,EATW,QAAQ,wBAAR,QAAQ,QASnB;AAED,iCAAiC;AACpB,QAAA,gBAAgB,GAAiC;IAC5D,CAAC,EAAE,QAAQ,CAAC,GAAG;IACf,KAAK,EAAE,QAAQ,CAAC,GAAG;IACnB,IAAI,EAAE,QAAQ,CAAC,MAAM;IACrB,MAAM,EAAE,QAAQ,CAAC,IAAI;IACrB,UAAU,EAAE,QAAQ,CAAC,UAAU;CAChC,CAAC;AAEF;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,QAAgB;IAC5C,0BAA0B;IAC1B,QAAQ,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAEzC,6BAA6B;IAC7B,IAAI,QAAQ,IAAI,QAAQ,EAAE;QACxB,OAAO,QAAoB,CAAC;KAC7B;IAED,iEAAiE;IACjE,oCAAoC;IACpC,IAAI,QAAQ,IAAI,wBAAgB,EAAE;QAChC,OAAO,wBAAgB,CAAC,QAAQ,CAAC,CAAC;KACnC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAhBD,sCAgBC;AAED,SAAgB,gBAAgB,CAAC,QAAkB;IACjD,OAAO;QACL,QAAQ,CAAC,GAAG;QACZ,QAAQ,CAAC,MAAM;QACf,QAAQ,CAAC,EAAE;QACX,QAAQ,CAAC,IAAI;QACb,QAAQ,CAAC,KAAK;KACf,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC;AARD,4CAQC;AAED,SAAgB,iBAAiB,CAAC,QAAkB;IAClD,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAFD,8CAEC"}
|
||||
12
lib/languages.test.js
generated
12
lib/languages.test.js
generated
@@ -16,14 +16,14 @@ const testing_utils_1 = require("./testing-utils");
|
||||
t.deepEqual((0, languages_1.parseLanguage)("javascript"), languages_1.Language.javascript);
|
||||
t.deepEqual((0, languages_1.parseLanguage)("python"), languages_1.Language.python);
|
||||
// Aliases
|
||||
t.deepEqual((0, languages_1.parseLanguage)("c"), "c");
|
||||
t.deepEqual((0, languages_1.parseLanguage)("c++"), "c++");
|
||||
t.deepEqual((0, languages_1.parseLanguage)("c#"), "c#");
|
||||
t.deepEqual((0, languages_1.parseLanguage)("kotlin"), "kotlin");
|
||||
t.deepEqual((0, languages_1.parseLanguage)("typescript"), "typescript");
|
||||
t.deepEqual((0, languages_1.parseLanguage)("c"), languages_1.Language.cpp);
|
||||
t.deepEqual((0, languages_1.parseLanguage)("c++"), languages_1.Language.cpp);
|
||||
t.deepEqual((0, languages_1.parseLanguage)("c#"), languages_1.Language.csharp);
|
||||
t.deepEqual((0, languages_1.parseLanguage)("kotlin"), languages_1.Language.java);
|
||||
t.deepEqual((0, languages_1.parseLanguage)("typescript"), languages_1.Language.javascript);
|
||||
// spaces and case-insensitivity
|
||||
t.deepEqual((0, languages_1.parseLanguage)(" \t\nCsHaRp\t\t"), languages_1.Language.csharp);
|
||||
t.deepEqual((0, languages_1.parseLanguage)(" \t\nkOtLin\t\t"), "kotlin");
|
||||
t.deepEqual((0, languages_1.parseLanguage)(" \t\nkOtLin\t\t"), languages_1.Language.java);
|
||||
// Not matches
|
||||
t.deepEqual((0, languages_1.parseLanguage)("foo"), undefined);
|
||||
t.deepEqual((0, languages_1.parseLanguage)(" "), undefined);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"languages.test.js","sourceRoot":"","sources":["../src/languages.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAAuB;AAEvB,2CAKqB;AACrB,mDAA6C;AAE7C,IAAA,0BAAU,EAAC,aAAI,CAAC,CAAC;AAEjB,IAAA,aAAI,EAAC,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE;IAChC,gBAAgB;IAChB,CAAC,CAAC,SAAS,CAAC,IAAA,yBAAa,EAAC,QAAQ,CAAC,EAAE,oBAAQ,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC,SAAS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,CAAC;IAC1C,CAAC,CAAC,KAAK,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAE3C,CAAC,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,IAAI,CAAC,IAAA,6BAAiB,EAAC,oBAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC,CAAC"}
|
||||
5
lib/resolve-environment-action.js
generated
5
lib/resolve-environment-action.js
generated
@@ -38,11 +38,14 @@ const ENVIRONMENT_OUTPUT_NAME = "environment";
|
||||
async function run() {
|
||||
const startedAt = new Date();
|
||||
const logger = (0, logging_1.getActionsLogger)();
|
||||
const language = (0, languages_1.resolveAlias)((0, actions_util_1.getRequiredInput)("language"));
|
||||
try {
|
||||
if (!(await (0, status_report_1.sendStatusReport)(await (0, status_report_1.createStatusReportBase)(ACTION_NAME, "starting", startedAt, await (0, util_1.checkDiskUsage)(logger))))) {
|
||||
return;
|
||||
}
|
||||
const language = (0, languages_1.parseLanguage)((0, actions_util_1.getRequiredInput)("language"));
|
||||
if (language === undefined) {
|
||||
throw new Error(`Did not recognize the language "${(0, actions_util_1.getRequiredInput)("language")}".`);
|
||||
}
|
||||
const gitHubVersion = await (0, api_client_1.getGitHubVersion)();
|
||||
(0, util_1.checkGitHubVersionInRange)(gitHubVersion, logger);
|
||||
const config = await configUtils.getConfig((0, actions_util_1.getTemporaryDirectory)(), logger);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"resolve-environment-action.js","sourceRoot":"","sources":["../src/resolve-environment-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAIwB;AACxB,6CAAgD;AAChD,qCAAkD;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AAI,KAAK,YAAY,+BAAsB,EAAE;YAC3C,6DAA6D;YAC7D,qEAAqE;YACrE,IAAI,CAAC,SAAS,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;YAC5C,MAAM,CAAC,OAAO,CACZ,wFAAwF,KAAK,CAAC,OAAO,EAAE,CACxG,CAAC;SACH;aAAM;YACL,kFAAkF;YAClF,IAAI,CAAC,SAAS,CACZ,wFAAwF,KAAK,CAAC,OAAO,EAAE,CACxG,CAAC;YAEF,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,EACtB,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;SACH;QAED,OAAO;KACR;IAED,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW,mBAAmB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC7E;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||
{"version":3,"file":"resolve-environment-action.js","sourceRoot":"","sources":["../src/resolve-environment-action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AAEtC,iDAIwB;AACxB,6CAAgD;AAChD,qCAAkD;AAClD,4DAA8C;AAC9C,2CAAsD;AACtD,uCAA6C;AAC7C,+DAAmE;AACnE,mDAIyB;AACzB,iCAKgB;AAEhB,MA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,EAAC,cAAc,CAAC,CAAC;QAExC,IAAI,KAAK,YAAY,+BAAsB,EAAE;YAC3C,6DAA6D;YAC7D,qEAAqE;YACrE,IAAI,CAAC,SAAS,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC;YAC5C,MAAM,CAAC,OAAO,CACZ,wFAAwF,KAAK,CAAC,OAAO,EAAE,CACxG,CAAC;SACH;aAAM;YACL,kFAAkF;YAClF,IAAI,CAAC,SAAS,CACZ,wFAAwF,KAAK,CAAC,OAAO,EAAE,CACxG,CAAC;YAEF,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,IAAA,gCAAgB,EAAC,KAAK,CAAC,EACvB,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,EACtB,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,KAAK,CACZ,CACF,CAAC;SACH;QAED,OAAO;KACR;IAED,MAAM,IAAA,gCAAgB,EACpB,MAAM,IAAA,sCAAsB,EAC1B,WAAW,EACX,SAAS,EACT,SAAS,EACT,MAAM,IAAA,qBAAc,GAAE,CACvB,CACF,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,UAAU;IACvB,IAAI;QACF,MAAM,GAAG,EAAE,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW,mBAAmB,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KAC7E;IACD,MAAM,IAAA,sBAAe,GAAE,CAAC;AAC1B,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"}
|
||||
56
lib/util.js
generated
56
lib/util.js
generated
@@ -59,6 +59,11 @@ exports.DEFAULT_DEBUG_DATABASE_NAME = "db";
|
||||
* The default fraction of the total RAM above 8 GB that should be reserved for the system.
|
||||
*/
|
||||
const DEFAULT_RESERVED_RAM_SCALING_FACTOR = 0.05;
|
||||
/**
|
||||
* The minimum amount of memory imposed by a cgroup limit that we will consider. Memory limits below
|
||||
* this amount are ignored.
|
||||
*/
|
||||
const MINIMUM_CGROUP_MEMORY_LIMIT_BYTES = 1024 * 1024;
|
||||
/**
|
||||
* Get the extra options for the codeql commands.
|
||||
*/
|
||||
@@ -148,6 +153,49 @@ function getMemoryFlagValueForPlatform(userInput, totalMemoryBytes, platform) {
|
||||
return Math.floor(memoryToUseMegaBytes);
|
||||
}
|
||||
exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform;
|
||||
/**
|
||||
* Get the total amount of memory available to the Action, taking into account constraints imposed
|
||||
* by cgroups on Linux.
|
||||
*/
|
||||
function getTotalMemoryBytes(logger) {
|
||||
const limits = [os.totalmem()];
|
||||
if (os.platform() === "linux") {
|
||||
limits.push(...[
|
||||
"/sys/fs/cgroup/memory/memory.limit_in_bytes",
|
||||
"/sys/fs/cgroup/memory.max",
|
||||
]
|
||||
.map((file) => getCgroupMemoryLimitBytes(file, logger))
|
||||
.filter((limit) => limit !== undefined)
|
||||
.map((limit) => limit));
|
||||
}
|
||||
const limit = Math.min(...limits);
|
||||
logger.debug(`While resolving RAM, determined that the total memory available to the Action is ${limit / (1024 * 1024)} MiB.`);
|
||||
return limit;
|
||||
}
|
||||
/**
|
||||
* Gets the number of bytes of available memory specified by the cgroup limit file at the given path.
|
||||
*
|
||||
* May be greater than the total memory reported by the operating system if there is no cgroup limit.
|
||||
*/
|
||||
function getCgroupMemoryLimitBytes(limitFile, logger) {
|
||||
if (!fs.existsSync(limitFile)) {
|
||||
logger.debug(`While resolving RAM, did not find a cgroup memory limit at ${limitFile}.`);
|
||||
return undefined;
|
||||
}
|
||||
const limit = Number(fs.readFileSync(limitFile, "utf8"));
|
||||
if (!Number.isInteger(limit)) {
|
||||
logger.debug(`While resolving RAM, ignored the file ${limitFile} that may contain a cgroup memory limit ` +
|
||||
"as this file did not contain an integer.");
|
||||
return undefined;
|
||||
}
|
||||
const displayLimit = `${Math.floor(limit / (1024 * 1024))} MiB`;
|
||||
if (limit < MINIMUM_CGROUP_MEMORY_LIMIT_BYTES) {
|
||||
logger.info(`While resolving RAM, ignored a cgroup limit of ${displayLimit} in ${limitFile} as it was below ${MINIMUM_CGROUP_MEMORY_LIMIT_BYTES / (1024 * 1024)} MiB.`);
|
||||
return undefined;
|
||||
}
|
||||
logger.info(`While resolving RAM, found a cgroup limit of ${displayLimit} in ${limitFile}.`);
|
||||
return limit;
|
||||
}
|
||||
/**
|
||||
* Get the value of the codeql `--ram` flag as configured by the `ram` input.
|
||||
* If no value was specified, the total available memory will be used minus a
|
||||
@@ -155,8 +203,8 @@ exports.getMemoryFlagValueForPlatform = getMemoryFlagValueForPlatform;
|
||||
*
|
||||
* @returns {number} the amount of RAM to use, in megabytes
|
||||
*/
|
||||
function getMemoryFlagValue(userInput) {
|
||||
return getMemoryFlagValueForPlatform(userInput, os.totalmem(), process.platform);
|
||||
function getMemoryFlagValue(userInput, logger) {
|
||||
return getMemoryFlagValueForPlatform(userInput, getTotalMemoryBytes(logger), process.platform);
|
||||
}
|
||||
exports.getMemoryFlagValue = getMemoryFlagValue;
|
||||
/**
|
||||
@@ -166,8 +214,8 @@ exports.getMemoryFlagValue = getMemoryFlagValue;
|
||||
*
|
||||
* @returns string
|
||||
*/
|
||||
function getMemoryFlag(userInput) {
|
||||
const megabytes = getMemoryFlagValue(userInput);
|
||||
function getMemoryFlag(userInput, logger) {
|
||||
const megabytes = getMemoryFlagValue(userInput, logger);
|
||||
return `--ram=${megabytes}`;
|
||||
}
|
||||
exports.getMemoryFlag = getMemoryFlag;
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
lib/util.test.js
generated
2
lib/util.test.js
generated
@@ -97,7 +97,7 @@ for (const { input, totalMemoryMb, platform, expectedMemoryValue, reservedPercen
|
||||
}
|
||||
(0, ava_1.default)("getMemoryFlag() throws if the ram input is < 0 or NaN", async (t) => {
|
||||
for (const input of ["-1", "hello!"]) {
|
||||
t.throws(() => util.getMemoryFlag(input));
|
||||
t.throws(() => util.getMemoryFlag(input, (0, logging_1.getRunnerLogger)(true)));
|
||||
}
|
||||
});
|
||||
(0, ava_1.default)("getAddSnippetsFlag() should return the correct flag", (t) => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
52
lib/workflow.js
generated
52
lib/workflow.js
generated
@@ -78,11 +78,57 @@ exports.WorkflowErrors = toCodedErrors({
|
||||
MissingPushHook: `Please specify an on.push hook to analyze and see code scanning alerts from the default branch on the Security tab.`,
|
||||
CheckoutWrongHead: `git checkout HEAD^2 is no longer necessary. Please remove this step as Code Scanning recommends analyzing the merge commit for best results.`,
|
||||
});
|
||||
function getWorkflowErrors(doc) {
|
||||
/**
|
||||
* Groups the given list of CodeQL languages by their extractor name.
|
||||
*
|
||||
* Resolves to `undefined` if the CodeQL version does not support language aliasing.
|
||||
*/
|
||||
async function groupLanguagesByExtractor(languages, codeql) {
|
||||
const resolveResult = await codeql.betterResolveLanguages();
|
||||
if (!resolveResult.aliases) {
|
||||
return undefined;
|
||||
}
|
||||
const aliases = resolveResult.aliases;
|
||||
const languagesByExtractor = {};
|
||||
for (const language of languages) {
|
||||
const extractorName = aliases[language] || language;
|
||||
if (!languagesByExtractor[extractorName]) {
|
||||
languagesByExtractor[extractorName] = [];
|
||||
}
|
||||
languagesByExtractor[extractorName].push(language);
|
||||
}
|
||||
return languagesByExtractor;
|
||||
}
|
||||
async function getWorkflowErrors(doc, codeql) {
|
||||
const errors = [];
|
||||
const jobName = process.env.GITHUB_JOB;
|
||||
if (jobName) {
|
||||
const job = doc?.jobs?.[jobName];
|
||||
if (job?.strategy?.matrix?.language) {
|
||||
const matrixLanguages = job.strategy.matrix.language;
|
||||
if (Array.isArray(matrixLanguages)) {
|
||||
// Map extractors to entries in the `language` matrix parameter. This will allow us to
|
||||
// detect languages which are analyzed in more than one job.
|
||||
const matrixLanguagesByExtractor = await groupLanguagesByExtractor(matrixLanguages, codeql);
|
||||
// If the CodeQL version does not support language aliasing, then `matrixLanguagesByExtractor`
|
||||
// will be `undefined`. In this case, we cannot detect duplicate languages in the matrix.
|
||||
if (matrixLanguagesByExtractor !== undefined) {
|
||||
// Check for duplicate languages in the matrix
|
||||
for (const [extractor, languages] of Object.entries(matrixLanguagesByExtractor)) {
|
||||
if (languages.length > 1) {
|
||||
errors.push({
|
||||
message: `CodeQL language '${extractor}' is referenced by more than one entry in the ` +
|
||||
`'language' matrix parameter for job '${jobName}'. This may result in duplicate alerts. ` +
|
||||
`Please edit the 'language' matrix parameter to keep only one of the following: ${languages
|
||||
.map((language) => `'${language}'`)
|
||||
.join(", ")}.`,
|
||||
code: "DuplicateLanguageInMatrix",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const steps = job?.steps;
|
||||
if (Array.isArray(steps)) {
|
||||
for (const step of steps) {
|
||||
@@ -127,7 +173,7 @@ function getWorkflowErrors(doc) {
|
||||
return errors;
|
||||
}
|
||||
exports.getWorkflowErrors = getWorkflowErrors;
|
||||
async function validateWorkflow(logger) {
|
||||
async function validateWorkflow(codeql, logger) {
|
||||
let workflow;
|
||||
try {
|
||||
workflow = await getWorkflow(logger);
|
||||
@@ -137,7 +183,7 @@ async function validateWorkflow(logger) {
|
||||
}
|
||||
let workflowErrors;
|
||||
try {
|
||||
workflowErrors = getWorkflowErrors(workflow);
|
||||
workflowErrors = await getWorkflowErrors(workflow, codeql);
|
||||
}
|
||||
catch (e) {
|
||||
return `error: getWorkflowErrors() failed: ${String(e)}`;
|
||||
|
||||
File diff suppressed because one or more lines are too long
240
lib/workflow.test.js
generated
240
lib/workflow.test.js
generated
@@ -28,119 +28,114 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const ava_1 = __importDefault(require("ava"));
|
||||
const yaml = __importStar(require("js-yaml"));
|
||||
const sinon = __importStar(require("sinon"));
|
||||
const codeql_1 = require("./codeql");
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const workflow_1 = require("./workflow");
|
||||
function errorCodes(actual, expected) {
|
||||
return [actual.map(({ code }) => code), expected.map(({ code }) => code)];
|
||||
}
|
||||
(0, testing_utils_1.setupTests)(ava_1.default);
|
||||
(0, ava_1.default)("getWorkflowErrors() when on is empty", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({ on: {} });
|
||||
(0, ava_1.default)("getWorkflowErrors() when on is empty", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({ on: {} }, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing pull_request", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({ on: ["push"] });
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing pull_request", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({ on: ["push"] }, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing push", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({ on: ["pull_request"] });
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is an array missing push", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({ on: ["pull_request"] }, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.MissingPushHook]));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is valid", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is valid", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: ["push", "pull_request"],
|
||||
});
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a valid superset", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a valid superset", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: ["push", "pull_request", "schedule"],
|
||||
});
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a correct object", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
on: { push: { branches: ["main"] }, pull_request: { branches: ["main"] } },
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a correct object", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: {
|
||||
push: { branches: ["main"] },
|
||||
pull_request: { branches: ["main"] },
|
||||
},
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.pull_requests is a string and correct", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.pull_requests is a string and correct", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: { push: { branches: "*" }, pull_request: { branches: "*" } },
|
||||
});
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is correct with empty objects", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is correct with empty objects", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
`));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is not mismatched", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is not mismatched", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: {
|
||||
push: { branches: ["main", "feature"] },
|
||||
pull_request: { branches: ["main"] },
|
||||
},
|
||||
});
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() for a range of malformed workflows", (t) => {
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
||||
(0, ava_1.default)("getWorkflowErrors() for a range of malformed workflows", async (t) => {
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: {
|
||||
push: 1,
|
||||
pull_request: 1,
|
||||
},
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
(0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: 1,
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
(0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: [1],
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: { 1: 1 },
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: { test: 1 },
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: { test: [1] },
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
(0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: { test: { steps: 1 } },
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
(0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: { test: { steps: [{ notrun: "git checkout HEAD^2" }] } },
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: 1,
|
||||
jobs: { test: [undefined] },
|
||||
}), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(1), []));
|
||||
t.deepEqual(...errorCodes(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
(0, workflow_1.getWorkflowErrors)({
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(1, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)({
|
||||
on: {
|
||||
push: {
|
||||
branches: 1,
|
||||
@@ -149,25 +144,86 @@ function errorCodes(actual, expected) {
|
||||
branches: 1,
|
||||
},
|
||||
},
|
||||
}), []));
|
||||
}, await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.pull_request for wildcard branches", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.pull_request for wildcard branches", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: {
|
||||
push: { branches: ["feature/*"] },
|
||||
pull_request: { branches: "feature/moose" },
|
||||
},
|
||||
});
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when HEAD^2 is checked out", (t) => {
|
||||
(0, ava_1.default)("getWorkflowErrors() when HEAD^2 is checked out", async (t) => {
|
||||
process.env.GITHUB_JOB = "test";
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: ["push", "pull_request"],
|
||||
jobs: { test: { steps: [{ run: "git checkout HEAD^2" }] } },
|
||||
});
|
||||
}, await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.CheckoutWrongHead]));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() produces an error for workflow with language name and its alias", async (t) => {
|
||||
await testLanguageAliases(t, ["java", "kotlin"], { java: ["java-kotlin", "kotlin"] }, [
|
||||
"CodeQL language 'java' is referenced by more than one entry in the 'language' matrix " +
|
||||
"parameter for job 'test'. This may result in duplicate alerts. Please edit the 'language' " +
|
||||
"matrix parameter to keep only one of the following: 'java', 'kotlin'.",
|
||||
]);
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() produces an error for workflow with two aliases same language", async (t) => {
|
||||
await testLanguageAliases(t, ["java-kotlin", "kotlin"], { java: ["java-kotlin", "kotlin"] }, [
|
||||
"CodeQL language 'java' is referenced by more than one entry in the 'language' matrix " +
|
||||
"parameter for job 'test'. This may result in duplicate alerts. Please edit the 'language' " +
|
||||
"matrix parameter to keep only one of the following: 'java-kotlin', 'kotlin'.",
|
||||
]);
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() does not produce an error for workflow with two distinct languages", async (t) => {
|
||||
await testLanguageAliases(t, ["java", "typescript"], {
|
||||
java: ["java-kotlin", "kotlin"],
|
||||
javascript: ["javascript-typescript", "typescript"],
|
||||
}, []);
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() does not produce an error if codeql doesn't support language aliases", async (t) => {
|
||||
await testLanguageAliases(t, ["java-kotlin", "kotlin"], undefined, []);
|
||||
});
|
||||
async function testLanguageAliases(t, matrixLanguages, aliases, expectedErrorMessages) {
|
||||
process.env.GITHUB_JOB = "test";
|
||||
const codeql = await (0, codeql_1.getCodeQLForTesting)();
|
||||
sinon.stub(codeql, "betterResolveLanguages").resolves({
|
||||
aliases: aliases !== undefined
|
||||
? // Remap from languageName -> aliases to alias -> languageName
|
||||
Object.assign({}, ...Object.entries(aliases).flatMap(([language, languageAliases]) => languageAliases.map((alias) => ({
|
||||
[alias]: language,
|
||||
}))))
|
||||
: undefined,
|
||||
extractors: {
|
||||
java: [
|
||||
{
|
||||
extractor_root: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)({
|
||||
on: ["push", "pull_request"],
|
||||
jobs: {
|
||||
test: {
|
||||
strategy: {
|
||||
matrix: {
|
||||
language: matrixLanguages,
|
||||
},
|
||||
},
|
||||
steps: [
|
||||
{ uses: "actions/checkout@v2" },
|
||||
{ uses: "github/codeql-action/init@v2" },
|
||||
{ uses: "github/codeql-action/analyze@v2" },
|
||||
],
|
||||
},
|
||||
},
|
||||
}, codeql);
|
||||
t.is(errors.length, expectedErrorMessages.length);
|
||||
t.deepEqual(errors.map((e) => e.message), expectedErrorMessages);
|
||||
}
|
||||
(0, ava_1.default)("formatWorkflowErrors() when there is one error", (t) => {
|
||||
const message = (0, workflow_1.formatWorkflowErrors)([workflow_1.WorkflowErrors.CheckoutWrongHead]);
|
||||
t.true(message.startsWith("1 issue was detected with this workflow:"));
|
||||
@@ -213,19 +269,19 @@ function errorCodes(actual, expected) {
|
||||
t.true((0, workflow_1.patternIsSuperset)("/robin/*/release/*", "/robin/moose/release/goose"));
|
||||
t.false((0, workflow_1.patternIsSuperset)("/robin/moose/release/goose", "/robin/*/release/*"));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when branches contain dots", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
(0, ava_1.default)("getWorkflowErrors() when branches contain dots", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
on:
|
||||
push:
|
||||
branches: [4.1, master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [4.1, master]
|
||||
`));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push has a trailing comma", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push has a trailing comma", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
@@ -233,12 +289,12 @@ function errorCodes(actual, expected) {
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
`));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() should only report the current job's CheckoutWrongHead", (t) => {
|
||||
(0, ava_1.default)("getWorkflowErrors() should only report the current job's CheckoutWrongHead", async (t) => {
|
||||
process.env.GITHUB_JOB = "test";
|
||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
@@ -257,12 +313,12 @@ function errorCodes(actual, expected) {
|
||||
|
||||
test3:
|
||||
steps: []
|
||||
`));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.CheckoutWrongHead]));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() should not report a different job's CheckoutWrongHead", (t) => {
|
||||
(0, ava_1.default)("getWorkflowErrors() should not report a different job's CheckoutWrongHead", async (t) => {
|
||||
process.env.GITHUB_JOB = "test3";
|
||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
@@ -281,41 +337,41 @@ function errorCodes(actual, expected) {
|
||||
|
||||
test3:
|
||||
steps: []
|
||||
`));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on is missing", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
(0, ava_1.default)("getWorkflowErrors() when on is missing", async (t) => {
|
||||
const errors = await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
`));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)());
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() with a different on setup", (t) => {
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
(0, ava_1.default)("getWorkflowErrors() with a different on setup", async (t) => {
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on: "workflow_dispatch"
|
||||
`)), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on: [workflow_dispatch]
|
||||
`)), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
`)), []));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() should not report an error if PRs are totally unconfigured", (t) => {
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
(0, ava_1.default)("getWorkflowErrors() should not report an error if PRs are totally unconfigured", async (t) => {
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
`)), []));
|
||||
t.deepEqual(...errorCodes((0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
t.deepEqual(...errorCodes(await (0, workflow_1.getWorkflowErrors)(yaml.load(`
|
||||
name: "CodeQL"
|
||||
on: ["push"]
|
||||
`)), []));
|
||||
`), await (0, codeql_1.getCodeQLForTesting)()), []));
|
||||
});
|
||||
(0, ava_1.default)("getCategoryInputOrThrow returns category for simple workflow with category", (t) => {
|
||||
process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository";
|
||||
|
||||
File diff suppressed because one or more lines are too long
265
node_modules/.package-lock.json
generated
vendored
265
node_modules/.package-lock.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codeql",
|
||||
"version": "2.21.7",
|
||||
"version": "2.21.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -14,9 +14,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/artifact": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.1.tgz",
|
||||
"integrity": "sha512-Vv4y0EW0ptEkU+Pjs5RGS/0EryTvI6s79LjSV9Gg/h+O3H/ddpjhuX/Bi/HZE4pbNPyjGtQjbdFWphkZhmgabA==",
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-1.1.2.tgz",
|
||||
"integrity": "sha512-1gLONA4xw3/Q/9vGxKwkFdV9u1LE2RWGx/IpAqg28ZjprCnJFjwn4pA7LtShqg5mg5WhMek2fjpyH1leCmOlQQ==",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/http-client": "^2.0.1",
|
||||
@@ -59,9 +59,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
|
||||
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
|
||||
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
|
||||
"dependencies": {
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"uuid": "^8.3.2"
|
||||
@@ -448,9 +448,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "8.48.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.48.0.tgz",
|
||||
"integrity": "sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==",
|
||||
"version": "8.50.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz",
|
||||
"integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -463,9 +463,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@humanwhocodes/config-array": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
|
||||
"integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==",
|
||||
"version": "0.11.11",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz",
|
||||
"integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@humanwhocodes/object-schema": "^1.2.1",
|
||||
@@ -762,13 +762,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/types": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-11.1.0.tgz",
|
||||
"integrity": "sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==",
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.0.0.tgz",
|
||||
"integrity": "sha512-EzD434aHTFifGudYAygnFlS1Tl6KhbTynEWELQXIbTY8Msvb5nEqTZIm7sbPEt4mQYLZwu3zPKVdeIrw0g7ovg==",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^18.0.0"
|
||||
"@octokit/openapi-types": "^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/types/node_modules/@octokit/openapi-types": {
|
||||
"version": "19.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.0.0.tgz",
|
||||
"integrity": "sha512-PclQ6JGMTE9iUStpzMkwLCISFn/wDeRjkZFIKALpvJQNBGwDoYYi2fFvuHwssoQ1rXI5mfh6jgTgWuddeUzfWw=="
|
||||
},
|
||||
"node_modules/@opentelemetry/api": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz",
|
||||
@@ -835,9 +840,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/adm-zip": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.0.tgz",
|
||||
"integrity": "sha512-FCJBJq9ODsQZUNURo5ILAQueuA8WJhRvuihS3ke2iI25mJlfV2LK8jG2Qj2z2AWg8U0FtWWqBHVRetceLskSaw==",
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.2.tgz",
|
||||
"integrity": "sha512-33OTTnnW3onOE6HJuoqsi7T7Ojupz7zO/Vs5ddRNVCYQnu4lg05RqH/pr9eidHGvGyYfdO4uPO9cvegAMixBCQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
@@ -855,15 +860,15 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/js-yaml": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.5.tgz",
|
||||
"integrity": "sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==",
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.6.tgz",
|
||||
"integrity": "sha512-ACTuifTSIIbyksx2HTon3aFtCKWcID7/h3XEmRpDYdMCXxPbl+m9GteOJeaAkiAta/NJaSFuA7ahZ0NkwajDSw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz",
|
||||
"integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==",
|
||||
"version": "7.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
|
||||
"integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/json5": {
|
||||
@@ -900,15 +905,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
"version": "7.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.1.tgz",
|
||||
"integrity": "sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==",
|
||||
"version": "7.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
|
||||
"integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/sinon": {
|
||||
"version": "10.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz",
|
||||
"integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==",
|
||||
"version": "10.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.17.tgz",
|
||||
"integrity": "sha512-+6ILpcixQ0Ma3dHMTLv4rSycbDXkDljgKL+E0nI2RUxxhYTFyPSjt6RVMxh7jUshvyVcBvicb0Ktj+lAJcjgeA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/sinonjs__fake-timers": "*"
|
||||
@@ -929,21 +934,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/uuid": {
|
||||
"version": "9.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.3.tgz",
|
||||
"integrity": "sha512-taHQQH/3ZyI3zP8M/puluDEIEvtQHVYcC6y3N8ijFtAd28+Ey/G4sg1u2gB01S8MwybLOKAp9/yCMu/uR5l3Ug=="
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.4.tgz",
|
||||
"integrity": "sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA=="
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.5.0.tgz",
|
||||
"integrity": "sha512-2pktILyjvMaScU6iK3925uvGU87E+N9rh372uGZgiMYwafaw9SXq86U04XPq3UH6tzRvNgBsub6x2DacHc33lw==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz",
|
||||
"integrity": "sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.5.1",
|
||||
"@typescript-eslint/scope-manager": "6.5.0",
|
||||
"@typescript-eslint/type-utils": "6.5.0",
|
||||
"@typescript-eslint/utils": "6.5.0",
|
||||
"@typescript-eslint/visitor-keys": "6.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.7.2",
|
||||
"@typescript-eslint/type-utils": "6.7.2",
|
||||
"@typescript-eslint/utils": "6.7.2",
|
||||
"@typescript-eslint/visitor-keys": "6.7.2",
|
||||
"debug": "^4.3.4",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
@@ -969,15 +974,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.6.0.tgz",
|
||||
"integrity": "sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.2.tgz",
|
||||
"integrity": "sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "6.6.0",
|
||||
"@typescript-eslint/types": "6.6.0",
|
||||
"@typescript-eslint/typescript-estree": "6.6.0",
|
||||
"@typescript-eslint/visitor-keys": "6.6.0",
|
||||
"@typescript-eslint/scope-manager": "6.7.2",
|
||||
"@typescript-eslint/types": "6.7.2",
|
||||
"@typescript-eslint/typescript-estree": "6.7.2",
|
||||
"@typescript-eslint/visitor-keys": "6.7.2",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -996,88 +1001,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.6.0.tgz",
|
||||
"integrity": "sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.6.0",
|
||||
"@typescript-eslint/visitor-keys": "6.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.6.0.tgz",
|
||||
"integrity": "sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.6.0.tgz",
|
||||
"integrity": "sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.6.0",
|
||||
"@typescript-eslint/visitor-keys": "6.6.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.5.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "6.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.6.0.tgz",
|
||||
"integrity": "sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.6.0",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz",
|
||||
"integrity": "sha512-A8hZ7OlxURricpycp5kdPTH3XnjG85UpJS6Fn4VzeoH4T388gQJ/PGP4ole5NfKt4WDVhmLaQ/dBLNDC4Xl/Kw==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz",
|
||||
"integrity": "sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.5.0",
|
||||
"@typescript-eslint/visitor-keys": "6.5.0"
|
||||
"@typescript-eslint/types": "6.7.2",
|
||||
"@typescript-eslint/visitor-keys": "6.7.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@@ -1088,13 +1019,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.5.0.tgz",
|
||||
"integrity": "sha512-f7OcZOkRivtujIBQ4yrJNIuwyCQO1OjocVqntl9dgSIZAdKqicj3xFDqDOzHDlGCZX990LqhLQXWRnQvsapq8A==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz",
|
||||
"integrity": "sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "6.5.0",
|
||||
"@typescript-eslint/utils": "6.5.0",
|
||||
"@typescript-eslint/typescript-estree": "6.7.2",
|
||||
"@typescript-eslint/utils": "6.7.2",
|
||||
"debug": "^4.3.4",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
@@ -1115,9 +1046,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.5.0.tgz",
|
||||
"integrity": "sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.2.tgz",
|
||||
"integrity": "sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
@@ -1128,13 +1059,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz",
|
||||
"integrity": "sha512-q0rGwSe9e5Kk/XzliB9h2LBc9tmXX25G0833r7kffbl5437FPWb2tbpIV9wAATebC/018pGa9fwPDuvGN+LxWQ==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz",
|
||||
"integrity": "sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.5.0",
|
||||
"@typescript-eslint/visitor-keys": "6.5.0",
|
||||
"@typescript-eslint/types": "6.7.2",
|
||||
"@typescript-eslint/visitor-keys": "6.7.2",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -1155,17 +1086,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.5.0.tgz",
|
||||
"integrity": "sha512-9nqtjkNykFzeVtt9Pj6lyR9WEdd8npPhhIPM992FWVkZuS6tmxHfGVnlUcjpUP2hv8r4w35nT33mlxd+Be1ACQ==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.2.tgz",
|
||||
"integrity": "sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/json-schema": "^7.0.12",
|
||||
"@types/semver": "^7.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.5.0",
|
||||
"@typescript-eslint/types": "6.5.0",
|
||||
"@typescript-eslint/typescript-estree": "6.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.7.2",
|
||||
"@typescript-eslint/types": "6.7.2",
|
||||
"@typescript-eslint/typescript-estree": "6.7.2",
|
||||
"semver": "^7.5.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1180,12 +1111,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz",
|
||||
"integrity": "sha512-yCB/2wkbv3hPsh02ZS8dFQnij9VVQXJMN/gbQsaaY+zxALkZnxa/wagvLEFsAWMPv7d7lxQmNsIzGU1w/T/WyA==",
|
||||
"version": "6.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz",
|
||||
"integrity": "sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "6.5.0",
|
||||
"@typescript-eslint/types": "6.7.2",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2539,16 +2470,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.48.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.48.0.tgz",
|
||||
"integrity": "sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==",
|
||||
"version": "8.50.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz",
|
||||
"integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.6.1",
|
||||
"@eslint/eslintrc": "^2.1.2",
|
||||
"@eslint/js": "8.48.0",
|
||||
"@humanwhocodes/config-array": "^0.11.10",
|
||||
"@eslint/js": "8.50.0",
|
||||
"@humanwhocodes/config-array": "^0.11.11",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
"ajv": "^6.12.4",
|
||||
@@ -2625,9 +2556,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-import-resolver-typescript": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz",
|
||||
"integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==",
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz",
|
||||
"integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
@@ -5514,9 +5445,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sinon": {
|
||||
"version": "15.2.0",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-15.2.0.tgz",
|
||||
"integrity": "sha512-nPS85arNqwBXaIsFCkolHjGIkFo+Oxu9vbgmBJizLAhqe6P2o3Qmj3KCUoRkfhHtvgDhZdWD3risLHAUJ8npjw==",
|
||||
"version": "16.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-16.0.0.tgz",
|
||||
"integrity": "sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@sinonjs/commons": "^3.0.0",
|
||||
@@ -6157,9 +6088,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
|
||||
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==",
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
|
||||
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
|
||||
"funding": [
|
||||
"https://github.com/sponsors/broofa",
|
||||
"https://github.com/sponsors/ctavan"
|
||||
],
|
||||
"bin": {
|
||||
"uuid": "dist/bin/uuid"
|
||||
}
|
||||
|
||||
38
node_modules/@actions/artifact/lib/internal/artifact-client.js
generated
vendored
38
node_modules/@actions/artifact/lib/internal/artifact-client.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
@@ -52,9 +56,9 @@ class DefaultArtifactClient {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
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);
|
||||
(0, 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 uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files);
|
||||
const uploadResponse = {
|
||||
artifactName: name,
|
||||
artifactItems: [],
|
||||
@@ -113,20 +117,20 @@ Note: The size of downloaded zips can differ significantly from the reported siz
|
||||
}
|
||||
const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl);
|
||||
if (!path) {
|
||||
path = config_variables_1.getWorkSpaceDirectory();
|
||||
path = (0, config_variables_1.getWorkSpaceDirectory)();
|
||||
}
|
||||
path = path_1.normalize(path);
|
||||
path = path_1.resolve(path);
|
||||
path = (0, path_1.normalize)(path);
|
||||
path = (0, path_1.resolve)(path);
|
||||
// During upload, empty directories are rejected by the remote server so there should be no artifacts that consist of only empty directories
|
||||
const downloadSpecification = download_specification_1.getDownloadSpecification(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
|
||||
const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false);
|
||||
if (downloadSpecification.filesToDownload.length === 0) {
|
||||
core.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`);
|
||||
}
|
||||
else {
|
||||
// Create all necessary directories recursively before starting any download
|
||||
yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
|
||||
core.info('Directory structure has been setup for the artifact');
|
||||
yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
|
||||
yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure);
|
||||
core.info('Directory structure has been set up for the artifact');
|
||||
yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate);
|
||||
yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
|
||||
}
|
||||
return {
|
||||
@@ -145,10 +149,10 @@ Note: The size of downloaded zips can differ significantly from the reported siz
|
||||
return response;
|
||||
}
|
||||
if (!path) {
|
||||
path = config_variables_1.getWorkSpaceDirectory();
|
||||
path = (0, config_variables_1.getWorkSpaceDirectory)();
|
||||
}
|
||||
path = path_1.normalize(path);
|
||||
path = path_1.resolve(path);
|
||||
path = (0, path_1.normalize)(path);
|
||||
path = (0, path_1.resolve)(path);
|
||||
let downloadedArtifacts = 0;
|
||||
while (downloadedArtifacts < artifacts.count) {
|
||||
const currentArtifactToDownload = artifacts.value[downloadedArtifacts];
|
||||
@@ -156,13 +160,13 @@ Note: The size of downloaded zips can differ significantly from the reported siz
|
||||
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);
|
||||
const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path, true);
|
||||
if (downloadSpecification.filesToDownload.length === 0) {
|
||||
core.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`);
|
||||
}
|
||||
else {
|
||||
yield utils_1.createDirectoriesForArtifact(downloadSpecification.directoryStructure);
|
||||
yield utils_1.createEmptyFilesForArtifact(downloadSpecification.emptyFilesToCreate);
|
||||
yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure);
|
||||
yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate);
|
||||
yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload);
|
||||
}
|
||||
response.push({
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/artifact-client.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/artifact-client.js.map
generated
vendored
@@ -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,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,EACr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AA;QACjB,CAAC;KAAA;CACF;AAhOD,sDAgOC"}
|
||||
{"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,IAAA,qDAAiB,EAAC,IAAI,CAAC,CAAA;YAEvB,iDAAiD;YACjD,MAAM,mBAAmB,GAA0B,IAAA,6CAAsB,EACvE,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,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,6BAA6B,CACnE,IAAI,EACJ,OAAO,CACR,CAAA;gBACD,IAAI,CAAC,QAAQ,CAAC,wBAAwB,EAAE;oBACtC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;oBAC/B,MAAM,IAAI,KAAK,CACb,kEA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ACJ,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,IAAA,oCAA4B,EAChC,qBAAqB,CAAC,kBAAkB,CACzC,CAAA;oBACD,MAAM,IAAA,mCAA2B,EAC/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
node_modules/@actions/artifact/lib/internal/config-variables.d.ts
generated
vendored
1
node_modules/@actions/artifact/lib/internal/config-variables.d.ts
generated
vendored
@@ -9,3 +9,4 @@ export declare function getRuntimeUrl(): string;
|
||||
export declare function getWorkFlowRunId(): string;
|
||||
export declare function getWorkSpaceDirectory(): string;
|
||||
export declare function getRetentionDays(): string | undefined;
|
||||
export declare function isGhes(): boolean;
|
||||
|
||||
7
node_modules/@actions/artifact/lib/internal/config-variables.js
generated
vendored
7
node_modules/@actions/artifact/lib/internal/config-variables.js
generated
vendored
@@ -1,6 +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;
|
||||
exports.isGhes = 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;
|
||||
@@ -69,4 +69,9 @@ function getRetentionDays() {
|
||||
return process.env['GITHUB_RETENTION_DAYS'];
|
||||
}
|
||||
exports.getRetentionDays = getRetentionDays;
|
||||
function isGhes() {
|
||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
||||
}
|
||||
exports.isGhes = isGhes;
|
||||
//# sourceMappingURL=config-variables.js.map
|
||||
2
node_modules/@actions/artifact/lib/internal/config-variables.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/config-variables.js.map
generated
vendored
@@ -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"}
|
||||
{"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,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;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;AAED,SAAgB,MAAM;IACpB,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,oBAAoB,CACzD,CAAA;IACD,OAAO,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,YAAY,CAAA;AACtD,CAAC;AALD,wBAKC"}
|
||||
2
node_modules/@actions/artifact/lib/internal/crc64.d.ts
generated
vendored
2
node_modules/@actions/artifact/lib/internal/crc64.d.ts
generated
vendored
@@ -9,7 +9,7 @@
|
||||
* is used for Azure Storage: https://github.com/Azure/azure-storage-net/blob/cbe605f9faa01bfc3003d75fc5a16b2eaccfe102/Lib/Common/Core/Util/Crc64.cs#L27
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
export declare type CRC64DigestEncoding = 'hex' | 'base64' | 'buffer';
|
||||
export type CRC64DigestEncoding = 'hex' | 'base64' | 'buffer';
|
||||
declare class CRC64 {
|
||||
private _crc;
|
||||
constructor();
|
||||
|
||||
56
node_modules/@actions/artifact/lib/internal/download-http-client.js
generated
vendored
56
node_modules/@actions/artifact/lib/internal/download-http-client.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
@@ -41,7 +45,7 @@ const config_variables_1 = require("./config-variables");
|
||||
const requestUtils_1 = require("./requestUtils");
|
||||
class DownloadHttpClient {
|
||||
constructor() {
|
||||
this.downloadHttpManager = new http_manager_1.HttpManager(config_variables_1.getDownloadFileConcurrency(), '@actions/artifact-download');
|
||||
this.downloadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getDownloadFileConcurrency)(), '@actions/artifact-download');
|
||||
// downloads are usually significantly faster than uploads so display status information every second
|
||||
this.statusReporter = new status_reporter_1.StatusReporter(1000);
|
||||
}
|
||||
@@ -50,11 +54,11 @@ class DownloadHttpClient {
|
||||
*/
|
||||
listArtifacts() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const artifactUrl = utils_1.getArtifactUrl();
|
||||
const artifactUrl = (0, utils_1.getArtifactUrl)();
|
||||
// use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately
|
||||
const client = this.downloadHttpManager.getClient(0);
|
||||
const headers = utils_1.getDownloadHeaders('application/json');
|
||||
const response = yield requestUtils_1.retryHttpClientRequest('List Artifacts', () => __awaiter(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); }));
|
||||
const headers = (0, utils_1.getDownloadHeaders)('application/json');
|
||||
const response = yield (0, requestUtils_1.retryHttpClientRequest)('List Artifacts', () => __awaiter(this, void 0, void 0, function* () { return client.get(artifactUrl, headers); }));
|
||||
const body = yield response.readBody();
|
||||
return JSON.parse(body);
|
||||
});
|
||||
@@ -71,8 +75,8 @@ class DownloadHttpClient {
|
||||
resourceUrl.searchParams.append('itemPath', artifactName);
|
||||
// use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately
|
||||
const client = this.downloadHttpManager.getClient(0);
|
||||
const headers = utils_1.getDownloadHeaders('application/json');
|
||||
const response = yield requestUtils_1.retryHttpClientRequest('Get Container Items', () => __awaiter(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); }));
|
||||
const headers = (0, utils_1.getDownloadHeaders)('application/json');
|
||||
const response = yield (0, requestUtils_1.retryHttpClientRequest)('Get Container Items', () => __awaiter(this, void 0, void 0, function* () { return client.get(resourceUrl.toString(), headers); }));
|
||||
const body = yield response.readBody();
|
||||
return JSON.parse(body);
|
||||
});
|
||||
@@ -83,7 +87,7 @@ class DownloadHttpClient {
|
||||
*/
|
||||
downloadSingleArtifact(downloadItems) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const DOWNLOAD_CONCURRENCY = config_variables_1.getDownloadFileConcurrency();
|
||||
const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)();
|
||||
// limit the number of files downloaded at a single time
|
||||
core.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`);
|
||||
const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()];
|
||||
@@ -123,9 +127,9 @@ class DownloadHttpClient {
|
||||
downloadIndividualFile(httpClientIndex, artifactLocation, downloadPath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let retryCount = 0;
|
||||
const retryLimit = config_variables_1.getRetryLimit();
|
||||
const retryLimit = (0, config_variables_1.getRetryLimit)();
|
||||
let destinationStream = fs.createWriteStream(downloadPath);
|
||||
const headers = utils_1.getDownloadHeaders('application/json', true, true);
|
||||
const headers = (0, utils_1.getDownloadHeaders)('application/json', true, true);
|
||||
// a single GET request is used to download a file
|
||||
const makeDownloadRequest = () => __awaiter(this, void 0, void 0, function* () {
|
||||
const client = this.downloadHttpManager.getClient(httpClientIndex);
|
||||
@@ -149,13 +153,13 @@ class DownloadHttpClient {
|
||||
if (retryAfterValue) {
|
||||
// Back off by waiting the specified time denoted by the retry-after header
|
||||
core.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`);
|
||||
yield utils_1.sleep(retryAfterValue);
|
||||
yield (0, utils_1.sleep)(retryAfterValue);
|
||||
}
|
||||
else {
|
||||
// Back off using an exponential value that depends on the retry count
|
||||
const backoffTime = utils_1.getExponentialRetryTimeInMilliseconds(retryCount);
|
||||
const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount);
|
||||
core.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`);
|
||||
yield utils_1.sleep(backoffTime);
|
||||
yield (0, utils_1.sleep)(backoffTime);
|
||||
}
|
||||
core.info(`Finished backoff for retry #${retryCount}, continuing with download`);
|
||||
}
|
||||
@@ -179,7 +183,7 @@ class DownloadHttpClient {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
yield utils_1.rmFile(fileDownloadPath);
|
||||
yield (0, utils_1.rmFile)(fileDownloadPath);
|
||||
destinationStream = fs.createWriteStream(fileDownloadPath);
|
||||
});
|
||||
// keep trying to download a file until a retry limit has been reached
|
||||
@@ -198,7 +202,7 @@ class DownloadHttpClient {
|
||||
continue;
|
||||
}
|
||||
let forceRetry = false;
|
||||
if (utils_1.isSuccessStatusCode(response.message.statusCode)) {
|
||||
if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) {
|
||||
// The body contains the contents of the file however calling response.readBody() causes all the content to be converted to a string
|
||||
// which can cause some gzip encoded data to be lost
|
||||
// Instead of using response.readBody(), response.message is a readableStream that can be directly used to get the raw body contents
|
||||
@@ -206,7 +210,7 @@ class DownloadHttpClient {
|
||||
const isGzipped = isGzip(response.message.headers);
|
||||
yield this.pipeResponseToFile(response, destinationStream, isGzipped);
|
||||
if (isGzipped ||
|
||||
isAllBytesReceived(response.message.headers['content-length'], yield utils_1.getFileSize(downloadPath))) {
|
||||
isAllBytesReceived(response.message.headers['content-length'], yield (0, utils_1.getFileSize)(downloadPath))) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
@@ -218,17 +222,17 @@ class DownloadHttpClient {
|
||||
forceRetry = true;
|
||||
}
|
||||
}
|
||||
if (forceRetry || utils_1.isRetryableStatusCode(response.message.statusCode)) {
|
||||
if (forceRetry || (0, utils_1.isRetryableStatusCode)(response.message.statusCode)) {
|
||||
core.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`);
|
||||
resetDestinationStream(downloadPath);
|
||||
// if a throttled status code is received, try to get the retryAfter header value, else differ to standard exponential backoff
|
||||
utils_1.isThrottledStatusCode(response.message.statusCode)
|
||||
? yield backOff(utils_1.tryGetRetryAfterValueTimeInMilliseconds(response.message.headers))
|
||||
(0, utils_1.isThrottledStatusCode)(response.message.statusCode)
|
||||
? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers))
|
||||
: yield backOff();
|
||||
}
|
||||
else {
|
||||
// Some unexpected response code, fail immediately and stop the download
|
||||
utils_1.displayHttpDiagnostics(response);
|
||||
(0, utils_1.displayHttpDiagnostics)(response);
|
||||
return Promise.reject(new Error(`Unexpected http ${response.message.statusCode} during download for ${artifactLocation}`));
|
||||
}
|
||||
}
|
||||
@@ -247,14 +251,14 @@ class DownloadHttpClient {
|
||||
const gunzip = zlib.createGunzip();
|
||||
response.message
|
||||
.on('error', error => {
|
||||
core.error(`An error occurred while attempting to read the response stream`);
|
||||
core.info(`An error occurred while attempting to read the response stream`);
|
||||
gunzip.close();
|
||||
destinationStream.close();
|
||||
reject(error);
|
||||
})
|
||||
.pipe(gunzip)
|
||||
.on('error', error => {
|
||||
core.error(`An error occurred while attempting to decompress the response stream`);
|
||||
core.info(`An error occurred while attempting to decompress the response stream`);
|
||||
destinationStream.close();
|
||||
reject(error);
|
||||
})
|
||||
@@ -263,14 +267,14 @@ class DownloadHttpClient {
|
||||
resolve();
|
||||
})
|
||||
.on('error', error => {
|
||||
core.error(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
||||
core.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
else {
|
||||
response.message
|
||||
.on('error', error => {
|
||||
core.error(`An error occurred while attempting to read the response stream`);
|
||||
core.info(`An error occurred while attempting to read the response stream`);
|
||||
destinationStream.close();
|
||||
reject(error);
|
||||
})
|
||||
@@ -279,7 +283,7 @@ class DownloadHttpClient {
|
||||
resolve();
|
||||
})
|
||||
.on('error', error => {
|
||||
core.error(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
||||
core.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`);
|
||||
reject(error);
|
||||
});
|
||||
}
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/download-http-client.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/download-http-client.js.map
generated
vendored
File diff suppressed because one or more lines are too long
8
node_modules/@actions/artifact/lib/internal/download-specification.js
generated
vendored
8
node_modules/@actions/artifact/lib/internal/download-specification.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/download-specification.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/download-specification.js.map
generated
vendored
@@ -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"}
|
||||
{"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,EA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/artifact/lib/internal/http-manager.js
generated
vendored
4
node_modules/@actions/artifact/lib/internal/http-manager.js
generated
vendored
@@ -11,7 +11,7 @@ class HttpManager {
|
||||
throw new Error('There must be at least one client');
|
||||
}
|
||||
this.userAgent = userAgent;
|
||||
this.clients = new Array(clientCount).fill(utils_1.createHttpClient(userAgent));
|
||||
this.clients = new Array(clientCount).fill((0, utils_1.createHttpClient)(userAgent));
|
||||
}
|
||||
getClient(index) {
|
||||
return this.clients[index];
|
||||
@@ -20,7 +20,7 @@ class HttpManager {
|
||||
// for more information see: https://github.com/actions/http-client/blob/04e5ad73cd3fd1f5610a32116b0759eddf6570d2/index.ts#L292
|
||||
disposeAndReplaceClient(index) {
|
||||
this.clients[index].dispose();
|
||||
this.clients[index] = utils_1.createHttpClient(this.userAgent);
|
||||
this.clients[index] = (0, utils_1.createHttpClient)(this.userAgent);
|
||||
}
|
||||
disposeAndReplaceAllClients() {
|
||||
for (const [index] of this.clients.entries()) {
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/http-manager.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/http-manager.js.map
generated
vendored
@@ -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,mGAAm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AAO,EAAE,EAAE;YAC5C,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAA;SACpC;IACH,CAAC;CACF;AA5BD,kCA4BC"}
|
||||
2
node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js
generated
vendored
2
node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js
generated
vendored
@@ -42,7 +42,7 @@ Invalid characters include: ${Array.from(invalidArtifactNameCharacters.values())
|
||||
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!`);
|
||||
(0, core_1.info)(`Artifact name is valid!`);
|
||||
}
|
||||
exports.checkArtifactName = checkArtifactName;
|
||||
/**
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/path-and-artifact-name-validation.js.map
generated
vendored
@@ -1 +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"}
|
||||
{"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;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nE;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"}
|
||||
20
node_modules/@actions/artifact/lib/internal/requestUtils.js
generated
vendored
20
node_modules/@actions/artifact/lib/internal/requestUtils.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
@@ -44,14 +48,14 @@ function retry(name, operation, customErrorMessages, maxAttempts) {
|
||||
try {
|
||||
response = yield operation();
|
||||
statusCode = response.message.statusCode;
|
||||
if (utils_1.isSuccessStatusCode(statusCode)) {
|
||||
if ((0, utils_1.isSuccessStatusCode)(statusCode)) {
|
||||
return response;
|
||||
}
|
||||
// Extra error information that we want to display if a particular response code is hit
|
||||
if (statusCode) {
|
||||
customErrorInformation = customErrorMessages.get(statusCode);
|
||||
}
|
||||
isRetryable = utils_1.isRetryableStatusCode(statusCode);
|
||||
isRetryable = (0, utils_1.isRetryableStatusCode)(statusCode);
|
||||
errorMessage = `Artifact service responded with ${statusCode}`;
|
||||
}
|
||||
catch (error) {
|
||||
@@ -61,16 +65,16 @@ function retry(name, operation, customErrorMessages, maxAttempts) {
|
||||
if (!isRetryable) {
|
||||
core.info(`${name} - Error is not retryable`);
|
||||
if (response) {
|
||||
utils_1.displayHttpDiagnostics(response);
|
||||
(0, utils_1.displayHttpDiagnostics)(response);
|
||||
}
|
||||
break;
|
||||
}
|
||||
core.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`);
|
||||
yield utils_1.sleep(utils_1.getExponentialRetryTimeInMilliseconds(attempt));
|
||||
yield (0, utils_1.sleep)((0, utils_1.getExponentialRetryTimeInMilliseconds)(attempt));
|
||||
attempt++;
|
||||
}
|
||||
if (response) {
|
||||
utils_1.displayHttpDiagnostics(response);
|
||||
(0, utils_1.displayHttpDiagnostics)(response);
|
||||
}
|
||||
if (customErrorInformation) {
|
||||
throw Error(`${name} failed: ${customErrorInformation}`);
|
||||
@@ -79,7 +83,7 @@ function retry(name, operation, customErrorMessages, maxAttempts) {
|
||||
});
|
||||
}
|
||||
exports.retry = retry;
|
||||
function retryHttpClientRequest(name, method, customErrorMessages = new Map(), maxAttempts = config_variables_1.getRetryLimit()) {
|
||||
function retryHttpClientRequest(name, method, customErrorMessages = new Map(), maxAttempts = (0, config_variables_1.getRetryLimit)()) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield retry(name, method, customErrorMessages, maxAttempts);
|
||||
});
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/requestUtils.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/requestUtils.js.map
generated
vendored
@@ -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,SAA4C,EAC5C,mBAAwC,EACxC,WAAmB;;QAEnB,IAAI,QAAQ,GAAmC,SAAS,CAAA;QACxD,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,CAA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AA1DD,sBA0DC;AAED,SAAsB,sBAAsB,CAC1C,IAAY,EACZ,MAAyC,EACzC,sBAA2C,IAAI,GAAG,EAAE,EACpD,WAAW,GAAG,IAAA,gCAAa,GAAE;;QAE7B,OAAO,MAAM,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,WAAW,CAAC,CAAA;IACpE,CAAC;CAAA;AAPD,wDAOC"}
|
||||
4
node_modules/@actions/artifact/lib/internal/status-reporter.js
generated
vendored
4
node_modules/@actions/artifact/lib/internal/status-reporter.js
generated
vendored
@@ -26,14 +26,14 @@ class StatusReporter {
|
||||
this.totalFileStatus = setInterval(() => {
|
||||
// display 1 decimal place without any rounding
|
||||
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)}%)`);
|
||||
(0, core_1.info)(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${percentage.slice(0, percentage.indexOf('.') + 2)}%)`);
|
||||
}, this.displayFrequencyInMilliseconds);
|
||||
}
|
||||
// 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, chunkStartIndex, chunkEndIndex, totalUploadFileSize) {
|
||||
// display 1 decimal place without any rounding
|
||||
const percentage = this.formatPercentage(chunkEndIndex, totalUploadFileSize);
|
||||
core_1.info(`Uploaded ${fileName} (${percentage.slice(0, percentage.indexOf('.') + 2)}%) bytes ${chunkStartIndex}:${chunkEndIndex}`);
|
||||
(0, core_1.info)(`Uploaded ${fileName} (${percentage.slice(0, percentage.indexOf('.') + 2)}%) bytes ${chunkStartIndex}:${chunkEndIndex}`);
|
||||
}
|
||||
stop() {
|
||||
if (this.totalFileStatus) {
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/status-reporter.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/status-reporter.js.map
generated
vendored
@@ -1 +1 @@
|
||||
{"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"}
|
||||
{"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,IAAA,WAAI,EACF,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,IAAA,WAAI,EACF,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"}
|
||||
52
node_modules/@actions/artifact/lib/internal/upload-gzip.js
generated
vendored
52
node_modules/@actions/artifact/lib/internal/upload-gzip.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
@@ -39,19 +43,34 @@ 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);
|
||||
const stat = (0, 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 = [
|
||||
'.gz',
|
||||
'.gzip',
|
||||
'.tgz',
|
||||
'.taz',
|
||||
'.Z',
|
||||
'.taZ',
|
||||
'.bz2',
|
||||
'.tbz',
|
||||
'.tbz2',
|
||||
'.tz2',
|
||||
'.lz',
|
||||
'.lzma',
|
||||
'.tlz',
|
||||
'.lzo',
|
||||
'.xz',
|
||||
'.txz',
|
||||
'.zst',
|
||||
'.zstd',
|
||||
'.tzst',
|
||||
'.zip',
|
||||
'.tar.lz',
|
||||
'.tar.gz',
|
||||
'.tar.bz2',
|
||||
'.7z'
|
||||
'.7z' // 7ZIP
|
||||
];
|
||||
/**
|
||||
* Creates a Gzip compressed file of an original file at the provided temporary filepath location
|
||||
@@ -80,7 +99,7 @@ function createGZipFileOnDisk(originalFilePath, tempFilePath) {
|
||||
outputStream.on('error', error => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
reject;
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -94,22 +113,29 @@ exports.createGZipFileOnDisk = createGZipFileOnDisk;
|
||||
function createGZipFileInBuffer(originalFilePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
||||
var e_1, _a;
|
||||
var _a, e_1, _b, _c;
|
||||
const inputStream = fs.createReadStream(originalFilePath);
|
||||
const gzip = zlib.createGzip();
|
||||
inputStream.pipe(gzip);
|
||||
// read stream into buffer, using experimental async iterators see https://github.com/nodejs/readable-stream/issues/403#issuecomment-479069043
|
||||
const chunks = [];
|
||||
try {
|
||||
for (var gzip_1 = __asyncValues(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), !gzip_1_1.done;) {
|
||||
const chunk = gzip_1_1.value;
|
||||
chunks.push(chunk);
|
||||
for (var _d = true, gzip_1 = __asyncValues(gzip), gzip_1_1; gzip_1_1 = yield gzip_1.next(), _a = gzip_1_1.done, !_a;) {
|
||||
_c = gzip_1_1.value;
|
||||
_d = false;
|
||||
try {
|
||||
const chunk = _c;
|
||||
chunks.push(chunk);
|
||||
}
|
||||
finally {
|
||||
_d = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (gzip_1_1 && !gzip_1_1.done && (_a = gzip_1.return)) yield _a.call(gzip_1);
|
||||
if (!_d && !_a && (_b = gzip_1.return)) yield _b.call(gzip_1);
|
||||
}
|
||||
finally { if (e_1) throw e_1.error; }
|
||||
}
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/upload-gzip.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/upload-gzip.js.map
generated
vendored
@@ -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;;;;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,CACxC,gBAAwB,EACxB,YAAoB;;QAEpB,KAAK,MAAM,mBAAmB,IAAI,wBAAwB,EAAE;YAC1D,IAAI,gBAAgB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;gBAClD,uEAAuE;gBACvE,OAAO,MAAM,CAAC,gBAAgB,CAAA;aAC/B;SACF;QAED,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,CAA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,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA;AA3BD,oDA2BC;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,GAAiB,EAAE,CAAA;;gBAC/B,KAA0B,eAAA,SAAA,cAAA,IAAI,CAAA,UAAA;oBAAJ,oBAAI;oBAAJ,WAAI;;wBAAnB,MAAM,KAAK,KAAA,CAAA;wBACpB,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"}
|
||||
64
node_modules/@actions/artifact/lib/internal/upload-http-client.js
generated
vendored
64
node_modules/@actions/artifact/lib/internal/upload-http-client.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
@@ -43,10 +47,10 @@ const http_client_1 = require("@actions/http-client");
|
||||
const http_manager_1 = require("./http-manager");
|
||||
const upload_gzip_1 = require("./upload-gzip");
|
||||
const requestUtils_1 = require("./requestUtils");
|
||||
const stat = util_1.promisify(fs.stat);
|
||||
const stat = (0, util_1.promisify)(fs.stat);
|
||||
class UploadHttpClient {
|
||||
constructor() {
|
||||
this.uploadHttpManager = new http_manager_1.HttpManager(config_variables_1.getUploadFileConcurrency(), '@actions/artifact-upload');
|
||||
this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), '@actions/artifact-upload');
|
||||
this.statusReporter = new status_reporter_1.StatusReporter(10000);
|
||||
}
|
||||
/**
|
||||
@@ -62,28 +66,30 @@ class UploadHttpClient {
|
||||
};
|
||||
// calculate retention period
|
||||
if (options && options.retentionDays) {
|
||||
const maxRetentionStr = config_variables_1.getRetentionDays();
|
||||
parameters.RetentionDays = utils_1.getProperRetention(options.retentionDays, maxRetentionStr);
|
||||
const maxRetentionStr = (0, config_variables_1.getRetentionDays)();
|
||||
parameters.RetentionDays = (0, utils_1.getProperRetention)(options.retentionDays, maxRetentionStr);
|
||||
}
|
||||
const data = JSON.stringify(parameters, null, 2);
|
||||
const artifactUrl = utils_1.getArtifactUrl();
|
||||
const artifactUrl = (0, utils_1.getArtifactUrl)();
|
||||
// use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately
|
||||
const client = this.uploadHttpManager.getClient(0);
|
||||
const headers = utils_1.getUploadHeaders('application/json', false);
|
||||
const headers = (0, utils_1.getUploadHeaders)('application/json', false);
|
||||
// Extra information to display when a particular HTTP code is returned
|
||||
// If a 403 is returned when trying to create a file container, the customer has exceeded
|
||||
// their storage quota so no new artifact containers can be created
|
||||
const customErrorMessages = new Map([
|
||||
[
|
||||
http_client_1.HttpCodes.Forbidden,
|
||||
'Artifact storage quota has been hit. Unable to upload any new artifacts'
|
||||
(0, config_variables_1.isGhes)()
|
||||
? 'Please reference [Enabling GitHub Actions for GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.8/admin/github-actions/enabling-github-actions-for-github-enterprise-server) to ensure Actions storage is configured correctly.'
|
||||
: 'Artifact storage quota has been hit. Unable to upload any new artifacts'
|
||||
],
|
||||
[
|
||||
http_client_1.HttpCodes.BadRequest,
|
||||
`The artifact name ${artifactName} is not valid. Request URL ${artifactUrl}`
|
||||
]
|
||||
]);
|
||||
const response = yield requestUtils_1.retryHttpClientRequest('Create Artifact Container', () => __awaiter(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages);
|
||||
const response = yield (0, requestUtils_1.retryHttpClientRequest)('Create Artifact Container', () => __awaiter(this, void 0, void 0, function* () { return client.post(artifactUrl, data, headers); }), customErrorMessages);
|
||||
const body = yield response.readBody();
|
||||
return JSON.parse(body);
|
||||
});
|
||||
@@ -96,8 +102,8 @@ class UploadHttpClient {
|
||||
*/
|
||||
uploadArtifactToFileContainer(uploadUrl, filesToUpload, options) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const FILE_CONCURRENCY = config_variables_1.getUploadFileConcurrency();
|
||||
const MAX_CHUNK_SIZE = config_variables_1.getUploadChunkSize();
|
||||
const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)();
|
||||
const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)();
|
||||
core.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`);
|
||||
const parameters = [];
|
||||
// by default, file uploads will continue if there is an error unless specified differently in the options
|
||||
@@ -187,7 +193,7 @@ class UploadHttpClient {
|
||||
// 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);
|
||||
const buffer = yield (0, 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,
|
||||
// it will not properly get reset to the start of the stream if a chunk upload needs to be retried
|
||||
let openUploadStream;
|
||||
@@ -227,7 +233,7 @@ class UploadHttpClient {
|
||||
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);
|
||||
uploadFileSize = yield (0, 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
|
||||
// for named pipes totalFileSize is zero, this assumes compression did help
|
||||
@@ -300,22 +306,22 @@ class UploadHttpClient {
|
||||
uploadChunk(httpClientIndex, resourceUrl, openStream, start, end, uploadFileSize, isGzip, totalFileSize) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// open a new stream and read it to compute the digest
|
||||
const digest = yield utils_1.digestForStream(openStream());
|
||||
const digest = yield (0, utils_1.digestForStream)(openStream());
|
||||
// prepare all the necessary headers before making any http call
|
||||
const headers = utils_1.getUploadHeaders('application/octet-stream', true, isGzip, totalFileSize, end - start + 1, utils_1.getContentRange(start, end, uploadFileSize), digest);
|
||||
const headers = (0, utils_1.getUploadHeaders)('application/octet-stream', true, isGzip, totalFileSize, end - start + 1, (0, utils_1.getContentRange)(start, end, uploadFileSize), digest);
|
||||
const uploadChunkRequest = () => __awaiter(this, void 0, void 0, function* () {
|
||||
const client = this.uploadHttpManager.getClient(httpClientIndex);
|
||||
return yield client.sendStream('PUT', resourceUrl, openStream(), headers);
|
||||
});
|
||||
let retryCount = 0;
|
||||
const retryLimit = config_variables_1.getRetryLimit();
|
||||
const retryLimit = (0, config_variables_1.getRetryLimit)();
|
||||
// Increments the current retry count and then checks if the retry limit has been reached
|
||||
// If there have been too many retries, fail so the download stops
|
||||
const incrementAndCheckRetryLimit = (response) => {
|
||||
retryCount++;
|
||||
if (retryCount > retryLimit) {
|
||||
if (response) {
|
||||
utils_1.displayHttpDiagnostics(response);
|
||||
(0, utils_1.displayHttpDiagnostics)(response);
|
||||
}
|
||||
core.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`);
|
||||
return true;
|
||||
@@ -326,12 +332,12 @@ class UploadHttpClient {
|
||||
this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex);
|
||||
if (retryAfterValue) {
|
||||
core.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`);
|
||||
yield utils_1.sleep(retryAfterValue);
|
||||
yield (0, utils_1.sleep)(retryAfterValue);
|
||||
}
|
||||
else {
|
||||
const backoffTime = utils_1.getExponentialRetryTimeInMilliseconds(retryCount);
|
||||
const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount);
|
||||
core.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`);
|
||||
yield utils_1.sleep(backoffTime);
|
||||
yield (0, utils_1.sleep)(backoffTime);
|
||||
}
|
||||
core.info(`Finished backoff for retry #${retryCount}, continuing with upload`);
|
||||
return;
|
||||
@@ -356,21 +362,21 @@ class UploadHttpClient {
|
||||
// Always read the body of the response. There is potential for a resource leak if the body is not read which will
|
||||
// result in the connection remaining open along with unintended consequences when trying to dispose of the client
|
||||
yield response.readBody();
|
||||
if (utils_1.isSuccessStatusCode(response.message.statusCode)) {
|
||||
if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) {
|
||||
return true;
|
||||
}
|
||||
else if (utils_1.isRetryableStatusCode(response.message.statusCode)) {
|
||||
else if ((0, utils_1.isRetryableStatusCode)(response.message.statusCode)) {
|
||||
core.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`);
|
||||
if (incrementAndCheckRetryLimit(response)) {
|
||||
return false;
|
||||
}
|
||||
utils_1.isThrottledStatusCode(response.message.statusCode)
|
||||
? yield backOff(utils_1.tryGetRetryAfterValueTimeInMilliseconds(response.message.headers))
|
||||
(0, utils_1.isThrottledStatusCode)(response.message.statusCode)
|
||||
? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers))
|
||||
: yield backOff();
|
||||
}
|
||||
else {
|
||||
core.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`);
|
||||
utils_1.displayHttpDiagnostics(response);
|
||||
(0, utils_1.displayHttpDiagnostics)(response);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -383,14 +389,14 @@ class UploadHttpClient {
|
||||
*/
|
||||
patchArtifactSize(size, artifactName) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const resourceUrl = new url_1.URL(utils_1.getArtifactUrl());
|
||||
const resourceUrl = new url_1.URL((0, utils_1.getArtifactUrl)());
|
||||
resourceUrl.searchParams.append('artifactName', artifactName);
|
||||
const parameters = { Size: size };
|
||||
const data = JSON.stringify(parameters, null, 2);
|
||||
core.debug(`URL is ${resourceUrl.toString()}`);
|
||||
// use the first client from the httpManager, `keep-alive` is not used so the connection will close immediately
|
||||
const client = this.uploadHttpManager.getClient(0);
|
||||
const headers = utils_1.getUploadHeaders('application/json', false);
|
||||
const headers = (0, utils_1.getUploadHeaders)('application/json', false);
|
||||
// Extra information to display when a particular HTTP code is returned
|
||||
const customErrorMessages = new Map([
|
||||
[
|
||||
@@ -399,7 +405,7 @@ class UploadHttpClient {
|
||||
]
|
||||
]);
|
||||
// TODO retry for all possible response codes, the artifact upload is pretty much complete so it at all costs we should try to finish this
|
||||
const response = yield requestUtils_1.retryHttpClientRequest('Finalize artifact upload', () => __awaiter(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages);
|
||||
const response = yield (0, requestUtils_1.retryHttpClientRequest)('Finalize artifact upload', () => __awaiter(this, void 0, void 0, function* () { return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages);
|
||||
yield response.readBody();
|
||||
core.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`);
|
||||
});
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/upload-http-client.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/upload-http-client.js.map
generated
vendored
File diff suppressed because one or more lines are too long
26
node_modules/@actions/artifact/lib/internal/upload-specification.js
generated
vendored
26
node_modules/@actions/artifact/lib/internal/upload-specification.js
generated
vendored
@@ -1,7 +1,11 @@
|
||||
"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]; } });
|
||||
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];
|
||||
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
||||
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);
|
||||
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;
|
||||
};
|
||||
@@ -36,12 +40,12 @@ function getUploadSpecification(artifactName, rootDirectory, artifactFiles) {
|
||||
if (!fs.existsSync(rootDirectory)) {
|
||||
throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`);
|
||||
}
|
||||
if (!fs.lstatSync(rootDirectory).isDirectory()) {
|
||||
if (!fs.statSync(rootDirectory).isDirectory()) {
|
||||
throw new Error(`Provided rootDirectory ${rootDirectory} is not a valid directory`);
|
||||
}
|
||||
// Normalize and resolve, this allows for either absolute or relative paths to be used
|
||||
rootDirectory = path_1.normalize(rootDirectory);
|
||||
rootDirectory = path_1.resolve(rootDirectory);
|
||||
rootDirectory = (0, path_1.normalize)(rootDirectory);
|
||||
rootDirectory = (0, path_1.resolve)(rootDirectory);
|
||||
/*
|
||||
Example to demonstrate behavior
|
||||
|
||||
@@ -65,16 +69,16 @@ function getUploadSpecification(artifactName, rootDirectory, artifactFiles) {
|
||||
if (!fs.existsSync(file)) {
|
||||
throw new Error(`File ${file} does not exist`);
|
||||
}
|
||||
if (!fs.lstatSync(file).isDirectory()) {
|
||||
if (!fs.statSync(file).isDirectory()) {
|
||||
// Normalize and resolve, this allows for either absolute or relative paths to be used
|
||||
file = path_1.normalize(file);
|
||||
file = path_1.resolve(file);
|
||||
file = (0, path_1.normalize)(file);
|
||||
file = (0, path_1.resolve)(file);
|
||||
if (!file.startsWith(rootDirectory)) {
|
||||
throw new Error(`The rootDirectory: ${rootDirectory} is not a parent directory of the file: ${file}`);
|
||||
}
|
||||
// Check for forbidden characters in file paths that will be rejected during upload
|
||||
const uploadPath = file.replace(rootDirectory, '');
|
||||
path_and_artifact_name_validation_1.checkArtifactFilePath(uploadPath);
|
||||
(0, 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
|
||||
@@ -87,12 +91,12 @@ function getUploadSpecification(artifactName, rootDirectory, artifactFiles) {
|
||||
*/
|
||||
specifications.push({
|
||||
absoluteFilePath: file,
|
||||
uploadFilePath: path_1.join(artifactName, uploadPath)
|
||||
uploadFilePath: (0, path_1.join)(artifactName, uploadPath)
|
||||
});
|
||||
}
|
||||
else {
|
||||
// Directories are rejected by the server during upload
|
||||
core_1.debug(`Removing ${file} from rawSearchResults because it is a directory`);
|
||||
(0, core_1.debug)(`Removing ${file} from rawSearchResults because it is a directory`);
|
||||
}
|
||||
}
|
||||
return specifications;
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/upload-specification.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/upload-specification.js.map
generated
vendored
@@ -1 +1 @@
|
||||
{"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"}
|
||||
{"version":3,"file":"upload-specification.js","sourceRoot":"","sources":["../../src/internal/upload-specification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,wCAAmC;AACnC,+BAA6C;AAC7C,2FAAyE;AAOzE;;;;;GAK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ACF,cAAc,CAAC,IAAI,CAAC;gBAClB,gBAAgB,EAAE,IAAI;gBACtB,cAAc,EAAE,IAAA,WAAI,EAAC,YAAY,EAAE,UAAU,CAAC;aAC/C,CAAC,CAAA;SACH;aAAM;YACL,uDAAuD;YACvD,IAAA,YAAK,EAAC,YAAY,IAAI,kDAAkD,CAAC,CAAA;SAC1E;KACF;IACD,OAAO,cAAc,CAAA;AACvB,CAAC;AA7ED,wDA6EC"}
|
||||
1
node_modules/@actions/artifact/lib/internal/utils.d.ts
generated
vendored
1
node_modules/@actions/artifact/lib/internal/utils.d.ts
generated
vendored
@@ -1,4 +1,5 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
|
||||
import { HttpClient, HttpClientResponse } from '@actions/http-client';
|
||||
/**
|
||||
|
||||
24
node_modules/@actions/artifact/lib/internal/utils.js
generated
vendored
24
node_modules/@actions/artifact/lib/internal/utils.js
generated
vendored
@@ -29,10 +29,10 @@ function getExponentialRetryTimeInMilliseconds(retryCount) {
|
||||
throw new Error('RetryCount should not be negative');
|
||||
}
|
||||
else if (retryCount === 0) {
|
||||
return config_variables_1.getInitialRetryIntervalInMilliseconds();
|
||||
return (0, config_variables_1.getInitialRetryIntervalInMilliseconds)();
|
||||
}
|
||||
const minTime = config_variables_1.getInitialRetryIntervalInMilliseconds() * config_variables_1.getRetryMultiplier() * retryCount;
|
||||
const maxTime = minTime * config_variables_1.getRetryMultiplier();
|
||||
const minTime = (0, config_variables_1.getInitialRetryIntervalInMilliseconds)() * (0, config_variables_1.getRetryMultiplier)() * retryCount;
|
||||
const maxTime = minTime * (0, config_variables_1.getRetryMultiplier)();
|
||||
// returns a random number between the minTime (inclusive) and the maxTime (exclusive)
|
||||
return Math.trunc(Math.random() * (maxTime - minTime) + minTime);
|
||||
}
|
||||
@@ -100,13 +100,13 @@ function tryGetRetryAfterValueTimeInMilliseconds(headers) {
|
||||
if (headers['retry-after']) {
|
||||
const retryTime = Number(headers['retry-after']);
|
||||
if (!isNaN(retryTime)) {
|
||||
core_1.info(`Retry-After header is present with a value of ${retryTime}`);
|
||||
(0, core_1.info)(`Retry-After header is present with a value of ${retryTime}`);
|
||||
return retryTime * 1000;
|
||||
}
|
||||
core_1.info(`Returned retry-after header value: ${retryTime} is non-numeric and cannot be used`);
|
||||
(0, core_1.info)(`Returned retry-after header value: ${retryTime} is non-numeric and cannot be used`);
|
||||
return undefined;
|
||||
}
|
||||
core_1.info(`No retry-after header was found. Dumping all headers for diagnostic purposes`);
|
||||
(0, core_1.info)(`No retry-after header was found. Dumping all headers for diagnostic purposes`);
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(headers);
|
||||
return undefined;
|
||||
@@ -190,13 +190,13 @@ function getUploadHeaders(contentType, isKeepAlive, isGzip, uncompressedLength,
|
||||
exports.getUploadHeaders = getUploadHeaders;
|
||||
function createHttpClient(userAgent) {
|
||||
return new http_client_1.HttpClient(userAgent, [
|
||||
new auth_1.BearerCredentialHandler(config_variables_1.getRuntimeToken())
|
||||
new auth_1.BearerCredentialHandler((0, config_variables_1.getRuntimeToken)())
|
||||
]);
|
||||
}
|
||||
exports.createHttpClient = createHttpClient;
|
||||
function getArtifactUrl() {
|
||||
const artifactUrl = `${config_variables_1.getRuntimeUrl()}_apis/pipelines/workflows/${config_variables_1.getWorkFlowRunId()}/artifacts?api-version=${getApiVersion()}`;
|
||||
core_1.debug(`Artifact Url: ${artifactUrl}`);
|
||||
const artifactUrl = `${(0, config_variables_1.getRuntimeUrl)()}_apis/pipelines/workflows/${(0, config_variables_1.getWorkFlowRunId)()}/artifacts?api-version=${getApiVersion()}`;
|
||||
(0, core_1.debug)(`Artifact Url: ${artifactUrl}`);
|
||||
return artifactUrl;
|
||||
}
|
||||
exports.getArtifactUrl = getArtifactUrl;
|
||||
@@ -210,7 +210,7 @@ exports.getArtifactUrl = getArtifactUrl;
|
||||
* Other information such as the headers, the response code and message might be useful, so this is displayed.
|
||||
*/
|
||||
function displayHttpDiagnostics(response) {
|
||||
core_1.info(`##### Begin Diagnostic HTTP information #####
|
||||
(0, core_1.info)(`##### Begin Diagnostic HTTP information #####
|
||||
Status Code: ${response.message.statusCode}
|
||||
Status Message: ${response.message.statusMessage}
|
||||
Header Information: ${JSON.stringify(response.message.headers, undefined, 2)}
|
||||
@@ -238,7 +238,7 @@ exports.createEmptyFilesForArtifact = createEmptyFilesForArtifact;
|
||||
function getFileSize(filePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const stats = yield fs_1.promises.stat(filePath);
|
||||
core_1.debug(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`);
|
||||
(0, core_1.debug)(`${filePath} size:(${stats.size}) blksize:(${stats.blksize}) blocks:(${stats.blocks})`);
|
||||
return stats.size;
|
||||
});
|
||||
}
|
||||
@@ -257,7 +257,7 @@ function getProperRetention(retentionInput, retentionSetting) {
|
||||
if (retentionSetting) {
|
||||
const maxRetention = parseInt(retentionSetting);
|
||||
if (!isNaN(maxRetention) && maxRetention < retention) {
|
||||
core_1.warning(`Retention days is greater than the max value allowed by the repository setting, reduce retention to ${maxRetention} days`);
|
||||
(0, core_1.warning)(`Retention days is greater than the max value allowed by the repository setting, reduce retention to ${maxRetention} days`);
|
||||
retention = maxRetention;
|
||||
}
|
||||
}
|
||||
|
||||
2
node_modules/@actions/artifact/lib/internal/utils.js.map
generated
vendored
2
node_modules/@actions/artifact/lib/internal/utils.js.map
generated
vendored
File diff suppressed because one or more lines are too long
8
node_modules/@actions/artifact/package.json
generated
vendored
8
node_modules/@actions/artifact/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/artifact",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"preview": true,
|
||||
"description": "Actions artifact lib",
|
||||
"keywords": [
|
||||
@@ -31,7 +31,9 @@
|
||||
"scripts": {
|
||||
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||
"tsc": "tsc"
|
||||
"bootstrap": "cd ../../ && npm run bootstrap",
|
||||
"tsc-run": "tsc",
|
||||
"tsc": "npm run bootstrap && npm run tsc-run"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
@@ -44,6 +46,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/tmp": "^0.2.1",
|
||||
"typescript": "^3.8.3"
|
||||
"typescript": "^4.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
4
node_modules/@actions/core/README.md
generated
vendored
4
node_modules/@actions/core/README.md
generated
vendored
@@ -121,7 +121,7 @@ const result = await core.group('Do something async', async () => {
|
||||
|
||||
This library has 3 methods that will produce [annotations](https://docs.github.com/en/rest/reference/checks#create-a-check-run).
|
||||
```js
|
||||
core.error('This is a bad error. This will also fail the build.')
|
||||
core.error('This is a bad error, action may still succeed though.')
|
||||
|
||||
core.warning('Something went wrong, but it\'s not bad enough to fail the build.')
|
||||
|
||||
@@ -163,7 +163,7 @@ export interface AnnotationProperties {
|
||||
startColumn?: number
|
||||
|
||||
/**
|
||||
* The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values.
|
||||
* The end column for the annotation. Cannot be sent when `startLine` and `endLine` are different values.
|
||||
* Defaults to `startColumn` when `startColumn` is provided.
|
||||
*/
|
||||
endColumn?: number
|
||||
|
||||
4
node_modules/@actions/core/lib/core.d.ts
generated
vendored
4
node_modules/@actions/core/lib/core.d.ts
generated
vendored
@@ -21,7 +21,7 @@ export declare enum ExitCode {
|
||||
Failure = 1
|
||||
}
|
||||
/**
|
||||
* Optional properties that can be sent with annotatation commands (notice, error, and warning)
|
||||
* Optional properties that can be sent with annotation commands (notice, error, and warning)
|
||||
* See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations.
|
||||
*/
|
||||
export interface AnnotationProperties {
|
||||
@@ -46,7 +46,7 @@ export interface AnnotationProperties {
|
||||
*/
|
||||
startColumn?: number;
|
||||
/**
|
||||
* The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values.
|
||||
* The end column for the annotation. Cannot be sent when `startLine` and `endLine` are different values.
|
||||
* Defaults to `startColumn` when `startColumn` is provided.
|
||||
*/
|
||||
endColumn?: number;
|
||||
|
||||
2
node_modules/@actions/core/lib/oidc-utils.js
generated
vendored
2
node_modules/@actions/core/lib/oidc-utils.js
generated
vendored
@@ -44,7 +44,7 @@ class OidcClient {
|
||||
.catch(error => {
|
||||
throw new Error(`Failed to get ID Token. \n
|
||||
Error Code : ${error.statusCode}\n
|
||||
Error Message: ${error.result.message}`);
|
||||
Error Message: ${error.message}`);
|
||||
});
|
||||
const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;
|
||||
if (!id_token) {
|
||||
|
||||
2
node_modules/@actions/core/lib/oidc-utils.js.map
generated
vendored
2
node_modules/@actions/core/lib/oidc-utils.js.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"oidc-utils.js","sourceRoot":"","sources":["../src/oidc-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,sDAA+C;AAC/C,wDAAqE;AACrE,iCAAuC;AAKvC,MAAa,UAAU;IACb,MAAM,CAAC,gBAAgB,CAC7B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,EAAE;QAEb,MAAM,cAAc,GAAmB;YACrC,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,QAAQ;SACrB,CAAA;QAED,OAAO,IAAI,wBAAU,CACnB,qBAAqB,EACrB,CAAC,IAAI,8BAAuB,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,EAC3D,cAAc,CACf,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,eAAe;QAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;QAC3D,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,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pC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,IAAI,KAAK,CACb;uBACa,KAAK,CAAC,UAAU;yBACd,KAAK,CAAC,OAAO,EAAE,CAC/B,CAAA;YACH,CAAC,CAAC,CAAA;YAEJ,MAAM,QAAQ,SAAG,GAAG,CAAC,MAAM,0CAAE,KAAK,CAAA;YAClC,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;aACjE;YACD,OAAO,QAAQ,CAAA;;KAChB;IAED,MAAM,CAAO,UAAU,CAAC,QAAiB;;YACvC,IAAI;gBACF,gDAAgD;gBAChD,IAAI,YAAY,GAAW,UAAU,CAAC,aAAa,EAAE,CAAA;gBACrD,IAAI,QAAQ,EAAE;oBACZ,MAAM,eAAe,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;oBACpD,YAAY,GAAG,GAAG,YAAY,aAAa,eAAe,EAAE,CAAA;iBAC7D;gBAED,YAAK,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAA;gBAExC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBACvD,gBAAS,CAAC,QAAQ,CAAC,CAAA;gBACnB,OAAO,QAAQ,CAAA;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;aACnD;QACH,CAAC;KAAA;CACF;AAzED,gCAyEC"}
|
||||
6
node_modules/@actions/core/package.json
generated
vendored
6
node_modules/@actions/core/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/core",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.1",
|
||||
"description": "Actions core lib",
|
||||
"keywords": [
|
||||
"github",
|
||||
@@ -30,7 +30,7 @@
|
||||
"scripts": {
|
||||
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
|
||||
"test": "echo \"Error: run tests from root\" && exit 1",
|
||||
"tsc": "tsc"
|
||||
"tsc": "tsc -p tsconfig.json"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
@@ -43,4 +43,4 @@
|
||||
"@types/node": "^12.0.2",
|
||||
"@types/uuid": "^8.3.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
2
node_modules/@eslint/js/package.json
generated
vendored
2
node_modules/@eslint/js/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@eslint/js",
|
||||
"version": "8.48.0",
|
||||
"version": "8.50.0",
|
||||
"description": "ESLint JavaScript language implementation",
|
||||
"main": "./src/index.js",
|
||||
"scripts": {},
|
||||
|
||||
2
node_modules/@eslint/js/src/configs/eslint-all.js
generated
vendored
2
node_modules/@eslint/js/src/configs/eslint-all.js
generated
vendored
@@ -152,11 +152,11 @@ module.exports = Object.freeze({
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-native-nonconstructor": "error",
|
||||
"no-new-object": "error",
|
||||
"no-new-symbol": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-nonoctal-decimal-escape": "error",
|
||||
"no-obj-calls": "error",
|
||||
"no-object-constructor": "error",
|
||||
"no-octal": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "error",
|
||||
|
||||
122
node_modules/@humanwhocodes/config-array/api.js
generated
vendored
122
node_modules/@humanwhocodes/config-array/api.js
generated
vendored
@@ -14,31 +14,13 @@ var objectSchema = require('@humanwhocodes/object-schema');
|
||||
// Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Assets that a given value is an array.
|
||||
* @param {*} value The value to check.
|
||||
* @returns {void}
|
||||
* @throws {TypeError} When the value is not an array.
|
||||
*/
|
||||
function assertIsArray(value) {
|
||||
if (!Array.isArray(value)) {
|
||||
throw new TypeError('Expected value to be an array.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assets that a given value is an array containing only strings and functions.
|
||||
* @param {*} value The value to check.
|
||||
* @returns {void}
|
||||
* @throws {TypeError} When the value is not an array of strings and functions.
|
||||
*/
|
||||
function assertIsArrayOfStringsAndFunctions(value, name) {
|
||||
assertIsArray(value);
|
||||
|
||||
if (value.some(item => typeof item !== 'string' && typeof item !== 'function')) {
|
||||
throw new TypeError('Expected array to only contain strings.');
|
||||
}
|
||||
}
|
||||
const NOOP_STRATEGY = {
|
||||
required: false,
|
||||
merge() {
|
||||
return undefined;
|
||||
},
|
||||
validate() { }
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Exports
|
||||
@@ -60,6 +42,66 @@ const baseSchema = Object.freeze({
|
||||
}
|
||||
}
|
||||
},
|
||||
files: NOOP_STRATEGY,
|
||||
ignores: NOOP_STRATEGY
|
||||
});
|
||||
|
||||
/**
|
||||
* @fileoverview ConfigSchema
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Asserts that a given value is an array.
|
||||
* @param {*} value The value to check.
|
||||
* @returns {void}
|
||||
* @throws {TypeError} When the value is not an array.
|
||||
*/
|
||||
function assertIsArray(value) {
|
||||
if (!Array.isArray(value)) {
|
||||
throw new TypeError('Expected value to be an array.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that a given value is an array containing only strings and functions.
|
||||
* @param {*} value The value to check.
|
||||
* @returns {void}
|
||||
* @throws {TypeError} When the value is not an array of strings and functions.
|
||||
*/
|
||||
function assertIsArrayOfStringsAndFunctions(value, name) {
|
||||
assertIsArray(value);
|
||||
|
||||
if (value.some(item => typeof item !== 'string' && typeof item !== 'function')) {
|
||||
throw new TypeError('Expected array to only contain strings and functions.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that a given value is a non-empty array.
|
||||
* @param {*} value The value to check.
|
||||
* @returns {void}
|
||||
* @throws {TypeError} When the value is not an array or an empty array.
|
||||
*/
|
||||
function assertIsNonEmptyArray(value) {
|
||||
if (!Array.isArray(value) || value.length === 0) {
|
||||
throw new TypeError('Expected value to be a non-empty array.');
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Exports
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* The schema for `files` and `ignores` that every ConfigArray uses.
|
||||
* @type Object
|
||||
*/
|
||||
const filesAndIgnoresSchema = Object.freeze({
|
||||
files: {
|
||||
required: false,
|
||||
merge() {
|
||||
@@ -68,7 +110,7 @@ const baseSchema = Object.freeze({
|
||||
validate(value) {
|
||||
|
||||
// first check if it's an array
|
||||
assertIsArray(value);
|
||||
assertIsNonEmptyArray(value);
|
||||
|
||||
// then check each member
|
||||
value.forEach(item => {
|
||||
@@ -95,6 +137,7 @@ const baseSchema = Object.freeze({
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -111,6 +154,8 @@ const MINIMATCH_OPTIONS = {
|
||||
|
||||
const CONFIG_TYPES = new Set(['array', 'function']);
|
||||
|
||||
const FILES_AND_IGNORES_SCHEMA = new objectSchema.ObjectSchema(filesAndIgnoresSchema);
|
||||
|
||||
/**
|
||||
* Shorthand for checking if a value is a string.
|
||||
* @param {any} value The value to check.
|
||||
@@ -121,15 +166,23 @@ function isString(value) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the files key of a config object is a nonempty array.
|
||||
* Asserts that the files and ignores keys of a config object are valid as per base schema.
|
||||
* @param {object} config The config object to check.
|
||||
* @returns {void}
|
||||
* @throws {TypeError} If the files key isn't a nonempty array.
|
||||
* @throws {TypeError} If the files and ignores keys of a config object are not valid.
|
||||
*/
|
||||
function assertNonEmptyFilesArray(config) {
|
||||
if (!Array.isArray(config.files) || config.files.length === 0) {
|
||||
throw new TypeError('The files key must be a non-empty array.');
|
||||
function assertValidFilesAndIgnores(config) {
|
||||
if (!config || typeof config !== 'object') {
|
||||
return;
|
||||
}
|
||||
const validateConfig = { };
|
||||
if ('files' in config) {
|
||||
validateConfig.files = config.files;
|
||||
}
|
||||
if ('ignores' in config) {
|
||||
validateConfig.ignores = config.ignores;
|
||||
}
|
||||
FILES_AND_IGNORES_SCHEMA.validate(validateConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,9 +402,6 @@ function pathMatches(filePath, basePath, config) {
|
||||
*/
|
||||
const relativeFilePath = path.relative(basePath, filePath);
|
||||
|
||||
// if files isn't an array, throw an error
|
||||
assertNonEmptyFilesArray(config);
|
||||
|
||||
// match both strings and functions
|
||||
const match = pattern => {
|
||||
|
||||
@@ -658,6 +708,7 @@ class ConfigArray extends Array {
|
||||
const normalizedConfigs = await normalize(this, context, this.extraConfigTypes);
|
||||
this.length = 0;
|
||||
this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig].bind(this)));
|
||||
this.forEach(assertValidFilesAndIgnores);
|
||||
this[ConfigArraySymbol.isNormalized] = true;
|
||||
|
||||
// prevent further changes
|
||||
@@ -679,6 +730,7 @@ class ConfigArray extends Array {
|
||||
const normalizedConfigs = normalizeSync(this, context, this.extraConfigTypes);
|
||||
this.length = 0;
|
||||
this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig].bind(this)));
|
||||
this.forEach(assertValidFilesAndIgnores);
|
||||
this[ConfigArraySymbol.isNormalized] = true;
|
||||
|
||||
// prevent further changes
|
||||
@@ -827,8 +879,6 @@ class ConfigArray extends Array {
|
||||
return;
|
||||
}
|
||||
|
||||
assertNonEmptyFilesArray(config);
|
||||
|
||||
/*
|
||||
* If a config has a files pattern ending in /** or /*, and the
|
||||
* filePath only matches those patterns, then the config is only
|
||||
|
||||
8
node_modules/@humanwhocodes/config-array/package.json
generated
vendored
8
node_modules/@humanwhocodes/config-array/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@humanwhocodes/config-array",
|
||||
"version": "0.11.10",
|
||||
"version": "0.11.11",
|
||||
"description": "Glob-based configuration matching.",
|
||||
"author": "Nicholas C. Zakas",
|
||||
"main": "api.js",
|
||||
@@ -49,13 +49,13 @@
|
||||
"devDependencies": {
|
||||
"@nitpik/javascript": "0.4.0",
|
||||
"@nitpik/node": "0.0.5",
|
||||
"chai": "4.3.7",
|
||||
"chai": "4.3.8",
|
||||
"eslint": "8.41.0",
|
||||
"esm": "3.2.25",
|
||||
"lint-staged": "13.2.2",
|
||||
"lint-staged": "14.0.1",
|
||||
"mocha": "6.2.3",
|
||||
"nyc": "14.1.1",
|
||||
"rollup": "3.20.4",
|
||||
"rollup": "3.28.1",
|
||||
"yorkie": "2.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
2
node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
2
node_modules/@octokit/types/dist-types/VERSION.d.ts
generated
vendored
@@ -1 +1 @@
|
||||
export declare const VERSION = "11.1.0";
|
||||
export declare const VERSION = "12.0.0";
|
||||
|
||||
1606
node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
1606
node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
7
node_modules/@octokit/types/node_modules/@octokit/openapi-types/LICENSE
generated
vendored
Normal file
7
node_modules/@octokit/types/node_modules/@octokit/openapi-types/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2020 Gregor Martynus
|
||||
|
||||
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.
|
||||
17
node_modules/@octokit/types/node_modules/@octokit/openapi-types/README.md
generated
vendored
Normal file
17
node_modules/@octokit/types/node_modules/@octokit/openapi-types/README.md
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# @octokit/openapi-types
|
||||
|
||||
> Generated TypeScript definitions based on GitHub's OpenAPI spec
|
||||
|
||||
This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/)
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { components } from "@octokit/openapi-types";
|
||||
|
||||
type Repository = components["schemas"]["full-repository"];
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
20
node_modules/@octokit/types/node_modules/@octokit/openapi-types/package.json
generated
vendored
Normal file
20
node_modules/@octokit/types/node_modules/@octokit/openapi-types/package.json
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "@octokit/openapi-types",
|
||||
"description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/octokit/openapi-types.ts.git",
|
||||
"directory": "packages/openapi-types"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"version": "19.0.0",
|
||||
"main": "",
|
||||
"types": "types.d.ts",
|
||||
"author": "Gregor Martynus (https://twitter.com/gr2m)",
|
||||
"license": "MIT",
|
||||
"octokit": {
|
||||
"openapi-version": "13.0.0"
|
||||
}
|
||||
}
|
||||
115824
node_modules/@octokit/types/node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
Normal file
115824
node_modules/@octokit/types/node_modules/@octokit/openapi-types/types.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
node_modules/@octokit/types/package.json
generated
vendored
10
node_modules/@octokit/types/package.json
generated
vendored
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@octokit/types",
|
||||
"version": "11.1.0",
|
||||
"version": "12.0.0",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"description": "Shared TypeScript definitions for Octokit projects",
|
||||
"dependencies": {
|
||||
"@octokit/openapi-types": "^18.0.0"
|
||||
"@octokit/openapi-types": "^19.0.0"
|
||||
},
|
||||
"repository": "github:octokit/types.ts",
|
||||
"keywords": [
|
||||
@@ -28,15 +28,15 @@
|
||||
"npm-run-all": "^4.1.5",
|
||||
"pascal-case": "^3.1.1",
|
||||
"prettier": "^3.0.0",
|
||||
"semantic-release": "^21.0.0",
|
||||
"semantic-release": "^22.0.0",
|
||||
"semantic-release-plugin-update-version-in-files": "^1.0.0",
|
||||
"sort-keys": "^5.0.0",
|
||||
"string-to-jsdoc-comment": "^1.0.0",
|
||||
"typedoc": "^0.24.0",
|
||||
"typedoc": "^0.25.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"octokit": {
|
||||
"openapi-version": "12.0.0"
|
||||
"openapi-version": "13.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist-types/**"
|
||||
|
||||
0
node_modules/@types/adm-zip/LICENSE
generated
vendored
Executable file → Normal file
0
node_modules/@types/adm-zip/LICENSE
generated
vendored
Executable file → Normal file
2
node_modules/@types/adm-zip/README.md
generated
vendored
Executable file → Normal file
2
node_modules/@types/adm-zip/README.md
generated
vendored
Executable file → Normal file
@@ -8,7 +8,7 @@ This package contains type definitions for adm-zip (https://github.com/cthackers
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/adm-zip.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 01 Apr 2022 08:01:43 GMT
|
||||
* Last updated: Fri, 22 Sep 2023 18:11:03 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
* Global values: none
|
||||
|
||||
|
||||
20
node_modules/@types/adm-zip/index.d.ts
generated
vendored
Executable file → Normal file
20
node_modules/@types/adm-zip/index.d.ts
generated
vendored
Executable file → Normal file
@@ -9,8 +9,8 @@
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as FS from 'fs';
|
||||
import { Constants } from './util';
|
||||
import * as FS from "fs";
|
||||
import { Constants } from "./util";
|
||||
|
||||
declare class AdmZip {
|
||||
/**
|
||||
@@ -47,7 +47,7 @@ declare class AdmZip {
|
||||
readAsTextAsync(
|
||||
fileName: string | AdmZip.IZipEntry,
|
||||
callback: (data: string, err: string) => void,
|
||||
encoding?: string
|
||||
encoding?: string,
|
||||
): void;
|
||||
/**
|
||||
* Remove the entry from the file or the entry and all its nested directories
|
||||
@@ -115,10 +115,9 @@ declare class AdmZip {
|
||||
localPath: string,
|
||||
callback: (success?: boolean, err?: string) => void,
|
||||
zipPath?: string,
|
||||
filter?: RegExp | ((filename: string) => boolean)
|
||||
filter?: RegExp | ((filename: string) => boolean),
|
||||
): void;
|
||||
/**
|
||||
*
|
||||
* @param localPath - path where files will be extracted
|
||||
* @param props - optional properties
|
||||
* @param props.zipPath - optional path inside zip
|
||||
@@ -126,7 +125,7 @@ declare class AdmZip {
|
||||
*/
|
||||
addLocalFolderPromise(
|
||||
localPath: string,
|
||||
props: { zipPath?: string, filter?: RegExp | ((filename: string) => boolean) }
|
||||
props: { zipPath?: string; filter?: RegExp | ((filename: string) => boolean) },
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Allows you to create a entry (file or directory) in the zip file.
|
||||
@@ -203,7 +202,7 @@ declare class AdmZip {
|
||||
targetPath: string,
|
||||
overwrite?: boolean,
|
||||
keepOriginalPermission?: boolean,
|
||||
password?: string | Buffer
|
||||
password?: string | Buffer,
|
||||
): void;
|
||||
/**
|
||||
* Extracts the entire archive to the given location.
|
||||
@@ -231,10 +230,7 @@ declare class AdmZip {
|
||||
* if a zip was opened and no `targetFileName` is provided, it will
|
||||
* overwrite the opened zip.
|
||||
*/
|
||||
writeZipPromise(
|
||||
targetFileName?: string,
|
||||
props?: { overwrite?: boolean, perm?: number }
|
||||
): Promise<boolean>;
|
||||
writeZipPromise(targetFileName?: string, props?: { overwrite?: boolean; perm?: number }): Promise<boolean>;
|
||||
/**
|
||||
* Returns the content of the entire zip file.
|
||||
*/
|
||||
@@ -371,7 +367,7 @@ declare namespace AdmZip {
|
||||
/* Read entries during load (initial loading may be slower) */
|
||||
readEntries: boolean;
|
||||
/* Read method */
|
||||
method: typeof Constants[keyof typeof Constants] | number;
|
||||
method: (typeof Constants)[keyof typeof Constants] | number;
|
||||
/* file system */
|
||||
fs: null | typeof FS;
|
||||
}
|
||||
|
||||
6
node_modules/@types/adm-zip/package.json
generated
vendored
Executable file → Normal file
6
node_modules/@types/adm-zip/package.json
generated
vendored
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/adm-zip",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.2",
|
||||
"description": "TypeScript definitions for adm-zip",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/adm-zip",
|
||||
"license": "MIT",
|
||||
@@ -42,6 +42,6 @@
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "e7f9407982926b4743453eb7e13bc93b66f3e599200f0d101fe305016af41e50",
|
||||
"typeScriptVersion": "3.9"
|
||||
"typesPublisherContentHash": "760a250ea3b5679cae48f06c02648470299cac3e2afe9f0ab03cffc9d703048d",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
36
node_modules/@types/adm-zip/util.d.ts
generated
vendored
Executable file → Normal file
36
node_modules/@types/adm-zip/util.d.ts
generated
vendored
Executable file → Normal file
@@ -140,3 +140,39 @@ export const Constants: {
|
||||
EF_ZIP64_RHO: 16;
|
||||
EF_ZIP64_DSN: 24;
|
||||
};
|
||||
|
||||
export const Errors: {
|
||||
/* Header error messages */
|
||||
INVALID_LOC: "Invalid LOC header (bad signature)";
|
||||
INVALID_CEN: "Invalid CEN header (bad signature)";
|
||||
INVALID_END: "Invalid END header (bad signature)";
|
||||
|
||||
/* ZipEntry error messages */
|
||||
NO_DATA: "Nothing to decompress";
|
||||
BAD_CRC: "CRC32 checksum failed";
|
||||
FILE_IN_THE_WAY: "There is a file in the way: %s";
|
||||
UNKNOWN_METHOD: "Invalid/unsupported compression method";
|
||||
|
||||
/* Inflater error messages */
|
||||
AVAIL_DATA: "inflate::Available inflate data did not terminate";
|
||||
INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block";
|
||||
TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes";
|
||||
INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths";
|
||||
INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length";
|
||||
INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete";
|
||||
INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths";
|
||||
INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths";
|
||||
INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement";
|
||||
INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)";
|
||||
|
||||
/* ADM-ZIP error messages */
|
||||
CANT_EXTRACT_FILE: "Could not extract the file";
|
||||
CANT_OVERRIDE: "Target file already exists";
|
||||
NO_ZIP: "No zip file was loaded";
|
||||
NO_ENTRY: "Entry doesn't exist";
|
||||
DIRECTORY_CONTENT_ERROR: "A directory cannot have content";
|
||||
FILE_NOT_FOUND: "File not found: %s";
|
||||
NOT_IMPLEMENTED: "Not implemented";
|
||||
INVALID_FILENAME: "Invalid filename";
|
||||
INVALID_FORMAT: "Invalid or unsupported zip format. No END header found";
|
||||
};
|
||||
|
||||
0
node_modules/@types/js-yaml/LICENSE
generated
vendored
Executable file → Normal file
0
node_modules/@types/js-yaml/LICENSE
generated
vendored
Executable file → Normal file
2
node_modules/@types/js-yaml/README.md
generated
vendored
Executable file → Normal file
2
node_modules/@types/js-yaml/README.md
generated
vendored
Executable file → Normal file
@@ -8,7 +8,7 @@ This package contains type definitions for js-yaml (https://github.com/nodeca/js
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-yaml.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 19 Nov 2021 18:01:12 GMT
|
||||
* Last updated: Fri, 15 Sep 2023 20:36:37 GMT
|
||||
* Dependencies: none
|
||||
* Global values: `jsyaml`
|
||||
|
||||
|
||||
2
node_modules/@types/js-yaml/index.d.mts
generated
vendored
Executable file → Normal file
2
node_modules/@types/js-yaml/index.d.mts
generated
vendored
Executable file → Normal file
@@ -1,2 +1,2 @@
|
||||
export * from "./index.js";
|
||||
export { default } from "./index.js";
|
||||
export { default } from "./index.js";
|
||||
|
||||
8
node_modules/@types/js-yaml/index.d.ts
generated
vendored
Executable file → Normal file
8
node_modules/@types/js-yaml/index.d.ts
generated
vendored
Executable file → Normal file
@@ -14,7 +14,7 @@ export function load(str: string, opts?: LoadOptions): unknown;
|
||||
|
||||
export class Type {
|
||||
constructor(tag: string, opts?: TypeConstructorOptions);
|
||||
kind: 'sequence' | 'scalar' | 'mapping' | null;
|
||||
kind: "sequence" | "scalar" | "mapping" | null;
|
||||
resolve(data: any): boolean;
|
||||
construct(data: any, type?: string): any;
|
||||
instanceOf: object | null;
|
||||
@@ -49,7 +49,7 @@ export interface LoadOptions {
|
||||
listener?(this: State, eventType: EventType, state: State): void;
|
||||
}
|
||||
|
||||
export type EventType = 'open' | 'close';
|
||||
export type EventType = "open" | "close";
|
||||
|
||||
export interface State {
|
||||
input: string;
|
||||
@@ -96,7 +96,7 @@ export interface DumpOptions {
|
||||
*/
|
||||
condenseFlow?: boolean | undefined;
|
||||
/** strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. (default: `'`) */
|
||||
quotingType?: "'" | '"' | undefined;
|
||||
quotingType?: "'" | "\"" | undefined;
|
||||
/** if true, all non-key strings will be quoted even if they normally don't need to. (default: false) */
|
||||
forceQuotes?: boolean | undefined;
|
||||
/** callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). */
|
||||
@@ -104,7 +104,7 @@ export interface DumpOptions {
|
||||
}
|
||||
|
||||
export interface TypeConstructorOptions {
|
||||
kind?: 'sequence' | 'scalar' | 'mapping' | undefined;
|
||||
kind?: "sequence" | "scalar" | "mapping" | undefined;
|
||||
resolve?: ((data: any) => boolean) | undefined;
|
||||
construct?: ((data: any, type?: string) => any) | undefined;
|
||||
instanceOf?: object | undefined;
|
||||
|
||||
9
node_modules/@types/js-yaml/package.json
generated
vendored
Executable file → Normal file
9
node_modules/@types/js-yaml/package.json
generated
vendored
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/js-yaml",
|
||||
"version": "4.0.5",
|
||||
"version": "4.0.6",
|
||||
"description": "TypeScript definitions for js-yaml",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-yaml",
|
||||
"license": "MIT",
|
||||
@@ -40,14 +40,15 @@
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "6f40877154edac83ffa22d53a6aca74f151a0d094074c81ce7fb21df57ea5725",
|
||||
"typeScriptVersion": "3.8",
|
||||
"typesPublisherContentHash": "8e1751af80460df710374b485a2020ac8cd91e5c71b39bf7539db59783b56d4d",
|
||||
"typeScriptVersion": "4.5",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": {
|
||||
"import": "./index.d.mts",
|
||||
"default": "./index.d.ts"
|
||||
}
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
}
|
||||
}
|
||||
0
node_modules/@types/json-schema/LICENSE
generated
vendored
Executable file → Normal file
0
node_modules/@types/json-schema/LICENSE
generated
vendored
Executable file → Normal file
2
node_modules/@types/json-schema/README.md
generated
vendored
Executable file → Normal file
2
node_modules/@types/json-schema/README.md
generated
vendored
Executable file → Normal file
@@ -8,7 +8,7 @@ This package contains type definitions for json-schema 4.0, 6.0 and (https://git
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 25 May 2023 20:34:16 GMT
|
||||
* Last updated: Fri, 15 Sep 2023 20:36:37 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
|
||||
62
node_modules/@types/json-schema/index.d.ts
generated
vendored
Executable file → Normal file
62
node_modules/@types/json-schema/index.d.ts
generated
vendored
Executable file → Normal file
@@ -7,22 +7,22 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
//==================================================================================================
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 04
|
||||
//==================================================================================================
|
||||
// ==================================================================================================
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
||||
*/
|
||||
export type JSONSchema4TypeName =
|
||||
| 'string' //
|
||||
| 'number'
|
||||
| 'integer'
|
||||
| 'boolean'
|
||||
| 'object'
|
||||
| 'array'
|
||||
| 'null'
|
||||
| 'any';
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null"
|
||||
| "any";
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
||||
@@ -240,19 +240,19 @@ export interface JSONSchema4 {
|
||||
format?: string | undefined;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 06
|
||||
//==================================================================================================
|
||||
// ==================================================================================================
|
||||
|
||||
export type JSONSchema6TypeName =
|
||||
| 'string' //
|
||||
| 'number'
|
||||
| 'integer'
|
||||
| 'boolean'
|
||||
| 'object'
|
||||
| 'array'
|
||||
| 'null'
|
||||
| 'any';
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null"
|
||||
| "any";
|
||||
|
||||
export type JSONSchema6Type =
|
||||
| string //
|
||||
@@ -556,24 +556,24 @@ export interface JSONSchema6 {
|
||||
format?: string | undefined;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
// ==================================================================================================
|
||||
// JSON Schema Draft 07
|
||||
//==================================================================================================
|
||||
// ==================================================================================================
|
||||
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Primitive type
|
||||
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
||||
*/
|
||||
export type JSONSchema7TypeName =
|
||||
| 'string' //
|
||||
| 'number'
|
||||
| 'integer'
|
||||
| 'boolean'
|
||||
| 'object'
|
||||
| 'array'
|
||||
| 'null';
|
||||
| "string" //
|
||||
| "number"
|
||||
| "integer"
|
||||
| "boolean"
|
||||
| "object"
|
||||
| "array"
|
||||
| "null";
|
||||
|
||||
/**
|
||||
* Primitive type
|
||||
@@ -625,7 +625,7 @@ export interface JSONSchema7 {
|
||||
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
||||
*/
|
||||
$defs?: {
|
||||
[key: string]: JSONSchema7Definition;
|
||||
[key: string]: JSONSchema7Definition;
|
||||
} | undefined;
|
||||
|
||||
/**
|
||||
|
||||
6
node_modules/@types/json-schema/package.json
generated
vendored
Executable file → Normal file
6
node_modules/@types/json-schema/package.json
generated
vendored
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@types/json-schema",
|
||||
"version": "7.0.12",
|
||||
"version": "7.0.13",
|
||||
"description": "TypeScript definitions for json-schema 4.0, 6.0 and",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema",
|
||||
"license": "MIT",
|
||||
@@ -35,6 +35,6 @@
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "839fb01aad39138bdff54a832897abf7c18b3e294fd2aacb7e43442825a7f1d3",
|
||||
"typeScriptVersion": "4.3"
|
||||
"typesPublisherContentHash": "85f3277dfcda7a00b7ff8c2ad838d5d9dc8ecaccbaee5f6d53252195d6818981",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
0
node_modules/@types/semver/LICENSE
generated
vendored
Executable file → Normal file
0
node_modules/@types/semver/LICENSE
generated
vendored
Executable file → Normal file
2
node_modules/@types/semver/README.md
generated
vendored
Executable file → Normal file
2
node_modules/@types/semver/README.md
generated
vendored
Executable file → Normal file
@@ -8,7 +8,7 @@ This package contains type definitions for semver (https://github.com/npm/node-s
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 28 Aug 2023 15:34:56 GMT
|
||||
* Last updated: Mon, 25 Sep 2023 13:39:06 GMT
|
||||
* Dependencies: none
|
||||
* Global values: none
|
||||
|
||||
|
||||
6
node_modules/@types/semver/classes/comparator.d.ts
generated
vendored
Executable file → Normal file
6
node_modules/@types/semver/classes/comparator.d.ts
generated
vendored
Executable file → Normal file
@@ -1,11 +1,11 @@
|
||||
import semver = require('../index');
|
||||
import SemVer = require('./semver');
|
||||
import semver = require("../index");
|
||||
import SemVer = require("./semver");
|
||||
|
||||
declare class Comparator {
|
||||
constructor(comp: string | Comparator, optionsOrLoose?: boolean | semver.Options);
|
||||
|
||||
semver: SemVer;
|
||||
operator: '' | '=' | '<' | '>' | '<=' | '>=';
|
||||
operator: "" | "=" | "<" | ">" | "<=" | ">=";
|
||||
value: string;
|
||||
loose: boolean;
|
||||
options: semver.Options;
|
||||
|
||||
6
node_modules/@types/semver/classes/range.d.ts
generated
vendored
Executable file → Normal file
6
node_modules/@types/semver/classes/range.d.ts
generated
vendored
Executable file → Normal file
@@ -1,6 +1,6 @@
|
||||
import semver = require('../index');
|
||||
import Comparator = require('./comparator');
|
||||
import SemVer = require('./semver');
|
||||
import semver = require("../index");
|
||||
import Comparator = require("./comparator");
|
||||
import SemVer = require("./semver");
|
||||
|
||||
declare class Range {
|
||||
constructor(range: string | Range, optionsOrLoose?: boolean | semver.RangeOptions);
|
||||
|
||||
2
node_modules/@types/semver/classes/semver.d.ts
generated
vendored
Executable file → Normal file
2
node_modules/@types/semver/classes/semver.d.ts
generated
vendored
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
import semver = require('../index');
|
||||
import semver = require("../index");
|
||||
|
||||
declare class SemVer {
|
||||
constructor(version: string | SemVer, optionsOrLoose?: boolean | semver.RangeOptions);
|
||||
|
||||
2
node_modules/@types/semver/functions/clean.d.ts
generated
vendored
Executable file → Normal file
2
node_modules/@types/semver/functions/clean.d.ts
generated
vendored
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
import semver = require('../index');
|
||||
import semver = require("../index");
|
||||
|
||||
/**
|
||||
* Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) and parsed version, or null if version is invalid.
|
||||
|
||||
4
node_modules/@types/semver/functions/cmp.d.ts
generated
vendored
Executable file → Normal file
4
node_modules/@types/semver/functions/cmp.d.ts
generated
vendored
Executable file → Normal file
@@ -1,5 +1,5 @@
|
||||
import semver = require('../index');
|
||||
import SemVer = require('../classes/semver');
|
||||
import semver = require("../index");
|
||||
import SemVer = require("../classes/semver");
|
||||
|
||||
/**
|
||||
* Pass in a comparison string, and it'll call the corresponding semver comparison function.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user