Compare commits
102
Commits
+26
-2
@@ -4,8 +4,32 @@ module.exports = {
|
|||||||
roots: ['<rootDir>/packages'],
|
roots: ['<rootDir>/packages'],
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
testMatch: ['**/__tests__/*.test.ts'],
|
testMatch: ['**/__tests__/*.test.ts'],
|
||||||
transform: {
|
moduleNameMapper: {
|
||||||
'^.+\\.ts$': ['ts-jest', {isolatedModules: true, diagnostics: {warnOnly: true}}]
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
||||||
|
'^@actions/core$': '<rootDir>/packages/core/lib/core.js',
|
||||||
|
'^@actions/exec$': '<rootDir>/packages/exec/lib/exec.js',
|
||||||
|
'^@actions/io$': '<rootDir>/packages/io/lib/io.js',
|
||||||
|
'^@actions/io/lib/io-util$': '<rootDir>/packages/io/lib/io-util.js',
|
||||||
|
'^@actions/http-client$': '<rootDir>/packages/http-client/lib/index.js',
|
||||||
|
'^@actions/http-client/lib/auth$': '<rootDir>/packages/http-client/lib/auth.js',
|
||||||
|
'^@actions/http-client/lib/interfaces$': '<rootDir>/packages/http-client/lib/interfaces.js',
|
||||||
|
'^@actions/github$': '<rootDir>/packages/github/lib/github.js',
|
||||||
|
'^@actions/github/lib/utils$': '<rootDir>/packages/github/lib/utils.js'
|
||||||
},
|
},
|
||||||
|
transform: {
|
||||||
|
'^.+\\.(ts|js)$': ['ts-jest', {
|
||||||
|
isolatedModules: true,
|
||||||
|
diagnostics: {warnOnly: true},
|
||||||
|
tsconfig: {
|
||||||
|
allowJs: true,
|
||||||
|
esModuleInterop: true,
|
||||||
|
module: 'commonjs',
|
||||||
|
moduleResolution: 'node'
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
transformIgnorePatterns: [
|
||||||
|
'/node_modules/(?!(@octokit|@actions/github|@actions/http-client|@actions/io|@actions/exec|@actions/core|universal-user-agent|before-after-hook)/)'
|
||||||
|
],
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+81
-82
@@ -2956,67 +2956,67 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "4.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
||||||
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "5.2.2",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
|
||||||
"integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==",
|
"integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^4.0.0",
|
"@octokit/auth-token": "^6.0.0",
|
||||||
"@octokit/graphql": "^7.1.0",
|
"@octokit/graphql": "^9.0.3",
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.6",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.0.2",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"before-after-hook": "^2.2.0",
|
"before-after-hook": "^4.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "9.0.6",
|
"version": "11.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
|
||||||
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
|
"integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "7.1.1",
|
"version": "9.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
|
||||||
"integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==",
|
"integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.6",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "24.2.0",
|
"version": "27.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
|
||||||
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
@@ -3028,36 +3028,19 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "9.2.2",
|
"version": "14.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
|
||||||
"integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
|
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^16.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=6"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-request-log": {
|
"node_modules/@octokit/plugin-request-log": {
|
||||||
@@ -3105,34 +3088,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "8.4.1",
|
"version": "10.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz",
|
||||||
"integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
|
"integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^9.0.6",
|
"@octokit/endpoint": "^11.0.2",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.0.2",
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"fast-content-type-parse": "^3.0.0",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "5.1.1",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
|
||||||
"integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
|
"integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^16.0.0"
|
||||||
"deprecation": "^2.0.0",
|
|
||||||
"once": "^1.4.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/rest": {
|
"node_modules/@octokit/rest": {
|
||||||
@@ -3152,13 +3134,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "13.10.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
|
||||||
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
"@octokit/openapi-types": "^27.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@parcel/watcher": {
|
"node_modules/@parcel/watcher": {
|
||||||
@@ -4516,9 +4498,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
"node_modules/before-after-hook": {
|
||||||
"version": "2.2.3",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz",
|
||||||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
|
"integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
},
|
},
|
||||||
@@ -6986,6 +6968,23 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fast-content-type-parse": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/fastify"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/fastify"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/fast-deep-equal": {
|
"node_modules/fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
@@ -10762,9 +10761,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.23",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
@@ -15859,9 +15858,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
"version": "6.0.1",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
|
||||||
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==",
|
"integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-4
@@ -36,10 +36,10 @@
|
|||||||
"overrides": {
|
"overrides": {
|
||||||
"semver": "^7.6.0",
|
"semver": "^7.6.0",
|
||||||
"tar": "^6.2.1",
|
"tar": "^6.2.1",
|
||||||
"@octokit/plugin-paginate-rest": "^9.2.2",
|
"@octokit/plugin-paginate-rest": "^14.0.0",
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.7",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.1.0",
|
||||||
"@octokit/core": "^5.0.3",
|
"@octokit/core": "^7.0.6",
|
||||||
"tmp": "^0.2.4",
|
"tmp": "^0.2.4",
|
||||||
"@types/node": "^24.1.0",
|
"@types/node": "^24.1.0",
|
||||||
"brace-expansion": "^2.0.2",
|
"brace-expansion": "^2.0.2",
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ Interact programmatically with [Actions Artifacts](https://docs.github.com/en/ac
|
|||||||
|
|
||||||
This is the core library that powers the [`@actions/upload-artifact`](https://github.com/actions/upload-artifact) and [`@actions/download-artifact`](https://github.com/actions/download-artifact) actions.
|
This is the core library that powers the [`@actions/upload-artifact`](https://github.com/actions/upload-artifact) and [`@actions/download-artifact`](https://github.com/actions/download-artifact) actions.
|
||||||
|
|
||||||
|
|
||||||
- [`@actions/artifact`](#actionsartifact)
|
- [`@actions/artifact`](#actionsartifact)
|
||||||
- [v2 - What's New](#v2---whats-new)
|
- [v2 - What's New](#v2---whats-new)
|
||||||
- [Improvements](#improvements)
|
- [Improvements](#improvements)
|
||||||
|
|||||||
@@ -1,129 +1,144 @@
|
|||||||
# @actions/artifact Releases
|
# @actions/artifact Releases
|
||||||
|
|
||||||
### 4.0.0
|
## 5.0.3
|
||||||
|
|
||||||
|
- Bump `@actions/http-client` to `3.0.2`
|
||||||
|
|
||||||
|
## 5.0.1
|
||||||
|
|
||||||
|
- Fix Node.js 24 punycode deprecation warning by updating `@azure/storage-blob` from `^12.15.0` to `^12.29.1` [#2211](https://github.com/actions/toolkit/pull/2211)
|
||||||
|
- Removed direct `@azure/core-http` dependency (now uses `@azure/core-rest-pipeline` via storage-blob)
|
||||||
|
|
||||||
|
## 5.0.0
|
||||||
|
|
||||||
|
- Dependency updates for Node.js 24 runtime support
|
||||||
|
- Update `@actions/core` to v2
|
||||||
|
- Update `@actions/http-client` to v3
|
||||||
|
|
||||||
|
## 4.0.0
|
||||||
|
|
||||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||||
- Fix: artifact pagination bugs and configurable artifact count limits [#2165](https://github.com/actions/toolkit/pull/2165)
|
- Fix: artifact pagination bugs and configurable artifact count limits [#2165](https://github.com/actions/toolkit/pull/2165)
|
||||||
- Fix: reject the promise on timeout [#2124](https://github.com/actions/toolkit/pull/2124)
|
- Fix: reject the promise on timeout [#2124](https://github.com/actions/toolkit/pull/2124)
|
||||||
- Update dependency versions
|
- Update dependency versions
|
||||||
|
|
||||||
### 2.3.3
|
## 2.3.3
|
||||||
|
|
||||||
- Dependency updates [#2049](https://github.com/actions/toolkit/pull/2049)
|
- Dependency updates [#2049](https://github.com/actions/toolkit/pull/2049)
|
||||||
|
|
||||||
### 2.3.2
|
## 2.3.2
|
||||||
|
|
||||||
- Added masking for Shared Access Signature (SAS) artifact URLs [#1982](https://github.com/actions/toolkit/pull/1982)
|
- Added masking for Shared Access Signature (SAS) artifact URLs [#1982](https://github.com/actions/toolkit/pull/1982)
|
||||||
- Change hash to digest for consistent terminology across runner logs [#1991](https://github.com/actions/toolkit/pull/1991)
|
- Change hash to digest for consistent terminology across runner logs [#1991](https://github.com/actions/toolkit/pull/1991)
|
||||||
|
|
||||||
### 2.3.1
|
## 2.3.1
|
||||||
|
|
||||||
- Fix comment typo on expectedHash. [#1986](https://github.com/actions/toolkit/pull/1986)
|
- Fix comment typo on expectedHash. [#1986](https://github.com/actions/toolkit/pull/1986)
|
||||||
|
|
||||||
### 2.3.0
|
## 2.3.0
|
||||||
|
|
||||||
- Allow ArtifactClient to perform digest comparisons, if supplied. [#1975](https://github.com/actions/toolkit/pull/1975)
|
- Allow ArtifactClient to perform digest comparisons, if supplied. [#1975](https://github.com/actions/toolkit/pull/1975)
|
||||||
|
|
||||||
### 2.2.2
|
## 2.2.2
|
||||||
|
|
||||||
- Default concurrency to 5 for uploading artifacts [#1962](https://github.com/actions/toolkit/pull/1962)
|
- Default concurrency to 5 for uploading artifacts [#1962](https://github.com/actions/toolkit/pull/1962)
|
||||||
|
|
||||||
### 2.2.1
|
## 2.2.1
|
||||||
|
|
||||||
- Add `ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY` and `ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS` environment variables [#1928](https://github.com/actions/toolkit/pull/1928)
|
- Add `ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY` and `ACTIONS_ARTIFACT_UPLOAD_TIMEOUT_MS` environment variables [#1928](https://github.com/actions/toolkit/pull/1928)
|
||||||
|
|
||||||
### 2.2.0
|
## 2.2.0
|
||||||
|
|
||||||
- Return artifact digest on upload [#1896](https://github.com/actions/toolkit/pull/1896)
|
- Return artifact digest on upload [#1896](https://github.com/actions/toolkit/pull/1896)
|
||||||
|
|
||||||
### 2.1.11
|
## 2.1.11
|
||||||
|
|
||||||
- Fixed a bug with relative symlinks resolution [#1844](https://github.com/actions/toolkit/pull/1844)
|
- Fixed a bug with relative symlinks resolution [#1844](https://github.com/actions/toolkit/pull/1844)
|
||||||
- Use native `crypto` [#1815](https://github.com/actions/toolkit/pull/1815)
|
- Use native `crypto` [#1815](https://github.com/actions/toolkit/pull/1815)
|
||||||
|
|
||||||
### 2.1.10
|
## 2.1.10
|
||||||
|
|
||||||
- Fixed a regression with symlinks not being automatically resolved [#1830](https://github.com/actions/toolkit/pull/1830)
|
- Fixed a regression with symlinks not being automatically resolved [#1830](https://github.com/actions/toolkit/pull/1830)
|
||||||
- Fixed a regression with chunk timeout [#1786](https://github.com/actions/toolkit/pull/1786)
|
- Fixed a regression with chunk timeout [#1786](https://github.com/actions/toolkit/pull/1786)
|
||||||
|
|
||||||
### 2.1.9
|
## 2.1.9
|
||||||
|
|
||||||
- Fixed artifact upload chunk timeout logic [#1774](https://github.com/actions/toolkit/pull/1774)
|
- Fixed artifact upload chunk timeout logic [#1774](https://github.com/actions/toolkit/pull/1774)
|
||||||
- Use lazy stream to prevent issues with open file limits [#1771](https://github.com/actions/toolkit/pull/1771)
|
- Use lazy stream to prevent issues with open file limits [#1771](https://github.com/actions/toolkit/pull/1771)
|
||||||
|
|
||||||
### 2.1.8
|
## 2.1.8
|
||||||
|
|
||||||
- Allows `*.localhost` domains for hostname checks for local development.
|
- Allows `*.localhost` domains for hostname checks for local development.
|
||||||
|
|
||||||
### 2.1.7
|
## 2.1.7
|
||||||
|
|
||||||
- Update unzip-stream dependency and reverted to using `unzip.Extract()`
|
- Update unzip-stream dependency and reverted to using `unzip.Extract()`
|
||||||
|
|
||||||
### 2.1.6
|
## 2.1.6
|
||||||
|
|
||||||
- Will retry on invalid request responses.
|
- Will retry on invalid request responses.
|
||||||
|
|
||||||
### 2.1.5
|
## 2.1.5
|
||||||
|
|
||||||
- Bumped `archiver` dependency to 7.0.1
|
- Bumped `archiver` dependency to 7.0.1
|
||||||
|
|
||||||
### 2.1.4
|
## 2.1.4
|
||||||
|
|
||||||
- Adds info-level logging for zip extraction
|
- Adds info-level logging for zip extraction
|
||||||
|
|
||||||
### 2.1.3
|
## 2.1.3
|
||||||
|
|
||||||
- Fixes a bug in the extract logic updated in 2.1.2
|
- Fixes a bug in the extract logic updated in 2.1.2
|
||||||
|
|
||||||
### 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
- Updated the stream extract functionality to use `unzip.Parse()` instead of `unzip.Extract()` for greater control of unzipping artifacts
|
- Updated the stream extract functionality to use `unzip.Parse()` instead of `unzip.Extract()` for greater control of unzipping artifacts
|
||||||
|
|
||||||
### 2.1.1
|
## 2.1.1
|
||||||
|
|
||||||
- Updated `isGhes` check to include `.ghe.com` and `.ghe.localhost` as accepted hosts
|
- Updated `isGhes` check to include `.ghe.com` and `.ghe.localhost` as accepted hosts
|
||||||
|
|
||||||
### 2.1.0
|
## 2.1.0
|
||||||
|
|
||||||
- Added `ArtifactClient#deleteArtifact` to delete artifacts by name [#1626](https://github.com/actions/toolkit/pull/1626)
|
- Added `ArtifactClient#deleteArtifact` to delete artifacts by name [#1626](https://github.com/actions/toolkit/pull/1626)
|
||||||
- Update error messaging to be more useful [#1628](https://github.com/actions/toolkit/pull/1628)
|
- Update error messaging to be more useful [#1628](https://github.com/actions/toolkit/pull/1628)
|
||||||
|
|
||||||
### 2.0.1
|
## 2.0.1
|
||||||
|
|
||||||
- Patch to fix transient request timeouts https://github.com/actions/download-artifact/issues/249
|
- Patch to fix transient request timeouts <https://github.com/actions/download-artifact/issues/249>
|
||||||
|
|
||||||
### 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
- Major release. Supports new Artifact backend for improved speed, reliability and behavior.
|
- Major release. Supports new Artifact backend for improved speed, reliability and behavior.
|
||||||
- Numerous API changes, [some breaking](./README.md#breaking-changes).
|
- Numerous API changes, [some breaking](./README.md#breaking-changes).
|
||||||
|
|
||||||
- [Blog post with more info](https://github.blog/2024-02-12-get-started-with-v4-of-github-actions-artifacts/)
|
- [Blog post with more info](https://github.blog/2024-02-12-get-started-with-v4-of-github-actions-artifacts/)
|
||||||
|
|
||||||
### 1.1.1
|
## 1.1.1
|
||||||
|
|
||||||
- Fixed a bug in Node16 where if an HTTP download finished too quickly (<1ms, e.g. when it's mocked) we attempt to delete a temp file that has not been created yet [#1278](https://github.com/actions/toolkit/pull/1278/commits/b9de68a590daf37c6747e38d3cb4f1dd2cfb791c)
|
- Fixed a bug in Node16 where if an HTTP download finished too quickly (<1ms, e.g. when it's mocked) we attempt to delete a temp file that has not been created yet [#1278](https://github.com/actions/toolkit/pull/1278/commits/b9de68a590daf37c6747e38d3cb4f1dd2cfb791c)
|
||||||
|
|
||||||
### 1.1.0
|
## 1.1.0
|
||||||
|
|
||||||
- Add `x-actions-results-crc64` and `x-actions-results-md5` checksum headers on upload [#1063](https://github.com/actions/toolkit/pull/1063)
|
- Add `x-actions-results-crc64` and `x-actions-results-md5` checksum headers on upload [#1063](https://github.com/actions/toolkit/pull/1063)
|
||||||
|
|
||||||
### 1.0.2
|
## 1.0.2
|
||||||
|
|
||||||
- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
|
- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
|
||||||
|
|
||||||
### 1.0.1
|
## 1.0.1
|
||||||
|
|
||||||
- Update to v2.0.0 of `@actions/http-client`
|
- Update to v2.0.0 of `@actions/http-client`
|
||||||
|
|
||||||
### 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1009](https://github.com/actions/toolkit/pull/1009)
|
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1009](https://github.com/actions/toolkit/pull/1009)
|
||||||
|
|
||||||
### 0.6.1
|
## 0.6.1
|
||||||
|
|
||||||
- Fix for failing 0 byte file uploads on Windows [#962](https://github.com/actions/toolkit/pull/962)
|
- Fix for failing 0 byte file uploads on Windows [#962](https://github.com/actions/toolkit/pull/962)
|
||||||
|
|
||||||
### 0.6.0
|
## 0.6.0
|
||||||
|
|
||||||
- Support upload from named pipes [#748](https://github.com/actions/toolkit/pull/748)
|
- Support upload from named pipes [#748](https://github.com/actions/toolkit/pull/748)
|
||||||
- Fixes to percentage values being greater than 100% when downloading all artifacts [#889](https://github.com/actions/toolkit/pull/889)
|
- Fixes to percentage values being greater than 100% when downloading all artifacts [#889](https://github.com/actions/toolkit/pull/889)
|
||||||
@@ -132,49 +147,49 @@
|
|||||||
- Faster upload speeds for certain types of large files by exempting gzip compression [#956](https://github.com/actions/toolkit/pull/956)
|
- Faster upload speeds for certain types of large files by exempting gzip compression [#956](https://github.com/actions/toolkit/pull/956)
|
||||||
- More detailed logging when dealing with chunked uploads [#957](https://github.com/actions/toolkit/pull/957)
|
- More detailed logging when dealing with chunked uploads [#957](https://github.com/actions/toolkit/pull/957)
|
||||||
|
|
||||||
### 0.5.2
|
## 0.5.2
|
||||||
|
|
||||||
- Add HTTP 500 as a retryable status code for artifact upload and download.
|
- Add HTTP 500 as a retryable status code for artifact upload and download.
|
||||||
|
|
||||||
### 0.5.1
|
## 0.5.1
|
||||||
|
|
||||||
- Bump @actions/http-client to version 1.0.11 to fix proxy related issues during artifact upload and download
|
- Bump @actions/http-client to version 1.0.11 to fix proxy related issues during artifact upload and download
|
||||||
|
|
||||||
### 0.5.0
|
## 0.5.0
|
||||||
|
|
||||||
- Improved retry-ability for all http calls during artifact upload and download if an error is encountered
|
- Improved retry-ability for all http calls during artifact upload and download if an error is encountered
|
||||||
|
|
||||||
### 0.4.2
|
## 0.4.2
|
||||||
|
|
||||||
- Improved retry-ability when a partial artifact download is encountered
|
- Improved retry-ability when a partial artifact download is encountered
|
||||||
|
|
||||||
### 0.4.1
|
## 0.4.1
|
||||||
|
|
||||||
- Update to latest @actions/core version
|
- Update to latest @actions/core version
|
||||||
|
|
||||||
### 0.4.0
|
## 0.4.0
|
||||||
|
|
||||||
- Add option to specify custom retentions on artifacts
|
- Add option to specify custom retentions on artifacts
|
||||||
-
|
|
||||||
### 0.3.5
|
## 0.3.5
|
||||||
|
|
||||||
- Retry in the event of a 413 response
|
- Retry in the event of a 413 response
|
||||||
|
|
||||||
### 0.3.3
|
## 0.3.3
|
||||||
|
|
||||||
- Increase chunk size during upload from 4MB to 8MB
|
- Increase chunk size during upload from 4MB to 8MB
|
||||||
- Improve user-agent strings during API calls to help internally diagnose issues
|
- Improve user-agent strings during API calls to help internally diagnose issues
|
||||||
|
|
||||||
### 0.3.2
|
## 0.3.2
|
||||||
|
|
||||||
- Fix to ensure readstreams get correctly reset in the event of a retry
|
- Fix to ensure readstreams get correctly reset in the event of a retry
|
||||||
|
|
||||||
### 0.3.1
|
## 0.3.1
|
||||||
|
|
||||||
- Fix to ensure temporary gzip files get correctly deleted during artifact upload
|
- Fix to ensure temporary gzip files get correctly deleted during artifact upload
|
||||||
- Remove spaces as a forbidden character during upload
|
- Remove spaces as a forbidden character during upload
|
||||||
|
|
||||||
### 0.3.0
|
## 0.3.0
|
||||||
|
|
||||||
- Fixes to gzip decompression when downloading artifacts
|
- Fixes to gzip decompression when downloading artifacts
|
||||||
- Support handling 429 response codes
|
- Support handling 429 response codes
|
||||||
@@ -183,13 +198,13 @@
|
|||||||
- Clearer error message if storage quota has been reached
|
- Clearer error message if storage quota has been reached
|
||||||
- Improved logging and output during artifact download
|
- Improved logging and output during artifact download
|
||||||
|
|
||||||
### 0.2.0
|
## 0.2.0
|
||||||
|
|
||||||
- Fixes to TCP connections not closing
|
- Fixes to TCP connections not closing
|
||||||
- GZip file compression to speed up downloads
|
- GZip file compression to speed up downloads
|
||||||
- Improved logging and output
|
- Improved logging and output
|
||||||
- Extra documentation
|
- Extra documentation
|
||||||
|
|
||||||
### 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import * as http from 'http'
|
import * as http from 'http'
|
||||||
import * as net from 'net'
|
import * as net from 'net'
|
||||||
import {HttpClient} from '@actions/http-client'
|
import {HttpClient} from '@actions/http-client'
|
||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import {internalArtifactTwirpClient} from '../src/internal/shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../src/internal/shared/artifact-twirp-client.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
import {NetworkError, UsageError} from '../src/internal/shared/errors'
|
import {NetworkError, UsageError} from '../src/internal/shared/errors.js'
|
||||||
|
|
||||||
jest.mock('@actions/http-client')
|
jest.mock('@actions/http-client')
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import os from 'os'
|
import os from 'os'
|
||||||
|
|
||||||
// Mock the `cpus()` function in the `os` module
|
// Mock the `cpus()` function in the `os` module
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import type {RequestInterface} from '@octokit/types'
|
|||||||
import {
|
import {
|
||||||
deleteArtifactInternal,
|
deleteArtifactInternal,
|
||||||
deleteArtifactPublic
|
deleteArtifactPublic
|
||||||
} from '../src/internal/delete/delete-artifact'
|
} from '../src/internal/delete/delete-artifact.js'
|
||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import {ArtifactServiceClientJSON, Timestamp} from '../src/generated'
|
import {ArtifactServiceClientJSON, Timestamp} from '../src/generated/index.js'
|
||||||
import * as util from '../src/internal/shared/util'
|
import * as util from '../src/internal/shared/util.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
|
|
||||||
type MockedRequest = jest.MockedFunction<RequestInterface<object>>
|
type MockedRequest = jest.MockedFunction<RequestInterface<object>>
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import {
|
|||||||
downloadArtifactInternal,
|
downloadArtifactInternal,
|
||||||
downloadArtifactPublic,
|
downloadArtifactPublic,
|
||||||
streamExtractExternal
|
streamExtractExternal
|
||||||
} from '../src/internal/download/download-artifact'
|
} from '../src/internal/download/download-artifact.js'
|
||||||
import {getUserAgentString} from '../src/internal/shared/user-agent'
|
import {getUserAgentString} from '../src/internal/shared/user-agent.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import {ArtifactServiceClientJSON} from '../src/generated'
|
import {ArtifactServiceClientJSON} from '../src/generated/index.js'
|
||||||
import * as util from '../src/internal/shared/util'
|
import * as util from '../src/internal/shared/util.js'
|
||||||
|
|
||||||
type MockedDownloadArtifact = jest.MockedFunction<
|
type MockedDownloadArtifact = jest.MockedFunction<
|
||||||
RestEndpointMethods['actions']['downloadArtifact']
|
RestEndpointMethods['actions']['downloadArtifact']
|
||||||
|
|||||||
@@ -3,15 +3,15 @@ import type {RequestInterface} from '@octokit/types'
|
|||||||
import {
|
import {
|
||||||
getArtifactInternal,
|
getArtifactInternal,
|
||||||
getArtifactPublic
|
getArtifactPublic
|
||||||
} from '../src/internal/find/get-artifact'
|
} from '../src/internal/find/get-artifact.js'
|
||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import {ArtifactServiceClientJSON, Timestamp} from '../src/generated'
|
import {ArtifactServiceClientJSON, Timestamp} from '../src/generated/index.js'
|
||||||
import * as util from '../src/internal/shared/util'
|
import * as util from '../src/internal/shared/util.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
import {
|
import {
|
||||||
ArtifactNotFoundError,
|
ArtifactNotFoundError,
|
||||||
InvalidResponseError
|
InvalidResponseError
|
||||||
} from '../src/internal/shared/errors'
|
} from '../src/internal/shared/errors.js'
|
||||||
|
|
||||||
type MockedRequest = jest.MockedFunction<RequestInterface<object>>
|
type MockedRequest = jest.MockedFunction<RequestInterface<object>>
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import type {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-method
|
|||||||
import {
|
import {
|
||||||
listArtifactsInternal,
|
listArtifactsInternal,
|
||||||
listArtifactsPublic
|
listArtifactsPublic
|
||||||
} from '../src/internal/find/list-artifacts'
|
} from '../src/internal/find/list-artifacts.js'
|
||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import {ArtifactServiceClientJSON, Timestamp} from '../src/generated'
|
import {ArtifactServiceClientJSON, Timestamp} from '../src/generated/index.js'
|
||||||
import * as util from '../src/internal/shared/util'
|
import * as util from '../src/internal/shared/util.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
import {Artifact} from '../src/internal/shared/interfaces'
|
import {Artifact} from '../src/internal/shared/interfaces.js'
|
||||||
import {RequestInterface} from '@octokit/types'
|
import {RequestInterface} from '@octokit/types'
|
||||||
|
|
||||||
type MockedRequest = jest.MockedFunction<RequestInterface<object>>
|
type MockedRequest = jest.MockedFunction<RequestInterface<object>>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
validateArtifactName,
|
validateArtifactName,
|
||||||
validateFilePath
|
validateFilePath
|
||||||
} from '../src/internal/upload/path-and-artifact-name-validation'
|
} from '../src/internal/upload/path-and-artifact-name-validation.js'
|
||||||
|
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
|
|
||||||
describe('Path and artifact name validation', () => {
|
describe('Path and artifact name validation', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {Timestamp} from '../src/generated'
|
import {Timestamp} from '../src/generated/index.js'
|
||||||
import * as retention from '../src/internal/upload/retention'
|
import * as retention from '../src/internal/upload/retention.js'
|
||||||
|
|
||||||
describe('retention', () => {
|
describe('retention', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import * as uploadZipSpecification from '../src/internal/upload/upload-zip-specification'
|
import * as uploadZipSpecification from '../src/internal/upload/upload-zip-specification.js'
|
||||||
import * as zip from '../src/internal/upload/zip'
|
import * as zip from '../src/internal/upload/zip.js'
|
||||||
import * as util from '../src/internal/shared/util'
|
import * as util from '../src/internal/shared/util.js'
|
||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import {ArtifactServiceClientJSON} from '../src/generated'
|
import {ArtifactServiceClientJSON} from '../src/generated/index.js'
|
||||||
import * as blobUpload from '../src/internal/upload/blob-upload'
|
import * as blobUpload from '../src/internal/upload/blob-upload.js'
|
||||||
import {uploadArtifact} from '../src/internal/upload/upload-artifact'
|
import {uploadArtifact} from '../src/internal/upload/upload-artifact.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
import {FilesNotFoundError} from '../src/internal/shared/errors'
|
import {FilesNotFoundError} from '../src/internal/shared/errors.js'
|
||||||
import {BlockBlobUploadStreamOptions} from '@azure/storage-blob'
|
import {BlockBlobUploadStreamOptions} from '@azure/storage-blob'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import {promises as fs} from 'fs'
|
|||||||
import {
|
import {
|
||||||
getUploadZipSpecification,
|
getUploadZipSpecification,
|
||||||
validateRootDirectory
|
validateRootDirectory
|
||||||
} from '../src/internal/upload/upload-zip-specification'
|
} from '../src/internal/upload/upload-zip-specification.js'
|
||||||
import {noopLogs} from './common'
|
import {noopLogs} from './common.js'
|
||||||
|
|
||||||
const root = path.join(__dirname, '_temp', 'upload-specification')
|
const root = path.join(__dirname, '_temp', 'upload-specification')
|
||||||
const goodItem1Path = path.join(
|
const goodItem1Path = path.join(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as config from '../src/internal/shared/config'
|
import * as config from '../src/internal/shared/config.js'
|
||||||
import * as util from '../src/internal/shared/util'
|
import * as util from '../src/internal/shared/util.js'
|
||||||
import {maskSigUrl, maskSecretUrls} from '../src/internal/shared/util'
|
import {maskSigUrl, maskSecretUrls} from '../src/internal/shared/util.js'
|
||||||
import {setSecret, debug} from '@actions/core'
|
import {setSecret, debug} from '@actions/core'
|
||||||
|
|
||||||
export const testRuntimeToken =
|
export const testRuntimeToken =
|
||||||
|
|||||||
Generated
+267
-935
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/artifact",
|
"name": "@actions/artifact",
|
||||||
"version": "4.0.0",
|
"version": "6.0.0",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Actions artifact lib",
|
"description": "Actions artifact lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -10,8 +10,15 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/artifact",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/artifact",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/artifact.js",
|
"main": "lib/artifact.js",
|
||||||
"types": "lib/artifact.d.ts",
|
"types": "lib/artifact.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./lib/artifact.d.ts",
|
||||||
|
"import": "./lib/artifact.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -32,7 +39,7 @@
|
|||||||
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
|
"audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json",
|
||||||
"test": "cd ../../ && npm run test ./packages/artifact",
|
"test": "cd ../../ && npm run test ./packages/artifact",
|
||||||
"bootstrap": "cd ../../ && npm run bootstrap",
|
"bootstrap": "cd ../../ && npm run bootstrap",
|
||||||
"tsc-run": "tsc",
|
"tsc-run": "tsc && cp src/internal/shared/package-version.cjs lib/internal/shared/",
|
||||||
"tsc": "npm run bootstrap && npm run tsc-run",
|
"tsc": "npm run bootstrap && npm run tsc-run",
|
||||||
"gen:docs": "typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"
|
"gen:docs": "typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"
|
||||||
},
|
},
|
||||||
@@ -40,27 +47,27 @@
|
|||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^2.0.0",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/github": "^6.0.1",
|
"@actions/github": "^9.0.0",
|
||||||
"@actions/http-client": "^3.0.0",
|
"@actions/http-client": "^4.0.0",
|
||||||
"@azure/core-http": "^3.0.5",
|
"@azure/storage-blob": "^12.30.0",
|
||||||
"@azure/storage-blob": "^12.15.0",
|
"@octokit/core": "^7.0.6",
|
||||||
"@octokit/core": "^5.2.1",
|
"@octokit/plugin-request-log": "^6.0.0",
|
||||||
"@octokit/plugin-request-log": "^1.0.4",
|
"@octokit/plugin-retry": "^8.0.0",
|
||||||
"@octokit/plugin-retry": "^3.0.9",
|
"@octokit/request": "^10.0.7",
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request-error": "^7.1.0",
|
||||||
"@octokit/request-error": "^5.1.1",
|
|
||||||
"@protobuf-ts/plugin": "^2.2.3-alpha.1",
|
"@protobuf-ts/plugin": "^2.2.3-alpha.1",
|
||||||
|
"@protobuf-ts/runtime": "^2.9.4",
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
"jwt-decode": "^3.1.2",
|
"jwt-decode": "^4.0.0",
|
||||||
"unzip-stream": "^0.3.1"
|
"unzip-stream": "^0.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/archiver": "^5.3.2",
|
"@types/archiver": "^7.0.0",
|
||||||
"@types/unzip-stream": "^0.3.4",
|
"@types/unzip-stream": "^0.3.4",
|
||||||
"typedoc": "^0.28.13",
|
"typedoc": "^0.28.16",
|
||||||
"typedoc-plugin-markdown": "^3.17.1",
|
"typedoc-plugin-markdown": "^4.9.0",
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.9.3"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"uri-js": "npm:uri-js-replace@^1.0.1",
|
"uri-js": "npm:uri-js-replace@^1.0.1",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {ArtifactClient, DefaultArtifactClient} from './internal/client'
|
import {ArtifactClient, DefaultArtifactClient} from './internal/client.js'
|
||||||
|
|
||||||
export * from './internal/shared/interfaces'
|
export * from './internal/shared/interfaces.js'
|
||||||
export * from './internal/shared/errors'
|
export * from './internal/shared/errors.js'
|
||||||
export * from './internal/client'
|
export * from './internal/client.js'
|
||||||
|
|
||||||
const client: ArtifactClient = new DefaultArtifactClient()
|
const client: ArtifactClient = new DefaultArtifactClient()
|
||||||
export default client
|
export default client
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export * from './google/protobuf/timestamp'
|
export * from './google/protobuf/timestamp.js'
|
||||||
export * from './google/protobuf/wrappers'
|
export * from './google/protobuf/wrappers.js'
|
||||||
export * from './results/api/v1/artifact'
|
export * from './results/api/v1/artifact.js'
|
||||||
export * from './results/api/v1/artifact.twirp-client'
|
export * from './results/api/v1/artifact.twirp-client.js'
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
|||||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||||
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
||||||
import { MessageType } from "@protobuf-ts/runtime";
|
import { MessageType } from "@protobuf-ts/runtime";
|
||||||
import { Int64Value } from "../../../google/protobuf/wrappers";
|
import { Int64Value } from "../../../google/protobuf/wrappers.js";
|
||||||
import { StringValue } from "../../../google/protobuf/wrappers";
|
import { StringValue } from "../../../google/protobuf/wrappers.js";
|
||||||
import { Timestamp } from "../../../google/protobuf/timestamp";
|
import { Timestamp } from "../../../google/protobuf/timestamp.js";
|
||||||
/**
|
/**
|
||||||
* @generated from protobuf message github.actions.results.api.v1.MigrateArtifactRequest
|
* @generated from protobuf message github.actions.results.api.v1.MigrateArtifactRequest
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
GetSignedArtifactURLResponse,
|
GetSignedArtifactURLResponse,
|
||||||
DeleteArtifactRequest,
|
DeleteArtifactRequest,
|
||||||
DeleteArtifactResponse,
|
DeleteArtifactResponse,
|
||||||
} from "./artifact";
|
} from "./artifact.js";
|
||||||
|
|
||||||
//==================================//
|
//==================================//
|
||||||
// Client Code //
|
// Client Code //
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {warning} from '@actions/core'
|
import {warning} from '@actions/core'
|
||||||
import {isGhes} from './shared/config'
|
import {isGhes} from './shared/config.js'
|
||||||
import {
|
import {
|
||||||
UploadArtifactOptions,
|
UploadArtifactOptions,
|
||||||
UploadArtifactResponse,
|
UploadArtifactResponse,
|
||||||
@@ -10,19 +10,22 @@ import {
|
|||||||
DownloadArtifactResponse,
|
DownloadArtifactResponse,
|
||||||
FindOptions,
|
FindOptions,
|
||||||
DeleteArtifactResponse
|
DeleteArtifactResponse
|
||||||
} from './shared/interfaces'
|
} from './shared/interfaces.js'
|
||||||
import {uploadArtifact} from './upload/upload-artifact'
|
import {uploadArtifact} from './upload/upload-artifact.js'
|
||||||
import {
|
import {
|
||||||
downloadArtifactPublic,
|
downloadArtifactPublic,
|
||||||
downloadArtifactInternal
|
downloadArtifactInternal
|
||||||
} from './download/download-artifact'
|
} from './download/download-artifact.js'
|
||||||
import {
|
import {
|
||||||
deleteArtifactPublic,
|
deleteArtifactPublic,
|
||||||
deleteArtifactInternal
|
deleteArtifactInternal
|
||||||
} from './delete/delete-artifact'
|
} from './delete/delete-artifact.js'
|
||||||
import {getArtifactPublic, getArtifactInternal} from './find/get-artifact'
|
import {getArtifactPublic, getArtifactInternal} from './find/get-artifact.js'
|
||||||
import {listArtifactsPublic, listArtifactsInternal} from './find/list-artifacts'
|
import {
|
||||||
import {GHESNotSupportedError} from './shared/errors'
|
listArtifactsPublic,
|
||||||
|
listArtifactsInternal
|
||||||
|
} from './find/list-artifacts.js'
|
||||||
|
import {GHESNotSupportedError} from './shared/errors.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic interface for the artifact client.
|
* Generic interface for the artifact client.
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
import {info, debug} from '@actions/core'
|
import {info, debug} from '@actions/core'
|
||||||
import {getOctokit} from '@actions/github'
|
import {getOctokit} from '@actions/github'
|
||||||
import {DeleteArtifactResponse} from '../shared/interfaces'
|
import {DeleteArtifactResponse} from '../shared/interfaces.js'
|
||||||
import {getUserAgentString} from '../shared/user-agent'
|
import {getUserAgentString} from '../shared/user-agent.js'
|
||||||
import {getRetryOptions} from '../find/retry-options'
|
import {getRetryOptions} from '../find/retry-options.js'
|
||||||
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
||||||
import {requestLog} from '@octokit/plugin-request-log'
|
import {requestLog} from '@octokit/plugin-request-log'
|
||||||
import {retry} from '@octokit/plugin-retry'
|
import {retry} from '@octokit/plugin-retry'
|
||||||
import {OctokitOptions} from '@octokit/core/dist-types/types'
|
import type {OctokitOptions} from '@octokit/core/types'
|
||||||
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client.js'
|
||||||
import {getBackendIdsFromToken} from '../shared/util'
|
import {getBackendIdsFromToken} from '../shared/util.js'
|
||||||
import {
|
import {
|
||||||
DeleteArtifactRequest,
|
DeleteArtifactRequest,
|
||||||
ListArtifactsRequest,
|
ListArtifactsRequest,
|
||||||
StringValue
|
StringValue
|
||||||
} from '../../generated'
|
} from '../../generated/index.js'
|
||||||
import {getArtifactPublic} from '../find/get-artifact'
|
import {getArtifactPublic} from '../find/get-artifact.js'
|
||||||
import {ArtifactNotFoundError, InvalidResponseError} from '../shared/errors'
|
import {ArtifactNotFoundError, InvalidResponseError} from '../shared/errors.js'
|
||||||
|
|
||||||
export async function deleteArtifactPublic(
|
export async function deleteArtifactPublic(
|
||||||
artifactName: string,
|
artifactName: string,
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ import {
|
|||||||
DownloadArtifactOptions,
|
DownloadArtifactOptions,
|
||||||
DownloadArtifactResponse,
|
DownloadArtifactResponse,
|
||||||
StreamExtractResponse
|
StreamExtractResponse
|
||||||
} from '../shared/interfaces'
|
} from '../shared/interfaces.js'
|
||||||
import {getUserAgentString} from '../shared/user-agent'
|
import {getUserAgentString} from '../shared/user-agent.js'
|
||||||
import {getGitHubWorkspaceDir} from '../shared/config'
|
import {getGitHubWorkspaceDir} from '../shared/config.js'
|
||||||
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client.js'
|
||||||
import {
|
import {
|
||||||
GetSignedArtifactURLRequest,
|
GetSignedArtifactURLRequest,
|
||||||
Int64Value,
|
Int64Value,
|
||||||
ListArtifactsRequest
|
ListArtifactsRequest
|
||||||
} from '../../generated'
|
} from '../../generated/index.js'
|
||||||
import {getBackendIdsFromToken} from '../shared/util'
|
import {getBackendIdsFromToken} from '../shared/util.js'
|
||||||
import {ArtifactNotFoundError} from '../shared/errors'
|
import {ArtifactNotFoundError} from '../shared/errors.js'
|
||||||
|
|
||||||
const scrubQueryParameters = (url: string): string => {
|
const scrubQueryParameters = (url: string): string => {
|
||||||
const parsed = new URL(url)
|
const parsed = new URL(url)
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
import {getOctokit} from '@actions/github'
|
import {getOctokit} from '@actions/github'
|
||||||
import {retry} from '@octokit/plugin-retry'
|
import {retry} from '@octokit/plugin-retry'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {OctokitOptions} from '@octokit/core/dist-types/types'
|
import type {OctokitOptions} from '@octokit/core/types'
|
||||||
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
||||||
import {getRetryOptions} from './retry-options'
|
import {getRetryOptions} from './retry-options.js'
|
||||||
import {requestLog} from '@octokit/plugin-request-log'
|
import {requestLog} from '@octokit/plugin-request-log'
|
||||||
import {GetArtifactResponse} from '../shared/interfaces'
|
import {GetArtifactResponse} from '../shared/interfaces.js'
|
||||||
import {getBackendIdsFromToken} from '../shared/util'
|
import {getBackendIdsFromToken} from '../shared/util.js'
|
||||||
import {getUserAgentString} from '../shared/user-agent'
|
import {getUserAgentString} from '../shared/user-agent.js'
|
||||||
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client.js'
|
||||||
import {ListArtifactsRequest, StringValue, Timestamp} from '../../generated'
|
import {
|
||||||
import {ArtifactNotFoundError, InvalidResponseError} from '../shared/errors'
|
ListArtifactsRequest,
|
||||||
|
StringValue,
|
||||||
|
Timestamp
|
||||||
|
} from '../../generated/index.js'
|
||||||
|
import {ArtifactNotFoundError, InvalidResponseError} from '../shared/errors.js'
|
||||||
|
|
||||||
export async function getArtifactPublic(
|
export async function getArtifactPublic(
|
||||||
artifactName: string,
|
artifactName: string,
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import {info, warning, debug} from '@actions/core'
|
import {info, warning, debug} from '@actions/core'
|
||||||
import {getOctokit} from '@actions/github'
|
import {getOctokit} from '@actions/github'
|
||||||
import {ListArtifactsResponse, Artifact} from '../shared/interfaces'
|
import {ListArtifactsResponse, Artifact} from '../shared/interfaces.js'
|
||||||
import {getUserAgentString} from '../shared/user-agent'
|
import {getUserAgentString} from '../shared/user-agent.js'
|
||||||
import {getRetryOptions} from './retry-options'
|
import {getRetryOptions} from './retry-options.js'
|
||||||
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
|
||||||
import {requestLog} from '@octokit/plugin-request-log'
|
import {requestLog} from '@octokit/plugin-request-log'
|
||||||
import {retry} from '@octokit/plugin-retry'
|
import {retry} from '@octokit/plugin-retry'
|
||||||
import {OctokitOptions} from '@octokit/core/dist-types/types'
|
import type {OctokitOptions} from '@octokit/core/types'
|
||||||
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client.js'
|
||||||
import {getBackendIdsFromToken} from '../shared/util'
|
import {getBackendIdsFromToken} from '../shared/util.js'
|
||||||
import {getMaxArtifactListCount} from '../shared/config'
|
import {getMaxArtifactListCount} from '../shared/config.js'
|
||||||
import {ListArtifactsRequest, Timestamp} from '../../generated'
|
import {ListArtifactsRequest, Timestamp} from '../../generated/index.js'
|
||||||
|
|
||||||
const maximumArtifactCount = getMaxArtifactListCount()
|
const maximumArtifactCount = getMaxArtifactListCount()
|
||||||
const paginationCount = 100
|
const paginationCount = 100
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {OctokitOptions} from '@octokit/core/dist-types/types'
|
import type {OctokitOptions} from '@octokit/core/types'
|
||||||
import {RequestRequestOptions} from '@octokit/types'
|
import {RequestRequestOptions} from '@octokit/types'
|
||||||
|
|
||||||
export type RetryOptions = {
|
export type RetryOptions = {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {HttpClient, HttpClientResponse, HttpCodes} from '@actions/http-client'
|
import {HttpClient, HttpClientResponse, HttpCodes} from '@actions/http-client'
|
||||||
import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
|
import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
|
||||||
import {info, debug} from '@actions/core'
|
import {info, debug} from '@actions/core'
|
||||||
import {ArtifactServiceClientJSON} from '../../generated'
|
import {ArtifactServiceClientJSON} from '../../generated/index.js'
|
||||||
import {getResultsServiceUrl, getRuntimeToken} from './config'
|
import {getResultsServiceUrl, getRuntimeToken} from './config.js'
|
||||||
import {getUserAgentString} from './user-agent'
|
import {getUserAgentString} from './user-agent.js'
|
||||||
import {NetworkError, UsageError} from './errors'
|
import {NetworkError, UsageError} from './errors.js'
|
||||||
import {maskSecretUrls} from './util'
|
import {maskSecretUrls} from './util.js'
|
||||||
|
|
||||||
// The twirp http client must implement this interface
|
// The twirp http client must implement this interface
|
||||||
interface Rpc {
|
interface Rpc {
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
// This file exists as a CommonJS module to read the version from package.json.
|
||||||
|
// In an ESM package, using `require()` directly in .ts files requires disabling
|
||||||
|
// ESLint rules and doesn't work reliably across all Node.js versions.
|
||||||
|
// By keeping this as a .cjs file, we can use require() naturally and export
|
||||||
|
// the version for the ESM modules to import.
|
||||||
|
const packageJson = require('../../../package.json')
|
||||||
|
module.exports = { version: packageJson.version }
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
import {version} from './package-version.cjs'
|
||||||
const packageJson = require('../../../package.json')
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
|
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
|
||||||
*/
|
*/
|
||||||
export function getUserAgentString(): string {
|
export function getUserAgentString(): string {
|
||||||
return `@actions/artifact-${packageJson.version}`
|
return `@actions/artifact-${version}`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {getRuntimeToken} from './config'
|
import {getRuntimeToken} from './config.js'
|
||||||
import jwt_decode from 'jwt-decode'
|
import {jwtDecode} from 'jwt-decode'
|
||||||
import {debug, setSecret} from '@actions/core'
|
import {debug, setSecret} from '@actions/core'
|
||||||
|
|
||||||
export interface BackendIds {
|
export interface BackendIds {
|
||||||
@@ -20,7 +20,7 @@ const InvalidJwtError = new Error(
|
|||||||
// workflow run and workflow job run backend ids
|
// workflow run and workflow job run backend ids
|
||||||
export function getBackendIdsFromToken(): BackendIds {
|
export function getBackendIdsFromToken(): BackendIds {
|
||||||
const token = getRuntimeToken()
|
const token = getRuntimeToken()
|
||||||
const decoded = jwt_decode<ActionsToken>(token)
|
const decoded = jwtDecode<ActionsToken>(token)
|
||||||
if (!decoded.scp) {
|
if (!decoded.scp) {
|
||||||
throw InvalidJwtError
|
throw InvalidJwtError
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import {BlobClient, BlockBlobUploadStreamOptions} from '@azure/storage-blob'
|
import {BlobClient, BlockBlobUploadStreamOptions} from '@azure/storage-blob'
|
||||||
import {TransferProgressEvent} from '@azure/core-http-compat'
|
import {TransferProgressEvent} from '@azure/core-http-compat'
|
||||||
import {ZipUploadStream} from './zip'
|
import {ZipUploadStream} from './zip.js'
|
||||||
import {
|
import {
|
||||||
getUploadChunkSize,
|
getUploadChunkSize,
|
||||||
getConcurrency,
|
getConcurrency,
|
||||||
getUploadChunkTimeout
|
getUploadChunkTimeout
|
||||||
} from '../shared/config'
|
} from '../shared/config.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as crypto from 'crypto'
|
import * as crypto from 'crypto'
|
||||||
import * as stream from 'stream'
|
import * as stream from 'stream'
|
||||||
import {NetworkError} from '../shared/errors'
|
import {NetworkError} from '../shared/errors.js'
|
||||||
|
|
||||||
export interface BlobUploadResponse {
|
export interface BlobUploadResponse {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Timestamp} from '../../generated'
|
import {Timestamp} from '../../generated/index.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
|
|
||||||
export function getExpiration(retentionDays?: number): Timestamp | undefined {
|
export function getExpiration(retentionDays?: number): Timestamp | undefined {
|
||||||
|
|||||||
@@ -2,24 +2,24 @@ import * as core from '@actions/core'
|
|||||||
import {
|
import {
|
||||||
UploadArtifactOptions,
|
UploadArtifactOptions,
|
||||||
UploadArtifactResponse
|
UploadArtifactResponse
|
||||||
} from '../shared/interfaces'
|
} from '../shared/interfaces.js'
|
||||||
import {getExpiration} from './retention'
|
import {getExpiration} from './retention.js'
|
||||||
import {validateArtifactName} from './path-and-artifact-name-validation'
|
import {validateArtifactName} from './path-and-artifact-name-validation.js'
|
||||||
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client.js'
|
||||||
import {
|
import {
|
||||||
UploadZipSpecification,
|
UploadZipSpecification,
|
||||||
getUploadZipSpecification,
|
getUploadZipSpecification,
|
||||||
validateRootDirectory
|
validateRootDirectory
|
||||||
} from './upload-zip-specification'
|
} from './upload-zip-specification.js'
|
||||||
import {getBackendIdsFromToken} from '../shared/util'
|
import {getBackendIdsFromToken} from '../shared/util.js'
|
||||||
import {uploadZipToBlobStorage} from './blob-upload'
|
import {uploadZipToBlobStorage} from './blob-upload.js'
|
||||||
import {createZipUploadStream} from './zip'
|
import {createZipUploadStream} from './zip.js'
|
||||||
import {
|
import {
|
||||||
CreateArtifactRequest,
|
CreateArtifactRequest,
|
||||||
FinalizeArtifactRequest,
|
FinalizeArtifactRequest,
|
||||||
StringValue
|
StringValue
|
||||||
} from '../../generated'
|
} from '../../generated/index.js'
|
||||||
import {FilesNotFoundError, InvalidResponseError} from '../shared/errors'
|
import {FilesNotFoundError, InvalidResponseError} from '../shared/errors.js'
|
||||||
|
|
||||||
export async function uploadArtifact(
|
export async function uploadArtifact(
|
||||||
name: string,
|
name: string,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import {info} from '@actions/core'
|
import {info} from '@actions/core'
|
||||||
import {normalize, resolve} from 'path'
|
import {normalize, resolve} from 'path'
|
||||||
import {validateFilePath} from './path-and-artifact-name-validation'
|
import {validateFilePath} from './path-and-artifact-name-validation.js'
|
||||||
|
|
||||||
export interface UploadZipSpecification {
|
export interface UploadZipSpecification {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as stream from 'stream'
|
import * as stream from 'stream'
|
||||||
import {realpath} from 'fs/promises'
|
import {realpath} from 'fs/promises'
|
||||||
import * as archiver from 'archiver'
|
import archiver from 'archiver'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {UploadZipSpecification} from './upload-zip-specification'
|
import {UploadZipSpecification} from './upload-zip-specification.js'
|
||||||
import {getUploadChunkSize} from '../shared/config'
|
import {getUploadChunkSize} from '../shared/config.js'
|
||||||
|
|
||||||
export const DEFAULT_COMPRESSION_LEVEL = 6
|
export const DEFAULT_COMPRESSION_LEVEL = 6
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
|
"module": "node16",
|
||||||
|
"moduleResolution": "node16",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@actions/core": [
|
"@actions/core": [
|
||||||
"../core"
|
"../core"
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
# @actions/attest Releases
|
# @actions/attest Releases
|
||||||
|
|
||||||
|
### 2.2.1
|
||||||
|
|
||||||
|
- Bump `@actions/http-client` to `3.0.2`
|
||||||
|
- Bump `undici` to `6.23.0`
|
||||||
|
|
||||||
|
### 2.2.0
|
||||||
|
|
||||||
|
- Bump @actions/core from 1.11.1 to 2.0.2
|
||||||
|
- Bump @actions/github from 6.0.0 to 7.0.0
|
||||||
|
- Bump @actions/http-client from 2.2.3 to 3.0.1
|
||||||
|
|
||||||
### 2.0.0
|
### 2.0.0
|
||||||
|
|
||||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||||
|
|||||||
Generated
+124
-77
@@ -1,17 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/attest",
|
"name": "@actions/attest",
|
||||||
"version": "2.1.0",
|
"version": "2.2.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/attest",
|
"name": "@actions/attest",
|
||||||
"version": "2.1.0",
|
"version": "2.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^2.0.2",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^7.0.0",
|
||||||
"@actions/http-client": "^2.2.3",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@octokit/plugin-retry": "^6.0.1",
|
"@octokit/plugin-retry": "^6.0.1",
|
||||||
"@sigstore/bundle": "^3.1.0",
|
"@sigstore/bundle": "^3.1.0",
|
||||||
"@sigstore/sign": "^3.1.0",
|
"@sigstore/sign": "^3.1.0",
|
||||||
@@ -22,35 +22,35 @@
|
|||||||
"@sigstore/rekor-types": "^3.0.0",
|
"@sigstore/rekor-types": "^3.0.0",
|
||||||
"@types/jsonwebtoken": "^9.0.6",
|
"@types/jsonwebtoken": "^9.0.6",
|
||||||
"nock": "^13.5.1",
|
"nock": "^13.5.1",
|
||||||
"undici": "^6.20.0"
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "1.11.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.2.tgz",
|
||||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
"integrity": "sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/http-client": "^2.0.1"
|
"@actions/http-client": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/exec": {
|
||||||
"version": "1.1.1",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
||||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/github": {
|
"node_modules/@actions/github": {
|
||||||
"version": "6.0.1",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/github/-/github-7.0.0.tgz",
|
||||||
"integrity": "sha512-xbZVcaqD4XnQAe35qSQqskb3SqIAfRyLBrHMd/8TuL7hJSz2QtbDwnNM8zWx4zO5l2fnGtseNE3MbEvD7BxVMw==",
|
"integrity": "sha512-PyGODO938aoBTZd/IfN/+e+Pd5hUcVpyf+thm4CPESLeqhdSkq5QwMTGX9v84XHE1ifmHWBQ60KB8kIgm96opw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^2.2.0",
|
"@actions/http-client": "^3.0.1",
|
||||||
"@octokit/core": "^5.0.1",
|
"@octokit/core": "^5.0.1",
|
||||||
"@octokit/plugin-paginate-rest": "^9.2.2",
|
"@octokit/plugin-paginate-rest": "^9.2.2",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^10.4.0",
|
"@octokit/plugin-rest-endpoint-methods": "^10.4.0",
|
||||||
@@ -72,31 +72,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.3",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.25.4"
|
"undici": "^6.23.0"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/http-client/node_modules/undici": {
|
|
||||||
"version": "5.29.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
"version": "1.1.3",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
|
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
"node_modules/@fastify/busboy": {
|
||||||
@@ -205,6 +193,21 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "24.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
||||||
|
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/core/node_modules/@octokit/types": {
|
||||||
|
"version": "13.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
||||||
|
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^24.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "9.0.6",
|
"version": "9.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
|
||||||
@@ -218,6 +221,21 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "24.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
||||||
|
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/endpoint/node_modules/@octokit/types": {
|
||||||
|
"version": "13.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
||||||
|
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^24.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz",
|
||||||
@@ -232,12 +250,27 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
|
||||||
"version": "24.2.0",
|
"version": "24.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
||||||
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
|
||||||
|
"version": "13.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
||||||
|
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^24.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "20.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
||||||
|
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "9.2.2",
|
"version": "9.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
|
||||||
@@ -253,21 +286,6 @@
|
|||||||
"@octokit/core": "5"
|
"@octokit/core": "5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "10.4.1",
|
"version": "10.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
||||||
@@ -283,21 +301,6 @@
|
|||||||
"@octokit/core": "5"
|
"@octokit/core": "5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-retry": {
|
"node_modules/@octokit/plugin-retry": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.1.0.tgz",
|
||||||
@@ -315,6 +318,21 @@
|
|||||||
"@octokit/core": "5"
|
"@octokit/core": "5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "24.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
||||||
|
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/plugin-retry/node_modules/@octokit/types": {
|
||||||
|
"version": "13.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
||||||
|
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^24.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "8.4.1",
|
"version": "8.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
|
||||||
@@ -344,7 +362,13 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "24.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
||||||
|
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/request-error/node_modules/@octokit/types": {
|
||||||
"version": "13.10.0",
|
"version": "13.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
||||||
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
||||||
@@ -353,6 +377,30 @@
|
|||||||
"@octokit/openapi-types": "^24.2.0"
|
"@octokit/openapi-types": "^24.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
|
||||||
|
"version": "24.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
||||||
|
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/request/node_modules/@octokit/types": {
|
||||||
|
"version": "13.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
||||||
|
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^24.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/types": {
|
||||||
|
"version": "12.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
||||||
|
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/openapi-types": "^20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@peculiar/asn1-cms": {
|
"node_modules/@peculiar/asn1-cms": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.5.0.tgz",
|
||||||
@@ -1573,9 +1621,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tar": {
|
"node_modules/tar": {
|
||||||
"version": "7.5.2",
|
"version": "7.5.6",
|
||||||
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.6.tgz",
|
||||||
"integrity": "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg==",
|
"integrity": "sha512-xqUeu2JAIJpXyvskvU3uvQW8PAmHrtXp2KDuMJwQqW8Sqq0CaZBAQ+dKS3RBXVhU4wC5NjAdKrmh84241gO9cA==",
|
||||||
"license": "BlueOak-1.0.0",
|
"license": "BlueOak-1.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@isaacs/fs-minipass": "^4.0.0",
|
"@isaacs/fs-minipass": "^4.0.0",
|
||||||
@@ -1625,10 +1673,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "6.21.3",
|
"version": "6.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
"integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==",
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17"
|
"node": ">=18.17"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/attest",
|
"name": "@actions/attest",
|
||||||
"version": "2.1.0",
|
"version": "2.2.1",
|
||||||
"description": "Actions attestation lib",
|
"description": "Actions attestation lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -39,12 +39,12 @@
|
|||||||
"@sigstore/rekor-types": "^3.0.0",
|
"@sigstore/rekor-types": "^3.0.0",
|
||||||
"@types/jsonwebtoken": "^9.0.6",
|
"@types/jsonwebtoken": "^9.0.6",
|
||||||
"nock": "^13.5.1",
|
"nock": "^13.5.1",
|
||||||
"undici": "^6.20.0"
|
"undici": "^6.23.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^2.0.2",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^7.0.0",
|
||||||
"@actions/http-client": "^2.2.3",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@octokit/plugin-retry": "^6.0.1",
|
"@octokit/plugin-retry": "^6.0.1",
|
||||||
"@sigstore/bundle": "^3.1.0",
|
"@sigstore/bundle": "^3.1.0",
|
||||||
"@sigstore/sign": "^3.1.0",
|
"@sigstore/sign": "^3.1.0",
|
||||||
|
|||||||
Vendored
+17
@@ -1,5 +1,22 @@
|
|||||||
# @actions/cache Releases
|
# @actions/cache Releases
|
||||||
|
|
||||||
|
### 5.0.5
|
||||||
|
|
||||||
|
- Bump `@actions/glob` to `0.5.1`
|
||||||
|
|
||||||
|
### 5.0.4
|
||||||
|
|
||||||
|
- Bump `@actions/http-client` to `3.0.2`
|
||||||
|
|
||||||
|
### 5.0.3
|
||||||
|
|
||||||
|
Prevent retries for rate limited cache operations [2243](https://github.com/actions/toolkit/pull/2243).
|
||||||
|
|
||||||
|
### 5.0.1
|
||||||
|
|
||||||
|
- Fix Node.js 24 punycode deprecation warning by updating `@azure/storage-blob` from `^12.13.0` to `^12.29.1` [#2213](https://github.com/actions/toolkit/pull/2213)
|
||||||
|
- Newer storage-blob uses `@azure/core-rest-pipeline` instead of deprecated `@azure/core-http`, which eliminates the transitive dependency on `node-fetch@2` → `whatwg-url@5` → `[email protected]` that used the deprecated punycode module
|
||||||
|
|
||||||
### 5.0.0
|
### 5.0.0
|
||||||
|
|
||||||
- Remove `@azure/ms-rest-js` dependency [#2197](https://github.com/actions/toolkit/pull/2197)
|
- Remove `@azure/ms-rest-js` dependency [#2197](https://github.com/actions/toolkit/pull/2197)
|
||||||
|
|||||||
+174
@@ -0,0 +1,174 @@
|
|||||||
|
import * as http from 'http'
|
||||||
|
import * as net from 'net'
|
||||||
|
import {HttpClient} from '@actions/http-client'
|
||||||
|
import * as core from '@actions/core'
|
||||||
|
import * as config from '../src/internal/config'
|
||||||
|
import * as cacheUtils from '../src/internal/cacheUtils'
|
||||||
|
import {internalCacheTwirpClient} from '../src/internal/shared/cacheTwirpClient'
|
||||||
|
|
||||||
|
jest.mock('@actions/http-client')
|
||||||
|
|
||||||
|
const clientOptions = {
|
||||||
|
maxAttempts: 5,
|
||||||
|
retryIntervalMs: 1,
|
||||||
|
retryMultiplier: 1.5
|
||||||
|
}
|
||||||
|
|
||||||
|
// noopLogs mocks the console.log and core.* functions to prevent output in the console while testing
|
||||||
|
const noopLogs = (): void => {
|
||||||
|
jest.spyOn(console, 'log').mockImplementation(() => {})
|
||||||
|
jest.spyOn(core, 'debug').mockImplementation(() => {})
|
||||||
|
jest.spyOn(core, 'info').mockImplementation(() => {})
|
||||||
|
jest.spyOn(core, 'warning').mockImplementation(() => {})
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('cacheTwirpClient', () => {
|
||||||
|
beforeAll(() => {
|
||||||
|
noopLogs()
|
||||||
|
jest
|
||||||
|
.spyOn(config, 'getCacheServiceURL')
|
||||||
|
.mockReturnValue('http://localhost:8080')
|
||||||
|
jest.spyOn(cacheUtils, 'getRuntimeToken').mockReturnValue('token')
|
||||||
|
})
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.clearAllMocks()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should fail immediately on 429 rate limit without retrying', async () => {
|
||||||
|
const mockPost = jest.fn(() => {
|
||||||
|
const msg = new http.IncomingMessage(new net.Socket())
|
||||||
|
msg.statusCode = 429
|
||||||
|
msg.statusMessage = 'Too Many Requests'
|
||||||
|
return {
|
||||||
|
message: msg,
|
||||||
|
readBody: async () => {
|
||||||
|
return Promise.resolve(`{"ok": false}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
;(HttpClient as unknown as jest.Mock).mockImplementation(() => {
|
||||||
|
return {
|
||||||
|
post: mockPost
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const client = internalCacheTwirpClient(clientOptions)
|
||||||
|
await expect(
|
||||||
|
client.CreateCacheEntry({
|
||||||
|
key: 'test-key',
|
||||||
|
version: 'test-version'
|
||||||
|
})
|
||||||
|
).rejects.toThrow(
|
||||||
|
'Failed to CreateCacheEntry: Rate limited: Failed request: (429) Too Many Requests'
|
||||||
|
)
|
||||||
|
|
||||||
|
// Should only be called once - no retries for 429
|
||||||
|
expect(mockPost).toHaveBeenCalledTimes(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should log warning with retry-after header on 429', async () => {
|
||||||
|
const warningSpy = jest.spyOn(core, 'warning')
|
||||||
|
|
||||||
|
const mockPost = jest.fn(() => {
|
||||||
|
const msg = new http.IncomingMessage(new net.Socket())
|
||||||
|
msg.statusCode = 429
|
||||||
|
msg.statusMessage = 'Too Many Requests'
|
||||||
|
msg.headers = {'retry-after': '60'}
|
||||||
|
return {
|
||||||
|
message: msg,
|
||||||
|
readBody: async () => {
|
||||||
|
return Promise.resolve(`{"ok": false}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
;(HttpClient as unknown as jest.Mock).mockImplementation(() => {
|
||||||
|
return {
|
||||||
|
post: mockPost
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const client = internalCacheTwirpClient(clientOptions)
|
||||||
|
await expect(
|
||||||
|
client.CreateCacheEntry({
|
||||||
|
key: 'test-key',
|
||||||
|
version: 'test-version'
|
||||||
|
})
|
||||||
|
).rejects.toThrow('Rate limited')
|
||||||
|
|
||||||
|
expect(mockPost).toHaveBeenCalledTimes(1)
|
||||||
|
expect(warningSpy).toHaveBeenCalledWith(
|
||||||
|
"You've hit a rate limit, your rate limit will reset in 60 seconds"
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should not log warning if retry-after header is missing on 429', async () => {
|
||||||
|
const warningSpy = jest.spyOn(core, 'warning')
|
||||||
|
|
||||||
|
const mockPost = jest.fn(() => {
|
||||||
|
const msg = new http.IncomingMessage(new net.Socket())
|
||||||
|
msg.statusCode = 429
|
||||||
|
msg.statusMessage = 'Too Many Requests'
|
||||||
|
// No retry-after header
|
||||||
|
return {
|
||||||
|
message: msg,
|
||||||
|
readBody: async () => {
|
||||||
|
return Promise.resolve(`{"ok": false}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
;(HttpClient as unknown as jest.Mock).mockImplementation(() => {
|
||||||
|
return {
|
||||||
|
post: mockPost
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const client = internalCacheTwirpClient(clientOptions)
|
||||||
|
await expect(
|
||||||
|
client.CreateCacheEntry({
|
||||||
|
key: 'test-key',
|
||||||
|
version: 'test-version'
|
||||||
|
})
|
||||||
|
).rejects.toThrow('Rate limited')
|
||||||
|
|
||||||
|
expect(mockPost).toHaveBeenCalledTimes(1)
|
||||||
|
expect(warningSpy).not.toHaveBeenCalled()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should not log warning if retry-after header is invalid on 429', async () => {
|
||||||
|
const warningSpy = jest.spyOn(core, 'warning')
|
||||||
|
|
||||||
|
const mockPost = jest.fn(() => {
|
||||||
|
const msg = new http.IncomingMessage(new net.Socket())
|
||||||
|
msg.statusCode = 429
|
||||||
|
msg.statusMessage = 'Too Many Requests'
|
||||||
|
msg.headers = {'retry-after': 'invalid'}
|
||||||
|
return {
|
||||||
|
message: msg,
|
||||||
|
readBody: async () => {
|
||||||
|
return Promise.resolve(`{"ok": false}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
;(HttpClient as unknown as jest.Mock).mockImplementation(() => {
|
||||||
|
return {
|
||||||
|
post: mockPost
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const client = internalCacheTwirpClient(clientOptions)
|
||||||
|
await expect(
|
||||||
|
client.CreateCacheEntry({
|
||||||
|
key: 'test-key',
|
||||||
|
version: 'test-version'
|
||||||
|
})
|
||||||
|
).rejects.toThrow('Rate limited')
|
||||||
|
|
||||||
|
expect(mockPost).toHaveBeenCalledTimes(1)
|
||||||
|
expect(warningSpy).not.toHaveBeenCalled()
|
||||||
|
})
|
||||||
|
})
|
||||||
+26
-73
@@ -1,22 +1,22 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/cache",
|
"name": "@actions/cache",
|
||||||
"version": "5.0.0",
|
"version": "5.0.5",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/cache",
|
"name": "@actions/cache",
|
||||||
"version": "5.0.0",
|
"version": "5.0.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^2.0.0",
|
"@actions/core": "^2.0.0",
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.1",
|
||||||
"@actions/http-client": "^3.0.0",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@actions/io": "^2.0.0",
|
"@actions/io": "^2.0.0",
|
||||||
"@azure/abort-controller": "^1.1.0",
|
"@azure/abort-controller": "^1.1.0",
|
||||||
"@azure/core-rest-pipeline": "^1.22.0",
|
"@azure/core-rest-pipeline": "^1.22.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.29.1",
|
||||||
"@protobuf-ts/runtime-rpc": "^2.11.1",
|
"@protobuf-ts/runtime-rpc": "^2.11.1",
|
||||||
"semver": "^6.3.1"
|
"semver": "^6.3.1"
|
||||||
},
|
},
|
||||||
@@ -28,13 +28,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.3.tgz",
|
||||||
"integrity": "sha512-oBfqT3GwkvLlo1fjvhQLQxuwZCGTarTE5OuZ2Wg10hvhBj7LRIlF611WT4aZS6fDhO5ZKlY7lCAZTlpmyaHaeg==",
|
"integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/http-client": "^3.0.0"
|
"@actions/http-client": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/exec": {
|
||||||
@@ -47,58 +47,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/glob": {
|
"node_modules/@actions/glob": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.1.tgz",
|
||||||
"integrity": "sha512-tST2rjPvJLRZLuT9NMUtyBjvj9Yo0MiJS3ow004slMvm8GFM+Zv9HvMJ7HWzfUyJnGrJvDsYkWBaaG3YKXRtCw==",
|
"integrity": "sha512-+dv/t2aKQdKp9WWSp+1yIXVJzH5Q38M0Mta26pzIbeec14EcIleMB7UU6N7sNgbEuYfyuVGpE5pOKjl6j1WXkA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^2.0.3",
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/glob/node_modules/@actions/core": {
|
|
||||||
"version": "1.11.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
|
||||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@actions/exec": "^1.1.1",
|
|
||||||
"@actions/http-client": "^2.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/glob/node_modules/@actions/exec": {
|
|
||||||
"version": "1.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
|
||||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@actions/io": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/glob/node_modules/@actions/http-client": {
|
|
||||||
"version": "2.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
|
||||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"tunnel": "^0.0.6",
|
|
||||||
"undici": "^5.25.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/glob/node_modules/@actions/io": {
|
|
||||||
"version": "1.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
|
||||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-1s3tXAfVMSz9a4ZEBkXXRQD4QhY3+GAsWSbaYpeknPOKEeyRiU3lH+bHiLMZdo2x/fIeQ/hscL1wCkDLVM2DZQ==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/http-client/node_modules/undici": {
|
||||||
|
"version": "6.23.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
@@ -436,15 +410,6 @@
|
|||||||
"node": ">=14.17"
|
"node": ">=14.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@protobuf-ts/plugin": {
|
"node_modules/@protobuf-ts/plugin": {
|
||||||
"version": "2.11.1",
|
"version": "2.11.1",
|
||||||
"resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.11.1.tgz",
|
||||||
@@ -716,18 +681,6 @@
|
|||||||
"node": ">=14.17"
|
"node": ">=14.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
|
||||||
"version": "5.29.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "7.16.0",
|
"version": "7.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/cache",
|
"name": "@actions/cache",
|
||||||
"version": "5.0.0",
|
"version": "5.0.5",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Actions cache lib",
|
"description": "Actions cache lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -39,13 +39,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^2.0.0",
|
"@actions/core": "^2.0.0",
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.5.1",
|
||||||
"@protobuf-ts/runtime-rpc": "^2.11.1",
|
"@protobuf-ts/runtime-rpc": "^2.11.1",
|
||||||
"@actions/http-client": "^3.0.0",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@actions/io": "^2.0.0",
|
"@actions/io": "^2.0.0",
|
||||||
"@azure/abort-controller": "^1.1.0",
|
"@azure/abort-controller": "^1.1.0",
|
||||||
"@azure/core-rest-pipeline": "^1.22.0",
|
"@azure/core-rest-pipeline": "^1.22.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.29.1",
|
||||||
"semver": "^6.3.1"
|
"semver": "^6.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
+22
-4
@@ -1,6 +1,6 @@
|
|||||||
import {info, debug} from '@actions/core'
|
import {info, debug, warning} from '@actions/core'
|
||||||
import {getUserAgentString} from './user-agent'
|
import {getUserAgentString} from './user-agent'
|
||||||
import {NetworkError, UsageError} from './errors'
|
import {NetworkError, RateLimitError, UsageError} from './errors'
|
||||||
import {getCacheServiceURL} from '../config'
|
import {getCacheServiceURL} from '../config'
|
||||||
import {getRuntimeToken} from '../cacheUtils'
|
import {getRuntimeToken} from '../cacheUtils'
|
||||||
import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
|
import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
|
||||||
@@ -109,6 +109,21 @@ class CacheServiceClient implements Rpc {
|
|||||||
|
|
||||||
errorMessage = `${errorMessage}: ${body.msg}`
|
errorMessage = `${errorMessage}: ${body.msg}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle rate limiting - don't retry, just warn and exit
|
||||||
|
// For more info, see https://docs.github.com/en/actions/reference/limits
|
||||||
|
if (statusCode === HttpCodes.TooManyRequests) {
|
||||||
|
const retryAfterHeader = response.message.headers['retry-after']
|
||||||
|
if (retryAfterHeader) {
|
||||||
|
const parsedSeconds = parseInt(retryAfterHeader, 10)
|
||||||
|
if (!isNaN(parsedSeconds) && parsedSeconds > 0) {
|
||||||
|
warning(
|
||||||
|
`You've hit a rate limit, your rate limit will reset in ${parsedSeconds} seconds`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new RateLimitError(`Rate limited: ${errorMessage}`)
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof SyntaxError) {
|
if (error instanceof SyntaxError) {
|
||||||
debug(`Raw Body: ${rawBody}`)
|
debug(`Raw Body: ${rawBody}`)
|
||||||
@@ -118,6 +133,10 @@ class CacheServiceClient implements Rpc {
|
|||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error instanceof RateLimitError) {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
|
||||||
if (NetworkError.isNetworkErrorCode(error?.code)) {
|
if (NetworkError.isNetworkErrorCode(error?.code)) {
|
||||||
throw new NetworkError(error?.code)
|
throw new NetworkError(error?.code)
|
||||||
}
|
}
|
||||||
@@ -162,8 +181,7 @@ class CacheServiceClient implements Rpc {
|
|||||||
HttpCodes.BadGateway,
|
HttpCodes.BadGateway,
|
||||||
HttpCodes.GatewayTimeout,
|
HttpCodes.GatewayTimeout,
|
||||||
HttpCodes.InternalServerError,
|
HttpCodes.InternalServerError,
|
||||||
HttpCodes.ServiceUnavailable,
|
HttpCodes.ServiceUnavailable
|
||||||
HttpCodes.TooManyRequests
|
|
||||||
]
|
]
|
||||||
|
|
||||||
return retryableStatusCodes.includes(statusCode)
|
return retryableStatusCodes.includes(statusCode)
|
||||||
|
|||||||
@@ -70,3 +70,10 @@ export class UsageError extends Error {
|
|||||||
return msg.includes('insufficient usage')
|
return msg.includes('insufficient usage')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class RateLimitError extends Error {
|
||||||
|
constructor(message: string) {
|
||||||
|
super(message)
|
||||||
|
this.name = 'RateLimitError'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,70 +1,99 @@
|
|||||||
# @actions/core Releases
|
# @actions/core Releases
|
||||||
|
|
||||||
|
## 3.0.0
|
||||||
|
|
||||||
|
- **Breaking change**: Package is now ESM-only
|
||||||
|
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||||
|
|
||||||
|
## 2.0.3
|
||||||
|
|
||||||
|
- Bump `@actions/http-client` to `3.0.2`
|
||||||
|
|
||||||
## 2.0.1
|
## 2.0.1
|
||||||
|
|
||||||
- Bump @actions/exec from 1.1.1 to 2.0.0 [#2199](https://github.com/actions/toolkit/pull/2199)
|
- Bump @actions/exec from 1.1.1 to 2.0.0 [#2199](https://github.com/actions/toolkit/pull/2199)
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||||
- Bump @actions/http-client from 2.0.1 to 3.0.0
|
- Bump @actions/http-client from 2.0.1 to 3.0.0
|
||||||
|
|
||||||
## 1.11.1
|
## 1.11.1
|
||||||
|
|
||||||
- Fix uses of `crypto.randomUUID` on Node 18 and earlier [#1842](https://github.com/actions/toolkit/pull/1842)
|
- Fix uses of `crypto.randomUUID` on Node 18 and earlier [#1842](https://github.com/actions/toolkit/pull/1842)
|
||||||
|
|
||||||
### 1.11.0
|
### 1.11.0
|
||||||
|
|
||||||
- Add platform info utilities [#1551](https://github.com/actions/toolkit/pull/1551)
|
- Add platform info utilities [#1551](https://github.com/actions/toolkit/pull/1551)
|
||||||
- Remove dependency on `uuid` package [#1824](https://github.com/actions/toolkit/pull/1824)
|
- Remove dependency on `uuid` package [#1824](https://github.com/actions/toolkit/pull/1824)
|
||||||
|
|
||||||
### 1.10.1
|
### 1.10.1
|
||||||
|
|
||||||
- Fix error message reference in oidc utils [#1511](https://github.com/actions/toolkit/pull/1511)
|
- Fix error message reference in oidc utils [#1511](https://github.com/actions/toolkit/pull/1511)
|
||||||
|
|
||||||
### 1.10.0
|
### 1.10.0
|
||||||
|
|
||||||
- `saveState` and `setOutput` now use environment files if available [#1178](https://github.com/actions/toolkit/pull/1178)
|
- `saveState` and `setOutput` now use environment files if available [#1178](https://github.com/actions/toolkit/pull/1178)
|
||||||
- `getMultilineInput` now correctly trims whitespace by default [#1185](https://github.com/actions/toolkit/pull/1185)
|
- `getMultilineInput` now correctly trims whitespace by default [#1185](https://github.com/actions/toolkit/pull/1185)
|
||||||
|
|
||||||
### 1.9.1
|
### 1.9.1
|
||||||
|
|
||||||
- Randomize delimiter when calling `core.exportVariable`
|
- Randomize delimiter when calling `core.exportVariable`
|
||||||
|
|
||||||
### 1.9.0
|
### 1.9.0
|
||||||
|
|
||||||
- Added `toPosixPath`, `toWin32Path` and `toPlatformPath` utilities [#1102](https://github.com/actions/toolkit/pull/1102)
|
- Added `toPosixPath`, `toWin32Path` and `toPlatformPath` utilities [#1102](https://github.com/actions/toolkit/pull/1102)
|
||||||
|
|
||||||
### 1.8.2
|
### 1.8.2
|
||||||
|
|
||||||
- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
|
- Update to v2.0.1 of `@actions/http-client` [#1087](https://github.com/actions/toolkit/pull/1087)
|
||||||
|
|
||||||
### 1.8.1
|
### 1.8.1
|
||||||
|
|
||||||
- Update to v2.0.0 of `@actions/http-client`
|
- Update to v2.0.0 of `@actions/http-client`
|
||||||
|
|
||||||
### 1.8.0
|
### 1.8.0
|
||||||
|
|
||||||
- Deprecate `markdownSummary` extension export in favor of `summary`
|
- Deprecate `markdownSummary` extension export in favor of `summary`
|
||||||
- https://github.com/actions/toolkit/pull/1072
|
- <https://github.com/actions/toolkit/pull/1072>
|
||||||
- https://github.com/actions/toolkit/pull/1073
|
- <https://github.com/actions/toolkit/pull/1073>
|
||||||
|
|
||||||
### 1.7.0
|
### 1.7.0
|
||||||
|
|
||||||
- [Added `markdownSummary` extension](https://github.com/actions/toolkit/pull/1014)
|
- [Added `markdownSummary` extension](https://github.com/actions/toolkit/pull/1014)
|
||||||
|
|
||||||
### 1.6.0
|
### 1.6.0
|
||||||
|
|
||||||
- [Added OIDC Client function `getIDToken`](https://github.com/actions/toolkit/pull/919)
|
- [Added OIDC Client function `getIDToken`](https://github.com/actions/toolkit/pull/919)
|
||||||
- [Added `file` parameter to `AnnotationProperties`](https://github.com/actions/toolkit/pull/896)
|
- [Added `file` parameter to `AnnotationProperties`](https://github.com/actions/toolkit/pull/896)
|
||||||
|
|
||||||
### 1.5.0
|
### 1.5.0
|
||||||
|
|
||||||
- [Added support for notice annotations and more annotation fields](https://github.com/actions/toolkit/pull/855)
|
- [Added support for notice annotations and more annotation fields](https://github.com/actions/toolkit/pull/855)
|
||||||
|
|
||||||
### 1.4.0
|
### 1.4.0
|
||||||
|
|
||||||
- [Added the `getMultilineInput` function](https://github.com/actions/toolkit/pull/829)
|
- [Added the `getMultilineInput` function](https://github.com/actions/toolkit/pull/829)
|
||||||
|
|
||||||
### 1.3.0
|
### 1.3.0
|
||||||
|
|
||||||
- [Added the trimWhitespace option to getInput](https://github.com/actions/toolkit/pull/802)
|
- [Added the trimWhitespace option to getInput](https://github.com/actions/toolkit/pull/802)
|
||||||
- [Added the getBooleanInput function](https://github.com/actions/toolkit/pull/725)
|
- [Added the getBooleanInput function](https://github.com/actions/toolkit/pull/725)
|
||||||
|
|
||||||
### 1.2.7
|
### 1.2.7
|
||||||
|
|
||||||
- [Prepend newline for set-output](https://github.com/actions/toolkit/pull/772)
|
- [Prepend newline for set-output](https://github.com/actions/toolkit/pull/772)
|
||||||
|
|
||||||
### 1.2.6
|
### 1.2.6
|
||||||
|
|
||||||
- [Update `exportVariable` and `addPath` to use environment files](https://github.com/actions/toolkit/pull/571)
|
- [Update `exportVariable` and `addPath` to use environment files](https://github.com/actions/toolkit/pull/571)
|
||||||
|
|
||||||
### 1.2.5
|
### 1.2.5
|
||||||
|
|
||||||
- [Correctly bundle License File with package](https://github.com/actions/toolkit/pull/548)
|
- [Correctly bundle License File with package](https://github.com/actions/toolkit/pull/548)
|
||||||
|
|
||||||
### 1.2.4
|
### 1.2.4
|
||||||
|
|
||||||
- [Be more lenient in accepting non-string command inputs](https://github.com/actions/toolkit/pull/405)
|
- [Be more lenient in accepting non-string command inputs](https://github.com/actions/toolkit/pull/405)
|
||||||
- [Add Echo commands](https://github.com/actions/toolkit/pull/411)
|
- [Add Echo commands](https://github.com/actions/toolkit/pull/411)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import * as command from '../src/command'
|
import * as command from '../src/command.js'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as core from '../src/core'
|
import * as core from '../src/core.js'
|
||||||
import {HttpClient} from '@actions/http-client'
|
import {HttpClient} from '@actions/http-client'
|
||||||
import {toCommandProperties} from '../src/utils'
|
import {toCommandProperties} from '../src/utils.js'
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/unbound-method */
|
/* eslint-disable @typescript-eslint/unbound-method */
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
|
||||||
import {toPlatformPath, toPosixPath, toWin32Path} from '../src/path-utils'
|
import {toPlatformPath, toPosixPath, toWin32Path} from '../src/path-utils.js'
|
||||||
|
|
||||||
describe('#toPosixPath', () => {
|
describe('#toPosixPath', () => {
|
||||||
const cases: {
|
const cases: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import os from 'os'
|
import os from 'os'
|
||||||
import {platform} from '../src/core'
|
import {platform} from '../src/core.js'
|
||||||
|
|
||||||
describe('getInfo', () => {
|
describe('getInfo', () => {
|
||||||
it('returns the platform info', async () => {
|
it('returns the platform info', async () => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import {summary, SUMMARY_ENV_VAR} from '../src/summary'
|
import {summary, SUMMARY_ENV_VAR} from '../src/summary.js'
|
||||||
|
|
||||||
const testDirectoryPath = path.join(__dirname, 'test')
|
const testDirectoryPath = path.join(__dirname, 'test')
|
||||||
const testFilePath = path.join(testDirectoryPath, 'test-summary.md')
|
const testFilePath = path.join(testDirectoryPath, 'test-summary.md')
|
||||||
|
|||||||
Generated
+34
-36
@@ -1,61 +1,55 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"version": "2.0.1",
|
"version": "3.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"version": "2.0.1",
|
"version": "3.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/http-client": "^3.0.0"
|
"@actions/http-client": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.18.112"
|
"@types/node": "^25.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/exec": {
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz",
|
||||||
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^2.0.0"
|
"@actions/io": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
|
||||||
"integrity": "sha512-1s3tXAfVMSz9a4ZEBkXXRQD4QhY3+GAsWSbaYpeknPOKEeyRiU3lH+bHiLMZdo2x/fIeQ/hscL1wCkDLVM2DZQ==",
|
"integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
"version": "2.0.0",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "16.18.126",
|
"version": "25.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.126.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.1.0.tgz",
|
||||||
"integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==",
|
"integrity": "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~7.16.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tunnel": {
|
"node_modules/tunnel": {
|
||||||
"version": "0.0.6",
|
"version": "0.0.6",
|
||||||
@@ -67,16 +61,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "6.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "7.16.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
|
||||||
|
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"version": "2.0.1",
|
"version": "3.0.0",
|
||||||
"description": "Actions core lib",
|
"description": "Actions core lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -9,8 +9,15 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/core.js",
|
"main": "lib/core.js",
|
||||||
"types": "lib/core.d.ts",
|
"types": "lib/core.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./lib/core.d.ts",
|
||||||
|
"import": "./lib/core.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -36,10 +43,10 @@
|
|||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/http-client": "^3.0.0"
|
"@actions/http-client": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.18.112"
|
"@types/node": "^25.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import {toCommandValue} from './utils'
|
import {toCommandValue} from './utils.js'
|
||||||
|
|
||||||
// For internal use, subject to change.
|
// For internal use, subject to change.
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {issue, issueCommand} from './command'
|
import {issue, issueCommand} from './command.js'
|
||||||
import {issueFileCommand, prepareKeyValueMessage} from './file-command'
|
import {issueFileCommand, prepareKeyValueMessage} from './file-command.js'
|
||||||
import {toCommandProperties, toCommandValue} from './utils'
|
import {toCommandProperties, toCommandValue} from './utils.js'
|
||||||
|
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
|
||||||
import {OidcClient} from './oidc-utils'
|
import {OidcClient} from './oidc-utils.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for getInput options
|
* Interface for getInput options
|
||||||
@@ -400,19 +400,19 @@ export async function getIDToken(aud?: string): Promise<string> {
|
|||||||
/**
|
/**
|
||||||
* Summary exports
|
* Summary exports
|
||||||
*/
|
*/
|
||||||
export {summary} from './summary'
|
export {summary} from './summary.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use core.summary
|
* @deprecated use core.summary
|
||||||
*/
|
*/
|
||||||
export {markdownSummary} from './summary'
|
export {markdownSummary} from './summary.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Path exports
|
* Path exports
|
||||||
*/
|
*/
|
||||||
export {toPosixPath, toWin32Path, toPlatformPath} from './path-utils'
|
export {toPosixPath, toWin32Path, toPlatformPath} from './path-utils.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platform utilities exports
|
* Platform utilities exports
|
||||||
*/
|
*/
|
||||||
export * as platform from './platform'
|
export * as platform from './platform.js'
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
import * as crypto from 'crypto'
|
import * as crypto from 'crypto'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import {toCommandValue} from './utils'
|
import {toCommandValue} from './utils.js'
|
||||||
|
|
||||||
export function issueFileCommand(command: string, message: any): void {
|
export function issueFileCommand(command: string, message: any): void {
|
||||||
const filePath = process.env[`GITHUB_${command}`]
|
const filePath = process.env[`GITHUB_${command}`]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import * as actions_http_client from '@actions/http-client'
|
|||||||
import {RequestOptions} from '@actions/http-client/lib/interfaces'
|
import {RequestOptions} from '@actions/http-client/lib/interfaces'
|
||||||
import {HttpClient} from '@actions/http-client'
|
import {HttpClient} from '@actions/http-client'
|
||||||
import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
|
import {BearerCredentialHandler} from '@actions/http-client/lib/auth'
|
||||||
import {debug, setSecret} from './core'
|
import {debug, setSecret} from './core.js'
|
||||||
interface TokenResponse {
|
interface TokenResponse {
|
||||||
value?: string
|
value?: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
|
||||||
import {AnnotationProperties} from './core'
|
import {AnnotationProperties} from './core.js'
|
||||||
import {CommandProperties} from './command'
|
import {CommandProperties} from './command.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
|
|||||||
@@ -4,7 +4,9 @@
|
|||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"rootDir": "./src"
|
"rootDir": "./src",
|
||||||
|
"module": "node16",
|
||||||
|
"moduleResolution": "node16"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src"
|
"./src"
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
# @actions/exec Releases
|
# @actions/exec Releases
|
||||||
|
|
||||||
### 2.0.0
|
## 3.0.0
|
||||||
|
|
||||||
|
- **Breaking change**: Package is now ESM-only
|
||||||
|
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||||
|
|
||||||
|
## 2.0.0
|
||||||
|
|
||||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||||
- Bump @actions/io dependency from ^1.0.1 to ^2.0.0
|
- Bump @actions/io dependency from ^1.0.1 to ^2.0.0
|
||||||
|
|
||||||
### 1.1.1
|
## 1.1.1
|
||||||
- Update `lockfileVersion` to `v2` in `package-lock.json [#1024](https://github.com/actions/toolkit/pull/1024)
|
|
||||||
|
|
||||||
### 1.1.0
|
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1024](https://github.com/actions/toolkit/pull/1024)
|
||||||
|
|
||||||
|
## 1.1.0
|
||||||
|
|
||||||
- [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773)
|
- [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773)
|
||||||
- [Add getExecOutput function](https://github.com/actions/toolkit/pull/814)
|
- [Add getExecOutput function](https://github.com/actions/toolkit/pull/814)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as exec from '../src/exec'
|
import * as exec from '../src/exec.js'
|
||||||
import * as im from '../src/interfaces'
|
import * as im from '../src/interfaces.js'
|
||||||
|
|
||||||
import * as childProcess from 'child_process'
|
import * as childProcess from 'child_process'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
@@ -14,7 +14,7 @@ const IS_WINDOWS = process.platform === 'win32'
|
|||||||
const SPAWN_WAIT_SCRIPT = path.join(
|
const SPAWN_WAIT_SCRIPT = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'spawn-wait-for-file.js'
|
'spawn-wait-for-file.cjs'
|
||||||
)
|
)
|
||||||
|
|
||||||
let outstream: stream.Writable
|
let outstream: stream.Writable
|
||||||
@@ -196,7 +196,7 @@ describe('@actions/exec', () => {
|
|||||||
const scriptPath: string = path.join(
|
const scriptPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stderroutput.js'
|
'stderroutput.cjs'
|
||||||
)
|
)
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ describe('@actions/exec', () => {
|
|||||||
const scriptPath: string = path.join(
|
const scriptPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stderroutput.js'
|
'stderroutput.cjs'
|
||||||
)
|
)
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
|
|
||||||
@@ -255,12 +255,12 @@ describe('@actions/exec', () => {
|
|||||||
const stdErrPath: string = path.join(
|
const stdErrPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stderroutput.js'
|
'stderroutput.cjs'
|
||||||
)
|
)
|
||||||
const stdOutPath: string = path.join(
|
const stdOutPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stdoutoutput.js'
|
'stdoutoutput.cjs'
|
||||||
)
|
)
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
let stdoutCalled = false
|
let stdoutCalled = false
|
||||||
@@ -295,7 +295,7 @@ describe('@actions/exec', () => {
|
|||||||
const stdlinePath: string = path.join(
|
const stdlinePath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stdlineoutput.js'
|
'stdlineoutput.cjs'
|
||||||
)
|
)
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ describe('@actions/exec', () => {
|
|||||||
const waitForInput: string = path.join(
|
const waitForInput: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'wait-for-input.js'
|
'wait-for-input.cjs'
|
||||||
)
|
)
|
||||||
|
|
||||||
const _testExecOptions = getExecOptions()
|
const _testExecOptions = getExecOptions()
|
||||||
@@ -622,12 +622,12 @@ describe('@actions/exec', () => {
|
|||||||
const stdErrPath: string = path.join(
|
const stdErrPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stderroutput.js'
|
'stderroutput.cjs'
|
||||||
)
|
)
|
||||||
const stdOutPath: string = path.join(
|
const stdOutPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stdoutoutput.js'
|
'stdoutoutput.cjs'
|
||||||
)
|
)
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
|
|
||||||
@@ -653,12 +653,12 @@ describe('@actions/exec', () => {
|
|||||||
const stdErrPath: string = path.join(
|
const stdErrPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stderroutput.js'
|
'stderroutput.cjs'
|
||||||
)
|
)
|
||||||
const stdOutPath: string = path.join(
|
const stdOutPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stdoutoutput.js'
|
'stdoutoutput.cjs'
|
||||||
)
|
)
|
||||||
|
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
@@ -703,12 +703,12 @@ describe('@actions/exec', () => {
|
|||||||
const stdErrPath: string = path.join(
|
const stdErrPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stderroutput.js'
|
'stderroutput.cjs'
|
||||||
)
|
)
|
||||||
const stdOutPath: string = path.join(
|
const stdOutPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stdoutoutputlarge.js'
|
'stdoutoutputlarge.cjs'
|
||||||
)
|
)
|
||||||
|
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
@@ -753,7 +753,7 @@ describe('@actions/exec', () => {
|
|||||||
const stdOutPath: string = path.join(
|
const stdOutPath: string = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'scripts',
|
'scripts',
|
||||||
'stdoutputspecial.js'
|
'stdoutputspecial.cjs'
|
||||||
)
|
)
|
||||||
|
|
||||||
const nodePath: string = await io.which('node', true)
|
const nodePath: string = await io.which('node', true)
|
||||||
|
|||||||
+2
-2
@@ -15,10 +15,10 @@ if (!filePath) {
|
|||||||
throw new Error('file is not specified')
|
throw new Error('file is not specified')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spawn wait-for-file.js with inherited stdio
|
// Spawn wait-for-file.cjs with inherited stdio
|
||||||
// This creates a grandchild process that holds the stdio handles open
|
// This creates a grandchild process that holds the stdio handles open
|
||||||
// after this process (the child) exits
|
// after this process (the child) exits
|
||||||
const waitScript = path.join(__dirname, 'wait-for-file.js')
|
const waitScript = path.join(__dirname, 'wait-for-file.cjs')
|
||||||
const isWindows = process.platform === 'win32'
|
const isWindows = process.platform === 'win32'
|
||||||
|
|
||||||
// On Windows, use detached:true to properly keep streams open
|
// On Windows, use detached:true to properly keep streams open
|
||||||
Generated
+6
-6
@@ -1,21 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^2.0.0"
|
"@actions/io": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
"version": "2.0.0",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/exec",
|
"name": "@actions/exec",
|
||||||
"version": "2.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Actions exec lib",
|
"description": "Actions exec lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -9,8 +9,15 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/exec",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/exec",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/exec.js",
|
"main": "lib/exec.js",
|
||||||
"types": "lib/exec.d.ts",
|
"types": "lib/exec.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./lib/exec.d.ts",
|
||||||
|
"import": "./lib/exec.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -36,6 +43,6 @@
|
|||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^2.0.0"
|
"@actions/io": "^3.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {StringDecoder} from 'string_decoder'
|
import {StringDecoder} from 'string_decoder'
|
||||||
import {ExecOptions, ExecOutput, ExecListeners} from './interfaces'
|
import {ExecOptions, ExecOutput, ExecListeners} from './interfaces.js'
|
||||||
import * as tr from './toolrunner'
|
import * as tr from './toolrunner.js'
|
||||||
|
|
||||||
export {ExecOptions, ExecOutput, ExecListeners}
|
export {ExecOptions, ExecOutput, ExecListeners}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import * as events from 'events'
|
|||||||
import * as child from 'child_process'
|
import * as child from 'child_process'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as stream from 'stream'
|
import * as stream from 'stream'
|
||||||
import * as im from './interfaces'
|
import * as im from './interfaces.js'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
import * as ioUtil from '@actions/io/lib/io-util'
|
import * as ioUtil from '@actions/io/lib/io-util'
|
||||||
import {setTimeout} from 'timers'
|
import {setTimeout} from 'timers'
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src"
|
"rootDir": "./src",
|
||||||
|
"module": "node16",
|
||||||
|
"moduleResolution": "node16"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src"
|
"./src"
|
||||||
|
|||||||
@@ -6,9 +6,20 @@
|
|||||||
|
|
||||||
Returns an authenticated Octokit client that follows the machine [proxy settings](https://help.github.com/en/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners) and correctly sets GHES base urls. See https://octokit.github.io/rest.js for the API.
|
Returns an authenticated Octokit client that follows the machine [proxy settings](https://help.github.com/en/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners) and correctly sets GHES base urls. See https://octokit.github.io/rest.js for the API.
|
||||||
|
|
||||||
|
**Note:** This package is ESM-only starting from v9.0.0. For CommonJS projects, use dynamic import:
|
||||||
```js
|
```js
|
||||||
const github = require('@actions/github');
|
async function main() {
|
||||||
const core = require('@actions/core');
|
const { getOctokit, context } = await import('@actions/github');
|
||||||
|
// ... your code here
|
||||||
|
}
|
||||||
|
main();
|
||||||
|
```
|
||||||
|
|
||||||
|
For bundled actions (recommended), most bundlers like esbuild, webpack, and rollup handle ESM imports automatically.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import * as github from '@actions/github';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
// This should be a token with access to your repository scoped in as a secret.
|
// This should be a token with access to your repository scoped in as a secret.
|
||||||
@@ -46,7 +57,7 @@ const result = await octokit.graphql(query, variables);
|
|||||||
Finally, you can get the context of the current action:
|
Finally, you can get the context of the current action:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const github = require('@actions/github');
|
import * as github from '@actions/github';
|
||||||
|
|
||||||
const context = github.context;
|
const context = github.context;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
# @actions/github Releases
|
# @actions/github Releases
|
||||||
|
|
||||||
|
### 9.0.0
|
||||||
|
|
||||||
|
- **Breaking change**: Package is now ESM-only
|
||||||
|
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||||
|
- Example: `const { getOctokit, context } = await import('@actions/github')`
|
||||||
|
- Fix TypeScript compilation by migrating to ESM, enabling proper imports from `@octokit/core/types`
|
||||||
|
|
||||||
|
### 8.0.1
|
||||||
|
|
||||||
|
- Update `undici` to `6.23.0`
|
||||||
|
- Update `@actions/http-client` to `3.0.2`
|
||||||
|
|
||||||
|
### 8.0.0
|
||||||
|
|
||||||
|
- Update @octokit dependencies
|
||||||
|
- `@octokit/core` ^7.0.6
|
||||||
|
- `@octokit/plugin-paginate-rest` ^14.0.0
|
||||||
|
- `@octokit/plugin-rest-endpoint-methods` ^17.0.0
|
||||||
|
- `@octokit/request` ^10.0.7
|
||||||
|
- `@octokit/request-error` ^7.1.0
|
||||||
|
- **Breaking change**: Minimum Node.js version is now 20 (previously 18)
|
||||||
|
|
||||||
|
### 7.0.0
|
||||||
|
|
||||||
|
- Update to v3.0.1 of `@actions/http-client`
|
||||||
|
|
||||||
### 6.0.1
|
### 6.0.1
|
||||||
|
|
||||||
- Dependency updates [#2043](https://github.com/actions/toolkit/pull/2043)
|
- Dependency updates [#2043](https://github.com/actions/toolkit/pull/2043)
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import {Context} from '../src/context'
|
import {readFileSync} from 'fs'
|
||||||
|
import {Context} from '../src/context.js'
|
||||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
||||||
|
|
||||||
describe('@actions/context', () => {
|
describe('@actions/context', () => {
|
||||||
let context: Context
|
let context: Context
|
||||||
@@ -14,7 +12,10 @@ describe('@actions/context', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('returns the payload object', () => {
|
it('returns the payload object', () => {
|
||||||
expect(context.payload).toEqual(require('./payload.json'))
|
const payload = JSON.parse(
|
||||||
|
readFileSync(path.join(__dirname, 'payload.json'), 'utf8')
|
||||||
|
)
|
||||||
|
expect(context.payload).toEqual(payload)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('returns an empty payload if the GITHUB_EVENT_PATH environment variable is falsey', () => {
|
it('returns an empty payload if the GITHUB_EVENT_PATH environment variable is falsey', () => {
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/** @type {import('jest').Config} */
|
||||||
|
module.exports = {
|
||||||
|
clearMocks: true,
|
||||||
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
|
testEnvironment: 'node',
|
||||||
|
testMatch: ['**/*.test.ts'],
|
||||||
|
moduleNameMapper: {
|
||||||
|
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||||
|
},
|
||||||
|
transform: {
|
||||||
|
'^.+\\.(ts|js)$': ['ts-jest', {
|
||||||
|
tsconfig: {
|
||||||
|
allowJs: true,
|
||||||
|
esModuleInterop: true,
|
||||||
|
module: 'node16',
|
||||||
|
moduleResolution: 'node16'
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
transformIgnorePatterns: [
|
||||||
|
'/node_modules/(?!(@octokit|universal-user-agent|before-after-hook)/)'
|
||||||
|
],
|
||||||
|
verbose: true
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
clearMocks: true,
|
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
|
||||||
testEnvironment: 'node',
|
|
||||||
testMatch: ['**/*.test.ts'],
|
|
||||||
transform: {
|
|
||||||
'^.+\\.ts$': 'ts-jest'
|
|
||||||
},
|
|
||||||
verbose: true
|
|
||||||
}
|
|
||||||
Generated
+100
-148
@@ -1,201 +1,161 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "6.0.1",
|
"version": "9.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "6.0.1",
|
"version": "9.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^2.2.0",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@octokit/core": "^5.0.1",
|
"@octokit/core": "^7.0.6",
|
||||||
"@octokit/plugin-paginate-rest": "^9.2.2",
|
"@octokit/plugin-paginate-rest": "^14.0.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^10.4.0",
|
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.7",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.1.0",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"proxy": "^2.1.1"
|
"proxy": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.3",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.25.4"
|
"undici": "^6.23.0"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "4.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
||||||
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "5.2.2",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
|
||||||
"integrity": "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg==",
|
"integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^4.0.0",
|
"@octokit/auth-token": "^6.0.0",
|
||||||
"@octokit/graphql": "^7.1.0",
|
"@octokit/graphql": "^9.0.3",
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.6",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.0.2",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"before-after-hook": "^2.2.0",
|
"before-after-hook": "^4.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "9.0.6",
|
"version": "11.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
|
||||||
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
|
"integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "7.1.1",
|
"version": "9.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
|
||||||
"integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==",
|
"integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.6",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "24.2.0",
|
"version": "27.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
|
||||||
"integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==",
|
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "9.2.2",
|
"version": "14.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
|
||||||
"integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
|
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^16.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=6"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "10.4.1",
|
"version": "17.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz",
|
||||||
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
|
"integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^16.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=6"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "8.4.1",
|
"version": "10.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz",
|
||||||
"integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
|
"integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^9.0.6",
|
"@octokit/endpoint": "^11.0.2",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.0.2",
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^16.0.0",
|
||||||
"universal-user-agent": "^6.0.0"
|
"fast-content-type-parse": "^3.0.0",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "5.1.1",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
|
||||||
"integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
|
"integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^16.0.0"
|
||||||
"deprecation": "^2.0.0",
|
|
||||||
"once": "^1.4.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "13.10.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
|
||||||
"integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==",
|
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
"@octokit/openapi-types": "^27.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ansi-styles": {
|
"node_modules/ansi-styles": {
|
||||||
@@ -234,9 +194,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
"node_modules/before-after-hook": {
|
||||||
"version": "2.2.3",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz",
|
||||||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
|
"integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==",
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
},
|
},
|
||||||
"node_modules/camelcase": {
|
"node_modules/camelcase": {
|
||||||
@@ -299,12 +259,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/deprecation": {
|
|
||||||
"version": "2.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
|
||||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
|
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/escape-string-regexp": {
|
"node_modules/escape-string-regexp": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
@@ -315,6 +269,22 @@
|
|||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fast-content-type-parse": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-ZvLdcY8P+N8mGQJahJV5G4U88CSvT1rP8ApL6uETe88MBXrBHAkZlSEySdUlyztF7ccb+Znos3TFqaepHxdhBg==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/fastify"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/fastify"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/has-flag": {
|
"node_modules/has-flag": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
@@ -352,15 +322,6 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/once": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
|
||||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"wrappy": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/proxy": {
|
"node_modules/proxy": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/proxy/-/proxy-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/proxy/-/proxy-2.2.0.tgz",
|
||||||
@@ -402,27 +363,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "6.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
"version": "6.0.1",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
|
||||||
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==",
|
"integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==",
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/wrappy": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/github",
|
"name": "@actions/github",
|
||||||
"version": "6.0.1",
|
"version": "9.0.0",
|
||||||
"description": "Actions github lib",
|
"description": "Actions github lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -8,8 +8,19 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/github",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/github",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/github.js",
|
"main": "lib/github.js",
|
||||||
"types": "lib/github.d.ts",
|
"types": "lib/github.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./lib/github.d.ts",
|
||||||
|
"import": "./lib/github.js"
|
||||||
|
},
|
||||||
|
"./lib/utils": {
|
||||||
|
"types": "./lib/utils.d.ts",
|
||||||
|
"import": "./lib/utils.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -38,13 +49,13 @@
|
|||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/http-client": "^2.2.0",
|
"@actions/http-client": "^3.0.2",
|
||||||
"@octokit/core": "^5.0.1",
|
"@octokit/core": "^7.0.6",
|
||||||
"@octokit/plugin-paginate-rest": "^9.2.2",
|
"@octokit/plugin-paginate-rest": "^14.0.0",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^10.4.0",
|
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
|
||||||
"@octokit/request": "^8.4.1",
|
"@octokit/request": "^10.0.7",
|
||||||
"@octokit/request-error": "^5.1.1",
|
"@octokit/request-error": "^7.1.0",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"proxy": "^2.1.1"
|
"proxy": "^2.1.1"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/main/src/context.ts
|
// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/main/src/context.ts
|
||||||
import {WebhookPayload} from './interfaces'
|
import {WebhookPayload} from './interfaces.js'
|
||||||
import {readFileSync, existsSync} from 'fs'
|
import {readFileSync, existsSync} from 'fs'
|
||||||
import {EOL} from 'os'
|
import {EOL} from 'os'
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import * as Context from './context'
|
import * as Context from './context.js'
|
||||||
import {GitHub, getOctokitOptions} from './utils'
|
import {GitHub, getOctokitOptions} from './utils.js'
|
||||||
|
|
||||||
// octokit + plugins
|
// octokit + plugins
|
||||||
import {OctokitOptions, OctokitPlugin} from '@octokit/core/dist-types/types'
|
import type {OctokitOptions, OctokitPlugin} from '@octokit/core/types'
|
||||||
|
|
||||||
export const context = new Context.Context()
|
export const context = new Context.Context()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as http from 'http'
|
import * as http from 'http'
|
||||||
import * as httpClient from '@actions/http-client'
|
import * as httpClient from '@actions/http-client'
|
||||||
import {OctokitOptions} from '@octokit/core/dist-types/types'
|
import type {OctokitOptions} from '@octokit/core/types'
|
||||||
import {ProxyAgent, fetch} from 'undici'
|
import {ProxyAgent, fetch} from 'undici'
|
||||||
|
|
||||||
export function getAuthString(
|
export function getAuthString(
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import * as Context from './context'
|
import * as Context from './context.js'
|
||||||
import * as Utils from './internal/utils'
|
import * as Utils from './internal/utils.js'
|
||||||
|
import type {OctokitOptions} from '@octokit/core/types'
|
||||||
|
|
||||||
// octokit + plugins
|
// octokit + plugins
|
||||||
import {Octokit} from '@octokit/core'
|
import {Octokit} from '@octokit/core'
|
||||||
import {OctokitOptions} from '@octokit/core/dist-types/types'
|
|
||||||
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
|
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
|
||||||
import {paginateRest} from '@octokit/plugin-paginate-rest'
|
import {paginateRest} from '@octokit/plugin-paginate-rest'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src"
|
"rootDir": "./src",
|
||||||
|
"module": "node16",
|
||||||
|
"moduleResolution": "node16"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src"
|
"./src"
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
# @actions/glob Releases
|
# @actions/glob Releases
|
||||||
|
|
||||||
|
### 0.5.1
|
||||||
|
|
||||||
|
- Bump `@actions/core` to `2.0.3`
|
||||||
|
|
||||||
### 0.5.0
|
### 0.5.0
|
||||||
- Added `excludeHiddenFiles` option, which is disabled by default to preserve existing behavior [#1791: Add glob option to ignore hidden files](https://github.com/actions/toolkit/pull/1791)
|
- Added `excludeHiddenFiles` option, which is disabled by default to preserve existing behavior [#1791: Add glob option to ignore hidden files](https://github.com/actions/toolkit/pull/1791)
|
||||||
|
|
||||||
|
|||||||
Generated
+23
-35
@@ -1,62 +1,53 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/glob",
|
"name": "@actions/glob",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/glob",
|
"name": "@actions/glob",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^2.0.3",
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "1.11.1",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.3.tgz",
|
||||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
"integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/http-client": "^2.0.1"
|
"@actions/http-client": "^3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/exec": {
|
||||||
"version": "1.1.1",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
||||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.3",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.25.4"
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/io": {
|
"node_modules/@actions/io": {
|
||||||
"version": "1.1.3",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
|
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/balanced-match": {
|
"node_modules/balanced-match": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
@@ -101,15 +92,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "6.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/glob",
|
"name": "@actions/glob",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Actions glob lib",
|
"description": "Actions glob lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"url": "https://github.com/actions/toolkit/issues"
|
"url": "https://github.com/actions/toolkit/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^2.0.3",
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +1,53 @@
|
|||||||
## Releases
|
# Releases
|
||||||
|
|
||||||
|
## 4.0.0
|
||||||
|
|
||||||
|
- **Breaking change**: Package is now ESM-only
|
||||||
|
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||||
|
|
||||||
|
## 3.0.2
|
||||||
|
|
||||||
|
- Bump `undici` from `5.28.5` to `6.23.0`
|
||||||
|
|
||||||
|
## 3.0.1
|
||||||
|
|
||||||
|
- Add support for ACTIONS_ORCHESTRATION_ID in user-agent and default user-agent [#2229](https://github.com/actions/toolkit/pull/2229)
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
|
|
||||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||||
|
|
||||||
## 2.2.3
|
## 2.2.3
|
||||||
|
|
||||||
- Fixed an issue where proxy username and password were not handled correctly [#1799](https://github.com/actions/toolkit/pull/1799)
|
- Fixed an issue where proxy username and password were not handled correctly [#1799](https://github.com/actions/toolkit/pull/1799)
|
||||||
|
|
||||||
## 2.2.2
|
## 2.2.2
|
||||||
|
|
||||||
- Better handling of url encoded usernames and passwords in proxy config [#1782](https://github.com/actions/toolkit/pull/1782)
|
- Better handling of url encoded usernames and passwords in proxy config [#1782](https://github.com/actions/toolkit/pull/1782)
|
||||||
|
|
||||||
## 2.2.1
|
## 2.2.1
|
||||||
|
|
||||||
- Make sure RequestOptions.keepAlive is applied properly on node20 runtime [#1572](https://github.com/actions/toolkit/pull/1572)
|
- Make sure RequestOptions.keepAlive is applied properly on node20 runtime [#1572](https://github.com/actions/toolkit/pull/1572)
|
||||||
|
|
||||||
## 2.2.0
|
## 2.2.0
|
||||||
|
|
||||||
- Add function to return proxy agent dispatcher for compatibility with latest octokit packages [#1547](https://github.com/actions/toolkit/pull/1547)
|
- Add function to return proxy agent dispatcher for compatibility with latest octokit packages [#1547](https://github.com/actions/toolkit/pull/1547)
|
||||||
|
|
||||||
## 2.1.1
|
## 2.1.1
|
||||||
|
|
||||||
- Add `HttpClientResponse.readBodyBuffer` method to read from a response stream and return a buffer [#1475](https://github.com/actions/toolkit/pull/1475)
|
- Add `HttpClientResponse.readBodyBuffer` method to read from a response stream and return a buffer [#1475](https://github.com/actions/toolkit/pull/1475)
|
||||||
|
|
||||||
## 2.1.0
|
## 2.1.0
|
||||||
|
|
||||||
- Add support for `*` and subdomains in `no_proxy` [#1355](https://github.com/actions/toolkit/pull/1355) [#1223](https://github.com/actions/toolkit/pull/1223)
|
- Add support for `*` and subdomains in `no_proxy` [#1355](https://github.com/actions/toolkit/pull/1355) [#1223](https://github.com/actions/toolkit/pull/1223)
|
||||||
- Bypass proxy for loopback IP adresses [#1360](https://github.com/actions/toolkit/pull/1360))
|
- Bypass proxy for loopback IP adresses [#1360](https://github.com/actions/toolkit/pull/1360))
|
||||||
|
|
||||||
## 2.0.1
|
## 2.0.1
|
||||||
|
|
||||||
- Fix an issue with missing `tunnel` dependency [#1085](https://github.com/actions/toolkit/pull/1085)
|
- Fix an issue with missing `tunnel` dependency [#1085](https://github.com/actions/toolkit/pull/1085)
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
- The package is now compiled with TypeScript's [`strict` compiler setting](https://www.typescriptlang.org/tsconfig#strict). To comply with stricter rules:
|
- The package is now compiled with TypeScript's [`strict` compiler setting](https://www.typescriptlang.org/tsconfig#strict). To comply with stricter rules:
|
||||||
- Some exported types now include `| null` or `| undefined`, matching their actual behavior.
|
- Some exported types now include `| null` or `| undefined`, matching their actual behavior.
|
||||||
- Types implementing the method `RequestHandler.handleAuthentication()` now throw an `Error` rather than returning `null` if they do not support handling an HTTP 401 response. Callers can still use `canHandleAuthentication()` to determine if this handling is supported or not.
|
- Types implementing the method `RequestHandler.handleAuthentication()` now throw an `Error` rather than returning `null` if they do not support handling an HTTP 401 response. Callers can still use `canHandleAuthentication()` to determine if this handling is supported or not.
|
||||||
@@ -40,22 +62,29 @@
|
|||||||
Contains a bug fix where proxy is defined without a user and password. see [PR here](https://github.com/actions/http-client/pull/42)
|
Contains a bug fix where proxy is defined without a user and password. see [PR here](https://github.com/actions/http-client/pull/42)
|
||||||
|
|
||||||
## 1.0.9
|
## 1.0.9
|
||||||
|
|
||||||
Throw HttpClientError instead of a generic Error from the \<verb>Json() helper methods when the server responds with a non-successful status code.
|
Throw HttpClientError instead of a generic Error from the \<verb>Json() helper methods when the server responds with a non-successful status code.
|
||||||
|
|
||||||
## 1.0.8
|
## 1.0.8
|
||||||
|
|
||||||
Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27)
|
Fixed security issue where a redirect (e.g. 302) to another domain would pass headers. The fix was to strip the authorization header if the hostname was different. More [details in PR #27](https://github.com/actions/http-client/pull/27)
|
||||||
|
|
||||||
## 1.0.7
|
## 1.0.7
|
||||||
|
|
||||||
Update NPM dependencies and add 429 to the list of HttpCodes
|
Update NPM dependencies and add 429 to the list of HttpCodes
|
||||||
|
|
||||||
## 1.0.6
|
## 1.0.6
|
||||||
|
|
||||||
Automatically sends Content-Type and Accept application/json headers for \<verb>Json() helper methods if not set in the client or parameters.
|
Automatically sends Content-Type and Accept application/json headers for \<verb>Json() helper methods if not set in the client or parameters.
|
||||||
|
|
||||||
## 1.0.5
|
## 1.0.5
|
||||||
|
|
||||||
Adds \<verb>Json() helper methods for json over http scenarios.
|
Adds \<verb>Json() helper methods for json over http scenarios.
|
||||||
|
|
||||||
## 1.0.4
|
## 1.0.4
|
||||||
|
|
||||||
Started to add \<verb>Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types.
|
Started to add \<verb>Json() helper methods. Do not use this release for that. Use >= 1.0.5 since there was an issue with types.
|
||||||
|
|
||||||
## 1.0.1 to 1.0.3
|
## 1.0.1 to 1.0.3
|
||||||
|
|
||||||
Adds proxy support.
|
Adds proxy support.
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ describe('basics', () => {
|
|||||||
_http = new httpm.HttpClient('http-client-tests')
|
_http = new httpm.HttpClient('http-client-tests')
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(() => {})
|
afterEach(() => {
|
||||||
|
// Clean up environment variable to prevent test pollution
|
||||||
|
delete process.env['ACTIONS_ORCHESTRATION_ID']
|
||||||
|
})
|
||||||
|
|
||||||
it('constructs', () => {
|
it('constructs', () => {
|
||||||
const http: httpm.HttpClient = new httpm.HttpClient('thttp-client-tests')
|
const http: httpm.HttpClient = new httpm.HttpClient('thttp-client-tests')
|
||||||
@@ -60,7 +63,7 @@ describe('basics', () => {
|
|||||||
const body: string = await res.readBody()
|
const body: string = await res.readBody()
|
||||||
const obj = JSON.parse(body)
|
const obj = JSON.parse(body)
|
||||||
expect(obj.url).toBe('https://postman-echo.com/get')
|
expect(obj.url).toBe('https://postman-echo.com/get')
|
||||||
expect(obj.headers['user-agent']).toBeFalsy()
|
expect(obj.headers['user-agent']).toBe('actions/http-client')
|
||||||
})
|
})
|
||||||
|
|
||||||
/* TODO write a mock rather then relying on a third party
|
/* TODO write a mock rather then relying on a third party
|
||||||
@@ -374,4 +377,66 @@ describe('basics', () => {
|
|||||||
httpm.MediaTypes.ApplicationJson
|
httpm.MediaTypes.ApplicationJson
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('appends orchestration ID to user-agent when ACTIONS_ORCHESTRATION_ID is set', async () => {
|
||||||
|
const orchId = 'test-orch-id-12345'
|
||||||
|
process.env['ACTIONS_ORCHESTRATION_ID'] = orchId
|
||||||
|
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests')
|
||||||
|
const res: httpm.HttpClientResponse = await http.get(
|
||||||
|
'https://postman-echo.com/get'
|
||||||
|
)
|
||||||
|
expect(res.message.statusCode).toBe(200)
|
||||||
|
const body: string = await res.readBody()
|
||||||
|
const obj = JSON.parse(body)
|
||||||
|
expect(obj.headers['user-agent']).toBe(
|
||||||
|
`http-client-tests actions_orchestration_id/${orchId}`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('sanitizes invalid characters in orchestration ID', async () => {
|
||||||
|
const orchId = 'test (with) special/chars'
|
||||||
|
process.env['ACTIONS_ORCHESTRATION_ID'] = orchId
|
||||||
|
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests')
|
||||||
|
const res: httpm.HttpClientResponse = await http.get(
|
||||||
|
'https://postman-echo.com/get'
|
||||||
|
)
|
||||||
|
expect(res.message.statusCode).toBe(200)
|
||||||
|
const body: string = await res.readBody()
|
||||||
|
const obj = JSON.parse(body)
|
||||||
|
// Spaces, parentheses, and slashes should be replaced with underscores
|
||||||
|
expect(obj.headers['user-agent']).toBe(
|
||||||
|
'http-client-tests actions_orchestration_id/test__with__special_chars'
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not modify user-agent when ACTIONS_ORCHESTRATION_ID is not set', async () => {
|
||||||
|
delete process.env['ACTIONS_ORCHESTRATION_ID']
|
||||||
|
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient('http-client-tests')
|
||||||
|
const res: httpm.HttpClientResponse = await http.get(
|
||||||
|
'https://postman-echo.com/get'
|
||||||
|
)
|
||||||
|
expect(res.message.statusCode).toBe(200)
|
||||||
|
const body: string = await res.readBody()
|
||||||
|
const obj = JSON.parse(body)
|
||||||
|
expect(obj.headers['user-agent']).toBe('http-client-tests')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('uses default user-agent with orchestration ID when no custom user-agent provided', async () => {
|
||||||
|
const orchId = 'test-default-id-12345'
|
||||||
|
process.env['ACTIONS_ORCHESTRATION_ID'] = orchId
|
||||||
|
|
||||||
|
const http: httpm.HttpClient = new httpm.HttpClient()
|
||||||
|
const res: httpm.HttpClientResponse = await http.get(
|
||||||
|
'https://postman-echo.com/get'
|
||||||
|
)
|
||||||
|
expect(res.message.statusCode).toBe(200)
|
||||||
|
const body: string = await res.readBody()
|
||||||
|
const obj = JSON.parse(body)
|
||||||
|
expect(obj.headers['user-agent']).toBe(
|
||||||
|
`actions/http-client actions_orchestration_id/${orchId}`
|
||||||
|
)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Generated
+7
-19
@@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/http-client",
|
"name": "@actions/http-client",
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@actions/http-client",
|
"name": "@actions/http-client",
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "24.1.0",
|
"@types/node": "24.1.0",
|
||||||
@@ -19,15 +19,6 @@
|
|||||||
"proxy": "^2.1.1"
|
"proxy": "^2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fastify/busboy": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.1.0",
|
"version": "24.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
|
||||||
@@ -241,15 +232,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.29.0",
|
"version": "6.23.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz",
|
||||||
"integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
|
"integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
|
||||||
"@fastify/busboy": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@actions/http-client",
|
"name": "@actions/http-client",
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"description": "Actions Http Client",
|
"description": "Actions Http Client",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"github",
|
"github",
|
||||||
@@ -9,8 +9,27 @@
|
|||||||
],
|
],
|
||||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client",
|
"homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./lib/index.d.ts",
|
||||||
|
"import": "./lib/index.js"
|
||||||
|
},
|
||||||
|
"./lib/auth": {
|
||||||
|
"types": "./lib/auth.d.ts",
|
||||||
|
"import": "./lib/auth.js"
|
||||||
|
},
|
||||||
|
"./lib/proxy": {
|
||||||
|
"types": "./lib/proxy.d.ts",
|
||||||
|
"import": "./lib/proxy.js"
|
||||||
|
},
|
||||||
|
"./lib/interfaces": {
|
||||||
|
"types": "./lib/interfaces.d.ts",
|
||||||
|
"import": "./lib/interfaces.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"lib": "lib",
|
"lib": "lib",
|
||||||
"test": "__tests__"
|
"test": "__tests__"
|
||||||
@@ -46,7 +65,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.28.5"
|
"undici": "^6.23.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"uri-js": "npm:uri-js-replace@^1.0.1"
|
"uri-js": "npm:uri-js-replace@^1.0.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as http from 'http'
|
import * as http from 'http'
|
||||||
import * as ifm from './interfaces'
|
import * as ifm from './interfaces.js'
|
||||||
import {HttpClientResponse} from './index'
|
import {HttpClientResponse} from './index.js'
|
||||||
|
|
||||||
export class BasicCredentialHandler implements ifm.RequestHandler {
|
export class BasicCredentialHandler implements ifm.RequestHandler {
|
||||||
username: string
|
username: string
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
import * as http from 'http'
|
import * as http from 'http'
|
||||||
import * as https from 'https'
|
import * as https from 'https'
|
||||||
import * as ifm from './interfaces'
|
import * as ifm from './interfaces.js'
|
||||||
import * as net from 'net'
|
import * as net from 'net'
|
||||||
import * as pm from './proxy'
|
import * as pm from './proxy.js'
|
||||||
import * as tunnel from 'tunnel'
|
import * as tunnel from 'tunnel'
|
||||||
import {ProxyAgent} from 'undici'
|
import {ProxyAgent} from 'undici'
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ export class HttpClient {
|
|||||||
handlers?: ifm.RequestHandler[],
|
handlers?: ifm.RequestHandler[],
|
||||||
requestOptions?: ifm.RequestOptions
|
requestOptions?: ifm.RequestOptions
|
||||||
) {
|
) {
|
||||||
this.userAgent = userAgent
|
this.userAgent = this._getUserAgentWithOrchestrationId(userAgent)
|
||||||
this.handlers = handlers || []
|
this.handlers = handlers || []
|
||||||
this.requestOptions = requestOptions
|
this.requestOptions = requestOptions
|
||||||
if (requestOptions) {
|
if (requestOptions) {
|
||||||
@@ -816,6 +816,18 @@ export class HttpClient {
|
|||||||
return proxyAgent
|
return proxyAgent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _getUserAgentWithOrchestrationId(userAgent?: string): string {
|
||||||
|
const baseUserAgent = userAgent || 'actions/http-client'
|
||||||
|
const orchId = process.env['ACTIONS_ORCHESTRATION_ID']
|
||||||
|
if (orchId) {
|
||||||
|
// Sanitize the orchestration ID to ensure it contains only valid characters
|
||||||
|
// Valid characters: 0-9, a-z, _, -, .
|
||||||
|
const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_')
|
||||||
|
return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`
|
||||||
|
}
|
||||||
|
return baseUserAgent
|
||||||
|
}
|
||||||
|
|
||||||
private async _performExponentialBackoff(retryNumber: number): Promise<void> {
|
private async _performExponentialBackoff(retryNumber: number): Promise<void> {
|
||||||
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber)
|
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber)
|
||||||
const ms: number = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber)
|
const ms: number = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as http from 'http'
|
import * as http from 'http'
|
||||||
import * as https from 'https'
|
import * as https from 'https'
|
||||||
import {HttpClientResponse} from './index'
|
import {HttpClientResponse} from './index.js'
|
||||||
|
|
||||||
export interface HttpClient {
|
export interface HttpClient {
|
||||||
options(
|
options(
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"moduleResolution": "node",
|
"module": "node16",
|
||||||
"declaration": true,
|
"moduleResolution": "node16",
|
||||||
|
"declaration": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./src"
|
"./src"
|
||||||
|
|||||||
+24
-7
@@ -1,26 +1,43 @@
|
|||||||
# @actions/io Releases
|
# @actions/io Releases
|
||||||
|
|
||||||
### 2.0.0
|
## 3.0.2
|
||||||
|
|
||||||
|
- Fix: update lock file version
|
||||||
|
|
||||||
|
## 3.0.1
|
||||||
|
|
||||||
|
- Fix: export `@actions/io/lib/io-util`
|
||||||
|
|
||||||
|
## 3.0.0
|
||||||
|
|
||||||
|
- **Breaking change**: Package is now ESM-only
|
||||||
|
- CommonJS consumers must use dynamic `import()` instead of `require()`
|
||||||
|
|
||||||
|
## 2.0.0
|
||||||
|
|
||||||
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
|
||||||
- Ensures consistent behavior for paths on Node 24 with Windows
|
- Ensures consistent behavior for paths on Node 24 with Windows
|
||||||
|
|
||||||
### 1.1.3
|
## 1.1.3
|
||||||
|
|
||||||
- Replace `child_process.exec` with `fs.rm` in `rmRF` for all OS implementations [#1373](https://github.com/actions/toolkit/pull/1373)
|
- Replace `child_process.exec` with `fs.rm` in `rmRF` for all OS implementations [#1373](https://github.com/actions/toolkit/pull/1373)
|
||||||
|
|
||||||
### 1.1.2
|
## 1.1.2
|
||||||
|
|
||||||
- Update `lockfileVersion` to `v2` in `package-lock.json [#1020](https://github.com/actions/toolkit/pull/1020)
|
- Update `lockfileVersion` to `v2` in `package-lock.json [#1020](https://github.com/actions/toolkit/pull/1020)
|
||||||
|
|
||||||
### 1.1.1
|
## 1.1.1
|
||||||
|
|
||||||
- [Fixed a bug where we incorrectly escaped paths for rmrf](https://github.com/actions/toolkit/pull/828)
|
- [Fixed a bug where we incorrectly escaped paths for rmrf](https://github.com/actions/toolkit/pull/828)
|
||||||
|
|
||||||
### 1.1.0
|
## 1.1.0
|
||||||
|
|
||||||
- Add `findInPath` method to locate all matching executables in the system path
|
- Add `findInPath` method to locate all matching executables in the system path
|
||||||
|
|
||||||
### 1.0.2
|
## 1.0.2
|
||||||
|
|
||||||
- [Add \"types\" to package.json](https://github.com/actions/toolkit/pull/221)
|
- [Add \"types\" to package.json](https://github.com/actions/toolkit/pull/221)
|
||||||
|
|
||||||
### 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user