From f9b566204e8f9fb07864a34c6e23518b8fb369f2 Mon Sep 17 00:00:00 2001
From: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Date: Thu, 1 Jun 2023 20:31:08 -0700
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(project):=20gener?=
=?UTF-8?q?al=20(#8)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## 💌 Description
## 🔗 Related issue
Close: #
## 🔄️ Type of change
- [ ] 📝 Examples, docs, tutorials
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [x] 🥂 Improvement (non-breaking change which improves an existing
feature)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🔒 Security fix
- [x] ⬆️ Dependencies update
## ✔️ Checklist
- [x] I've read the [`Code of
Conduct`](../blob/main/.github/CODE_OF_CONDUCT.md) document.
- [x] I've read the
[`Contributing`](../blob/main/.github/CONTRIBUTING.md) guide.
---
.editorconfig | 3 +
.eslintrc.yml | 15 +-
.gitignore | 1 +
.prettierrc.yml | 6 +-
.vscode/settings.json | 2 +-
README.md | 15 +-
action.yml | 30 +-
jest.config.js | 16 +-
package-lock.json | 1350 ++++++++++++++++++++++------
package.json | 41 +-
src/action-provider.ts | 45 +
src/fetch-deployenv-vars.ts | 32 +-
src/get-repo.ts | 16 +-
src/github-provider.ts | 54 --
src/input-helper.ts | 24 +-
src/main.ts | 20 +-
src/output-helper.ts | 17 +-
src/utils.ts | 69 +-
tests/action-provider.test.ts | 13 +
tests/fetch-deployenv-vars.test.ts | 28 +-
tests/get-repo.test.ts | 14 +-
tests/helpers.ts | 10 +-
tests/input-helper.test.ts | 15 +-
tests/output-helper.test.ts | 16 +-
tests/utils.test.ts | 80 +-
tsconfig.json | 17 +-
26 files changed, 1450 insertions(+), 499 deletions(-)
create mode 100644 src/action-provider.ts
delete mode 100644 src/github-provider.ts
create mode 100644 tests/action-provider.test.ts
diff --git a/.editorconfig b/.editorconfig
index 8f7dd8a..e8193aa 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,5 +8,8 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = true
+[*.ts]
+max_line_length = 120
+
[*.{cmd,bat}]
end_of_line = crlf
diff --git a/.eslintrc.yml b/.eslintrc.yml
index ad342bc..8e216af 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -3,22 +3,22 @@
root: true
plugins:
+ - github
- jest
- '@typescript-eslint'
+ - prettier
extends:
- plugin:github/recommended
+ - plugin:jest/recommended
- plugin:@typescript-eslint/recommended
+ - plugin:prettier/recommended
parser: '@typescript-eslint/parser'
parserOptions:
- ecmaVersion: 9
- sourceType: module
project: ./tsconfig.json
rules:
- semi: off
i18n-text/no-en: off
eslint-comments/no-use: off
import/no-namespace: off
- no-unused-vars: off
'@typescript-eslint/no-unused-vars': error
'@typescript-eslint/explicit-member-accessibility':
- error
@@ -60,16 +60,21 @@ rules:
- never
'@typescript-eslint/type-annotation-spacing': error
'@typescript-eslint/unbound-method': error
+ prettier/prettier:
+ - error
+ - {}
+ - usePrettierrc: true
overrides:
- files:
- './**/*.test.ts'
- './**/*.spec.ts'
- './tests/setup.ts'
- './tests/helpers.ts'
+ - 'node_modules/**'
rules:
'@typescript-eslint/no-explicit-any': off
env:
node: true
- es2018: true
+ es2020: true
jest/globals: true
jest: true
diff --git a/.gitignore b/.gitignore
index 20c4cbe..adc37ba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
+.yarn/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
diff --git a/.prettierrc.yml b/.prettierrc.yml
index ccefbf3..918670d 100644
--- a/.prettierrc.yml
+++ b/.prettierrc.yml
@@ -1,11 +1,11 @@
# yaml-language-server: $schema=https://json.schemastore.org/prettierrc
---
-printWidth: 180
+printWidth: 120
tabWidth: 2
+endOfLine: lf
useTabs: false
semi: false
singleQuote: true
trailingComma: none
-bracketSpacing: false
+bracketSpacing: true
arrowParens: avoid
-endOfLine: lf
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 6d08eb4..b64dcf5 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -9,7 +9,7 @@
"git.followTagsWhenSync": true,
"git.branchProtection": [
"main",
- "master",
+ "master"
],
"git.mergeEditor": true,
"git.enableSmartCommit": true,
diff --git a/README.md b/README.md
index d770626..c75d396 100644
--- a/README.md
+++ b/README.md
@@ -83,13 +83,14 @@ Abc123
## 📥 Inputs
-| Name | Type | Required | Default | Description |
-|:--------------:|:--------:|:--------:|:--------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `github-token` | `string` | `true` | *not set* | GitHub token to use for API authentication with `environment:read`. scope. |
-| `environment` | `string` | `true` | *not set* | Deployment Environment name. |
-| `output-to` | `string` | `false` | `all` | Output type. One of:
- `action` returns variables as action output
- `env` returns variables as environment variables
- `all` action output + envvars. |
-| `env-prefix` | `string` | `false` | *not set* | Prefix for environment variables. Environment variables prefix will be upper-cased and striped from any special characters. A double underscore `__` is placed between environment prefix and env name (`MYPREFIX__VAR`). |
-| `repository` | `string` | `false` | `github.repository` | To fetch variables from Deployment Environment placed in different repository, set full repository name in the `owner/repo` format. |
+| Name | Type | Required | Default | Description |
+|:--------------:|:---------:|:--------:|:-------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `github-token` | `string` | `true` | _not set_ | GitHub token to use for API authentication with `environment:read`. scope. |
+| `environment` | `string` | `true` | _not set_ | Deployment Environment name. |
+| `output-to` | `string` | `false` | `all` | Output type. One of:
- `action` returns variables as action output
- `env` returns variables as environment variables
- `all` action output + envvars. |
+| `env-prefix` | `string` | `false` | _not set_ | Prefix for environment variables. Environment variables prefix will be upper-cased and striped from any special characters. A double underscore `__` is placed between environment prefix and env name (`MYPREFIX__VAR`). |
+| `repository` | `string` | `false` | `github.repository` | To fetch variables from Deployment Environment placed in different repository, set full repository name in the `owner/repo` format. |
+| `dry-run` | `boolean` | `false` | `false` | Whether or not to actually perform operation. Set to `true` for testing. Will not set outputs/envvars - just log entries. |
## 📤 Outputs
diff --git a/action.yml b/action.yml
index 8e68970..281e4f1 100644
--- a/action.yml
+++ b/action.yml
@@ -9,29 +9,47 @@ branding:
color: gray-dark
inputs:
+ # required
github-token:
- description: GitHub token to use for API authentication with environment:read scope.
+ description: GitHub token to use for API authentication
required: true
+ default: ${{ github.token }}
+
environment:
description: Deployment Environment name.
required: true
+
+ # optional
+ repository:
+ description: |
+ Full repository name in the {owner}/{repo} format.
+ Default: github.repository
+ required: false
+ default: ${{ github.repository }}
+
output-to:
description: |
Output to...
- Default: all
Supported options:
- env: Set environment variables
- action: Set action outputs
- all: Set both environment variables and action outputs
+ Default: all
required: false
+ default: 'all'
+
env-prefix:
- description: Prefix for environment variables.
+ description: |
+ Prefix for environment variables.
+ Default: not set
required: false
- repository:
+
+ dry-run:
description: |
- Full repository name in the {owner}/{repo} format.
- Default: current repository
+ Whether or not to actually perform operation. Set to true for testing.
+ Default: false
required: false
+ default: 'false'
runs:
using: node16
diff --git a/jest.config.js b/jest.config.js
index 8d4708d..20bf22c 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -4,10 +4,6 @@ module.exports = {
setupFiles: [
'/tests/setup.ts'
],
- coveragePathIgnorePatterns: [
- '/lib/',
- '/node_modules/'
- ],
clearMocks: true,
moduleFileExtensions: [
'ts',
@@ -36,15 +32,19 @@ module.exports = {
'/src/**/*.ts',
'/src/**/*.js'
],
+ coveragePathIgnorePatterns: [
+ '/lib/',
+ '/node_modules/'
+ ],
coverageDirectory: 'coverage',
coverageReporters: ['clover', 'json', 'lcov', 'text', 'text-summary', 'cobertura'],
coverageThreshold: {
global: {
global: {
- branches: 80,
- functions: 80,
- lines: 80,
- statements: -10,
+ branches: 90,
+ functions: 90,
+ lines: 90,
+ statements: 90,
}
}
}
diff --git a/package-lock.json b/package-lock.json
index a5a13a5..5efa7ca 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11,27 +11,27 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
- "@octokit/plugin-paginate-graphql": "^2.0.1",
- "@octokit/plugin-paginate-rest": "^6.1.2",
- "@octokit/plugin-rest-endpoint-methods": "^7.1.2",
- "@octokit/plugin-retry": "^4.1.3",
- "@octokit/plugin-throttling": "^6.0.0",
+ "@octokit/action": "^5.0.6",
"@octokit/request-error": "^3.0.3",
- "@octokit/rest": "^19.0.11"
+ "octokit": "^2.0.19"
},
"devDependencies": {
+ "@octokit/openapi-types": "^17.2.0",
"@octokit/types": "^9.2.3",
- "@tsconfig/node16": "^1.0.4",
- "@types/jest": "^29.5.1",
+ "@tsconfig/node18": "^2.0.1",
+ "@types/jest": "^29.5.2",
+ "@types/node": "^20.2.5",
+ "@vercel/ncc": "^0.36.1",
"eslint": "^8.41.0",
"eslint-plugin-github": "^4.7.0",
"eslint-plugin-jest": "^27.2.1",
+ "eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"jest-junit": "^16.0.0",
- "prettier": "^2.8.8",
+ "prettier": "2.8.8",
"pretty-quick": "^3.1.3",
"ts-jest": "^29.1.0",
- "typescript": "^5.0.4"
+ "typescript": "^5.1.3"
}
},
"node_modules/@actions/core": {
@@ -54,107 +54,6 @@
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
}
},
- "node_modules/@actions/github/node_modules/@octokit/auth-token": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
- "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
- "dependencies": {
- "@octokit/types": "^6.0.3"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/core": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
- "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
- "dependencies": {
- "@octokit/auth-token": "^2.4.4",
- "@octokit/graphql": "^4.5.8",
- "@octokit/request": "^5.6.3",
- "@octokit/request-error": "^2.0.5",
- "@octokit/types": "^6.0.3",
- "before-after-hook": "^2.2.0",
- "universal-user-agent": "^6.0.0"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/endpoint": {
- "version": "6.0.12",
- "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
- "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
- "dependencies": {
- "@octokit/types": "^6.0.3",
- "is-plain-object": "^5.0.0",
- "universal-user-agent": "^6.0.0"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/graphql": {
- "version": "4.8.0",
- "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
- "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
- "dependencies": {
- "@octokit/request": "^5.6.0",
- "@octokit/types": "^6.0.3",
- "universal-user-agent": "^6.0.0"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/openapi-types": {
- "version": "12.11.0",
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
- "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
- },
- "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": {
- "version": "2.21.3",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
- "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
- "dependencies": {
- "@octokit/types": "^6.40.0"
- },
- "peerDependencies": {
- "@octokit/core": ">=2"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods": {
- "version": "5.16.2",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
- "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
- "dependencies": {
- "@octokit/types": "^6.39.0",
- "deprecation": "^2.3.1"
- },
- "peerDependencies": {
- "@octokit/core": ">=3"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/request": {
- "version": "5.6.3",
- "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
- "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
- "dependencies": {
- "@octokit/endpoint": "^6.0.1",
- "@octokit/request-error": "^2.1.0",
- "@octokit/types": "^6.16.1",
- "is-plain-object": "^5.0.0",
- "node-fetch": "^2.6.7",
- "universal-user-agent": "^6.0.0"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/request-error": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
- "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
- "dependencies": {
- "@octokit/types": "^6.0.3",
- "deprecation": "^2.0.0",
- "once": "^1.4.0"
- }
- },
- "node_modules/@actions/github/node_modules/@octokit/types": {
- "version": "6.41.0",
- "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
- "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
- "dependencies": {
- "@octokit/openapi-types": "^12.11.0"
- }
- },
"node_modules/@actions/http-client": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz",
@@ -510,9 +409,9 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.22.3",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.3.tgz",
- "integrity": "sha512-vrukxyW/ep8UD1UDzOYpTKQ6abgjFoeG6L+4ar9+c5TN9QnlqiOi6QK7LSR5ewm/ERyGkT/Ai6VboNrxhbr9Uw==",
+ "version": "7.22.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz",
+ "integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@@ -725,19 +624,19 @@
}
},
"node_modules/@babel/traverse": {
- "version": "7.22.1",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.1.tgz",
- "integrity": "sha512-lAWkdCoUFnmwLBhIRLciFntGYsIIoC6vIbN8zrLPqBnJmPu7Z6nzqnKd7FsxQUNAvZfVZ0x6KdNvNp8zWIOHSQ==",
+ "version": "7.22.4",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.4.tgz",
+ "integrity": "sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.21.4",
- "@babel/generator": "^7.22.0",
+ "@babel/generator": "^7.22.3",
"@babel/helper-environment-visitor": "^7.22.1",
"@babel/helper-function-name": "^7.21.0",
"@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
- "@babel/parser": "^7.22.0",
- "@babel/types": "^7.22.0",
+ "@babel/parser": "^7.22.4",
+ "@babel/types": "^7.22.4",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -755,9 +654,9 @@
}
},
"node_modules/@babel/types": {
- "version": "7.22.3",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.3.tgz",
- "integrity": "sha512-P3na3xIQHTKY4L0YOG7pM8M8uoUIB910WQaSiiMCZUC2Cy8XFEQONGABFnHWBa2gpGKODTAJcNhi5Zk0sLRrzg==",
+ "version": "7.22.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.4.tgz",
+ "integrity": "sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.21.5",
@@ -837,9 +736,9 @@
"dev": true
},
"node_modules/@humanwhocodes/config-array": {
- "version": "0.11.8",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
- "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
+ "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==",
"dev": true,
"dependencies": {
"@humanwhocodes/object-schema": "^1.2.1",
@@ -1344,18 +1243,23 @@
"node": ">= 8"
}
},
- "node_modules/@octokit/auth-token": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz",
- "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==",
+ "node_modules/@octokit/action": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/@octokit/action/-/action-5.0.6.tgz",
+ "integrity": "sha512-jVZctvHzD9Cp1YZ5izcmcu2L9Y08Pe3ldjDu7vC2hyWQwz0fBhGrfKT5s4eNZ19K92UzO40cFzAFf1U4IOf13A==",
"dependencies": {
- "@octokit/types": "^9.0.0"
+ "@octokit/auth-action": "^2.0.0",
+ "@octokit/core": "^4.0.0",
+ "@octokit/plugin-paginate-rest": "^6.0.0",
+ "@octokit/plugin-rest-endpoint-methods": "^7.0.0",
+ "@octokit/types": "^9.0.0",
+ "https-proxy-agent": "^7.0.0"
},
"engines": {
- "node": ">= 14"
+ "node": ">= 18"
}
},
- "node_modules/@octokit/core": {
+ "node_modules/@octokit/action/node_modules/@octokit/core": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.1.tgz",
"integrity": "sha512-tEDxFx8E38zF3gT7sSMDrT1tGumDgsw5yPG6BBh/X+5ClIQfMH/Yqocxz1PnHx6CHyF6pxmovUTOfZAUvQ0Lvw==",
@@ -1372,7 +1276,7 @@
"node": ">= 14"
}
},
- "node_modules/@octokit/endpoint": {
+ "node_modules/@octokit/action/node_modules/@octokit/endpoint": {
"version": "7.0.5",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
"integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
@@ -1385,7 +1289,7 @@
"node": ">= 14"
}
},
- "node_modules/@octokit/graphql": {
+ "node_modules/@octokit/action/node_modules/@octokit/graphql": {
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz",
"integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==",
@@ -1398,20 +1302,7 @@
"node": ">= 14"
}
},
- "node_modules/@octokit/openapi-types": {
- "version": "17.2.0",
- "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-17.2.0.tgz",
- "integrity": "sha512-MazrFNx4plbLsGl+LFesMo96eIXkFgEtaKbnNpdh4aQ0VM10aoylFsTYP1AEjkeoRNZiiPe3T6Gl2Hr8dJWdlQ=="
- },
- "node_modules/@octokit/plugin-paginate-graphql": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-graphql/-/plugin-paginate-graphql-2.0.1.tgz",
- "integrity": "sha512-ZlhrWMlkGeK7qkWMKPKb6b7SP6lowN0lsOm+eyDssTBMoEZKSfwK+mrG4YtUhM66YNrJI22L32Vt+CcjteU0Vw==",
- "peerDependencies": {
- "@octokit/core": ">=4"
- }
- },
- "node_modules/@octokit/plugin-paginate-rest": {
+ "node_modules/@octokit/action/node_modules/@octokit/plugin-paginate-rest": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz",
"integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==",
@@ -1426,15 +1317,7 @@
"@octokit/core": ">=4"
}
},
- "node_modules/@octokit/plugin-request-log": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
- "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
- "peerDependencies": {
- "@octokit/core": ">=3"
- }
- },
- "node_modules/@octokit/plugin-rest-endpoint-methods": {
+ "node_modules/@octokit/action/node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.1.2.tgz",
"integrity": "sha512-R0oJ7j6f/AdqPLtB9qRXLO+wjI9pctUn8Ka8UGfGaFCcCv3Otx14CshQ89K4E88pmyYZS8p0rNTiprML/81jig==",
@@ -1449,37 +1332,158 @@
"@octokit/core": ">=3"
}
},
- "node_modules/@octokit/plugin-retry": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.3.tgz",
- "integrity": "sha512-3YKBj7d0J/4mpEc4xzMociWsMNl5lZqrpAnYcW6mqiSGF3wFjU+c6GHih6GLClk31JNvKDr0x9jc5cfm7evkZg==",
+ "node_modules/@octokit/action/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
"dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
"@octokit/types": "^9.0.0",
- "bottleneck": "^2.15.3"
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/app": {
+ "version": "13.1.5",
+ "resolved": "https://registry.npmjs.org/@octokit/app/-/app-13.1.5.tgz",
+ "integrity": "sha512-6qTa24S+gdQUU66SCVfqTkyt2jAr9/ZeyPqJhnNI9PZ8Wum4lQy3bPS+voGlxABNOlzRKnxbSdYKoraMr3MqBA==",
+ "dependencies": {
+ "@octokit/auth-app": "^4.0.13",
+ "@octokit/auth-unauthenticated": "^3.0.0",
+ "@octokit/core": "^4.0.0",
+ "@octokit/oauth-app": "^4.0.7",
+ "@octokit/plugin-paginate-rest": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "@octokit/webhooks": "^10.0.0"
},
- "peerDependencies": {
- "@octokit/core": ">=3"
+ "engines": {
+ "node": ">= 14"
}
},
- "node_modules/@octokit/plugin-throttling": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-6.0.0.tgz",
- "integrity": "sha512-RdKkzD8X/T17KJmEHTsZ5Ztj7WGNpxsJAIyR1bgvkoyar+cDrIRZMsP15r8JRB1QI/LN2F/stUs5/kMVaYXS9g==",
+ "node_modules/@octokit/app/node_modules/@octokit/core": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.1.tgz",
+ "integrity": "sha512-tEDxFx8E38zF3gT7sSMDrT1tGumDgsw5yPG6BBh/X+5ClIQfMH/Yqocxz1PnHx6CHyF6pxmovUTOfZAUvQ0Lvw==",
"dependencies": {
+ "@octokit/auth-token": "^3.0.0",
+ "@octokit/graphql": "^5.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/request-error": "^3.0.0",
"@octokit/types": "^9.0.0",
- "bottleneck": "^2.15.3"
+ "before-after-hook": "^2.2.0",
+ "universal-user-agent": "^6.0.0"
},
"engines": {
- "node": ">= 18"
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/app/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/app/node_modules/@octokit/graphql": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz",
+ "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==",
+ "dependencies": {
+ "@octokit/request": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz",
+ "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==",
+ "dependencies": {
+ "@octokit/tsconfig": "^1.0.2",
+ "@octokit/types": "^9.2.3"
+ },
+ "engines": {
+ "node": ">= 14"
},
"peerDependencies": {
- "@octokit/core": "^4.0.0"
+ "@octokit/core": ">=4"
}
},
- "node_modules/@octokit/request": {
+ "node_modules/@octokit/app/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-action": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-2.1.1.tgz",
+ "integrity": "sha512-396owpMa68wKT9tVf1rInQ0I8WdSJUXbEPWTDyIwqVGEd0xemKJwGHPv768Dh24BSJHY96MsUXJZ8CRaz28XCw==",
+ "dependencies": {
+ "@octokit/auth-token": "^3.0.0",
+ "@octokit/types": "^9.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-app": {
+ "version": "4.0.13",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-4.0.13.tgz",
+ "integrity": "sha512-NBQkmR/Zsc+8fWcVIFrwDgNXS7f4XDrkd9LHdi9DPQw1NdGHLviLzRO2ZBwTtepnwHXW5VTrVU9eFGijMUqllg==",
+ "dependencies": {
+ "@octokit/auth-oauth-app": "^5.0.0",
+ "@octokit/auth-oauth-user": "^2.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "deprecation": "^2.3.1",
+ "lru-cache": "^9.0.0",
+ "universal-github-app-jwt": "^1.1.1",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-app/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-app/node_modules/@octokit/request": {
"version": "6.2.5",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
"integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
@@ -1495,6 +1499,474 @@
"node": ">= 14"
}
},
+ "node_modules/@octokit/auth-app/node_modules/lru-cache": {
+ "version": "9.1.2",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz",
+ "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==",
+ "engines": {
+ "node": "14 || >=16.14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-app": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-app/-/auth-oauth-app-5.0.5.tgz",
+ "integrity": "sha512-UPX1su6XpseaeLVCi78s9droxpGtBWIgz9XhXAx9VXabksoF0MyI5vaa1zo1njyYt6VaAjFisC2A2Wchcu2WmQ==",
+ "dependencies": {
+ "@octokit/auth-oauth-device": "^4.0.0",
+ "@octokit/auth-oauth-user": "^2.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "@types/btoa-lite": "^1.0.0",
+ "btoa-lite": "^1.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-app/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-app/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-device": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-device/-/auth-oauth-device-4.0.4.tgz",
+ "integrity": "sha512-Xl85BZYfqCMv+Uvz33nVVUjE7I/PVySNaK6dRRqlkvYcArSr9vRcZC9KVjXYObGRTCN6mISeYdakAZvWEN4+Jw==",
+ "dependencies": {
+ "@octokit/oauth-methods": "^2.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-device/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-user": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-oauth-user/-/auth-oauth-user-2.1.1.tgz",
+ "integrity": "sha512-JgqnNNPf9CaWLxWm9uh2WgxcaVYhxBR09NVIPTiMU2dVZ3FObOHs3njBiLNw+zq84k+rEdm5Y7AsiASrZ84Apg==",
+ "dependencies": {
+ "@octokit/auth-oauth-device": "^4.0.0",
+ "@octokit/oauth-methods": "^2.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "btoa-lite": "^1.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-user/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-oauth-user/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-token": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz",
+ "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/auth-unauthenticated": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-3.0.5.tgz",
+ "integrity": "sha512-yH2GPFcjrTvDWPwJWWCh0tPPtTL5SMgivgKPA+6v/XmYN6hGQkAto8JtZibSKOpf8ipmeYhLNWQ2UgW0GYILCw==",
+ "dependencies": {
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/core": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
+ "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
+ "dependencies": {
+ "@octokit/auth-token": "^2.4.4",
+ "@octokit/graphql": "^4.5.8",
+ "@octokit/request": "^5.6.3",
+ "@octokit/request-error": "^2.0.5",
+ "@octokit/types": "^6.0.3",
+ "before-after-hook": "^2.2.0",
+ "universal-user-agent": "^6.0.0"
+ }
+ },
+ "node_modules/@octokit/core/node_modules/@octokit/auth-token": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
+ "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
+ "dependencies": {
+ "@octokit/types": "^6.0.3"
+ }
+ },
+ "node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
+ "version": "12.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+ "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+ },
+ "node_modules/@octokit/core/node_modules/@octokit/request-error": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
+ "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
+ "dependencies": {
+ "@octokit/types": "^6.0.3",
+ "deprecation": "^2.0.0",
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/@octokit/core/node_modules/@octokit/types": {
+ "version": "6.41.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+ "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+ "dependencies": {
+ "@octokit/openapi-types": "^12.11.0"
+ }
+ },
+ "node_modules/@octokit/endpoint": {
+ "version": "6.0.12",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
+ "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
+ "dependencies": {
+ "@octokit/types": "^6.0.3",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ }
+ },
+ "node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
+ "version": "12.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+ "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+ },
+ "node_modules/@octokit/endpoint/node_modules/@octokit/types": {
+ "version": "6.41.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+ "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+ "dependencies": {
+ "@octokit/openapi-types": "^12.11.0"
+ }
+ },
+ "node_modules/@octokit/graphql": {
+ "version": "4.8.0",
+ "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
+ "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
+ "dependencies": {
+ "@octokit/request": "^5.6.0",
+ "@octokit/types": "^6.0.3",
+ "universal-user-agent": "^6.0.0"
+ }
+ },
+ "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
+ "version": "12.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+ "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+ },
+ "node_modules/@octokit/graphql/node_modules/@octokit/types": {
+ "version": "6.41.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+ "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+ "dependencies": {
+ "@octokit/openapi-types": "^12.11.0"
+ }
+ },
+ "node_modules/@octokit/oauth-app": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-4.2.2.tgz",
+ "integrity": "sha512-/jsPd43Yu2UXJ4XGq9KyOjPj5kNWQ5pfVzeDEfIVE8ENchyIPS+/IY2a8b0+OQSAsBKBLTHVp9m51RfGHmPZlw==",
+ "dependencies": {
+ "@octokit/auth-oauth-app": "^5.0.0",
+ "@octokit/auth-oauth-user": "^2.0.0",
+ "@octokit/auth-unauthenticated": "^3.0.0",
+ "@octokit/core": "^4.0.0",
+ "@octokit/oauth-authorization-url": "^5.0.0",
+ "@octokit/oauth-methods": "^2.0.0",
+ "@types/aws-lambda": "^8.10.83",
+ "fromentries": "^1.3.1",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-app/node_modules/@octokit/core": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.1.tgz",
+ "integrity": "sha512-tEDxFx8E38zF3gT7sSMDrT1tGumDgsw5yPG6BBh/X+5ClIQfMH/Yqocxz1PnHx6CHyF6pxmovUTOfZAUvQ0Lvw==",
+ "dependencies": {
+ "@octokit/auth-token": "^3.0.0",
+ "@octokit/graphql": "^5.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "before-after-hook": "^2.2.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-app/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-app/node_modules/@octokit/graphql": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz",
+ "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==",
+ "dependencies": {
+ "@octokit/request": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-app/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-authorization-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-5.0.0.tgz",
+ "integrity": "sha512-y1WhN+ERDZTh0qZ4SR+zotgsQUE1ysKnvBt1hvDRB2WRzYtVKQjn97HEPzoehh66Fj9LwNdlZh+p6TJatT0zzg==",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-methods": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/oauth-methods/-/oauth-methods-2.0.5.tgz",
+ "integrity": "sha512-yQP6B5gE3axNxuM3U9KqWs/ErAQ+WLPaPgC/7EjsZsQibkf8sjdAfF8/y/EJW+Dd05XQvadX4WhQZPMnO1SE1A==",
+ "dependencies": {
+ "@octokit/oauth-authorization-url": "^5.0.0",
+ "@octokit/request": "^6.2.3",
+ "@octokit/request-error": "^3.0.3",
+ "@octokit/types": "^9.0.0",
+ "btoa-lite": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/oauth-methods/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/openapi-types": {
+ "version": "17.2.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-17.2.0.tgz",
+ "integrity": "sha512-MazrFNx4plbLsGl+LFesMo96eIXkFgEtaKbnNpdh4aQ0VM10aoylFsTYP1AEjkeoRNZiiPe3T6Gl2Hr8dJWdlQ=="
+ },
+ "node_modules/@octokit/plugin-paginate-rest": {
+ "version": "2.21.3",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
+ "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
+ "dependencies": {
+ "@octokit/types": "^6.40.0"
+ },
+ "peerDependencies": {
+ "@octokit/core": ">=2"
+ }
+ },
+ "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
+ "version": "12.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+ "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+ },
+ "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
+ "version": "6.41.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+ "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+ "dependencies": {
+ "@octokit/openapi-types": "^12.11.0"
+ }
+ },
+ "node_modules/@octokit/plugin-rest-endpoint-methods": {
+ "version": "5.16.2",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
+ "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
+ "dependencies": {
+ "@octokit/types": "^6.39.0",
+ "deprecation": "^2.3.1"
+ },
+ "peerDependencies": {
+ "@octokit/core": ">=3"
+ }
+ },
+ "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
+ "version": "12.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+ "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+ },
+ "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
+ "version": "6.41.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+ "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+ "dependencies": {
+ "@octokit/openapi-types": "^12.11.0"
+ }
+ },
+ "node_modules/@octokit/plugin-retry": {
+ "version": "4.1.4",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-4.1.4.tgz",
+ "integrity": "sha512-JuBB3r04fHmvGe56wwzkBx9UQeikiZTwnsD79Y9Y4i+4OpBc23yi23z/952hBkQveeE7oqorFYf3aUY/S0Z22g==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "bottleneck": "^2.15.3"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "@octokit/core": ">=3"
+ }
+ },
+ "node_modules/@octokit/request": {
+ "version": "5.6.3",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
+ "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
+ "dependencies": {
+ "@octokit/endpoint": "^6.0.1",
+ "@octokit/request-error": "^2.1.0",
+ "@octokit/types": "^6.16.1",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ }
+ },
"node_modules/@octokit/request-error": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
@@ -1508,18 +1980,27 @@
"node": ">= 14"
}
},
- "node_modules/@octokit/rest": {
- "version": "19.0.11",
- "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.11.tgz",
- "integrity": "sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw==",
+ "node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
+ "version": "12.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
+ "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+ },
+ "node_modules/@octokit/request/node_modules/@octokit/request-error": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
+ "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"dependencies": {
- "@octokit/core": "^4.2.1",
- "@octokit/plugin-paginate-rest": "^6.1.2",
- "@octokit/plugin-request-log": "^1.0.4",
- "@octokit/plugin-rest-endpoint-methods": "^7.1.2"
- },
- "engines": {
- "node": ">= 14"
+ "@octokit/types": "^6.0.3",
+ "deprecation": "^2.0.0",
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/@octokit/request/node_modules/@octokit/types": {
+ "version": "6.41.0",
+ "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
+ "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+ "dependencies": {
+ "@octokit/openapi-types": "^12.11.0"
}
},
"node_modules/@octokit/tsconfig": {
@@ -1535,6 +2016,33 @@
"@octokit/openapi-types": "^17.2.0"
}
},
+ "node_modules/@octokit/webhooks": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-10.9.1.tgz",
+ "integrity": "sha512-5NXU4VfsNOo2VSU/SrLrpPH2Z1ZVDOWFcET4EpnEBX1uh/v8Uz65UVuHIRx5TZiXhnWyRE9AO1PXHa+M/iWwZA==",
+ "dependencies": {
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/webhooks-methods": "^3.0.0",
+ "@octokit/webhooks-types": "6.11.0",
+ "aggregate-error": "^3.1.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/webhooks-methods": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-3.0.2.tgz",
+ "integrity": "sha512-Vlnv5WBscf07tyAvfDbp7pTkMZUwk7z7VwEF32x6HqI+55QRwBTcT+D7DDjZXtad/1dU9E32x0HmtDlF9VIRaQ==",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@octokit/webhooks-types": {
+ "version": "6.11.0",
+ "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-6.11.0.tgz",
+ "integrity": "sha512-AanzbulOHljrku1NGfafxdpTCfw2ENaWzH01N2vqQM+cUFbk868Cgh0xylz0JIM9BoKbfI++bdD6EYX0Q/UTEw=="
+ },
"node_modules/@sinclair/typebox": {
"version": "0.25.24",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz",
@@ -1559,12 +2067,17 @@
"@sinonjs/commons": "^3.0.0"
}
},
- "node_modules/@tsconfig/node16": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
- "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "node_modules/@tsconfig/node18": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-2.0.1.tgz",
+ "integrity": "sha512-UqdfvuJK0SArA2CxhKWwwAWfnVSXiYe63bVpMutc27vpngCntGUZQETO24pEJ46zU6XM+7SpqYoMgcO3bM11Ew==",
"dev": true
},
+ "node_modules/@types/aws-lambda": {
+ "version": "8.10.115",
+ "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.115.tgz",
+ "integrity": "sha512-kCZuFXKLV3y8NjSoaD5+qKTpRWvPz3uh3W/u1uwlw3Mg+MtaStg1NWgjAwUXo/VJDb6n6KF1ljykFNlNwEJ53Q=="
+ },
"node_modules/@types/babel__core": {
"version": "7.20.1",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz",
@@ -1598,14 +2111,19 @@
}
},
"node_modules/@types/babel__traverse": {
- "version": "7.20.0",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.0.tgz",
- "integrity": "sha512-TBOjqAGf0hmaqRwpii5LLkJLg7c6OMm4nHLmpsUxwk9bBHtoTC6dAHdVWdGv4TBxj2CZOZY8Xfq8WmfoVi7n4Q==",
+ "version": "7.20.1",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz",
+ "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==",
"dev": true,
"dependencies": {
"@babel/types": "^7.20.7"
}
},
+ "node_modules/@types/btoa-lite": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@types/btoa-lite/-/btoa-lite-1.0.0.tgz",
+ "integrity": "sha512-wJsiX1tosQ+J5+bY5LrSahHxr2wT+uME5UDwdN1kg4frt40euqA+wzECkmq4t5QbveHiJepfdThgQrPw6KiSlg=="
+ },
"node_modules/@types/graceful-fs": {
"version": "4.1.6",
"resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz",
@@ -1640,9 +2158,9 @@
}
},
"node_modules/@types/jest": {
- "version": "29.5.1",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.1.tgz",
- "integrity": "sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ==",
+ "version": "29.5.2",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.2.tgz",
+ "integrity": "sha512-mSoZVJF5YzGVCk+FsDxzDuH7s+SCkzrgKZzf0Z0T2WudhBUPoF6ktoTPC4R0ZoCPCV5xUvuU6ias5NvxcBcMMg==",
"dev": true,
"dependencies": {
"expect": "^29.0.0",
@@ -1661,6 +2179,14 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
"dev": true
},
+ "node_modules/@types/jsonwebtoken": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz",
+ "integrity": "sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/minimatch": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
@@ -1670,13 +2196,12 @@
"node_modules/@types/node": {
"version": "20.2.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz",
- "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==",
- "dev": true
+ "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ=="
},
"node_modules/@types/prettier": {
- "version": "2.7.2",
- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz",
- "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==",
+ "version": "2.7.3",
+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz",
+ "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==",
"dev": true
},
"node_modules/@types/semver": {
@@ -1707,15 +2232,15 @@
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz",
- "integrity": "sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.8.tgz",
+ "integrity": "sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.4.0",
- "@typescript-eslint/scope-manager": "5.59.7",
- "@typescript-eslint/type-utils": "5.59.7",
- "@typescript-eslint/utils": "5.59.7",
+ "@typescript-eslint/scope-manager": "5.59.8",
+ "@typescript-eslint/type-utils": "5.59.8",
+ "@typescript-eslint/utils": "5.59.8",
"debug": "^4.3.4",
"grapheme-splitter": "^1.0.4",
"ignore": "^5.2.0",
@@ -1741,14 +2266,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz",
- "integrity": "sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.8.tgz",
+ "integrity": "sha512-AnR19RjJcpjoeGojmwZtCwBX/RidqDZtzcbG3xHrmz0aHHoOcbWnpDllenRDmDvsV0RQ6+tbb09/kyc+UT9Orw==",
"dev": true,
"dependencies": {
- "@typescript-eslint/scope-manager": "5.59.7",
- "@typescript-eslint/types": "5.59.7",
- "@typescript-eslint/typescript-estree": "5.59.7",
+ "@typescript-eslint/scope-manager": "5.59.8",
+ "@typescript-eslint/types": "5.59.8",
+ "@typescript-eslint/typescript-estree": "5.59.8",
"debug": "^4.3.4"
},
"engines": {
@@ -1768,13 +2293,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz",
- "integrity": "sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.8.tgz",
+ "integrity": "sha512-/w08ndCYI8gxGf+9zKf1vtx/16y8MHrZs5/tnjHhMLNSixuNcJavSX4wAiPf4aS5x41Es9YPCn44MIe4cxIlig==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.59.7",
- "@typescript-eslint/visitor-keys": "5.59.7"
+ "@typescript-eslint/types": "5.59.8",
+ "@typescript-eslint/visitor-keys": "5.59.8"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1785,13 +2310,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz",
- "integrity": "sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.8.tgz",
+ "integrity": "sha512-+5M518uEIHFBy3FnyqZUF3BMP+AXnYn4oyH8RF012+e7/msMY98FhGL5SrN29NQ9xDgvqCgYnsOiKp1VjZ/fpA==",
"dev": true,
"dependencies": {
- "@typescript-eslint/typescript-estree": "5.59.7",
- "@typescript-eslint/utils": "5.59.7",
+ "@typescript-eslint/typescript-estree": "5.59.8",
+ "@typescript-eslint/utils": "5.59.8",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
},
@@ -1812,9 +2337,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz",
- "integrity": "sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.8.tgz",
+ "integrity": "sha512-+uWuOhBTj/L6awoWIg0BlWy0u9TyFpCHrAuQ5bNfxDaZ1Ppb3mx6tUigc74LHcbHpOHuOTOJrBoAnhdHdaea1w==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1825,13 +2350,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz",
- "integrity": "sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.8.tgz",
+ "integrity": "sha512-Jy/lPSDJGNow14vYu6IrW790p7HIf/SOV1Bb6lZ7NUkLc2iB2Z9elESmsaUtLw8kVqogSbtLH9tut5GCX1RLDg==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.59.7",
- "@typescript-eslint/visitor-keys": "5.59.7",
+ "@typescript-eslint/types": "5.59.8",
+ "@typescript-eslint/visitor-keys": "5.59.8",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -1852,17 +2377,17 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.7.tgz",
- "integrity": "sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.8.tgz",
+ "integrity": "sha512-Tr65630KysnNn9f9G7ROF3w1b5/7f6QVCJ+WK9nhIocWmx9F+TmCAcglF26Vm7z8KCTwoKcNEBZrhlklla3CKg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
- "@typescript-eslint/scope-manager": "5.59.7",
- "@typescript-eslint/types": "5.59.7",
- "@typescript-eslint/typescript-estree": "5.59.7",
+ "@typescript-eslint/scope-manager": "5.59.8",
+ "@typescript-eslint/types": "5.59.8",
+ "@typescript-eslint/typescript-estree": "5.59.8",
"eslint-scope": "^5.1.1",
"semver": "^7.3.7"
},
@@ -1900,12 +2425,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.59.7",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz",
- "integrity": "sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==",
+ "version": "5.59.8",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.8.tgz",
+ "integrity": "sha512-pJhi2ms0x0xgloT7xYabil3SGGlojNNKjK/q6dB3Ey0uJLMjK2UDGJvHieiyJVW/7C3KI+Z4Q3pEHkm4ejA+xQ==",
"dev": true,
"dependencies": {
- "@typescript-eslint/types": "5.59.7",
+ "@typescript-eslint/types": "5.59.8",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
@@ -1916,6 +2441,15 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/@vercel/ncc": {
+ "version": "0.36.1",
+ "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz",
+ "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==",
+ "dev": true,
+ "bin": {
+ "ncc": "dist/ncc/cli.js"
+ }
+ },
"node_modules/acorn": {
"version": "8.8.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
@@ -1937,6 +2471,29 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
+ "node_modules/agent-base": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz",
+ "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/aggregate-error": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
+ "dependencies": {
+ "clean-stack": "^2.0.0",
+ "indent-string": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -2293,9 +2850,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.21.5",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz",
- "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==",
+ "version": "4.21.7",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz",
+ "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==",
"dev": true,
"funding": [
{
@@ -2305,13 +2862,17 @@
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
- "caniuse-lite": "^1.0.30001449",
- "electron-to-chromium": "^1.4.284",
- "node-releases": "^2.0.8",
- "update-browserslist-db": "^1.0.10"
+ "caniuse-lite": "^1.0.30001489",
+ "electron-to-chromium": "^1.4.411",
+ "node-releases": "^2.0.12",
+ "update-browserslist-db": "^1.0.11"
},
"bin": {
"browserslist": "cli.js"
@@ -2341,6 +2902,16 @@
"node-int64": "^0.4.0"
}
},
+ "node_modules/btoa-lite": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
+ "integrity": "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA=="
+ },
+ "node_modules/buffer-equal-constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+ "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
+ },
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
@@ -2379,9 +2950,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001489",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001489.tgz",
- "integrity": "sha512-x1mgZEXK8jHIfAxm+xgdpHpk50IN3z3q3zP261/WS+uvePxW8izXuCu6AHz0lkuYTlATDehiZ/tNyYBdSQsOUQ==",
+ "version": "1.0.30001492",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz",
+ "integrity": "sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==",
"dev": true,
"funding": [
{
@@ -2444,6 +3015,14 @@
"integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==",
"dev": true
},
+ "node_modules/clean-stack": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/cliui": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
@@ -2528,7 +3107,6 @@
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dev": true,
"dependencies": {
"ms": "2.1.2"
},
@@ -2654,10 +3232,18 @@
"node": ">=6.0.0"
}
},
+ "node_modules/ecdsa-sig-formatter": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+ "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
"node_modules/electron-to-chromium": {
- "version": "1.4.411",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.411.tgz",
- "integrity": "sha512-5VXLW4Qw89vM2WTICHua/y8v7fKGDRVa2VPOtBB9IpLvW316B+xd8yD1wTmLPY2ot/00P/qt87xdolj4aG/Lzg==",
+ "version": "1.4.417",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.417.tgz",
+ "integrity": "sha512-8rY8HdCxuSVY8wku3i/eDac4g1b4cSbruzocenrqBlzqruAZYHjQCHIjC66dLR9DXhEHTojsC4EjhZ8KmzwXqA==",
"dev": true
},
"node_modules/emittery": {
@@ -3481,12 +4067,45 @@
"is-callable": "^1.1.3"
}
},
+ "node_modules/fromentries": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz",
+ "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
"dev": true
},
+ "node_modules/fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -3789,6 +4408,18 @@
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
"dev": true
},
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.0.tgz",
+ "integrity": "sha512-0euwPCRyAPSgGdzD1IVN9nJYHtBhJwb6XPfbpQcYbPCwrBidX6GzxmchnaF4sfF/jPb74Ojx5g4yTg3sixlyPw==",
+ "dependencies": {
+ "agent-base": "^7.0.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/human-signals": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
@@ -3851,6 +4482,14 @@
"node": ">=0.8.19"
}
},
+ "node_modules/indent-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -4937,6 +5576,21 @@
"node": ">=6"
}
},
+ "node_modules/jsonwebtoken": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
+ "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==",
+ "dependencies": {
+ "jws": "^3.2.2",
+ "lodash": "^4.17.21",
+ "ms": "^2.1.1",
+ "semver": "^7.3.8"
+ },
+ "engines": {
+ "node": ">=12",
+ "npm": ">=6"
+ }
+ },
"node_modules/jsx-ast-utils": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz",
@@ -4950,6 +5604,25 @@
"node": ">=4.0"
}
},
+ "node_modules/jwa": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
+ "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+ "dependencies": {
+ "buffer-equal-constant-time": "1.0.1",
+ "ecdsa-sig-formatter": "1.0.11",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/jws": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
+ "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+ "dependencies": {
+ "jwa": "^1.4.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -5017,6 +5690,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ },
"node_modules/lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
@@ -5183,8 +5861,7 @@
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/multimatch": {
"version": "4.0.0",
@@ -5366,6 +6043,128 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/octokit": {
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/octokit/-/octokit-2.0.19.tgz",
+ "integrity": "sha512-hSloK4MK78QGbAuBrtIir0bsxMoRVZE5CkwKSbSRH9lqv2hx9EwhCxtPqEF+BtHqLXkXdfUaGkJMyMBotYno+A==",
+ "dependencies": {
+ "@octokit/app": "^13.1.5",
+ "@octokit/core": "^4.2.1",
+ "@octokit/oauth-app": "^4.2.1",
+ "@octokit/plugin-paginate-rest": "^6.1.0",
+ "@octokit/plugin-rest-endpoint-methods": "^7.1.1",
+ "@octokit/plugin-retry": "^4.1.3",
+ "@octokit/plugin-throttling": "^5.2.2",
+ "@octokit/types": "^9.2.2"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/core": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.1.tgz",
+ "integrity": "sha512-tEDxFx8E38zF3gT7sSMDrT1tGumDgsw5yPG6BBh/X+5ClIQfMH/Yqocxz1PnHx6CHyF6pxmovUTOfZAUvQ0Lvw==",
+ "dependencies": {
+ "@octokit/auth-token": "^3.0.0",
+ "@octokit/graphql": "^5.0.0",
+ "@octokit/request": "^6.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "before-after-hook": "^2.2.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/endpoint": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
+ "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/graphql": {
+ "version": "5.0.6",
+ "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz",
+ "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==",
+ "dependencies": {
+ "@octokit/request": "^6.0.0",
+ "@octokit/types": "^9.0.0",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/plugin-paginate-rest": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz",
+ "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==",
+ "dependencies": {
+ "@octokit/tsconfig": "^1.0.2",
+ "@octokit/types": "^9.2.3"
+ },
+ "engines": {
+ "node": ">= 14"
+ },
+ "peerDependencies": {
+ "@octokit/core": ">=4"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods": {
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.1.2.tgz",
+ "integrity": "sha512-R0oJ7j6f/AdqPLtB9qRXLO+wjI9pctUn8Ka8UGfGaFCcCv3Otx14CshQ89K4E88pmyYZS8p0rNTiprML/81jig==",
+ "dependencies": {
+ "@octokit/types": "^9.2.3",
+ "deprecation": "^2.3.1"
+ },
+ "engines": {
+ "node": ">= 14"
+ },
+ "peerDependencies": {
+ "@octokit/core": ">=3"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/plugin-throttling": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-5.2.3.tgz",
+ "integrity": "sha512-C9CFg9mrf6cugneKiaI841iG8DOv6P5XXkjmiNNut+swePxQ7RWEdAZRp5rJoE1hjsIqiYcKa/ZkOQ+ujPI39Q==",
+ "dependencies": {
+ "@octokit/types": "^9.0.0",
+ "bottleneck": "^2.15.3"
+ },
+ "engines": {
+ "node": ">= 14"
+ },
+ "peerDependencies": {
+ "@octokit/core": "^4.0.0"
+ }
+ },
+ "node_modules/octokit/node_modules/@octokit/request": {
+ "version": "6.2.5",
+ "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.5.tgz",
+ "integrity": "sha512-z83E8UIlPNaJUsXpjD8E0V5o/5f+vJJNbNcBwVZsX3/vC650U41cOkTLjq4PKk9BYonQGOnx7N17gvLyNjgGcQ==",
+ "dependencies": {
+ "@octokit/endpoint": "^7.0.0",
+ "@octokit/request-error": "^3.0.0",
+ "@octokit/types": "^9.0.0",
+ "is-plain-object": "^5.0.0",
+ "node-fetch": "^2.6.7",
+ "universal-user-agent": "^6.0.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -6015,6 +6814,25 @@
"queue-microtask": "^1.2.2"
}
},
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
"node_modules/safe-regex-test": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
@@ -6033,7 +6851,6 @@
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
"integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
- "dev": true,
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -6048,7 +6865,6 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
"dependencies": {
"yallist": "^4.0.0"
},
@@ -6059,8 +6875,7 @@
"node_modules/semver/node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
"node_modules/shebang-command": {
"version": "2.0.0",
@@ -6535,16 +7350,16 @@
}
},
"node_modules/typescript": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
- "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz",
+ "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=12.20"
+ "node": ">=14.17"
}
},
"node_modules/unbox-primitive": {
@@ -6562,6 +7377,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/universal-github-app-jwt": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-1.1.1.tgz",
+ "integrity": "sha512-G33RTLrIBMFmlDV4u4CBF7dh71eWwykck4XgaxaIVeZKOYZRAAxvcGMRFTUclVY6xoUPQvO4Ne5wKGxYm/Yy9w==",
+ "dependencies": {
+ "@types/jsonwebtoken": "^9.0.0",
+ "jsonwebtoken": "^9.0.0"
+ }
+ },
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
diff --git a/package.json b/package.json
index c2c89c0..9ce5d39 100644
--- a/package.json
+++ b/package.json
@@ -9,10 +9,7 @@
"files": [
"dist/*"
],
- "repository": {
- "type": "git",
- "url": "git+https://github.com/raven-actions/environment-variables.git"
- },
+ "repository": "github:raven-actions/environment-variables",
"bugs": {
"url": "https://github.com/raven-actions/environment-variables/issues"
},
@@ -28,19 +25,19 @@
"scripts": {
"cleanup": "npx rimraf -g dist lib coverage reports",
"cleanup:npm": "npm run cleanup && npx rimraf node_modules && npx rimraf package-lock.json",
- "format": "prettier --write **/*.ts",
- "format:ck": "prettier --check **/*.ts",
- "lint": "eslint --fix src/**/*.ts",
- "lint:ck": "eslint src/**/*.ts",
- "lint:test": "eslint tests/**/*.ts",
- "package": "npx @vercel/ncc build ./src/main.ts --minify --source-map",
+ "format": "prettier --write \"{src,tests}/**/*.ts\" *.md",
+ "format:ck": "prettier --check \"{src,tests}/**/*.ts\" *.md",
+ "format:pq": "pretty-quick",
+ "lint": "eslint --fix \"{src,tests}/**/*.ts\"",
+ "lint:ck": "eslint \"{src,tests}/**/*.ts\"",
+ "pack": "ncc build ./src/main.ts --minify --source-map",
"test": "jest",
"test:cov": "jest --coverage",
"test:ci": "jest --ci",
"test:ci:cov": "jest --ci --coverage --json --outputFile=coverage/report.json",
- "build": "npm run cleanup && npm run format && npm run lint && npm run package",
+ "build": "npm run cleanup && npm run format && npm run pack",
"build:ci": "npm run build",
- "run:dev": "npx @vercel/ncc run ./src/main.ts",
+ "run:dev": "ncc run ./src/main.ts",
"run": "node dist/index.js",
"pkg:ck": "npx npm-check-updates",
"pkg": "npx npm-check-updates --upgrade && npm install"
@@ -48,26 +45,26 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
- "@octokit/plugin-paginate-graphql": "^2.0.1",
- "@octokit/plugin-paginate-rest": "^6.1.2",
- "@octokit/plugin-rest-endpoint-methods": "^7.1.2",
- "@octokit/plugin-retry": "^4.1.3",
- "@octokit/plugin-throttling": "^6.0.0",
+ "@octokit/action": "^5.0.6",
"@octokit/request-error": "^3.0.3",
- "@octokit/rest": "^19.0.11"
+ "octokit": "^2.0.19"
},
"devDependencies": {
+ "@octokit/openapi-types": "^17.2.0",
"@octokit/types": "^9.2.3",
- "@tsconfig/node16": "^1.0.4",
- "@types/jest": "^29.5.1",
+ "@tsconfig/node18": "^2.0.1",
+ "@types/jest": "^29.5.2",
+ "@types/node": "^20.2.5",
+ "@vercel/ncc": "^0.36.1",
"eslint": "^8.41.0",
"eslint-plugin-github": "^4.7.0",
"eslint-plugin-jest": "^27.2.1",
+ "eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"jest-junit": "^16.0.0",
- "prettier": "^2.8.8",
+ "prettier": "2.8.8",
"pretty-quick": "^3.1.3",
"ts-jest": "^29.1.0",
- "typescript": "^5.0.4"
+ "typescript": "^5.1.3"
}
}
diff --git a/src/action-provider.ts b/src/action-provider.ts
new file mode 100644
index 0000000..80e2c2a
--- /dev/null
+++ b/src/action-provider.ts
@@ -0,0 +1,45 @@
+import { context, getOctokit as getGitHubOctokit } from '@actions/github'
+import type { GitHub as GitHubOctokit } from '@actions/github/lib/utils'
+import type { Context } from '@actions/github/lib/context'
+import { Octokit } from 'octokit'
+// import {paginateGraphql} from '@octokit/plugin-paginate-graphql'
+
+export type { Octokit } from 'octokit'
+export type { RestEndpointMethodTypes } from '@octokit/action'
+export type { OctokitResponse, RequestMethod } from '@octokit/types'
+export type { components as octokitComponents } from '@octokit/openapi-types'
+export { RequestError } from '@octokit/request-error'
+
+export type { Context } from '@actions/github/lib/context'
+
+export type Repository = {
+ name: string
+ repo: {
+ owner: string
+ repo: string
+ }
+}
+
+export type GitHub = {
+ github: InstanceType
+ context: Context
+ repository: Repository
+}
+
+export function getGitHub(token: string): GitHub {
+ return {
+ github: getGitHubOctokit(token),
+ context,
+ repository: {
+ name: `${context.repo.owner}/${context.repo.repo}`,
+ repo: { owner: context.repo.owner, repo: context.repo.repo }
+ }
+ }
+}
+
+export function getOctokit(token: string): Octokit {
+ const options = {
+ auth: token
+ }
+ return new Octokit(options)
+}
diff --git a/src/fetch-deployenv-vars.ts b/src/fetch-deployenv-vars.ts
index 45e12cd..d60fda9 100644
--- a/src/fetch-deployenv-vars.ts
+++ b/src/fetch-deployenv-vars.ts
@@ -1,19 +1,29 @@
-import {logDebug, logInfo} from './utils'
-import {Octokit, RestEndpointMethodTypes, RequestError, Repo} from './github-provider'
-import {getRepo} from './get-repo'
+import { logDebug, logInfo } from './utils'
+import { Octokit, RestEndpointMethodTypes, RequestError, Repository } from './action-provider'
+import { getRepo } from './get-repo'
-export type listEnvironmentVariables = RestEndpointMethodTypes['actions']['listEnvironmentVariables']['response']
+export type ghEnvironmentVariables = RestEndpointMethodTypes['actions']['listEnvironmentVariables']['response']
-export async function fetchDeployEnvVars(octokit: Octokit, repository: Repo, deployEnvironment: string): Promise {
- const {id: repositoryId} = await getRepo(octokit, repository)
- const {data} = await tryFetchDeployEnvVars(octokit, deployEnvironment, repositoryId)
- logInfo(`Found ${data.total_count} variables for '${deployEnvironment}' environment in '${repository.name}' repository`)
+const NAME = 'Environment variables'
+
+export async function fetchDeployEnvVars(
+ octokit: Octokit,
+ repository: Repository,
+ deployEnvironment: string
+): Promise {
+ const { id: repositoryId } = await getRepo(octokit, repository)
+ const { data } = await tryFetch(octokit, deployEnvironment, repositoryId)
+ logInfo(`Found ${data.total_count} ${NAME} in '${repository.name}' repository`)
return data
}
-async function tryFetchDeployEnvVars(octokit: Octokit, deployEnvironment: string, repositoryId: number): Promise {
+async function tryFetch(
+ octokit: Octokit,
+ deployEnvironment: string,
+ repositoryId: number
+): Promise {
try {
- logDebug(`Fetching '${deployEnvironment}' environment variables...`)
+ logDebug(`Fetching '${deployEnvironment}' ${NAME}...`)
// https://docs.github.com/en/rest/actions/variables#list-environment-variables
// pagination not required, as there is a limit of 100 variables per environment
return await octokit.rest.actions.listEnvironmentVariables({
@@ -24,7 +34,7 @@ async function tryFetchDeployEnvVars(octokit: Octokit, deployEnvironment: string
} catch (error) {
if (error instanceof RequestError) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
- throw new Error(`'${deployEnvironment}' environment - ${error.status} ${(error.response?.data as any).message}`)
+ throw new Error(`Fetch '${deployEnvironment}' ${NAME} - ${error.status} ${(error.response?.data as any).message}`)
} else {
// catch unknown error
throw new Error((error as Error).message)
diff --git a/src/get-repo.ts b/src/get-repo.ts
index fe19750..e202965 100644
--- a/src/get-repo.ts
+++ b/src/get-repo.ts
@@ -1,16 +1,18 @@
-import {logDebug} from './utils'
-import {Octokit, RestEndpointMethodTypes, RequestError, Repo} from './github-provider'
+import { logDebug } from './utils'
+import { Octokit, RestEndpointMethodTypes, RequestError, Repository } from './action-provider'
type ghRepo = RestEndpointMethodTypes['repos']['get']['response']
-export async function getRepo(octokit: Octokit, repo: Repo): Promise {
- const {data} = await tryGetRepo(octokit, repo)
+const NAME = 'Repository'
+
+export async function getRepo(octokit: Octokit, repository: Repository): Promise {
+ const { data } = await tryGet(octokit, repository)
return data
}
-export async function tryGetRepo(octokit: Octokit, repository: Repo): Promise {
+export async function tryGet(octokit: Octokit, repository: Repository): Promise {
try {
- logDebug(`Getting '${repository.name}' repository...`)
+ logDebug(`Getting '${repository.name}' ${NAME}...`)
// https://docs.github.com/en/rest/repos/repos#get-a-repository
return await octokit.rest.repos.get({
...repository.repo
@@ -18,7 +20,7 @@ export async function tryGetRepo(octokit: Octokit, repository: Repo): Promise; context: Context; repo: Repo} {
- const GitHubOctokit = github.getOctokit(token)
- const {context} = github
- return {github: GitHubOctokit, context, repo: {name: `${context.repo.owner}/${context.repo.repo}`, repo: {owner: context.repo.owner, repo: context.repo.repo}}}
-}
-
-export function getOctokit(token: string): InstanceType {
- const octokitOptions: OctokitOptions = {
- auth: token,
- throttle: {
- onRateLimit: (retryAfter, options: OctokitOptions, octokit, retryCount) => {
- octokit.log.warn(`Request quota exhausted for request ${options.method} ${options.url}`)
-
- if (retryCount < 1) {
- // only retries once
- octokit.log.info(`Retrying after ${retryAfter} seconds!`)
- return true
- }
- },
- onSecondaryRateLimit: (retryAfter, options: OctokitOptions, octokit) => {
- // does not retry, only logs a warning
- octokit.log.warn(`SecondaryRateLimit detected for request ${options.method} ${options.url}`)
- }
- }
- }
-
- const MyOctokit = Octokit.plugin(throttling).plugin(restEndpointMethods).plugin(retry).plugin(paginateRest).plugin(paginateGraphql).defaults(octokitOptions)
- return new MyOctokit()
-}
diff --git a/src/input-helper.ts b/src/input-helper.ts
index 8643854..36a674a 100644
--- a/src/input-helper.ts
+++ b/src/input-helper.ts
@@ -1,35 +1,39 @@
-import {Repo} from './github-provider'
-import {getInputOptional, getInputRequired, getInputChoice, getInputRepository} from './utils'
+import { Repository } from './action-provider'
+import { getInputOptional, getInputRequired, getInputChoice, getInputRepository, getInputBoolean } from './utils'
export type Input = {
- repository: Repo
+ repository: Repository
outputTo: string
envPrefix: string
deployEnvironment: string
+ dryRun: boolean
}
export function getGitHubToken(): string {
return getInputRequired('github-token', process.env.GITHUB_TOKEN)
}
-export function getInputs(contextRepo: Repo): Input {
+export function getInputs(contextRepository: Repository): Input {
+ // environment
+ const deployEnvironment = getInputRequired('environment')
+
// repository
- let repository: Repo
+ let repository: Repository
const repositoryInput = getInputRepository('repository')
if (repositoryInput) {
repository = repositoryInput
} else {
- repository = contextRepo
+ repository = contextRepository
}
- // environment
- const deployEnvironment = getInputRequired('environment')
-
// output-to
const outputTo = getInputChoice('output-to', 'all', ['all', 'action', 'env'])
// env-prefix
const envPrefix = getInputOptional('env-prefix')
- return {repository, deployEnvironment, outputTo, envPrefix}
+ // dry-run
+ const dryRun = getInputBoolean('dry-run', 'false')
+
+ return { repository, deployEnvironment, outputTo, envPrefix, dryRun }
}
diff --git a/src/main.ts b/src/main.ts
index b161634..7ce5559 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,22 +1,22 @@
-import {setFailed, exitFailure, exitSuccess} from './utils'
-import {getGitHubToken, getInputs} from './input-helper'
-import {getGitHub, getOctokit} from './github-provider'
-import {fetchDeployEnvVars} from './fetch-deployenv-vars'
-import {setOutputs} from './output-helper'
+import { setFailed, logWarning } from './utils'
+import { getGitHubToken, getInputs } from './input-helper'
+import { getGitHub, getOctokit } from './action-provider'
+import { fetchDeployEnvVars } from './fetch-deployenv-vars'
+import { setOutputs } from './output-helper'
export async function main(): Promise {
try {
const githubToken = getGitHubToken()
- const {repo} = getGitHub(githubToken)
- const inputs = getInputs(repo)
+ const { repository } = getGitHub(githubToken)
+ const inputs = getInputs(repository)
const octokit = getOctokit(githubToken)
+ if (inputs.dryRun) logWarning('Dry-run mode enabled, no changes will be made!')
const deployEnvVars = await fetchDeployEnvVars(octokit, inputs.repository, inputs.deployEnvironment)
- setOutputs(deployEnvVars.variables, inputs.outputTo, inputs.envPrefix)
- exitSuccess()
+ setOutputs(deployEnvVars.variables, inputs.outputTo, inputs.envPrefix, inputs.dryRun)
} catch (error) {
setFailed(error as Error)
- exitFailure()
}
+ process.exit()
}
main()
diff --git a/src/output-helper.ts b/src/output-helper.ts
index 8f7f435..1f9f69b 100644
--- a/src/output-helper.ts
+++ b/src/output-helper.ts
@@ -1,24 +1,25 @@
-import {setEnvVar, setOutput, logGroupStart, logGroupEnd, logInfo} from './utils'
-import {RestEndpointMethodTypes} from './github-provider'
+import { setEnvVar, setOutput, logGroupStart, logGroupEnd, logInfo } from './utils'
+import { RestEndpointMethodTypes } from './action-provider'
-export type DeployEnvVars = RestEndpointMethodTypes['actions']['listEnvironmentVariables']['response']['data']['variables']
+export type DeployEnvVars =
+ RestEndpointMethodTypes['actions']['listEnvironmentVariables']['response']['data']['variables']
-export function setOutputs(deployEnvVars: DeployEnvVars, outputTo: string, envPrefix: string): void {
+export function setOutputs(deployEnvVars: DeployEnvVars, outputTo: string, envPrefix: string, dryRun: boolean): void {
if (deployEnvVars.length > 0) {
const logGroupName = 'Setting outputs'
logGroupStart(logGroupName)
if (outputTo === 'action') {
for (const deployEnvVar of deployEnvVars) {
- setOutput(deployEnvVar.name, deployEnvVar.value)
+ setOutput(deployEnvVar.name, deployEnvVar.value, false, dryRun)
}
} else if (outputTo === 'env') {
for (const deployEnvVar of deployEnvVars) {
- setEnvVar(deployEnvVar.name, deployEnvVar.value, envPrefix)
+ setEnvVar(deployEnvVar.name, deployEnvVar.value, envPrefix, false, dryRun)
}
} else {
for (const deployEnvVar of deployEnvVars) {
- setOutput(deployEnvVar.name, deployEnvVar.value)
- setEnvVar(deployEnvVar.name, deployEnvVar.value, envPrefix)
+ setOutput(deployEnvVar.name, deployEnvVar.value, false, dryRun)
+ setEnvVar(deployEnvVar.name, deployEnvVar.value, envPrefix, false, dryRun)
}
}
logGroupEnd(logGroupName)
diff --git a/src/utils.ts b/src/utils.ts
index 1f929a0..e8ccb5c 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -10,6 +10,8 @@ export enum Color {
Yellow = '\x1b[33m',
Blue = '\x1b[34m',
Magenta = '\x1b[35m',
+ Cyan = '\x1b[36m',
+ White = '\x1b[37m',
Reset = '\x1b[0m'
}
@@ -48,7 +50,7 @@ export function logError(message: string): void {
}
export function logDebug(message: string): void {
- core.debug(formatLog(message, Color.Magenta, Emoji.Debug))
+ core.debug(formatLog(message, Color.White, Emoji.Debug))
}
export function logGroupStart(name: string, color = Color.Blue, emoji = Emoji.Group): void {
@@ -61,6 +63,23 @@ export function logGroupEnd(name: string): void {
logDebug(`End '${name}' log group`)
}
+// TODO: tests
+export async function logGroup(
+ name: string,
+ fn: () => Promise,
+ color = Color.Blue,
+ emoji = Emoji.Group
+): Promise {
+ logGroupStart(name, color, emoji)
+ let result: T
+ try {
+ result = await fn()
+ } finally {
+ logGroupEnd(name)
+ }
+ return result
+}
+
// EXIT
export function setFailed(message: string | Error): void {
if (message instanceof Error) {
@@ -80,7 +99,8 @@ export function exitSuccess(): void {
// INPUTS
export function getInputChoice(key: string, defaultChoice: string, choices: string[]): string {
const result = getInputOptional(key, defaultChoice).toLowerCase()
- if (!choices.includes(result)) throw new Error(`'${result}' is not available option for '${key}', possible options: ${choices.join(', ')}`)
+ if (!choices.includes(result))
+ throw new Error(`'${result}' is not available option for '${key}', possible options: ${choices.join(', ')}`)
return result
}
@@ -90,20 +110,26 @@ export function getInputRequired(key: string, defaultValue = ''): string {
return result
}
-export function getInputRepository(key: string, defaultValue = ''): {name: string; repo: {owner: string; repo: string}} | undefined {
+export function getInputRepository(
+ key: string,
+ defaultValue = ''
+): { name: string; repo: { owner: string; repo: string } } | undefined {
const result = getInputOptional(key, defaultValue)
- let repository: {name: string; repo: {owner: string; repo: string}} | undefined
+ let repository: { name: string; repo: { owner: string; repo: string } } | undefined
if (result) {
if (!/^[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+$/.test(result)) {
throw new Error(`Invalid repository format, provided: '${result}', expected: {owner}/{repo}`)
}
- repository = {name: result, repo: {owner: result.split('/')[0], repo: result.split('/')[1]}}
+ const [owner, repo] = result.split('/')
+ repository = { name: result, repo: { owner, repo } }
}
return repository
}
export function getInputOptional(key: string, defaultValue = ''): string {
- return core.getInput(key, {required: false}) || core.getInput(key.replace('-', '_'), {required: false}) || defaultValue
+ return (
+ core.getInput(key, { required: false }) || core.getInput(key.replace('-', '_'), { required: false }) || defaultValue
+ )
}
// core.getBooleanInput is not handling default from code, so let's use own
@@ -113,24 +139,31 @@ export function getInputBoolean(key: string, defaultValue = 'false'): boolean {
const result = getInputOptional(key, defaultValue)
if (trueValue.includes(result)) return true
if (falseValue.includes(result)) return false
- throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${key}\nSupport boolean input list: 'true | True | TRUE | false | False | FALSE'`)
+ throw new TypeError(
+ `Input does not meet YAML 1.2 "Core Schema" specification: ${key}\nSupport boolean input list: 'true | True | TRUE | false | False | FALSE'`
+ )
}
// OUTPUTS
-export function setOutput(key: string, value: string): void {
- logInfo(`Setting '${key}' action output`)
- core.setOutput(key, value)
-}
-
-export function setSecret(value: string): void {
- logInfo('Setting secret')
- core.setSecret(value)
+export function setOutput(key: string, value: string, secret = false, dryRun = false): void {
+ let secretLog = ''
+ if (secret) {
+ core.setSecret(value)
+ secretLog = 'secret '
+ }
+ logInfo(`Setting ${secretLog}'${key}' action output`)
+ if (!dryRun) core.setOutput(key, value)
}
// ENVS
-export function setEnvVar(key: string, value: string, envPrefix = ''): void {
+export function setEnvVar(key: string, value: string, envPrefix = '', secret = false, dryRun = false): void {
envPrefix = envPrefix !== '' ? `${envPrefix.replace(/[^a-z0-9]/gi, '')}__` : ''
const envKey = `${envPrefix}${key}`.toUpperCase()
- logInfo(`Setting '${envKey}' environment variable`)
- core.exportVariable(envKey, value)
+ let secretLog = ''
+ if (secret) {
+ core.setSecret(value)
+ secretLog = 'secret '
+ }
+ logInfo(`Setting ${secretLog}'${envKey}' environment variable`)
+ if (!dryRun) core.exportVariable(envKey, value)
}
diff --git a/tests/action-provider.test.ts b/tests/action-provider.test.ts
new file mode 100644
index 0000000..8e76593
--- /dev/null
+++ b/tests/action-provider.test.ts
@@ -0,0 +1,13 @@
+import { getGitHub, getOctokit } from '../src/action-provider'
+
+describe('action-provider', () => {
+ it('should get GitHub', () => {
+ const github = getGitHub('token')
+ expect(github).toBeDefined()
+ })
+
+ it('should get Octokit', () => {
+ const octokit = getOctokit('token')
+ expect(octokit).toBeDefined()
+ })
+})
diff --git a/tests/fetch-deployenv-vars.test.ts b/tests/fetch-deployenv-vars.test.ts
index 5f4078c..99a23e0 100644
--- a/tests/fetch-deployenv-vars.test.ts
+++ b/tests/fetch-deployenv-vars.test.ts
@@ -1,8 +1,8 @@
-import {getMockOctokit, getMockRequestError} from './helpers'
-import {fetchDeployEnvVars} from '../src/fetch-deployenv-vars'
+import { getMockOctokit, getMockRequestError } from './helpers'
+import { fetchDeployEnvVars } from '../src/fetch-deployenv-vars'
describe('fetch-deployenv-vars', () => {
- const mockRepo = {name: 'test-owner/test-repo', repo: {owner: 'test-owner', repo: 'test-repo'}}
+ const mockRepo = { name: 'test-owner/test-repo', repo: { owner: 'test-owner', repo: 'test-repo' } }
const mockDeployEnvironment = 'test-environment'
beforeEach(() => {
@@ -14,7 +14,7 @@ describe('fetch-deployenv-vars', () => {
const mockOctokit = getMockOctokit({
rest: {
repos: {
- get: jest.fn().mockResolvedValueOnce({status: 200, data: {id: 1}})
+ get: jest.fn().mockResolvedValueOnce({ status: 200, data: { id: 1 } })
},
actions: {
listEnvironmentVariables: jest.fn().mockResolvedValueOnce({
@@ -22,8 +22,8 @@ describe('fetch-deployenv-vars', () => {
data: {
total_count: 2,
variables: [
- {name: 'test-var-1', value: 'test1'},
- {name: 'test-var-2', value: 'test2'}
+ { name: 'test-var-1', value: 'test1' },
+ { name: 'test-var-2', value: 'test2' }
]
}
})
@@ -39,41 +39,45 @@ describe('fetch-deployenv-vars', () => {
const mockOctokit = getMockOctokit({
rest: {
repos: {
- get: jest.fn().mockResolvedValueOnce({status: 200, data: {id: 1}})
+ get: jest.fn().mockResolvedValueOnce({ status: 200, data: { id: 1 } })
},
actions: {
listEnvironmentVariables: jest.fn().mockRejectedValueOnce(getMockRequestError('Not Found', 404))
}
}
})
- await expect(fetchDeployEnvVars(mockOctokit, mockRepo, mockDeployEnvironment)).rejects.toThrowError(`'${mockDeployEnvironment}' environment - 404 Not Found`)
+ await expect(fetchDeployEnvVars(mockOctokit, mockRepo, mockDeployEnvironment)).rejects.toThrow(
+ `Fetch '${mockDeployEnvironment}' Environment variables - 404 Not Found`
+ )
})
it('should throw an error when access to environment forbidden', async () => {
const mockOctokit = getMockOctokit({
rest: {
repos: {
- get: jest.fn().mockResolvedValueOnce({status: 200, data: {id: 1}})
+ get: jest.fn().mockResolvedValueOnce({ status: 200, data: { id: 1 } })
},
actions: {
listEnvironmentVariables: jest.fn().mockRejectedValueOnce(getMockRequestError('Forbidden', 403))
}
}
})
- await expect(fetchDeployEnvVars(mockOctokit, mockRepo, mockDeployEnvironment)).rejects.toThrowError(`'${mockDeployEnvironment}' environment - 403 Forbidden`)
+ await expect(fetchDeployEnvVars(mockOctokit, mockRepo, mockDeployEnvironment)).rejects.toThrow(
+ `Fetch '${mockDeployEnvironment}' Environment variables - 403 Forbidden`
+ )
})
it('should throw an error when unknown error during getting environment variables', async () => {
const mockOctokit = getMockOctokit({
rest: {
repos: {
- get: jest.fn().mockResolvedValueOnce({status: 200, data: {id: 1}})
+ get: jest.fn().mockResolvedValueOnce({ status: 200, data: { id: 1 } })
},
actions: {
listEnvironmentVariables: jest.fn().mockRejectedValueOnce(new Error('Server Error'))
}
}
})
- await expect(fetchDeployEnvVars(mockOctokit, mockRepo, mockDeployEnvironment)).rejects.toThrowError(`Server Error`)
+ await expect(fetchDeployEnvVars(mockOctokit, mockRepo, mockDeployEnvironment)).rejects.toThrow(`Server Error`)
})
})
diff --git a/tests/get-repo.test.ts b/tests/get-repo.test.ts
index 85c5af4..582916d 100644
--- a/tests/get-repo.test.ts
+++ b/tests/get-repo.test.ts
@@ -1,8 +1,8 @@
-import {getMockOctokit, getMockRequestError} from './helpers'
-import {getRepo} from '../src/get-repo'
+import { getMockOctokit, getMockRequestError } from './helpers'
+import { getRepo } from '../src/get-repo'
describe('get-repo', () => {
- const mockRepo = {name: 'test-owner/test-repo', repo: {owner: 'test-owner', repo: 'test-repo'}}
+ const mockRepo = { name: 'test-owner/test-repo', repo: { owner: 'test-owner', repo: 'test-repo' } }
beforeEach(() => {
jest.clearAllMocks()
@@ -13,7 +13,7 @@ describe('get-repo', () => {
const octokit = getMockOctokit({
rest: {
repos: {
- get: jest.fn().mockResolvedValueOnce({status: 200, data: {id: 1}})
+ get: jest.fn().mockResolvedValueOnce({ status: 200, data: { id: 1 } })
}
}
})
@@ -29,7 +29,7 @@ describe('get-repo', () => {
}
}
})
- await expect(getRepo(mockOctokit, mockRepo)).rejects.toThrowError(`'${mockRepo.name}' repository - 404 Not Found`)
+ await expect(getRepo(mockOctokit, mockRepo)).rejects.toThrow(`Get '${mockRepo.name}' Repository - 404 Not Found`)
})
it('should throw an error when access to repository forbidden', async () => {
@@ -40,7 +40,7 @@ describe('get-repo', () => {
}
}
})
- await expect(getRepo(mockOctokit, mockRepo)).rejects.toThrowError(`'${mockRepo.name}' repository - 403 Forbidden`)
+ await expect(getRepo(mockOctokit, mockRepo)).rejects.toThrow(`Get '${mockRepo.name}' Repository - 403 Forbidden`)
})
it('should throw an error when unknown error during getting repository', async () => {
@@ -51,6 +51,6 @@ describe('get-repo', () => {
}
}
})
- await expect(getRepo(mockOctokit, mockRepo)).rejects.toThrowError(`Server Error`)
+ await expect(getRepo(mockOctokit, mockRepo)).rejects.toThrow(`Server Error`)
})
})
diff --git a/tests/helpers.ts b/tests/helpers.ts
index 598463f..cc1e1fb 100644
--- a/tests/helpers.ts
+++ b/tests/helpers.ts
@@ -1,4 +1,8 @@
-import {Octokit, RequestError, RequestMethod} from '../src/github-provider'
+import { Octokit, GitHub, RequestError, RequestMethod } from '../src/action-provider'
+
+export function getMockGitHub(octokitMock: any): GitHub {
+ return octokitMock as GitHub
+}
export function getMockOctokit(octokitMock: any): Octokit {
return octokitMock as Octokit
@@ -6,7 +10,7 @@ export function getMockOctokit(octokitMock: any): Octokit {
export function getMockRequestError(message: string, status: number, method: RequestMethod = 'GET'): RequestError {
return new RequestError(message, status, {
- response: {data: {message}, headers: {}, status, url: 'https://test'},
- request: {method, url: 'https://test', headers: {}}
+ response: { data: { message }, headers: {}, status, url: 'https://test' },
+ request: { method, url: 'https://test', headers: {} }
})
}
diff --git a/tests/input-helper.test.ts b/tests/input-helper.test.ts
index a7c8fc9..5cda9f8 100644
--- a/tests/input-helper.test.ts
+++ b/tests/input-helper.test.ts
@@ -1,8 +1,8 @@
import * as utils from '../src/utils'
-import {getGitHubToken, getInputs} from '../src/input-helper'
+import { getGitHubToken, getInputs } from '../src/input-helper'
describe('input-helper', () => {
- const mockRepo = {name: 'test-owner/test-repo', repo: {owner: 'test-owner', repo: 'test-repo'}}
+ const mockRepo = { name: 'test-owner/test-repo', repo: { owner: 'test-owner', repo: 'test-repo' } }
let mockInputs = {} as any
jest.spyOn(utils.core, 'getInput').mockImplementation((name: string) => {
return mockInputs[name]
@@ -32,10 +32,11 @@ describe('input-helper', () => {
mockInputs['environment'] = 'test'
const inputs = getInputs(mockRepo)
expect(inputs).toEqual({
- repository: {name: 'test-owner/test-repo', repo: {owner: 'test-owner', repo: 'test-repo'}},
+ repository: { name: 'test-owner/test-repo', repo: { owner: 'test-owner', repo: 'test-repo' } },
outputTo: 'all',
envPrefix: '',
- deployEnvironment: 'test'
+ deployEnvironment: 'test',
+ dryRun: false
})
})
@@ -44,12 +45,14 @@ describe('input-helper', () => {
mockInputs['repository'] = 'test/test'
mockInputs['output-to'] = 'env'
mockInputs['env-prefix'] = 'test'
+ mockInputs['dry-run'] = 'true'
const inputs = getInputs(mockRepo)
expect(inputs).toEqual({
- repository: {name: 'test/test', repo: {owner: 'test', repo: 'test'}},
+ repository: { name: 'test/test', repo: { owner: 'test', repo: 'test' } },
outputTo: 'env',
envPrefix: 'test',
- deployEnvironment: 'test'
+ deployEnvironment: 'test',
+ dryRun: true
})
})
})
diff --git a/tests/output-helper.test.ts b/tests/output-helper.test.ts
index 1185666..073e9bc 100644
--- a/tests/output-helper.test.ts
+++ b/tests/output-helper.test.ts
@@ -1,12 +1,12 @@
import * as utils from '../src/utils'
-import {setOutputs, DeployEnvVars} from '../src/output-helper'
+import { setOutputs, DeployEnvVars } from '../src/output-helper'
describe('output-helper', () => {
const setOutputSpy = jest.spyOn(utils, 'setOutput').mockImplementation(jest.fn())
const setEnvVarSpy = jest.spyOn(utils, 'setEnvVar').mockImplementation(jest.fn())
const mockDeployEnvVars: DeployEnvVars = [
- {name: 'test1', value: 'test1', created_at: '2020-01-01T00:00:00Z', updated_at: '2020-01-01T00:00:00Z'},
- {name: 'test2', value: 'test2', created_at: '2020-01-01T00:00:00Z', updated_at: '2020-01-01T00:00:00Z'}
+ { name: 'test1', value: 'test1', created_at: '2020-01-01T00:00:00Z', updated_at: '2020-01-01T00:00:00Z' },
+ { name: 'test2', value: 'test2', created_at: '2020-01-01T00:00:00Z', updated_at: '2020-01-01T00:00:00Z' }
]
beforeEach(() => {
@@ -19,25 +19,25 @@ describe('output-helper', () => {
})
it('should set only action outputs', () => {
- setOutputs(mockDeployEnvVars, 'action', '')
+ setOutputs(mockDeployEnvVars, 'action', '', false)
expect(setOutputSpy).toHaveBeenCalledTimes(2)
expect(setEnvVarSpy).toHaveBeenCalledTimes(0)
})
it('should set only environment variables - no prefix', () => {
- setOutputs(mockDeployEnvVars, 'env', '')
+ setOutputs(mockDeployEnvVars, 'env', '', false)
expect(setOutputSpy).toHaveBeenCalledTimes(0)
expect(setEnvVarSpy).toHaveBeenCalledTimes(2)
})
it('should set only environment variables - with prefix', () => {
- setOutputs(mockDeployEnvVars, 'env', 'test')
+ setOutputs(mockDeployEnvVars, 'env', 'test', false)
expect(setOutputSpy).toHaveBeenCalledTimes(0)
expect(setEnvVarSpy).toHaveBeenCalledTimes(2)
})
it('should set action outputs and environment variables', () => {
- setOutputs(mockDeployEnvVars, 'all', '')
+ setOutputs(mockDeployEnvVars, 'all', '', false)
expect(setOutputSpy).toHaveBeenCalledTimes(2)
expect(setEnvVarSpy).toHaveBeenCalledTimes(2)
})
@@ -45,7 +45,7 @@ describe('output-helper', () => {
it('should end log group', () => {
const logInfoSpy = jest.spyOn(utils, 'logInfo').mockImplementation(jest.fn())
- setOutputs([], 'all', '')
+ setOutputs([], 'all', '', false)
expect(logInfoSpy).toHaveBeenCalledTimes(1)
expect(logInfoSpy).toHaveBeenCalledWith('No variables to set')
})
diff --git a/tests/utils.test.ts b/tests/utils.test.ts
index 4796e50..1a8761e 100644
--- a/tests/utils.test.ts
+++ b/tests/utils.test.ts
@@ -42,7 +42,9 @@ describe('utils', () => {
it('should log WARNING', () => {
jest.spyOn(utils.core, 'warning').mockImplementation(jest.fn())
utils.logWarning('test')
- expect(utils.core.warning).toHaveBeenCalledWith(`${utils.Color.Yellow}${utils.Emoji.Warning} test${utils.Color.Reset}`)
+ expect(utils.core.warning).toHaveBeenCalledWith(
+ `${utils.Color.Yellow}${utils.Emoji.Warning} test${utils.Color.Reset}`
+ )
})
it('should log ERROR', () => {
@@ -54,13 +56,15 @@ describe('utils', () => {
it('should log DEBUG', () => {
jest.spyOn(utils.core, 'debug').mockImplementation(jest.fn())
utils.logDebug('test')
- expect(utils.core.debug).toHaveBeenCalledWith(`${utils.Color.Magenta}${utils.Emoji.Debug} test${utils.Color.Reset}`)
+ expect(utils.core.debug).toHaveBeenCalledWith(`${utils.Color.White}${utils.Emoji.Debug} test${utils.Color.Reset}`)
})
it('should start log group', () => {
jest.spyOn(utils.core, 'startGroup').mockImplementation(jest.fn())
utils.logGroupStart('test')
- expect(utils.core.startGroup).toHaveBeenCalledWith(`${utils.Color.Blue}${utils.Emoji.Group} test${utils.Color.Reset} expand for details...`)
+ expect(utils.core.startGroup).toHaveBeenCalledWith(
+ `${utils.Color.Blue}${utils.Emoji.Group} test${utils.Color.Reset} expand for details...`
+ )
})
it('should end log group', () => {
@@ -70,6 +74,16 @@ describe('utils', () => {
expect(utils.core.endGroup).toHaveBeenCalledWith()
})
+ it('should star/end log group', async () => {
+ // jest.spyOn(utils, 'logGroupStart').mockImplementation(jest.fn())
+ // jest.spyOn(utils, 'logGroupEnd').mockImplementation(jest.fn())
+ await expect(
+ utils.logGroup('Test', async () => {
+ return
+ })
+ ).resolves.toBeUndefined()
+ })
+
// EXIT
it('should set failed - string', () => {
jest.spyOn(utils.core, 'setFailed').mockImplementation(jest.fn())
@@ -89,7 +103,7 @@ describe('utils', () => {
})
expect(() => {
utils.exitFailure()
- }).toThrowError('process.exit called with "1"')
+ }).toThrow('process.exit called with "1"')
expect(mockExit).toHaveBeenCalledWith(utils.core.ExitCode.Failure)
})
@@ -99,13 +113,13 @@ describe('utils', () => {
})
expect(() => {
utils.exitSuccess()
- }).toThrowError('process.exit called with "0"')
+ }).toThrow('process.exit called with "0"')
expect(mockExit).toHaveBeenCalledWith(utils.core.ExitCode.Success)
})
// INPUTS
it('should get input choice - input supplied', () => {
- mockInputs = {test: 'foo'}
+ mockInputs = { test: 'foo' }
expect(utils.getInputChoice('test', 'bar', ['foo', 'bar'])).toEqual('foo')
})
@@ -114,25 +128,25 @@ describe('utils', () => {
})
it('should get input choice - input invalid', () => {
- mockInputs = {test: 'invalid'}
+ mockInputs = { test: 'invalid' }
expect(() => {
utils.getInputChoice('test', 'bar', ['foo', 'bar'])
- }).toThrowError(`'invalid' is not available option for 'test', possible options: foo, bar`)
+ }).toThrow(`'invalid' is not available option for 'test', possible options: foo, bar`)
})
it('should get required input - input supplied', () => {
- mockInputs = {test: 'foo'}
+ mockInputs = { test: 'foo' }
expect(utils.getInputRequired('test')).toEqual('foo')
})
it('should throw an error when required input not supplied', () => {
expect(() => {
utils.getInputRequired('test')
- }).toThrowError(`'test' input required and not supplied or empty`)
+ }).toThrow(`'test' input required and not supplied or empty`)
})
it('should get optional input - input supplied', () => {
- mockInputs = {test: 'foo'}
+ mockInputs = { test: 'foo' }
expect(utils.getInputOptional('test')).toEqual('foo')
})
@@ -145,12 +159,12 @@ describe('utils', () => {
})
it('should get boolean input - true', () => {
- mockInputs = {test: 'true'}
+ mockInputs = { test: 'true' }
expect(utils.getInputBoolean('test')).toEqual(true)
})
it('should get boolean input - false', () => {
- mockInputs = {test: 'false'}
+ mockInputs = { test: 'false' }
expect(utils.getInputBoolean('test')).toEqual(false)
})
@@ -159,26 +173,26 @@ describe('utils', () => {
})
it('should get boolean input - invalid', () => {
- mockInputs = {test: 'invalid'}
+ mockInputs = { test: 'invalid' }
expect(() => {
utils.getInputBoolean('test')
- }).toThrowError(/Input does not meet YAML 1.2 "Core Schema" specification/)
+ }).toThrow(/Input does not meet YAML 1.2 "Core Schema" specification/)
})
// getInputRepository
it('should get repository input - input supplied', () => {
- mockInputs = {test: 'test/test'}
+ mockInputs = { test: 'test/test' }
expect(utils.getInputRepository('test')).toEqual({
name: 'test/test',
- repo: {owner: 'test', repo: 'test'}
+ repo: { owner: 'test', repo: 'test' }
})
})
it('should throw an error when repository has invalid format', () => {
- mockInputs = {test: 'invalid'}
+ mockInputs = { test: 'invalid' }
expect(() => {
utils.getInputRepository('test')
- }).toThrowError(`Invalid repository format, provided: 'invalid', expected: {owner}/{repo}`)
+ }).toThrow(`Invalid repository format, provided: 'invalid', expected: {owner}/{repo}`)
})
it('should get undefined repository', () => {
@@ -192,10 +206,18 @@ describe('utils', () => {
expect(utils.core.setOutput).toHaveBeenCalledWith('test', 'foo')
})
- it('should set secret', () => {
+ it('should set secret output', () => {
+ jest.spyOn(utils.core, 'setOutput').mockImplementation(jest.fn())
jest.spyOn(utils.core, 'setSecret').mockImplementation(jest.fn())
- utils.setSecret('test')
- expect(utils.core.setSecret).toHaveBeenCalledWith('test')
+ utils.setOutput('test', 'foo', true)
+ expect(utils.core.setSecret).toHaveBeenCalledWith('foo')
+ expect(utils.core.setOutput).toHaveBeenCalledWith('test', 'foo')
+ })
+
+ it('should not set output - dry-run', () => {
+ jest.spyOn(utils.core, 'setOutput').mockImplementation(jest.fn())
+ utils.setOutput('test', 'foo', false, true)
+ expect(utils.core.setOutput).toHaveBeenCalledTimes(0)
})
// ENV
@@ -210,4 +232,18 @@ describe('utils', () => {
utils.setEnvVar('test', 'foo', 'bar')
expect(utils.core.exportVariable).toHaveBeenCalledWith('BAR__TEST', 'foo')
})
+
+ it('should set secret env var', () => {
+ jest.spyOn(utils.core, 'exportVariable').mockImplementation(jest.fn())
+ jest.spyOn(utils.core, 'setSecret').mockImplementation(jest.fn())
+ utils.setEnvVar('test', 'foo', '', true)
+ expect(utils.core.setSecret).toHaveBeenCalledWith('foo')
+ expect(utils.core.exportVariable).toHaveBeenCalledWith('TEST', 'foo')
+ })
+
+ it('should not set env var - dry-run', () => {
+ jest.spyOn(utils.core, 'exportVariable').mockImplementation(jest.fn())
+ utils.setEnvVar('test', 'foo', '', false, true)
+ expect(utils.core.exportVariable).toHaveBeenCalledTimes(0)
+ })
})
diff --git a/tsconfig.json b/tsconfig.json
index f3946a8..9bdbdc3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,14 +1,15 @@
{
- "extends": "@tsconfig/node16/tsconfig.json",
+ "extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
- "target": "es2018",
- "module": "commonjs",
- "outDir": "./lib",
- "strict": true,
+ "lib": [
+ "ES2020"
+ ],
+ "module": "ES2020",
+ "target": "ES2020",
+ "outDir": "./dist",
"noImplicitAny": true,
- "esModuleInterop": true,
- "forceConsistentCasingInFileNames": true,
- "noEmit": true
+ "noEmit": true,
+ "sourceMap": true
},
"exclude": [
"node_modules"