mirror of
				https://gitea.com/actions/cache.git
				synced 2025-11-04 07:47:08 +00:00 
			
		
		
		
	Compare commits
	
		
			19 Commits
		
	
	
		
			t-dedah/up
			...
			vsvipul/al
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					bdb21a7177 | ||
| 
						 | 
					d55d005ab0 | ||
| 
						 | 
					b44d6c5cbf | ||
| 
						 | 
					60742c2acf | ||
| 
						 | 
					12086c7bbf | ||
| 
						 | 
					626c44ce85 | ||
| 
						 | 
					f2d5621efc | ||
| 
						 | 
					cab6d27614 | ||
| 
						 | 
					69811fd677 | ||
| 
						 | 
					887b9060fe | ||
| 
						 | 
					c6762fdd6a | ||
| 
						 | 
					95c3ae75f4 | ||
| 
						 | 
					797382fe42 | ||
| 
						 | 
					36dbd93a7c | ||
| 
						 | 
					45f362d0ca | ||
| 
						 | 
					ca0688b4ab | ||
| 
						 | 
					ef8498dcba | ||
| 
						 | 
					8f1e2e0286 | ||
| 
						 | 
					48af2dc4a9 | 
							
								
								
									
										17
									
								
								.github/auto_assign.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.github/auto_assign.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
# Set to true to add reviewers to pull requests
 | 
			
		||||
addReviewers: true
 | 
			
		||||
 | 
			
		||||
# Set to true to add assignees to pull requests
 | 
			
		||||
addAssignees: false
 | 
			
		||||
 | 
			
		||||
# A list of reviewers to be added to pull requests (GitHub user name)
 | 
			
		||||
reviewers:
 | 
			
		||||
  - phantsure
 | 
			
		||||
  - aparna-ravindra
 | 
			
		||||
  - tiwarishub
 | 
			
		||||
  - vsvipul
 | 
			
		||||
  - bishal-pdmsft
 | 
			
		||||
 | 
			
		||||
# A number of reviewers added to the pull request
 | 
			
		||||
# Set 0 to add all the reviewers (default: 0)
 | 
			
		||||
numberOfReviewers: 1
 | 
			
		||||
							
								
								
									
										15
									
								
								.github/workflows/auto-assign-issues.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/auto-assign-issues.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
name: Issue assignment
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
    issues:
 | 
			
		||||
        types: [opened]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
    auto-assign:
 | 
			
		||||
        runs-on: ubuntu-latest
 | 
			
		||||
        steps:
 | 
			
		||||
            - name: 'Auto-assign issue'
 | 
			
		||||
              uses: pozil/auto-assign-issue@v1.4.0
 | 
			
		||||
              with:
 | 
			
		||||
                  assignees: phantsure,tiwarishub,aparna-ravindra,vsvipul,bishal-pdmsft
 | 
			
		||||
                  numOfAssignee: 1
 | 
			
		||||
							
								
								
									
										10
									
								
								.github/workflows/auto-assign.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/auto-assign.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
name: 'Auto Assign'
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types: [opened, ready_for_review]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  add-reviews:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: kentaro-m/auto-assign-action@v1.2.1
 | 
			
		||||
							
								
								
									
										13
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
								
							@@ -22,16 +22,13 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								.github/workflows/close-inactive-issues.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/close-inactive-issues.yml
									
									
									
									
										vendored
									
									
								
							@@ -12,10 +12,10 @@ jobs:
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/stale@v3
 | 
			
		||||
        with:
 | 
			
		||||
          days-before-issue-stale: 365
 | 
			
		||||
          days-before-issue-stale: 200
 | 
			
		||||
          days-before-issue-close: 5
 | 
			
		||||
          stale-issue-label: "stale"
 | 
			
		||||
          stale-issue-message: "This issue is stale because it has been open for 365 days with no activity. Leave a comment to avoid closing this issue in 5 days."
 | 
			
		||||
          stale-issue-message: "This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days."
 | 
			
		||||
          close-issue-message: "This issue was closed because it has been inactive for 5 days since being marked as stale."
 | 
			
		||||
          days-before-pr-stale: -1
 | 
			
		||||
          days-before-pr-close: -1
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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: 2.0.1
 | 
			
		||||
version: 2.0.2
 | 
			
		||||
type: npm
 | 
			
		||||
summary: 
 | 
			
		||||
homepage: 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/core.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/core.dep.yml
									
									
									
										generated
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
name: "@actions/core"
 | 
			
		||||
version: 1.6.0
 | 
			
		||||
version: 1.7.0
 | 
			
		||||
type: npm
 | 
			
		||||
summary: Actions core lib
 | 
			
		||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								.licenses/npm/@types/node.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								.licenses/npm/@types/node.dep.yml
									
									
									
										generated
									
									
									
								
							@@ -1,9 +1,9 @@
 | 
			
		||||
---
 | 
			
		||||
name: "@types/node"
 | 
			
		||||
version: 16.11.26
 | 
			
		||||
version: 16.11.33
 | 
			
		||||
type: npm
 | 
			
		||||
summary: 
 | 
			
		||||
homepage: 
 | 
			
		||||
summary: TypeScript definitions for Node.js
 | 
			
		||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
 | 
			
		||||
license: mit
 | 
			
		||||
licenses:
 | 
			
		||||
- sources: LICENSE
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,7 @@ jobs:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v2
 | 
			
		||||
    - uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
    - name: Cache Primes
 | 
			
		||||
      id: cache-primes
 | 
			
		||||
@@ -162,7 +162,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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										314
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										314
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							@@ -37410,7 +37410,11 @@ exports.default = {
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@@ -37423,7 +37427,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@@ -39871,6 +39875,11 @@ function getIDToken(aud) {
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.getIDToken = getIDToken;
 | 
			
		||||
/**
 | 
			
		||||
 * Markdown summary exports
 | 
			
		||||
 */
 | 
			
		||||
var markdown_summary_1 = __webpack_require__(548);
 | 
			
		||||
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return markdown_summary_1.markdownSummary; } });
 | 
			
		||||
//# sourceMappingURL=core.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -41477,7 +41486,291 @@ CombinedStream.prototype._emitError = function(err) {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 548 */,
 | 
			
		||||
/* 548 */
 | 
			
		||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
			
		||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
			
		||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
			
		||||
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
 | 
			
		||||
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
 | 
			
		||||
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
 | 
			
		||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
 | 
			
		||||
const os_1 = __webpack_require__(87);
 | 
			
		||||
const fs_1 = __webpack_require__(747);
 | 
			
		||||
const { access, appendFile, writeFile } = fs_1.promises;
 | 
			
		||||
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
 | 
			
		||||
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary';
 | 
			
		||||
class MarkdownSummary {
 | 
			
		||||
    constructor() {
 | 
			
		||||
        this._buffer = '';
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Finds the summary file path from the environment, rejects if env var is not found or file does not exist
 | 
			
		||||
     * Also checks r/w permissions.
 | 
			
		||||
     *
 | 
			
		||||
     * @returns step summary file path
 | 
			
		||||
     */
 | 
			
		||||
    filePath() {
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            if (this._filePath) {
 | 
			
		||||
                return this._filePath;
 | 
			
		||||
            }
 | 
			
		||||
            const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
 | 
			
		||||
            if (!pathFromEnv) {
 | 
			
		||||
                throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`);
 | 
			
		||||
            }
 | 
			
		||||
            try {
 | 
			
		||||
                yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
 | 
			
		||||
            }
 | 
			
		||||
            catch (_a) {
 | 
			
		||||
                throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
 | 
			
		||||
            }
 | 
			
		||||
            this._filePath = pathFromEnv;
 | 
			
		||||
            return this._filePath;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Wraps content in an HTML tag, adding any HTML attributes
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} tag HTML tag to wrap
 | 
			
		||||
     * @param {string | null} content content within the tag
 | 
			
		||||
     * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {string} content wrapped in HTML element
 | 
			
		||||
     */
 | 
			
		||||
    wrap(tag, content, attrs = {}) {
 | 
			
		||||
        const htmlAttrs = Object.entries(attrs)
 | 
			
		||||
            .map(([key, value]) => ` ${key}="${value}"`)
 | 
			
		||||
            .join('');
 | 
			
		||||
        if (!content) {
 | 
			
		||||
            return `<${tag}${htmlAttrs}>`;
 | 
			
		||||
        }
 | 
			
		||||
        return `<${tag}${htmlAttrs}>${content}</${tag}>`;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {SummaryWriteOptions} [options] (optional) options for write operation
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {Promise<MarkdownSummary>} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    write(options) {
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
 | 
			
		||||
            const filePath = yield this.filePath();
 | 
			
		||||
            const writeFunc = overwrite ? writeFile : appendFile;
 | 
			
		||||
            yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
 | 
			
		||||
            return this.emptyBuffer();
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Clears the summary buffer and wipes the summary file
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    clear() {
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            return this.emptyBuffer().write({ overwrite: true });
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the current summary buffer as a string
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {string} string of summary buffer
 | 
			
		||||
     */
 | 
			
		||||
    stringify() {
 | 
			
		||||
        return this._buffer;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * If the summary buffer is empty
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {boolen} true if the buffer is empty
 | 
			
		||||
     */
 | 
			
		||||
    isEmptyBuffer() {
 | 
			
		||||
        return this._buffer.length === 0;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Resets the summary buffer without writing to summary file
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    emptyBuffer() {
 | 
			
		||||
        this._buffer = '';
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds raw text to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text content to add
 | 
			
		||||
     * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addRaw(text, addEOL = false) {
 | 
			
		||||
        this._buffer += text;
 | 
			
		||||
        return addEOL ? this.addEOL() : this;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds the operating system-specific end-of-line marker to the buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addEOL() {
 | 
			
		||||
        return this.addRaw(os_1.EOL);
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML codeblock to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} code content to render within fenced code block
 | 
			
		||||
     * @param {string} lang (optional) language to syntax highlight code
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addCodeBlock(code, lang) {
 | 
			
		||||
        const attrs = Object.assign({}, (lang && { lang }));
 | 
			
		||||
        const element = this.wrap('pre', this.wrap('code', code), attrs);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML list to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string[]} items list of items to render
 | 
			
		||||
     * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addList(items, ordered = false) {
 | 
			
		||||
        const tag = ordered ? 'ol' : 'ul';
 | 
			
		||||
        const listItems = items.map(item => this.wrap('li', item)).join('');
 | 
			
		||||
        const element = this.wrap(tag, listItems);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML table to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {SummaryTableCell[]} rows table rows
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addTable(rows) {
 | 
			
		||||
        const tableBody = rows
 | 
			
		||||
            .map(row => {
 | 
			
		||||
            const cells = row
 | 
			
		||||
                .map(cell => {
 | 
			
		||||
                if (typeof cell === 'string') {
 | 
			
		||||
                    return this.wrap('td', cell);
 | 
			
		||||
                }
 | 
			
		||||
                const { header, data, colspan, rowspan } = cell;
 | 
			
		||||
                const tag = header ? 'th' : 'td';
 | 
			
		||||
                const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
 | 
			
		||||
                return this.wrap(tag, data, attrs);
 | 
			
		||||
            })
 | 
			
		||||
                .join('');
 | 
			
		||||
            return this.wrap('tr', cells);
 | 
			
		||||
        })
 | 
			
		||||
            .join('');
 | 
			
		||||
        const element = this.wrap('table', tableBody);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds a collapsable HTML details element to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} label text for the closed state
 | 
			
		||||
     * @param {string} content collapsable content
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addDetails(label, content) {
 | 
			
		||||
        const element = this.wrap('details', this.wrap('summary', label) + content);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML image tag to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} src path to the image you to embed
 | 
			
		||||
     * @param {string} alt text description of the image
 | 
			
		||||
     * @param {SummaryImageOptions} options (optional) addition image attributes
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addImage(src, alt, options) {
 | 
			
		||||
        const { width, height } = options || {};
 | 
			
		||||
        const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
 | 
			
		||||
        const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML section heading element
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text heading text
 | 
			
		||||
     * @param {number | string} [level=1] (optional) the heading level, default: 1
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addHeading(text, level) {
 | 
			
		||||
        const tag = `h${level}`;
 | 
			
		||||
        const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
 | 
			
		||||
            ? tag
 | 
			
		||||
            : 'h1';
 | 
			
		||||
        const element = this.wrap(allowedTag, text);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML thematic break (<hr>) to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addSeparator() {
 | 
			
		||||
        const element = this.wrap('hr', null);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML line break (<br>) to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addBreak() {
 | 
			
		||||
        const element = this.wrap('br', null);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML blockquote to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text quote text
 | 
			
		||||
     * @param {string} cite (optional) citation url
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addQuote(text, cite) {
 | 
			
		||||
        const attrs = Object.assign({}, (cite && { cite }));
 | 
			
		||||
        const element = this.wrap('blockquote', text, attrs);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML anchor tag to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text link text/content
 | 
			
		||||
     * @param {string} href hyperlink
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addLink(text, href) {
 | 
			
		||||
        const element = this.wrap('a', text, { href });
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
// singleton export
 | 
			
		||||
exports.markdownSummary = new MarkdownSummary();
 | 
			
		||||
//# sourceMappingURL=markdown-summary.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 549 */,
 | 
			
		||||
/* 550 */,
 | 
			
		||||
/* 551 */,
 | 
			
		||||
@@ -46479,7 +46772,7 @@ function saveCache(paths, key, options) {
 | 
			
		||||
                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 ReserveCacheError((_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.`);
 | 
			
		||||
                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}`);
 | 
			
		||||
@@ -47883,7 +48176,11 @@ module.exports = function(dst, src) {
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@@ -47896,7 +48193,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@@ -47948,11 +48245,12 @@ function run() {
 | 
			
		||||
                core.info(`Cache restored from key: ${cacheKey}`);
 | 
			
		||||
            }
 | 
			
		||||
            catch (error) {
 | 
			
		||||
                if (error.name === cache.ValidationError.name) {
 | 
			
		||||
                const typedError = error;
 | 
			
		||||
                if (typedError.name === cache.ValidationError.name) {
 | 
			
		||||
                    throw error;
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    utils.logWarning(error.message);
 | 
			
		||||
                    utils.logWarning(typedError.message);
 | 
			
		||||
                    utils.setCacheHitOutput(false);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										318
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										318
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							@@ -37410,7 +37410,11 @@ exports.default = {
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@@ -37423,7 +37427,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@@ -39871,6 +39875,11 @@ function getIDToken(aud) {
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.getIDToken = getIDToken;
 | 
			
		||||
/**
 | 
			
		||||
 * Markdown summary exports
 | 
			
		||||
 */
 | 
			
		||||
var markdown_summary_1 = __webpack_require__(548);
 | 
			
		||||
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return markdown_summary_1.markdownSummary; } });
 | 
			
		||||
//# sourceMappingURL=core.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@@ -41477,7 +41486,291 @@ CombinedStream.prototype._emitError = function(err) {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 548 */,
 | 
			
		||||
/* 548 */
 | 
			
		||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
 | 
			
		||||
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
			
		||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
			
		||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
			
		||||
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
 | 
			
		||||
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
 | 
			
		||||
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
 | 
			
		||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
			
		||||
    });
 | 
			
		||||
};
 | 
			
		||||
Object.defineProperty(exports, "__esModule", { value: true });
 | 
			
		||||
exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
 | 
			
		||||
const os_1 = __webpack_require__(87);
 | 
			
		||||
const fs_1 = __webpack_require__(747);
 | 
			
		||||
const { access, appendFile, writeFile } = fs_1.promises;
 | 
			
		||||
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
 | 
			
		||||
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary';
 | 
			
		||||
class MarkdownSummary {
 | 
			
		||||
    constructor() {
 | 
			
		||||
        this._buffer = '';
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Finds the summary file path from the environment, rejects if env var is not found or file does not exist
 | 
			
		||||
     * Also checks r/w permissions.
 | 
			
		||||
     *
 | 
			
		||||
     * @returns step summary file path
 | 
			
		||||
     */
 | 
			
		||||
    filePath() {
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            if (this._filePath) {
 | 
			
		||||
                return this._filePath;
 | 
			
		||||
            }
 | 
			
		||||
            const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
 | 
			
		||||
            if (!pathFromEnv) {
 | 
			
		||||
                throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`);
 | 
			
		||||
            }
 | 
			
		||||
            try {
 | 
			
		||||
                yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
 | 
			
		||||
            }
 | 
			
		||||
            catch (_a) {
 | 
			
		||||
                throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);
 | 
			
		||||
            }
 | 
			
		||||
            this._filePath = pathFromEnv;
 | 
			
		||||
            return this._filePath;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Wraps content in an HTML tag, adding any HTML attributes
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} tag HTML tag to wrap
 | 
			
		||||
     * @param {string | null} content content within the tag
 | 
			
		||||
     * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {string} content wrapped in HTML element
 | 
			
		||||
     */
 | 
			
		||||
    wrap(tag, content, attrs = {}) {
 | 
			
		||||
        const htmlAttrs = Object.entries(attrs)
 | 
			
		||||
            .map(([key, value]) => ` ${key}="${value}"`)
 | 
			
		||||
            .join('');
 | 
			
		||||
        if (!content) {
 | 
			
		||||
            return `<${tag}${htmlAttrs}>`;
 | 
			
		||||
        }
 | 
			
		||||
        return `<${tag}${htmlAttrs}>${content}</${tag}>`;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.
 | 
			
		||||
     *
 | 
			
		||||
     * @param {SummaryWriteOptions} [options] (optional) options for write operation
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {Promise<MarkdownSummary>} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    write(options) {
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);
 | 
			
		||||
            const filePath = yield this.filePath();
 | 
			
		||||
            const writeFunc = overwrite ? writeFile : appendFile;
 | 
			
		||||
            yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });
 | 
			
		||||
            return this.emptyBuffer();
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Clears the summary buffer and wipes the summary file
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    clear() {
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            return this.emptyBuffer().write({ overwrite: true });
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Returns the current summary buffer as a string
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {string} string of summary buffer
 | 
			
		||||
     */
 | 
			
		||||
    stringify() {
 | 
			
		||||
        return this._buffer;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * If the summary buffer is empty
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {boolen} true if the buffer is empty
 | 
			
		||||
     */
 | 
			
		||||
    isEmptyBuffer() {
 | 
			
		||||
        return this._buffer.length === 0;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Resets the summary buffer without writing to summary file
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    emptyBuffer() {
 | 
			
		||||
        this._buffer = '';
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds raw text to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text content to add
 | 
			
		||||
     * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addRaw(text, addEOL = false) {
 | 
			
		||||
        this._buffer += text;
 | 
			
		||||
        return addEOL ? this.addEOL() : this;
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds the operating system-specific end-of-line marker to the buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addEOL() {
 | 
			
		||||
        return this.addRaw(os_1.EOL);
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML codeblock to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} code content to render within fenced code block
 | 
			
		||||
     * @param {string} lang (optional) language to syntax highlight code
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addCodeBlock(code, lang) {
 | 
			
		||||
        const attrs = Object.assign({}, (lang && { lang }));
 | 
			
		||||
        const element = this.wrap('pre', this.wrap('code', code), attrs);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML list to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string[]} items list of items to render
 | 
			
		||||
     * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addList(items, ordered = false) {
 | 
			
		||||
        const tag = ordered ? 'ol' : 'ul';
 | 
			
		||||
        const listItems = items.map(item => this.wrap('li', item)).join('');
 | 
			
		||||
        const element = this.wrap(tag, listItems);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML table to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {SummaryTableCell[]} rows table rows
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addTable(rows) {
 | 
			
		||||
        const tableBody = rows
 | 
			
		||||
            .map(row => {
 | 
			
		||||
            const cells = row
 | 
			
		||||
                .map(cell => {
 | 
			
		||||
                if (typeof cell === 'string') {
 | 
			
		||||
                    return this.wrap('td', cell);
 | 
			
		||||
                }
 | 
			
		||||
                const { header, data, colspan, rowspan } = cell;
 | 
			
		||||
                const tag = header ? 'th' : 'td';
 | 
			
		||||
                const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));
 | 
			
		||||
                return this.wrap(tag, data, attrs);
 | 
			
		||||
            })
 | 
			
		||||
                .join('');
 | 
			
		||||
            return this.wrap('tr', cells);
 | 
			
		||||
        })
 | 
			
		||||
            .join('');
 | 
			
		||||
        const element = this.wrap('table', tableBody);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds a collapsable HTML details element to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} label text for the closed state
 | 
			
		||||
     * @param {string} content collapsable content
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addDetails(label, content) {
 | 
			
		||||
        const element = this.wrap('details', this.wrap('summary', label) + content);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML image tag to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} src path to the image you to embed
 | 
			
		||||
     * @param {string} alt text description of the image
 | 
			
		||||
     * @param {SummaryImageOptions} options (optional) addition image attributes
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addImage(src, alt, options) {
 | 
			
		||||
        const { width, height } = options || {};
 | 
			
		||||
        const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));
 | 
			
		||||
        const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML section heading element
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text heading text
 | 
			
		||||
     * @param {number | string} [level=1] (optional) the heading level, default: 1
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addHeading(text, level) {
 | 
			
		||||
        const tag = `h${level}`;
 | 
			
		||||
        const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)
 | 
			
		||||
            ? tag
 | 
			
		||||
            : 'h1';
 | 
			
		||||
        const element = this.wrap(allowedTag, text);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML thematic break (<hr>) to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addSeparator() {
 | 
			
		||||
        const element = this.wrap('hr', null);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML line break (<br>) to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addBreak() {
 | 
			
		||||
        const element = this.wrap('br', null);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML blockquote to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text quote text
 | 
			
		||||
     * @param {string} cite (optional) citation url
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addQuote(text, cite) {
 | 
			
		||||
        const attrs = Object.assign({}, (cite && { cite }));
 | 
			
		||||
        const element = this.wrap('blockquote', text, attrs);
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
    /**
 | 
			
		||||
     * Adds an HTML anchor tag to the summary buffer
 | 
			
		||||
     *
 | 
			
		||||
     * @param {string} text link text/content
 | 
			
		||||
     * @param {string} href hyperlink
 | 
			
		||||
     *
 | 
			
		||||
     * @returns {MarkdownSummary} markdown summary instance
 | 
			
		||||
     */
 | 
			
		||||
    addLink(text, href) {
 | 
			
		||||
        const element = this.wrap('a', text, { href });
 | 
			
		||||
        return this.addRaw(element).addEOL();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
// singleton export
 | 
			
		||||
exports.markdownSummary = new MarkdownSummary();
 | 
			
		||||
//# sourceMappingURL=markdown-summary.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
/* 549 */,
 | 
			
		||||
/* 550 */,
 | 
			
		||||
/* 551 */,
 | 
			
		||||
@@ -46282,7 +46575,11 @@ exports.default = _default;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@@ -46295,7 +46592,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@@ -46348,14 +46645,15 @@ function run() {
 | 
			
		||||
                core.info(`Cache saved with key: ${primaryKey}`);
 | 
			
		||||
            }
 | 
			
		||||
            catch (error) {
 | 
			
		||||
                if (error.name === cache.ValidationError.name) {
 | 
			
		||||
                const typedError = error;
 | 
			
		||||
                if (typedError.name === cache.ValidationError.name) {
 | 
			
		||||
                    throw error;
 | 
			
		||||
                }
 | 
			
		||||
                else if (error.name === cache.ReserveCacheError.name) {
 | 
			
		||||
                    core.info(error.message);
 | 
			
		||||
                else if (typedError.name === cache.ReserveCacheError.name) {
 | 
			
		||||
                    core.info(typedError.message);
 | 
			
		||||
                }
 | 
			
		||||
                else {
 | 
			
		||||
                    utils.logWarning(error.message);
 | 
			
		||||
                    utils.logWarning(typedError.message);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@@ -46572,7 +46870,7 @@ function saveCache(paths, key, options) {
 | 
			
		||||
                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 ReserveCacheError((_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.`);
 | 
			
		||||
                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}`);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13400
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										13400
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										28
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								package.json
									
									
									
									
									
								
							@@ -23,29 +23,29 @@
 | 
			
		||||
  "author": "GitHub",
 | 
			
		||||
  "license": "MIT",
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@actions/cache": "^2.0.1",
 | 
			
		||||
    "@actions/core": "^1.2.6",
 | 
			
		||||
    "@actions/cache": "^2.0.2",
 | 
			
		||||
    "@actions/core": "^1.7.0",
 | 
			
		||||
    "@actions/exec": "^1.1.1",
 | 
			
		||||
    "@actions/io": "^1.1.2"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@types/jest": "^27.4.1",
 | 
			
		||||
    "@types/jest": "^27.5.0",
 | 
			
		||||
    "@types/nock": "^11.1.0",
 | 
			
		||||
    "@types/node": "^16.11.26",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.16.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.16.0",
 | 
			
		||||
    "@types/node": "^16.11.33",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.22.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.22.0",
 | 
			
		||||
    "@zeit/ncc": "^0.20.5",
 | 
			
		||||
    "eslint": "^8.11.0",
 | 
			
		||||
    "eslint": "^8.14.0",
 | 
			
		||||
    "eslint-config-prettier": "^8.5.0",
 | 
			
		||||
    "eslint-plugin-import": "^2.25.4",
 | 
			
		||||
    "eslint-plugin-jest": "^26.1.3",
 | 
			
		||||
    "eslint-plugin-import": "^2.26.0",
 | 
			
		||||
    "eslint-plugin-jest": "^26.1.5",
 | 
			
		||||
    "eslint-plugin-prettier": "^4.0.0",
 | 
			
		||||
    "eslint-plugin-simple-import-sort": "^7.0.0",
 | 
			
		||||
    "jest": "^27.5.1",
 | 
			
		||||
    "jest": "^28.0.3",
 | 
			
		||||
    "jest-circus": "^27.5.1",
 | 
			
		||||
    "nock": "^11.7.0",
 | 
			
		||||
    "prettier": "^2.6.1",
 | 
			
		||||
    "ts-jest": "^27.1.4",
 | 
			
		||||
    "typescript": "^3.9.9"
 | 
			
		||||
    "nock": "^13.2.4",
 | 
			
		||||
    "prettier": "^2.6.2",
 | 
			
		||||
    "ts-jest": "^28.0.2",
 | 
			
		||||
    "typescript": "^4.6.4"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -52,16 +52,17 @@ async function run(): Promise<void> {
 | 
			
		||||
            utils.setCacheHitOutput(isExactKeyMatch);
 | 
			
		||||
 | 
			
		||||
            core.info(`Cache restored from key: ${cacheKey}`);
 | 
			
		||||
        } catch (error) {
 | 
			
		||||
            if (error.name === cache.ValidationError.name) {
 | 
			
		||||
        } catch (error: unknown) {
 | 
			
		||||
            const typedError = error as Error;
 | 
			
		||||
            if (typedError.name === cache.ValidationError.name) {
 | 
			
		||||
                throw error;
 | 
			
		||||
            } else {
 | 
			
		||||
                utils.logWarning(error.message);
 | 
			
		||||
                utils.logWarning(typedError.message);
 | 
			
		||||
                utils.setCacheHitOutput(false);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        core.setFailed(error.message);
 | 
			
		||||
    } catch (error: unknown) {
 | 
			
		||||
        core.setFailed((error as Error).message);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								src/save.ts
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/save.ts
									
									
									
									
									
								
							@@ -49,17 +49,18 @@ async function run(): Promise<void> {
 | 
			
		||||
                uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
 | 
			
		||||
            });
 | 
			
		||||
            core.info(`Cache saved with key: ${primaryKey}`);
 | 
			
		||||
        } catch (error) {
 | 
			
		||||
            if (error.name === cache.ValidationError.name) {
 | 
			
		||||
        } catch (error: unknown) {
 | 
			
		||||
            const typedError = error as Error;
 | 
			
		||||
            if (typedError.name === cache.ValidationError.name) {
 | 
			
		||||
                throw error;
 | 
			
		||||
            } else if (error.name === cache.ReserveCacheError.name) {
 | 
			
		||||
                core.info(error.message);
 | 
			
		||||
            } else if (typedError.name === cache.ReserveCacheError.name) {
 | 
			
		||||
                core.info(typedError.message);
 | 
			
		||||
            } else {
 | 
			
		||||
                utils.logWarning(error.message);
 | 
			
		||||
                utils.logWarning(typedError.message);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        utils.logWarning(error.message);
 | 
			
		||||
    } catch (error: unknown) {
 | 
			
		||||
        utils.logWarning((error as Error).message);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user