mirror of
				https://gitea.com/actions/cache.git
				synced 2025-11-02 07:47:08 +00:00 
			
		
		
		
	Compare commits
	
		
			12 Commits
		
	
	
		
			t-dedah/te
			...
			vsvipul/te
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					907bb7fbe4 | ||
| 
						 | 
					45f362d0ca | ||
| 
						 | 
					ca0688b4ab | ||
| 
						 | 
					ef8498dcba | ||
| 
						 | 
					8f1e2e0286 | ||
| 
						 | 
					48af2dc4a9 | ||
| 
						 | 
					f63a711791 | ||
| 
						 | 
					770a27cf65 | ||
| 
						 | 
					c2131abcd8 | ||
| 
						 | 
					575160481d | ||
| 
						 | 
					136d96b4ae | ||
| 
						 | 
					7d4f40b464 | 
							
								
								
									
										16
									
								
								.github/auto_assign.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.github/auto_assign.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
# A number of reviewers added to the pull request
 | 
			
		||||
# Set 0 to add all the reviewers (default: 0)
 | 
			
		||||
numberOfReviewers: 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
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
      - name: Set Node.js 12.x
 | 
			
		||||
        uses: actions/setup-node@v1
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - name: Setup Node.js 16.x
 | 
			
		||||
        uses: actions/setup-node@v3
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 12.x
 | 
			
		||||
 | 
			
		||||
          node-version: 16.x
 | 
			
		||||
      - name: Install dependencies
 | 
			
		||||
        run: npm ci
 | 
			
		||||
 | 
			
		||||
      - name: Rebuild the dist/ directory
 | 
			
		||||
        run: npm run build
 | 
			
		||||
 | 
			
		||||
@@ -45,7 +42,7 @@ jobs:
 | 
			
		||||
        id: diff
 | 
			
		||||
 | 
			
		||||
      # 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' }}
 | 
			
		||||
        with:
 | 
			
		||||
          name: dist
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/codeql.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/codeql.yml
									
									
									
									
										vendored
									
									
								
							@@ -14,7 +14,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout repository
 | 
			
		||||
      uses: actions/checkout@v2
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
      with:
 | 
			
		||||
        # We must fetch at least the immediate parents so that if this is
 | 
			
		||||
        # a pull request then we can checkout the head.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							@@ -13,7 +13,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    name: Check licenses
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: actions/checkout@v3
 | 
			
		||||
      - run: npm ci
 | 
			
		||||
      - name: Install licensed
 | 
			
		||||
        run: |
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							@@ -24,11 +24,11 @@ jobs:
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout
 | 
			
		||||
      uses: actions/checkout@v2
 | 
			
		||||
    - name: Setup Node.js
 | 
			
		||||
      uses: actions/setup-node@v1
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
    - name: Setup Node.js 16.x
 | 
			
		||||
      uses: actions/setup-node@v3
 | 
			
		||||
      with:
 | 
			
		||||
        node-version: '12.x'
 | 
			
		||||
        node-version: 16.x
 | 
			
		||||
    - name: Determine npm cache directory
 | 
			
		||||
      id: npm-cache
 | 
			
		||||
      run: |
 | 
			
		||||
@@ -57,7 +57,7 @@ jobs:
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout
 | 
			
		||||
      uses: actions/checkout@v2
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
    - name: Generate files in working directory
 | 
			
		||||
      shell: bash
 | 
			
		||||
      run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
 | 
			
		||||
@@ -80,7 +80,7 @@ jobs:
 | 
			
		||||
    runs-on: ${{ matrix.os }}
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout
 | 
			
		||||
      uses: actions/checkout@v2
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
    - name: Restore cache
 | 
			
		||||
      uses: ./
 | 
			
		||||
      with:
 | 
			
		||||
@@ -110,7 +110,7 @@ jobs:
 | 
			
		||||
      https_proxy: http://squid-proxy:3128
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout
 | 
			
		||||
      uses: actions/checkout@v2
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
    - name: Generate files
 | 
			
		||||
      run: __tests__/create-cache-files.sh proxy test-cache
 | 
			
		||||
    - name: Save cache
 | 
			
		||||
@@ -133,7 +133,7 @@ jobs:
 | 
			
		||||
      https_proxy: http://squid-proxy:3128
 | 
			
		||||
    steps:
 | 
			
		||||
    - name: Checkout
 | 
			
		||||
      uses: actions/checkout@v2
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
    - name: Restore cache
 | 
			
		||||
      uses: ./
 | 
			
		||||
      with:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
name: "@actions/cache"
 | 
			
		||||
version: 1.0.10
 | 
			
		||||
version: 2.0.2
 | 
			
		||||
type: npm
 | 
			
		||||
summary: 
 | 
			
		||||
homepage: 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
								
							@@ -1,9 +1,9 @@
 | 
			
		||||
---
 | 
			
		||||
name: "@opentelemetry/api"
 | 
			
		||||
version: 1.1.0
 | 
			
		||||
version: 1.0.4
 | 
			
		||||
type: npm
 | 
			
		||||
summary: 
 | 
			
		||||
homepage: 
 | 
			
		||||
summary: Public API for OpenTelemetry
 | 
			
		||||
homepage: https://github.com/open-telemetry/opentelemetry-js-api#readme
 | 
			
		||||
license: apache-2.0
 | 
			
		||||
licenses:
 | 
			
		||||
- sources: LICENSE
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							@@ -1,5 +1,6 @@
 | 
			
		||||
# cache
 | 
			
		||||
 | 
			
		||||
Test for autoassign.
 | 
			
		||||
This action allows caching dependencies and build outputs to improve workflow execution time.
 | 
			
		||||
 | 
			
		||||
[](https://github.com/actions/cache/actions/workflows/workflow.yml)
 | 
			
		||||
@@ -10,6 +11,8 @@ See ["Caching dependencies to speed up workflows"](https://help.github.com/githu
 | 
			
		||||
 | 
			
		||||
## What's New
 | 
			
		||||
### v3
 | 
			
		||||
* Added support for caching from GHES 3.5.
 | 
			
		||||
* Fixed download issue for files > 2GB during restore.
 | 
			
		||||
* Updated the minimum runner version support from node 12 -> node 16.
 | 
			
		||||
 | 
			
		||||
### v2
 | 
			
		||||
@@ -69,7 +72,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
    - name: Cache Primes
 | 
			
		||||
      id: cache-primes
 | 
			
		||||
@@ -160,7 +163,7 @@ Using the `cache-hit` output, subsequent steps (such as install or build) can be
 | 
			
		||||
Example:
 | 
			
		||||
```yaml
 | 
			
		||||
steps:
 | 
			
		||||
  - uses: actions/checkout@v2
 | 
			
		||||
  - uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
  - uses: actions/cache@v3
 | 
			
		||||
    id: cache
 | 
			
		||||
@@ -175,18 +178,6 @@ steps:
 | 
			
		||||
 | 
			
		||||
> Note: The `id` defined in `actions/cache` must match the `id` in the `if` statement (i.e. `steps.[ID].outputs.cache-hit`)
 | 
			
		||||
 | 
			
		||||
## Known limitation
 | 
			
		||||
 | 
			
		||||
- `action/cache` is currently not supported on GitHub Enterprise Server. <https://github.com/github/roadmap/issues/273> is tracking this.
 | 
			
		||||
 | 
			
		||||
Since GitHub Enterprise Server uses self-hosted runners, dependencies are typically cached on the runner by whatever dependency management tool is being used (npm, maven, etc.).  This eliminates the need for explicit caching in some scenarios.
 | 
			
		||||
 | 
			
		||||
## Changelog schedule and history 
 | 
			
		||||
 | 
			
		||||
| Status  | Version  | Date  | Highlights  |
 | 
			
		||||
|:---|:---|:---|:---|
 | 
			
		||||
| Published  | v3.0.0  | Mar 21st, 2022 | -  Updated minimum runner version support from node 12 -> node 16 <br>  |
 | 
			
		||||
 | 
			
		||||
## Contributing
 | 
			
		||||
We would love for you to contribute to `actions/cache`, pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								RELEASES.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								RELEASES.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
# Releases
 | 
			
		||||
 | 
			
		||||
### 3.0.0
 | 
			
		||||
- Updated minimum runner version support from node 12 -> node 16
 | 
			
		||||
 | 
			
		||||
### 3.0.1
 | 
			
		||||
- Added support for caching from GHES 3.5.
 | 
			
		||||
- Fixed download issue for files > 2GB during restore.
 | 
			
		||||
@@ -1,3 +1,4 @@
 | 
			
		||||
import * as cache from "@actions/cache";
 | 
			
		||||
import * as core from "@actions/core";
 | 
			
		||||
 | 
			
		||||
import { Events, Outputs, RefKey, State } from "../src/constants";
 | 
			
		||||
@@ -5,6 +6,7 @@ import * as actionUtils from "../src/utils/actionUtils";
 | 
			
		||||
import * as testUtils from "../src/utils/testUtils";
 | 
			
		||||
 | 
			
		||||
jest.mock("@actions/core");
 | 
			
		||||
jest.mock("@actions/cache");
 | 
			
		||||
 | 
			
		||||
beforeAll(() => {
 | 
			
		||||
    jest.spyOn(core, "getInput").mockImplementation((name, options) => {
 | 
			
		||||
@@ -232,3 +234,41 @@ test("getInputAsInt throws if required and value missing", () => {
 | 
			
		||||
        actionUtils.getInputAsInt("undefined", { required: true })
 | 
			
		||||
    ).toThrowError();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("isCacheFeatureAvailable for ac enabled", () => {
 | 
			
		||||
    jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => true);
 | 
			
		||||
 | 
			
		||||
    expect(actionUtils.isCacheFeatureAvailable()).toBe(true);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("isCacheFeatureAvailable for ac disabled on GHES", () => {
 | 
			
		||||
    jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);
 | 
			
		||||
 | 
			
		||||
    const message =
 | 
			
		||||
        "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.";
 | 
			
		||||
    const infoMock = jest.spyOn(core, "info");
 | 
			
		||||
 | 
			
		||||
    try {
 | 
			
		||||
        process.env["GITHUB_SERVER_URL"] = "http://example.com";
 | 
			
		||||
        expect(actionUtils.isCacheFeatureAvailable()).toBe(false);
 | 
			
		||||
        expect(infoMock).toHaveBeenCalledWith(`[warning]${message}`);
 | 
			
		||||
    } finally {
 | 
			
		||||
        delete process.env["GITHUB_SERVER_URL"];
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("isCacheFeatureAvailable for ac disabled on dotcom", () => {
 | 
			
		||||
    jest.spyOn(cache, "isFeatureAvailable").mockImplementation(() => false);
 | 
			
		||||
 | 
			
		||||
    const message =
 | 
			
		||||
        "An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.";
 | 
			
		||||
    const infoMock = jest.spyOn(core, "info");
 | 
			
		||||
 | 
			
		||||
    try {
 | 
			
		||||
        process.env["GITHUB_SERVER_URL"] = "http://github.com";
 | 
			
		||||
        expect(actionUtils.isCacheFeatureAvailable()).toBe(false);
 | 
			
		||||
        expect(infoMock).toHaveBeenCalledWith(`[warning]${message}`);
 | 
			
		||||
    } finally {
 | 
			
		||||
        delete process.env["GITHUB_SERVER_URL"];
 | 
			
		||||
    }
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
@@ -34,6 +34,9 @@ beforeEach(() => {
 | 
			
		||||
    process.env[RefKey] = "refs/heads/feature-branch";
 | 
			
		||||
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
 | 
			
		||||
    jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
 | 
			
		||||
        () => true
 | 
			
		||||
    );
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
afterEach(() => {
 | 
			
		||||
@@ -55,10 +58,12 @@ test("restore with invalid event outputs warning", async () => {
 | 
			
		||||
    expect(failedMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("restore on GHES should no-op", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
 | 
			
		||||
test("restore without AC available should no-op", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
 | 
			
		||||
    jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
 | 
			
		||||
        () => false
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    const logWarningMock = jest.spyOn(actionUtils, "logWarning");
 | 
			
		||||
    const restoreCacheMock = jest.spyOn(cache, "restoreCache");
 | 
			
		||||
    const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
 | 
			
		||||
 | 
			
		||||
@@ -67,9 +72,54 @@ test("restore on GHES should no-op", async () => {
 | 
			
		||||
    expect(restoreCacheMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
    expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
 | 
			
		||||
    expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
 | 
			
		||||
    expect(logWarningMock).toHaveBeenCalledWith(
 | 
			
		||||
        "Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("restore on GHES without AC available should no-op", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
 | 
			
		||||
    jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
 | 
			
		||||
        () => false
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    const restoreCacheMock = jest.spyOn(cache, "restoreCache");
 | 
			
		||||
    const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
 | 
			
		||||
 | 
			
		||||
    await run();
 | 
			
		||||
 | 
			
		||||
    expect(restoreCacheMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
    expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
 | 
			
		||||
    expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("restore on GHES with AC available ", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
 | 
			
		||||
    const path = "node_modules";
 | 
			
		||||
    const key = "node-test";
 | 
			
		||||
    testUtils.setInputs({
 | 
			
		||||
        path: path,
 | 
			
		||||
        key
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const infoMock = jest.spyOn(core, "info");
 | 
			
		||||
    const failedMock = jest.spyOn(core, "setFailed");
 | 
			
		||||
    const stateMock = jest.spyOn(core, "saveState");
 | 
			
		||||
    const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
 | 
			
		||||
    const restoreCacheMock = jest
 | 
			
		||||
        .spyOn(cache, "restoreCache")
 | 
			
		||||
        .mockImplementationOnce(() => {
 | 
			
		||||
            return Promise.resolve(key);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    await run();
 | 
			
		||||
 | 
			
		||||
    expect(restoreCacheMock).toHaveBeenCalledTimes(1);
 | 
			
		||||
    expect(restoreCacheMock).toHaveBeenCalledWith([path], key, []);
 | 
			
		||||
 | 
			
		||||
    expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
 | 
			
		||||
    expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
 | 
			
		||||
    expect(setCacheHitOutputMock).toHaveBeenCalledWith(true);
 | 
			
		||||
 | 
			
		||||
    expect(infoMock).toHaveBeenCalledWith(`Cache restored from key: ${key}`);
 | 
			
		||||
    expect(failedMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("restore with no path should fail", async () => {
 | 
			
		||||
 
 | 
			
		||||
@@ -54,6 +54,9 @@ beforeEach(() => {
 | 
			
		||||
    process.env[RefKey] = "refs/heads/feature-branch";
 | 
			
		||||
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
 | 
			
		||||
    jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
 | 
			
		||||
        () => true
 | 
			
		||||
    );
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
afterEach(() => {
 | 
			
		||||
@@ -101,18 +104,67 @@ test("save with no primary key in state outputs warning", async () => {
 | 
			
		||||
    expect(failedMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("save on GHES should no-op", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
 | 
			
		||||
test("save without AC available should no-op", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
 | 
			
		||||
        () => false
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    const logWarningMock = jest.spyOn(actionUtils, "logWarning");
 | 
			
		||||
    const saveCacheMock = jest.spyOn(cache, "saveCache");
 | 
			
		||||
 | 
			
		||||
    await run();
 | 
			
		||||
 | 
			
		||||
    expect(saveCacheMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
    expect(logWarningMock).toHaveBeenCalledWith(
 | 
			
		||||
        "Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("save on ghes without AC available should no-op", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
 | 
			
		||||
    jest.spyOn(actionUtils, "isCacheFeatureAvailable").mockImplementation(
 | 
			
		||||
        () => false
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    const saveCacheMock = jest.spyOn(cache, "saveCache");
 | 
			
		||||
 | 
			
		||||
    await run();
 | 
			
		||||
 | 
			
		||||
    expect(saveCacheMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("save on GHES with AC available", async () => {
 | 
			
		||||
    jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
 | 
			
		||||
    const failedMock = jest.spyOn(core, "setFailed");
 | 
			
		||||
 | 
			
		||||
    const primaryKey = "Linux-node-bb828da54c148048dd17899ba9fda624811cfb43";
 | 
			
		||||
    const savedCacheKey = "Linux-node-";
 | 
			
		||||
 | 
			
		||||
    jest.spyOn(core, "getState")
 | 
			
		||||
        // Cache Entry State
 | 
			
		||||
        .mockImplementationOnce(() => {
 | 
			
		||||
            return savedCacheKey;
 | 
			
		||||
        })
 | 
			
		||||
        // Cache Key State
 | 
			
		||||
        .mockImplementationOnce(() => {
 | 
			
		||||
            return primaryKey;
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    const inputPath = "node_modules";
 | 
			
		||||
    testUtils.setInput(Inputs.Path, inputPath);
 | 
			
		||||
    testUtils.setInput(Inputs.UploadChunkSize, "4000000");
 | 
			
		||||
 | 
			
		||||
    const cacheId = 4;
 | 
			
		||||
    const saveCacheMock = jest
 | 
			
		||||
        .spyOn(cache, "saveCache")
 | 
			
		||||
        .mockImplementationOnce(() => {
 | 
			
		||||
            return Promise.resolve(cacheId);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
    await run();
 | 
			
		||||
 | 
			
		||||
    expect(saveCacheMock).toHaveBeenCalledTimes(1);
 | 
			
		||||
    expect(saveCacheMock).toHaveBeenCalledWith([inputPath], primaryKey, {
 | 
			
		||||
        uploadChunkSize: 4000000
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    expect(failedMock).toHaveBeenCalledTimes(0);
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test("save with exact match returns early", async () => {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										346
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										346
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							@@ -1199,6 +1199,11 @@ function assertDefined(name, value) {
 | 
			
		||||
    return value;
 | 
			
		||||
}
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -1405,36 +1410,7 @@ exports.default = _default;
 | 
			
		||||
/* 39 */,
 | 
			
		||||
/* 40 */,
 | 
			
		||||
/* 41 */,
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 42 */,
 | 
			
		||||
/* 43 */,
 | 
			
		||||
/* 44 */,
 | 
			
		||||
/* 45 */,
 | 
			
		||||
@@ -3221,10 +3197,7 @@ const options_1 = __webpack_require__(538);
 | 
			
		||||
const requestUtils_1 = __webpack_require__(899);
 | 
			
		||||
const versionSalt = '1.0';
 | 
			
		||||
function getCacheApiUrl(resource) {
 | 
			
		||||
    // Ideally we just use ACTIONS_CACHE_URL
 | 
			
		||||
    const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
 | 
			
		||||
        process.env['ACTIONS_RUNTIME_URL'] ||
 | 
			
		||||
        '').replace('pipelines', 'artifactcache');
 | 
			
		||||
    const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
 | 
			
		||||
    if (!baseUrl) {
 | 
			
		||||
        throw new Error('Cache Service Url not found, unable to restore cache.');
 | 
			
		||||
    }
 | 
			
		||||
@@ -3302,18 +3275,18 @@ function downloadCache(archiveLocation, archivePath, options) {
 | 
			
		||||
exports.downloadCache = downloadCache;
 | 
			
		||||
// Reserve Cache
 | 
			
		||||
function reserveCache(key, paths, options) {
 | 
			
		||||
    var _a, _b;
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        const httpClient = createHttpClient();
 | 
			
		||||
        const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
 | 
			
		||||
        const reserveCacheRequest = {
 | 
			
		||||
            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* () {
 | 
			
		||||
            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;
 | 
			
		||||
@@ -4470,7 +4443,7 @@ var NoopTracer_1 = __webpack_require__(151);
 | 
			
		||||
var NoopTracerProvider = /** @class */ (function () {
 | 
			
		||||
    function NoopTracerProvider() {
 | 
			
		||||
    }
 | 
			
		||||
    NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
 | 
			
		||||
    NoopTracerProvider.prototype.getTracer = function (_name, _version) {
 | 
			
		||||
        return new NoopTracer_1.NoopTracer();
 | 
			
		||||
    };
 | 
			
		||||
    return NoopTracerProvider;
 | 
			
		||||
@@ -5519,7 +5492,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
 | 
			
		||||
            //
 | 
			
		||||
            // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
 | 
			
		||||
            // on 64-bit systems), split the download into multiple segments
 | 
			
		||||
            const maxSegmentSize = buffer.constants.MAX_LENGTH;
 | 
			
		||||
            // ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
 | 
			
		||||
            const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
 | 
			
		||||
            const downloadProgress = new DownloadProgress(contentLength);
 | 
			
		||||
            const fd = fs.openSync(archivePath, 'w');
 | 
			
		||||
            try {
 | 
			
		||||
@@ -36293,9 +36267,9 @@ var ProxyTracerProvider = /** @class */ (function () {
 | 
			
		||||
    /**
 | 
			
		||||
     * Get a {@link ProxyTracer}
 | 
			
		||||
     */
 | 
			
		||||
    ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
 | 
			
		||||
    ProxyTracerProvider.prototype.getTracer = function (name, version) {
 | 
			
		||||
        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 () {
 | 
			
		||||
        var _a;
 | 
			
		||||
@@ -36307,9 +36281,9 @@ var ProxyTracerProvider = /** @class */ (function () {
 | 
			
		||||
    ProxyTracerProvider.prototype.setDelegate = function (delegate) {
 | 
			
		||||
        this._delegate = delegate;
 | 
			
		||||
    };
 | 
			
		||||
    ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
 | 
			
		||||
    ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) {
 | 
			
		||||
        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;
 | 
			
		||||
}());
 | 
			
		||||
@@ -36348,11 +36322,10 @@ var NOOP_TRACER = new NoopTracer_1.NoopTracer();
 | 
			
		||||
 * Proxy tracer provided by the proxy tracer provider
 | 
			
		||||
 */
 | 
			
		||||
var ProxyTracer = /** @class */ (function () {
 | 
			
		||||
    function ProxyTracer(_provider, name, version, options) {
 | 
			
		||||
    function ProxyTracer(_provider, name, version) {
 | 
			
		||||
        this._provider = _provider;
 | 
			
		||||
        this.name = name;
 | 
			
		||||
        this.version = version;
 | 
			
		||||
        this.options = options;
 | 
			
		||||
    }
 | 
			
		||||
    ProxyTracer.prototype.startSpan = function (name, options, context) {
 | 
			
		||||
        return this._getTracer().startSpan(name, options, context);
 | 
			
		||||
@@ -36369,7 +36342,7 @@ var ProxyTracer = /** @class */ (function () {
 | 
			
		||||
        if (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) {
 | 
			
		||||
            return NOOP_TRACER;
 | 
			
		||||
        }
 | 
			
		||||
@@ -37369,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);
 | 
			
		||||
};
 | 
			
		||||
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);
 | 
			
		||||
var utils_1 = __webpack_require__(112);
 | 
			
		||||
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
 | 
			
		||||
__exportStar(__webpack_require__(452), exports);
 | 
			
		||||
__exportStar(__webpack_require__(158), exports);
 | 
			
		||||
__exportStar(__webpack_require__(907), exports);
 | 
			
		||||
__exportStar(__webpack_require__(893), exports);
 | 
			
		||||
__exportStar(__webpack_require__(881), exports);
 | 
			
		||||
__exportStar(__webpack_require__(906), exports);
 | 
			
		||||
@@ -37391,11 +37363,8 @@ __exportStar(__webpack_require__(220), exports);
 | 
			
		||||
__exportStar(__webpack_require__(932), exports);
 | 
			
		||||
__exportStar(__webpack_require__(975), 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__(695), exports);
 | 
			
		||||
__exportStar(__webpack_require__(743), exports);
 | 
			
		||||
var spancontext_utils_1 = __webpack_require__(629);
 | 
			
		||||
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; } });
 | 
			
		||||
@@ -37459,7 +37428,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
 | 
			
		||||
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
 | 
			
		||||
const cache = __importStar(__webpack_require__(692));
 | 
			
		||||
const core = __importStar(__webpack_require__(470));
 | 
			
		||||
const constants_1 = __webpack_require__(196);
 | 
			
		||||
function isGhes() {
 | 
			
		||||
@@ -37524,6 +37494,19 @@ function getInputAsInt(name, options) {
 | 
			
		||||
    return value;
 | 
			
		||||
}
 | 
			
		||||
exports.getInputAsInt = getInputAsInt;
 | 
			
		||||
function isCacheFeatureAvailable() {
 | 
			
		||||
    if (!cache.isFeatureAvailable()) {
 | 
			
		||||
        if (isGhes()) {
 | 
			
		||||
            logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.");
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -42117,58 +42100,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
/* 587 */,
 | 
			
		||||
/* 588 */,
 | 
			
		||||
/* 589 */,
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 590 */,
 | 
			
		||||
/* 591 */,
 | 
			
		||||
/* 592 */,
 | 
			
		||||
/* 593 */,
 | 
			
		||||
@@ -46439,6 +46371,15 @@ function checkKey(key) {
 | 
			
		||||
        throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
/**
 | 
			
		||||
 * isFeatureAvailable to check the presence of Actions cache service
 | 
			
		||||
 *
 | 
			
		||||
 * @returns boolean return true if Actions cache service feature is available, otherwise false
 | 
			
		||||
 */
 | 
			
		||||
function isFeatureAvailable() {
 | 
			
		||||
    return !!process.env['ACTIONS_CACHE_URL'];
 | 
			
		||||
}
 | 
			
		||||
exports.isFeatureAvailable = isFeatureAvailable;
 | 
			
		||||
/**
 | 
			
		||||
 * Restores cache from keys
 | 
			
		||||
 *
 | 
			
		||||
@@ -46505,18 +46446,12 @@ exports.restoreCache = restoreCache;
 | 
			
		||||
 * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
 | 
			
		||||
 */
 | 
			
		||||
function saveCache(paths, key, options) {
 | 
			
		||||
    var _a, _b, _c, _d, _e;
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        checkPaths(paths);
 | 
			
		||||
        checkKey(key);
 | 
			
		||||
        const compressionMethod = yield utils.getCompressionMethod();
 | 
			
		||||
        core.debug('Reserving Cache');
 | 
			
		||||
        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}`);
 | 
			
		||||
        let cacheId = null;
 | 
			
		||||
        const cachePaths = yield utils.resolvePaths(paths);
 | 
			
		||||
        core.debug('Cache Paths:');
 | 
			
		||||
        core.debug(`${JSON.stringify(cachePaths)}`);
 | 
			
		||||
@@ -46531,9 +46466,24 @@ function saveCache(paths, key, options) {
 | 
			
		||||
            const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
 | 
			
		||||
            const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
 | 
			
		||||
            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.`);
 | 
			
		||||
            }
 | 
			
		||||
            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})`);
 | 
			
		||||
            yield cacheHttpClient.saveCache(cacheId, archivePath, options);
 | 
			
		||||
        }
 | 
			
		||||
@@ -47220,30 +47170,7 @@ exports.OidcClient = OidcClient;
 | 
			
		||||
//# sourceMappingURL=oidc-utils.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 743 */,
 | 
			
		||||
/* 744 */,
 | 
			
		||||
/* 745 */,
 | 
			
		||||
/* 746 */,
 | 
			
		||||
@@ -47340,117 +47267,7 @@ function async(callback)
 | 
			
		||||
/* 753 */,
 | 
			
		||||
/* 754 */,
 | 
			
		||||
/* 755 */,
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 756 */,
 | 
			
		||||
/* 757 */,
 | 
			
		||||
/* 758 */,
 | 
			
		||||
/* 759 */,
 | 
			
		||||
@@ -48100,8 +47917,7 @@ const utils = __importStar(__webpack_require__(443));
 | 
			
		||||
function run() {
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        try {
 | 
			
		||||
            if (utils.isGhes()) {
 | 
			
		||||
                utils.logWarning("Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details");
 | 
			
		||||
            if (!utils.isCacheFeatureAvailable()) {
 | 
			
		||||
                utils.setCacheHitOutput(false);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
@@ -49634,7 +49450,7 @@ module.exports = v4;
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.VERSION = void 0;
 | 
			
		||||
// this is autogenerated file, see scripts/version-update.js
 | 
			
		||||
exports.VERSION = '1.1.0';
 | 
			
		||||
exports.VERSION = '1.0.4';
 | 
			
		||||
//# sourceMappingURL=version.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -51766,7 +51582,8 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry
 | 
			
		||||
                return {
 | 
			
		||||
                    statusCode: error.statusCode,
 | 
			
		||||
                    result: null,
 | 
			
		||||
                    headers: {}
 | 
			
		||||
                    headers: {},
 | 
			
		||||
                    error
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
@@ -51857,30 +51674,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
//# sourceMappingURL=attributes.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 907 */,
 | 
			
		||||
/* 908 */,
 | 
			
		||||
/* 909 */,
 | 
			
		||||
/* 910 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										346
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										346
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							@@ -1199,6 +1199,11 @@ function assertDefined(name, value) {
 | 
			
		||||
    return value;
 | 
			
		||||
}
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -1405,36 +1410,7 @@ exports.default = _default;
 | 
			
		||||
/* 39 */,
 | 
			
		||||
/* 40 */,
 | 
			
		||||
/* 41 */,
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 42 */,
 | 
			
		||||
/* 43 */,
 | 
			
		||||
/* 44 */,
 | 
			
		||||
/* 45 */,
 | 
			
		||||
@@ -3221,10 +3197,7 @@ const options_1 = __webpack_require__(538);
 | 
			
		||||
const requestUtils_1 = __webpack_require__(899);
 | 
			
		||||
const versionSalt = '1.0';
 | 
			
		||||
function getCacheApiUrl(resource) {
 | 
			
		||||
    // Ideally we just use ACTIONS_CACHE_URL
 | 
			
		||||
    const baseUrl = (process.env['ACTIONS_CACHE_URL'] ||
 | 
			
		||||
        process.env['ACTIONS_RUNTIME_URL'] ||
 | 
			
		||||
        '').replace('pipelines', 'artifactcache');
 | 
			
		||||
    const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';
 | 
			
		||||
    if (!baseUrl) {
 | 
			
		||||
        throw new Error('Cache Service Url not found, unable to restore cache.');
 | 
			
		||||
    }
 | 
			
		||||
@@ -3302,18 +3275,18 @@ function downloadCache(archiveLocation, archivePath, options) {
 | 
			
		||||
exports.downloadCache = downloadCache;
 | 
			
		||||
// Reserve Cache
 | 
			
		||||
function reserveCache(key, paths, options) {
 | 
			
		||||
    var _a, _b;
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        const httpClient = createHttpClient();
 | 
			
		||||
        const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod);
 | 
			
		||||
        const reserveCacheRequest = {
 | 
			
		||||
            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* () {
 | 
			
		||||
            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;
 | 
			
		||||
@@ -4470,7 +4443,7 @@ var NoopTracer_1 = __webpack_require__(151);
 | 
			
		||||
var NoopTracerProvider = /** @class */ (function () {
 | 
			
		||||
    function NoopTracerProvider() {
 | 
			
		||||
    }
 | 
			
		||||
    NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
 | 
			
		||||
    NoopTracerProvider.prototype.getTracer = function (_name, _version) {
 | 
			
		||||
        return new NoopTracer_1.NoopTracer();
 | 
			
		||||
    };
 | 
			
		||||
    return NoopTracerProvider;
 | 
			
		||||
@@ -5519,7 +5492,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
 | 
			
		||||
            //
 | 
			
		||||
            // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
 | 
			
		||||
            // on 64-bit systems), split the download into multiple segments
 | 
			
		||||
            const maxSegmentSize = buffer.constants.MAX_LENGTH;
 | 
			
		||||
            // ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
 | 
			
		||||
            const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
 | 
			
		||||
            const downloadProgress = new DownloadProgress(contentLength);
 | 
			
		||||
            const fd = fs.openSync(archivePath, 'w');
 | 
			
		||||
            try {
 | 
			
		||||
@@ -36293,9 +36267,9 @@ var ProxyTracerProvider = /** @class */ (function () {
 | 
			
		||||
    /**
 | 
			
		||||
     * Get a {@link ProxyTracer}
 | 
			
		||||
     */
 | 
			
		||||
    ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
 | 
			
		||||
    ProxyTracerProvider.prototype.getTracer = function (name, version) {
 | 
			
		||||
        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 () {
 | 
			
		||||
        var _a;
 | 
			
		||||
@@ -36307,9 +36281,9 @@ var ProxyTracerProvider = /** @class */ (function () {
 | 
			
		||||
    ProxyTracerProvider.prototype.setDelegate = function (delegate) {
 | 
			
		||||
        this._delegate = delegate;
 | 
			
		||||
    };
 | 
			
		||||
    ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
 | 
			
		||||
    ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) {
 | 
			
		||||
        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;
 | 
			
		||||
}());
 | 
			
		||||
@@ -36348,11 +36322,10 @@ var NOOP_TRACER = new NoopTracer_1.NoopTracer();
 | 
			
		||||
 * Proxy tracer provided by the proxy tracer provider
 | 
			
		||||
 */
 | 
			
		||||
var ProxyTracer = /** @class */ (function () {
 | 
			
		||||
    function ProxyTracer(_provider, name, version, options) {
 | 
			
		||||
    function ProxyTracer(_provider, name, version) {
 | 
			
		||||
        this._provider = _provider;
 | 
			
		||||
        this.name = name;
 | 
			
		||||
        this.version = version;
 | 
			
		||||
        this.options = options;
 | 
			
		||||
    }
 | 
			
		||||
    ProxyTracer.prototype.startSpan = function (name, options, context) {
 | 
			
		||||
        return this._getTracer().startSpan(name, options, context);
 | 
			
		||||
@@ -36369,7 +36342,7 @@ var ProxyTracer = /** @class */ (function () {
 | 
			
		||||
        if (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) {
 | 
			
		||||
            return NOOP_TRACER;
 | 
			
		||||
        }
 | 
			
		||||
@@ -37369,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);
 | 
			
		||||
};
 | 
			
		||||
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);
 | 
			
		||||
var utils_1 = __webpack_require__(112);
 | 
			
		||||
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });
 | 
			
		||||
__exportStar(__webpack_require__(452), exports);
 | 
			
		||||
__exportStar(__webpack_require__(158), exports);
 | 
			
		||||
__exportStar(__webpack_require__(907), exports);
 | 
			
		||||
__exportStar(__webpack_require__(893), exports);
 | 
			
		||||
__exportStar(__webpack_require__(881), exports);
 | 
			
		||||
__exportStar(__webpack_require__(906), exports);
 | 
			
		||||
@@ -37391,11 +37363,8 @@ __exportStar(__webpack_require__(220), exports);
 | 
			
		||||
__exportStar(__webpack_require__(932), exports);
 | 
			
		||||
__exportStar(__webpack_require__(975), 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__(695), exports);
 | 
			
		||||
__exportStar(__webpack_require__(743), exports);
 | 
			
		||||
var spancontext_utils_1 = __webpack_require__(629);
 | 
			
		||||
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; } });
 | 
			
		||||
@@ -37459,7 +37428,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
 | 
			
		||||
exports.isCacheFeatureAvailable = exports.getInputAsInt = exports.getInputAsArray = exports.isValidEvent = exports.logWarning = exports.getCacheState = exports.setOutputAndState = exports.setCacheHitOutput = exports.setCacheState = exports.isExactKeyMatch = exports.isGhes = void 0;
 | 
			
		||||
const cache = __importStar(__webpack_require__(692));
 | 
			
		||||
const core = __importStar(__webpack_require__(470));
 | 
			
		||||
const constants_1 = __webpack_require__(196);
 | 
			
		||||
function isGhes() {
 | 
			
		||||
@@ -37524,6 +37494,19 @@ function getInputAsInt(name, options) {
 | 
			
		||||
    return value;
 | 
			
		||||
}
 | 
			
		||||
exports.getInputAsInt = getInputAsInt;
 | 
			
		||||
function isCacheFeatureAvailable() {
 | 
			
		||||
    if (!cache.isFeatureAvailable()) {
 | 
			
		||||
        if (isGhes()) {
 | 
			
		||||
            logWarning("Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.");
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -42117,58 +42100,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
/* 587 */,
 | 
			
		||||
/* 588 */,
 | 
			
		||||
/* 589 */,
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 590 */,
 | 
			
		||||
/* 591 */,
 | 
			
		||||
/* 592 */,
 | 
			
		||||
/* 593 */,
 | 
			
		||||
@@ -46388,8 +46320,7 @@ process.on("uncaughtException", e => utils.logWarning(e.message));
 | 
			
		||||
function run() {
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        try {
 | 
			
		||||
            if (utils.isGhes()) {
 | 
			
		||||
                utils.logWarning("Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details");
 | 
			
		||||
            if (!utils.isCacheFeatureAvailable()) {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
            if (!utils.isValidEvent()) {
 | 
			
		||||
@@ -46533,6 +46464,15 @@ function checkKey(key) {
 | 
			
		||||
        throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
/**
 | 
			
		||||
 * isFeatureAvailable to check the presence of Actions cache service
 | 
			
		||||
 *
 | 
			
		||||
 * @returns boolean return true if Actions cache service feature is available, otherwise false
 | 
			
		||||
 */
 | 
			
		||||
function isFeatureAvailable() {
 | 
			
		||||
    return !!process.env['ACTIONS_CACHE_URL'];
 | 
			
		||||
}
 | 
			
		||||
exports.isFeatureAvailable = isFeatureAvailable;
 | 
			
		||||
/**
 | 
			
		||||
 * Restores cache from keys
 | 
			
		||||
 *
 | 
			
		||||
@@ -46599,18 +46539,12 @@ exports.restoreCache = restoreCache;
 | 
			
		||||
 * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
 | 
			
		||||
 */
 | 
			
		||||
function saveCache(paths, key, options) {
 | 
			
		||||
    var _a, _b, _c, _d, _e;
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        checkPaths(paths);
 | 
			
		||||
        checkKey(key);
 | 
			
		||||
        const compressionMethod = yield utils.getCompressionMethod();
 | 
			
		||||
        core.debug('Reserving Cache');
 | 
			
		||||
        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}`);
 | 
			
		||||
        let cacheId = null;
 | 
			
		||||
        const cachePaths = yield utils.resolvePaths(paths);
 | 
			
		||||
        core.debug('Cache Paths:');
 | 
			
		||||
        core.debug(`${JSON.stringify(cachePaths)}`);
 | 
			
		||||
@@ -46625,9 +46559,24 @@ function saveCache(paths, key, options) {
 | 
			
		||||
            const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
 | 
			
		||||
            const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
 | 
			
		||||
            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.`);
 | 
			
		||||
            }
 | 
			
		||||
            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})`);
 | 
			
		||||
            yield cacheHttpClient.saveCache(cacheId, archivePath, options);
 | 
			
		||||
        }
 | 
			
		||||
@@ -47314,30 +47263,7 @@ exports.OidcClient = OidcClient;
 | 
			
		||||
//# sourceMappingURL=oidc-utils.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 743 */,
 | 
			
		||||
/* 744 */,
 | 
			
		||||
/* 745 */,
 | 
			
		||||
/* 746 */,
 | 
			
		||||
@@ -47434,117 +47360,7 @@ function async(callback)
 | 
			
		||||
/* 753 */,
 | 
			
		||||
/* 754 */,
 | 
			
		||||
/* 755 */,
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 756 */,
 | 
			
		||||
/* 757 */,
 | 
			
		||||
/* 758 */,
 | 
			
		||||
/* 759 */,
 | 
			
		||||
@@ -49637,7 +49453,7 @@ module.exports = v4;
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.VERSION = void 0;
 | 
			
		||||
// this is autogenerated file, see scripts/version-update.js
 | 
			
		||||
exports.VERSION = '1.1.0';
 | 
			
		||||
exports.VERSION = '1.0.4';
 | 
			
		||||
//# sourceMappingURL=version.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -51769,7 +51585,8 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry
 | 
			
		||||
                return {
 | 
			
		||||
                    statusCode: error.statusCode,
 | 
			
		||||
                    result: null,
 | 
			
		||||
                    headers: {}
 | 
			
		||||
                    headers: {},
 | 
			
		||||
                    error
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
@@ -51860,30 +51677,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
//# sourceMappingURL=attributes.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 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
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 907 */,
 | 
			
		||||
/* 908 */,
 | 
			
		||||
/* 909 */,
 | 
			
		||||
/* 910 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										110
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										110
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -1,13 +1,13 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "cache",
 | 
			
		||||
  "version": "3.0.0",
 | 
			
		||||
  "version": "3.0.2",
 | 
			
		||||
  "lockfileVersion": 1,
 | 
			
		||||
  "requires": true,
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@actions/cache": {
 | 
			
		||||
      "version": "1.0.10",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.10.tgz",
 | 
			
		||||
      "integrity": "sha512-8l9A54RXsPHbHs4Tu0DGqTyE5cguvq3xO9H0ohbLa5zbL2Z4dh9lxnjQn2xojsPQr4WnEVgbaVZpc1tlhehQGw==",
 | 
			
		||||
      "version": "2.0.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-2.0.2.tgz",
 | 
			
		||||
      "integrity": "sha512-K1DCaW/OtHj5mV7hI7HEXiceX3rM4Nc0iG2hfYsrkEy6GiOeqlCC/LyICrBZIRDM6+vSrS12tg1ORl4hghomBA==",
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@actions/core": "^1.2.6",
 | 
			
		||||
        "@actions/exec": "^1.0.1",
 | 
			
		||||
@@ -1186,9 +1186,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@opentelemetry/api": {
 | 
			
		||||
      "version": "1.1.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.1.0.tgz",
 | 
			
		||||
      "integrity": "sha512-hf+3bwuBwtXsugA2ULBc95qxrOqP2pOekLz34BJhcAKawt94vfeNyUKpYc0lZQ/3sCP6LqRa7UAdHA7i5UODzQ=="
 | 
			
		||||
      "version": "1.0.4",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.4.tgz",
 | 
			
		||||
      "integrity": "sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog=="
 | 
			
		||||
    },
 | 
			
		||||
    "@sinonjs/commons": {
 | 
			
		||||
      "version": "1.8.3",
 | 
			
		||||
@@ -1381,14 +1381,14 @@
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/scope-manager": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/type-utils": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/utils": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/scope-manager": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/type-utils": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/utils": "5.17.0",
 | 
			
		||||
        "debug": "^4.3.2",
 | 
			
		||||
        "functional-red-black-tree": "^1.0.1",
 | 
			
		||||
        "ignore": "^5.1.8",
 | 
			
		||||
@@ -1409,52 +1409,52 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/parser": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/scope-manager": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/types": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/scope-manager": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/types": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "5.17.0",
 | 
			
		||||
        "debug": "^4.3.2"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/scope-manager": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/types": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/visitor-keys": "5.15.0"
 | 
			
		||||
        "@typescript-eslint/types": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/visitor-keys": "5.17.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/type-utils": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/utils": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/utils": "5.17.0",
 | 
			
		||||
        "debug": "^4.3.2",
 | 
			
		||||
        "tsutils": "^3.21.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/types": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw==",
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/typescript-estree": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/types": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/visitor-keys": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/types": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/visitor-keys": "5.17.0",
 | 
			
		||||
        "debug": "^4.3.2",
 | 
			
		||||
        "globby": "^11.0.4",
 | 
			
		||||
        "is-glob": "^4.0.3",
 | 
			
		||||
@@ -1474,26 +1474,26 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/utils": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@types/json-schema": "^7.0.9",
 | 
			
		||||
        "@typescript-eslint/scope-manager": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/types": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/scope-manager": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/types": "5.17.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "5.17.0",
 | 
			
		||||
        "eslint-scope": "^5.1.1",
 | 
			
		||||
        "eslint-utils": "^3.0.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "@typescript-eslint/visitor-keys": {
 | 
			
		||||
      "version": "5.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ==",
 | 
			
		||||
      "version": "5.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/types": "5.15.0",
 | 
			
		||||
        "@typescript-eslint/types": "5.17.0",
 | 
			
		||||
        "eslint-visitor-keys": "^3.0.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
@@ -2355,9 +2355,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "eslint-plugin-jest": {
 | 
			
		||||
      "version": "26.1.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.2.tgz",
 | 
			
		||||
      "integrity": "sha512-1bXCoRODPkGN06n9KAMls4Jm0eyS+0Q/LWcIxhqWR2ycV0Z7lnx2c10idk4dtFIJY5xStgiIr5snC6/rxcXpbw==",
 | 
			
		||||
      "version": "26.1.3",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.1.3.tgz",
 | 
			
		||||
      "integrity": "sha512-Pju+T7MFpo5VFhFlwrkK/9jRUu18r2iugvgyrWOnnGRaVTFFmFXp+xFJpHyqmjjLmGJPKLeEFLVTAxezkApcpQ==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@typescript-eslint/utils": "^5.10.0"
 | 
			
		||||
@@ -4803,9 +4803,9 @@
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "prettier": {
 | 
			
		||||
      "version": "2.6.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.0.tgz",
 | 
			
		||||
      "integrity": "sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A==",
 | 
			
		||||
      "version": "2.6.1",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz",
 | 
			
		||||
      "integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==",
 | 
			
		||||
      "dev": true
 | 
			
		||||
    },
 | 
			
		||||
    "prettier-linter-helpers": {
 | 
			
		||||
@@ -5235,9 +5235,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "ts-jest": {
 | 
			
		||||
      "version": "27.1.3",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz",
 | 
			
		||||
      "integrity": "sha512-6Nlura7s6uM9BVUAoqLH7JHyMXjz8gluryjpPXxr3IxZdAXnU6FhjvVLHFtfd1vsE1p8zD1OJfskkc0jhTSnkA==",
 | 
			
		||||
      "version": "27.1.4",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.4.tgz",
 | 
			
		||||
      "integrity": "sha512-qjkZlVPWVctAezwsOD1OPzbZ+k7zA5z3oxII4dGdZo5ggX/PL7kvwTM0pXTr10fAtbiVpJaL3bWd502zAhpgSQ==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "bs-logger": "0.x",
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								package.json
									
									
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "cache",
 | 
			
		||||
  "version": "3.0.0",
 | 
			
		||||
  "version": "3.0.2",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "description": "Cache dependencies and build outputs",
 | 
			
		||||
  "main": "dist/restore/index.js",
 | 
			
		||||
@@ -23,7 +23,7 @@
 | 
			
		||||
  "author": "GitHub",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@actions/cache": "^1.0.10",
 | 
			
		||||
    "@actions/cache": "^2.0.2",
 | 
			
		||||
    "@actions/core": "^1.2.6",
 | 
			
		||||
    "@actions/exec": "^1.1.1",
 | 
			
		||||
    "@actions/io": "^1.1.2"
 | 
			
		||||
@@ -32,20 +32,20 @@
 | 
			
		||||
    "@types/jest": "^27.4.1",
 | 
			
		||||
    "@types/nock": "^11.1.0",
 | 
			
		||||
    "@types/node": "^16.11.26",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.15.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.15.0",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.16.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.16.0",
 | 
			
		||||
    "@zeit/ncc": "^0.20.5",
 | 
			
		||||
    "eslint": "^8.11.0",
 | 
			
		||||
    "eslint-config-prettier": "^8.5.0",
 | 
			
		||||
    "eslint-plugin-import": "^2.25.4",
 | 
			
		||||
    "eslint-plugin-jest": "^26.1.2",
 | 
			
		||||
    "eslint-plugin-jest": "^26.1.3",
 | 
			
		||||
    "eslint-plugin-prettier": "^4.0.0",
 | 
			
		||||
    "eslint-plugin-simple-import-sort": "^7.0.0",
 | 
			
		||||
    "jest": "^27.5.1",
 | 
			
		||||
    "jest-circus": "^27.5.1",
 | 
			
		||||
    "nock": "^11.7.0",
 | 
			
		||||
    "prettier": "^2.6.0",
 | 
			
		||||
    "ts-jest": "^27.1.3",
 | 
			
		||||
    "prettier": "^2.6.1",
 | 
			
		||||
    "ts-jest": "^27.1.4",
 | 
			
		||||
    "typescript": "^3.9.9"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,10 +6,7 @@ import * as utils from "./utils/actionUtils";
 | 
			
		||||
 | 
			
		||||
async function run(): Promise<void> {
 | 
			
		||||
    try {
 | 
			
		||||
        if (utils.isGhes()) {
 | 
			
		||||
            utils.logWarning(
 | 
			
		||||
                "Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
 | 
			
		||||
            );
 | 
			
		||||
        if (!utils.isCacheFeatureAvailable()) {
 | 
			
		||||
            utils.setCacheHitOutput(false);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,7 @@ process.on("uncaughtException", e => utils.logWarning(e.message));
 | 
			
		||||
 | 
			
		||||
async function run(): Promise<void> {
 | 
			
		||||
    try {
 | 
			
		||||
        if (utils.isGhes()) {
 | 
			
		||||
            utils.logWarning(
 | 
			
		||||
                "Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
 | 
			
		||||
            );
 | 
			
		||||
        if (!utils.isCacheFeatureAvailable()) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,4 @@
 | 
			
		||||
import * as cache from "@actions/cache";
 | 
			
		||||
import * as core from "@actions/core";
 | 
			
		||||
 | 
			
		||||
import { Outputs, RefKey, State } from "../constants";
 | 
			
		||||
@@ -74,3 +75,20 @@ export function getInputAsInt(
 | 
			
		||||
    }
 | 
			
		||||
    return value;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function isCacheFeatureAvailable(): boolean {
 | 
			
		||||
    if (!cache.isFeatureAvailable()) {
 | 
			
		||||
        if (isGhes()) {
 | 
			
		||||
            logWarning(
 | 
			
		||||
                "Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not."
 | 
			
		||||
            );
 | 
			
		||||
        } else {
 | 
			
		||||
            logWarning(
 | 
			
		||||
                "An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user