mirror of
https://github.com/azure/setup-kubectl.git
synced 2026-12-01 19:31:54 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 17b39b2181 | |||
| 2f78f07497 | |||
| 5cbd56a156 | |||
| 055d6cc5ff | |||
| ea19a5a5af | |||
| 70dd817170 | |||
| 91c7e1a013 | |||
| e1ae434a6a | |||
| e122dbb2d1 | |||
| a29a84f479 | |||
| ce38e9c621 |
@@ -59,7 +59,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
|
||||
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
@@ -86,6 +86,6 @@ jobs:
|
||||
echo ' make release'
|
||||
exit 1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
|
||||
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
category: '/language:${{matrix.language}}'
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
rm -rf node_modules
|
||||
fi
|
||||
|
||||
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
||||
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
cache: 'npm'
|
||||
|
||||
@@ -11,6 +11,30 @@ Acceptable values are latest or any semantic version string like `v1.15.0`. Use
|
||||
id: install
|
||||
```
|
||||
|
||||
Alternatively, read the kubectl version from an
|
||||
[asdf/mise `.tool-versions` file](https://asdf-vm.com/manage/configuration.html):
|
||||
|
||||
```yaml
|
||||
- uses: azure/setup-kubectl@v5
|
||||
with:
|
||||
version-file: '.tool-versions'
|
||||
id: install
|
||||
```
|
||||
|
||||
The kubectl entry may use `major.minor`, `major.minor.patch`, an optional `v`
|
||||
prefix, or `latest`:
|
||||
|
||||
```text
|
||||
kubectl 1.31.2
|
||||
```
|
||||
|
||||
If the file contains several `kubectl` entries, the first one is used. The file
|
||||
must be a regular file (not a symbolic link) of at most 64 KiB.
|
||||
|
||||
When both inputs are set, a specific `version` other than `latest` takes
|
||||
precedence and the action emits a warning. The default `version: latest` allows
|
||||
`version-file` to select the version.
|
||||
|
||||
Refer to the action metadata file for details about all the inputs https://github.com/Azure/setup-kubectl/blob/main/action.yml
|
||||
|
||||
# Contributing
|
||||
|
||||
+4
-1
@@ -3,8 +3,11 @@ description: 'Install a specific version of kubectl binary. Acceptable values ar
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version of kubectl'
|
||||
required: true
|
||||
required: false
|
||||
default: 'latest'
|
||||
version-file:
|
||||
description: 'Path to a .tool-versions (asdf/mise) file to read the kubectl version from. A specific version other than latest takes precedence.'
|
||||
required: false
|
||||
downloadBaseURL:
|
||||
description: 'Base URL to download kubectl from (https only). Use for private mirrors.'
|
||||
required: false
|
||||
|
||||
Generated
+152
-170
@@ -15,12 +15,12 @@
|
||||
"@actions/tool-cache": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^26.4.1",
|
||||
"@types/node": "^26.6.6",
|
||||
"esbuild": "^0.28.2",
|
||||
"husky": "^9.1.7",
|
||||
"prettier": "3.9.6",
|
||||
"prettier": "3.9.10",
|
||||
"typescript": "7.0.2",
|
||||
"vitest": "^5.0.0"
|
||||
"vitest": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
@@ -542,9 +542,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-project/types": {
|
||||
"version": "0.148.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.148.0.tgz",
|
||||
"integrity": "sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A==",
|
||||
"version": "0.156.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz",
|
||||
"integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
@@ -553,9 +553,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm-eabi": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.7.tgz",
|
||||
"integrity": "sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz",
|
||||
"integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -571,9 +571,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm64": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.7.tgz",
|
||||
"integrity": "sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz",
|
||||
"integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -589,9 +589,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-arm64": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.7.tgz",
|
||||
"integrity": "sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz",
|
||||
"integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -607,9 +607,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-x64": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.7.tgz",
|
||||
"integrity": "sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz",
|
||||
"integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -625,9 +625,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-freebsd-x64": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.7.tgz",
|
||||
"integrity": "sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz",
|
||||
"integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -643,9 +643,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.7.tgz",
|
||||
"integrity": "sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz",
|
||||
"integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -661,9 +661,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-gnu": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.7.tgz",
|
||||
"integrity": "sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz",
|
||||
"integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -682,9 +682,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-musl": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.7.tgz",
|
||||
"integrity": "sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz",
|
||||
"integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -703,9 +703,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-ppc64-gnu": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.7.tgz",
|
||||
"integrity": "sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz",
|
||||
"integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -724,9 +724,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-s390x-gnu": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.7.tgz",
|
||||
"integrity": "sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz",
|
||||
"integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -745,9 +745,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-gnu": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.7.tgz",
|
||||
"integrity": "sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz",
|
||||
"integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -766,9 +766,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-musl": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.7.tgz",
|
||||
"integrity": "sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz",
|
||||
"integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -787,9 +787,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-openharmony-arm64": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.7.tgz",
|
||||
"integrity": "sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz",
|
||||
"integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -805,9 +805,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-arm64-msvc": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.7.tgz",
|
||||
"integrity": "sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz",
|
||||
"integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -823,9 +823,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-x64-msvc": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.7.tgz",
|
||||
"integrity": "sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz",
|
||||
"integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -867,20 +867,20 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
|
||||
"integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz",
|
||||
"integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "26.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.1.tgz",
|
||||
"integrity": "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==",
|
||||
"version": "26.6.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
|
||||
"integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~8.3.0"
|
||||
"undici-types": "~8.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript/typescript-aix-ppc64": {
|
||||
@@ -1224,22 +1224,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/mocker": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.0.0.tgz",
|
||||
"integrity": "sha512-66PGTMIiVJP3t4a5yxU9qPtf7MdTBs8jmToMvy+HVflB3Yy13WJZTtPePdvU+wjRV02SKK5doLbSA6o9pwOmiA==",
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.0.tgz",
|
||||
"integrity": "sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "0.3.31",
|
||||
"@vitest/spy": "5.0.0",
|
||||
"@vitest/spy": "5.1.0",
|
||||
"estree-walker": "^3.0.3",
|
||||
"magic-string": "^1.2.3"
|
||||
"magic-string": "^1.4.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/vitest"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"msw": "^2.4.9",
|
||||
"msw": "^2.4.9 || ^3.0.0",
|
||||
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@@ -1252,9 +1252,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/spy": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.0.0.tgz",
|
||||
"integrity": "sha512-uy+luWBAPw9XfthoHi5AkfHUnuPYEESjl0p/r+meoBnU8bxg5GDQ3Ey8MjcJ6sqahkL4PFyrvfMJJBw7LbU06g==",
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.0.tgz",
|
||||
"integrity": "sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
@@ -1272,9 +1272,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/chai": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz",
|
||||
"integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==",
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz",
|
||||
"integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -1697,19 +1697,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.2.3.tgz",
|
||||
"integrity": "sha512-Bpb0W2TbLKOZ7vJnOUnVRGq3WL2p+ISV29M6hYPL1AFCpyKZpdr5ytiXoTSSxRVhg8YW7f65+6gbG8WG6PCa/g==",
|
||||
"version": "1.4.5",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz",
|
||||
"integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.5.5"
|
||||
"@jridgewell/sourcemap-codec": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.18",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
|
||||
"integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
|
||||
"version": "3.3.20",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
|
||||
"integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1727,9 +1727,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/obug": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz",
|
||||
"integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz",
|
||||
"integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
"https://github.com/sponsors/sxzz",
|
||||
@@ -1762,9 +1762,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.28",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",
|
||||
"integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",
|
||||
"version": "8.5.32",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz",
|
||||
"integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1783,18 +1783,18 @@
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.18",
|
||||
"nanoid": "^3.3.20",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
"source-map-js": "^1.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.9.6",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz",
|
||||
"integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==",
|
||||
"version": "3.9.10",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz",
|
||||
"integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -1808,14 +1808,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.7.tgz",
|
||||
"integrity": "sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig==",
|
||||
"version": "1.2.16",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.16.tgz",
|
||||
"integrity": "sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@oxc-project/types": "=0.148.0",
|
||||
"@oxc-project/types": "=0.156.0",
|
||||
"@rolldown/pluginutils": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
@@ -1825,21 +1825,21 @@
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rolldown/binding-android-arm-eabi": "1.2.7",
|
||||
"@rolldown/binding-android-arm64": "1.2.7",
|
||||
"@rolldown/binding-darwin-arm64": "1.2.7",
|
||||
"@rolldown/binding-darwin-x64": "1.2.7",
|
||||
"@rolldown/binding-freebsd-x64": "1.2.7",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.2.7",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.2.7",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.2.7",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.2.7",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.2.7",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.2.7",
|
||||
"@rolldown/binding-linux-x64-musl": "1.2.7",
|
||||
"@rolldown/binding-openharmony-arm64": "1.2.7",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.2.7",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.2.7"
|
||||
"@rolldown/binding-android-arm-eabi": "1.2.16",
|
||||
"@rolldown/binding-android-arm64": "1.2.16",
|
||||
"@rolldown/binding-darwin-arm64": "1.2.16",
|
||||
"@rolldown/binding-darwin-x64": "1.2.16",
|
||||
"@rolldown/binding-freebsd-x64": "1.2.16",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.2.16",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.2.16",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.2.16",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.2.16",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.2.16",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.2.16",
|
||||
"@rolldown/binding-linux-x64-musl": "1.2.16",
|
||||
"@rolldown/binding-openharmony-arm64": "1.2.16",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.2.16",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.2.16"
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
@@ -1854,17 +1854,10 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/siginfo": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
|
||||
"integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
|
||||
"integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"peer": true,
|
||||
@@ -1872,24 +1865,17 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stackback": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
|
||||
"integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/std-env": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz",
|
||||
"integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==",
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz",
|
||||
"integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tinybench": {
|
||||
"version": "6.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.1.4.tgz",
|
||||
"integrity": "sha512-9APumHG7r4yOk4X4WlkmE71aZcv1gvin1czO3OQ1U9iJcFA5Ja/ygyb0vPOVHTthFozUYs8CLoLUlM8grb2lTQ==",
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.2.tgz",
|
||||
"integrity": "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -1897,9 +1883,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tinyexec": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz",
|
||||
"integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz",
|
||||
"integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -1968,33 +1954,33 @@
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "6.28.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz",
|
||||
"integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==",
|
||||
"version": "6.29.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
|
||||
"integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
|
||||
"integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
|
||||
"version": "8.9.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
|
||||
"integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz",
|
||||
"integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==",
|
||||
"version": "8.3.6",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.6.tgz",
|
||||
"integrity": "sha512-UI7dK29NnS54Fk+mmo7o+jI6U8Fp7hDl+X5Q1k45WH+d4dSlbLVUETGQ+hfkNgvLQGyoElPj837nZyv4MBc0VA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"lightningcss": "^1.33.0",
|
||||
"picomatch": "^4.0.5",
|
||||
"postcss": "^8.5.26",
|
||||
"rolldown": "~1.2.4",
|
||||
"picomatch": "^4.0.7",
|
||||
"postcss": "^8.5.32",
|
||||
"rolldown": "~1.2.16",
|
||||
"tinyglobby": "^0.2.17"
|
||||
},
|
||||
"bin": {
|
||||
@@ -2011,7 +1997,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "^20.19.0 || >=22.12.0",
|
||||
"@vitejs/devtools": "^0.4.0 || ^0.5.0",
|
||||
"@vitejs/devtools": "^0.7.1 || ^0.8.0",
|
||||
"esbuild": "^0.27.0 || ^0.28.0",
|
||||
"jiti": ">=1.21.0",
|
||||
"less": "^4.0.0",
|
||||
@@ -2063,25 +2049,25 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vitest": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-5.0.0.tgz",
|
||||
"integrity": "sha512-gpsMNoRhMjMktVxPtstOH4/PJuPyovVaMDr4oDilXaGH1EcqM2OE96SoHT2VIQ6fTGtTjqmHDrEu2X9RQiXf8Q==",
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.0.tgz",
|
||||
"integrity": "sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/chai": "^5.2.2",
|
||||
"@vitest/mocker": "5.0.0",
|
||||
"chai": "^6.2.2",
|
||||
"@vitest/mocker": "5.1.0",
|
||||
"chai": "^6.3.0",
|
||||
"es-module-lexer": "^2.3.2",
|
||||
"expect-type": "^1.4.0",
|
||||
"magic-string": "^1.2.3",
|
||||
"obug": "^2.1.4",
|
||||
"magic-string": "^1.4.3",
|
||||
"obug": "^3.0.0",
|
||||
"picomatch": "^4.0.7",
|
||||
"std-env": "^4.2.0",
|
||||
"tinybench": "6.1.4",
|
||||
"tinyexec": "1.3.0",
|
||||
"std-env": "^4.3.0",
|
||||
"tinybench": "^6.2.2",
|
||||
"tinyexec": "^1.3.1",
|
||||
"tinyglobby": "^0.2.17",
|
||||
"why-is-node-running": "^2.3.0"
|
||||
"why-is-node-running": "3.2.1"
|
||||
},
|
||||
"bin": {
|
||||
"vitest": "vitest.mjs"
|
||||
@@ -2096,12 +2082,12 @@
|
||||
"@edge-runtime/vm": "*",
|
||||
"@opentelemetry/api": "^1.9.0",
|
||||
"@types/node": "^22.0.0 || >=24.0.0",
|
||||
"@vitest/browser-playwright": "5.0.0",
|
||||
"@vitest/browser-preview": "5.0.0",
|
||||
"@vitest/browser-playwright": "5.1.0",
|
||||
"@vitest/browser-preview": "5.1.0",
|
||||
"@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0",
|
||||
"@vitest/coverage-istanbul": "5.0.0",
|
||||
"@vitest/coverage-v8": "5.0.0",
|
||||
"@vitest/ui": "5.0.0",
|
||||
"@vitest/coverage-istanbul": "5.1.0",
|
||||
"@vitest/coverage-v8": "5.1.0",
|
||||
"@vitest/ui": "5.1.0",
|
||||
"happy-dom": "*",
|
||||
"jsdom": "*",
|
||||
"vite": "^6.4.0 || ^7.0.0 || ^8.0.0"
|
||||
@@ -2146,20 +2132,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/why-is-node-running": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
|
||||
"integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz",
|
||||
"integrity": "sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"siginfo": "^2.0.0",
|
||||
"stackback": "0.0.2"
|
||||
},
|
||||
"bin": {
|
||||
"why-is-node-running": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=20.11"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -27,11 +27,11 @@
|
||||
"@actions/tool-cache": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^26.4.1",
|
||||
"@types/node": "^26.6.6",
|
||||
"esbuild": "^0.28.2",
|
||||
"husky": "^9.1.7",
|
||||
"prettier": "3.9.6",
|
||||
"prettier": "3.9.10",
|
||||
"typescript": "7.0.2",
|
||||
"vitest": "^5.0.0"
|
||||
"vitest": "^5.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,3 +304,80 @@ export function getExecutableExtension(): string {
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
export function parseToolVersionsFile(filePath: string): string {
|
||||
const maxBytes = 64 * 1024
|
||||
let pathStats: fs.BigIntStats
|
||||
try {
|
||||
pathStats = fs.lstatSync(filePath, {bigint: true})
|
||||
} catch (error) {
|
||||
if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
|
||||
throw new Error(`The version-file '${filePath}' was not found.`)
|
||||
}
|
||||
throw error
|
||||
}
|
||||
if (pathStats.isSymbolicLink() || !pathStats.isFile()) {
|
||||
throw new Error(
|
||||
`The version-file '${filePath}' must be a regular file and not a symbolic link.`
|
||||
)
|
||||
}
|
||||
if (pathStats.size > BigInt(maxBytes)) {
|
||||
throw new Error(
|
||||
`The version-file '${filePath}' exceeds the ${maxBytes}-byte size limit.`
|
||||
)
|
||||
}
|
||||
|
||||
const noFollow = fs.constants.O_NOFOLLOW ?? 0
|
||||
// A FIFO swapped in after lstat must not block open before fstat can reject it.
|
||||
// O_NONBLOCK has no effect on regular files; these flags are POSIX-only.
|
||||
const nonBlock = fs.constants.O_NONBLOCK ?? 0
|
||||
const fd = fs.openSync(filePath, fs.constants.O_RDONLY | noFollow | nonBlock)
|
||||
let content: string
|
||||
try {
|
||||
const fileStats = fs.fstatSync(fd, {bigint: true})
|
||||
if (!fileStats.isFile()) {
|
||||
throw new Error(
|
||||
`The version-file '${filePath}' must be a regular file and not a symbolic link.`
|
||||
)
|
||||
}
|
||||
if (pathStats.dev !== fileStats.dev || pathStats.ino !== fileStats.ino) {
|
||||
throw new Error(
|
||||
`The version-file '${filePath}' changed while it was being opened.`
|
||||
)
|
||||
}
|
||||
|
||||
const buffer = Buffer.alloc(maxBytes + 1)
|
||||
let bytesRead = 0
|
||||
while (bytesRead < buffer.length) {
|
||||
const count = fs.readSync(
|
||||
fd,
|
||||
buffer,
|
||||
bytesRead,
|
||||
buffer.length - bytesRead,
|
||||
null
|
||||
)
|
||||
if (count === 0) break
|
||||
bytesRead += count
|
||||
}
|
||||
if (bytesRead > maxBytes) {
|
||||
throw new Error(
|
||||
`The version-file '${filePath}' exceeds the ${maxBytes}-byte size limit.`
|
||||
)
|
||||
}
|
||||
content = buffer.toString('utf8', 0, bytesRead)
|
||||
} finally {
|
||||
fs.closeSync(fd)
|
||||
}
|
||||
|
||||
for (const line of content.split('\n')) {
|
||||
const trimmed = line.trim()
|
||||
if (trimmed.startsWith('#') || trimmed === '') continue
|
||||
const [tool, version] = trimmed.split(/\s+/)
|
||||
if (tool === 'kubectl' && version) {
|
||||
return version
|
||||
}
|
||||
}
|
||||
throw new Error(
|
||||
`Could not find a kubectl entry in tool-versions file: ${filePath}`
|
||||
)
|
||||
}
|
||||
|
||||
+272
-1
@@ -45,6 +45,7 @@ const {
|
||||
getExecutableExtension,
|
||||
getLatestPatchVersion,
|
||||
isDefaultBaseURL,
|
||||
parseToolVersionsFile,
|
||||
secureDownload,
|
||||
validateBaseURL,
|
||||
validateVersion
|
||||
@@ -56,6 +57,20 @@ function mockInputs(inputs: Record<string, string>) {
|
||||
)
|
||||
}
|
||||
|
||||
function mockVersionFileContent(content: string) {
|
||||
const source = Buffer.from(content)
|
||||
let offset = 0
|
||||
vi.mocked(fs.readSync).mockImplementation(
|
||||
(_fd, buffer, bufferOffset, length) => {
|
||||
const count = Math.min(length, source.length - offset)
|
||||
if (count <= 0) return 0
|
||||
source.copy(buffer as Buffer, bufferOffset, offset, offset + count)
|
||||
offset += count
|
||||
return count
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function fakeHttpResponse(opts: {
|
||||
status: number
|
||||
body?: string
|
||||
@@ -108,6 +123,19 @@ describe('Testing all functions in run file.', () => {
|
||||
vi.mocked(fs.openSync).mockReturnValue(3 as never)
|
||||
vi.mocked(fs.writeSync).mockReturnValue(0 as never)
|
||||
vi.mocked(fs.closeSync).mockImplementation(() => {})
|
||||
vi.mocked(fs.fstatSync).mockReturnValue({
|
||||
dev: 1n,
|
||||
ino: 1n,
|
||||
isFile: () => true
|
||||
} as fs.BigIntStats)
|
||||
vi.mocked(fs.readSync).mockReturnValue(0)
|
||||
vi.mocked(fs.lstatSync).mockReturnValue({
|
||||
dev: 1n,
|
||||
ino: 1n,
|
||||
isSymbolicLink: () => false,
|
||||
isFile: () => true,
|
||||
size: 1024n
|
||||
} as fs.BigIntStats)
|
||||
})
|
||||
|
||||
test('getExecutableExtension() - return .exe when os is Windows', () => {
|
||||
@@ -798,7 +826,7 @@ describe('Testing all functions in run file.', () => {
|
||||
vi.mocked(core.setOutput).mockImplementation()
|
||||
|
||||
await expect(run.run()).resolves.toBeUndefined()
|
||||
expect(core.getInput).toHaveBeenCalledWith('version', {required: true})
|
||||
expect(core.getInput).toHaveBeenCalledWith('version')
|
||||
expect(core.getInput).toHaveBeenCalledWith('downloadBaseURL', {
|
||||
required: false
|
||||
})
|
||||
@@ -957,4 +985,247 @@ describe('Testing all functions in run file.', () => {
|
||||
// And the resolved version must be cached/looked up under v1.27.15.
|
||||
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.27.15')
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - returns kubectl version', () => {
|
||||
mockVersionFileContent('kubectl 1.27.15\nnode 20.0.0\n')
|
||||
expect(parseToolVersionsFile('.tool-versions')).toBe('1.27.15')
|
||||
expect(fs.openSync).toHaveBeenCalledWith(
|
||||
'.tool-versions',
|
||||
fs.constants.O_RDONLY |
|
||||
(fs.constants.O_NOFOLLOW ?? 0) |
|
||||
(fs.constants.O_NONBLOCK ?? 0)
|
||||
)
|
||||
expect(fs.lstatSync).toHaveBeenCalledWith('.tool-versions', {
|
||||
bigint: true
|
||||
})
|
||||
expect(fs.fstatSync).toHaveBeenCalledWith(3, {bigint: true})
|
||||
expect(fs.closeSync).toHaveBeenCalledWith(3)
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - ignores comments and blank lines', () => {
|
||||
mockVersionFileContent('# comment\n\nkubectl 1.27.15\n')
|
||||
expect(parseToolVersionsFile('.tool-versions')).toBe('1.27.15')
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - uses the first kubectl entry', () => {
|
||||
mockVersionFileContent('kubectl 1.27.15\nkubectl 1.30.0\n')
|
||||
expect(parseToolVersionsFile('.tool-versions')).toBe('1.27.15')
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - reports a missing file clearly', () => {
|
||||
vi.mocked(fs.lstatSync).mockImplementation(() => {
|
||||
throw Object.assign(new Error('ENOENT: no such file or directory'), {
|
||||
code: 'ENOENT'
|
||||
})
|
||||
})
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
"The version-file '.tool-versions' was not found."
|
||||
)
|
||||
expect(fs.openSync).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - throws when kubectl entry is absent', () => {
|
||||
vi.mocked(fs.lstatSync).mockReturnValue({
|
||||
dev: 1n,
|
||||
ino: 1n,
|
||||
isSymbolicLink: () => false,
|
||||
isFile: () => true,
|
||||
size: 34n
|
||||
} as fs.BigIntStats)
|
||||
mockVersionFileContent('node 20.0.0\npython 3.11.0\n')
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'Could not find a kubectl entry in tool-versions file: .tool-versions'
|
||||
)
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - rejects symbolic links', () => {
|
||||
vi.mocked(fs.lstatSync).mockReturnValue({
|
||||
isSymbolicLink: () => true,
|
||||
isFile: () => true,
|
||||
size: 16
|
||||
} as fs.Stats)
|
||||
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'must be a regular file and not a symbolic link'
|
||||
)
|
||||
expect(fs.readFileSync).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - rejects non-regular files', () => {
|
||||
vi.mocked(fs.lstatSync).mockReturnValue({
|
||||
isSymbolicLink: () => false,
|
||||
isFile: () => false,
|
||||
size: 0
|
||||
} as fs.Stats)
|
||||
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'must be a regular file and not a symbolic link'
|
||||
)
|
||||
expect(fs.readFileSync).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - rejects files larger than 64 KiB', () => {
|
||||
vi.mocked(fs.lstatSync).mockReturnValue({
|
||||
isSymbolicLink: () => false,
|
||||
isFile: () => true,
|
||||
size: 64 * 1024 + 1
|
||||
} as fs.Stats)
|
||||
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'exceeds the 65536-byte size limit'
|
||||
)
|
||||
expect(fs.readFileSync).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - rejects a file replaced between check and open', () => {
|
||||
vi.mocked(fs.lstatSync).mockReturnValue({
|
||||
dev: 1n,
|
||||
ino: 10n,
|
||||
isSymbolicLink: () => false,
|
||||
isFile: () => true,
|
||||
size: 16n
|
||||
} as fs.BigIntStats)
|
||||
vi.mocked(fs.fstatSync).mockReturnValue({
|
||||
dev: 1n,
|
||||
ino: 11n,
|
||||
isFile: () => true
|
||||
} as fs.BigIntStats)
|
||||
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'changed while it was being opened'
|
||||
)
|
||||
expect(fs.readSync).not.toHaveBeenCalled()
|
||||
expect(fs.closeSync).toHaveBeenCalledWith(3)
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - rejects growth beyond 64 KiB after opening', () => {
|
||||
mockVersionFileContent('x'.repeat(64 * 1024 + 1))
|
||||
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'exceeds the 65536-byte size limit'
|
||||
)
|
||||
expect(fs.closeSync).toHaveBeenCalledWith(3)
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - accepts exactly 64 KiB', () => {
|
||||
mockVersionFileContent(`kubectl 1.27.15\n${' '.repeat(64 * 1024 - 17)}`)
|
||||
|
||||
expect(parseToolVersionsFile('.tool-versions')).toBe('1.27.15')
|
||||
expect(fs.closeSync).toHaveBeenCalledWith(3)
|
||||
})
|
||||
|
||||
test('parseToolVersionsFile() - closes the descriptor when reading fails', () => {
|
||||
vi.mocked(fs.readSync).mockImplementation(() => {
|
||||
throw new Error('read failed')
|
||||
})
|
||||
|
||||
expect(() => parseToolVersionsFile('.tool-versions')).toThrow(
|
||||
'read failed'
|
||||
)
|
||||
expect(fs.closeSync).toHaveBeenCalledWith(3)
|
||||
})
|
||||
|
||||
test('run() - uses version-file to determine kubectl version', async () => {
|
||||
mockInputs({
|
||||
version: '',
|
||||
'version-file': '.tool-versions'
|
||||
})
|
||||
mockVersionFileContent('kubectl 1.27.15\n')
|
||||
vi.mocked(toolCache.find).mockReturnValue('pathToCachedTool')
|
||||
vi.mocked(os.type).mockReturnValue('Linux')
|
||||
vi.mocked(fs.chmodSync).mockImplementation()
|
||||
|
||||
await expect(run.run()).resolves.toBeUndefined()
|
||||
|
||||
expect(fs.openSync).toHaveBeenCalledWith(
|
||||
'.tool-versions',
|
||||
fs.constants.O_RDONLY |
|
||||
(fs.constants.O_NOFOLLOW ?? 0) |
|
||||
(fs.constants.O_NONBLOCK ?? 0)
|
||||
)
|
||||
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.27.15')
|
||||
expect(core.setOutput).toHaveBeenCalledWith(
|
||||
'kubectl-path',
|
||||
path.join('pathToCachedTool', 'kubectl')
|
||||
)
|
||||
})
|
||||
|
||||
test('run() - expands a major.minor version from version-file', async () => {
|
||||
mockInputs({version: '', 'version-file': '.tool-versions'})
|
||||
mockVersionFileContent('kubectl 1.27\n')
|
||||
vi.mocked(toolCache.downloadTool).mockResolvedValue('pathToStableTxt')
|
||||
vi.mocked(fs.readFileSync).mockReturnValue('v1.27.15')
|
||||
vi.mocked(toolCache.find).mockReturnValue('pathToCachedTool')
|
||||
vi.mocked(os.type).mockReturnValue('Linux')
|
||||
vi.mocked(fs.chmodSync).mockImplementation()
|
||||
|
||||
await expect(run.run()).resolves.toBeUndefined()
|
||||
|
||||
expect(toolCache.downloadTool).toHaveBeenCalledWith(
|
||||
'https://dl.k8s.io/release/stable-1.27.txt'
|
||||
)
|
||||
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.27.15')
|
||||
})
|
||||
|
||||
test('run() - supports latest from version-file', async () => {
|
||||
mockInputs({version: '', 'version-file': '.tool-versions'})
|
||||
mockVersionFileContent('kubectl latest\n')
|
||||
vi.mocked(toolCache.downloadTool).mockResolvedValue('pathToStableTxt')
|
||||
vi.mocked(fs.readFileSync).mockReturnValue('v1.31.0')
|
||||
vi.mocked(toolCache.find).mockReturnValue('pathToCachedTool')
|
||||
vi.mocked(os.type).mockReturnValue('Linux')
|
||||
vi.mocked(fs.chmodSync).mockImplementation()
|
||||
|
||||
await expect(run.run()).resolves.toBeUndefined()
|
||||
|
||||
expect(toolCache.downloadTool).toHaveBeenCalledWith(
|
||||
'https://dl.k8s.io/release/stable.txt'
|
||||
)
|
||||
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.31.0')
|
||||
})
|
||||
|
||||
test('run() - preserves a v-prefixed version from version-file', async () => {
|
||||
mockInputs({version: '', 'version-file': '.tool-versions'})
|
||||
mockVersionFileContent('kubectl v1.27.15\n')
|
||||
vi.mocked(toolCache.find).mockReturnValue('pathToCachedTool')
|
||||
vi.mocked(os.type).mockReturnValue('Linux')
|
||||
vi.mocked(fs.chmodSync).mockImplementation()
|
||||
|
||||
await expect(run.run()).resolves.toBeUndefined()
|
||||
|
||||
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.27.15')
|
||||
expect(toolCache.downloadTool).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
test.each(['../etc', '1.27%2Ffoo', '1.27.0;cmd'])(
|
||||
'run() - rejects malformed version-file value %s before download',
|
||||
async (value) => {
|
||||
mockInputs({version: '', 'version-file': '.tool-versions'})
|
||||
mockVersionFileContent(`kubectl ${value}\n`)
|
||||
|
||||
await expect(run.run()).rejects.toThrow('Invalid version format')
|
||||
|
||||
expect(toolCache.find).not.toHaveBeenCalled()
|
||||
expect(toolCache.downloadTool).not.toHaveBeenCalled()
|
||||
}
|
||||
)
|
||||
|
||||
test('run() - explicit version takes precedence over version-file', async () => {
|
||||
mockInputs({
|
||||
version: '1.30.0',
|
||||
'version-file': '.tool-versions'
|
||||
})
|
||||
vi.mocked(toolCache.find).mockReturnValue('pathToCachedTool')
|
||||
vi.mocked(os.type).mockReturnValue('Linux')
|
||||
vi.mocked(fs.chmodSync).mockImplementation()
|
||||
|
||||
await expect(run.run()).resolves.toBeUndefined()
|
||||
|
||||
expect(core.warning).toHaveBeenCalledWith(
|
||||
"Both 'version' and 'version-file' inputs are specified; using 'version'."
|
||||
)
|
||||
expect(fs.lstatSync).not.toHaveBeenCalled()
|
||||
expect(fs.readSync).not.toHaveBeenCalled()
|
||||
expect(toolCache.find).toHaveBeenCalledWith('kubectl', 'v1.30.0')
|
||||
})
|
||||
})
|
||||
|
||||
+16
-1
@@ -12,6 +12,7 @@ import {
|
||||
getLatestPatchVersion,
|
||||
isDefaultBaseURL,
|
||||
normalizeBaseURL,
|
||||
parseToolVersionsFile,
|
||||
secureDownload,
|
||||
validateBaseURL
|
||||
} from './helpers.js'
|
||||
@@ -20,7 +21,21 @@ const kubectlToolName = 'kubectl'
|
||||
const stableKubectlVersion = 'v1.15.0'
|
||||
|
||||
export async function run() {
|
||||
let version = core.getInput('version', {required: true})
|
||||
const versionFile = core.getInput('version-file')
|
||||
let version = core.getInput('version')
|
||||
|
||||
if (versionFile) {
|
||||
if (version && version.trim().toLowerCase() !== 'latest') {
|
||||
core.warning(
|
||||
"Both 'version' and 'version-file' inputs are specified; using 'version'."
|
||||
)
|
||||
} else {
|
||||
version = parseToolVersionsFile(versionFile)
|
||||
}
|
||||
}
|
||||
if (!version) {
|
||||
version = 'latest'
|
||||
}
|
||||
|
||||
const rawBaseURL = core.getInput('downloadBaseURL', {required: false}).trim()
|
||||
const downloadBaseURL = rawBaseURL || DEFAULT_KUBECTL_BASE_URL
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
import {test, expect} from 'vitest'
|
||||
import * as fs from 'node:fs'
|
||||
import * as os from 'node:os'
|
||||
import * as path from 'node:path'
|
||||
import {spawnSync} from 'node:child_process'
|
||||
import {parseToolVersionsFile} from './helpers.js'
|
||||
|
||||
test('version-file reads a real regular file', () => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'kubectl-version-'))
|
||||
try {
|
||||
const file = path.join(dir, '.tool-versions')
|
||||
fs.writeFileSync(file, 'kubectl 1.27.15\n')
|
||||
expect(parseToolVersionsFile(file)).toBe('1.27.15')
|
||||
} finally {
|
||||
fs.rmSync(dir, {recursive: true, force: true})
|
||||
}
|
||||
})
|
||||
|
||||
test.skipIf(process.platform === 'win32')(
|
||||
'version-file rejects a FIFO swapped in after lstat without blocking',
|
||||
() => {
|
||||
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'kubectl-fifo-'))
|
||||
try {
|
||||
const file = path.join(dir, '.tool-versions')
|
||||
fs.writeFileSync(file, 'kubectl 1.27.15\n')
|
||||
// Isolate a potentially blocking open in a child with a hard timeout.
|
||||
// Replace only lstat: open, fstat and the FIFO are real OS operations.
|
||||
const script = `
|
||||
const fs = require('node:fs');
|
||||
const {execFileSync} = require('node:child_process');
|
||||
const {syncBuiltinESMExports} = require('node:module');
|
||||
const file = ${JSON.stringify(file)};
|
||||
const lstat = fs.lstatSync;
|
||||
fs.lstatSync = function(p, options) {
|
||||
const stats = lstat(p, options);
|
||||
if (p === file) {
|
||||
fs.unlinkSync(file);
|
||||
execFileSync('mkfifo', [file]);
|
||||
}
|
||||
return stats;
|
||||
};
|
||||
syncBuiltinESMExports();
|
||||
import(${JSON.stringify(new URL('./helpers.ts', import.meta.url).href)})
|
||||
.then(({parseToolVersionsFile}) => {
|
||||
try {
|
||||
parseToolVersionsFile(file);
|
||||
process.exitCode = 1;
|
||||
} catch (error) {
|
||||
console.log(error.message);
|
||||
process.exitCode = /must be a regular file/.test(error.message) ? 0 : 1;
|
||||
}
|
||||
}).catch(error => { console.error(error); process.exitCode = 1; });
|
||||
`
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
['--experimental-strip-types', '-e', script],
|
||||
{encoding: 'utf8', timeout: 5000}
|
||||
)
|
||||
expect(result.error, result.stderr).toBeUndefined()
|
||||
expect(result.status, result.stderr).toBe(0)
|
||||
expect(result.stdout).toContain('must be a regular file')
|
||||
} finally {
|
||||
fs.rmSync(dir, {recursive: true, force: true})
|
||||
}
|
||||
},
|
||||
10000
|
||||
)
|
||||
Reference in New Issue
Block a user