mirror of
https://github.com/actions/javascript-action.git
synced 2025-12-10 04:07:00 +00:00
Compare commits
168 Commits
ncalteen/l
...
889a61e848
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
889a61e848 | ||
|
|
c7a49b3a8d | ||
|
|
e24978e5e7 | ||
|
|
db77c83d4d | ||
|
|
7e761863ed | ||
|
|
7b33254df3 | ||
|
|
96e4810ce7 | ||
|
|
47eb475b96 | ||
|
|
b6239bb2d3 | ||
|
|
ace140e040 | ||
|
|
b59a769390 | ||
|
|
46fab43a5d | ||
|
|
fb33b96919 | ||
|
|
081afb2a04 | ||
|
|
132fb64542 | ||
|
|
bb205fa0c4 | ||
|
|
19c4fe9598 | ||
|
|
f2807f236d | ||
|
|
ca332f9845 | ||
|
|
182abc3e6f | ||
|
|
84f91d50c1 | ||
|
|
84e77323ff | ||
|
|
04b160d0bc | ||
|
|
c2b844fbd9 | ||
|
|
2301a6c72e | ||
|
|
3d26720414 | ||
|
|
4d273edceb | ||
|
|
8d8a089214 | ||
|
|
8653c26735 | ||
|
|
5ab30f98e3 | ||
|
|
c8ea225274 | ||
|
|
59fbff5bfe | ||
|
|
945c36d8a2 | ||
|
|
cc91514a37 | ||
|
|
d10c6aaf10 | ||
|
|
1383968a20 | ||
|
|
0dcefc09dc | ||
|
|
e5d2db8487 | ||
|
|
a160a5fec4 | ||
|
|
83f02c161e | ||
|
|
0c17cc4725 | ||
|
|
4a74c06ec1 | ||
|
|
220e5e24dd | ||
|
|
275668f05c | ||
|
|
19d3af2be2 | ||
|
|
db8ef01af1 | ||
|
|
d6a14a0eec | ||
|
|
808b44287c | ||
|
|
0d7b995c6f | ||
|
|
db5ae7b23d | ||
|
|
0db8727feb | ||
|
|
6da164b4e2 | ||
|
|
16212198a3 | ||
|
|
7af45eacad | ||
|
|
d19751c3f3 | ||
|
|
8d4687bd5d | ||
|
|
e76c0d9596 | ||
|
|
d1a09c408a | ||
|
|
999a5c5d44 | ||
|
|
0adc58359b | ||
|
|
d28f28eec8 | ||
|
|
8c4f1925eb | ||
|
|
1732a44f2e | ||
|
|
2e0c7f29bb | ||
|
|
020492bf8c | ||
|
|
c0d7eca39d | ||
|
|
b4e747d914 | ||
|
|
9d20bf5a6a | ||
|
|
a5728a4bd4 | ||
|
|
511299dc14 | ||
|
|
4254a91d6e | ||
|
|
4b12c9dc19 | ||
|
|
ce7a9130a7 | ||
|
|
a3aa6dc9de | ||
|
|
c89b69491c | ||
|
|
fe9848e030 | ||
|
|
f5306e9c07 | ||
|
|
5a28dd41f8 | ||
|
|
c2f54ee517 | ||
|
|
46a86c1252 | ||
|
|
542a5ecb6c | ||
|
|
5187bc66f1 | ||
|
|
a688877a92 | ||
|
|
afd473389c | ||
|
|
4a38b08003 | ||
|
|
d60fcf10bb | ||
|
|
71b89806c9 | ||
|
|
042f8fddcc | ||
|
|
8ffd18bd8f | ||
|
|
d7a69d32b8 | ||
|
|
4f84580bb1 | ||
|
|
dbf226d301 | ||
|
|
06dc19dd02 | ||
|
|
2268c6b1cc | ||
|
|
b7b5497c08 | ||
|
|
74bbb94b59 | ||
|
|
4ba6f7aa67 | ||
|
|
683d42c86a | ||
|
|
b9a594e8e2 | ||
|
|
94c56bb27e | ||
|
|
bd194986f0 | ||
|
|
1e35036c8b | ||
|
|
9a7bb13169 | ||
|
|
5f7529951f | ||
|
|
2cec57c3bd | ||
|
|
1c9d5095f8 | ||
|
|
5db6550d89 | ||
|
|
81a4914d02 | ||
|
|
70e3c9174b | ||
|
|
db32cabf46 | ||
|
|
dbe115fe33 | ||
|
|
bd5ce112f9 | ||
|
|
6f03752631 | ||
|
|
46ce39791b | ||
|
|
747f0c08c7 | ||
|
|
a9836b0caa | ||
|
|
34bf3948dc | ||
|
|
50c14523c7 | ||
|
|
2edefb0ac4 | ||
|
|
e855c057ed | ||
|
|
b195e231fd | ||
|
|
305807edaa | ||
|
|
dc628f33b6 | ||
|
|
a24a1e614c | ||
|
|
354a96c219 | ||
|
|
eeeb9784e7 | ||
|
|
f971b9431c | ||
|
|
fccefbdd60 | ||
|
|
f34701d68f | ||
|
|
7de8855ee3 | ||
|
|
a026aad183 | ||
|
|
3c3abba548 | ||
|
|
754c8ba4ac | ||
|
|
1d5e206310 | ||
|
|
738c04a73b | ||
|
|
30af04c76f | ||
|
|
23bb0ec90a | ||
|
|
9ce2321330 | ||
|
|
ee4e8b80c8 | ||
|
|
db86fadfd5 | ||
|
|
f87ada5f11 | ||
|
|
b5b9fb9143 | ||
|
|
253cb86dc5 | ||
|
|
891d456179 | ||
|
|
b5bdbbe6f9 | ||
|
|
31a337bdb8 | ||
|
|
01ed54b96f | ||
|
|
61fb60d4f2 | ||
|
|
10df34cfdb | ||
|
|
1eb71da431 | ||
|
|
4769d42de7 | ||
|
|
32fc360410 | ||
|
|
e69e0038f3 | ||
|
|
e36b65d99b | ||
|
|
d6d4bd18a5 | ||
|
|
14532adb8a | ||
|
|
0faa83eef0 | ||
|
|
ba1e8e6e5a | ||
|
|
15662233de | ||
|
|
942df565a9 | ||
|
|
d856baa9a6 | ||
|
|
6d5a2e7872 | ||
|
|
34966e78de | ||
|
|
1d80419c54 | ||
|
|
7f357ece29 | ||
|
|
6eff776e1e | ||
|
|
22634b805c | ||
|
|
fd57737859 |
7
.checkov.yml
Normal file
7
.checkov.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
# See: https://www.checkov.io/1.Welcome/Quick%20Start.html
|
||||
|
||||
compact: true
|
||||
quiet: true
|
||||
skip-path:
|
||||
- coverage
|
||||
- node_modules
|
||||
@@ -36,6 +36,6 @@
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||
"ghcr.io/devcontainers-contrib/features/prettier:1": {}
|
||||
"ghcr.io/devcontainers-community/npm-features/prettier:1": {}
|
||||
}
|
||||
}
|
||||
|
||||
127
.github/copilot-instructions.md
vendored
Normal file
127
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
# Copilot Instructions
|
||||
|
||||
This GitHub Action is written in JavaScript and transpiled to a single file.
|
||||
Both the JavaScript sources and the **generated** JavaScript code are contained
|
||||
in this repository. The JavaScript sources are contained in the `src` directory
|
||||
and the code invoked by GitHub Actions is contained in the `dist` directory. A
|
||||
GitHub Actions workflow checks that the JavaScript code in `dist` is up-to-date.
|
||||
Therefore, you should not review any changes to the contents of the `dist`
|
||||
folder and it is expected that the JavaScript code in `dist` closely mirrors the
|
||||
code it is generated from.
|
||||
|
||||
## Repository Structure
|
||||
|
||||
| Path | Description |
|
||||
| -------------------- | -------------------------------------------------------- |
|
||||
| `__fixtures__/` | Unit Test Fixtures |
|
||||
| `__tests__/` | Unit Tests |
|
||||
| `.devcontainer/` | Development Container Configuration |
|
||||
| `.github/` | GitHub Configuration |
|
||||
| `.licenses/` | License Information |
|
||||
| `.vscode/` | Visual Studio Code Configuration |
|
||||
| `badges/` | Badges for readme |
|
||||
| `dist/` | Generated JavaScript Code |
|
||||
| `src/` | JavaScript Source Code |
|
||||
| `.env.example` | Environment Variables Example for `@github/local-action` |
|
||||
| `.licensed.yml` | Licensed Configuration |
|
||||
| `.markdown-lint.yml` | Markdown Linter Configuration |
|
||||
| `.node-version` | Node.js Version Configuration |
|
||||
| `.prettierrc.yml` | Prettier Formatter Configuration |
|
||||
| `.yaml-lint.yml` | YAML Linter Configuration |
|
||||
| `action.yml` | GitHub Action Metadata |
|
||||
| `CODEOWNERS` | Code Owners File |
|
||||
| `eslint.config.mjs` | ESLint Configuration |
|
||||
| `jest.config.js` | Jest Configuration |
|
||||
| `LICENSE` | License File |
|
||||
| `package.json` | NPM Package Configuration |
|
||||
| `README.md` | Project Documentation |
|
||||
| `rollup.config.js` | Rollup Bundler Configuration |
|
||||
|
||||
## Environment Setup
|
||||
|
||||
Install dependencies by running:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Ensure all unit tests pass by running:
|
||||
|
||||
```bash
|
||||
npm run test
|
||||
```
|
||||
|
||||
Unit tests should exist in the `__tests__` directory. They are powered by
|
||||
`jest`. Fixtures should be placed in the `__fixtures__` directory.
|
||||
|
||||
## Bundling
|
||||
|
||||
Any time files in the `src` directory are changed, you should run the following
|
||||
command to bundle the JavaScript code into the `dist` directory:
|
||||
|
||||
```bash
|
||||
npm run bundle
|
||||
```
|
||||
|
||||
## General Coding Guidelines
|
||||
|
||||
- Follow standard JavaScript coding conventions and best practices
|
||||
- Changes should maintain consistency with existing patterns and style
|
||||
- Document changes clearly and thoroughly, including updates to existing
|
||||
comments when appropriate
|
||||
- Do not include basic, unnecessary comments that simply restate what the code
|
||||
is doing (focus on explaining _why_, not _what_)
|
||||
- Use consistent error handling patterns throughout the codebase
|
||||
- Keep functions focused and manageable
|
||||
- Use descriptive variable and function names that clearly convey their purpose
|
||||
- Use JSDoc comments to document functions, classes, and complex logic
|
||||
- After doing any refactoring, ensure to run `npm run test` to ensure that all
|
||||
tests still pass and coverage requirements are met
|
||||
- When suggesting code changes, always opt for the most maintainable approach.
|
||||
Try your best to keep the code clean and follow "Don't Repeat Yourself" (DRY)
|
||||
principles
|
||||
- Avoid unnecessary complexity and always consider the long-term maintainability
|
||||
of the code
|
||||
- When writing unit tests, try to consider edge cases as well as the main path
|
||||
of success. This will help ensure that the code is robust and can handle
|
||||
unexpected inputs or situations
|
||||
- Use the `@actions/core` package for logging over `console` to ensure
|
||||
compatibility with GitHub Actions logging features
|
||||
|
||||
### Versioning
|
||||
|
||||
GitHub Actions are versioned using branch and tag names. Please ensure the
|
||||
version in the project's `package.json` is updated to reflect the changes made
|
||||
in the codebase. The version should follow
|
||||
[Semantic Versioning](https://semver.org/) principles.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
When creating a pull request (PR), please ensure that:
|
||||
|
||||
- Keep changes focused and minimal (avoid large changes, or consider breaking
|
||||
them into separate, smaller PRs)
|
||||
- Formatting checks pass
|
||||
- Linting checks pass
|
||||
- Unit tests pass and coverage requirements are met
|
||||
- The action has been transpiled to JavaScript and the `dist` directory is
|
||||
up-to-date with the latest changes in the `src` directory
|
||||
- If necessary, the `README.md` file is updated to reflect any changes in
|
||||
functionality or usage
|
||||
|
||||
The body of the PR should include:
|
||||
|
||||
- A summary of the changes
|
||||
- A special note of any changes to dependencies
|
||||
- A link to any relevant issues or discussions
|
||||
- Any additional context that may be helpful for reviewers
|
||||
|
||||
## Code Review Guidelines
|
||||
|
||||
When performing a code review, please follow these guidelines:
|
||||
|
||||
- If there are changes that modify the functionality/usage of the action,
|
||||
validate that there are changes in the `README.md` file that document the new
|
||||
or modified functionality
|
||||
40
.github/prompts/create-release-notes.prompt.md
vendored
Normal file
40
.github/prompts/create-release-notes.prompt.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
mode: agent
|
||||
tools: ['changes', 'codebase', 'github']
|
||||
description: Generate release notes for updates to the repository.
|
||||
---
|
||||
|
||||
# Create Release Notes
|
||||
|
||||
You are an expert technical writer tasked with creating release notes for
|
||||
updates to this repository. Your specific task is to generate release notes that
|
||||
are clear, concise, and useful for developers and users of the project.
|
||||
|
||||
## Guidelines
|
||||
|
||||
Ensure you adhere to the following guidelines when creating release notes:
|
||||
|
||||
- Use a clear and consistent format for the release notes
|
||||
- Include a summary of the changes made in the release
|
||||
- Highlight any new features, improvements, or bugfixes
|
||||
- If applicable, include instructions for upgrading or migrating to the new
|
||||
version
|
||||
- Use technical language that is appropriate for the audience, but avoid jargon
|
||||
that may not be understood by all users
|
||||
- Ensure that the release notes are easy to read and navigate
|
||||
- Include relevant issue or PR numbers where applicable
|
||||
- Use proper Markdown formatting
|
||||
- Use code blocks for commands, configuration examples, or code changes
|
||||
- Use note and warning callouts for important information
|
||||
|
||||
## Versioning
|
||||
|
||||
GitHub Actions are versioned using branch and tag names. The version in the
|
||||
project's `package.json` should reflect the changes made in the codebase and
|
||||
follow [Semantic Versioning](https://semver.org/) principles. Depending on the
|
||||
nature of the changes, please make sure to adjust the release notes accordingly:
|
||||
|
||||
- For **major** changes, include a detailed description of the breaking changes
|
||||
and how users can adapt to them
|
||||
- For **minor** changes, highlight new features and improvements
|
||||
- For **patch** changes, focus on bugfixes and minor improvements
|
||||
90
.github/prompts/unit-test.prompt.md
vendored
Normal file
90
.github/prompts/unit-test.prompt.md
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
mode: agent
|
||||
tools: ['codebase', 'github']
|
||||
description: Generate unit tests for one or more files in the repository.
|
||||
---
|
||||
|
||||
# Create Unit Test(s)
|
||||
|
||||
You are an expert software engineer tasked with creating unit tests for the
|
||||
repository. Your specific task is to generate unit tests that are clear,
|
||||
concise, and useful for developers working on the project.
|
||||
|
||||
## Guidelines
|
||||
|
||||
Ensure you adhere to the following guidelines when creating unit tests:
|
||||
|
||||
- Use a clear and consistent format for the unit tests
|
||||
- Include a summary of the functionality being tested
|
||||
- Use descriptive test names that clearly convey their purpose
|
||||
- Ensure tests cover both the main path of success and edge cases
|
||||
- Use proper assertions to validate the expected outcomes
|
||||
- Use `jest` for writing and running tests
|
||||
- Place unit tests in the `__tests__` directory
|
||||
- Use fixtures for any necessary test data, placed in the `__fixtures__`
|
||||
directory
|
||||
|
||||
## Example
|
||||
|
||||
Use the following as an example of how to structure your unit tests:
|
||||
|
||||
```javascript
|
||||
/**
|
||||
* Unit tests for the action's main functionality, src/main.js
|
||||
*/
|
||||
import { jest } from '@jest/globals'
|
||||
import * as core from '../__fixtures__/core.js'
|
||||
import { wait } from '../__fixtures__/wait.js'
|
||||
|
||||
// Mocks should be declared before the module being tested is imported.
|
||||
jest.unstable_mockModule('@actions/core', () => core)
|
||||
jest.unstable_mockModule('../src/wait.js', () => ({ wait }))
|
||||
|
||||
// The module being tested should be imported dynamically. This ensures that the
|
||||
// mocks are used in place of any actual dependencies.
|
||||
const { run } = await import('../src/main.js')
|
||||
|
||||
describe('main.js', () => {
|
||||
beforeEach(() => {
|
||||
// Set the action's inputs as return values from core.getInput().
|
||||
core.getInput.mockImplementation(() => '500')
|
||||
|
||||
// Mock the wait function so that it does not actually wait.
|
||||
wait.mockImplementation(() => Promise.resolve('done!'))
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.resetAllMocks()
|
||||
})
|
||||
|
||||
it('Sets the time output', async () => {
|
||||
await run()
|
||||
|
||||
// Verify the time output was set.
|
||||
expect(core.setOutput).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
'time',
|
||||
// Simple regex to match a time string in the format HH:MM:SS.
|
||||
expect.stringMatching(/^\d{2}:\d{2}:\d{2}/)
|
||||
)
|
||||
})
|
||||
|
||||
it('Sets a failed status', async () => {
|
||||
// Clear the getInput mock and return an invalid value.
|
||||
core.getInput.mockClear().mockReturnValueOnce('this is not a number')
|
||||
|
||||
// Clear the wait mock and return a rejected promise.
|
||||
wait
|
||||
.mockClear()
|
||||
.mockRejectedValueOnce(new Error('milliseconds is not a number'))
|
||||
|
||||
await run()
|
||||
|
||||
// Verify that the action was marked as failed.
|
||||
expect(core.setFailed).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
'milliseconds is not a number'
|
||||
)
|
||||
})
|
||||
})
|
||||
```
|
||||
14
.github/workflows/check-dist.yml
vendored
14
.github/workflows/check-dist.yml
vendored
@@ -26,25 +26,25 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout the repository.
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
# Setup Node.js using the version specified in `.node-version`.
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
|
||||
# Install dependencies using `npm ci`.
|
||||
- name: Remove dist/ Directory
|
||||
id: remove-dist
|
||||
run: npx rimraf ./dist
|
||||
|
||||
- name: Install Dependencies
|
||||
id: install
|
||||
run: npm ci
|
||||
|
||||
# Build the `dist/` directory.
|
||||
- name: Build dist/ Directory
|
||||
id: build
|
||||
run: npm run bundle
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
|
||||
name: Upload Artifact
|
||||
id: upload
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
|
||||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -19,11 +19,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
@@ -51,13 +51,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Test Local Action
|
||||
id: test-action
|
||||
uses: ./
|
||||
with:
|
||||
milliseconds: 1000
|
||||
milliseconds: 2000
|
||||
|
||||
- name: Print Output
|
||||
id: output
|
||||
|
||||
60
.github/workflows/codeql-analysis.yml
vendored
60
.github/workflows/codeql-analysis.yml
vendored
@@ -1,28 +1,18 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: '24 5 * * 6'
|
||||
- cron: '31 7 * * 3'
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
checks: write
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
@@ -34,40 +24,26 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ['javascript']
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
language:
|
||||
- javascript
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
id: initialize
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
config-file: .github/codeql/codeql-config.yml
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
source-root: src
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
id: autobuild
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
id: analyze
|
||||
uses: github/codeql-action/analyze@v4
|
||||
|
||||
74
.github/workflows/licensed.yml
vendored
Normal file
74
.github/workflows/licensed.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
# This workflow checks the statuses of cached dependencies used in this action
|
||||
# with the help of the Licensed tool. If any licenses are invalid or missing,
|
||||
# this workflow will fail. See: https://github.com/licensee/licensed
|
||||
|
||||
name: Licensed
|
||||
|
||||
on:
|
||||
# Uncomment the below lines to run this workflow on pull requests and pushes
|
||||
# to the default branch. This is useful for checking licenses before merging
|
||||
# changes into the default branch.
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - main
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
licensed:
|
||||
name: Check Licenses
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
|
||||
- name: Install Dependencies
|
||||
id: npm-ci
|
||||
run: npm ci
|
||||
|
||||
- name: Setup Ruby
|
||||
id: setup-ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ruby
|
||||
|
||||
- uses: licensee/setup-licensed@v1.3.2
|
||||
with:
|
||||
version: 4.x
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# If this is a workflow_dispatch event, update the cached licenses.
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
name: Update Licenses
|
||||
id: update-licenses
|
||||
run: licensed cache
|
||||
|
||||
# Then, commit the updated licenses to the repository.
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
name: Commit Licenses
|
||||
id: commit-licenses
|
||||
run: |
|
||||
git config --local user.email "licensed-ci@users.noreply.github.com"
|
||||
git config --local user.name "licensed-ci"
|
||||
git add .
|
||||
git commit -m "Auto-update license files"
|
||||
git push
|
||||
|
||||
# Last, check the status of the cached licenses.
|
||||
- name: Check Licenses
|
||||
id: check-licenses
|
||||
run: licensed status
|
||||
18
.github/workflows/linter.yml
vendored
18
.github/workflows/linter.yml
vendored
@@ -24,37 +24,37 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout the repository.
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# Setup Node.js using the version specified in `.node-version`.
|
||||
- name: Setup Node.js
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: npm
|
||||
|
||||
# Install dependencies using `npm ci`.
|
||||
- name: Install Dependencies
|
||||
id: install
|
||||
run: npm ci
|
||||
|
||||
# Lint the codebase using the `super-linter/super-linter` action.
|
||||
- name: Lint Codebase
|
||||
id: super-linter
|
||||
uses: super-linter/super-linter/slim@v7
|
||||
uses: super-linter/super-linter/slim@v8
|
||||
env:
|
||||
CHECKOV_FILE_NAME: .checkov.yml
|
||||
DEFAULT_BRANCH: main
|
||||
FILTER_REGEX_EXCLUDE: dist/**/*
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
LINTER_RULES_PATH: ${{ github.workspace }}
|
||||
LINTER_RULES_PATH: .
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
VALIDATE_BIOME_FORMAT: false
|
||||
VALIDATE_BIOME_LINT: false
|
||||
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
|
||||
VALIDATE_JAVASCRIPT_ES: false
|
||||
VALIDATE_JAVASCRIPT_STANDARD: false
|
||||
VALIDATE_JSCPD: false
|
||||
VALIDATE_TYPESCRIPT_ES: false
|
||||
VALIDATE_JSON: false
|
||||
|
||||
18
.licensed.yml
Normal file
18
.licensed.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
# See: https://github.com/licensee/licensed/blob/main/docs/configuration.md
|
||||
|
||||
sources:
|
||||
npm: true
|
||||
|
||||
allowed:
|
||||
- apache-2.0
|
||||
- bsd-2-clause
|
||||
- bsd-3-clause
|
||||
- isc
|
||||
- mit
|
||||
- cc0-1.0
|
||||
- other
|
||||
|
||||
ignored:
|
||||
npm:
|
||||
# Used by Rollup.js when building in GitHub Actions
|
||||
- '@rollup/rollup-linux-x64-gnu'
|
||||
20
.licenses/npm/@actions/core.dep.yml
Normal file
20
.licenses/npm/@actions/core.dep.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "@actions/core"
|
||||
version: 1.11.1
|
||||
type: npm
|
||||
summary: Actions core lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |-
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
20
.licenses/npm/@actions/exec.dep.yml
Normal file
20
.licenses/npm/@actions/exec.dep.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "@actions/exec"
|
||||
version: 1.1.1
|
||||
type: npm
|
||||
summary: Actions exec lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |-
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
32
.licenses/npm/@actions/http-client.dep.yml
Normal file
32
.licenses/npm/@actions/http-client.dep.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: "@actions/http-client"
|
||||
version: 2.2.3
|
||||
type: npm
|
||||
summary: Actions Http Client
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||
license: other
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
20
.licenses/npm/@actions/io.dep.yml
Normal file
20
.licenses/npm/@actions/io.dep.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: "@actions/io"
|
||||
version: 1.1.3
|
||||
type: npm
|
||||
summary: Actions io lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/io
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |-
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
30
.licenses/npm/@fastify/busboy.dep.yml
Normal file
30
.licenses/npm/@fastify/busboy.dep.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
name: "@fastify/busboy"
|
||||
version: 2.1.1
|
||||
type: npm
|
||||
summary: A streaming parser for HTML form data for node.js
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |-
|
||||
Copyright Brian White. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
notices: []
|
||||
35
.licenses/npm/tunnel.dep.yml
Normal file
35
.licenses/npm/tunnel.dep.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: tunnel
|
||||
version: 0.0.6
|
||||
type: npm
|
||||
summary: Node HTTP/HTTPS Agents for tunneling proxies
|
||||
homepage: https://github.com/koichik/node-tunnel/
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Koichi Kobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
- sources: README.md
|
||||
text: Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE)
|
||||
license.
|
||||
notices: []
|
||||
34
.licenses/npm/undici.dep.yml
Normal file
34
.licenses/npm/undici.dep.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: undici
|
||||
version: 5.28.5
|
||||
type: npm
|
||||
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||
homepage: https://undici.nodejs.org
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Matteo Collina and Undici contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
- sources: README.md
|
||||
text: MIT
|
||||
notices: []
|
||||
@@ -1 +1 @@
|
||||
20.9.0
|
||||
24.4.0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.DS_Store
|
||||
.licenses/
|
||||
dist/
|
||||
node_modules/
|
||||
coverage/
|
||||
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -7,7 +7,7 @@
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "npx",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"args": ["local-action", ".", "src/main.js", ".env"],
|
||||
"args": ["@github/local-action", ".", "src/main.js", ".env"],
|
||||
"console": "integratedTerminal",
|
||||
"skipFiles": ["<node_internals>/**", "node_modules/**"]
|
||||
}
|
||||
|
||||
9
.vscode/mcp.json
vendored
Normal file
9
.vscode/mcp.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"servers": {
|
||||
"github": {
|
||||
"url": "https://api.githubcopilot.com/mcp/",
|
||||
"type": "http"
|
||||
}
|
||||
},
|
||||
"inputs": []
|
||||
}
|
||||
15
.vscode/settings.json
vendored
Normal file
15
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"github.copilot.chat.reviewSelection.instructions": [
|
||||
{
|
||||
"text": "Review the code changes carefully before accepting them."
|
||||
}
|
||||
],
|
||||
"github.copilot.chat.commitMessageGeneration.instructions": [
|
||||
{
|
||||
"text": "Use conventional commit message format."
|
||||
}
|
||||
],
|
||||
"github.copilot.chat.pullRequestDescriptionGeneration.instructions": [
|
||||
{ "text": "Always include a list of key changes." }
|
||||
]
|
||||
}
|
||||
@@ -10,3 +10,5 @@ rules:
|
||||
max: 80
|
||||
allow-non-breakable-words: true
|
||||
allow-non-breakable-inline-mappings: true
|
||||
ignore:
|
||||
- .licenses/
|
||||
|
||||
89
README.md
89
README.md
@@ -1,7 +1,10 @@
|
||||
# Create a JavaScript Action
|
||||
# Create a GitHub Action Using JavaScript
|
||||
|
||||
[](https://github.com/super-linter/super-linter)
|
||||

|
||||
[](https://github.com/actions/javascript-action/actions/workflows/linter.yml)
|
||||
[](https://github.com/actions/javascript-action/actions/workflows/ci.yml)
|
||||
[](https://github.com/actions/javascript-action/actions/workflows/check-dist.yml)
|
||||
[](https://github.com/actions/javascript-action/actions/workflows/codeql-analysis.yml)
|
||||
[](./badges/coverage.svg)
|
||||
|
||||
Use this template to bootstrap the creation of a JavaScript action. :rocket:
|
||||
|
||||
@@ -36,11 +39,13 @@ need to perform some initial setup steps before you can develop your action.
|
||||
> [!NOTE]
|
||||
>
|
||||
> You'll need to have a reasonably modern version of
|
||||
> [Node.js](https://nodejs.org) handy. If you are using a version manager like
|
||||
> [`nodenv`](https://github.com/nodenv/nodenv) or
|
||||
> [`nvm`](https://github.com/nvm-sh/nvm), you can run `nodenv install` in the
|
||||
> root of your repository to install the version specified in
|
||||
> [`package.json`](./package.json). Otherwise, 20.x or later should work!
|
||||
> [Node.js](https://nodejs.org) handy (20.x or later should work!). If you are
|
||||
> using a version manager like [`nodenv`](https://github.com/nodenv/nodenv) or
|
||||
> [`fnm`](https://github.com/Schniz/fnm), this template has a `.node-version`
|
||||
> file at the root of the repository that can be used to automatically switch to
|
||||
> the correct version when you `cd` into the repository. Additionally, this
|
||||
> `.node-version` file is used by GitHub Actions in any `actions/setup-node`
|
||||
> actions.
|
||||
|
||||
1. :hammer_and_wrench: Install the dependencies
|
||||
|
||||
@@ -119,12 +124,10 @@ So, what are you waiting for? Go ahead and start customizing your action!
|
||||
npm run all
|
||||
```
|
||||
|
||||
> This step is important! It will run [`ncc`](https://github.com/vercel/ncc)
|
||||
> to build the final JavaScript action code with all dependencies included.
|
||||
> If you do not run this step, your action will not work correctly when it is
|
||||
> used in a workflow. This step also includes the `--license` option for
|
||||
> `ncc`, which will create a license file for all of the production node
|
||||
> modules used in your project.
|
||||
> This step is important! It will run [`rollup`](https://rollupjs.org/) to
|
||||
> build the final JavaScript action code with all dependencies included. If
|
||||
> you do not run this step, your action will not work correctly when it is
|
||||
> used in a workflow.
|
||||
|
||||
1. (Optional) Test your action locally
|
||||
|
||||
@@ -135,7 +138,6 @@ So, what are you waiting for? Go ahead and start customizing your action!
|
||||
to a repository.
|
||||
|
||||
The `local-action` utility can be run in the following ways:
|
||||
|
||||
- Visual Studio Code Debugger
|
||||
|
||||
Make sure to review and, if needed, update
|
||||
@@ -144,8 +146,8 @@ So, what are you waiting for? Go ahead and start customizing your action!
|
||||
- Terminal/Command Prompt
|
||||
|
||||
```bash
|
||||
# npx local action <action-yaml-path> <entrypoint> <dotenv-file>
|
||||
npx local-action . src/main.js .env
|
||||
# npx @github/local action <action-yaml-path> <entrypoint> <dotenv-file>
|
||||
npx @github/local-action . src/main.js .env
|
||||
```
|
||||
|
||||
You can provide a `.env` file to the `local-action` CLI to set environment
|
||||
@@ -186,7 +188,7 @@ action in the same repository.
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Test Local Action
|
||||
id: test-action
|
||||
@@ -219,13 +221,58 @@ steps:
|
||||
id: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run my Action
|
||||
id: run-action
|
||||
- name: Test Local Action
|
||||
id: test-action
|
||||
uses: actions/javascript-action@v1 # Commit with the `v1` tag
|
||||
with:
|
||||
milliseconds: 1000
|
||||
|
||||
- name: Print Output
|
||||
id: output
|
||||
run: echo "${{ steps.run-action.outputs.time }}"
|
||||
run: echo "${{ steps.test-action.outputs.time }}"
|
||||
```
|
||||
|
||||
## Dependency License Management
|
||||
|
||||
This template includes a GitHub Actions workflow,
|
||||
[`licensed.yml`](./.github/workflows/licensed.yml), that uses
|
||||
[Licensed](https://github.com/licensee/licensed) to check for dependencies with
|
||||
missing or non-compliant licenses. This workflow is initially disabled. To
|
||||
enable the workflow, follow the below steps.
|
||||
|
||||
1. Open [`licensed.yml`](./.github/workflows/licensed.yml)
|
||||
1. Uncomment the following lines:
|
||||
|
||||
```yaml
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - main
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
```
|
||||
|
||||
1. Save and commit the changes
|
||||
|
||||
Once complete, this workflow will run any time a pull request is created or
|
||||
changes pushed directly to `main`. If the workflow detects any dependencies with
|
||||
missing or non-compliant licenses, it will fail the workflow and provide details
|
||||
on the issue(s) found.
|
||||
|
||||
### Updating Licenses
|
||||
|
||||
Whenever you install or update dependencies, you can use the Licensed CLI to
|
||||
update the licenses database. To install Licensed, see the project's
|
||||
[Readme](https://github.com/licensee/licensed?tab=readme-ov-file#installation).
|
||||
|
||||
To update the cached licenses, run the following command:
|
||||
|
||||
```bash
|
||||
licensed cache
|
||||
```
|
||||
|
||||
To check the status of cached licenses, run the following command:
|
||||
|
||||
```bash
|
||||
licensed status
|
||||
```
|
||||
|
||||
@@ -20,5 +20,5 @@ outputs:
|
||||
description: Your output description here
|
||||
|
||||
runs:
|
||||
using: node20
|
||||
using: node24
|
||||
main: dist/index.js
|
||||
|
||||
6
actionlint.yml
Normal file
6
actionlint.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
# See: https://github.com/rhysd/actionlint/blob/v1.7.7/docs/config.md
|
||||
|
||||
paths:
|
||||
.github/workflows/**/*.{yml,yaml}:
|
||||
ignore:
|
||||
- invalid runner name "node24"
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="106" height="20" role="img" aria-label="Coverage: 100%"><title>Coverage: 100%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="106" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="43" height="20" fill="#4c1"/><rect width="106" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="835" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="330">100%</text><text x="835" y="140" transform="scale(.1)" fill="#fff" textLength="330">100%</text></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="106" height="20" role="img" aria-label="Coverage: 100%"><title>Coverage: 100%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="106" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="43" height="20" fill="#4c1"/><rect width="106" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="835" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="330">100%</text><text x="835" y="140" transform="scale(.1)" fill="#fff" textLength="330">100%</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
300
dist/index.js
generated
vendored
300
dist/index.js
generated
vendored
@@ -8219,9 +8219,9 @@ var hasRequiredConstants$2;
|
||||
function requireConstants$2 () {
|
||||
if (hasRequiredConstants$2) return constants$2;
|
||||
hasRequiredConstants$2 = 1;
|
||||
(function (exports) {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0;
|
||||
(function (exports$1) {
|
||||
Object.defineProperty(exports$1, "__esModule", { value: true });
|
||||
exports$1.SPECIAL_HEADERS = exports$1.HEADER_STATE = exports$1.MINOR = exports$1.MAJOR = exports$1.CONNECTION_TOKEN_CHARS = exports$1.HEADER_CHARS = exports$1.TOKEN = exports$1.STRICT_TOKEN = exports$1.HEX = exports$1.URL_CHAR = exports$1.STRICT_URL_CHAR = exports$1.USERINFO_CHARS = exports$1.MARK = exports$1.ALPHANUM = exports$1.NUM = exports$1.HEX_MAP = exports$1.NUM_MAP = exports$1.ALPHA = exports$1.FINISH = exports$1.H_METHOD_MAP = exports$1.METHOD_MAP = exports$1.METHODS_RTSP = exports$1.METHODS_ICE = exports$1.METHODS_HTTP = exports$1.METHODS = exports$1.LENIENT_FLAGS = exports$1.FLAGS = exports$1.TYPE = exports$1.ERROR = void 0;
|
||||
const utils_1 = requireUtils();
|
||||
(function (ERROR) {
|
||||
ERROR[ERROR["OK"] = 0] = "OK";
|
||||
@@ -8249,12 +8249,12 @@ function requireConstants$2 () {
|
||||
ERROR[ERROR["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE";
|
||||
ERROR[ERROR["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE";
|
||||
ERROR[ERROR["USER"] = 24] = "USER";
|
||||
})(exports.ERROR || (exports.ERROR = {}));
|
||||
})(exports$1.ERROR || (exports$1.ERROR = {}));
|
||||
(function (TYPE) {
|
||||
TYPE[TYPE["BOTH"] = 0] = "BOTH";
|
||||
TYPE[TYPE["REQUEST"] = 1] = "REQUEST";
|
||||
TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE";
|
||||
})(exports.TYPE || (exports.TYPE = {}));
|
||||
})(exports$1.TYPE || (exports$1.TYPE = {}));
|
||||
(function (FLAGS) {
|
||||
FLAGS[FLAGS["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE";
|
||||
FLAGS[FLAGS["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE";
|
||||
@@ -8266,12 +8266,12 @@ function requireConstants$2 () {
|
||||
FLAGS[FLAGS["TRAILING"] = 128] = "TRAILING";
|
||||
// 1 << 8 is unused
|
||||
FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING";
|
||||
})(exports.FLAGS || (exports.FLAGS = {}));
|
||||
})(exports$1.FLAGS || (exports$1.FLAGS = {}));
|
||||
(function (LENIENT_FLAGS) {
|
||||
LENIENT_FLAGS[LENIENT_FLAGS["HEADERS"] = 1] = "HEADERS";
|
||||
LENIENT_FLAGS[LENIENT_FLAGS["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH";
|
||||
LENIENT_FLAGS[LENIENT_FLAGS["KEEP_ALIVE"] = 4] = "KEEP_ALIVE";
|
||||
})(exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {}));
|
||||
})(exports$1.LENIENT_FLAGS || (exports$1.LENIENT_FLAGS = {}));
|
||||
var METHODS;
|
||||
(function (METHODS) {
|
||||
METHODS[METHODS["DELETE"] = 0] = "DELETE";
|
||||
@@ -8331,8 +8331,8 @@ function requireConstants$2 () {
|
||||
METHODS[METHODS["RECORD"] = 44] = "RECORD";
|
||||
/* RAOP */
|
||||
METHODS[METHODS["FLUSH"] = 45] = "FLUSH";
|
||||
})(METHODS = exports.METHODS || (exports.METHODS = {}));
|
||||
exports.METHODS_HTTP = [
|
||||
})(METHODS = exports$1.METHODS || (exports$1.METHODS = {}));
|
||||
exports$1.METHODS_HTTP = [
|
||||
METHODS.DELETE,
|
||||
METHODS.GET,
|
||||
METHODS.HEAD,
|
||||
@@ -8370,10 +8370,10 @@ function requireConstants$2 () {
|
||||
// TODO(indutny): should we allow it with HTTP?
|
||||
METHODS.SOURCE,
|
||||
];
|
||||
exports.METHODS_ICE = [
|
||||
exports$1.METHODS_ICE = [
|
||||
METHODS.SOURCE,
|
||||
];
|
||||
exports.METHODS_RTSP = [
|
||||
exports$1.METHODS_RTSP = [
|
||||
METHODS.OPTIONS,
|
||||
METHODS.DESCRIBE,
|
||||
METHODS.ANNOUNCE,
|
||||
@@ -8390,59 +8390,59 @@ function requireConstants$2 () {
|
||||
METHODS.GET,
|
||||
METHODS.POST,
|
||||
];
|
||||
exports.METHOD_MAP = utils_1.enumToMap(METHODS);
|
||||
exports.H_METHOD_MAP = {};
|
||||
Object.keys(exports.METHOD_MAP).forEach((key) => {
|
||||
exports$1.METHOD_MAP = utils_1.enumToMap(METHODS);
|
||||
exports$1.H_METHOD_MAP = {};
|
||||
Object.keys(exports$1.METHOD_MAP).forEach((key) => {
|
||||
if (/^H/.test(key)) {
|
||||
exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key];
|
||||
exports$1.H_METHOD_MAP[key] = exports$1.METHOD_MAP[key];
|
||||
}
|
||||
});
|
||||
(function (FINISH) {
|
||||
FINISH[FINISH["SAFE"] = 0] = "SAFE";
|
||||
FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB";
|
||||
FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE";
|
||||
})(exports.FINISH || (exports.FINISH = {}));
|
||||
exports.ALPHA = [];
|
||||
})(exports$1.FINISH || (exports$1.FINISH = {}));
|
||||
exports$1.ALPHA = [];
|
||||
for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) {
|
||||
// Upper case
|
||||
exports.ALPHA.push(String.fromCharCode(i));
|
||||
exports$1.ALPHA.push(String.fromCharCode(i));
|
||||
// Lower case
|
||||
exports.ALPHA.push(String.fromCharCode(i + 0x20));
|
||||
exports$1.ALPHA.push(String.fromCharCode(i + 0x20));
|
||||
}
|
||||
exports.NUM_MAP = {
|
||||
exports$1.NUM_MAP = {
|
||||
0: 0, 1: 1, 2: 2, 3: 3, 4: 4,
|
||||
5: 5, 6: 6, 7: 7, 8: 8, 9: 9,
|
||||
};
|
||||
exports.HEX_MAP = {
|
||||
exports$1.HEX_MAP = {
|
||||
0: 0, 1: 1, 2: 2, 3: 3, 4: 4,
|
||||
5: 5, 6: 6, 7: 7, 8: 8, 9: 9,
|
||||
A: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF,
|
||||
a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf,
|
||||
};
|
||||
exports.NUM = [
|
||||
exports$1.NUM = [
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
];
|
||||
exports.ALPHANUM = exports.ALPHA.concat(exports.NUM);
|
||||
exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')'];
|
||||
exports.USERINFO_CHARS = exports.ALPHANUM
|
||||
.concat(exports.MARK)
|
||||
exports$1.ALPHANUM = exports$1.ALPHA.concat(exports$1.NUM);
|
||||
exports$1.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')'];
|
||||
exports$1.USERINFO_CHARS = exports$1.ALPHANUM
|
||||
.concat(exports$1.MARK)
|
||||
.concat(['%', ';', ':', '&', '=', '+', '$', ',']);
|
||||
// TODO(indutny): use RFC
|
||||
exports.STRICT_URL_CHAR = [
|
||||
exports$1.STRICT_URL_CHAR = [
|
||||
'!', '"', '$', '%', '&', '\'',
|
||||
'(', ')', '*', '+', ',', '-', '.', '/',
|
||||
':', ';', '<', '=', '>',
|
||||
'@', '[', '\\', ']', '^', '_',
|
||||
'`',
|
||||
'{', '|', '}', '~',
|
||||
].concat(exports.ALPHANUM);
|
||||
exports.URL_CHAR = exports.STRICT_URL_CHAR
|
||||
].concat(exports$1.ALPHANUM);
|
||||
exports$1.URL_CHAR = exports$1.STRICT_URL_CHAR
|
||||
.concat(['\t', '\f']);
|
||||
// All characters with 0x80 bit set to 1
|
||||
for (let i = 0x80; i <= 0xff; i++) {
|
||||
exports.URL_CHAR.push(i);
|
||||
exports$1.URL_CHAR.push(i);
|
||||
}
|
||||
exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);
|
||||
exports$1.HEX = exports$1.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']);
|
||||
/* Tokens as defined by rfc 2616. Also lowercases them.
|
||||
* token = 1*<any CHAR except CTLs or separators>
|
||||
* separators = "(" | ")" | "<" | ">" | "@"
|
||||
@@ -8450,27 +8450,27 @@ function requireConstants$2 () {
|
||||
* | "/" | "[" | "]" | "?" | "="
|
||||
* | "{" | "}" | SP | HT
|
||||
*/
|
||||
exports.STRICT_TOKEN = [
|
||||
exports$1.STRICT_TOKEN = [
|
||||
'!', '#', '$', '%', '&', '\'',
|
||||
'*', '+', '-', '.',
|
||||
'^', '_', '`',
|
||||
'|', '~',
|
||||
].concat(exports.ALPHANUM);
|
||||
exports.TOKEN = exports.STRICT_TOKEN.concat([' ']);
|
||||
].concat(exports$1.ALPHANUM);
|
||||
exports$1.TOKEN = exports$1.STRICT_TOKEN.concat([' ']);
|
||||
/*
|
||||
* Verify that a char is a valid visible (printable) US-ASCII
|
||||
* character or %x80-FF
|
||||
*/
|
||||
exports.HEADER_CHARS = ['\t'];
|
||||
exports$1.HEADER_CHARS = ['\t'];
|
||||
for (let i = 32; i <= 255; i++) {
|
||||
if (i !== 127) {
|
||||
exports.HEADER_CHARS.push(i);
|
||||
exports$1.HEADER_CHARS.push(i);
|
||||
}
|
||||
}
|
||||
// ',' = \x44
|
||||
exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44);
|
||||
exports.MAJOR = exports.NUM_MAP;
|
||||
exports.MINOR = exports.MAJOR;
|
||||
exports$1.CONNECTION_TOKEN_CHARS = exports$1.HEADER_CHARS.filter((c) => c !== 44);
|
||||
exports$1.MAJOR = exports$1.NUM_MAP;
|
||||
exports$1.MINOR = exports$1.MAJOR;
|
||||
var HEADER_STATE;
|
||||
(function (HEADER_STATE) {
|
||||
HEADER_STATE[HEADER_STATE["GENERAL"] = 0] = "GENERAL";
|
||||
@@ -8482,8 +8482,8 @@ function requireConstants$2 () {
|
||||
HEADER_STATE[HEADER_STATE["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE";
|
||||
HEADER_STATE[HEADER_STATE["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE";
|
||||
HEADER_STATE[HEADER_STATE["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED";
|
||||
})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {}));
|
||||
exports.SPECIAL_HEADERS = {
|
||||
})(HEADER_STATE = exports$1.HEADER_STATE || (exports$1.HEADER_STATE = {}));
|
||||
exports$1.SPECIAL_HEADERS = {
|
||||
'connection': HEADER_STATE.CONNECTION,
|
||||
'content-length': HEADER_STATE.CONTENT_LENGTH,
|
||||
'proxy-connection': HEADER_STATE.CONNECTION,
|
||||
@@ -9322,10 +9322,10 @@ function requireClient () {
|
||||
const TIMEOUT_IDLE = 3;
|
||||
|
||||
class Parser {
|
||||
constructor (client, socket, { exports }) {
|
||||
constructor (client, socket, { exports: exports$1 }) {
|
||||
assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0);
|
||||
|
||||
this.llhttp = exports;
|
||||
this.llhttp = exports$1;
|
||||
this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE);
|
||||
this.client = client;
|
||||
this.socket = socket;
|
||||
@@ -11492,6 +11492,20 @@ function requirePool () {
|
||||
? { ...options.interceptors }
|
||||
: undefined;
|
||||
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] () {
|
||||
@@ -14953,6 +14967,7 @@ function requireHeaders () {
|
||||
isValidHeaderName,
|
||||
isValidHeaderValue
|
||||
} = requireUtil$5();
|
||||
const util = require$$0$2;
|
||||
const { webidl } = requireWebidl();
|
||||
const assert = require$$0$3;
|
||||
|
||||
@@ -15499,6 +15514,9 @@ function requireHeaders () {
|
||||
[Symbol.toStringTag]: {
|
||||
value: 'Headers',
|
||||
configurable: true
|
||||
},
|
||||
[util.inspect.custom]: {
|
||||
enumerable: false
|
||||
}
|
||||
});
|
||||
|
||||
@@ -21388,9 +21406,10 @@ function requireUtil$1 () {
|
||||
if (hasRequiredUtil$1) return util$1;
|
||||
hasRequiredUtil$1 = 1;
|
||||
|
||||
const assert = require$$0$3;
|
||||
const { kHeadersList } = requireSymbols$4();
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function isCTLExcludingHtab (value) {
|
||||
if (value.length === 0) {
|
||||
return false
|
||||
@@ -21651,31 +21670,13 @@ function requireUtil$1 () {
|
||||
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
|
||||
}
|
||||
|
||||
util$1 = {
|
||||
isCTLExcludingHtab,
|
||||
stringify,
|
||||
getHeadersList
|
||||
validateCookieName,
|
||||
validateCookiePath,
|
||||
validateCookieValue,
|
||||
toIMFDate,
|
||||
stringify
|
||||
};
|
||||
return util$1;
|
||||
}
|
||||
@@ -22013,7 +22014,7 @@ function requireCookies () {
|
||||
hasRequiredCookies = 1;
|
||||
|
||||
const { parseSetCookie } = requireParse();
|
||||
const { stringify, getHeadersList } = requireUtil$1();
|
||||
const { stringify } = requireUtil$1();
|
||||
const { webidl } = requireWebidl();
|
||||
const { Headers } = requireHeaders();
|
||||
|
||||
@@ -22089,14 +22090,13 @@ function requireCookies () {
|
||||
|
||||
webidl.brandCheck(headers, Headers, { strict: false });
|
||||
|
||||
const cookies = getHeadersList(headers).cookies;
|
||||
const cookies = headers.getSetCookie();
|
||||
|
||||
if (!cookies) {
|
||||
return []
|
||||
}
|
||||
|
||||
// In older versions of undici, cookies is a list of name:value.
|
||||
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||
return cookies.map((pair) => parseSetCookie(pair))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -25187,7 +25187,7 @@ var hasRequiredSummary;
|
||||
function requireSummary () {
|
||||
if (hasRequiredSummary) return summary;
|
||||
hasRequiredSummary = 1;
|
||||
(function (exports) {
|
||||
(function (exports$1) {
|
||||
var __awaiter = (summary && summary.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
@@ -25197,13 +25197,13 @@ function requireSummary () {
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
|
||||
Object.defineProperty(exports$1, "__esModule", { value: true });
|
||||
exports$1.summary = exports$1.markdownSummary = exports$1.SUMMARY_DOCS_URL = exports$1.SUMMARY_ENV_VAR = void 0;
|
||||
const os_1 = require$$0;
|
||||
const fs_1 = require$$1;
|
||||
const { access, appendFile, writeFile } = fs_1.promises;
|
||||
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
|
||||
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
|
||||
exports$1.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
|
||||
exports$1.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
|
||||
class Summary {
|
||||
constructor() {
|
||||
this._buffer = '';
|
||||
@@ -25219,9 +25219,9 @@ function requireSummary () {
|
||||
if (this._filePath) {
|
||||
return this._filePath;
|
||||
}
|
||||
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
|
||||
const pathFromEnv = process.env[exports$1.SUMMARY_ENV_VAR];
|
||||
if (!pathFromEnv) {
|
||||
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
|
||||
throw new Error(`Unable to find environment variable for $${exports$1.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
|
||||
}
|
||||
try {
|
||||
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
|
||||
@@ -25467,8 +25467,8 @@ function requireSummary () {
|
||||
/**
|
||||
* @deprecated use `core.summary`
|
||||
*/
|
||||
exports.markdownSummary = _summary;
|
||||
exports.summary = _summary;
|
||||
exports$1.markdownSummary = _summary;
|
||||
exports$1.summary = _summary;
|
||||
|
||||
} (summary));
|
||||
return summary;
|
||||
@@ -25560,7 +25560,7 @@ var hasRequiredIoUtil;
|
||||
function requireIoUtil () {
|
||||
if (hasRequiredIoUtil) return ioUtil;
|
||||
hasRequiredIoUtil = 1;
|
||||
(function (exports) {
|
||||
(function (exports$1) {
|
||||
var __createBinding = (ioUtil && ioUtil.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
@@ -25590,22 +25590,22 @@ function requireIoUtil () {
|
||||
});
|
||||
};
|
||||
var _a;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
|
||||
Object.defineProperty(exports$1, "__esModule", { value: true });
|
||||
exports$1.getCmdPath = exports$1.tryGetExecutablePath = exports$1.isRooted = exports$1.isDirectory = exports$1.exists = exports$1.READONLY = exports$1.UV_FS_O_EXLOCK = exports$1.IS_WINDOWS = exports$1.unlink = exports$1.symlink = exports$1.stat = exports$1.rmdir = exports$1.rm = exports$1.rename = exports$1.readlink = exports$1.readdir = exports$1.open = exports$1.mkdir = exports$1.lstat = exports$1.copyFile = exports$1.chmod = void 0;
|
||||
const fs = __importStar(require$$1);
|
||||
const path = __importStar(require$$1$5);
|
||||
_a = fs.promises
|
||||
// export const {open} = 'fs'
|
||||
, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
|
||||
, exports$1.chmod = _a.chmod, exports$1.copyFile = _a.copyFile, exports$1.lstat = _a.lstat, exports$1.mkdir = _a.mkdir, exports$1.open = _a.open, exports$1.readdir = _a.readdir, exports$1.readlink = _a.readlink, exports$1.rename = _a.rename, exports$1.rm = _a.rm, exports$1.rmdir = _a.rmdir, exports$1.stat = _a.stat, exports$1.symlink = _a.symlink, exports$1.unlink = _a.unlink;
|
||||
// export const {open} = 'fs'
|
||||
exports.IS_WINDOWS = process.platform === 'win32';
|
||||
exports$1.IS_WINDOWS = process.platform === 'win32';
|
||||
// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
|
||||
exports.UV_FS_O_EXLOCK = 0x10000000;
|
||||
exports.READONLY = fs.constants.O_RDONLY;
|
||||
exports$1.UV_FS_O_EXLOCK = 0x10000000;
|
||||
exports$1.READONLY = fs.constants.O_RDONLY;
|
||||
function exists(fsPath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
yield exports.stat(fsPath);
|
||||
yield exports$1.stat(fsPath);
|
||||
}
|
||||
catch (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
@@ -25616,14 +25616,14 @@ function requireIoUtil () {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
exports.exists = exists;
|
||||
exports$1.exists = exists;
|
||||
function isDirectory(fsPath, useStat = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);
|
||||
const stats = useStat ? yield exports$1.stat(fsPath) : yield exports$1.lstat(fsPath);
|
||||
return stats.isDirectory();
|
||||
});
|
||||
}
|
||||
exports.isDirectory = isDirectory;
|
||||
exports$1.isDirectory = isDirectory;
|
||||
/**
|
||||
* On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:
|
||||
* \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases).
|
||||
@@ -25633,13 +25633,13 @@ function requireIoUtil () {
|
||||
if (!p) {
|
||||
throw new Error('isRooted() parameter "p" cannot be empty');
|
||||
}
|
||||
if (exports.IS_WINDOWS) {
|
||||
if (exports$1.IS_WINDOWS) {
|
||||
return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello
|
||||
); // e.g. C: or C:\hello
|
||||
}
|
||||
return p.startsWith('/');
|
||||
}
|
||||
exports.isRooted = isRooted;
|
||||
exports$1.isRooted = isRooted;
|
||||
/**
|
||||
* Best effort attempt to determine whether a file exists and is executable.
|
||||
* @param filePath file path to check
|
||||
@@ -25651,7 +25651,7 @@ function requireIoUtil () {
|
||||
let stats = undefined;
|
||||
try {
|
||||
// test file exists
|
||||
stats = yield exports.stat(filePath);
|
||||
stats = yield exports$1.stat(filePath);
|
||||
}
|
||||
catch (err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
@@ -25660,7 +25660,7 @@ function requireIoUtil () {
|
||||
}
|
||||
}
|
||||
if (stats && stats.isFile()) {
|
||||
if (exports.IS_WINDOWS) {
|
||||
if (exports$1.IS_WINDOWS) {
|
||||
// on Windows, test for valid extension
|
||||
const upperExt = path.extname(filePath).toUpperCase();
|
||||
if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {
|
||||
@@ -25679,7 +25679,7 @@ function requireIoUtil () {
|
||||
filePath = originalFilePath + extension;
|
||||
stats = undefined;
|
||||
try {
|
||||
stats = yield exports.stat(filePath);
|
||||
stats = yield exports$1.stat(filePath);
|
||||
}
|
||||
catch (err) {
|
||||
if (err.code !== 'ENOENT') {
|
||||
@@ -25688,12 +25688,12 @@ function requireIoUtil () {
|
||||
}
|
||||
}
|
||||
if (stats && stats.isFile()) {
|
||||
if (exports.IS_WINDOWS) {
|
||||
if (exports$1.IS_WINDOWS) {
|
||||
// preserve the case of the actual file (since an extension was appended)
|
||||
try {
|
||||
const directory = path.dirname(filePath);
|
||||
const upperName = path.basename(filePath).toUpperCase();
|
||||
for (const actualName of yield exports.readdir(directory)) {
|
||||
for (const actualName of yield exports$1.readdir(directory)) {
|
||||
if (upperName === actualName.toUpperCase()) {
|
||||
filePath = path.join(directory, actualName);
|
||||
break;
|
||||
@@ -25716,10 +25716,10 @@ function requireIoUtil () {
|
||||
return '';
|
||||
});
|
||||
}
|
||||
exports.tryGetExecutablePath = tryGetExecutablePath;
|
||||
exports$1.tryGetExecutablePath = tryGetExecutablePath;
|
||||
function normalizeSeparators(p) {
|
||||
p = p || '';
|
||||
if (exports.IS_WINDOWS) {
|
||||
if (exports$1.IS_WINDOWS) {
|
||||
// convert slashes on Windows
|
||||
p = p.replace(/\//g, '\\');
|
||||
// remove redundant slashes
|
||||
@@ -25741,7 +25741,7 @@ function requireIoUtil () {
|
||||
var _a;
|
||||
return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;
|
||||
}
|
||||
exports.getCmdPath = getCmdPath;
|
||||
exports$1.getCmdPath = getCmdPath;
|
||||
|
||||
} (ioUtil));
|
||||
return ioUtil;
|
||||
@@ -26793,7 +26793,7 @@ var hasRequiredPlatform;
|
||||
function requirePlatform () {
|
||||
if (hasRequiredPlatform) return platform;
|
||||
hasRequiredPlatform = 1;
|
||||
(function (exports) {
|
||||
(function (exports$1) {
|
||||
var __createBinding = (platform && platform.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
@@ -26829,8 +26829,8 @@ function requirePlatform () {
|
||||
var __importDefault = (platform && platform.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0;
|
||||
Object.defineProperty(exports$1, "__esModule", { value: true });
|
||||
exports$1.getDetails = exports$1.isLinux = exports$1.isMacOS = exports$1.isWindows = exports$1.arch = exports$1.platform = void 0;
|
||||
const os_1 = __importDefault(require$$0);
|
||||
const exec = __importStar(requireExec());
|
||||
const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
@@ -26867,25 +26867,25 @@ function requirePlatform () {
|
||||
version
|
||||
};
|
||||
});
|
||||
exports.platform = os_1.default.platform();
|
||||
exports.arch = os_1.default.arch();
|
||||
exports.isWindows = exports.platform === 'win32';
|
||||
exports.isMacOS = exports.platform === 'darwin';
|
||||
exports.isLinux = exports.platform === 'linux';
|
||||
exports$1.platform = os_1.default.platform();
|
||||
exports$1.arch = os_1.default.arch();
|
||||
exports$1.isWindows = exports$1.platform === 'win32';
|
||||
exports$1.isMacOS = exports$1.platform === 'darwin';
|
||||
exports$1.isLinux = exports$1.platform === 'linux';
|
||||
function getDetails() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return Object.assign(Object.assign({}, (yield (exports.isWindows
|
||||
return Object.assign(Object.assign({}, (yield (exports$1.isWindows
|
||||
? getWindowsInfo()
|
||||
: exports.isMacOS
|
||||
: exports$1.isMacOS
|
||||
? getMacOsInfo()
|
||||
: getLinuxInfo()))), { platform: exports.platform,
|
||||
arch: exports.arch,
|
||||
isWindows: exports.isWindows,
|
||||
isMacOS: exports.isMacOS,
|
||||
isLinux: exports.isLinux });
|
||||
: getLinuxInfo()))), { platform: exports$1.platform,
|
||||
arch: exports$1.arch,
|
||||
isWindows: exports$1.isWindows,
|
||||
isMacOS: exports$1.isMacOS,
|
||||
isLinux: exports$1.isLinux });
|
||||
});
|
||||
}
|
||||
exports.getDetails = getDetails;
|
||||
exports$1.getDetails = getDetails;
|
||||
|
||||
} (platform));
|
||||
return platform;
|
||||
@@ -26896,7 +26896,7 @@ var hasRequiredCore;
|
||||
function requireCore () {
|
||||
if (hasRequiredCore) return core;
|
||||
hasRequiredCore = 1;
|
||||
(function (exports) {
|
||||
(function (exports$1) {
|
||||
var __createBinding = (core && core.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
@@ -26929,8 +26929,8 @@ function requireCore () {
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||
Object.defineProperty(exports$1, "__esModule", { value: true });
|
||||
exports$1.platform = exports$1.toPlatformPath = exports$1.toWin32Path = exports$1.toPosixPath = exports$1.markdownSummary = exports$1.summary = exports$1.getIDToken = exports$1.getState = exports$1.saveState = exports$1.group = exports$1.endGroup = exports$1.startGroup = exports$1.info = exports$1.notice = exports$1.warning = exports$1.error = exports$1.debug = exports$1.isDebug = exports$1.setFailed = exports$1.setCommandEcho = exports$1.setOutput = exports$1.getBooleanInput = exports$1.getMultilineInput = exports$1.getInput = exports$1.addPath = exports$1.setSecret = exports$1.exportVariable = exports$1.ExitCode = void 0;
|
||||
const command_1 = requireCommand();
|
||||
const file_command_1 = requireFileCommand();
|
||||
const utils_1 = requireUtils$1();
|
||||
@@ -26950,7 +26950,7 @@ function requireCore () {
|
||||
* A code indicating that the action was a failure
|
||||
*/
|
||||
ExitCode[ExitCode["Failure"] = 1] = "Failure";
|
||||
})(ExitCode || (exports.ExitCode = ExitCode = {}));
|
||||
})(ExitCode || (exports$1.ExitCode = ExitCode = {}));
|
||||
//-----------------------------------------------------------------------
|
||||
// Variables
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -26969,7 +26969,7 @@ function requireCore () {
|
||||
}
|
||||
(0, command_1.issueCommand)('set-env', { name }, convertedVal);
|
||||
}
|
||||
exports.exportVariable = exportVariable;
|
||||
exports$1.exportVariable = exportVariable;
|
||||
/**
|
||||
* Registers a secret which will get masked from logs
|
||||
* @param secret value of the secret
|
||||
@@ -26977,7 +26977,7 @@ function requireCore () {
|
||||
function setSecret(secret) {
|
||||
(0, command_1.issueCommand)('add-mask', {}, secret);
|
||||
}
|
||||
exports.setSecret = setSecret;
|
||||
exports$1.setSecret = setSecret;
|
||||
/**
|
||||
* Prepends inputPath to the PATH (for this action and future actions)
|
||||
* @param inputPath
|
||||
@@ -26992,7 +26992,7 @@ function requireCore () {
|
||||
}
|
||||
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
|
||||
}
|
||||
exports.addPath = addPath;
|
||||
exports$1.addPath = addPath;
|
||||
/**
|
||||
* Gets the value of an input.
|
||||
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
|
||||
@@ -27012,7 +27012,7 @@ function requireCore () {
|
||||
}
|
||||
return val.trim();
|
||||
}
|
||||
exports.getInput = getInput;
|
||||
exports$1.getInput = getInput;
|
||||
/**
|
||||
* Gets the values of an multiline input. Each value is also trimmed.
|
||||
*
|
||||
@@ -27030,7 +27030,7 @@ function requireCore () {
|
||||
}
|
||||
return inputs.map(input => input.trim());
|
||||
}
|
||||
exports.getMultilineInput = getMultilineInput;
|
||||
exports$1.getMultilineInput = getMultilineInput;
|
||||
/**
|
||||
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
|
||||
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
|
||||
@@ -27052,7 +27052,7 @@ function requireCore () {
|
||||
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
|
||||
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||
}
|
||||
exports.getBooleanInput = getBooleanInput;
|
||||
exports$1.getBooleanInput = getBooleanInput;
|
||||
/**
|
||||
* Sets the value of an output.
|
||||
*
|
||||
@@ -27068,7 +27068,7 @@ function requireCore () {
|
||||
process.stdout.write(os.EOL);
|
||||
(0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value));
|
||||
}
|
||||
exports.setOutput = setOutput;
|
||||
exports$1.setOutput = setOutput;
|
||||
/**
|
||||
* Enables or disables the echoing of commands into stdout for the rest of the step.
|
||||
* Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
|
||||
@@ -27077,7 +27077,7 @@ function requireCore () {
|
||||
function setCommandEcho(enabled) {
|
||||
(0, command_1.issue)('echo', enabled ? 'on' : 'off');
|
||||
}
|
||||
exports.setCommandEcho = setCommandEcho;
|
||||
exports$1.setCommandEcho = setCommandEcho;
|
||||
//-----------------------------------------------------------------------
|
||||
// Results
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -27090,7 +27090,7 @@ function requireCore () {
|
||||
process.exitCode = ExitCode.Failure;
|
||||
error(message);
|
||||
}
|
||||
exports.setFailed = setFailed;
|
||||
exports$1.setFailed = setFailed;
|
||||
//-----------------------------------------------------------------------
|
||||
// Logging Commands
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -27100,7 +27100,7 @@ function requireCore () {
|
||||
function isDebug() {
|
||||
return process.env['RUNNER_DEBUG'] === '1';
|
||||
}
|
||||
exports.isDebug = isDebug;
|
||||
exports$1.isDebug = isDebug;
|
||||
/**
|
||||
* Writes debug message to user log
|
||||
* @param message debug message
|
||||
@@ -27108,7 +27108,7 @@ function requireCore () {
|
||||
function debug(message) {
|
||||
(0, command_1.issueCommand)('debug', {}, message);
|
||||
}
|
||||
exports.debug = debug;
|
||||
exports$1.debug = debug;
|
||||
/**
|
||||
* Adds an error issue
|
||||
* @param message error issue message. Errors will be converted to string via toString()
|
||||
@@ -27117,7 +27117,7 @@ function requireCore () {
|
||||
function error(message, properties = {}) {
|
||||
(0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
exports.error = error;
|
||||
exports$1.error = error;
|
||||
/**
|
||||
* Adds a warning issue
|
||||
* @param message warning issue message. Errors will be converted to string via toString()
|
||||
@@ -27126,7 +27126,7 @@ function requireCore () {
|
||||
function warning(message, properties = {}) {
|
||||
(0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
exports.warning = warning;
|
||||
exports$1.warning = warning;
|
||||
/**
|
||||
* Adds a notice issue
|
||||
* @param message notice issue message. Errors will be converted to string via toString()
|
||||
@@ -27135,7 +27135,7 @@ function requireCore () {
|
||||
function notice(message, properties = {}) {
|
||||
(0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
exports.notice = notice;
|
||||
exports$1.notice = notice;
|
||||
/**
|
||||
* Writes info to log with console.log.
|
||||
* @param message info message
|
||||
@@ -27143,7 +27143,7 @@ function requireCore () {
|
||||
function info(message) {
|
||||
process.stdout.write(message + os.EOL);
|
||||
}
|
||||
exports.info = info;
|
||||
exports$1.info = info;
|
||||
/**
|
||||
* Begin an output group.
|
||||
*
|
||||
@@ -27154,14 +27154,14 @@ function requireCore () {
|
||||
function startGroup(name) {
|
||||
(0, command_1.issue)('group', name);
|
||||
}
|
||||
exports.startGroup = startGroup;
|
||||
exports$1.startGroup = startGroup;
|
||||
/**
|
||||
* End an output group.
|
||||
*/
|
||||
function endGroup() {
|
||||
(0, command_1.issue)('endgroup');
|
||||
}
|
||||
exports.endGroup = endGroup;
|
||||
exports$1.endGroup = endGroup;
|
||||
/**
|
||||
* Wrap an asynchronous function call in a group.
|
||||
*
|
||||
@@ -27183,7 +27183,7 @@ function requireCore () {
|
||||
return result;
|
||||
});
|
||||
}
|
||||
exports.group = group;
|
||||
exports$1.group = group;
|
||||
//-----------------------------------------------------------------------
|
||||
// Wrapper action state
|
||||
//-----------------------------------------------------------------------
|
||||
@@ -27201,7 +27201,7 @@ function requireCore () {
|
||||
}
|
||||
(0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value));
|
||||
}
|
||||
exports.saveState = saveState;
|
||||
exports$1.saveState = saveState;
|
||||
/**
|
||||
* Gets the value of an state set by this action's main execution.
|
||||
*
|
||||
@@ -27211,34 +27211,34 @@ function requireCore () {
|
||||
function getState(name) {
|
||||
return process.env[`STATE_${name}`] || '';
|
||||
}
|
||||
exports.getState = getState;
|
||||
exports$1.getState = getState;
|
||||
function getIDToken(aud) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
return yield oidc_utils_1.OidcClient.getIDToken(aud);
|
||||
});
|
||||
}
|
||||
exports.getIDToken = getIDToken;
|
||||
exports$1.getIDToken = getIDToken;
|
||||
/**
|
||||
* Summary exports
|
||||
*/
|
||||
var summary_1 = requireSummary();
|
||||
Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } });
|
||||
Object.defineProperty(exports$1, "summary", { enumerable: true, get: function () { return summary_1.summary; } });
|
||||
/**
|
||||
* @deprecated use core.summary
|
||||
*/
|
||||
var summary_2 = requireSummary();
|
||||
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } });
|
||||
Object.defineProperty(exports$1, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } });
|
||||
/**
|
||||
* Path exports
|
||||
*/
|
||||
var path_utils_1 = requirePathUtils();
|
||||
Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });
|
||||
Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });
|
||||
Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });
|
||||
Object.defineProperty(exports$1, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });
|
||||
Object.defineProperty(exports$1, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });
|
||||
Object.defineProperty(exports$1, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });
|
||||
/**
|
||||
* Platform utilities exports
|
||||
*/
|
||||
exports.platform = __importStar(requirePlatform());
|
||||
exports$1.platform = __importStar(requirePlatform());
|
||||
|
||||
} (core));
|
||||
return core;
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
209
dist/licenses.txt
generated
vendored
209
dist/licenses.txt
generated
vendored
@@ -1,209 +0,0 @@
|
||||
Name: @actions/core
|
||||
Version: 1.11.1
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: Actions core lib
|
||||
Repository: git+https://github.com/actions/toolkit.git
|
||||
Homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Name: @actions/http-client
|
||||
Version: 2.2.3
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: Actions Http Client
|
||||
Repository: git+https://github.com/actions/toolkit.git
|
||||
Homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Name: tunnel
|
||||
Version: 0.0.6
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: Node HTTP/HTTPS Agents for tunneling proxies
|
||||
Repository: https://github.com/koichik/node-tunnel.git
|
||||
Homepage: https://github.com/koichik/node-tunnel/
|
||||
Author: Koichi Kobayashi <koichik@improvement.jp>
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Koichi Kobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Name: undici
|
||||
Version: 5.28.5
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: An HTTP/1.1 client, written from scratch for Node.js
|
||||
Repository: git+https://github.com/nodejs/undici.git
|
||||
Homepage: https://undici.nodejs.org
|
||||
Contributors:
|
||||
Daniele Belardi (https://github.com/dnlup)
|
||||
Ethan Arrowood (https://github.com/ethan-arrowood)
|
||||
Matteo Collina (https://github.com/mcollina)
|
||||
Matthew Aitken (https://github.com/KhafraDev)
|
||||
Robert Nagy (https://github.com/ronag)
|
||||
Szymon Marczak (https://github.com/szmarczak)
|
||||
Tomas Della Vedova (https://github.com/delvedor)
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) Matteo Collina and Undici contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Name: @fastify/busboy
|
||||
Version: 2.1.1
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: A streaming parser for HTML form data for node.js
|
||||
Repository: git+https://github.com/fastify/busboy.git
|
||||
Author: Brian White <mscdex@mscdex.net>
|
||||
Contributors:
|
||||
Igor Savin <kibertoad@gmail.com> (https://github.com/kibertoad)
|
||||
Aras Abbasi <aras.abbasi@gmail.com> (https://github.com/uzlopak)
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
Copyright Brian White. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Name: @actions/exec
|
||||
Version: 1.1.1
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: Actions exec lib
|
||||
Repository: git+https://github.com/actions/toolkit.git
|
||||
Homepage: https://github.com/actions/toolkit/tree/main/packages/exec
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
Name: @actions/io
|
||||
Version: 1.1.3
|
||||
License: MIT
|
||||
Private: false
|
||||
Description: Actions io lib
|
||||
Repository: git+https://github.com/actions/toolkit.git
|
||||
Homepage: https://github.com/actions/toolkit/tree/main/packages/io
|
||||
License Copyright:
|
||||
===
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
5872
package-lock.json
generated
5872
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@@ -29,8 +29,8 @@
|
||||
"format:write": "npx prettier --write .",
|
||||
"format:check": "npx prettier --check .",
|
||||
"lint": "npx eslint .",
|
||||
"local-action": "npx local-action . src/main.js .env",
|
||||
"package": "npx rollup --config rollup.config.js",
|
||||
"local-action": "npx @github/local-action . src/main.js .env",
|
||||
"package": "npx rimraf ./dist && npx rollup --config rollup.config.js",
|
||||
"package:watch": "npm run package -- --watch",
|
||||
"test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest",
|
||||
"all": "npm run format:write && npm run lint && npm run test && npm run coverage && npm run package"
|
||||
@@ -40,22 +40,21 @@
|
||||
"@actions/core": "^1.11.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.6",
|
||||
"@github/local-action": "^2.6.1",
|
||||
"@jest/globals": "^29.7.0",
|
||||
"@rollup/plugin-commonjs": "^28.0.2",
|
||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||
"eslint": "^9.20.1",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-jest": "^28.11.0",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"jest": "^29.7.0",
|
||||
"@eslint/compat": "^1.4.0",
|
||||
"@github/local-action": "^6.0.2",
|
||||
"@jest/globals": "^30.2.0",
|
||||
"@rollup/plugin-commonjs": "^29.0.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jest": "^29.2.1",
|
||||
"eslint-plugin-prettier": "^5.5.4",
|
||||
"jest": "^30.2.0",
|
||||
"make-coverage-badge": "^1.2.0",
|
||||
"prettier": "^3.5.0",
|
||||
"prettier-eslint": "^16.3.0",
|
||||
"rollup": "^4.34.6",
|
||||
"rollup-plugin-license": "^3.5.3"
|
||||
"prettier": "^3.7.3",
|
||||
"prettier-eslint": "^16.4.2",
|
||||
"rollup": "^4.53.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "*"
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
||||
import license from 'rollup-plugin-license'
|
||||
|
||||
const config = {
|
||||
input: 'src/index.js',
|
||||
@@ -12,16 +11,7 @@ const config = {
|
||||
format: 'es',
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
commonjs(),
|
||||
nodeResolve({ preferBuiltins: true }),
|
||||
license({
|
||||
sourcemap: true,
|
||||
thirdParty: {
|
||||
output: 'dist/licenses.txt'
|
||||
}
|
||||
})
|
||||
]
|
||||
plugins: [commonjs(), nodeResolve({ preferBuiltins: true })]
|
||||
}
|
||||
|
||||
export default config
|
||||
|
||||
Reference in New Issue
Block a user