mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 22:08:09 +08:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			v4
			...
			68a03db899
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 68a03db899 | 
							
								
								
									
										4
									
								
								.licenses/npm/@octokit/endpoint.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								.licenses/npm/@octokit/endpoint.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,9 +1,9 @@ | |||||||
| --- | --- | ||||||
| name: "@octokit/endpoint" | name: "@octokit/endpoint" | ||||||
| version: 9.0.6 | version: 9.0.5 | ||||||
| type: npm | type: npm | ||||||
| summary: Turns REST API endpoints into generic request options | summary: Turns REST API endpoints into generic request options | ||||||
| homepage: | homepage:  | ||||||
| license: mit | license: mit | ||||||
| licenses: | licenses: | ||||||
| - sources: LICENSE | - sources: LICENSE | ||||||
|   | |||||||
| @@ -1,9 +1,9 @@ | |||||||
| --- | --- | ||||||
| name: "@octokit/plugin-paginate-rest" | name: "@octokit/plugin-paginate-rest" | ||||||
| version: 9.2.2 | version: 9.2.1 | ||||||
| type: npm | type: npm | ||||||
| summary: Octokit plugin to paginate REST API endpoint responses | summary: Octokit plugin to paginate REST API endpoint responses | ||||||
| homepage: | homepage:  | ||||||
| license: mit | license: mit | ||||||
| licenses: | licenses: | ||||||
| - sources: LICENSE | - sources: LICENSE | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								.licenses/npm/@octokit/request-error.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								.licenses/npm/@octokit/request-error.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,9 +1,9 @@ | |||||||
| --- | --- | ||||||
| name: "@octokit/request-error" | name: "@octokit/request-error" | ||||||
| version: 5.1.1 | version: 5.1.0 | ||||||
| type: npm | type: npm | ||||||
| summary: Error class for Octokit request errors | summary: Error class for Octokit request errors | ||||||
| homepage: | homepage:  | ||||||
| license: mit | license: mit | ||||||
| licenses: | licenses: | ||||||
| - sources: LICENSE | - sources: LICENSE | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								.licenses/npm/@octokit/request.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								.licenses/npm/@octokit/request.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,10 +1,10 @@ | |||||||
| --- | --- | ||||||
| name: "@octokit/request" | name: "@octokit/request" | ||||||
| version: 8.4.1 | version: 8.4.0 | ||||||
| type: npm | type: npm | ||||||
| summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers | summary: Send parameterized requests to GitHub's APIs with sensible defaults in browsers | ||||||
|   and Node |   and Node | ||||||
| homepage: | homepage:  | ||||||
| license: mit | license: mit | ||||||
| licenses: | licenses: | ||||||
| - sources: LICENSE | - sources: LICENSE | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								.licenses/npm/undici.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/undici.dep.yml
									
									
									
										generated
									
									
									
								
							| @@ -1,6 +1,6 @@ | |||||||
| --- | --- | ||||||
| name: undici | name: undici | ||||||
| version: 5.29.0 | version: 5.28.4 | ||||||
| type: npm | type: npm | ||||||
| summary: An HTTP/1.1 client, written from scratch for Node.js | summary: An HTTP/1.1 client, written from scratch for Node.js | ||||||
| homepage: https://undici.nodejs.org | homepage: https://undici.nodejs.org | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,18 +1,5 @@ | |||||||
| # Changelog | # Changelog | ||||||
|  |  | ||||||
| ## V4.3.0 |  | ||||||
| * docs: update README.md by @motss in https://github.com/actions/checkout/pull/1971 |  | ||||||
| * Add internal repos for checking out multiple repositories by @mouismail in https://github.com/actions/checkout/pull/1977 |  | ||||||
| * Documentation update - add recommended permissions to Readme by @benwells in https://github.com/actions/checkout/pull/2043 |  | ||||||
| * Adjust positioning of user email note and permissions heading by @joshmgross in https://github.com/actions/checkout/pull/2044 |  | ||||||
| * Update README.md by @nebuk89 in https://github.com/actions/checkout/pull/2194 |  | ||||||
| * Update CODEOWNERS for actions by @TingluoHuang in https://github.com/actions/checkout/pull/2224 |  | ||||||
| * Update package dependencies by @salmanmkc in https://github.com/actions/checkout/pull/2236 |  | ||||||
|  |  | ||||||
| ## v4.2.2 |  | ||||||
| * `url-helper.ts` now leverages well-known environment variables by @jww3 in https://github.com/actions/checkout/pull/1941 |  | ||||||
| * Expand unit test coverage for `isGhes` by @jww3 in https://github.com/actions/checkout/pull/1946 |  | ||||||
|  |  | ||||||
| ## v4.2.1 | ## v4.2.1 | ||||||
| * Check out other refs/* by commit if provided, fall back to ref by @orhantoy in https://github.com/actions/checkout/pull/1924 | * Check out other refs/* by commit if provided, fall back to ref by @orhantoy in https://github.com/actions/checkout/pull/1924 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| * @actions/actions-runtime | * @actions/actions-launch | ||||||
|   | |||||||
							
								
								
									
										63
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										63
									
								
								README.md
									
									
									
									
									
								
							| @@ -10,24 +10,6 @@ The auth token is persisted in the local git config. This enables your scripts t | |||||||
|  |  | ||||||
| When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files. | When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files. | ||||||
|  |  | ||||||
| ### Note |  | ||||||
|  |  | ||||||
| Thank you for your interest in this GitHub action, however, right now we are not taking contributions.  |  | ||||||
|  |  | ||||||
| We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features we’re working on and what stage they’re in. |  | ||||||
|  |  | ||||||
| We are taking the following steps to better direct requests related to GitHub Actions, including: |  | ||||||
|  |  | ||||||
| 1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions) |  | ||||||
|  |  | ||||||
| 2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report. |  | ||||||
|  |  | ||||||
| 3. Security Issues should be handled as per our [security.md](security.md) |  | ||||||
|  |  | ||||||
| We will still provide security updates for this project and fix major breaking changes during this time. |  | ||||||
|  |  | ||||||
| You are welcome to still raise bugs in this repo. |  | ||||||
|  |  | ||||||
| # What's new | # What's new | ||||||
|  |  | ||||||
| Please refer to the [release page](https://github.com/actions/checkout/releases/latest) for the latest release notes. | Please refer to the [release page](https://github.com/actions/checkout/releases/latest) for the latest release notes. | ||||||
| @@ -144,6 +126,11 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ | |||||||
|     # running from unless specified. Example URLs are https://github.com or |     # running from unless specified. Example URLs are https://github.com or | ||||||
|     # https://my-ghes-server.example.com |     # https://my-ghes-server.example.com | ||||||
|     github-server-url: '' |     github-server-url: '' | ||||||
|  |  | ||||||
|  |     # Use the given object format when creating local repository.  Specifically, use | ||||||
|  |     # 'sha256' to checkout a SHA-256 repository. | ||||||
|  |     # Defualt: null | ||||||
|  |     object-format: '' | ||||||
| ``` | ``` | ||||||
| <!-- end usage --> | <!-- end usage --> | ||||||
|  |  | ||||||
| @@ -161,7 +148,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ | |||||||
| - [Checkout pull request HEAD commit instead of merge commit](#Checkout-pull-request-HEAD-commit-instead-of-merge-commit) | - [Checkout pull request HEAD commit instead of merge commit](#Checkout-pull-request-HEAD-commit-instead-of-merge-commit) | ||||||
| - [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event) | - [Checkout pull request on closed event](#Checkout-pull-request-on-closed-event) | ||||||
| - [Push a commit using the built-in token](#Push-a-commit-using-the-built-in-token) | - [Push a commit using the built-in token](#Push-a-commit-using-the-built-in-token) | ||||||
| - [Push a commit to a PR using the built-in token](#Push-a-commit-to-a-PR-using-the-built-in-token) | - [Checkout SHA-256 repository](#checkout-sha-256-repository) | ||||||
|  |  | ||||||
| ## Fetch only the root files | ## Fetch only the root files | ||||||
|  |  | ||||||
| @@ -230,7 +217,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ | |||||||
|     repository: my-org/my-tools |     repository: my-org/my-tools | ||||||
|     path: my-tools |     path: my-tools | ||||||
| ``` | ``` | ||||||
| > - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private) | > - If your secondary repository is private you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private) | ||||||
|  |  | ||||||
| ## Checkout multiple repos (nested) | ## Checkout multiple repos (nested) | ||||||
|  |  | ||||||
| @@ -244,7 +231,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ | |||||||
|     repository: my-org/my-tools |     repository: my-org/my-tools | ||||||
|     path: my-tools |     path: my-tools | ||||||
| ``` | ``` | ||||||
| > - If your secondary repository is private or internal you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private) | > - If your secondary repository is private you will need to add the option noted in [Checkout multiple repos (private)](#Checkout-multiple-repos-private) | ||||||
|  |  | ||||||
| ## Checkout multiple repos (private) | ## Checkout multiple repos (private) | ||||||
|  |  | ||||||
| @@ -307,38 +294,12 @@ jobs: | |||||||
| ``` | ``` | ||||||
| *NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D | *NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D | ||||||
|  |  | ||||||
| ## Push a commit to a PR using the built-in token | ## Checkout SHA-256 repository | ||||||
|  |  | ||||||
| In a pull request trigger, `ref` is required as GitHub Actions checks out in detached HEAD mode, meaning it doesn’t check out your branch by default. |  | ||||||
|  |  | ||||||
| ```yaml | ```yaml | ||||||
| on: pull_request | - uses: actions/checkout@v4 | ||||||
| jobs: |   with: | ||||||
|   build: |     object-format: sha256 | ||||||
|     runs-on: ubuntu-latest |  | ||||||
|     steps: |  | ||||||
|       - uses: actions/checkout@v4 |  | ||||||
|         with: |  | ||||||
|           ref: ${{ github.head_ref }} |  | ||||||
|       - run: | |  | ||||||
|           date > generated.txt |  | ||||||
|           # Note: the following account information will not work on GHES |  | ||||||
|           git config user.name "github-actions[bot]" |  | ||||||
|           git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |  | ||||||
|           git add . |  | ||||||
|           git commit -m "generated" |  | ||||||
|           git push |  | ||||||
| ``` |  | ||||||
|  |  | ||||||
| *NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D |  | ||||||
|  |  | ||||||
| # Recommended permissions |  | ||||||
|  |  | ||||||
| When using the `checkout` action in your GitHub Actions workflow, it is recommended to set the following `GITHUB_TOKEN` permissions to ensure proper functionality, unless alternative auth is provided via the `token` or `ssh-key` inputs: |  | ||||||
|  |  | ||||||
| ```yaml |  | ||||||
| permissions: |  | ||||||
|   contents: read |  | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| # License | # License | ||||||
|   | |||||||
| @@ -824,7 +824,8 @@ async function setup(testName: string): Promise<void> { | |||||||
|     sshUser: '', |     sshUser: '', | ||||||
|     workflowOrganizationId: 123456, |     workflowOrganizationId: 123456, | ||||||
|     setSafeDirectory: true, |     setSafeDirectory: true, | ||||||
|     githubServerUrl: githubServerUrl |     githubServerUrl: githubServerUrl, | ||||||
|  |     objectFormat: undefined | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -375,4 +375,31 @@ describe('Test fetchDepth and fetchTags options', () => { | |||||||
|       expect.any(Object) |       expect.any(Object) | ||||||
|     ) |     ) | ||||||
|   }) |   }) | ||||||
|  |  | ||||||
|  |   it('should call execGit wiwth the correct arguments when sha256 is used', async () => { | ||||||
|  |     jest.spyOn(exec, 'exec').mockImplementation(mockExec) | ||||||
|  |  | ||||||
|  |     const workingDirectory = 'test' | ||||||
|  |     const lfs = false | ||||||
|  |     const doSparseCheckout = false | ||||||
|  |     git = await commandManager.createCommandManager( | ||||||
|  |       workingDirectory, | ||||||
|  |       lfs, | ||||||
|  |       doSparseCheckout | ||||||
|  |     ) | ||||||
|  |  | ||||||
|  |     await git.init({objectFormat: 'sha256'}) | ||||||
|  |     // await git.init({objectFormat: undefined}) | ||||||
|  |  | ||||||
|  |     expect(mockExec).toHaveBeenCalledWith( | ||||||
|  |       expect.any(String), | ||||||
|  |       [ | ||||||
|  |         'init', | ||||||
|  |         '--object-format=sha256', | ||||||
|  |         'test' | ||||||
|  |       ], | ||||||
|  |       expect.any(Object) | ||||||
|  |     ) | ||||||
|  |   }) | ||||||
| }) | }) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,92 +0,0 @@ | |||||||
| import * as urlHelper from '../src/url-helper' |  | ||||||
|  |  | ||||||
| describe('getServerUrl tests', () => { |  | ||||||
|   it('basics', async () => { |  | ||||||
|     // Note that URL::toString will append a trailing / when passed just a domain name ... |  | ||||||
|     expect(urlHelper.getServerUrl().toString()).toBe('https://github.com/') |  | ||||||
|     expect(urlHelper.getServerUrl(' ').toString()).toBe('https://github.com/') |  | ||||||
|     expect(urlHelper.getServerUrl('   ').toString()).toBe('https://github.com/') |  | ||||||
|     expect(urlHelper.getServerUrl('http://contoso.com').toString()).toBe( |  | ||||||
|       'http://contoso.com/' |  | ||||||
|     ) |  | ||||||
|     expect(urlHelper.getServerUrl('https://contoso.com').toString()).toBe( |  | ||||||
|       'https://contoso.com/' |  | ||||||
|     ) |  | ||||||
|     expect(urlHelper.getServerUrl('https://contoso.com/').toString()).toBe( |  | ||||||
|       'https://contoso.com/' |  | ||||||
|     ) |  | ||||||
|  |  | ||||||
|     // ... but can't make that same assumption when passed an URL that includes some deeper path. |  | ||||||
|     expect(urlHelper.getServerUrl('https://contoso.com/a/b').toString()).toBe( |  | ||||||
|       'https://contoso.com/a/b' |  | ||||||
|     ) |  | ||||||
|   }) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| describe('isGhes tests', () => { |  | ||||||
|   const pristineEnv = process.env |  | ||||||
|  |  | ||||||
|   beforeEach(() => { |  | ||||||
|     jest.resetModules() |  | ||||||
|     process.env = {...pristineEnv} |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   afterAll(() => { |  | ||||||
|     process.env = pristineEnv |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   it('basics', async () => { |  | ||||||
|     delete process.env['GITHUB_SERVER_URL'] |  | ||||||
|     expect(urlHelper.isGhes()).toBeFalsy() |  | ||||||
|     expect(urlHelper.isGhes('https://github.com')).toBeFalsy() |  | ||||||
|     expect(urlHelper.isGhes('https://contoso.ghe.com')).toBeFalsy() |  | ||||||
|     expect(urlHelper.isGhes('https://test.github.localhost')).toBeFalsy() |  | ||||||
|     expect(urlHelper.isGhes('https://src.onpremise.fabrikam.com')).toBeTruthy() |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   it('returns false when the GITHUB_SERVER_URL environment variable is not defined', async () => { |  | ||||||
|     delete process.env['GITHUB_SERVER_URL'] |  | ||||||
|     expect(urlHelper.isGhes()).toBeFalsy() |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   it('returns false when the GITHUB_SERVER_URL environment variable is set to github.com', async () => { |  | ||||||
|     process.env['GITHUB_SERVER_URL'] = 'https://github.com' |  | ||||||
|     expect(urlHelper.isGhes()).toBeFalsy() |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   it('returns false when the GITHUB_SERVER_URL environment variable is set to a GitHub Enterprise Cloud-style URL', async () => { |  | ||||||
|     process.env['GITHUB_SERVER_URL'] = 'https://contoso.ghe.com' |  | ||||||
|     expect(urlHelper.isGhes()).toBeFalsy() |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   it('returns false when the GITHUB_SERVER_URL environment variable has a .localhost suffix', async () => { |  | ||||||
|     process.env['GITHUB_SERVER_URL'] = 'https://mock-github.localhost' |  | ||||||
|     expect(urlHelper.isGhes()).toBeFalsy() |  | ||||||
|   }) |  | ||||||
|  |  | ||||||
|   it('returns true when the GITHUB_SERVER_URL environment variable is set to some other URL', async () => { |  | ||||||
|     process.env['GITHUB_SERVER_URL'] = 'https://src.onpremise.fabrikam.com' |  | ||||||
|     expect(urlHelper.isGhes()).toBeTruthy() |  | ||||||
|   }) |  | ||||||
| }) |  | ||||||
|  |  | ||||||
| describe('getServerApiUrl tests', () => { |  | ||||||
|   it('basics', async () => { |  | ||||||
|     expect(urlHelper.getServerApiUrl()).toBe('https://api.github.com') |  | ||||||
|     expect(urlHelper.getServerApiUrl('https://github.com')).toBe( |  | ||||||
|       'https://api.github.com' |  | ||||||
|     ) |  | ||||||
|     expect(urlHelper.getServerApiUrl('https://GitHub.com')).toBe( |  | ||||||
|       'https://api.github.com' |  | ||||||
|     ) |  | ||||||
|     expect(urlHelper.getServerApiUrl('https://contoso.ghe.com')).toBe( |  | ||||||
|       'https://api.contoso.ghe.com' |  | ||||||
|     ) |  | ||||||
|     expect(urlHelper.getServerApiUrl('https://fabrikam.GHE.COM')).toBe( |  | ||||||
|       'https://api.fabrikam.ghe.com' |  | ||||||
|     ) |  | ||||||
|     expect( |  | ||||||
|       urlHelper.getServerApiUrl('https://src.onpremise.fabrikam.com') |  | ||||||
|     ).toBe('https://src.onpremise.fabrikam.com/api/v3') |  | ||||||
|   }) |  | ||||||
| }) |  | ||||||
							
								
								
									
										237
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										237
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -30,9 +30,7 @@ var __importStar = (this && this.__importStar) || function (mod) { | |||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.directoryExistsSync = directoryExistsSync; | exports.fileExistsSync = exports.existsSync = exports.directoryExistsSync = void 0; | ||||||
| exports.existsSync = existsSync; |  | ||||||
| exports.fileExistsSync = fileExistsSync; |  | ||||||
| const fs = __importStar(__nccwpck_require__(7147)); | const fs = __importStar(__nccwpck_require__(7147)); | ||||||
| function directoryExistsSync(path, required) { | function directoryExistsSync(path, required) { | ||||||
|     var _a; |     var _a; | ||||||
| @@ -60,6 +58,7 @@ function directoryExistsSync(path, required) { | |||||||
|     } |     } | ||||||
|     throw new Error(`Directory '${path}' does not exist`); |     throw new Error(`Directory '${path}' does not exist`); | ||||||
| } | } | ||||||
|  | exports.directoryExistsSync = directoryExistsSync; | ||||||
| function existsSync(path) { | function existsSync(path) { | ||||||
|     var _a; |     var _a; | ||||||
|     if (!path) { |     if (!path) { | ||||||
| @@ -76,6 +75,7 @@ function existsSync(path) { | |||||||
|     } |     } | ||||||
|     return true; |     return true; | ||||||
| } | } | ||||||
|  | exports.existsSync = existsSync; | ||||||
| function fileExistsSync(path) { | function fileExistsSync(path) { | ||||||
|     var _a; |     var _a; | ||||||
|     if (!path) { |     if (!path) { | ||||||
| @@ -96,6 +96,7 @@ function fileExistsSync(path) { | |||||||
|     } |     } | ||||||
|     return false; |     return false; | ||||||
| } | } | ||||||
|  | exports.fileExistsSync = fileExistsSync; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -138,7 +139,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.createAuthHelper = createAuthHelper; | exports.createAuthHelper = void 0; | ||||||
| const assert = __importStar(__nccwpck_require__(9491)); | const assert = __importStar(__nccwpck_require__(9491)); | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const exec = __importStar(__nccwpck_require__(1514)); | const exec = __importStar(__nccwpck_require__(1514)); | ||||||
| @@ -155,6 +156,7 @@ const SSH_COMMAND_KEY = 'core.sshCommand'; | |||||||
| function createAuthHelper(git, settings) { | function createAuthHelper(git, settings) { | ||||||
|     return new GitAuthHelper(git, settings); |     return new GitAuthHelper(git, settings); | ||||||
| } | } | ||||||
|  | exports.createAuthHelper = createAuthHelper; | ||||||
| class GitAuthHelper { | class GitAuthHelper { | ||||||
|     constructor(gitCommandManager, gitSourceSettings) { |     constructor(gitCommandManager, gitSourceSettings) { | ||||||
|         this.insteadOfValues = []; |         this.insteadOfValues = []; | ||||||
| @@ -473,8 +475,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.MinimumGitSparseCheckoutVersion = exports.MinimumGitVersion = void 0; | exports.createCommandManager = exports.MinimumGitSparseCheckoutVersion = exports.MinimumGitVersion = void 0; | ||||||
| exports.createCommandManager = createCommandManager; |  | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const exec = __importStar(__nccwpck_require__(1514)); | const exec = __importStar(__nccwpck_require__(1514)); | ||||||
| const fs = __importStar(__nccwpck_require__(7147)); | const fs = __importStar(__nccwpck_require__(7147)); | ||||||
| @@ -495,6 +496,7 @@ function createCommandManager(workingDirectory, lfs, doSparseCheckout) { | |||||||
|         return yield GitCommandManager.createCommandManager(workingDirectory, lfs, doSparseCheckout); |         return yield GitCommandManager.createCommandManager(workingDirectory, lfs, doSparseCheckout); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.createCommandManager = createCommandManager; | ||||||
| class GitCommandManager { | class GitCommandManager { | ||||||
|     // Private constructor; use createCommandManager()
 |     // Private constructor; use createCommandManager()
 | ||||||
|     constructor() { |     constructor() { | ||||||
| @@ -709,9 +711,13 @@ class GitCommandManager { | |||||||
|     getWorkingDirectory() { |     getWorkingDirectory() { | ||||||
|         return this.workingDirectory; |         return this.workingDirectory; | ||||||
|     } |     } | ||||||
|     init() { |     init(options) { | ||||||
|         return __awaiter(this, void 0, void 0, function* () { |         return __awaiter(this, void 0, void 0, function* () { | ||||||
|             yield this.execGit(['init', this.workingDirectory]); |             yield this.execGit([ | ||||||
|  |                 'init', | ||||||
|  |                 ...((options === null || options === void 0 ? void 0 : options.objectFormat) ? [`--object-format=${options.objectFormat}`] : []), | ||||||
|  |                 this.workingDirectory | ||||||
|  |             ]); | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|     isDetached() { |     isDetached() { | ||||||
| @@ -1018,7 +1024,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.prepareExistingDirectory = prepareExistingDirectory; | exports.prepareExistingDirectory = void 0; | ||||||
| const assert = __importStar(__nccwpck_require__(9491)); | const assert = __importStar(__nccwpck_require__(9491)); | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const fs = __importStar(__nccwpck_require__(7147)); | const fs = __importStar(__nccwpck_require__(7147)); | ||||||
| @@ -1122,6 +1128,7 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.prepareExistingDirectory = prepareExistingDirectory; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -1164,8 +1171,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.getSource = getSource; | exports.cleanup = exports.getSource = void 0; | ||||||
| exports.cleanup = cleanup; |  | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const fsHelper = __importStar(__nccwpck_require__(7219)); | const fsHelper = __importStar(__nccwpck_require__(7219)); | ||||||
| const gitAuthHelper = __importStar(__nccwpck_require__(2565)); | const gitAuthHelper = __importStar(__nccwpck_require__(2565)); | ||||||
| @@ -1236,7 +1242,7 @@ function getSource(settings) { | |||||||
|             // Initialize the repository
 |             // Initialize the repository
 | ||||||
|             if (!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))) { |             if (!fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git'))) { | ||||||
|                 core.startGroup('Initializing the repository'); |                 core.startGroup('Initializing the repository'); | ||||||
|                 yield git.init(); |                 yield git.init({ objectFormat: settings.objectFormat }); | ||||||
|                 yield git.remoteAdd('origin', repositoryUrl); |                 yield git.remoteAdd('origin', repositoryUrl); | ||||||
|                 core.endGroup(); |                 core.endGroup(); | ||||||
|             } |             } | ||||||
| @@ -1371,6 +1377,7 @@ function getSource(settings) { | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.getSource = getSource; | ||||||
| function cleanup(repositoryPath) { | function cleanup(repositoryPath) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         // Repo exists?
 |         // Repo exists?
 | ||||||
| @@ -1406,6 +1413,7 @@ function cleanup(repositoryPath) { | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.cleanup = cleanup; | ||||||
| function getGitCommandManager(settings) { | function getGitCommandManager(settings) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         core.info(`Working directory is '${settings.repositoryPath}'`); |         core.info(`Working directory is '${settings.repositoryPath}'`); | ||||||
| @@ -1544,8 +1552,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.downloadRepository = downloadRepository; | exports.getDefaultBranch = exports.downloadRepository = void 0; | ||||||
| exports.getDefaultBranch = getDefaultBranch; |  | ||||||
| const assert = __importStar(__nccwpck_require__(9491)); | const assert = __importStar(__nccwpck_require__(9491)); | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const fs = __importStar(__nccwpck_require__(7147)); | const fs = __importStar(__nccwpck_require__(7147)); | ||||||
| @@ -1609,6 +1616,7 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath, | |||||||
|         yield io.rmRF(extractPath); |         yield io.rmRF(extractPath); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.downloadRepository = downloadRepository; | ||||||
| /** | /** | ||||||
|  * Looks up the default branch name |  * Looks up the default branch name | ||||||
|  */ |  */ | ||||||
| @@ -1647,6 +1655,7 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) { | |||||||
|         })); |         })); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.getDefaultBranch = getDefaultBranch; | ||||||
| function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) { | function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         const octokit = github.getOctokit(authToken, { |         const octokit = github.getOctokit(authToken, { | ||||||
| @@ -1705,7 +1714,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.getInputs = getInputs; | exports.getInputs = void 0; | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const fsHelper = __importStar(__nccwpck_require__(7219)); | const fsHelper = __importStar(__nccwpck_require__(7219)); | ||||||
| const github = __importStar(__nccwpck_require__(5438)); | const github = __importStar(__nccwpck_require__(5438)); | ||||||
| @@ -1831,9 +1840,18 @@ function getInputs() { | |||||||
|         // Determine the GitHub URL that the repository is being hosted from
 |         // Determine the GitHub URL that the repository is being hosted from
 | ||||||
|         result.githubServerUrl = core.getInput('github-server-url'); |         result.githubServerUrl = core.getInput('github-server-url'); | ||||||
|         core.debug(`GitHub Host URL = ${result.githubServerUrl}`); |         core.debug(`GitHub Host URL = ${result.githubServerUrl}`); | ||||||
|  |         // Object format
 | ||||||
|  |         const objectFormat = core.getInput('object-format'); | ||||||
|  |         if (objectFormat) { | ||||||
|  |             if (objectFormat != 'sha1' && objectFormat != 'sha256') { | ||||||
|  |                 throw Error(`Invalid object format '${objectFormat}'`); | ||||||
|  |             } | ||||||
|  |             result.objectFormat = objectFormat; | ||||||
|  |         } | ||||||
|         return result; |         return result; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.getInputs = getInputs; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -1965,12 +1983,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.tagsRefSpec = void 0; | exports.checkCommitInfo = exports.testRef = exports.getRefSpec = exports.getRefSpecForAllHistory = exports.getCheckoutInfo = exports.tagsRefSpec = void 0; | ||||||
| exports.getCheckoutInfo = getCheckoutInfo; |  | ||||||
| exports.getRefSpecForAllHistory = getRefSpecForAllHistory; |  | ||||||
| exports.getRefSpec = getRefSpec; |  | ||||||
| exports.testRef = testRef; |  | ||||||
| exports.checkCommitInfo = checkCommitInfo; |  | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const github = __importStar(__nccwpck_require__(5438)); | const github = __importStar(__nccwpck_require__(5438)); | ||||||
| const url_helper_1 = __nccwpck_require__(9437); | const url_helper_1 = __nccwpck_require__(9437); | ||||||
| @@ -2024,6 +2037,7 @@ function getCheckoutInfo(git, ref, commit) { | |||||||
|         return result; |         return result; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.getCheckoutInfo = getCheckoutInfo; | ||||||
| function getRefSpecForAllHistory(ref, commit) { | function getRefSpecForAllHistory(ref, commit) { | ||||||
|     const result = ['+refs/heads/*:refs/remotes/origin/*', exports.tagsRefSpec]; |     const result = ['+refs/heads/*:refs/remotes/origin/*', exports.tagsRefSpec]; | ||||||
|     if (ref && ref.toUpperCase().startsWith('REFS/PULL/')) { |     if (ref && ref.toUpperCase().startsWith('REFS/PULL/')) { | ||||||
| @@ -2032,6 +2046,7 @@ function getRefSpecForAllHistory(ref, commit) { | |||||||
|     } |     } | ||||||
|     return result; |     return result; | ||||||
| } | } | ||||||
|  | exports.getRefSpecForAllHistory = getRefSpecForAllHistory; | ||||||
| function getRefSpec(ref, commit) { | function getRefSpec(ref, commit) { | ||||||
|     if (!ref && !commit) { |     if (!ref && !commit) { | ||||||
|         throw new Error('Args ref and commit cannot both be empty'); |         throw new Error('Args ref and commit cannot both be empty'); | ||||||
| @@ -2080,6 +2095,7 @@ function getRefSpec(ref, commit) { | |||||||
|         return [`+${ref}:${ref}`]; |         return [`+${ref}:${ref}`]; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | exports.getRefSpec = getRefSpec; | ||||||
| /** | /** | ||||||
|  * Tests whether the initial fetch created the ref at the expected commit |  * Tests whether the initial fetch created the ref at the expected commit | ||||||
|  */ |  */ | ||||||
| @@ -2123,6 +2139,7 @@ function testRef(git, ref, commit) { | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.testRef = testRef; | ||||||
| function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref, commit, baseUrl) { | function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref, commit, baseUrl) { | ||||||
|     return __awaiter(this, void 0, void 0, function* () { |     return __awaiter(this, void 0, void 0, function* () { | ||||||
|         var _a; |         var _a; | ||||||
| @@ -2188,6 +2205,7 @@ function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.checkCommitInfo = checkCommitInfo; | ||||||
| function fromPayload(path) { | function fromPayload(path) { | ||||||
|     return select(github.context.payload, path); |     return select(github.context.payload, path); | ||||||
| } | } | ||||||
| @@ -2212,12 +2230,13 @@ function select(obj, path) { | |||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.escape = escape; | exports.escape = void 0; | ||||||
| function escape(value) { | function escape(value) { | ||||||
|     return value.replace(/[^a-zA-Z0-9_]/g, x => { |     return value.replace(/[^a-zA-Z0-9_]/g, x => { | ||||||
|         return `\\${x}`; |         return `\\${x}`; | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.escape = escape; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -2260,8 +2279,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.RetryHelper = void 0; | exports.execute = exports.RetryHelper = void 0; | ||||||
| exports.execute = execute; |  | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const defaultMaxAttempts = 3; | const defaultMaxAttempts = 3; | ||||||
| const defaultMinSeconds = 10; | const defaultMinSeconds = 10; | ||||||
| @@ -2313,6 +2331,7 @@ function execute(action) { | |||||||
|         return yield retryHelper.execute(action); |         return yield retryHelper.execute(action); | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.execute = execute; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -2346,11 +2365,7 @@ var __importStar = (this && this.__importStar) || function (mod) { | |||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.SshKnownHostsPath = exports.SshKeyPath = exports.PostSetSafeDirectory = exports.RepositoryPath = exports.IsPost = void 0; | exports.setSafeDirectory = exports.setSshKnownHostsPath = exports.setSshKeyPath = exports.setRepositoryPath = exports.SshKnownHostsPath = exports.SshKeyPath = exports.PostSetSafeDirectory = exports.RepositoryPath = exports.IsPost = void 0; | ||||||
| exports.setRepositoryPath = setRepositoryPath; |  | ||||||
| exports.setSshKeyPath = setSshKeyPath; |  | ||||||
| exports.setSshKnownHostsPath = setSshKnownHostsPath; |  | ||||||
| exports.setSafeDirectory = setSafeDirectory; |  | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| /** | /** | ||||||
|  * Indicates whether the POST action is running |  * Indicates whether the POST action is running | ||||||
| @@ -2378,24 +2393,28 @@ exports.SshKnownHostsPath = core.getState('sshKnownHostsPath'); | |||||||
| function setRepositoryPath(repositoryPath) { | function setRepositoryPath(repositoryPath) { | ||||||
|     core.saveState('repositoryPath', repositoryPath); |     core.saveState('repositoryPath', repositoryPath); | ||||||
| } | } | ||||||
|  | exports.setRepositoryPath = setRepositoryPath; | ||||||
| /** | /** | ||||||
|  * Save the SSH key path so the POST action can retrieve the value. |  * Save the SSH key path so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| function setSshKeyPath(sshKeyPath) { | function setSshKeyPath(sshKeyPath) { | ||||||
|     core.saveState('sshKeyPath', sshKeyPath); |     core.saveState('sshKeyPath', sshKeyPath); | ||||||
| } | } | ||||||
|  | exports.setSshKeyPath = setSshKeyPath; | ||||||
| /** | /** | ||||||
|  * Save the SSH known hosts path so the POST action can retrieve the value. |  * Save the SSH known hosts path so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| function setSshKnownHostsPath(sshKnownHostsPath) { | function setSshKnownHostsPath(sshKnownHostsPath) { | ||||||
|     core.saveState('sshKnownHostsPath', sshKnownHostsPath); |     core.saveState('sshKnownHostsPath', sshKnownHostsPath); | ||||||
| } | } | ||||||
|  | exports.setSshKnownHostsPath = setSshKnownHostsPath; | ||||||
| /** | /** | ||||||
|  * Save the set-safe-directory input so the POST action can retrieve the value. |  * Save the set-safe-directory input so the POST action can retrieve the value. | ||||||
|  */ |  */ | ||||||
| function setSafeDirectory() { | function setSafeDirectory() { | ||||||
|     core.saveState('setSafeDirectory', 'true'); |     core.saveState('setSafeDirectory', 'true'); | ||||||
| } | } | ||||||
|  | exports.setSafeDirectory = setSafeDirectory; | ||||||
| // Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
 | // Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
 | ||||||
| // This is necessary since we don't have a separate entry point.
 | // This is necessary since we don't have a separate entry point.
 | ||||||
| if (!exports.IsPost) { | if (!exports.IsPost) { | ||||||
| @@ -2434,10 +2453,7 @@ var __importStar = (this && this.__importStar) || function (mod) { | |||||||
|     return result; |     return result; | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.getFetchUrl = getFetchUrl; | exports.isGhes = exports.getServerApiUrl = exports.getServerUrl = exports.getFetchUrl = void 0; | ||||||
| exports.getServerUrl = getServerUrl; |  | ||||||
| exports.getServerApiUrl = getServerApiUrl; |  | ||||||
| exports.isGhes = isGhes; |  | ||||||
| const assert = __importStar(__nccwpck_require__(9491)); | const assert = __importStar(__nccwpck_require__(9491)); | ||||||
| const url_1 = __nccwpck_require__(7310); | const url_1 = __nccwpck_require__(7310); | ||||||
| function getFetchUrl(settings) { | function getFetchUrl(settings) { | ||||||
| @@ -2453,52 +2469,28 @@ function getFetchUrl(settings) { | |||||||
|     // "origin" is SCHEME://HOSTNAME[:PORT]
 |     // "origin" is SCHEME://HOSTNAME[:PORT]
 | ||||||
|     return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`; |     return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`; | ||||||
| } | } | ||||||
|  | exports.getFetchUrl = getFetchUrl; | ||||||
| function getServerUrl(url) { | function getServerUrl(url) { | ||||||
|     let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com'; |     let urlValue = url && url.trim().length > 0 | ||||||
|     if (hasContent(url, WhitespaceMode.Trim)) { |         ? url | ||||||
|         resolvedUrl = url; |         : process.env['GITHUB_SERVER_URL'] || 'https://github.com'; | ||||||
|     } |     return new url_1.URL(urlValue); | ||||||
|     return new url_1.URL(resolvedUrl); |  | ||||||
| } | } | ||||||
|  | exports.getServerUrl = getServerUrl; | ||||||
| function getServerApiUrl(url) { | function getServerApiUrl(url) { | ||||||
|     if (hasContent(url, WhitespaceMode.Trim)) { |     let apiUrl = 'https://api.github.com'; | ||||||
|         let serverUrl = getServerUrl(url); |     if (isGhes(url)) { | ||||||
|         if (isGhes(url)) { |         const serverUrl = getServerUrl(url); | ||||||
|             serverUrl.pathname = 'api/v3'; |         apiUrl = new url_1.URL(`${serverUrl.origin}/api/v3`).toString(); | ||||||
|         } |  | ||||||
|         else { |  | ||||||
|             serverUrl.hostname = 'api.' + serverUrl.hostname; |  | ||||||
|         } |  | ||||||
|         return pruneSuffix(serverUrl.toString(), '/'); |  | ||||||
|     } |     } | ||||||
|     return process.env['GITHUB_API_URL'] || 'https://api.github.com'; |     return apiUrl; | ||||||
| } | } | ||||||
|  | exports.getServerApiUrl = getServerApiUrl; | ||||||
| function isGhes(url) { | function isGhes(url) { | ||||||
|     const ghUrl = new url_1.URL(url || process.env['GITHUB_SERVER_URL'] || 'https://github.com'); |     const ghUrl = getServerUrl(url); | ||||||
|     const hostname = ghUrl.hostname.trimEnd().toUpperCase(); |     return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; | ||||||
|     const isGitHubHost = hostname === 'GITHUB.COM'; |  | ||||||
|     const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM'); |  | ||||||
|     const isLocalHost = hostname.endsWith('.LOCALHOST'); |  | ||||||
|     return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; |  | ||||||
| } |  | ||||||
| function pruneSuffix(text, suffix) { |  | ||||||
|     if (hasContent(suffix, WhitespaceMode.Preserve) && (text === null || text === void 0 ? void 0 : text.endsWith(suffix))) { |  | ||||||
|         return text.substring(0, text.length - suffix.length); |  | ||||||
|     } |  | ||||||
|     return text; |  | ||||||
| } |  | ||||||
| var WhitespaceMode; |  | ||||||
| (function (WhitespaceMode) { |  | ||||||
|     WhitespaceMode[WhitespaceMode["Trim"] = 0] = "Trim"; |  | ||||||
|     WhitespaceMode[WhitespaceMode["Preserve"] = 1] = "Preserve"; |  | ||||||
| })(WhitespaceMode || (WhitespaceMode = {})); |  | ||||||
| function hasContent(text, whitespaceMode) { |  | ||||||
|     let refinedText = text !== null && text !== void 0 ? text : ''; |  | ||||||
|     if (whitespaceMode == WhitespaceMode.Trim) { |  | ||||||
|         refinedText = refinedText.trim(); |  | ||||||
|     } |  | ||||||
|     return refinedText.length > 0; |  | ||||||
| } | } | ||||||
|  | exports.isGhes = isGhes; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -2541,7 +2533,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge | |||||||
|     }); |     }); | ||||||
| }; | }; | ||||||
| Object.defineProperty(exports, "__esModule", ({ value: true })); | Object.defineProperty(exports, "__esModule", ({ value: true })); | ||||||
| exports.getOrganizationId = getOrganizationId; | exports.getOrganizationId = void 0; | ||||||
| const core = __importStar(__nccwpck_require__(2186)); | const core = __importStar(__nccwpck_require__(2186)); | ||||||
| const fs = __importStar(__nccwpck_require__(7147)); | const fs = __importStar(__nccwpck_require__(7147)); | ||||||
| /** | /** | ||||||
| @@ -2570,6 +2562,7 @@ function getOrganizationId() { | |||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | exports.getOrganizationId = getOrganizationId; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| @@ -7802,7 +7795,7 @@ module.exports = __toCommonJS(dist_src_exports); | |||||||
| var import_universal_user_agent = __nccwpck_require__(5030); | var import_universal_user_agent = __nccwpck_require__(5030); | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/version.js
 | // pkg/dist-src/version.js
 | ||||||
| var VERSION = "9.0.6"; | var VERSION = "9.0.5"; | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/defaults.js
 | // pkg/dist-src/defaults.js
 | ||||||
| var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; | var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; | ||||||
| @@ -7907,9 +7900,9 @@ function addQueryParameters(url, parameters) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/util/extract-url-variable-names.js
 | // pkg/dist-src/util/extract-url-variable-names.js
 | ||||||
| var urlVariableRegex = /\{[^{}}]+\}/g; | var urlVariableRegex = /\{[^}]+\}/g; | ||||||
| function removeNonChars(variableName) { | function removeNonChars(variableName) { | ||||||
|   return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/); |   return variableName.replace(/^\W+|\W+$/g, "").split(/,/); | ||||||
| } | } | ||||||
| function extractUrlVariableNames(url) { | function extractUrlVariableNames(url) { | ||||||
|   const matches = url.match(urlVariableRegex); |   const matches = url.match(urlVariableRegex); | ||||||
| @@ -8095,7 +8088,7 @@ function parse(options) { | |||||||
|     } |     } | ||||||
|     if (url.endsWith("/graphql")) { |     if (url.endsWith("/graphql")) { | ||||||
|       if (options.mediaType.previews?.length) { |       if (options.mediaType.previews?.length) { | ||||||
|         const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []; |         const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; | ||||||
|         headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { |         headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { | ||||||
|           const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; |           const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; | ||||||
|           return `application/vnd.github.${preview}-preview${format}`; |           return `application/vnd.github.${preview}-preview${format}`; | ||||||
| @@ -8344,7 +8337,7 @@ __export(dist_src_exports, { | |||||||
| module.exports = __toCommonJS(dist_src_exports); | module.exports = __toCommonJS(dist_src_exports); | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/version.js
 | // pkg/dist-src/version.js
 | ||||||
| var VERSION = "9.2.2"; | var VERSION = "9.2.1"; | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/normalize-paginated-list-response.js
 | // pkg/dist-src/normalize-paginated-list-response.js
 | ||||||
| function normalizePaginatedListResponse(response) { | function normalizePaginatedListResponse(response) { | ||||||
| @@ -8392,7 +8385,7 @@ function iterator(octokit, route, parameters) { | |||||||
|           const response = await requestMethod({ method, url, headers }); |           const response = await requestMethod({ method, url, headers }); | ||||||
|           const normalizedResponse = normalizePaginatedListResponse(response); |           const normalizedResponse = normalizePaginatedListResponse(response); | ||||||
|           url = ((normalizedResponse.headers.link || "").match( |           url = ((normalizedResponse.headers.link || "").match( | ||||||
|             /<([^<>]+)>;\s*rel="next"/ |             /<([^>]+)>;\s*rel="next"/ | ||||||
|           ) || [])[1]; |           ) || [])[1]; | ||||||
|           return { value: normalizedResponse }; |           return { value: normalizedResponse }; | ||||||
|         } catch (error) { |         } catch (error) { | ||||||
| @@ -10944,7 +10937,7 @@ var RequestError = class extends Error { | |||||||
|     if (options.request.headers.authorization) { |     if (options.request.headers.authorization) { | ||||||
|       requestCopy.headers = Object.assign({}, options.request.headers, { |       requestCopy.headers = Object.assign({}, options.request.headers, { | ||||||
|         authorization: options.request.headers.authorization.replace( |         authorization: options.request.headers.authorization.replace( | ||||||
|           /(?<! ) .*$/, |           / .*$/, | ||||||
|           " [REDACTED]" |           " [REDACTED]" | ||||||
|         ) |         ) | ||||||
|       }); |       }); | ||||||
| @@ -11012,7 +11005,7 @@ var import_endpoint = __nccwpck_require__(9440); | |||||||
| var import_universal_user_agent = __nccwpck_require__(5030); | var import_universal_user_agent = __nccwpck_require__(5030); | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/version.js
 | // pkg/dist-src/version.js
 | ||||||
| var VERSION = "8.4.1"; | var VERSION = "8.4.0"; | ||||||
| 
 | 
 | ||||||
| // pkg/dist-src/is-plain-object.js
 | // pkg/dist-src/is-plain-object.js
 | ||||||
| function isPlainObject(value) { | function isPlainObject(value) { | ||||||
| @@ -11071,7 +11064,7 @@ function fetchWrapper(requestOptions) { | |||||||
|       headers[keyAndValue[0]] = keyAndValue[1]; |       headers[keyAndValue[0]] = keyAndValue[1]; | ||||||
|     } |     } | ||||||
|     if ("deprecation" in headers) { |     if ("deprecation" in headers) { | ||||||
|       const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); |       const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); | ||||||
|       const deprecationLink = matches && matches.pop(); |       const deprecationLink = matches && matches.pop(); | ||||||
|       log.warn( |       log.warn( | ||||||
|         `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` |         `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` | ||||||
| @@ -18725,7 +18718,7 @@ module.exports = { | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| const { parseSetCookie } = __nccwpck_require__(4408) | const { parseSetCookie } = __nccwpck_require__(4408) | ||||||
| const { stringify } = __nccwpck_require__(3121) | const { stringify, getHeadersList } = __nccwpck_require__(3121) | ||||||
| const { webidl } = __nccwpck_require__(1744) | const { webidl } = __nccwpck_require__(1744) | ||||||
| const { Headers } = __nccwpck_require__(554) | const { Headers } = __nccwpck_require__(554) | ||||||
| 
 | 
 | ||||||
| @@ -18801,13 +18794,14 @@ function getSetCookies (headers) { | |||||||
| 
 | 
 | ||||||
|   webidl.brandCheck(headers, Headers, { strict: false }) |   webidl.brandCheck(headers, Headers, { strict: false }) | ||||||
| 
 | 
 | ||||||
|   const cookies = headers.getSetCookie() |   const cookies = getHeadersList(headers).cookies | ||||||
| 
 | 
 | ||||||
|   if (!cookies) { |   if (!cookies) { | ||||||
|     return [] |     return [] | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return cookies.map((pair) => parseSetCookie(pair)) |   // In older versions of undici, cookies is a list of name:value.
 | ||||||
|  |   return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
| @@ -19235,15 +19229,14 @@ module.exports = { | |||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 3121: | /***/ 3121: | ||||||
| /***/ ((module) => { | /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { | ||||||
| 
 | 
 | ||||||
| "use strict"; | "use strict"; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /** | const assert = __nccwpck_require__(9491) | ||||||
|  * @param {string} value | const { kHeadersList } = __nccwpck_require__(2785) | ||||||
|  * @returns {boolean} | 
 | ||||||
|  */ |  | ||||||
| function isCTLExcludingHtab (value) { | function isCTLExcludingHtab (value) { | ||||||
|   if (value.length === 0) { |   if (value.length === 0) { | ||||||
|     return false |     return false | ||||||
| @@ -19504,13 +19497,31 @@ function stringify (cookie) { | |||||||
|   return out.join('; ') |   return out.join('; ') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | let kHeadersListNode | ||||||
|  | 
 | ||||||
|  | function getHeadersList (headers) { | ||||||
|  |   if (headers[kHeadersList]) { | ||||||
|  |     return headers[kHeadersList] | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   if (!kHeadersListNode) { | ||||||
|  |     kHeadersListNode = Object.getOwnPropertySymbols(headers).find( | ||||||
|  |       (symbol) => symbol.description === 'headers list' | ||||||
|  |     ) | ||||||
|  | 
 | ||||||
|  |     assert(kHeadersListNode, 'Headers cannot be parsed') | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   const headersList = headers[kHeadersListNode] | ||||||
|  |   assert(headersList) | ||||||
|  | 
 | ||||||
|  |   return headersList | ||||||
|  | } | ||||||
|  | 
 | ||||||
| module.exports = { | module.exports = { | ||||||
|   isCTLExcludingHtab, |   isCTLExcludingHtab, | ||||||
|   validateCookieName, |   stringify, | ||||||
|   validateCookiePath, |   getHeadersList | ||||||
|   validateCookieValue, |  | ||||||
|   toIMFDate, |  | ||||||
|   stringify |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @@ -21439,14 +21450,6 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830) | |||||||
| const { File: UndiciFile } = __nccwpck_require__(8511) | const { File: UndiciFile } = __nccwpck_require__(8511) | ||||||
| const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) | const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685) | ||||||
| 
 | 
 | ||||||
| let random |  | ||||||
| try { |  | ||||||
|   const crypto = __nccwpck_require__(6005) |  | ||||||
|   random = (max) => crypto.randomInt(0, max) |  | ||||||
| } catch { |  | ||||||
|   random = (max) => Math.floor(Math.random(max)) |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| let ReadableStream = globalThis.ReadableStream | let ReadableStream = globalThis.ReadableStream | ||||||
| 
 | 
 | ||||||
| /** @type {globalThis['File']} */ | /** @type {globalThis['File']} */ | ||||||
| @@ -21532,7 +21535,7 @@ function extractBody (object, keepalive = false) { | |||||||
|     // Set source to a copy of the bytes held by object.
 |     // Set source to a copy of the bytes held by object.
 | ||||||
|     source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) |     source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) | ||||||
|   } else if (util.isFormDataLike(object)) { |   } else if (util.isFormDataLike(object)) { | ||||||
|     const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` |     const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` | ||||||
|     const prefix = `--${boundary}\r\nContent-Disposition: form-data` |     const prefix = `--${boundary}\r\nContent-Disposition: form-data` | ||||||
| 
 | 
 | ||||||
|     /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ |     /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */ | ||||||
| @@ -23514,7 +23517,6 @@ const { | |||||||
|   isValidHeaderName, |   isValidHeaderName, | ||||||
|   isValidHeaderValue |   isValidHeaderValue | ||||||
| } = __nccwpck_require__(2538) | } = __nccwpck_require__(2538) | ||||||
| const util = __nccwpck_require__(3837) |  | ||||||
| const { webidl } = __nccwpck_require__(1744) | const { webidl } = __nccwpck_require__(1744) | ||||||
| const assert = __nccwpck_require__(9491) | const assert = __nccwpck_require__(9491) | ||||||
| 
 | 
 | ||||||
| @@ -24068,9 +24070,6 @@ Object.defineProperties(Headers.prototype, { | |||||||
|   [Symbol.toStringTag]: { |   [Symbol.toStringTag]: { | ||||||
|     value: 'Headers', |     value: 'Headers', | ||||||
|     configurable: true |     configurable: true | ||||||
|   }, |  | ||||||
|   [util.inspect.custom]: { |  | ||||||
|     enumerable: false |  | ||||||
|   } |   } | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| @@ -33247,20 +33246,6 @@ class Pool extends PoolBase { | |||||||
|       ? { ...options.interceptors } |       ? { ...options.interceptors } | ||||||
|       : undefined |       : undefined | ||||||
|     this[kFactory] = factory |     this[kFactory] = factory | ||||||
| 
 |  | ||||||
|     this.on('connectionError', (origin, targets, error) => { |  | ||||||
|       // If a connection error occurs, we remove the client from the pool,
 |  | ||||||
|       // and emit a connectionError event. They will not be re-used.
 |  | ||||||
|       // Fixes https://github.com/nodejs/undici/issues/3895
 |  | ||||||
|       for (const target of targets) { |  | ||||||
|         // Do not use kRemoveClient here, as it will close the client,
 |  | ||||||
|         // but the client cannot be closed in this state.
 |  | ||||||
|         const idx = this[kClients].indexOf(target) |  | ||||||
|         if (idx !== -1) { |  | ||||||
|           this[kClients].splice(idx, 1) |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|     }) |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   [kGetDispatcher] () { |   [kGetDispatcher] () { | ||||||
| @@ -36416,14 +36401,6 @@ module.exports = require("net"); | |||||||
| 
 | 
 | ||||||
| /***/ }), | /***/ }), | ||||||
| 
 | 
 | ||||||
| /***/ 6005: |  | ||||||
| /***/ ((module) => { |  | ||||||
| 
 |  | ||||||
| "use strict"; |  | ||||||
| module.exports = require("node:crypto"); |  | ||||||
| 
 |  | ||||||
| /***/ }), |  | ||||||
| 
 |  | ||||||
| /***/ 5673: | /***/ 5673: | ||||||
| /***/ ((module) => { | /***/ ((module) => { | ||||||
| 
 | 
 | ||||||
|   | |||||||
							
								
								
									
										316
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										316
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -1,12 +1,12 @@ | |||||||
| { | { | ||||||
|   "name": "checkout", |   "name": "checkout", | ||||||
|   "version": "4.3.0", |   "version": "4.2.1", | ||||||
|   "lockfileVersion": 3, |   "lockfileVersion": 3, | ||||||
|   "requires": true, |   "requires": true, | ||||||
|   "packages": { |   "packages": { | ||||||
|     "": { |     "": { | ||||||
|       "name": "checkout", |       "name": "checkout", | ||||||
|       "version": "4.3.0", |       "version": "4.2.1", | ||||||
|       "license": "MIT", |       "license": "MIT", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@actions/core": "^1.10.1", |         "@actions/core": "^1.10.1", | ||||||
| @@ -129,15 +129,13 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/code-frame": { |     "node_modules/@babel/code-frame": { | ||||||
|       "version": "7.27.1", |       "version": "7.24.2", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", |       "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", | ||||||
|       "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", |       "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@babel/helper-validator-identifier": "^7.27.1", |         "@babel/highlight": "^7.24.2", | ||||||
|         "js-tokens": "^4.0.0", |         "picocolors": "^1.0.0" | ||||||
|         "picocolors": "^1.1.1" |  | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
| @@ -312,21 +310,19 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/helper-string-parser": { |     "node_modules/@babel/helper-string-parser": { | ||||||
|       "version": "7.27.1", |       "version": "7.24.1", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", |       "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", | ||||||
|       "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", |       "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/helper-validator-identifier": { |     "node_modules/@babel/helper-validator-identifier": { | ||||||
|       "version": "7.27.1", |       "version": "7.22.20", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", |       "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", | ||||||
|       "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", |       "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
|       } |       } | ||||||
| @@ -341,28 +337,110 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/helpers": { |     "node_modules/@babel/helpers": { | ||||||
|       "version": "7.28.2", |       "version": "7.24.4", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", |       "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.4.tgz", | ||||||
|       "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", |       "integrity": "sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@babel/template": "^7.27.2", |         "@babel/template": "^7.24.0", | ||||||
|         "@babel/types": "^7.28.2" |         "@babel/traverse": "^7.24.1", | ||||||
|  |         "@babel/types": "^7.24.0" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/parser": { |     "node_modules/@babel/highlight": { | ||||||
|       "version": "7.28.0", |       "version": "7.24.2", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", |       "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", | ||||||
|       "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", |       "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@babel/types": "^7.28.0" |         "@babel/helper-validator-identifier": "^7.22.20", | ||||||
|  |         "chalk": "^2.4.2", | ||||||
|  |         "js-tokens": "^4.0.0", | ||||||
|  |         "picocolors": "^1.0.0" | ||||||
|       }, |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=6.9.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/ansi-styles": { | ||||||
|  |       "version": "3.2.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", | ||||||
|  |       "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "color-convert": "^1.9.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/chalk": { | ||||||
|  |       "version": "2.4.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", | ||||||
|  |       "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "ansi-styles": "^3.2.1", | ||||||
|  |         "escape-string-regexp": "^1.0.5", | ||||||
|  |         "supports-color": "^5.3.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/color-convert": { | ||||||
|  |       "version": "1.9.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | ||||||
|  |       "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "color-name": "1.1.3" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/color-name": { | ||||||
|  |       "version": "1.1.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | ||||||
|  |       "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/escape-string-regexp": { | ||||||
|  |       "version": "1.0.5", | ||||||
|  |       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", | ||||||
|  |       "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", | ||||||
|  |       "dev": true, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=0.8.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/has-flag": { | ||||||
|  |       "version": "3.0.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | ||||||
|  |       "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", | ||||||
|  |       "dev": true, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/highlight/node_modules/supports-color": { | ||||||
|  |       "version": "5.5.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", | ||||||
|  |       "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "has-flag": "^3.0.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@babel/parser": { | ||||||
|  |       "version": "7.24.4", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", | ||||||
|  |       "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", | ||||||
|  |       "dev": true, | ||||||
|       "bin": { |       "bin": { | ||||||
|         "parser": "bin/babel-parser.js" |         "parser": "bin/babel-parser.js" | ||||||
|       }, |       }, | ||||||
| @@ -548,25 +626,26 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/runtime": { |     "node_modules/@babel/runtime": { | ||||||
|       "version": "7.28.2", |       "version": "7.24.4", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.2.tgz", |       "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz", | ||||||
|       "integrity": "sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA==", |       "integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |       "dependencies": { | ||||||
|  |         "regenerator-runtime": "^0.14.0" | ||||||
|  |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/template": { |     "node_modules/@babel/template": { | ||||||
|       "version": "7.27.2", |       "version": "7.24.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", |       "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", | ||||||
|       "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", |       "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@babel/code-frame": "^7.27.1", |         "@babel/code-frame": "^7.23.5", | ||||||
|         "@babel/parser": "^7.27.2", |         "@babel/parser": "^7.24.0", | ||||||
|         "@babel/types": "^7.27.1" |         "@babel/types": "^7.24.0" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
| @@ -603,14 +682,14 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@babel/types": { |     "node_modules/@babel/types": { | ||||||
|       "version": "7.28.2", |       "version": "7.24.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", |       "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", | ||||||
|       "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", |       "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@babel/helper-string-parser": "^7.27.1", |         "@babel/helper-string-parser": "^7.23.4", | ||||||
|         "@babel/helper-validator-identifier": "^7.27.1" |         "@babel/helper-validator-identifier": "^7.22.20", | ||||||
|  |         "to-fast-properties": "^2.0.0" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6.9.0" |         "node": ">=6.9.0" | ||||||
| @@ -670,11 +749,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { |     "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -730,11 +808,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { |     "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -1266,10 +1343,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@octokit/endpoint": { |     "node_modules/@octokit/endpoint": { | ||||||
|       "version": "9.0.6", |       "version": "9.0.5", | ||||||
|       "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", |       "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.5.tgz", | ||||||
|       "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", |       "integrity": "sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==", | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@octokit/types": "^13.1.0", |         "@octokit/types": "^13.1.0", | ||||||
|         "universal-user-agent": "^6.0.0" |         "universal-user-agent": "^6.0.0" | ||||||
| @@ -1297,10 +1373,9 @@ | |||||||
|       "integrity": "sha512-pGUdSP+eEPfZiQHNkZI0U01HLipxncisdJQB4G//OAmfeO8sqTQ9KRa0KF03TUPCziNsoXUrTg4B2Q1EX++T0Q==" |       "integrity": "sha512-pGUdSP+eEPfZiQHNkZI0U01HLipxncisdJQB4G//OAmfeO8sqTQ9KRa0KF03TUPCziNsoXUrTg4B2Q1EX++T0Q==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/@octokit/plugin-paginate-rest": { |     "node_modules/@octokit/plugin-paginate-rest": { | ||||||
|       "version": "9.2.2", |       "version": "9.2.1", | ||||||
|       "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", |       "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz", | ||||||
|       "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", |       "integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==", | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@octokit/types": "^12.6.0" |         "@octokit/types": "^12.6.0" | ||||||
|       }, |       }, | ||||||
| @@ -1352,13 +1427,12 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@octokit/request": { |     "node_modules/@octokit/request": { | ||||||
|       "version": "8.4.1", |       "version": "8.4.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", |       "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz", | ||||||
|       "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", |       "integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==", | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@octokit/endpoint": "^9.0.6", |         "@octokit/endpoint": "^9.0.1", | ||||||
|         "@octokit/request-error": "^5.1.1", |         "@octokit/request-error": "^5.1.0", | ||||||
|         "@octokit/types": "^13.1.0", |         "@octokit/types": "^13.1.0", | ||||||
|         "universal-user-agent": "^6.0.0" |         "universal-user-agent": "^6.0.0" | ||||||
|       }, |       }, | ||||||
| @@ -1367,10 +1441,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@octokit/request-error": { |     "node_modules/@octokit/request-error": { | ||||||
|       "version": "5.1.1", |       "version": "5.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", |       "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz", | ||||||
|       "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", |       "integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==", | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@octokit/types": "^13.1.0", |         "@octokit/types": "^13.1.0", | ||||||
|         "deprecation": "^2.0.0", |         "deprecation": "^2.0.0", | ||||||
| @@ -2165,11 +2238,10 @@ | |||||||
|       "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" |       "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/brace-expansion": { |     "node_modules/brace-expansion": { | ||||||
|       "version": "2.0.2", |       "version": "2.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", | ||||||
|       "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", |       "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0" |         "balanced-match": "^1.0.0" | ||||||
|       } |       } | ||||||
| @@ -2430,11 +2502,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/cross-spawn": { |     "node_modules/cross-spawn": { | ||||||
|       "version": "7.0.6", |       "version": "7.0.3", | ||||||
|       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", |       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", | ||||||
|       "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", |       "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "path-key": "^3.1.0", |         "path-key": "^3.1.0", | ||||||
|         "shebang-command": "^2.0.0", |         "shebang-command": "^2.0.0", | ||||||
| @@ -3104,11 +3175,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/eslint-plugin-import/node_modules/brace-expansion": { |     "node_modules/eslint-plugin-import/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -3203,11 +3273,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { |     "node_modules/eslint-plugin-jsx-a11y/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -3302,11 +3371,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/eslint/node_modules/brace-expansion": { |     "node_modules/eslint/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -3768,11 +3836,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/glob/node_modules/brace-expansion": { |     "node_modules/glob/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -4568,11 +4635,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/jake/node_modules/brace-expansion": { |     "node_modules/jake/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -5182,8 +5248,7 @@ | |||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", | ||||||
|       "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", |       "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", | ||||||
|       "dev": true, |       "dev": true | ||||||
|       "license": "MIT" |  | ||||||
|     }, |     }, | ||||||
|     "node_modules/js-yaml": { |     "node_modules/js-yaml": { | ||||||
|       "version": "4.1.0", |       "version": "4.1.0", | ||||||
| @@ -5463,13 +5528,12 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/micromatch": { |     "node_modules/micromatch": { | ||||||
|       "version": "4.0.8", |       "version": "4.0.5", | ||||||
|       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", |       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", | ||||||
|       "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", |       "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "braces": "^3.0.3", |         "braces": "^3.0.2", | ||||||
|         "picomatch": "^2.3.1" |         "picomatch": "^2.3.1" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
| @@ -5805,11 +5869,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/picocolors": { |     "node_modules/picocolors": { | ||||||
|       "version": "1.1.1", |       "version": "1.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", |       "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", | ||||||
|       "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", |       "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", | ||||||
|       "dev": true, |       "dev": true | ||||||
|       "license": "ISC" |  | ||||||
|     }, |     }, | ||||||
|     "node_modules/picomatch": { |     "node_modules/picomatch": { | ||||||
|       "version": "2.3.1", |       "version": "2.3.1", | ||||||
| @@ -6052,6 +6115,12 @@ | |||||||
|         "url": "https://github.com/sponsors/ljharb" |         "url": "https://github.com/sponsors/ljharb" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/regenerator-runtime": { | ||||||
|  |       "version": "0.14.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", | ||||||
|  |       "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|     "node_modules/regexp.prototype.flags": { |     "node_modules/regexp.prototype.flags": { | ||||||
|       "version": "1.5.2", |       "version": "1.5.2", | ||||||
|       "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", |       "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", | ||||||
| @@ -6553,11 +6622,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/test-exclude/node_modules/brace-expansion": { |     "node_modules/test-exclude/node_modules/brace-expansion": { | ||||||
|       "version": "1.1.12", |       "version": "1.1.11", | ||||||
|       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", |       "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", | ||||||
|       "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", |       "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "balanced-match": "^1.0.0", |         "balanced-match": "^1.0.0", | ||||||
|         "concat-map": "0.0.1" |         "concat-map": "0.0.1" | ||||||
| @@ -6587,6 +6655,15 @@ | |||||||
|       "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", |       "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/to-fast-properties": { | ||||||
|  |       "version": "2.0.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", | ||||||
|  |       "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", | ||||||
|  |       "dev": true, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/to-regex-range": { |     "node_modules/to-regex-range": { | ||||||
|       "version": "5.0.1", |       "version": "5.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", |       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", | ||||||
| @@ -6853,10 +6930,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/undici": { |     "node_modules/undici": { | ||||||
|       "version": "5.29.0", |       "version": "5.28.4", | ||||||
|       "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", |       "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", | ||||||
|       "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", |       "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", | ||||||
|       "license": "MIT", |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@fastify/busboy": "^2.0.0" |         "@fastify/busboy": "^2.0.0" | ||||||
|       }, |       }, | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
|   "name": "checkout", |   "name": "checkout", | ||||||
|   "version": "4.3.0", |   "version": "4.2.1", | ||||||
|   "description": "checkout action", |   "description": "checkout action", | ||||||
|   "main": "lib/main.js", |   "main": "lib/main.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ export interface IGitCommandManager { | |||||||
|   ): Promise<void> |   ): Promise<void> | ||||||
|   getDefaultBranch(repositoryUrl: string): Promise<string> |   getDefaultBranch(repositoryUrl: string): Promise<string> | ||||||
|   getWorkingDirectory(): string |   getWorkingDirectory(): string | ||||||
|   init(): Promise<void> |   init(options?: { objectFormat?: string }): Promise<void> | ||||||
|   isDetached(): Promise<boolean> |   isDetached(): Promise<boolean> | ||||||
|   lfsFetch(ref: string): Promise<void> |   lfsFetch(ref: string): Promise<void> | ||||||
|   lfsInstall(): Promise<void> |   lfsInstall(): Promise<void> | ||||||
| @@ -327,8 +327,12 @@ class GitCommandManager { | |||||||
|     return this.workingDirectory |     return this.workingDirectory | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   async init(): Promise<void> { |   async init(options?: { objectFormat?: string }): Promise<void> { | ||||||
|     await this.execGit(['init', this.workingDirectory]) |     await this.execGit([ | ||||||
|  |       'init', | ||||||
|  |       ...(options?.objectFormat ? [`--object-format=${options.objectFormat}`] : []), | ||||||
|  |       this.workingDirectory | ||||||
|  |     ]) | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   async isDetached(): Promise<boolean> { |   async isDetached(): Promise<boolean> { | ||||||
|   | |||||||
| @@ -110,7 +110,7 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> { | |||||||
|       !fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git')) |       !fsHelper.directoryExistsSync(path.join(settings.repositoryPath, '.git')) | ||||||
|     ) { |     ) { | ||||||
|       core.startGroup('Initializing the repository') |       core.startGroup('Initializing the repository') | ||||||
|       await git.init() |       await git.init({ objectFormat: settings.objectFormat }) | ||||||
|       await git.remoteAdd('origin', repositoryUrl) |       await git.remoteAdd('origin', repositoryUrl) | ||||||
|       core.endGroup() |       core.endGroup() | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -118,4 +118,9 @@ export interface IGitSourceSettings { | |||||||
|    * User override on the GitHub Server/Host URL that hosts the repository to be cloned |    * User override on the GitHub Server/Host URL that hosts the repository to be cloned | ||||||
|    */ |    */ | ||||||
|   githubServerUrl: string | undefined |   githubServerUrl: string | undefined | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * Object format used for the repo, if it is not default | ||||||
|  |    */ | ||||||
|  |   objectFormat: 'sha1' | 'sha256' | undefined | ||||||
| } | } | ||||||
|   | |||||||
| @@ -161,5 +161,14 @@ export async function getInputs(): Promise<IGitSourceSettings> { | |||||||
|   result.githubServerUrl = core.getInput('github-server-url') |   result.githubServerUrl = core.getInput('github-server-url') | ||||||
|   core.debug(`GitHub Host URL = ${result.githubServerUrl}`) |   core.debug(`GitHub Host URL = ${result.githubServerUrl}`) | ||||||
|  |  | ||||||
|  |   // Object format | ||||||
|  |   const objectFormat = core.getInput('object-format') | ||||||
|  |   if (objectFormat) { | ||||||
|  |     if (objectFormat != 'sha1' && objectFormat != 'sha256') { | ||||||
|  |       throw Error(`Invalid object format '${objectFormat}'`) | ||||||
|  |     } | ||||||
|  |     result.objectFormat = objectFormat | ||||||
|  |   } | ||||||
|  |  | ||||||
|   return result |   return result | ||||||
| } | } | ||||||
|   | |||||||
| @@ -21,61 +21,26 @@ export function getFetchUrl(settings: IGitSourceSettings): string { | |||||||
| } | } | ||||||
|  |  | ||||||
| export function getServerUrl(url?: string): URL { | export function getServerUrl(url?: string): URL { | ||||||
|   let resolvedUrl = process.env['GITHUB_SERVER_URL'] || 'https://github.com' |   let urlValue = | ||||||
|   if (hasContent(url, WhitespaceMode.Trim)) { |     url && url.trim().length > 0 | ||||||
|     resolvedUrl = url! |       ? url | ||||||
|   } |       : process.env['GITHUB_SERVER_URL'] || 'https://github.com' | ||||||
|  |   return new URL(urlValue) | ||||||
|   return new URL(resolvedUrl) |  | ||||||
| } | } | ||||||
|  |  | ||||||
| export function getServerApiUrl(url?: string): string { | export function getServerApiUrl(url?: string): string { | ||||||
|   if (hasContent(url, WhitespaceMode.Trim)) { |   let apiUrl = 'https://api.github.com' | ||||||
|     let serverUrl = getServerUrl(url) |  | ||||||
|     if (isGhes(url)) { |  | ||||||
|       serverUrl.pathname = 'api/v3' |  | ||||||
|     } else { |  | ||||||
|       serverUrl.hostname = 'api.' + serverUrl.hostname |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     return pruneSuffix(serverUrl.toString(), '/') |   if (isGhes(url)) { | ||||||
|  |     const serverUrl = getServerUrl(url) | ||||||
|  |     apiUrl = new URL(`${serverUrl.origin}/api/v3`).toString() | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return process.env['GITHUB_API_URL'] || 'https://api.github.com' |   return apiUrl | ||||||
| } | } | ||||||
|  |  | ||||||
| export function isGhes(url?: string): boolean { | export function isGhes(url?: string): boolean { | ||||||
|   const ghUrl = new URL( |   const ghUrl = getServerUrl(url) | ||||||
|     url || process.env['GITHUB_SERVER_URL'] || 'https://github.com' |  | ||||||
|   ) |  | ||||||
|  |  | ||||||
|   const hostname = ghUrl.hostname.trimEnd().toUpperCase() |   return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM' | ||||||
|   const isGitHubHost = hostname === 'GITHUB.COM' |  | ||||||
|   const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM') |  | ||||||
|   const isLocalHost = hostname.endsWith('.LOCALHOST') |  | ||||||
|  |  | ||||||
|   return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function pruneSuffix(text: string, suffix: string) { |  | ||||||
|   if (hasContent(suffix, WhitespaceMode.Preserve) && text?.endsWith(suffix)) { |  | ||||||
|     return text.substring(0, text.length - suffix.length) |  | ||||||
|   } |  | ||||||
|   return text |  | ||||||
| } |  | ||||||
|  |  | ||||||
| enum WhitespaceMode { |  | ||||||
|   Trim, |  | ||||||
|   Preserve |  | ||||||
| } |  | ||||||
|  |  | ||||||
| function hasContent( |  | ||||||
|   text: string | undefined, |  | ||||||
|   whitespaceMode: WhitespaceMode |  | ||||||
| ): boolean { |  | ||||||
|   let refinedText = text ?? '' |  | ||||||
|   if (whitespaceMode == WhitespaceMode.Trim) { |  | ||||||
|     refinedText = refinedText.trim() |  | ||||||
|   } |  | ||||||
|   return refinedText.length > 0 |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user