Compare commits

..

1 Commits

Author SHA1 Message Date
GitHub Action
1a275c3b69 build 2025-08-19 20:52:26 +00:00
9 changed files with 30691 additions and 436 deletions

View File

@@ -13,7 +13,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 #v10.1.0 - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 #v9.1.0
name: Setting issue as idle name: Setting issue as idle
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -24,7 +24,7 @@ jobs:
operations-per-run: 100 operations-per-run: 100
exempt-issue-labels: 'backlog' exempt-issue-labels: 'backlog'
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 #v10.1.0 - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 #v9.1.0
name: Setting PR as idle name: Setting PR as idle
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -23,7 +23,7 @@ jobs:
PR_BASE_REF: ${{ github.event.pull_request.base.ref }} PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
steps: steps:
- name: Check out repository - name: Check out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: npm install and build - name: npm install and build
id: action-npm-build id: action-npm-build
run: | run: |
@@ -80,7 +80,12 @@ jobs:
env: env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
HELM_LATEST=$(curl -s https://get.helm.sh/helm-latest-version) HELM_LATEST=$(gh release list \
--repo helm/helm \
--exclude-drafts \
--exclude-pre-releases \
--json name,isLatest \
--jq '.[] | select(.isLatest)|.name' | awk '{print $2}')
if [[ $(helm version) != *$HELM_LATEST* ]]; then if [[ $(helm version) != *$HELM_LATEST* ]]; then
echo "HELM VERSION INCORRECT: HELM VERSION DOES NOT CONTAIN $HELM_LATEST" echo "HELM VERSION INCORRECT: HELM VERSION DOES NOT CONTAIN $HELM_LATEST"

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Enforce Prettier - name: Enforce Prettier
run: npx prettier --check . run: npx prettier --check .

View File

@@ -23,7 +23,7 @@ jobs:
fail-fast: false fail-fast: false
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run L0 tests. - name: Run L0 tests.
run: | run: |

3
.gitignore vendored
View File

@@ -11,8 +11,6 @@ pids
*.seed *.seed
*.pid.lock *.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul # Coverage directory used by tools like istanbul
coverage coverage
@@ -64,4 +62,3 @@ node_modules
coverage coverage
# Transpiled JS # Transpiled JS
lib/

30268
lib/index.js Normal file

File diff suppressed because one or more lines are too long

787
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
"@actions/io": "^1.1.2", "@actions/io": "^1.1.2",
"@actions/tool-cache": "2.0.2", "@actions/tool-cache": "2.0.2",
"@octokit/action": "^8.0.2", "@octokit/action": "^8.0.2",
"semver": "^7.7.3" "semver": "^7.7.2"
}, },
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
@@ -24,12 +24,12 @@
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.8.1", "@types/node": "^24.2.1",
"@vercel/ncc": "^0.38.4", "@vercel/ncc": "^0.38.3",
"husky": "^9.1.7", "husky": "^9.1.7",
"jest": "^30.2.0", "jest": "^30.0.5",
"prettier": "^3.6.2", "prettier": "^3.6.2",
"ts-jest": "^29.4.5", "ts-jest": "^29.4.1",
"typescript": "^5.9.3" "typescript": "^5.9.2"
} }
} }

View File

@@ -108,20 +108,20 @@ describe('run.ts', () => {
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => { jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
if (file == 'mainFolder') if (file == 'mainFolder')
return [ return [
'file1' as unknown as fs.Dirent<NonSharedBuffer>, 'file1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'file2' as unknown as fs.Dirent<NonSharedBuffer>, 'file2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'folder1' as unknown as fs.Dirent<NonSharedBuffer>, 'folder1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'folder2' as unknown as fs.Dirent<NonSharedBuffer> 'folder2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
] ]
if (file == path.join('mainFolder', 'folder1')) if (file == path.join('mainFolder', 'folder1'))
return [ return [
'file11' as unknown as fs.Dirent<NonSharedBuffer>, 'file11' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'file12' as unknown as fs.Dirent<NonSharedBuffer> 'file12' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
] ]
if (file == path.join('mainFolder', 'folder2')) if (file == path.join('mainFolder', 'folder2'))
return [ return [
'file21' as unknown as fs.Dirent<NonSharedBuffer>, 'file21' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'file22' as unknown as fs.Dirent<NonSharedBuffer> 'file22' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
] ]
return [] return []
}) })
@@ -143,20 +143,20 @@ describe('run.ts', () => {
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => { jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
if (file == 'mainFolder') if (file == 'mainFolder')
return [ return [
'file1' as unknown as fs.Dirent<NonSharedBuffer>, 'file1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'file2' as unknown as fs.Dirent<NonSharedBuffer>, 'file2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'folder1' as unknown as fs.Dirent<NonSharedBuffer>, 'folder1' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'folder2' as unknown as fs.Dirent<NonSharedBuffer> 'folder2' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
] ]
if (file == path.join('mainFolder', 'folder1')) if (file == path.join('mainFolder', 'folder1'))
return [ return [
'file11' as unknown as fs.Dirent<NonSharedBuffer>, 'file11' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'file12' as unknown as fs.Dirent<NonSharedBuffer> 'file12' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
] ]
if (file == path.join('mainFolder', 'folder2')) if (file == path.join('mainFolder', 'folder2'))
return [ return [
'file21' as unknown as fs.Dirent<NonSharedBuffer>, 'file21' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>,
'file22' as unknown as fs.Dirent<NonSharedBuffer> 'file22' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
] ]
return [] return []
}) })
@@ -176,7 +176,7 @@ describe('run.ts', () => {
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}) jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => { jest.spyOn(fs, 'readdirSync').mockImplementation((file, _) => {
if (file == 'mainFolder') if (file == 'mainFolder')
return ['helm.exe' as unknown as fs.Dirent<NonSharedBuffer>] return ['helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>]
return [] return []
}) })
jest.spyOn(fs, 'statSync').mockImplementation((file) => { jest.spyOn(fs, 'statSync').mockImplementation((file) => {
@@ -220,7 +220,7 @@ describe('run.ts', () => {
jest jest
.spyOn(fs, 'readdirSync') .spyOn(fs, 'readdirSync')
.mockImplementation((file, _) => [ .mockImplementation((file, _) => [
'helm.exe' as unknown as fs.Dirent<NonSharedBuffer> 'helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
]) ])
jest.spyOn(fs, 'statSync').mockImplementation((file) => { jest.spyOn(fs, 'statSync').mockImplementation((file) => {
const isDirectory = const isDirectory =
@@ -269,7 +269,9 @@ describe('run.ts', () => {
jest.spyOn(fs, 'chmodSync').mockImplementation(() => {}) jest.spyOn(fs, 'chmodSync').mockImplementation(() => {})
jest jest
.spyOn(fs, 'readdirSync') .spyOn(fs, 'readdirSync')
.mockReturnValue(['helm.exe' as unknown as fs.Dirent<NonSharedBuffer>]) .mockReturnValue([
'helm.exe' as unknown as fs.Dirent<Buffer<ArrayBufferLike>>
])
jest.spyOn(fs, 'statSync').mockImplementation((file) => { jest.spyOn(fs, 'statSync').mockImplementation((file) => {
const isDirectory = const isDirectory =
(file as string).indexOf('folder') == -1 ? false : true (file as string).indexOf('folder') == -1 ? false : true