mirror of
https://github.com/actions/cache.git
synced 2025-06-26 04:11:10 +02:00
Compare commits
23 Commits
v3.0.1
...
vsvipul/al
Author | SHA1 | Date | |
---|---|---|---|
bdb21a7177 | |||
d55d005ab0 | |||
b44d6c5cbf | |||
60742c2acf | |||
12086c7bbf | |||
626c44ce85 | |||
f2d5621efc | |||
cab6d27614 | |||
69811fd677 | |||
887b9060fe | |||
c6762fdd6a | |||
95c3ae75f4 | |||
797382fe42 | |||
36dbd93a7c | |||
45f362d0ca | |||
ca0688b4ab | |||
ef8498dcba | |||
8f1e2e0286 | |||
48af2dc4a9 | |||
f63a711791 | |||
770a27cf65 | |||
c2131abcd8 | |||
575160481d |
17
.github/auto_assign.yml
vendored
Normal file
17
.github/auto_assign.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Set to true to add reviewers to pull requests
|
||||||
|
addReviewers: true
|
||||||
|
|
||||||
|
# Set to true to add assignees to pull requests
|
||||||
|
addAssignees: false
|
||||||
|
|
||||||
|
# A list of reviewers to be added to pull requests (GitHub user name)
|
||||||
|
reviewers:
|
||||||
|
- phantsure
|
||||||
|
- aparna-ravindra
|
||||||
|
- tiwarishub
|
||||||
|
- vsvipul
|
||||||
|
- bishal-pdmsft
|
||||||
|
|
||||||
|
# A number of reviewers added to the pull request
|
||||||
|
# Set 0 to add all the reviewers (default: 0)
|
||||||
|
numberOfReviewers: 1
|
15
.github/workflows/auto-assign-issues.yml
vendored
Normal file
15
.github/workflows/auto-assign-issues.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: Issue assignment
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-assign:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 'Auto-assign issue'
|
||||||
|
uses: pozil/auto-assign-issue@v1.4.0
|
||||||
|
with:
|
||||||
|
assignees: phantsure,tiwarishub,aparna-ravindra,vsvipul,bishal-pdmsft
|
||||||
|
numOfAssignee: 1
|
10
.github/workflows/auto-assign.yml
vendored
Normal file
10
.github/workflows/auto-assign.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
name: 'Auto Assign'
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, ready_for_review]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
add-reviews:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: kentaro-m/auto-assign-action@v1.2.1
|
13
.github/workflows/check-dist.yml
vendored
13
.github/workflows/check-dist.yml
vendored
@ -22,16 +22,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup Node.js 16.x
|
||||||
- name: Set Node.js 12.x
|
uses: actions/setup-node@v3
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 16.x
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Rebuild the dist/ directory
|
- name: Rebuild the dist/ directory
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
@ -45,7 +42,7 @@ jobs:
|
|||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
4
.github/workflows/close-inactive-issues.yml
vendored
4
.github/workflows/close-inactive-issues.yml
vendored
@ -12,10 +12,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v3
|
||||||
with:
|
with:
|
||||||
days-before-issue-stale: 365
|
days-before-issue-stale: 200
|
||||||
days-before-issue-close: 5
|
days-before-issue-close: 5
|
||||||
stale-issue-label: "stale"
|
stale-issue-label: "stale"
|
||||||
stale-issue-message: "This issue is stale because it has been open for 365 days with no activity. Leave a comment to avoid closing this issue in 5 days."
|
stale-issue-message: "This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days."
|
||||||
close-issue-message: "This issue was closed because it has been inactive for 5 days since being marked as stale."
|
close-issue-message: "This issue was closed because it has been inactive for 5 days since being marked as stale."
|
||||||
days-before-pr-stale: -1
|
days-before-pr-stale: -1
|
||||||
days-before-pr-close: -1
|
days-before-pr-close: -1
|
||||||
|
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
# We must fetch at least the immediate parents so that if this is
|
# We must fetch at least the immediate parents so that if this is
|
||||||
# a pull request then we can checkout the head.
|
# a pull request then we can checkout the head.
|
||||||
@ -24,7 +24,7 @@ jobs:
|
|||||||
# the head of the pull request instead of the merge commit.
|
# the head of the pull request instead of the merge commit.
|
||||||
- run: git checkout HEAD^2
|
- run: git checkout HEAD^2
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
|
2
.github/workflows/licensed.yml
vendored
2
.github/workflows/licensed.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check licenses
|
name: Check licenses
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Install licensed
|
- name: Install licensed
|
||||||
run: |
|
run: |
|
||||||
|
16
.github/workflows/workflow.yml
vendored
16
.github/workflows/workflow.yml
vendored
@ -24,11 +24,11 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js 16.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '12.x'
|
node-version: 16.x
|
||||||
- name: Determine npm cache directory
|
- name: Determine npm cache directory
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
run: |
|
run: |
|
||||||
@ -57,7 +57,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Generate files in working directory
|
- name: Generate files in working directory
|
||||||
shell: bash
|
shell: bash
|
||||||
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
||||||
@ -80,7 +80,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -110,7 +110,7 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Generate files
|
- name: Generate files
|
||||||
run: __tests__/create-cache-files.sh proxy test-cache
|
run: __tests__/create-cache-files.sh proxy test-cache
|
||||||
- name: Save cache
|
- name: Save cache
|
||||||
@ -133,7 +133,7 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
2
.licenses/npm/@actions/cache.dep.yml
generated
2
.licenses/npm/@actions/cache.dep.yml
generated
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/cache"
|
name: "@actions/cache"
|
||||||
version: 2.0.0
|
version: 2.0.2
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary:
|
||||||
homepage:
|
homepage:
|
||||||
|
2
.licenses/npm/@actions/core.dep.yml
generated
2
.licenses/npm/@actions/core.dep.yml
generated
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/core"
|
name: "@actions/core"
|
||||||
version: 1.6.0
|
version: 1.7.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions core lib
|
summary: Actions core lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||||
|
6
.licenses/npm/@opentelemetry/api.dep.yml
generated
6
.licenses/npm/@opentelemetry/api.dep.yml
generated
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@opentelemetry/api"
|
name: "@opentelemetry/api"
|
||||||
version: 1.1.0
|
version: 1.0.4
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: Public API for OpenTelemetry
|
||||||
homepage:
|
homepage: https://github.com/open-telemetry/opentelemetry-js-api#readme
|
||||||
license: apache-2.0
|
license: apache-2.0
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
6
.licenses/npm/@types/node.dep.yml
generated
6
.licenses/npm/@types/node.dep.yml
generated
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: "@types/node"
|
name: "@types/node"
|
||||||
version: 16.11.26
|
version: 16.11.33
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary: TypeScript definitions for Node.js
|
||||||
homepage:
|
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||||
license: mit
|
license: mit
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
||||||
|
@ -71,7 +71,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache Primes
|
- name: Cache Primes
|
||||||
id: cache-primes
|
id: cache-primes
|
||||||
@ -162,7 +162,7 @@ Using the `cache-hit` output, subsequent steps (such as install or build) can be
|
|||||||
Example:
|
Example:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
id: cache
|
id: cache
|
||||||
|
622
dist/restore/index.js
vendored
622
dist/restore/index.js
vendored
@ -1199,6 +1199,11 @@ function assertDefined(name, value) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
exports.assertDefined = assertDefined;
|
exports.assertDefined = assertDefined;
|
||||||
|
function isGhes() {
|
||||||
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
|
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
||||||
|
}
|
||||||
|
exports.isGhes = isGhes;
|
||||||
//# sourceMappingURL=cacheUtils.js.map
|
//# sourceMappingURL=cacheUtils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -1405,36 +1410,7 @@ exports.default = _default;
|
|||||||
/* 39 */,
|
/* 39 */,
|
||||||
/* 40 */,
|
/* 40 */,
|
||||||
/* 41 */,
|
/* 41 */,
|
||||||
/* 42 */
|
/* 42 */,
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.createTraceState = void 0;
|
|
||||||
var tracestate_impl_1 = __webpack_require__(756);
|
|
||||||
function createTraceState(rawTraceState) {
|
|
||||||
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
||||||
}
|
|
||||||
exports.createTraceState = createTraceState;
|
|
||||||
//# sourceMappingURL=utils.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 43 */,
|
/* 43 */,
|
||||||
/* 44 */,
|
/* 44 */,
|
||||||
/* 45 */,
|
/* 45 */,
|
||||||
@ -3299,18 +3275,18 @@ function downloadCache(archiveLocation, archivePath, options) {
|
|||||||
exports.downloadCache = downloadCache;
|
exports.downloadCache = downloadCache;
|
||||||
// Reserve Cache
|
// Reserve Cache
|
||||||
function reserveCache(key, paths, options) {
|
function reserveCache(key, paths, options) {
|
||||||
var _a, _b;
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const httpClient = createHttpClient();
|
const httpClient = createHttpClient();
|
||||||
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
||||||
const reserveCacheRequest = {
|
const reserveCacheRequest = {
|
||||||
key,
|
key,
|
||||||
version
|
version,
|
||||||
|
cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize
|
||||||
};
|
};
|
||||||
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
||||||
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
||||||
}));
|
}));
|
||||||
return (_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.cacheId) !== null && _b !== void 0 ? _b : -1;
|
return response;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.reserveCache = reserveCache;
|
exports.reserveCache = reserveCache;
|
||||||
@ -4467,7 +4443,7 @@ var NoopTracer_1 = __webpack_require__(151);
|
|||||||
var NoopTracerProvider = /** @class */ (function () {
|
var NoopTracerProvider = /** @class */ (function () {
|
||||||
function NoopTracerProvider() {
|
function NoopTracerProvider() {
|
||||||
}
|
}
|
||||||
NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
|
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
|
||||||
return new NoopTracer_1.NoopTracer();
|
return new NoopTracer_1.NoopTracer();
|
||||||
};
|
};
|
||||||
return NoopTracerProvider;
|
return NoopTracerProvider;
|
||||||
@ -36291,9 +36267,9 @@ var ProxyTracerProvider = /** @class */ (function () {
|
|||||||
/**
|
/**
|
||||||
* Get a {@link ProxyTracer}
|
* Get a {@link ProxyTracer}
|
||||||
*/
|
*/
|
||||||
ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
|
ProxyTracerProvider.prototype.getTracer = function (name, version) {
|
||||||
var _a;
|
var _a;
|
||||||
return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
|
return ((_a = this.getDelegateTracer(name, version)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version));
|
||||||
};
|
};
|
||||||
ProxyTracerProvider.prototype.getDelegate = function () {
|
ProxyTracerProvider.prototype.getDelegate = function () {
|
||||||
var _a;
|
var _a;
|
||||||
@ -36305,9 +36281,9 @@ var ProxyTracerProvider = /** @class */ (function () {
|
|||||||
ProxyTracerProvider.prototype.setDelegate = function (delegate) {
|
ProxyTracerProvider.prototype.setDelegate = function (delegate) {
|
||||||
this._delegate = delegate;
|
this._delegate = delegate;
|
||||||
};
|
};
|
||||||
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
|
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) {
|
||||||
var _a;
|
var _a;
|
||||||
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version);
|
||||||
};
|
};
|
||||||
return ProxyTracerProvider;
|
return ProxyTracerProvider;
|
||||||
}());
|
}());
|
||||||
@ -36346,11 +36322,10 @@ var NOOP_TRACER = new NoopTracer_1.NoopTracer();
|
|||||||
* Proxy tracer provided by the proxy tracer provider
|
* Proxy tracer provided by the proxy tracer provider
|
||||||
*/
|
*/
|
||||||
var ProxyTracer = /** @class */ (function () {
|
var ProxyTracer = /** @class */ (function () {
|
||||||
function ProxyTracer(_provider, name, version, options) {
|
function ProxyTracer(_provider, name, version) {
|
||||||
this._provider = _provider;
|
this._provider = _provider;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.options = options;
|
|
||||||
}
|
}
|
||||||
ProxyTracer.prototype.startSpan = function (name, options, context) {
|
ProxyTracer.prototype.startSpan = function (name, options, context) {
|
||||||
return this._getTracer().startSpan(name, options, context);
|
return this._getTracer().startSpan(name, options, context);
|
||||||
@ -36367,7 +36342,7 @@ var ProxyTracer = /** @class */ (function () {
|
|||||||
if (this._delegate) {
|
if (this._delegate) {
|
||||||
return this._delegate;
|
return this._delegate;
|
||||||
}
|
}
|
||||||
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
var tracer = this._provider.getDelegateTracer(this.name, this.version);
|
||||||
if (!tracer) {
|
if (!tracer) {
|
||||||
return NOOP_TRACER;
|
return NOOP_TRACER;
|
||||||
}
|
}
|
||||||
@ -37367,13 +37342,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|||||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0;
|
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.baggageEntryMetadataFromString = void 0;
|
||||||
__exportStar(__webpack_require__(880), exports);
|
__exportStar(__webpack_require__(880), exports);
|
||||||
var utils_1 = __webpack_require__(112);
|
var utils_1 = __webpack_require__(112);
|
||||||
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
|
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
|
||||||
__exportStar(__webpack_require__(452), exports);
|
__exportStar(__webpack_require__(452), exports);
|
||||||
__exportStar(__webpack_require__(158), exports);
|
__exportStar(__webpack_require__(158), exports);
|
||||||
__exportStar(__webpack_require__(907), exports);
|
|
||||||
__exportStar(__webpack_require__(893), exports);
|
__exportStar(__webpack_require__(893), exports);
|
||||||
__exportStar(__webpack_require__(881), exports);
|
__exportStar(__webpack_require__(881), exports);
|
||||||
__exportStar(__webpack_require__(906), exports);
|
__exportStar(__webpack_require__(906), exports);
|
||||||
@ -37389,11 +37363,8 @@ __exportStar(__webpack_require__(220), exports);
|
|||||||
__exportStar(__webpack_require__(932), exports);
|
__exportStar(__webpack_require__(932), exports);
|
||||||
__exportStar(__webpack_require__(975), exports);
|
__exportStar(__webpack_require__(975), exports);
|
||||||
__exportStar(__webpack_require__(207), exports);
|
__exportStar(__webpack_require__(207), exports);
|
||||||
var utils_2 = __webpack_require__(42);
|
|
||||||
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function () { return utils_2.createTraceState; } });
|
|
||||||
__exportStar(__webpack_require__(694), exports);
|
__exportStar(__webpack_require__(694), exports);
|
||||||
__exportStar(__webpack_require__(695), exports);
|
__exportStar(__webpack_require__(695), exports);
|
||||||
__exportStar(__webpack_require__(743), exports);
|
|
||||||
var spancontext_utils_1 = __webpack_require__(629);
|
var spancontext_utils_1 = __webpack_require__(629);
|
||||||
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });
|
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });
|
||||||
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });
|
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });
|
||||||
@ -37439,7 +37410,11 @@ exports.default = {
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
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) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@ -37452,7 +37427,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
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);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@ -39900,6 +39875,11 @@ function getIDToken(aud) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.getIDToken = getIDToken;
|
exports.getIDToken = getIDToken;
|
||||||
|
/**
|
||||||
|
* Markdown summary exports
|
||||||
|
*/
|
||||||
|
var markdown_summary_1 = __webpack_require__(548);
|
||||||
|
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return markdown_summary_1.markdownSummary; } });
|
||||||
//# sourceMappingURL=core.js.map
|
//# sourceMappingURL=core.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -41506,7 +41486,291 @@ CombinedStream.prototype._emitError = function(err) {
|
|||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 548 */,
|
/* 548 */
|
||||||
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
|
||||||
|
const os_1 = __webpack_require__(87);
|
||||||
|
const fs_1 = __webpack_require__(747);
|
||||||
|
const { access, appendFile, writeFile } = fs_1.promises;
|
||||||
|
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
|
||||||
|
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary';
|
||||||
|
class MarkdownSummary {
|
||||||
|
constructor() {
|
||||||
|
this._buffer = '';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Finds the summary file path from the environment, rejects if env var is not found or file does not exist
|
||||||
|
* Also checks r/w permissions.
|
||||||
|
*
|
||||||
|
* @returns step summary file path
|
||||||
|
*/
|
||||||
|
filePath() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (this._filePath) {
|
||||||
|
return this._filePath;
|
||||||
|
}
|
||||||
|
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
|
||||||
|
if (!pathFromEnv) {
|
||||||
|
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
|
||||||
|
}
|
||||||
|
catch (_a) {
|
||||||
|
throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
|
||||||
|
}
|
||||||
|
this._filePath = pathFromEnv;
|
||||||
|
return this._filePath;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Wraps content in an HTML tag, adding any HTML attributes
|
||||||
|
*
|
||||||
|
* @param {string} tag HTML tag to wrap
|
||||||
|
* @param {string | null} content content within the tag
|
||||||
|
* @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
|
||||||
|
*
|
||||||
|
* @returns {string} content wrapped in HTML element
|
||||||
|
*/
|
||||||
|
wrap(tag, content, attrs = {}) {
|
||||||
|
const htmlAttrs = Object.entries(attrs)
|
||||||
|
.map(([key, value]) => ` ${key}="${value}"`)
|
||||||
|
.join('');
|
||||||
|
if (!content) {
|
||||||
|
return `<${tag}${htmlAttrs}>`;
|
||||||
|
}
|
||||||
|
return `<${tag}${htmlAttrs}>${content}</${tag}>`;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
|
||||||
|
*
|
||||||
|
* @param {SummaryWriteOptions} [options] (optional) options for write operation
|
||||||
|
*
|
||||||
|
* @returns {Promise<MarkdownSummary>} markdown summary instance
|
||||||
|
*/
|
||||||
|
write(options) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
|
||||||
|
const filePath = yield this.filePath();
|
||||||
|
const writeFunc = overwrite ? writeFile : appendFile;
|
||||||
|
yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
|
||||||
|
return this.emptyBuffer();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Clears the summary buffer and wipes the summary file
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
clear() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return this.emptyBuffer().write({ overwrite: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the current summary buffer as a string
|
||||||
|
*
|
||||||
|
* @returns {string} string of summary buffer
|
||||||
|
*/
|
||||||
|
stringify() {
|
||||||
|
return this._buffer;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* If the summary buffer is empty
|
||||||
|
*
|
||||||
|
* @returns {boolen} true if the buffer is empty
|
||||||
|
*/
|
||||||
|
isEmptyBuffer() {
|
||||||
|
return this._buffer.length === 0;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Resets the summary buffer without writing to summary file
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
emptyBuffer() {
|
||||||
|
this._buffer = '';
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds raw text to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} text content to add
|
||||||
|
* @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addRaw(text, addEOL = false) {
|
||||||
|
this._buffer += text;
|
||||||
|
return addEOL ? this.addEOL() : this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds the operating system-specific end-of-line marker to the buffer
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addEOL() {
|
||||||
|
return this.addRaw(os_1.EOL);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML codeblock to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} code content to render within fenced code block
|
||||||
|
* @param {string} lang (optional) language to syntax highlight code
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addCodeBlock(code, lang) {
|
||||||
|
const attrs = Object.assign({}, (lang && { lang }));
|
||||||
|
const element = this.wrap('pre', this.wrap('code', code), attrs);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML list to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string[]} items list of items to render
|
||||||
|
* @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addList(items, ordered = false) {
|
||||||
|
const tag = ordered ? 'ol' : 'ul';
|
||||||
|
const listItems = items.map(item => this.wrap('li', item)).join('');
|
||||||
|
const element = this.wrap(tag, listItems);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML table to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {SummaryTableCell[]} rows table rows
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addTable(rows) {
|
||||||
|
const tableBody = rows
|
||||||
|
.map(row => {
|
||||||
|
const cells = row
|
||||||
|
.map(cell => {
|
||||||
|
if (typeof cell === 'string') {
|
||||||
|
return this.wrap('td', cell);
|
||||||
|
}
|
||||||
|
const { header, data, colspan, rowspan } = cell;
|
||||||
|
const tag = header ? 'th' : 'td';
|
||||||
|
const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
|
||||||
|
return this.wrap(tag, data, attrs);
|
||||||
|
})
|
||||||
|
.join('');
|
||||||
|
return this.wrap('tr', cells);
|
||||||
|
})
|
||||||
|
.join('');
|
||||||
|
const element = this.wrap('table', tableBody);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds a collapsable HTML details element to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} label text for the closed state
|
||||||
|
* @param {string} content collapsable content
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addDetails(label, content) {
|
||||||
|
const element = this.wrap('details', this.wrap('summary', label) + content);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML image tag to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} src path to the image you to embed
|
||||||
|
* @param {string} alt text description of the image
|
||||||
|
* @param {SummaryImageOptions} options (optional) addition image attributes
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addImage(src, alt, options) {
|
||||||
|
const { width, height } = options || {};
|
||||||
|
const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
|
||||||
|
const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML section heading element
|
||||||
|
*
|
||||||
|
* @param {string} text heading text
|
||||||
|
* @param {number | string} [level=1] (optional) the heading level, default: 1
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addHeading(text, level) {
|
||||||
|
const tag = `h${level}`;
|
||||||
|
const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
|
||||||
|
? tag
|
||||||
|
: 'h1';
|
||||||
|
const element = this.wrap(allowedTag, text);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML thematic break (<hr>) to the summary buffer
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addSeparator() {
|
||||||
|
const element = this.wrap('hr', null);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML line break (<br>) to the summary buffer
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addBreak() {
|
||||||
|
const element = this.wrap('br', null);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML blockquote to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} text quote text
|
||||||
|
* @param {string} cite (optional) citation url
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addQuote(text, cite) {
|
||||||
|
const attrs = Object.assign({}, (cite && { cite }));
|
||||||
|
const element = this.wrap('blockquote', text, attrs);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML anchor tag to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} text link text/content
|
||||||
|
* @param {string} href hyperlink
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addLink(text, href) {
|
||||||
|
const element = this.wrap('a', text, { href });
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// singleton export
|
||||||
|
exports.markdownSummary = new MarkdownSummary();
|
||||||
|
//# sourceMappingURL=markdown-summary.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
/* 549 */,
|
/* 549 */,
|
||||||
/* 550 */,
|
/* 550 */,
|
||||||
/* 551 */,
|
/* 551 */,
|
||||||
@ -42129,58 +42393,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
/* 587 */,
|
/* 587 */,
|
||||||
/* 588 */,
|
/* 588 */,
|
||||||
/* 589 */,
|
/* 589 */,
|
||||||
/* 590 */
|
/* 590 */,
|
||||||
/***/ (function(__unusedmodule, exports) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.validateValue = exports.validateKey = void 0;
|
|
||||||
var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
|
|
||||||
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
|
|
||||||
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
|
|
||||||
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
|
|
||||||
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
||||||
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
||||||
/**
|
|
||||||
* Key is opaque string up to 256 characters printable. It MUST begin with a
|
|
||||||
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
|
|
||||||
* underscores _, dashes -, asterisks *, and forward slashes /.
|
|
||||||
* For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
|
|
||||||
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
|
|
||||||
* see https://www.w3.org/TR/trace-context/#key
|
|
||||||
*/
|
|
||||||
function validateKey(key) {
|
|
||||||
return VALID_KEY_REGEX.test(key);
|
|
||||||
}
|
|
||||||
exports.validateKey = validateKey;
|
|
||||||
/**
|
|
||||||
* Value is opaque string up to 256 characters printable ASCII RFC0020
|
|
||||||
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
|
|
||||||
*/
|
|
||||||
function validateValue(value) {
|
|
||||||
return (VALID_VALUE_BASE_REGEX.test(value) &&
|
|
||||||
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
|
|
||||||
}
|
|
||||||
exports.validateValue = validateValue;
|
|
||||||
//# sourceMappingURL=tracestate-validators.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 591 */,
|
/* 591 */,
|
||||||
/* 592 */,
|
/* 592 */,
|
||||||
/* 593 */,
|
/* 593 */,
|
||||||
@ -46526,18 +46739,12 @@ exports.restoreCache = restoreCache;
|
|||||||
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
||||||
*/
|
*/
|
||||||
function saveCache(paths, key, options) {
|
function saveCache(paths, key, options) {
|
||||||
|
var _a, _b, _c, _d, _e;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
core.debug('Reserving Cache');
|
let cacheId = null;
|
||||||
const cacheId = yield cacheHttpClient.reserveCache(key, paths, {
|
|
||||||
compressionMethod
|
|
||||||
});
|
|
||||||
if (cacheId === -1) {
|
|
||||||
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
|
||||||
}
|
|
||||||
core.debug(`Cache ID: ${cacheId}`);
|
|
||||||
const cachePaths = yield utils.resolvePaths(paths);
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
core.debug('Cache Paths:');
|
core.debug('Cache Paths:');
|
||||||
core.debug(`${JSON.stringify(cachePaths)}`);
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
@ -46552,9 +46759,24 @@ function saveCache(paths, key, options) {
|
|||||||
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
||||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.debug(`File Size: ${archiveFileSize}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
if (archiveFileSize > fileSizeLimit) {
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
|
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
|
||||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
}
|
}
|
||||||
|
core.debug('Reserving Cache');
|
||||||
|
const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, {
|
||||||
|
compressionMethod,
|
||||||
|
cacheSize: archiveFileSize
|
||||||
|
});
|
||||||
|
if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) {
|
||||||
|
cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId;
|
||||||
|
}
|
||||||
|
else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) {
|
||||||
|
throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`);
|
||||||
|
}
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
||||||
}
|
}
|
||||||
@ -47241,30 +47463,7 @@ exports.OidcClient = OidcClient;
|
|||||||
//# sourceMappingURL=oidc-utils.js.map
|
//# sourceMappingURL=oidc-utils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 743 */
|
/* 743 */,
|
||||||
/***/ (function(__unusedmodule, exports) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
//# sourceMappingURL=tracer_options.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 744 */,
|
/* 744 */,
|
||||||
/* 745 */,
|
/* 745 */,
|
||||||
/* 746 */,
|
/* 746 */,
|
||||||
@ -47361,117 +47560,7 @@ function async(callback)
|
|||||||
/* 753 */,
|
/* 753 */,
|
||||||
/* 754 */,
|
/* 754 */,
|
||||||
/* 755 */,
|
/* 755 */,
|
||||||
/* 756 */
|
/* 756 */,
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.TraceStateImpl = void 0;
|
|
||||||
var tracestate_validators_1 = __webpack_require__(590);
|
|
||||||
var MAX_TRACE_STATE_ITEMS = 32;
|
|
||||||
var MAX_TRACE_STATE_LEN = 512;
|
|
||||||
var LIST_MEMBERS_SEPARATOR = ',';
|
|
||||||
var LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
|
|
||||||
/**
|
|
||||||
* TraceState must be a class and not a simple object type because of the spec
|
|
||||||
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
|
|
||||||
*
|
|
||||||
* Here is the list of allowed mutations:
|
|
||||||
* - New key-value pair should be added into the beginning of the list
|
|
||||||
* - The value of any key can be updated. Modified keys MUST be moved to the
|
|
||||||
* beginning of the list.
|
|
||||||
*/
|
|
||||||
var TraceStateImpl = /** @class */ (function () {
|
|
||||||
function TraceStateImpl(rawTraceState) {
|
|
||||||
this._internalState = new Map();
|
|
||||||
if (rawTraceState)
|
|
||||||
this._parse(rawTraceState);
|
|
||||||
}
|
|
||||||
TraceStateImpl.prototype.set = function (key, value) {
|
|
||||||
// TODO: Benchmark the different approaches(map vs list) and
|
|
||||||
// use the faster one.
|
|
||||||
var traceState = this._clone();
|
|
||||||
if (traceState._internalState.has(key)) {
|
|
||||||
traceState._internalState.delete(key);
|
|
||||||
}
|
|
||||||
traceState._internalState.set(key, value);
|
|
||||||
return traceState;
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype.unset = function (key) {
|
|
||||||
var traceState = this._clone();
|
|
||||||
traceState._internalState.delete(key);
|
|
||||||
return traceState;
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype.get = function (key) {
|
|
||||||
return this._internalState.get(key);
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype.serialize = function () {
|
|
||||||
var _this = this;
|
|
||||||
return this._keys()
|
|
||||||
.reduce(function (agg, key) {
|
|
||||||
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
||||||
return agg;
|
|
||||||
}, [])
|
|
||||||
.join(LIST_MEMBERS_SEPARATOR);
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype._parse = function (rawTraceState) {
|
|
||||||
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
||||||
return;
|
|
||||||
this._internalState = rawTraceState
|
|
||||||
.split(LIST_MEMBERS_SEPARATOR)
|
|
||||||
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
|
|
||||||
.reduce(function (agg, part) {
|
|
||||||
var listMember = part.trim(); // Optional Whitespace (OWS) handling
|
|
||||||
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
||||||
if (i !== -1) {
|
|
||||||
var key = listMember.slice(0, i);
|
|
||||||
var value = listMember.slice(i + 1, part.length);
|
|
||||||
if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) {
|
|
||||||
agg.set(key, value);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// TODO: Consider to add warning log
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return agg;
|
|
||||||
}, new Map());
|
|
||||||
// Because of the reverse() requirement, trunc must be done after map is created
|
|
||||||
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
||||||
this._internalState = new Map(Array.from(this._internalState.entries())
|
|
||||||
.reverse() // Use reverse same as original tracestate parse chain
|
|
||||||
.slice(0, MAX_TRACE_STATE_ITEMS));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype._keys = function () {
|
|
||||||
return Array.from(this._internalState.keys()).reverse();
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype._clone = function () {
|
|
||||||
var traceState = new TraceStateImpl();
|
|
||||||
traceState._internalState = new Map(this._internalState);
|
|
||||||
return traceState;
|
|
||||||
};
|
|
||||||
return TraceStateImpl;
|
|
||||||
}());
|
|
||||||
exports.TraceStateImpl = TraceStateImpl;
|
|
||||||
//# sourceMappingURL=tracestate-impl.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 757 */,
|
/* 757 */,
|
||||||
/* 758 */,
|
/* 758 */,
|
||||||
/* 759 */,
|
/* 759 */,
|
||||||
@ -48087,7 +48176,11 @@ module.exports = function(dst, src) {
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
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) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@ -48100,7 +48193,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
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);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@ -48152,11 +48245,12 @@ function run() {
|
|||||||
core.info(`Cache restored from key: ${cacheKey}`);
|
core.info(`Cache restored from key: ${cacheKey}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error.name === cache.ValidationError.name) {
|
const typedError = error;
|
||||||
|
if (typedError.name === cache.ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning(typedError.message);
|
||||||
utils.setCacheHitOutput(false);
|
utils.setCacheHitOutput(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49654,7 +49748,7 @@ module.exports = v4;
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.VERSION = void 0;
|
exports.VERSION = void 0;
|
||||||
// this is autogenerated file, see scripts/version-update.js
|
// this is autogenerated file, see scripts/version-update.js
|
||||||
exports.VERSION = '1.1.0';
|
exports.VERSION = '1.0.4';
|
||||||
//# sourceMappingURL=version.js.map
|
//# sourceMappingURL=version.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -51786,7 +51880,8 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry
|
|||||||
return {
|
return {
|
||||||
statusCode: error.statusCode,
|
statusCode: error.statusCode,
|
||||||
result: null,
|
result: null,
|
||||||
headers: {}
|
headers: {},
|
||||||
|
error
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -51877,30 +51972,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
//# sourceMappingURL=attributes.js.map
|
//# sourceMappingURL=attributes.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 907 */
|
/* 907 */,
|
||||||
/***/ (function(__unusedmodule, exports) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
//# sourceMappingURL=Attributes.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 908 */,
|
/* 908 */,
|
||||||
/* 909 */,
|
/* 909 */,
|
||||||
/* 910 */
|
/* 910 */
|
||||||
|
626
dist/save/index.js
vendored
626
dist/save/index.js
vendored
@ -1199,6 +1199,11 @@ function assertDefined(name, value) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
exports.assertDefined = assertDefined;
|
exports.assertDefined = assertDefined;
|
||||||
|
function isGhes() {
|
||||||
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
|
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
||||||
|
}
|
||||||
|
exports.isGhes = isGhes;
|
||||||
//# sourceMappingURL=cacheUtils.js.map
|
//# sourceMappingURL=cacheUtils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -1405,36 +1410,7 @@ exports.default = _default;
|
|||||||
/* 39 */,
|
/* 39 */,
|
||||||
/* 40 */,
|
/* 40 */,
|
||||||
/* 41 */,
|
/* 41 */,
|
||||||
/* 42 */
|
/* 42 */,
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.createTraceState = void 0;
|
|
||||||
var tracestate_impl_1 = __webpack_require__(756);
|
|
||||||
function createTraceState(rawTraceState) {
|
|
||||||
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
||||||
}
|
|
||||||
exports.createTraceState = createTraceState;
|
|
||||||
//# sourceMappingURL=utils.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 43 */,
|
/* 43 */,
|
||||||
/* 44 */,
|
/* 44 */,
|
||||||
/* 45 */,
|
/* 45 */,
|
||||||
@ -3299,18 +3275,18 @@ function downloadCache(archiveLocation, archivePath, options) {
|
|||||||
exports.downloadCache = downloadCache;
|
exports.downloadCache = downloadCache;
|
||||||
// Reserve Cache
|
// Reserve Cache
|
||||||
function reserveCache(key, paths, options) {
|
function reserveCache(key, paths, options) {
|
||||||
var _a, _b;
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const httpClient = createHttpClient();
|
const httpClient = createHttpClient();
|
||||||
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
|
||||||
const reserveCacheRequest = {
|
const reserveCacheRequest = {
|
||||||
key,
|
key,
|
||||||
version
|
version,
|
||||||
|
cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize
|
||||||
};
|
};
|
||||||
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {
|
||||||
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);
|
||||||
}));
|
}));
|
||||||
return (_b = (_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.cacheId) !== null && _b !== void 0 ? _b : -1;
|
return response;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.reserveCache = reserveCache;
|
exports.reserveCache = reserveCache;
|
||||||
@ -4467,7 +4443,7 @@ var NoopTracer_1 = __webpack_require__(151);
|
|||||||
var NoopTracerProvider = /** @class */ (function () {
|
var NoopTracerProvider = /** @class */ (function () {
|
||||||
function NoopTracerProvider() {
|
function NoopTracerProvider() {
|
||||||
}
|
}
|
||||||
NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
|
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
|
||||||
return new NoopTracer_1.NoopTracer();
|
return new NoopTracer_1.NoopTracer();
|
||||||
};
|
};
|
||||||
return NoopTracerProvider;
|
return NoopTracerProvider;
|
||||||
@ -36291,9 +36267,9 @@ var ProxyTracerProvider = /** @class */ (function () {
|
|||||||
/**
|
/**
|
||||||
* Get a {@link ProxyTracer}
|
* Get a {@link ProxyTracer}
|
||||||
*/
|
*/
|
||||||
ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
|
ProxyTracerProvider.prototype.getTracer = function (name, version) {
|
||||||
var _a;
|
var _a;
|
||||||
return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
|
return ((_a = this.getDelegateTracer(name, version)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version));
|
||||||
};
|
};
|
||||||
ProxyTracerProvider.prototype.getDelegate = function () {
|
ProxyTracerProvider.prototype.getDelegate = function () {
|
||||||
var _a;
|
var _a;
|
||||||
@ -36305,9 +36281,9 @@ var ProxyTracerProvider = /** @class */ (function () {
|
|||||||
ProxyTracerProvider.prototype.setDelegate = function (delegate) {
|
ProxyTracerProvider.prototype.setDelegate = function (delegate) {
|
||||||
this._delegate = delegate;
|
this._delegate = delegate;
|
||||||
};
|
};
|
||||||
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
|
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) {
|
||||||
var _a;
|
var _a;
|
||||||
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version);
|
||||||
};
|
};
|
||||||
return ProxyTracerProvider;
|
return ProxyTracerProvider;
|
||||||
}());
|
}());
|
||||||
@ -36346,11 +36322,10 @@ var NOOP_TRACER = new NoopTracer_1.NoopTracer();
|
|||||||
* Proxy tracer provided by the proxy tracer provider
|
* Proxy tracer provided by the proxy tracer provider
|
||||||
*/
|
*/
|
||||||
var ProxyTracer = /** @class */ (function () {
|
var ProxyTracer = /** @class */ (function () {
|
||||||
function ProxyTracer(_provider, name, version, options) {
|
function ProxyTracer(_provider, name, version) {
|
||||||
this._provider = _provider;
|
this._provider = _provider;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.options = options;
|
|
||||||
}
|
}
|
||||||
ProxyTracer.prototype.startSpan = function (name, options, context) {
|
ProxyTracer.prototype.startSpan = function (name, options, context) {
|
||||||
return this._getTracer().startSpan(name, options, context);
|
return this._getTracer().startSpan(name, options, context);
|
||||||
@ -36367,7 +36342,7 @@ var ProxyTracer = /** @class */ (function () {
|
|||||||
if (this._delegate) {
|
if (this._delegate) {
|
||||||
return this._delegate;
|
return this._delegate;
|
||||||
}
|
}
|
||||||
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
var tracer = this._provider.getDelegateTracer(this.name, this.version);
|
||||||
if (!tracer) {
|
if (!tracer) {
|
||||||
return NOOP_TRACER;
|
return NOOP_TRACER;
|
||||||
}
|
}
|
||||||
@ -37367,13 +37342,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|||||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0;
|
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.baggageEntryMetadataFromString = void 0;
|
||||||
__exportStar(__webpack_require__(880), exports);
|
__exportStar(__webpack_require__(880), exports);
|
||||||
var utils_1 = __webpack_require__(112);
|
var utils_1 = __webpack_require__(112);
|
||||||
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
|
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
|
||||||
__exportStar(__webpack_require__(452), exports);
|
__exportStar(__webpack_require__(452), exports);
|
||||||
__exportStar(__webpack_require__(158), exports);
|
__exportStar(__webpack_require__(158), exports);
|
||||||
__exportStar(__webpack_require__(907), exports);
|
|
||||||
__exportStar(__webpack_require__(893), exports);
|
__exportStar(__webpack_require__(893), exports);
|
||||||
__exportStar(__webpack_require__(881), exports);
|
__exportStar(__webpack_require__(881), exports);
|
||||||
__exportStar(__webpack_require__(906), exports);
|
__exportStar(__webpack_require__(906), exports);
|
||||||
@ -37389,11 +37363,8 @@ __exportStar(__webpack_require__(220), exports);
|
|||||||
__exportStar(__webpack_require__(932), exports);
|
__exportStar(__webpack_require__(932), exports);
|
||||||
__exportStar(__webpack_require__(975), exports);
|
__exportStar(__webpack_require__(975), exports);
|
||||||
__exportStar(__webpack_require__(207), exports);
|
__exportStar(__webpack_require__(207), exports);
|
||||||
var utils_2 = __webpack_require__(42);
|
|
||||||
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function () { return utils_2.createTraceState; } });
|
|
||||||
__exportStar(__webpack_require__(694), exports);
|
__exportStar(__webpack_require__(694), exports);
|
||||||
__exportStar(__webpack_require__(695), exports);
|
__exportStar(__webpack_require__(695), exports);
|
||||||
__exportStar(__webpack_require__(743), exports);
|
|
||||||
var spancontext_utils_1 = __webpack_require__(629);
|
var spancontext_utils_1 = __webpack_require__(629);
|
||||||
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });
|
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });
|
||||||
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });
|
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });
|
||||||
@ -37439,7 +37410,11 @@ exports.default = {
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
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) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@ -37452,7 +37427,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
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);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@ -39900,6 +39875,11 @@ function getIDToken(aud) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.getIDToken = getIDToken;
|
exports.getIDToken = getIDToken;
|
||||||
|
/**
|
||||||
|
* Markdown summary exports
|
||||||
|
*/
|
||||||
|
var markdown_summary_1 = __webpack_require__(548);
|
||||||
|
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return markdown_summary_1.markdownSummary; } });
|
||||||
//# sourceMappingURL=core.js.map
|
//# sourceMappingURL=core.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -41506,7 +41486,291 @@ CombinedStream.prototype._emitError = function(err) {
|
|||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 548 */,
|
/* 548 */
|
||||||
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
|
||||||
|
const os_1 = __webpack_require__(87);
|
||||||
|
const fs_1 = __webpack_require__(747);
|
||||||
|
const { access, appendFile, writeFile } = fs_1.promises;
|
||||||
|
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
|
||||||
|
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary';
|
||||||
|
class MarkdownSummary {
|
||||||
|
constructor() {
|
||||||
|
this._buffer = '';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Finds the summary file path from the environment, rejects if env var is not found or file does not exist
|
||||||
|
* Also checks r/w permissions.
|
||||||
|
*
|
||||||
|
* @returns step summary file path
|
||||||
|
*/
|
||||||
|
filePath() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (this._filePath) {
|
||||||
|
return this._filePath;
|
||||||
|
}
|
||||||
|
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
|
||||||
|
if (!pathFromEnv) {
|
||||||
|
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
|
||||||
|
}
|
||||||
|
catch (_a) {
|
||||||
|
throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
|
||||||
|
}
|
||||||
|
this._filePath = pathFromEnv;
|
||||||
|
return this._filePath;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Wraps content in an HTML tag, adding any HTML attributes
|
||||||
|
*
|
||||||
|
* @param {string} tag HTML tag to wrap
|
||||||
|
* @param {string | null} content content within the tag
|
||||||
|
* @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
|
||||||
|
*
|
||||||
|
* @returns {string} content wrapped in HTML element
|
||||||
|
*/
|
||||||
|
wrap(tag, content, attrs = {}) {
|
||||||
|
const htmlAttrs = Object.entries(attrs)
|
||||||
|
.map(([key, value]) => ` ${key}="${value}"`)
|
||||||
|
.join('');
|
||||||
|
if (!content) {
|
||||||
|
return `<${tag}${htmlAttrs}>`;
|
||||||
|
}
|
||||||
|
return `<${tag}${htmlAttrs}>${content}</${tag}>`;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
|
||||||
|
*
|
||||||
|
* @param {SummaryWriteOptions} [options] (optional) options for write operation
|
||||||
|
*
|
||||||
|
* @returns {Promise<MarkdownSummary>} markdown summary instance
|
||||||
|
*/
|
||||||
|
write(options) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
|
||||||
|
const filePath = yield this.filePath();
|
||||||
|
const writeFunc = overwrite ? writeFile : appendFile;
|
||||||
|
yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
|
||||||
|
return this.emptyBuffer();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Clears the summary buffer and wipes the summary file
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
clear() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return this.emptyBuffer().write({ overwrite: true });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the current summary buffer as a string
|
||||||
|
*
|
||||||
|
* @returns {string} string of summary buffer
|
||||||
|
*/
|
||||||
|
stringify() {
|
||||||
|
return this._buffer;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* If the summary buffer is empty
|
||||||
|
*
|
||||||
|
* @returns {boolen} true if the buffer is empty
|
||||||
|
*/
|
||||||
|
isEmptyBuffer() {
|
||||||
|
return this._buffer.length === 0;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Resets the summary buffer without writing to summary file
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
emptyBuffer() {
|
||||||
|
this._buffer = '';
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds raw text to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} text content to add
|
||||||
|
* @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addRaw(text, addEOL = false) {
|
||||||
|
this._buffer += text;
|
||||||
|
return addEOL ? this.addEOL() : this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds the operating system-specific end-of-line marker to the buffer
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addEOL() {
|
||||||
|
return this.addRaw(os_1.EOL);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML codeblock to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} code content to render within fenced code block
|
||||||
|
* @param {string} lang (optional) language to syntax highlight code
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addCodeBlock(code, lang) {
|
||||||
|
const attrs = Object.assign({}, (lang && { lang }));
|
||||||
|
const element = this.wrap('pre', this.wrap('code', code), attrs);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML list to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string[]} items list of items to render
|
||||||
|
* @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addList(items, ordered = false) {
|
||||||
|
const tag = ordered ? 'ol' : 'ul';
|
||||||
|
const listItems = items.map(item => this.wrap('li', item)).join('');
|
||||||
|
const element = this.wrap(tag, listItems);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML table to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {SummaryTableCell[]} rows table rows
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addTable(rows) {
|
||||||
|
const tableBody = rows
|
||||||
|
.map(row => {
|
||||||
|
const cells = row
|
||||||
|
.map(cell => {
|
||||||
|
if (typeof cell === 'string') {
|
||||||
|
return this.wrap('td', cell);
|
||||||
|
}
|
||||||
|
const { header, data, colspan, rowspan } = cell;
|
||||||
|
const tag = header ? 'th' : 'td';
|
||||||
|
const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
|
||||||
|
return this.wrap(tag, data, attrs);
|
||||||
|
})
|
||||||
|
.join('');
|
||||||
|
return this.wrap('tr', cells);
|
||||||
|
})
|
||||||
|
.join('');
|
||||||
|
const element = this.wrap('table', tableBody);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds a collapsable HTML details element to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} label text for the closed state
|
||||||
|
* @param {string} content collapsable content
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addDetails(label, content) {
|
||||||
|
const element = this.wrap('details', this.wrap('summary', label) + content);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML image tag to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} src path to the image you to embed
|
||||||
|
* @param {string} alt text description of the image
|
||||||
|
* @param {SummaryImageOptions} options (optional) addition image attributes
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addImage(src, alt, options) {
|
||||||
|
const { width, height } = options || {};
|
||||||
|
const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
|
||||||
|
const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML section heading element
|
||||||
|
*
|
||||||
|
* @param {string} text heading text
|
||||||
|
* @param {number | string} [level=1] (optional) the heading level, default: 1
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addHeading(text, level) {
|
||||||
|
const tag = `h${level}`;
|
||||||
|
const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
|
||||||
|
? tag
|
||||||
|
: 'h1';
|
||||||
|
const element = this.wrap(allowedTag, text);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML thematic break (<hr>) to the summary buffer
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addSeparator() {
|
||||||
|
const element = this.wrap('hr', null);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML line break (<br>) to the summary buffer
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addBreak() {
|
||||||
|
const element = this.wrap('br', null);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML blockquote to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} text quote text
|
||||||
|
* @param {string} cite (optional) citation url
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addQuote(text, cite) {
|
||||||
|
const attrs = Object.assign({}, (cite && { cite }));
|
||||||
|
const element = this.wrap('blockquote', text, attrs);
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds an HTML anchor tag to the summary buffer
|
||||||
|
*
|
||||||
|
* @param {string} text link text/content
|
||||||
|
* @param {string} href hyperlink
|
||||||
|
*
|
||||||
|
* @returns {MarkdownSummary} markdown summary instance
|
||||||
|
*/
|
||||||
|
addLink(text, href) {
|
||||||
|
const element = this.wrap('a', text, { href });
|
||||||
|
return this.addRaw(element).addEOL();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// singleton export
|
||||||
|
exports.markdownSummary = new MarkdownSummary();
|
||||||
|
//# sourceMappingURL=markdown-summary.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
/* 549 */,
|
/* 549 */,
|
||||||
/* 550 */,
|
/* 550 */,
|
||||||
/* 551 */,
|
/* 551 */,
|
||||||
@ -42129,58 +42393,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
/* 587 */,
|
/* 587 */,
|
||||||
/* 588 */,
|
/* 588 */,
|
||||||
/* 589 */,
|
/* 589 */,
|
||||||
/* 590 */
|
/* 590 */,
|
||||||
/***/ (function(__unusedmodule, exports) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.validateValue = exports.validateKey = void 0;
|
|
||||||
var VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';
|
|
||||||
var VALID_KEY = "[a-z]" + VALID_KEY_CHAR_RANGE + "{0,255}";
|
|
||||||
var VALID_VENDOR_KEY = "[a-z0-9]" + VALID_KEY_CHAR_RANGE + "{0,240}@[a-z]" + VALID_KEY_CHAR_RANGE + "{0,13}";
|
|
||||||
var VALID_KEY_REGEX = new RegExp("^(?:" + VALID_KEY + "|" + VALID_VENDOR_KEY + ")$");
|
|
||||||
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
||||||
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
||||||
/**
|
|
||||||
* Key is opaque string up to 256 characters printable. It MUST begin with a
|
|
||||||
* lowercase letter, and can only contain lowercase letters a-z, digits 0-9,
|
|
||||||
* underscores _, dashes -, asterisks *, and forward slashes /.
|
|
||||||
* For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the
|
|
||||||
* vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.
|
|
||||||
* see https://www.w3.org/TR/trace-context/#key
|
|
||||||
*/
|
|
||||||
function validateKey(key) {
|
|
||||||
return VALID_KEY_REGEX.test(key);
|
|
||||||
}
|
|
||||||
exports.validateKey = validateKey;
|
|
||||||
/**
|
|
||||||
* Value is opaque string up to 256 characters printable ASCII RFC0020
|
|
||||||
* characters (i.e., the range 0x20 to 0x7E) except comma , and =.
|
|
||||||
*/
|
|
||||||
function validateValue(value) {
|
|
||||||
return (VALID_VALUE_BASE_REGEX.test(value) &&
|
|
||||||
!INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));
|
|
||||||
}
|
|
||||||
exports.validateValue = validateValue;
|
|
||||||
//# sourceMappingURL=tracestate-validators.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 591 */,
|
/* 591 */,
|
||||||
/* 592 */,
|
/* 592 */,
|
||||||
/* 593 */,
|
/* 593 */,
|
||||||
@ -46362,7 +46575,11 @@ exports.default = _default;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
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) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@ -46375,7 +46592,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
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);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@ -46428,14 +46645,15 @@ function run() {
|
|||||||
core.info(`Cache saved with key: ${primaryKey}`);
|
core.info(`Cache saved with key: ${primaryKey}`);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error.name === cache.ValidationError.name) {
|
const typedError = error;
|
||||||
|
if (typedError.name === cache.ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
else if (error.name === cache.ReserveCacheError.name) {
|
else if (typedError.name === cache.ReserveCacheError.name) {
|
||||||
core.info(error.message);
|
core.info(typedError.message);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning(typedError.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46619,18 +46837,12 @@ exports.restoreCache = restoreCache;
|
|||||||
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
||||||
*/
|
*/
|
||||||
function saveCache(paths, key, options) {
|
function saveCache(paths, key, options) {
|
||||||
|
var _a, _b, _c, _d, _e;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
core.debug('Reserving Cache');
|
let cacheId = null;
|
||||||
const cacheId = yield cacheHttpClient.reserveCache(key, paths, {
|
|
||||||
compressionMethod
|
|
||||||
});
|
|
||||||
if (cacheId === -1) {
|
|
||||||
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
|
||||||
}
|
|
||||||
core.debug(`Cache ID: ${cacheId}`);
|
|
||||||
const cachePaths = yield utils.resolvePaths(paths);
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
core.debug('Cache Paths:');
|
core.debug('Cache Paths:');
|
||||||
core.debug(`${JSON.stringify(cachePaths)}`);
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
@ -46645,9 +46857,24 @@ function saveCache(paths, key, options) {
|
|||||||
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
|
||||||
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.debug(`File Size: ${archiveFileSize}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
if (archiveFileSize > fileSizeLimit) {
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
|
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
|
||||||
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
}
|
}
|
||||||
|
core.debug('Reserving Cache');
|
||||||
|
const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, {
|
||||||
|
compressionMethod,
|
||||||
|
cacheSize: archiveFileSize
|
||||||
|
});
|
||||||
|
if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) {
|
||||||
|
cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId;
|
||||||
|
}
|
||||||
|
else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) {
|
||||||
|
throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`);
|
||||||
|
}
|
||||||
core.debug(`Saving Cache (ID: ${cacheId})`);
|
core.debug(`Saving Cache (ID: ${cacheId})`);
|
||||||
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
|
||||||
}
|
}
|
||||||
@ -47334,30 +47561,7 @@ exports.OidcClient = OidcClient;
|
|||||||
//# sourceMappingURL=oidc-utils.js.map
|
//# sourceMappingURL=oidc-utils.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 743 */
|
/* 743 */,
|
||||||
/***/ (function(__unusedmodule, exports) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
//# sourceMappingURL=tracer_options.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 744 */,
|
/* 744 */,
|
||||||
/* 745 */,
|
/* 745 */,
|
||||||
/* 746 */,
|
/* 746 */,
|
||||||
@ -47454,117 +47658,7 @@ function async(callback)
|
|||||||
/* 753 */,
|
/* 753 */,
|
||||||
/* 754 */,
|
/* 754 */,
|
||||||
/* 755 */,
|
/* 755 */,
|
||||||
/* 756 */
|
/* 756 */,
|
||||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
exports.TraceStateImpl = void 0;
|
|
||||||
var tracestate_validators_1 = __webpack_require__(590);
|
|
||||||
var MAX_TRACE_STATE_ITEMS = 32;
|
|
||||||
var MAX_TRACE_STATE_LEN = 512;
|
|
||||||
var LIST_MEMBERS_SEPARATOR = ',';
|
|
||||||
var LIST_MEMBER_KEY_VALUE_SPLITTER = '=';
|
|
||||||
/**
|
|
||||||
* TraceState must be a class and not a simple object type because of the spec
|
|
||||||
* requirement (https://www.w3.org/TR/trace-context/#tracestate-field).
|
|
||||||
*
|
|
||||||
* Here is the list of allowed mutations:
|
|
||||||
* - New key-value pair should be added into the beginning of the list
|
|
||||||
* - The value of any key can be updated. Modified keys MUST be moved to the
|
|
||||||
* beginning of the list.
|
|
||||||
*/
|
|
||||||
var TraceStateImpl = /** @class */ (function () {
|
|
||||||
function TraceStateImpl(rawTraceState) {
|
|
||||||
this._internalState = new Map();
|
|
||||||
if (rawTraceState)
|
|
||||||
this._parse(rawTraceState);
|
|
||||||
}
|
|
||||||
TraceStateImpl.prototype.set = function (key, value) {
|
|
||||||
// TODO: Benchmark the different approaches(map vs list) and
|
|
||||||
// use the faster one.
|
|
||||||
var traceState = this._clone();
|
|
||||||
if (traceState._internalState.has(key)) {
|
|
||||||
traceState._internalState.delete(key);
|
|
||||||
}
|
|
||||||
traceState._internalState.set(key, value);
|
|
||||||
return traceState;
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype.unset = function (key) {
|
|
||||||
var traceState = this._clone();
|
|
||||||
traceState._internalState.delete(key);
|
|
||||||
return traceState;
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype.get = function (key) {
|
|
||||||
return this._internalState.get(key);
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype.serialize = function () {
|
|
||||||
var _this = this;
|
|
||||||
return this._keys()
|
|
||||||
.reduce(function (agg, key) {
|
|
||||||
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));
|
|
||||||
return agg;
|
|
||||||
}, [])
|
|
||||||
.join(LIST_MEMBERS_SEPARATOR);
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype._parse = function (rawTraceState) {
|
|
||||||
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
||||||
return;
|
|
||||||
this._internalState = rawTraceState
|
|
||||||
.split(LIST_MEMBERS_SEPARATOR)
|
|
||||||
.reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning
|
|
||||||
.reduce(function (agg, part) {
|
|
||||||
var listMember = part.trim(); // Optional Whitespace (OWS) handling
|
|
||||||
var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
||||||
if (i !== -1) {
|
|
||||||
var key = listMember.slice(0, i);
|
|
||||||
var value = listMember.slice(i + 1, part.length);
|
|
||||||
if (tracestate_validators_1.validateKey(key) && tracestate_validators_1.validateValue(value)) {
|
|
||||||
agg.set(key, value);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// TODO: Consider to add warning log
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return agg;
|
|
||||||
}, new Map());
|
|
||||||
// Because of the reverse() requirement, trunc must be done after map is created
|
|
||||||
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
||||||
this._internalState = new Map(Array.from(this._internalState.entries())
|
|
||||||
.reverse() // Use reverse same as original tracestate parse chain
|
|
||||||
.slice(0, MAX_TRACE_STATE_ITEMS));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype._keys = function () {
|
|
||||||
return Array.from(this._internalState.keys()).reverse();
|
|
||||||
};
|
|
||||||
TraceStateImpl.prototype._clone = function () {
|
|
||||||
var traceState = new TraceStateImpl();
|
|
||||||
traceState._internalState = new Map(this._internalState);
|
|
||||||
return traceState;
|
|
||||||
};
|
|
||||||
return TraceStateImpl;
|
|
||||||
}());
|
|
||||||
exports.TraceStateImpl = TraceStateImpl;
|
|
||||||
//# sourceMappingURL=tracestate-impl.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 757 */,
|
/* 757 */,
|
||||||
/* 758 */,
|
/* 758 */,
|
||||||
/* 759 */,
|
/* 759 */,
|
||||||
@ -49657,7 +49751,7 @@ module.exports = v4;
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.VERSION = void 0;
|
exports.VERSION = void 0;
|
||||||
// this is autogenerated file, see scripts/version-update.js
|
// this is autogenerated file, see scripts/version-update.js
|
||||||
exports.VERSION = '1.1.0';
|
exports.VERSION = '1.0.4';
|
||||||
//# sourceMappingURL=version.js.map
|
//# sourceMappingURL=version.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@ -51789,7 +51883,8 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry
|
|||||||
return {
|
return {
|
||||||
statusCode: error.statusCode,
|
statusCode: error.statusCode,
|
||||||
result: null,
|
result: null,
|
||||||
headers: {}
|
headers: {},
|
||||||
|
error
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -51880,30 +51975,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
//# sourceMappingURL=attributes.js.map
|
//# sourceMappingURL=attributes.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 907 */
|
/* 907 */,
|
||||||
/***/ (function(__unusedmodule, exports) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright The OpenTelemetry Authors
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
//# sourceMappingURL=Attributes.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 908 */,
|
/* 908 */,
|
||||||
/* 909 */,
|
/* 909 */,
|
||||||
/* 910 */
|
/* 910 */
|
||||||
|
8592
package-lock.json
generated
8592
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Cache dependencies and build outputs",
|
"description": "Cache dependencies and build outputs",
|
||||||
"main": "dist/restore/index.js",
|
"main": "dist/restore/index.js",
|
||||||
@ -23,29 +23,29 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^2.0.0",
|
"@actions/cache": "^2.0.2",
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.7.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/io": "^1.1.2"
|
"@actions/io": "^1.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.5.0",
|
||||||
"@types/nock": "^11.1.0",
|
"@types/nock": "^11.1.0",
|
||||||
"@types/node": "^16.11.26",
|
"@types/node": "^16.11.33",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.16.0",
|
"@typescript-eslint/eslint-plugin": "^5.22.0",
|
||||||
"@typescript-eslint/parser": "^5.16.0",
|
"@typescript-eslint/parser": "^5.22.0",
|
||||||
"@zeit/ncc": "^0.20.5",
|
"@zeit/ncc": "^0.20.5",
|
||||||
"eslint": "^8.11.0",
|
"eslint": "^8.14.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-jest": "^26.1.3",
|
"eslint-plugin-jest": "^26.1.5",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-simple-import-sort": "^7.0.0",
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
||||||
"jest": "^27.5.1",
|
"jest": "^28.0.3",
|
||||||
"jest-circus": "^27.5.1",
|
"jest-circus": "^27.5.1",
|
||||||
"nock": "^11.7.0",
|
"nock": "^13.2.4",
|
||||||
"prettier": "^2.6.1",
|
"prettier": "^2.6.2",
|
||||||
"ts-jest": "^27.1.4",
|
"ts-jest": "^28.0.2",
|
||||||
"typescript": "^3.9.9"
|
"typescript": "^4.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,16 +52,17 @@ async function run(): Promise<void> {
|
|||||||
utils.setCacheHitOutput(isExactKeyMatch);
|
utils.setCacheHitOutput(isExactKeyMatch);
|
||||||
|
|
||||||
core.info(`Cache restored from key: ${cacheKey}`);
|
core.info(`Cache restored from key: ${cacheKey}`);
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
if (error.name === cache.ValidationError.name) {
|
const typedError = error as Error;
|
||||||
|
if (typedError.name === cache.ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
} else {
|
} else {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning(typedError.message);
|
||||||
utils.setCacheHitOutput(false);
|
utils.setCacheHitOutput(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
core.setFailed(error.message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
src/save.ts
15
src/save.ts
@ -49,17 +49,18 @@ async function run(): Promise<void> {
|
|||||||
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
|
||||||
});
|
});
|
||||||
core.info(`Cache saved with key: ${primaryKey}`);
|
core.info(`Cache saved with key: ${primaryKey}`);
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
if (error.name === cache.ValidationError.name) {
|
const typedError = error as Error;
|
||||||
|
if (typedError.name === cache.ValidationError.name) {
|
||||||
throw error;
|
throw error;
|
||||||
} else if (error.name === cache.ReserveCacheError.name) {
|
} else if (typedError.name === cache.ReserveCacheError.name) {
|
||||||
core.info(error.message);
|
core.info(typedError.message);
|
||||||
} else {
|
} else {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning(typedError.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error: unknown) {
|
||||||
utils.logWarning(error.message);
|
utils.logWarning((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user