Merge pull request #46 from DeterminateSystems/detsys-ts-revamp

Revamp logic into central class
This commit is contained in:
Luc Perkins 2024-05-02 13:34:01 -03:00 committed by GitHub
commit 1718a05c5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 918 additions and 1006 deletions

View file

@ -33,7 +33,7 @@
"@typescript-eslint/array-type": "error", "@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error", "@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off", "camelcase": "error",
"@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [ "@typescript-eslint/explicit-function-return-type": [
"error", "error",

View file

@ -14,23 +14,6 @@ inputs:
upstream-cache: upstream-cache:
description: Your preferred upstream cache. Store paths in this store will not be cached in GitHub Actions' cache. description: Your preferred upstream cache. Store paths in this store will not be cached in GitHub Actions' cache.
default: https://cache.nixos.org default: https://cache.nixos.org
source-binary:
description: Run a version of the cache binary from somewhere already on disk. Conflicts with all other `source-*` options.
source-branch:
description: The branch of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-pr:
description: The PR of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-revision:
description: The revision of `nix-magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-tag:
description: The tag of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-url:
description: A URL pointing to a `magic-nix-cache` binary. Overrides all other `source-*` options.
required: false
diagnostic-endpoint: diagnostic-endpoint:
description: "Diagnostic endpoint url where diagnostics and performance data is sent. To disable set this to an empty string." description: "Diagnostic endpoint url where diagnostics and performance data is sent. To disable set this to an empty string."
default: "https://install.determinate.systems/magic-nix-cache/perf" default: "https://install.determinate.systems/magic-nix-cache/perf"
@ -51,6 +34,23 @@ inputs:
startup-notification-port: startup-notification-port:
description: "The port magic-nix-cache uses for daemon startup notification." description: "The port magic-nix-cache uses for daemon startup notification."
default: 41239 default: 41239
source-binary:
description: Run a version of the cache binary from somewhere already on disk. Conflicts with all other `source-*` options.
source-branch:
description: The branch of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-pr:
description: The PR of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-revision:
description: The revision of `nix-magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-tag:
description: The tag of `magic-nix-cache` to use. Conflicts with all other `source-*` options.
required: false
source-url:
description: A URL pointing to a `magic-nix-cache` binary. Overrides all other `source-*` options.
required: false
runs: runs:
using: "node20" using: "node20"

599
dist/index.js generated vendored

File diff suppressed because it is too large Load diff

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -27,12 +27,8 @@
"dependencies": { "dependencies": {
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1",
"@actions/tool-cache": "^2.0.1",
"detsys-ts": "github:DeterminateSystems/detsys-ts", "detsys-ts": "github:DeterminateSystems/detsys-ts",
"fetch-retry": "^5.0.6",
"got": "^14.2.1", "got": "^14.2.1",
"string-argv": "^0.3.2",
"tail": "^2.2.6" "tail": "^2.2.6"
}, },
"devDependencies": { "devDependencies": {
@ -40,7 +36,7 @@
"@types/node": "^20.12.7", "@types/node": "^20.12.7",
"@types/tail": "^2.2.3", "@types/tail": "^2.2.3",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.7.0", "@typescript-eslint/eslint-plugin": "^7.7.1",
"@vercel/ncc": "^0.38.1", "@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-import-resolver-typescript": "^3.6.1",

View file

@ -11,24 +11,12 @@ dependencies:
'@actions/exec': '@actions/exec':
specifier: ^1.1.1 specifier: ^1.1.1
version: 1.1.1 version: 1.1.1
'@actions/github':
specifier: ^5.1.1
version: 5.1.1
'@actions/tool-cache':
specifier: ^2.0.1
version: 2.0.1
detsys-ts: detsys-ts:
specifier: github:DeterminateSystems/detsys-ts specifier: github:DeterminateSystems/detsys-ts
version: github.com/DeterminateSystems/detsys-ts/56a244c061429692b1c7d80fc068d684db3ae4d2 version: github.com/DeterminateSystems/detsys-ts/5abcb239472d24b114a53f70800f0e42fc30819c
fetch-retry:
specifier: ^5.0.6
version: 5.0.6
got: got:
specifier: ^14.2.1 specifier: ^14.2.1
version: 14.2.1 version: 14.2.1
string-argv:
specifier: ^0.3.2
version: 0.3.2
tail: tail:
specifier: ^2.2.6 specifier: ^2.2.6
version: 2.2.6 version: 2.2.6
@ -47,8 +35,8 @@ devDependencies:
specifier: ^9.0.8 specifier: ^9.0.8
version: 9.0.8 version: 9.0.8
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: ^7.7.0 specifier: ^7.7.1
version: 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5) version: 7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5)
'@vercel/ncc': '@vercel/ncc':
specifier: ^0.38.1 specifier: ^0.38.1
version: 0.38.1 version: 0.38.1
@ -57,13 +45,13 @@ devDependencies:
version: 8.57.0 version: 8.57.0
eslint-import-resolver-typescript: eslint-import-resolver-typescript:
specifier: ^3.6.1 specifier: ^3.6.1
version: 3.6.1(@typescript-eslint/parser@7.7.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) version: 3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0)
eslint-plugin-github: eslint-plugin-github:
specifier: ^4.10.2 specifier: ^4.10.2
version: 4.10.2(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)(typescript@5.4.5) version: 4.10.2(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)(typescript@5.4.5)
eslint-plugin-import: eslint-plugin-import:
specifier: ^2.29.1 specifier: ^2.29.1
version: 2.29.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) version: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-prettier: eslint-plugin-prettier:
specifier: ^5.1.3 specifier: ^5.1.3
version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5)
@ -114,17 +102,6 @@ packages:
'@actions/io': 1.1.3 '@actions/io': 1.1.3
dev: false dev: false
/@actions/github@5.1.1:
resolution: {integrity: sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==}
dependencies:
'@actions/http-client': 2.2.1
'@octokit/core': 3.6.0
'@octokit/plugin-paginate-rest': 2.21.3(@octokit/core@3.6.0)
'@octokit/plugin-rest-endpoint-methods': 5.16.2(@octokit/core@3.6.0)
transitivePeerDependencies:
- encoding
dev: false
/@actions/glob@0.1.2: /@actions/glob@0.1.2:
resolution: {integrity: sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==} resolution: {integrity: sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==}
dependencies: dependencies:
@ -143,17 +120,6 @@ packages:
resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==} resolution: {integrity: sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==}
dev: false dev: false
/@actions/tool-cache@2.0.1:
resolution: {integrity: sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==}
dependencies:
'@actions/core': 1.10.1
'@actions/exec': 1.1.1
'@actions/http-client': 2.2.1
'@actions/io': 1.1.3
semver: 6.3.1
uuid: 3.4.0
dev: false
/@azure/abort-controller@1.1.0: /@azure/abort-controller@1.1.0:
resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==} resolution: {integrity: sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
@ -739,94 +705,6 @@ packages:
fastq: 1.17.1 fastq: 1.17.1
dev: true dev: true
/@octokit/auth-token@2.5.0:
resolution: {integrity: sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==}
dependencies:
'@octokit/types': 6.41.0
dev: false
/@octokit/core@3.6.0:
resolution: {integrity: sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==}
dependencies:
'@octokit/auth-token': 2.5.0
'@octokit/graphql': 4.8.0
'@octokit/request': 5.6.3
'@octokit/request-error': 2.1.0
'@octokit/types': 6.41.0
before-after-hook: 2.2.3
universal-user-agent: 6.0.1
transitivePeerDependencies:
- encoding
dev: false
/@octokit/endpoint@6.0.12:
resolution: {integrity: sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==}
dependencies:
'@octokit/types': 6.41.0
is-plain-object: 5.0.0
universal-user-agent: 6.0.1
dev: false
/@octokit/graphql@4.8.0:
resolution: {integrity: sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==}
dependencies:
'@octokit/request': 5.6.3
'@octokit/types': 6.41.0
universal-user-agent: 6.0.1
transitivePeerDependencies:
- encoding
dev: false
/@octokit/openapi-types@12.11.0:
resolution: {integrity: sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==}
dev: false
/@octokit/plugin-paginate-rest@2.21.3(@octokit/core@3.6.0):
resolution: {integrity: sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==}
peerDependencies:
'@octokit/core': '>=2'
dependencies:
'@octokit/core': 3.6.0
'@octokit/types': 6.41.0
dev: false
/@octokit/plugin-rest-endpoint-methods@5.16.2(@octokit/core@3.6.0):
resolution: {integrity: sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==}
peerDependencies:
'@octokit/core': '>=3'
dependencies:
'@octokit/core': 3.6.0
'@octokit/types': 6.41.0
deprecation: 2.3.1
dev: false
/@octokit/request-error@2.1.0:
resolution: {integrity: sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==}
dependencies:
'@octokit/types': 6.41.0
deprecation: 2.3.1
once: 1.4.0
dev: false
/@octokit/request@5.6.3:
resolution: {integrity: sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==}
dependencies:
'@octokit/endpoint': 6.0.12
'@octokit/request-error': 2.1.0
'@octokit/types': 6.41.0
is-plain-object: 5.0.0
node-fetch: 2.7.0
universal-user-agent: 6.0.1
transitivePeerDependencies:
- encoding
dev: false
/@octokit/types@6.41.0:
resolution: {integrity: sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==}
dependencies:
'@octokit/openapi-types': 12.11.0
dev: false
/@opentelemetry/api@1.8.0: /@opentelemetry/api@1.8.0:
resolution: {integrity: sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==} resolution: {integrity: sha512-I/s6F7yKUDdtMsoBWXJe8Qz40Tui5vsuKCWJEWVL+5q9sSWRzzx6v2KeNsOBEwd94j0eWkpWCH4yB6rZg9Mf0w==}
engines: {node: '>=8.0.0'} engines: {node: '>=8.0.0'}
@ -844,136 +722,136 @@ packages:
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
dev: true dev: true
/@rollup/rollup-android-arm-eabi@4.16.0: /@rollup/rollup-android-arm-eabi@4.16.4:
resolution: {integrity: sha512-4fDVBAfWYlw2CtYgHEWarAYSozTx5OYLsSM/cdGW7H51FwI10DaGnjKgdqWyWXY/VjugelzriCiKf1UdM20Bxg==} resolution: {integrity: sha512-GkhjAaQ8oUTOKE4g4gsZ0u8K/IHU1+2WQSgS1TwTcYvL+sjbaQjNHFXbOJ6kgqGHIO1DfUhI/Sphi9GkRT9K+Q==}
cpu: [arm] cpu: [arm]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-android-arm64@4.16.0: /@rollup/rollup-android-arm64@4.16.4:
resolution: {integrity: sha512-JltUBgsKgN108NO4/hj0B/dJYNrqqmdRCtUet5tFDi/w+0tvQP0FToyWBV4HKBcSX4cvFChrCyt5Rh4FX6M6QQ==} resolution: {integrity: sha512-Bvm6D+NPbGMQOcxvS1zUl8H7DWlywSXsphAeOnVeiZLQ+0J6Is8T7SrjGTH29KtYkiY9vld8ZnpV3G2EPbom+w==}
cpu: [arm64] cpu: [arm64]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-darwin-arm64@4.16.0: /@rollup/rollup-darwin-arm64@4.16.4:
resolution: {integrity: sha512-UwF7tkWf0roggMRv7Vrkof7VgX9tEZIc4vbaQl0/HNX3loWlcum+0ODp1Qsd8s7XvQGT+Zboxx1qxav3vq8YDw==} resolution: {integrity: sha512-i5d64MlnYBO9EkCOGe5vPR/EeDwjnKOGGdd7zKFhU5y8haKhQZTN2DgVtpODDMxUr4t2K90wTUJg7ilgND6bXw==}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-darwin-x64@4.16.0: /@rollup/rollup-darwin-x64@4.16.4:
resolution: {integrity: sha512-RIY42wn6+Yb0qD29T7Dvm9/AhxrkGDf7X5dgI6rUFXR19+vCLh3u45yLcKOayu2ZQEba9rf/+BX3EggVwckiIw==} resolution: {integrity: sha512-WZupV1+CdUYehaZqjaFTClJI72fjJEgTXdf4NbW69I9XyvdmztUExBtcI2yIIU6hJtYvtwS6pkTkHJz+k08mAQ==}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-arm-gnueabihf@4.16.0: /@rollup/rollup-linux-arm-gnueabihf@4.16.4:
resolution: {integrity: sha512-r2TGCIKzqk8VwjOvW7sveledh6aPao131ejUfZNIyFlWBCruF4HOu51KtLArDa7LL6qKd0vkgxGX3/2NmYpWig==} resolution: {integrity: sha512-ADm/xt86JUnmAfA9mBqFcRp//RVRt1ohGOYF6yL+IFCYqOBNwy5lbEK05xTsEoJq+/tJzg8ICUtS82WinJRuIw==}
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-arm-musleabihf@4.16.0: /@rollup/rollup-linux-arm-musleabihf@4.16.4:
resolution: {integrity: sha512-/QwaDp0RXQTtm25wQFSl02zEm9oveRXr9qAHbdxWCm9YG9dR8esqpyqzS/3GgHDm7jHktPNz9gTENfoUKRCcXQ==} resolution: {integrity: sha512-tJfJaXPiFAG+Jn3cutp7mCs1ePltuAgRqdDZrzb1aeE3TktWWJ+g7xK9SNlaSUFw6IU4QgOxAY4rA+wZUT5Wfg==}
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-arm64-gnu@4.16.0: /@rollup/rollup-linux-arm64-gnu@4.16.4:
resolution: {integrity: sha512-iypHsz7YEfoyNL0iHbQ7B7pY6hpymvvMgFXXaMd5+WCtvJ9zqWPZKFmo78UeWzWNmTP9JtPiNIQt6efRxx/MNA==} resolution: {integrity: sha512-7dy1BzQkgYlUTapDTvK997cgi0Orh5Iu7JlZVBy1MBURk7/HSbHkzRnXZa19ozy+wwD8/SlpJnOOckuNZtJR9w==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-arm64-musl@4.16.0: /@rollup/rollup-linux-arm64-musl@4.16.4:
resolution: {integrity: sha512-7UpYcO0uVeomnoL5MpQhrS0FT7xZUJrEXtKVLmps5bRA7x5AiA1PDuPnMbxcOBWjIM2HHIG1t3ndnRTVMIbk5A==} resolution: {integrity: sha512-zsFwdUw5XLD1gQe0aoU2HVceI6NEW7q7m05wA46eUAyrkeNYExObfRFQcvA6zw8lfRc5BHtan3tBpo+kqEOxmg==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-powerpc64le-gnu@4.16.0: /@rollup/rollup-linux-powerpc64le-gnu@4.16.4:
resolution: {integrity: sha512-FSuFy4/hOQy0lH135ifnElP/6dKoHcZGHovsaRY0jrfNRR2yjMnVYaqNHKGKy0b/1I8DkD/JtclgJfq7SPti1w==} resolution: {integrity: sha512-p8C3NnxXooRdNrdv6dBmRTddEapfESEUflpICDNKXpHvTjRRq1J82CbU5G3XfebIZyI3B0s074JHMWD36qOW6w==}
cpu: [ppc64] cpu: [ppc64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-riscv64-gnu@4.16.0: /@rollup/rollup-linux-riscv64-gnu@4.16.4:
resolution: {integrity: sha512-qxAB8MiHuDI8jU0D+WI9Gym3fvUJHA/AjKRXxbEH921SB3AeKQStq1FKFA59dAoqqCArjJ1voXM/gMvgEc1q4Q==} resolution: {integrity: sha512-Lh/8ckoar4s4Id2foY7jNgitTOUQczwMWNYi+Mjt0eQ9LKhr6sK477REqQkmy8YHY3Ca3A2JJVdXnfb3Rrwkng==}
cpu: [riscv64] cpu: [riscv64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-s390x-gnu@4.16.0: /@rollup/rollup-linux-s390x-gnu@4.16.4:
resolution: {integrity: sha512-j/9yBgWFlNFBfG/S1M2zkBNLeLkNVG59T5c4tlmlrxU+XITWJ3aMVWdpcZ/+mu7auGZftAXueAgAE9mb4lAlag==} resolution: {integrity: sha512-1xwwn9ZCQYuqGmulGsTZoKrrn0z2fAur2ujE60QgyDpHmBbXbxLaQiEvzJWDrscRq43c8DnuHx3QorhMTZgisQ==}
cpu: [s390x] cpu: [s390x]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-x64-gnu@4.16.0: /@rollup/rollup-linux-x64-gnu@4.16.4:
resolution: {integrity: sha512-SjsBA1a9wrEleNneGEsR40HdxKdwCatyHC547o/XINqwPW4cqTYiNy/lL1WTJYWU/KgWIb8HH4SgmFStbWoBzw==} resolution: {integrity: sha512-LuOGGKAJ7dfRtxVnO1i3qWc6N9sh0Em/8aZ3CezixSTM+E9Oq3OvTsvC4sm6wWjzpsIlOCnZjdluINKESflJLA==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-linux-x64-musl@4.16.0: /@rollup/rollup-linux-x64-musl@4.16.4:
resolution: {integrity: sha512-YKCs7ghJZ5po6/qgfONiXyFKOKcTK4Kerzk/Kc89QK0JT94Qg4NurL+3Y3rZh5am2tu1OlvHPpBHQNBE8cFgJQ==} resolution: {integrity: sha512-ch86i7KkJKkLybDP2AtySFTRi5fM3KXp0PnHocHuJMdZwu7BuyIKi35BE9guMlmTpwwBTB3ljHj9IQXnTCD0vA==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-win32-arm64-msvc@4.16.0: /@rollup/rollup-win32-arm64-msvc@4.16.4:
resolution: {integrity: sha512-+wtkF+z2nw0ZwwHji01wOW0loxFl24lBNxPtVAXtnPPDL9Ew0EhiCMOegXe/EAH3Zlr8Iw9tyPJXB3DltQLEyw==} resolution: {integrity: sha512-Ma4PwyLfOWZWayfEsNQzTDBVW8PZ6TUUN1uFTBQbF2Chv/+sjenE86lpiEwj2FiviSmSZ4Ap4MaAfl1ciF4aSA==}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-win32-ia32-msvc@4.16.0: /@rollup/rollup-win32-ia32-msvc@4.16.4:
resolution: {integrity: sha512-7qLyKTL7Lf2g0B8bduETVAEI3WVUVwBRVcECojVevPNVAmi19IW1P2X+uMSwhmWNy36Q/qEvxXsfts1I8wpawg==} resolution: {integrity: sha512-9m/ZDrQsdo/c06uOlP3W9G2ENRVzgzbSXmXHT4hwVaDQhYcRpi9bgBT0FTG9OhESxwK0WjQxYOSfv40cU+T69w==}
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@rollup/rollup-win32-x64-msvc@4.16.0: /@rollup/rollup-win32-x64-msvc@4.16.4:
resolution: {integrity: sha512-tkfxXt+7c3Ecgn7ln9NJPdBM+QKwQdmFFpgAP+FYhAuRS5y3tY8xeza82gFjbPpytkHmaQnVdMtuzbToCz2tuw==} resolution: {integrity: sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/@sindresorhus/is@6.2.0: /@sindresorhus/is@6.3.0:
resolution: {integrity: sha512-yM/IGPkVnYGblhDosFBwq0ZGdnVSBkNV4onUtipGMOjZd4kB6GAu3ys91aftSbyMHh6A2GPdt+KDI5NoWP63MQ==} resolution: {integrity: sha512-bOSPck7aIJjASXIg1qvXSIjXhVBpIEKdl2Wxg4pVqoTRPL8wWExKBrnGIh6CEnhkFQHfc36k7APhO3uXV4g5xg==}
engines: {node: '>=16'} engines: {node: '>=16'}
dev: false dev: false
@ -1050,8 +928,8 @@ packages:
resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==}
dev: true dev: true
/@typescript-eslint/eslint-plugin@7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5): /@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5):
resolution: {integrity: sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==} resolution: {integrity: sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': ^7.0.0 '@typescript-eslint/parser': ^7.0.0
@ -1062,11 +940,11 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@eslint-community/regexpp': 4.10.0 '@eslint-community/regexpp': 4.10.0
'@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
'@typescript-eslint/scope-manager': 7.7.0 '@typescript-eslint/scope-manager': 7.7.1
'@typescript-eslint/type-utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/type-utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
'@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
'@typescript-eslint/visitor-keys': 7.7.0 '@typescript-eslint/visitor-keys': 7.7.1
debug: 4.3.4 debug: 4.3.4
eslint: 8.57.0 eslint: 8.57.0
graphemer: 1.4.0 graphemer: 1.4.0
@ -1079,8 +957,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/parser@7.7.0(eslint@8.57.0)(typescript@5.4.5): /@typescript-eslint/parser@7.7.1(eslint@8.57.0)(typescript@5.4.5):
resolution: {integrity: sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==} resolution: {integrity: sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies: peerDependencies:
eslint: ^8.56.0 eslint: ^8.56.0
@ -1089,10 +967,10 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/scope-manager': 7.7.0 '@typescript-eslint/scope-manager': 7.7.1
'@typescript-eslint/types': 7.7.0 '@typescript-eslint/types': 7.7.1
'@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5)
'@typescript-eslint/visitor-keys': 7.7.0 '@typescript-eslint/visitor-keys': 7.7.1
debug: 4.3.4 debug: 4.3.4
eslint: 8.57.0 eslint: 8.57.0
typescript: 5.4.5 typescript: 5.4.5
@ -1100,16 +978,16 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/scope-manager@7.7.0: /@typescript-eslint/scope-manager@7.7.1:
resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==} resolution: {integrity: sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
dependencies: dependencies:
'@typescript-eslint/types': 7.7.0 '@typescript-eslint/types': 7.7.1
'@typescript-eslint/visitor-keys': 7.7.0 '@typescript-eslint/visitor-keys': 7.7.1
dev: true dev: true
/@typescript-eslint/type-utils@7.7.0(eslint@8.57.0)(typescript@5.4.5): /@typescript-eslint/type-utils@7.7.1(eslint@8.57.0)(typescript@5.4.5):
resolution: {integrity: sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==} resolution: {integrity: sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies: peerDependencies:
eslint: ^8.56.0 eslint: ^8.56.0
@ -1118,8 +996,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5)
'@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
debug: 4.3.4 debug: 4.3.4
eslint: 8.57.0 eslint: 8.57.0
ts-api-utils: 1.3.0(typescript@5.4.5) ts-api-utils: 1.3.0(typescript@5.4.5)
@ -1128,13 +1006,13 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/types@7.7.0: /@typescript-eslint/types@7.7.1:
resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==} resolution: {integrity: sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
dev: true dev: true
/@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5): /@typescript-eslint/typescript-estree@7.7.1(typescript@5.4.5):
resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} resolution: {integrity: sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies: peerDependencies:
typescript: '*' typescript: '*'
@ -1142,8 +1020,8 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/types': 7.7.0 '@typescript-eslint/types': 7.7.1
'@typescript-eslint/visitor-keys': 7.7.0 '@typescript-eslint/visitor-keys': 7.7.1
debug: 4.3.4 debug: 4.3.4
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
@ -1155,8 +1033,8 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/utils@7.7.0(eslint@8.57.0)(typescript@5.4.5): /@typescript-eslint/utils@7.7.1(eslint@8.57.0)(typescript@5.4.5):
resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} resolution: {integrity: sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
peerDependencies: peerDependencies:
eslint: ^8.56.0 eslint: ^8.56.0
@ -1164,9 +1042,9 @@ packages:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
'@types/json-schema': 7.0.15 '@types/json-schema': 7.0.15
'@types/semver': 7.5.8 '@types/semver': 7.5.8
'@typescript-eslint/scope-manager': 7.7.0 '@typescript-eslint/scope-manager': 7.7.1
'@typescript-eslint/types': 7.7.0 '@typescript-eslint/types': 7.7.1
'@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5)
eslint: 8.57.0 eslint: 8.57.0
semver: 7.6.0 semver: 7.6.0
transitivePeerDependencies: transitivePeerDependencies:
@ -1174,11 +1052,11 @@ packages:
- typescript - typescript
dev: true dev: true
/@typescript-eslint/visitor-keys@7.7.0: /@typescript-eslint/visitor-keys@7.7.1:
resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} resolution: {integrity: sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==}
engines: {node: ^18.18.0 || >=20.0.0} engines: {node: ^18.18.0 || >=20.0.0}
dependencies: dependencies:
'@typescript-eslint/types': 7.7.0 '@typescript-eslint/types': 7.7.1
eslint-visitor-keys: 3.4.3 eslint-visitor-keys: 3.4.3
dev: true dev: true
@ -1372,10 +1250,6 @@ packages:
/balanced-match@1.0.2: /balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
/before-after-hook@2.2.3:
resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==}
dev: false
/binary-extensions@2.3.0: /binary-extensions@2.3.0:
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -1405,14 +1279,14 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true hasBin: true
dependencies: dependencies:
caniuse-lite: 1.0.30001611 caniuse-lite: 1.0.30001612
electron-to-chromium: 1.4.745 electron-to-chromium: 1.4.749
node-releases: 2.0.14 node-releases: 2.0.14
update-browserslist-db: 1.0.13(browserslist@4.23.0) update-browserslist-db: 1.0.13(browserslist@4.23.0)
dev: true dev: true
/bundle-require@4.0.2(esbuild@0.19.12): /bundle-require@4.0.3(esbuild@0.19.12):
resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} resolution: {integrity: sha512-2iscZ3fcthP2vka4Y7j277YJevwmsby/FpFDwjgw34Nl7dtCpt7zz/4TexmHMzY6KZEih7En9ImlbbgUNNQGtA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
peerDependencies: peerDependencies:
esbuild: '>=0.17' esbuild: '>=0.17'
@ -1460,8 +1334,8 @@ packages:
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
/caniuse-lite@1.0.30001611: /caniuse-lite@1.0.30001612:
resolution: {integrity: sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==} resolution: {integrity: sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==}
dev: true dev: true
/chalk@2.4.2: /chalk@2.4.2:
@ -1634,10 +1508,6 @@ packages:
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
dev: false dev: false
/deprecation@2.3.1:
resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==}
dev: false
/dequal@2.0.3: /dequal@2.0.3:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'} engines: {node: '>=6'}
@ -1668,8 +1538,8 @@ packages:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
dev: true dev: true
/electron-to-chromium@1.4.745: /electron-to-chromium@1.4.749:
resolution: {integrity: sha512-tRbzkaRI5gbUn5DEvF0dV4TQbMZ5CLkWeTAXmpC9IrYT+GE+x76i9p+o3RJ5l9XmdQlI1pPhVtE9uNcJJ0G0EA==} resolution: {integrity: sha512-LRMMrM9ITOvue0PoBrvNIraVmuDbJV5QC9ierz/z5VilMdPOVMjOtpICNld3PuXuTZ3CHH/UPxX9gHhAPwi+0Q==}
dev: true dev: true
/emoji-regex@8.0.0: /emoji-regex@8.0.0:
@ -1752,8 +1622,8 @@ packages:
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
dev: true dev: true
/es-iterator-helpers@1.0.18: /es-iterator-helpers@1.0.19:
resolution: {integrity: sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==} resolution: {integrity: sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
dependencies: dependencies:
call-bind: 1.0.7 call-bind: 1.0.7
@ -1868,7 +1738,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.7.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0): /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0):
resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -1878,8 +1748,8 @@ packages:
debug: 4.3.4 debug: 4.3.4
enhanced-resolve: 5.16.0 enhanced-resolve: 5.16.0
eslint: 8.57.0 eslint: 8.57.0
eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
fast-glob: 3.3.2 fast-glob: 3.3.2
get-tsconfig: 4.7.3 get-tsconfig: 4.7.3
is-core-module: 2.13.1 is-core-module: 2.13.1
@ -1891,7 +1761,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-module-utils@2.8.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): /eslint-module-utils@2.8.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
@ -1912,11 +1782,11 @@ packages:
eslint-import-resolver-webpack: eslint-import-resolver-webpack:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
debug: 3.2.7 debug: 3.2.7
eslint: 8.57.0 eslint: 8.57.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.7.0)(eslint-plugin-import@2.29.1)(eslint@8.57.0) eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.7.1)(eslint-plugin-import@2.29.1)(eslint@8.57.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
@ -1960,8 +1830,8 @@ packages:
eslint: ^8.0.1 eslint: ^8.0.1
dependencies: dependencies:
'@github/browserslist-config': 1.0.0 '@github/browserslist-config': 1.0.0
'@typescript-eslint/eslint-plugin': 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/eslint-plugin': 7.7.1(@typescript-eslint/parser@7.7.1)(eslint@8.57.0)(typescript@5.4.5)
'@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
aria-query: 5.3.0 aria-query: 5.3.0
eslint: 8.57.0 eslint: 8.57.0
eslint-config-prettier: 9.1.0(eslint@8.57.0) eslint-config-prettier: 9.1.0(eslint@8.57.0)
@ -1969,7 +1839,7 @@ packages:
eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.0) eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.0)
eslint-plugin-filenames: 1.3.2(eslint@8.57.0) eslint-plugin-filenames: 1.3.2(eslint@8.57.0)
eslint-plugin-i18n-text: 1.0.1(eslint@8.57.0) eslint-plugin-i18n-text: 1.0.1(eslint@8.57.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0)
eslint-plugin-no-only-tests: 3.1.0 eslint-plugin-no-only-tests: 3.1.0
eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) eslint-plugin-prettier: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5)
@ -1993,7 +1863,7 @@ packages:
eslint: 8.57.0 eslint: 8.57.0
dev: true dev: true
/eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
@ -2003,7 +1873,7 @@ packages:
'@typescript-eslint/parser': '@typescript-eslint/parser':
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
array-includes: 3.1.8 array-includes: 3.1.8
array.prototype.findlastindex: 1.2.5 array.prototype.findlastindex: 1.2.5
array.prototype.flat: 1.3.2 array.prototype.flat: 1.3.2
@ -2012,7 +1882,7 @@ packages:
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 8.57.0 eslint: 8.57.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.7.1)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
hasown: 2.0.2 hasown: 2.0.2
is-core-module: 2.13.1 is-core-module: 2.13.1
is-glob: 4.0.3 is-glob: 4.0.3
@ -2043,7 +1913,7 @@ packages:
axobject-query: 3.2.1 axobject-query: 3.2.1
damerau-levenshtein: 1.0.8 damerau-levenshtein: 1.0.8
emoji-regex: 9.2.2 emoji-regex: 9.2.2
es-iterator-helpers: 1.0.18 es-iterator-helpers: 1.0.19
eslint: 8.57.0 eslint: 8.57.0
hasown: 2.0.2 hasown: 2.0.2
jsx-ast-utils: 3.3.5 jsx-ast-utils: 3.3.5
@ -2235,10 +2105,6 @@ packages:
reusify: 1.0.4 reusify: 1.0.4
dev: true dev: true
/fetch-retry@5.0.6:
resolution: {integrity: sha512-3yurQZ2hD9VISAhJJP9bpYFNQrHHBXE2JxxjY5aLEcDi46RmAzJE2OC9FAde0yis5ElW0jTTzs0zfg/Cca4XqQ==}
dev: false
/file-entry-cache@6.0.1: /file-entry-cache@6.0.1:
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
engines: {node: ^10.12.0 || >=12.0.0} engines: {node: ^10.12.0 || >=12.0.0}
@ -2454,7 +2320,7 @@ packages:
resolution: {integrity: sha512-KOaPMremmsvx6l9BLC04LYE6ZFW4x7e4HkTe3LwBmtuYYQwpeS4XKqzhubTIkaQ1Nr+eXxeori0zuwupXMovBQ==} resolution: {integrity: sha512-KOaPMremmsvx6l9BLC04LYE6ZFW4x7e4HkTe3LwBmtuYYQwpeS4XKqzhubTIkaQ1Nr+eXxeori0zuwupXMovBQ==}
engines: {node: '>=20'} engines: {node: '>=20'}
dependencies: dependencies:
'@sindresorhus/is': 6.2.0 '@sindresorhus/is': 6.3.0
'@szmarczak/http-timer': 5.0.1 '@szmarczak/http-timer': 5.0.1
cacheable-lookup: 7.0.0 cacheable-lookup: 7.0.0
cacheable-request: 10.2.14 cacheable-request: 10.2.14
@ -2692,11 +2558,6 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dev: true dev: true
/is-plain-object@5.0.0:
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
engines: {node: '>=0.10.0'}
dev: false
/is-regex@1.1.4: /is-regex@1.1.4:
resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
@ -2921,8 +2782,8 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: false dev: false
/lru-cache@10.2.0: /lru-cache@10.2.1:
resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} resolution: {integrity: sha512-tS24spDe/zXhWbNPErCHs/AGOzbKGHT+ybSBqmdLm8WZ1xXLWvH8Qn71QPAlqVhd0qUTWjy+Kl9JmISgDdEjsA==}
engines: {node: 14 || >=16.14} engines: {node: 14 || >=16.14}
dev: true dev: true
@ -3116,6 +2977,7 @@ packages:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
dependencies: dependencies:
wrappy: 1.0.2 wrappy: 1.0.2
dev: true
/onetime@5.1.2: /onetime@5.1.2:
resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==}
@ -3185,7 +3047,7 @@ packages:
resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==}
engines: {node: '>=16 || 14 >=14.17'} engines: {node: '>=16 || 14 >=14.17'}
dependencies: dependencies:
lru-cache: 10.2.0 lru-cache: 10.2.1
minipass: 7.0.4 minipass: 7.0.4
dev: true dev: true
@ -3346,29 +3208,29 @@ packages:
glob: 7.2.3 glob: 7.2.3
dev: true dev: true
/rollup@4.16.0: /rollup@4.16.4:
resolution: {integrity: sha512-joxy/Hd4Ee289394//Q1aoebcxXyHasDieCTk8YtP4G4al4TUlx85EnuCLrfrdtLzrna9kNjH++Sx063wxSgmA==} resolution: {integrity: sha512-kuaTJSUbz+Wsb2ATGvEknkI12XV40vIiHmLuFlejoo7HtDok/O5eDDD0UpCVY5bBX5U5RYo8wWP83H7ZsqVEnA==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'} engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true hasBin: true
dependencies: dependencies:
'@types/estree': 1.0.5 '@types/estree': 1.0.5
optionalDependencies: optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.16.0 '@rollup/rollup-android-arm-eabi': 4.16.4
'@rollup/rollup-android-arm64': 4.16.0 '@rollup/rollup-android-arm64': 4.16.4
'@rollup/rollup-darwin-arm64': 4.16.0 '@rollup/rollup-darwin-arm64': 4.16.4
'@rollup/rollup-darwin-x64': 4.16.0 '@rollup/rollup-darwin-x64': 4.16.4
'@rollup/rollup-linux-arm-gnueabihf': 4.16.0 '@rollup/rollup-linux-arm-gnueabihf': 4.16.4
'@rollup/rollup-linux-arm-musleabihf': 4.16.0 '@rollup/rollup-linux-arm-musleabihf': 4.16.4
'@rollup/rollup-linux-arm64-gnu': 4.16.0 '@rollup/rollup-linux-arm64-gnu': 4.16.4
'@rollup/rollup-linux-arm64-musl': 4.16.0 '@rollup/rollup-linux-arm64-musl': 4.16.4
'@rollup/rollup-linux-powerpc64le-gnu': 4.16.0 '@rollup/rollup-linux-powerpc64le-gnu': 4.16.4
'@rollup/rollup-linux-riscv64-gnu': 4.16.0 '@rollup/rollup-linux-riscv64-gnu': 4.16.4
'@rollup/rollup-linux-s390x-gnu': 4.16.0 '@rollup/rollup-linux-s390x-gnu': 4.16.4
'@rollup/rollup-linux-x64-gnu': 4.16.0 '@rollup/rollup-linux-x64-gnu': 4.16.4
'@rollup/rollup-linux-x64-musl': 4.16.0 '@rollup/rollup-linux-x64-musl': 4.16.4
'@rollup/rollup-win32-arm64-msvc': 4.16.0 '@rollup/rollup-win32-arm64-msvc': 4.16.4
'@rollup/rollup-win32-ia32-msvc': 4.16.0 '@rollup/rollup-win32-ia32-msvc': 4.16.4
'@rollup/rollup-win32-x64-msvc': 4.16.0 '@rollup/rollup-win32-x64-msvc': 4.16.4
fsevents: 2.3.3 fsevents: 2.3.3
dev: true dev: true
@ -3483,11 +3345,6 @@ packages:
whatwg-url: 7.1.0 whatwg-url: 7.1.0
dev: true dev: true
/string-argv@0.3.2:
resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}
engines: {node: '>=0.6.19'}
dev: false
/string-width@4.2.3: /string-width@4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -3709,7 +3566,7 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
bundle-require: 4.0.2(esbuild@0.19.12) bundle-require: 4.0.3(esbuild@0.19.12)
cac: 6.7.14 cac: 6.7.14
chokidar: 3.6.0 chokidar: 3.6.0
debug: 4.3.4 debug: 4.3.4
@ -3719,7 +3576,7 @@ packages:
joycon: 3.1.1 joycon: 3.1.1
postcss-load-config: 4.0.2 postcss-load-config: 4.0.2
resolve-from: 5.0.0 resolve-from: 5.0.0
rollup: 4.16.0 rollup: 4.16.4
source-map: 0.8.0-beta.0 source-map: 0.8.0-beta.0
sucrase: 3.35.0 sucrase: 3.35.0
tree-kill: 1.2.2 tree-kill: 1.2.2
@ -3815,10 +3672,6 @@ packages:
'@fastify/busboy': 2.1.1 '@fastify/busboy': 2.1.1
dev: false dev: false
/universal-user-agent@6.0.1:
resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==}
dev: false
/update-browserslist-db@1.0.13(browserslist@4.23.0): /update-browserslist-db@1.0.13(browserslist@4.23.0):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true hasBin: true
@ -3947,6 +3800,7 @@ packages:
/wrappy@1.0.2: /wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
dev: true
/xml2js@0.5.0: /xml2js@0.5.0:
resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==}
@ -3976,8 +3830,8 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dev: true dev: true
github.com/DeterminateSystems/detsys-ts/56a244c061429692b1c7d80fc068d684db3ae4d2: github.com/DeterminateSystems/detsys-ts/5abcb239472d24b114a53f70800f0e42fc30819c:
resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/56a244c061429692b1c7d80fc068d684db3ae4d2} resolution: {tarball: https://codeload.github.com/DeterminateSystems/detsys-ts/tar.gz/5abcb239472d24b114a53f70800f0e42fc30819c}
name: detsys-ts name: detsys-ts
version: 1.0.0 version: 1.0.0
dependencies: dependencies:

53
src/helpers.ts Normal file
View file

@ -0,0 +1,53 @@
import * as actionsCore from "@actions/core";
import * as fs from "node:fs/promises";
import * as os from "node:os";
import path from "node:path";
import { Tail } from "tail";
export function tailLog(daemonDir: string): Tail {
const log = new Tail(path.join(daemonDir, "daemon.log"));
actionsCore.debug(`tailing daemon.log...`);
log.on("line", (line) => {
actionsCore.info(line);
});
return log;
}
export async function netrcPath(): Promise<string> {
const expectedNetrcPath = path.join(
process.env["RUNNER_TEMP"] || os.tmpdir(),
"determinate-nix-installer-netrc",
);
try {
await fs.access(expectedNetrcPath);
return expectedNetrcPath;
} catch {
// `nix-installer` was not used, the user may be registered with FlakeHub though.
const destinedNetrcPath = path.join(
process.env["RUNNER_TEMP"] || os.tmpdir(),
"magic-nix-cache-netrc",
);
try {
await flakeHubLogin(destinedNetrcPath);
} catch (e) {
actionsCore.info("FlakeHub cache disabled.");
actionsCore.debug(`Error while logging into FlakeHub: ${e}`);
}
return destinedNetrcPath;
}
}
async function flakeHubLogin(netrc: string): Promise<void> {
const jwt = await actionsCore.getIDToken("api.flakehub.com");
await fs.writeFile(
netrc,
[
`machine api.flakehub.com login flakehub password ${jwt}`,
`machine flakehub.com login flakehub password ${jwt}`,
`machine cache.flakehub.com login flakehub password ${jwt}`,
].join("\n"),
);
actionsCore.info("Logged in to FlakeHub.");
}

View file

@ -1,6 +1,7 @@
import * as core from "@actions/core"; import { netrcPath, tailLog } from "./helpers.js";
import { IdsToolbox } from "detsys-ts"; import * as actionsCore from "@actions/core";
import got from "got"; import { IdsToolbox, inputs } from "detsys-ts";
import got, { Got } from "got";
import * as http from "http"; import * as http from "http";
import { SpawnOptions, exec, spawn } from "node:child_process"; import { SpawnOptions, exec, spawn } from "node:child_process";
import { openSync, readFileSync } from "node:fs"; import { openSync, readFileSync } from "node:fs";
@ -8,11 +9,22 @@ import * as fs from "node:fs/promises";
import * as os from "node:os"; import * as os from "node:os";
import * as path from "node:path"; import * as path from "node:path";
import { inspect, promisify } from "node:util"; import { inspect, promisify } from "node:util";
import { Tail } from "tail";
const ENV_CACHE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR"; const ENV_CACHE_DAEMONDIR = "MAGIC_NIX_CACHE_DAEMONDIR";
const gotClient = got.extend({ class MagicNixCacheAction {
idslib: IdsToolbox;
private client: Got;
constructor() {
this.idslib = new IdsToolbox({
name: "magic-nix-cache",
fetchStyle: "gh-env-style",
idsProjectName: "magic-nix-cache-closure",
requireNix: "warn",
});
this.client = got.extend({
retry: { retry: {
limit: 1, limit: 1,
methods: ["POST", "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"], methods: ["POST", "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "TRACE"],
@ -20,47 +32,28 @@ const gotClient = got.extend({
hooks: { hooks: {
beforeRetry: [ beforeRetry: [
(error, retryCount) => { (error, retryCount) => {
core.info(`Retrying after error ${error.code}, retry #: ${retryCount}`); actionsCore.info(
`Retrying after error ${error.code}, retry #: ${retryCount}`,
);
}, },
], ],
}, },
});
async function fetchAutoCacher(toolbox: IdsToolbox): Promise<string> {
const closurePath = await toolbox.fetch();
toolbox.recordEvent("load_closure");
const { stdout } = await promisify(exec)(
`cat "${closurePath}" | xz -d | nix-store --import`,
);
const paths = stdout.split(os.EOL);
// Since the export is in reverse topologically sorted order, magic-nix-cache is always the penultimate entry in the list (the empty string left by split being the last).
const last_path = paths.at(-2);
return `${last_path}/bin/magic-nix-cache`;
}
function tailLog(daemonDir: string): Tail {
const log = new Tail(path.join(daemonDir, "daemon.log"));
core.debug(`tailing daemon.log...`);
log.on("line", (line) => {
core.info(line);
}); });
return log; }
}
async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> { async setUpAutoCache(): Promise<void> {
const tmpdir = process.env["RUNNER_TEMP"] || os.tmpdir(); const tmpdir = process.env["RUNNER_TEMP"] || os.tmpdir();
const required_env = [ const requiredEnv = [
"ACTIONS_CACHE_URL", "ACTIONS_CACHE_URL",
"ACTIONS_RUNTIME_URL", "ACTIONS_RUNTIME_URL",
"ACTIONS_RUNTIME_TOKEN", "ACTIONS_RUNTIME_TOKEN",
]; ];
let anyMissing = false; let anyMissing = false;
for (const n of required_env) { for (const n of requiredEnv) {
if (!process.env.hasOwnProperty(n)) { if (!process.env.hasOwnProperty(n)) {
anyMissing = true; anyMissing = true;
core.warning( actionsCore.warning(
`Disabling automatic caching since required environment ${n} isn't available`, `Disabling automatic caching since required environment ${n} isn't available`,
); );
} }
@ -70,19 +63,17 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
return; return;
} }
core.debug(`GitHub Action Cache URL: ${process.env["ACTIONS_CACHE_URL"]}`); actionsCore.debug(
`GitHub Action Cache URL: ${process.env["ACTIONS_CACHE_URL"]}`,
);
const daemonDir = await fs.mkdtemp(path.join(tmpdir, "magic-nix-cache-")); const daemonDir = await fs.mkdtemp(path.join(tmpdir, "magic-nix-cache-"));
const sourceBinary = inputs.getStringOrNull("source-binary");
let daemonBin: string; const daemonBin =
if (core.getInput("source-binary")) { sourceBinary !== null ? sourceBinary : await this.fetchAutoCacher();
daemonBin = core.getInput("source-binary");
} else {
daemonBin = await fetchAutoCacher(toolbox);
}
let runEnv; let runEnv;
if (core.isDebug()) { if (actionsCore.isDebug()) {
runEnv = { runEnv = {
RUST_LOG: "trace,magic_nix_cache=debug,gha_cache=debug", RUST_LOG: "trace,magic_nix_cache=debug,gha_cache=debug",
RUST_BACKTRACE: "full", RUST_BACKTRACE: "full",
@ -92,13 +83,13 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
runEnv = process.env; runEnv = process.env;
} }
const notifyPort = core.getInput("startup-notification-port"); const notifyPort = inputs.getString("startup-notification-port");
const notifyPromise = new Promise<Promise<void>>((resolveListening) => { const notifyPromise = new Promise<Promise<void>>((resolveListening) => {
const promise = new Promise<void>(async (resolveQuit) => { const promise = new Promise<void>(async (resolveQuit) => {
const notifyServer = http.createServer((req, res) => { const notifyServer = http.createServer((req, res) => {
if (req.method === "POST" && req.url === "/") { if (req.method === "POST" && req.url === "/") {
core.debug(`Notify server shutting down.`); actionsCore.debug(`Notify server shutting down.`);
res.writeHead(200, { "Content-Type": "application/json" }); res.writeHead(200, { "Content-Type": "application/json" });
res.end("{}"); res.end("{}");
notifyServer.close(() => { notifyServer.close(() => {
@ -108,7 +99,7 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
}); });
notifyServer.listen(notifyPort, () => { notifyServer.listen(notifyPort, () => {
core.debug(`Notify server running.`); actionsCore.debug(`Notify server running.`);
resolveListening(promise); resolveListening(promise);
}); });
}); });
@ -121,34 +112,43 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
const netrc = await netrcPath(); const netrc = await netrcPath();
const nixConfPath = `${process.env["HOME"]}/.config/nix/nix.conf`; const nixConfPath = `${process.env["HOME"]}/.config/nix/nix.conf`;
const hostAndPort = inputs.getString("listen");
const upstreamCache = inputs.getString("upstream-cache");
const diagnosticEndpoint = inputs.getString("diagnostic-endpoint");
const useFlakeHub = inputs.getBool("use-flakehub");
const flakeHubCacheServer = inputs.getString("flakehub-cache-server");
const flakeHubApiServer = inputs.getString("flakehub-api-server");
const flakeHubFlakeName = inputs.getString("flakehub-flake-name");
const useGhaCache = inputs.getBool("use-gha-cache");
const daemonCliFlags: string[] = [ const daemonCliFlags: string[] = [
"--startup-notification-url", "--startup-notification-url",
`http://127.0.0.1:${notifyPort}`, `http://127.0.0.1:${notifyPort}`,
"--listen", "--listen",
core.getInput("listen"), hostAndPort,
"--upstream", "--upstream",
core.getInput("upstream-cache"), upstreamCache,
"--diagnostic-endpoint", "--diagnostic-endpoint",
core.getInput("diagnostic-endpoint"), diagnosticEndpoint,
"--nix-conf", "--nix-conf",
nixConfPath, nixConfPath,
] ]
.concat( .concat(
core.getBooleanInput("use-flakehub") useFlakeHub
? [ ? [
"--use-flakehub", "--use-flakehub",
"--flakehub-cache-server", "--flakehub-cache-server",
core.getInput("flakehub-cache-server"), flakeHubCacheServer,
"--flakehub-api-server", "--flakehub-api-server",
core.getInput("flakehub-api-server"), flakeHubApiServer,
"--flakehub-api-server-netrc", "--flakehub-api-server-netrc",
netrc, netrc,
"--flakehub-flake-name", "--flakehub-flake-name",
core.getInput("flakehub-flake-name"), flakeHubFlakeName,
] ]
: [], : [],
) )
.concat(core.getBooleanInput("use-gha-cache") ? ["--use-gha-cache"] : []); .concat(useGhaCache ? ["--use-gha-cache"] : []);
const opts: SpawnOptions = { const opts: SpawnOptions = {
stdio: ["ignore", output, output], stdio: ["ignore", output, output],
@ -157,8 +157,8 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
}; };
// Display the final command for debugging purposes // Display the final command for debugging purposes
core.debug("Full daemon start command:"); actionsCore.debug("Full daemon start command:");
core.debug(`${daemonBin} ${daemonCliFlags.join(" ")}`); actionsCore.debug(`${daemonBin} ${daemonCliFlags.join(" ")}`);
// Start the server. Once it is ready, it will notify us via the notification server. // Start the server. Once it is ready, it will notify us via the notification server.
const daemon = spawn(daemonBin, daemonCliFlags, opts); const daemon = spawn(daemonBin, daemonCliFlags, opts);
@ -166,7 +166,7 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
const pidFile = path.join(daemonDir, "daemon.pid"); const pidFile = path.join(daemonDir, "daemon.pid");
await fs.writeFile(pidFile, `${daemon.pid}`); await fs.writeFile(pidFile, `${daemon.pid}`);
core.info("Waiting for magic-nix-cache to start..."); actionsCore.info("Waiting for magic-nix-cache to start...");
await new Promise<void>((resolve, reject) => { await new Promise<void>((resolve, reject) => {
notifyPromise notifyPromise
@ -191,13 +191,26 @@ async function setUpAutoCache(toolbox: IdsToolbox): Promise<void> {
daemon.unref(); daemon.unref();
core.info("Launched Magic Nix Cache"); actionsCore.info("Launched Magic Nix Cache");
core.exportVariable(ENV_CACHE_DAEMONDIR, daemonDir); actionsCore.exportVariable(ENV_CACHE_DAEMONDIR, daemonDir);
log.unwatch(); log.unwatch();
} }
async function notifyAutoCache(): Promise<void> { private async fetchAutoCacher(): Promise<string> {
const closurePath = await this.idslib.fetch();
this.idslib.recordEvent("load_closure");
const { stdout } = await promisify(exec)(
`cat "${closurePath}" | xz -d | nix-store --import`,
);
const paths = stdout.split(os.EOL);
// Since the export is in reverse topologically sorted order, magic-nix-cache is always the penultimate entry in the list (the empty string left by split being the last).
const lastPath = paths.at(-2);
return `${lastPath}/bin/magic-nix-cache`;
}
async notifyAutoCache(): Promise<void> {
const daemonDir = process.env[ENV_CACHE_DAEMONDIR]; const daemonDir = process.env[ENV_CACHE_DAEMONDIR];
if (!daemonDir) { if (!daemonDir) {
@ -205,68 +218,30 @@ async function notifyAutoCache(): Promise<void> {
} }
try { try {
core.debug(`Indicating workflow start`); actionsCore.debug(`Indicating workflow start`);
const res: Response = await gotClient const hostAndPort = inputs.getString("listen");
.post(`http://${core.getInput("listen")}/api/workflow-start`) const res: Response = await this.client
.post(`http://${hostAndPort}/api/workflow-start`)
.json(); .json();
core.debug(`back from post: ${res}`); actionsCore.debug(`back from post: ${res}`);
} catch (e) { } catch (e) {
core.info(`Error marking the workflow as started:`); actionsCore.info(`Error marking the workflow as started:`);
core.info(inspect(e)); actionsCore.info(inspect(e));
core.info(`Magic Nix Cache may not be running for this workflow.`); actionsCore.info(`Magic Nix Cache may not be running for this workflow.`);
} }
}
async function netrcPath(): Promise<string> {
const expectedNetrcPath = path.join(
process.env["RUNNER_TEMP"] || os.tmpdir(),
"determinate-nix-installer-netrc",
);
try {
await fs.access(expectedNetrcPath);
return expectedNetrcPath;
} catch {
// `nix-installer` was not used, the user may be registered with FlakeHub though.
const destinedNetrcPath = path.join(
process.env["RUNNER_TEMP"] || os.tmpdir(),
"magic-nix-cache-netrc",
);
try {
await flakehub_login(destinedNetrcPath);
} catch (e) {
core.info("FlakeHub cache disabled.");
core.debug(`Error while logging into FlakeHub: ${e}`);
} }
return destinedNetrcPath;
}
}
async function flakehub_login(netrc: string): Promise<void> { async tearDownAutoCache(): Promise<void> {
const jwt = await core.getIDToken("api.flakehub.com");
await fs.writeFile(
netrc,
[
`machine api.flakehub.com login flakehub password ${jwt}`,
`machine flakehub.com login flakehub password ${jwt}`,
`machine cache.flakehub.com login flakehub password ${jwt}`,
].join("\n"),
);
core.info("Logged in to FlakeHub.");
}
async function tearDownAutoCache(): Promise<void> {
const daemonDir = process.env[ENV_CACHE_DAEMONDIR]; const daemonDir = process.env[ENV_CACHE_DAEMONDIR];
if (!daemonDir) { if (!daemonDir) {
core.debug("magic-nix-cache not started - Skipping"); actionsCore.debug("magic-nix-cache not started - Skipping");
return; return;
} }
const pidFile = path.join(daemonDir, "daemon.pid"); const pidFile = path.join(daemonDir, "daemon.pid");
const pid = parseInt(await fs.readFile(pidFile, { encoding: "ascii" })); const pid = parseInt(await fs.readFile(pidFile, { encoding: "ascii" }));
core.debug(`found daemon pid: ${pid}`); actionsCore.debug(`found daemon pid: ${pid}`);
if (!pid) { if (!pid) {
throw new Error("magic-nix-cache did not start successfully"); throw new Error("magic-nix-cache did not start successfully");
} }
@ -274,17 +249,18 @@ async function tearDownAutoCache(): Promise<void> {
const log = tailLog(daemonDir); const log = tailLog(daemonDir);
try { try {
core.debug(`about to post to localhost`); actionsCore.debug(`about to post to localhost`);
const res: Response = await gotClient const hostAndPort = inputs.getString("listen");
.post(`http://${core.getInput("listen")}/api/workflow-finish`) const res: Response = await this.client
.post(`http://${hostAndPort}/api/workflow-finish`)
.json(); .json();
core.debug(`back from post: ${res}`); actionsCore.debug(`back from post: ${res}`);
} finally { } finally {
core.debug(`unwatching the daemon log`); actionsCore.debug(`unwatching the daemon log`);
log.unwatch(); log.unwatch();
} }
core.debug(`killing`); actionsCore.debug(`killing`);
try { try {
process.kill(pid, "SIGTERM"); process.kill(pid, "SIGTERM");
} catch (e) { } catch (e) {
@ -292,27 +268,27 @@ async function tearDownAutoCache(): Promise<void> {
throw e; throw e;
} }
} finally { } finally {
if (core.isDebug()) { if (actionsCore.isDebug()) {
core.info("Entire log:"); actionsCore.info("Entire log:");
const entireLog = readFileSync(path.join(daemonDir, "daemon.log")); const entireLog = readFileSync(path.join(daemonDir, "daemon.log"));
core.info(entireLog.toString()); actionsCore.info(entireLog.toString());
}
} }
} }
} }
const idslib = new IdsToolbox({ function main(): void {
name: "magic-nix-cache", const cacheAction = new MagicNixCacheAction();
fetchStyle: "gh-env-style",
idsProjectName: "magic-nix-cache-closure",
requireNix: "warn",
});
idslib.onMain(async () => { cacheAction.idslib.onMain(async () => {
await setUpAutoCache(idslib); await cacheAction.setUpAutoCache();
await notifyAutoCache(); await cacheAction.notifyAutoCache();
}); });
idslib.onPost(async () => { cacheAction.idslib.onPost(async () => {
await tearDownAutoCache(); await cacheAction.tearDownAutoCache();
}); });
idslib.execute(); cacheAction.idslib.execute();
}
main();