mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-03-06 16:23:08 +08:00
chore(deps): bump the npm-actions-dependencies group with 3 updates
Bumps the npm-actions-dependencies group with 3 updates: - [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) - [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) - [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) Updates `@actions/core` from 2.0.2 to 3.0.0 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Updates `@actions/github` from 7.0.0 to 9.0.0 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) Updates `@actions/tool-cache` from 3.0.0 to 4.0.0 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/@actions/cache@4.0.0/packages/tool-cache) --- updated-dependencies: - dependency-name: "@actions/core" dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: npm-actions-dependencies - dependency-name: "@actions/github" dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: npm-actions-dependencies - dependency-name: "@actions/tool-cache" dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: npm-actions-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
This commit is contained in:
parent
cce39442ef
commit
2ab47e7e09
48005
dist/index.js
generated
vendored
48005
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
98
dist/licenses.txt
generated
vendored
98
dist/licenses.txt
generated
vendored
@ -83,28 +83,6 @@ The above copyright notice and this permission notice shall be included in all c
|
|||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
@fastify/busboy
|
|
||||||
MIT
|
|
||||||
Copyright Brian White. All rights reserved.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to
|
|
||||||
deal in the Software without restriction, including without limitation the
|
|
||||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
IN THE SOFTWARE.
|
|
||||||
|
|
||||||
@octokit/auth-token
|
@octokit/auth-token
|
||||||
MIT
|
MIT
|
||||||
The MIT License
|
The MIT License
|
||||||
@ -482,25 +460,6 @@ Apache-2.0
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
deprecation
|
|
||||||
ISC
|
|
||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Gregor Martynus and contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
docker-compose
|
docker-compose
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
@ -526,24 +485,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
once
|
fast-content-type-parse
|
||||||
ISC
|
MIT
|
||||||
The ISC License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
Copyright (c) 2023 The Fastify Team
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
The Fastify team members are listed at https://github.com/fastify/fastify#team
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
and in the README file.
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
in the Software without restriction, including without limitation the rights
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
furnished to do so, subject to the following conditions:
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
semver
|
semver
|
||||||
ISC
|
ISC
|
||||||
@ -618,32 +585,13 @@ universal-user-agent
|
|||||||
ISC
|
ISC
|
||||||
# [ISC License](https://spdx.org/licenses/ISC)
|
# [ISC License](https://spdx.org/licenses/ISC)
|
||||||
|
|
||||||
Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m)
|
Copyright (c) 2018-2021, Gregor Martynus (https://github.com/gr2m)
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
wrappy
|
|
||||||
ISC
|
|
||||||
The ISC License
|
|
||||||
|
|
||||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
yaml
|
yaml
|
||||||
ISC
|
ISC
|
||||||
Copyright Eemeli Aro <eemeli@gmail.com>
|
Copyright Eemeli Aro <eemeli@gmail.com>
|
||||||
|
|||||||
3
dist/package.json
generated
vendored
Normal file
3
dist/package.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"type": "module"
|
||||||
|
}
|
||||||
33249
dist/post.js
generated
vendored
33249
dist/post.js
generated
vendored
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
|||||||
import { default as tsDevToolsCore } from "@ts-dev-tools/core/dist/eslint-plugin-ts-dev-tools/index.js";
|
import tsDevToolsCore from "@ts-dev-tools/core/dist/eslint-plugin-ts-dev-tools/index.js";
|
||||||
|
|
||||||
export default tsDevToolsCore.default;
|
export default tsDevToolsCore.default;
|
||||||
|
|||||||
460
package-lock.json
generated
460
package-lock.json
generated
@ -9,9 +9,9 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^2.0.2",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/github": "^7.0.0",
|
"@actions/github": "^9.0.0",
|
||||||
"@actions/tool-cache": "^3.0.0",
|
"@actions/tool-cache": "^4.0.0",
|
||||||
"@octokit/action": "^8.0.4",
|
"@octokit/action": "^8.0.4",
|
||||||
"docker-compose": "^1.3.0"
|
"docker-compose": "^1.3.0"
|
||||||
},
|
},
|
||||||
@ -35,75 +35,86 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/core": {
|
"node_modules/@actions/core": {
|
||||||
"version": "2.0.2",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz",
|
||||||
"integrity": "sha512-Ast1V7yHbGAhplAsuVlnb/5J8Mtr/Zl6byPPL+Qjq3lmfIgWF1ak1iYfF/079cRERiuTALTXkSuEUdZeDCfGtA==",
|
"integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/http-client": "^3.0.1"
|
"@actions/http-client": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/exec": {
|
"node_modules/@actions/core/node_modules/@actions/http-client": {
|
||||||
"version": "2.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
|
||||||
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
"integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==",
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@actions/io": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/github": {
|
|
||||||
"version": "7.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-7.0.0.tgz",
|
|
||||||
"integrity": "sha512-PyGODO938aoBTZd/IfN/+e+Pd5hUcVpyf+thm4CPESLeqhdSkq5QwMTGX9v84XHE1ifmHWBQ60KB8kIgm96opw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@actions/http-client": "^3.0.1",
|
|
||||||
"@octokit/core": "^5.0.1",
|
|
||||||
"@octokit/plugin-paginate-rest": "^9.2.2",
|
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^10.4.0",
|
|
||||||
"@octokit/request": "^8.4.1",
|
|
||||||
"@octokit/request-error": "^5.1.1",
|
|
||||||
"undici": "^5.28.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/http-client": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-SbGS8c/vySbNO3kjFgSW77n83C4MQx/Yoe+b1hAdpuvfHxnkHzDq2pWljUpAA56Si1Gae/7zjeZsV0CYjmLo/w==",
|
|
||||||
"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/exec": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/io": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/github": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@actions/github/-/github-9.0.0.tgz",
|
||||||
|
"integrity": "sha512-yJ0RoswsAaKcvkmpCE4XxBRiy/whH2SdTBHWzs0gi4wkqTDhXMChjSdqBz/F4AeiDlP28rQqL33iHb+kjAMX6w==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@actions/http-client": "^3.0.2",
|
||||||
|
"@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",
|
||||||
|
"undici": "^6.23.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/http-client": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tunnel": "^0.0.6",
|
||||||
|
"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/@actions/tool-cache": {
|
"node_modules/@actions/tool-cache": {
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-4.0.0.tgz",
|
||||||
"integrity": "sha512-JBx8gEWuu8Lqaqx/hEnL6QdKvF06suBR4y+dBDi9vJbHx1r+p6QtmBKhQYhiKjDUYIoDX1bUrbyAYPChoPK+XA==",
|
"integrity": "sha512-L8P9HbXvpvqjZDveb/fdsa55IVC0trfPgQ4ZwGo6r5af6YDVdM9vMGPZ7rgY2fAT9gGj4PSYd6bYlg3p3jD78A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^2.0.1",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/exec": "^2.0.0",
|
"@actions/exec": "^3.0.0",
|
||||||
"@actions/http-client": "^3.0.1",
|
"@actions/http-client": "^4.0.0",
|
||||||
"@actions/io": "^2.0.0",
|
"@actions/io": "^3.0.0",
|
||||||
"semver": "^6.1.0"
|
"semver": "^7.7.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/tool-cache/node_modules/semver": {
|
"node_modules/@actions/tool-cache/node_modules/@actions/http-client": {
|
||||||
"version": "6.3.1",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.0.tgz",
|
||||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
"integrity": "sha512-QuwPsgVMsD6qaPD57GLZi9sqzAZCtiJT8kVBCDpLtxhL5MydQ4gS+DrejtZZPdIYyB1e95uCK9Luyds7ybHI3g==",
|
||||||
"license": "ISC",
|
"license": "MIT",
|
||||||
"bin": {
|
"dependencies": {
|
||||||
"semver": "bin/semver.js"
|
"tunnel": "^0.0.6",
|
||||||
|
"undici": "^6.23.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
@ -1231,14 +1242,6 @@
|
|||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.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==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@github/browserslist-config": {
|
"node_modules/@github/browserslist-config": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@github/browserslist-config/-/browserslist-config-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@github/browserslist-config/-/browserslist-config-1.0.0.tgz",
|
||||||
@ -1994,7 +1997,29 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/action/node_modules/undici": {
|
||||||
|
"version": "7.19.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici/-/undici-7.19.2.tgz",
|
||||||
|
"integrity": "sha512-4VQSpGEGsWzk0VYxyB/wVX/Q7qf9t5znLRgs0dzszr9w9Fej/8RVNQ+S20vdXSAyra/bJ7ZQfGv6ZMj7UEbzSg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.18.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/auth-action": {
|
||||||
|
"version": "6.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-6.0.2.tgz",
|
||||||
|
"integrity": "sha512-gEBsz0QioHOMoEU7u2VMr2FfOvfJCrGc42K9rliS7LnlZJLcEMFccIiCiPpPNH+yXs7YYNKQ7lOX67ZTWn6Ysg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/auth-token": "^6.0.0",
|
||||||
|
"@octokit/types": "^16.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
||||||
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==",
|
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==",
|
||||||
@ -2003,7 +2028,7 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "7.0.6",
|
"version": "7.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
|
||||||
"integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
|
"integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
|
||||||
@ -2022,7 +2047,7 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "11.0.2",
|
"version": "11.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
|
||||||
"integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
|
"integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
|
||||||
@ -2035,7 +2060,7 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "9.0.3",
|
"version": "9.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
|
||||||
"integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
|
"integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
|
||||||
@ -2049,13 +2074,13 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "27.0.0",
|
"version": "27.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
|
||||||
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==",
|
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "14.0.0",
|
"version": "14.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
|
||||||
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
|
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
|
||||||
@ -2070,7 +2095,7 @@
|
|||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "17.0.0",
|
"version": "17.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz",
|
||||||
"integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==",
|
"integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==",
|
||||||
@ -2085,10 +2110,10 @@
|
|||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "10.0.6",
|
"version": "10.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz",
|
||||||
"integrity": "sha512-FO+UgZCUu+pPnZAR+iKdUt64kPE7QW7ciqpldaMXaNzixz5Jld8dJ31LAUewk0cfSRkNSRKyqG438ba9c/qDlQ==",
|
"integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^11.0.2",
|
"@octokit/endpoint": "^11.0.2",
|
||||||
@ -2101,251 +2126,25 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/request-error": {
|
|
||||||
"version": "7.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.2.tgz",
|
|
||||||
"integrity": "sha512-U8piOROoQQUyExw5c6dTkU3GKxts5/ERRThIauNL7yaRoeXW0q/5bgHWT7JfWBw1UyrbK8ERId2wVkcB32n0uQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^16.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/action/node_modules/@octokit/types": {
|
|
||||||
"version": "16.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
|
|
||||||
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^27.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/action/node_modules/before-after-hook": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==",
|
|
||||||
"license": "Apache-2.0"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/action/node_modules/undici": {
|
|
||||||
"version": "7.16.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz",
|
|
||||||
"integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=20.18.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/action/node_modules/universal-user-agent": {
|
|
||||||
"version": "7.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz",
|
|
||||||
"integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==",
|
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/auth-action": {
|
|
||||||
"version": "6.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-action/-/auth-action-6.0.2.tgz",
|
|
||||||
"integrity": "sha512-gEBsz0QioHOMoEU7u2VMr2FfOvfJCrGc42K9rliS7LnlZJLcEMFccIiCiPpPNH+yXs7YYNKQ7lOX67ZTWn6Ysg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/auth-token": "^6.0.0",
|
|
||||||
"@octokit/types": "^16.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/auth-action/node_modules/@octokit/auth-token": {
|
|
||||||
"version": "6.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz",
|
|
||||||
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 20"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/auth-action/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "27.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
|
|
||||||
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/auth-action/node_modules/@octokit/types": {
|
|
||||||
"version": "16.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
|
|
||||||
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^27.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/auth-token": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/core": {
|
|
||||||
"version": "5.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.1.0.tgz",
|
|
||||||
"integrity": "sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/auth-token": "^4.0.0",
|
|
||||||
"@octokit/graphql": "^7.0.0",
|
|
||||||
"@octokit/request": "^8.0.2",
|
|
||||||
"@octokit/request-error": "^5.0.0",
|
|
||||||
"@octokit/types": "^12.0.0",
|
|
||||||
"before-after-hook": "^2.2.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/endpoint": {
|
|
||||||
"version": "9.0.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
|
|
||||||
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^13.1.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"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": {
|
|
||||||
"version": "7.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz",
|
|
||||||
"integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/request": "^8.0.1",
|
|
||||||
"@octokit/types": "^12.0.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
|
||||||
"version": "9.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz",
|
|
||||||
"integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^12.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@octokit/core": "5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
|
||||||
"version": "10.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
|
||||||
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^12.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@octokit/core": "5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request": {
|
|
||||||
"version": "8.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
|
|
||||||
"integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/endpoint": "^9.0.6",
|
|
||||||
"@octokit/request-error": "^5.1.1",
|
|
||||||
"@octokit/types": "^13.1.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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/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",
|
|
||||||
"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/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": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "12.6.0",
|
"version": "16.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
"@octokit/openapi-types": "^27.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@oxc-parser/binding-android-arm64": {
|
"node_modules/@oxc-parser/binding-android-arm64": {
|
||||||
@ -5195,9 +4994,10 @@
|
|||||||
"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"
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
@ -5912,11 +5712,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/deprecation": {
|
|
||||||
"version": "2.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
|
||||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
|
||||||
},
|
|
||||||
"node_modules/detect-newline": {
|
"node_modules/detect-newline": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
|
||||||
@ -9788,6 +9583,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@ -10563,10 +10359,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.7.2",
|
"version": "7.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
||||||
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
@ -11457,15 +11252,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": {
|
||||||
@ -11489,9 +11281,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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/unrs-resolver": {
|
"node_modules/unrs-resolver": {
|
||||||
"version": "1.11.1",
|
"version": "1.11.1",
|
||||||
@ -11808,7 +11601,8 @@
|
|||||||
"node_modules/wrappy": {
|
"node_modules/wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/write-file-atomic": {
|
"node_modules/write-file-atomic": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
|
|||||||
33
package.json
33
package.json
@ -6,6 +6,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://github.com/hoverkraft-tech/compose-action",
|
"homepage": "https://github.com/hoverkraft-tech/compose-action",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/hoverkraft-tech/compose-action.git"
|
"url": "git+https://github.com/hoverkraft-tech/compose-action.git"
|
||||||
@ -24,9 +25,9 @@
|
|||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^2.0.2",
|
"@actions/core": "^3.0.0",
|
||||||
"@actions/github": "^7.0.0",
|
"@actions/github": "^9.0.0",
|
||||||
"@actions/tool-cache": "^3.0.0",
|
"@actions/tool-cache": "^4.0.0",
|
||||||
"@octokit/action": "^8.0.4",
|
"@octokit/action": "^8.0.4",
|
||||||
"docker-compose": "^1.3.0"
|
"docker-compose": "^1.3.0"
|
||||||
},
|
},
|
||||||
@ -46,18 +47,20 @@
|
|||||||
"all": "npm run format && npm run lint:ci && npm run test:ci && npm run package",
|
"all": "npm run format && npm run lint:ci && npm run test:ci && npm run package",
|
||||||
"build": "tsc --noEmit",
|
"build": "tsc --noEmit",
|
||||||
"format": "prettier --cache --write .",
|
"format": "prettier --cache --write .",
|
||||||
"jest": "jest --detectOpenHandles --forceExit",
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --detectOpenHandles --forceExit --maxWorkers=50%",
|
||||||
"test": "npm run jest -- --maxWorkers=50%",
|
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch --maxWorkers=25%",
|
||||||
"test:watch": "npm run jest --watch -- --maxWorkers=25%",
|
|
||||||
"test:cov": "npm run test -- --coverage",
|
"test:cov": "npm run test -- --coverage",
|
||||||
"test:ci": "npm run jest -- --coverage --runInBand",
|
"test:ci": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage --runInBand --detectOpenHandles --forceExit",
|
||||||
"prepare": "ts-dev-tools install"
|
"prepare": "ts-dev-tools install"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "ts-jest",
|
"preset": "ts-jest/presets/default-esm",
|
||||||
"verbose": true,
|
"verbose": true,
|
||||||
"clearMocks": true,
|
"clearMocks": true,
|
||||||
"testEnvironment": "node",
|
"testEnvironment": "node",
|
||||||
|
"extensionsToTreatAsEsm": [
|
||||||
|
".ts"
|
||||||
|
],
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": [
|
||||||
"js",
|
"js",
|
||||||
"ts"
|
"ts"
|
||||||
@ -71,9 +74,19 @@
|
|||||||
"/node_modules/",
|
"/node_modules/",
|
||||||
"/dist/"
|
"/dist/"
|
||||||
],
|
],
|
||||||
"transform": {
|
"moduleNameMapper": {
|
||||||
"^.+\\.ts$": "ts-jest"
|
"^(\\.{1,2}/.*)\\.js$": "$1"
|
||||||
},
|
},
|
||||||
|
"transform": {
|
||||||
|
"^.+\\.ts$": [
|
||||||
|
"ts-jest",
|
||||||
|
{
|
||||||
|
"useESM": true,
|
||||||
|
"tsconfig": "tsconfig.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"injectGlobals": true,
|
||||||
"coverageReporters": [
|
"coverageReporters": [
|
||||||
"json-summary",
|
"json-summary",
|
||||||
"text",
|
"text",
|
||||||
|
|||||||
@ -1,15 +1,46 @@
|
|||||||
import * as core from "@actions/core";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import { InputService } from "./services/input.service";
|
|
||||||
import { LoggerService, LogLevel } from "./services/logger.service";
|
// Mock @actions/core
|
||||||
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service";
|
const setFailedMock = jest.fn();
|
||||||
import * as indexRunner from "./index-runner";
|
|
||||||
import { DockerComposeService } from "./services/docker-compose.service";
|
jest.unstable_mockModule("@actions/core", () => ({
|
||||||
|
setFailed: setFailedMock,
|
||||||
|
getInput: jest.fn().mockReturnValue(""),
|
||||||
|
getMultilineInput: jest.fn().mockReturnValue([]),
|
||||||
|
debug: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock docker-compose
|
||||||
|
jest.unstable_mockModule("docker-compose", () => ({
|
||||||
|
upAll: jest.fn(),
|
||||||
|
upMany: jest.fn(),
|
||||||
|
down: jest.fn(),
|
||||||
|
logs: jest.fn(),
|
||||||
|
version: jest
|
||||||
|
.fn<() => Promise<{ data: { version: string } }>>()
|
||||||
|
.mockResolvedValue({ data: { version: "1.2.3" } }),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock node:fs
|
||||||
|
jest.unstable_mockModule("node:fs", () => ({
|
||||||
|
existsSync: jest.fn().mockReturnValue(true),
|
||||||
|
default: { existsSync: jest.fn().mockReturnValue(true) },
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic imports after mock setup
|
||||||
|
const { run } = await import("./index-runner.js");
|
||||||
|
const { InputService } = await import("./services/input.service.js");
|
||||||
|
const { LoggerService, LogLevel } = await import("./services/logger.service.js");
|
||||||
|
const { DockerComposeInstallerService } = await import(
|
||||||
|
"./services/docker-compose-installer.service.js"
|
||||||
|
);
|
||||||
|
const { DockerComposeService } = await import("./services/docker-compose.service.js");
|
||||||
|
|
||||||
describe("run", () => {
|
describe("run", () => {
|
||||||
// Mock the external libraries and services used by the action
|
|
||||||
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
||||||
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
||||||
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
|
|
||||||
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
||||||
let installMock: jest.SpiedFunction<typeof DockerComposeInstallerService.prototype.install>;
|
let installMock: jest.SpiedFunction<typeof DockerComposeInstallerService.prototype.install>;
|
||||||
let upMock: jest.SpiedFunction<typeof DockerComposeService.prototype.up>;
|
let upMock: jest.SpiedFunction<typeof DockerComposeService.prototype.up>;
|
||||||
@ -17,9 +48,8 @@ describe("run", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
|
||||||
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
|
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation(() => {});
|
||||||
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
|
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation(() => {});
|
||||||
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
|
|
||||||
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
||||||
installMock = jest.spyOn(DockerComposeInstallerService.prototype, "install");
|
installMock = jest.spyOn(DockerComposeInstallerService.prototype, "install");
|
||||||
upMock = jest.spyOn(DockerComposeService.prototype, "up");
|
upMock = jest.spyOn(DockerComposeService.prototype, "up");
|
||||||
@ -45,7 +75,7 @@ describe("run", () => {
|
|||||||
upMock.mockResolvedValue();
|
upMock.mockResolvedValue();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await indexRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(infoMock).toHaveBeenCalledWith("Setting up docker compose version 1.29.2");
|
expect(infoMock).toHaveBeenCalledWith("Setting up docker compose version 1.29.2");
|
||||||
@ -89,7 +119,7 @@ describe("run", () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await indexRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(upMock).toHaveBeenCalledWith({
|
expect(upMock).toHaveBeenCalledWith({
|
||||||
@ -123,7 +153,7 @@ describe("run", () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await indexRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(setFailedMock).toHaveBeenCalledWith("Error: Test error");
|
expect(setFailedMock).toHaveBeenCalledWith("Error: Test error");
|
||||||
@ -148,7 +178,7 @@ describe("run", () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await indexRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('"Test error"');
|
expect(setFailedMock).toHaveBeenCalledWith('"Test error"');
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { setFailed } from "@actions/core";
|
import { setFailed } from "@actions/core";
|
||||||
import { InputService } from "./services/input.service";
|
import { InputService } from "./services/input.service.js";
|
||||||
import { LoggerService } from "./services/logger.service";
|
import { LoggerService } from "./services/logger.service.js";
|
||||||
import { DockerComposeService } from "./services/docker-compose.service";
|
import { DockerComposeService } from "./services/docker-compose.service.js";
|
||||||
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service";
|
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service.js";
|
||||||
import { ManualInstallerAdapter } from "./services/installer-adapter/manual-installer-adapter";
|
import { ManualInstallerAdapter } from "./services/installer-adapter/manual-installer-adapter.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The run function for the action.
|
* The run function for the action.
|
||||||
|
|||||||
@ -1,10 +1,42 @@
|
|||||||
import * as core from "@actions/core";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import { DockerComposeService } from "./services/docker-compose.service";
|
|
||||||
import { InputService } from "./services/input.service";
|
// Mock @actions/core
|
||||||
import { LoggerService, LogLevel } from "./services/logger.service";
|
const setFailedMock = jest.fn();
|
||||||
import { DockerComposeInstallerService } from "./services/docker-compose-installer.service";
|
|
||||||
|
jest.unstable_mockModule("@actions/core", () => ({
|
||||||
|
setFailed: setFailedMock,
|
||||||
|
getInput: jest.fn().mockReturnValue(""),
|
||||||
|
getMultilineInput: jest.fn().mockReturnValue([]),
|
||||||
|
debug: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock docker-compose
|
||||||
|
jest.unstable_mockModule("docker-compose", () => ({
|
||||||
|
upAll: jest.fn(),
|
||||||
|
upMany: jest.fn(),
|
||||||
|
down: jest.fn(),
|
||||||
|
logs: jest.fn(),
|
||||||
|
version: jest
|
||||||
|
.fn<() => Promise<{ data: { version: string } }>>()
|
||||||
|
.mockResolvedValue({ data: { version: "1.2.3" } }),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock node:fs
|
||||||
|
jest.unstable_mockModule("node:fs", () => ({
|
||||||
|
existsSync: jest.fn().mockReturnValue(true),
|
||||||
|
default: { existsSync: jest.fn().mockReturnValue(true) },
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic imports after mock setup
|
||||||
|
const { InputService } = await import("./services/input.service.js");
|
||||||
|
const { LoggerService, LogLevel } = await import("./services/logger.service.js");
|
||||||
|
const { DockerComposeInstallerService } = await import(
|
||||||
|
"./services/docker-compose-installer.service.js"
|
||||||
|
);
|
||||||
|
const { DockerComposeService } = await import("./services/docker-compose.service.js");
|
||||||
|
|
||||||
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
|
|
||||||
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
||||||
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
||||||
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
||||||
@ -15,9 +47,8 @@ describe("index", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
|
||||||
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
|
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation(() => {});
|
||||||
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
|
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation(() => {});
|
||||||
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
|
|
||||||
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
||||||
installMock = jest.spyOn(DockerComposeInstallerService.prototype, "install");
|
installMock = jest.spyOn(DockerComposeInstallerService.prototype, "install");
|
||||||
upMock = jest.spyOn(DockerComposeService.prototype, "up");
|
upMock = jest.spyOn(DockerComposeService.prototype, "up");
|
||||||
@ -40,8 +71,7 @@ describe("index", () => {
|
|||||||
installMock.mockResolvedValue("1.2.3");
|
installMock.mockResolvedValue("1.2.3");
|
||||||
upMock.mockResolvedValueOnce();
|
upMock.mockResolvedValueOnce();
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
await import("./index.js");
|
||||||
await require("../src/index");
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||||
|
|
||||||
expect(infoMock).toHaveBeenNthCalledWith(1, "Setting up docker compose");
|
expect(infoMock).toHaveBeenNthCalledWith(1, "Setting up docker compose");
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* The entrypoint for the action.
|
* The entrypoint for the action.
|
||||||
*/
|
*/
|
||||||
import { run } from "./index-runner";
|
import { run } from "./index-runner.js";
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@ -1,27 +1,55 @@
|
|||||||
import * as core from "@actions/core";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import { InputService } from "./services/input.service";
|
|
||||||
import { LoggerService, LogLevel } from "./services/logger.service";
|
|
||||||
import * as postRunner from "./post-runner";
|
|
||||||
import { DockerComposeService } from "./services/docker-compose.service";
|
|
||||||
|
|
||||||
// Mock the external libraries and services used by the action
|
// Mock @actions/core
|
||||||
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
const setFailedMock = jest.fn();
|
||||||
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
|
||||||
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
|
jest.unstable_mockModule("@actions/core", () => ({
|
||||||
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
setFailed: setFailedMock,
|
||||||
let downMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
|
getInput: jest.fn().mockReturnValue(""),
|
||||||
let logsMock: jest.SpiedFunction<typeof DockerComposeService.prototype.logs>;
|
getMultilineInput: jest.fn().mockReturnValue([]),
|
||||||
|
debug: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock docker-compose
|
||||||
|
const logsMock = jest.fn();
|
||||||
|
const downMock = jest.fn();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("docker-compose", () => ({
|
||||||
|
logs: logsMock,
|
||||||
|
down: downMock,
|
||||||
|
upAll: jest.fn(),
|
||||||
|
upMany: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock node:fs
|
||||||
|
jest.unstable_mockModule("node:fs", () => ({
|
||||||
|
existsSync: jest.fn().mockReturnValue(true),
|
||||||
|
default: { existsSync: jest.fn().mockReturnValue(true) },
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic imports after mock setup
|
||||||
|
const { run } = await import("./post-runner.js");
|
||||||
|
const { InputService } = await import("./services/input.service.js");
|
||||||
|
const { LoggerService, LogLevel } = await import("./services/logger.service.js");
|
||||||
|
const { DockerComposeService } = await import("./services/docker-compose.service.js");
|
||||||
|
|
||||||
describe("run", () => {
|
describe("run", () => {
|
||||||
|
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
||||||
|
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
||||||
|
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
||||||
|
let serviceDownMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
|
||||||
|
let serviceLogsMock: jest.SpiedFunction<typeof DockerComposeService.prototype.logs>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
|
||||||
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
|
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation(() => {});
|
||||||
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
|
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation(() => {});
|
||||||
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
|
|
||||||
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
||||||
downMock = jest.spyOn(DockerComposeService.prototype, "down");
|
serviceDownMock = jest.spyOn(DockerComposeService.prototype, "down");
|
||||||
logsMock = jest.spyOn(DockerComposeService.prototype, "logs");
|
serviceLogsMock = jest.spyOn(DockerComposeService.prototype, "logs");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should bring down docker compose service(s) and log output", async () => {
|
it("should bring down docker compose service(s) and log output", async () => {
|
||||||
@ -39,15 +67,14 @@ describe("run", () => {
|
|||||||
serviceLogLevel: LogLevel.Debug,
|
serviceLogLevel: LogLevel.Debug,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
logsMock.mockResolvedValue({ error: "", output: "test logs" });
|
serviceLogsMock.mockResolvedValue({ error: "", output: "test logs" });
|
||||||
|
serviceDownMock.mockResolvedValue();
|
||||||
downMock.mockResolvedValue();
|
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await postRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(logsMock).toHaveBeenCalledWith({
|
expect(serviceLogsMock).toHaveBeenCalledWith({
|
||||||
dockerFlags: [],
|
dockerFlags: [],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
composeFlags: [],
|
composeFlags: [],
|
||||||
@ -56,7 +83,7 @@ describe("run", () => {
|
|||||||
serviceLogger: debugMock,
|
serviceLogger: debugMock,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(downMock).toHaveBeenCalledWith({
|
expect(serviceDownMock).toHaveBeenCalledWith({
|
||||||
dockerFlags: [],
|
dockerFlags: [],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
composeFlags: [],
|
composeFlags: [],
|
||||||
@ -66,9 +93,7 @@ describe("run", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
expect(debugMock).toHaveBeenCalledWith("docker compose logs:\ntest logs");
|
expect(debugMock).toHaveBeenCalledWith("docker compose logs:\ntest logs");
|
||||||
|
|
||||||
expect(infoMock).toHaveBeenCalledWith("docker compose is down");
|
expect(infoMock).toHaveBeenCalledWith("docker compose is down");
|
||||||
|
|
||||||
expect(setFailedMock).not.toHaveBeenCalled();
|
expect(setFailedMock).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -87,38 +112,19 @@ describe("run", () => {
|
|||||||
serviceLogLevel: LogLevel.Debug,
|
serviceLogLevel: LogLevel.Debug,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
logsMock.mockResolvedValue({
|
serviceLogsMock.mockResolvedValue({
|
||||||
error: "test logs error",
|
error: "test logs error",
|
||||||
output: "test logs output",
|
output: "test logs output",
|
||||||
});
|
});
|
||||||
|
|
||||||
downMock.mockResolvedValue();
|
serviceDownMock.mockResolvedValue();
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await postRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(logsMock).toHaveBeenCalledWith({
|
|
||||||
composeFiles: ["docker-compose.yml"],
|
|
||||||
composeFlags: [],
|
|
||||||
cwd: "/current/working/dir",
|
|
||||||
dockerFlags: [],
|
|
||||||
services: [],
|
|
||||||
serviceLogger: debugMock,
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(downMock).toHaveBeenCalledWith({
|
|
||||||
composeFiles: ["docker-compose.yml"],
|
|
||||||
composeFlags: [],
|
|
||||||
cwd: "/current/working/dir",
|
|
||||||
dockerFlags: [],
|
|
||||||
downFlags: [],
|
|
||||||
serviceLogger: debugMock,
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(debugMock).toHaveBeenCalledWith("docker compose error:\ntest logs error");
|
expect(debugMock).toHaveBeenCalledWith("docker compose error:\ntest logs error");
|
||||||
expect(debugMock).toHaveBeenCalledWith("docker compose logs:\ntest logs output");
|
expect(debugMock).toHaveBeenCalledWith("docker compose logs:\ntest logs output");
|
||||||
|
|
||||||
expect(infoMock).toHaveBeenCalledWith("docker compose is down");
|
expect(infoMock).toHaveBeenCalledWith("docker compose is down");
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -129,7 +135,7 @@ describe("run", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await postRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(setFailedMock).toHaveBeenCalledWith("Error: An error occurred");
|
expect(setFailedMock).toHaveBeenCalledWith("Error: An error occurred");
|
||||||
@ -138,7 +144,7 @@ describe("run", () => {
|
|||||||
it("should handle errors and call setFailed", async () => {
|
it("should handle errors and call setFailed", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const error = new Error("Test error");
|
const error = new Error("Test error");
|
||||||
downMock.mockRejectedValue(error);
|
serviceDownMock.mockRejectedValue(error);
|
||||||
|
|
||||||
getInputsMock.mockImplementation(() => ({
|
getInputsMock.mockImplementation(() => ({
|
||||||
dockerFlags: [],
|
dockerFlags: [],
|
||||||
@ -154,7 +160,7 @@ describe("run", () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await postRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(setFailedMock).toHaveBeenCalledWith("Error: Test error");
|
expect(setFailedMock).toHaveBeenCalledWith("Error: Test error");
|
||||||
@ -163,7 +169,7 @@ describe("run", () => {
|
|||||||
it("should handle unknown errors and call setFailed", async () => {
|
it("should handle unknown errors and call setFailed", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const error = "Test error";
|
const error = "Test error";
|
||||||
downMock.mockRejectedValue(error);
|
serviceDownMock.mockRejectedValue(error);
|
||||||
|
|
||||||
getInputsMock.mockImplementation(() => ({
|
getInputsMock.mockImplementation(() => ({
|
||||||
dockerFlags: [],
|
dockerFlags: [],
|
||||||
@ -179,7 +185,7 @@ describe("run", () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
await postRunner.run();
|
await run();
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(setFailedMock).toHaveBeenCalledWith('"Test error"');
|
expect(setFailedMock).toHaveBeenCalledWith('"Test error"');
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { setFailed } from "@actions/core";
|
import { setFailed } from "@actions/core";
|
||||||
import { InputService } from "./services/input.service";
|
import { InputService } from "./services/input.service.js";
|
||||||
import { LoggerService } from "./services/logger.service";
|
import { LoggerService } from "./services/logger.service.js";
|
||||||
import { DockerComposeService } from "./services/docker-compose.service";
|
import { DockerComposeService } from "./services/docker-compose.service.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The run function for the action.
|
* The run function for the action.
|
||||||
|
|||||||
@ -1,25 +1,54 @@
|
|||||||
import * as core from "@actions/core";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import { DockerComposeService } from "./services/docker-compose.service";
|
|
||||||
import { InputService } from "./services/input.service";
|
// Mock @actions/core
|
||||||
import { LoggerService, LogLevel } from "./services/logger.service";
|
const setFailedMock = jest.fn();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("@actions/core", () => ({
|
||||||
|
setFailed: setFailedMock,
|
||||||
|
getInput: jest.fn().mockReturnValue(""),
|
||||||
|
getMultilineInput: jest.fn().mockReturnValue([]),
|
||||||
|
debug: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock docker-compose
|
||||||
|
const logsMock = jest.fn();
|
||||||
|
const downMock = jest.fn();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("docker-compose", () => ({
|
||||||
|
logs: logsMock,
|
||||||
|
down: downMock,
|
||||||
|
upAll: jest.fn(),
|
||||||
|
upMany: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock node:fs
|
||||||
|
jest.unstable_mockModule("node:fs", () => ({
|
||||||
|
existsSync: jest.fn().mockReturnValue(true),
|
||||||
|
default: { existsSync: jest.fn().mockReturnValue(true) },
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic imports after mock setup
|
||||||
|
const { InputService } = await import("./services/input.service.js");
|
||||||
|
const { LoggerService, LogLevel } = await import("./services/logger.service.js");
|
||||||
|
const { DockerComposeService } = await import("./services/docker-compose.service.js");
|
||||||
|
|
||||||
let setFailedMock: jest.SpiedFunction<typeof core.setFailed>;
|
|
||||||
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
let getInputsMock: jest.SpiedFunction<typeof InputService.prototype.getInputs>;
|
||||||
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
let debugMock: jest.SpiedFunction<typeof LoggerService.prototype.debug>;
|
||||||
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
let infoMock: jest.SpiedFunction<typeof LoggerService.prototype.info>;
|
||||||
let logsMock: jest.SpiedFunction<typeof DockerComposeService.prototype.logs>;
|
let serviceLogsMock: jest.SpiedFunction<typeof DockerComposeService.prototype.logs>;
|
||||||
let downMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
|
let serviceDownMock: jest.SpiedFunction<typeof DockerComposeService.prototype.down>;
|
||||||
|
|
||||||
describe("post", () => {
|
describe("post", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
|
||||||
setFailedMock = jest.spyOn(core, "setFailed").mockImplementation();
|
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation(() => {});
|
||||||
infoMock = jest.spyOn(LoggerService.prototype, "info").mockImplementation();
|
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation(() => {});
|
||||||
debugMock = jest.spyOn(LoggerService.prototype, "debug").mockImplementation();
|
|
||||||
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
getInputsMock = jest.spyOn(InputService.prototype, "getInputs");
|
||||||
logsMock = jest.spyOn(DockerComposeService.prototype, "logs");
|
serviceLogsMock = jest.spyOn(DockerComposeService.prototype, "logs");
|
||||||
downMock = jest.spyOn(DockerComposeService.prototype, "down");
|
serviceDownMock = jest.spyOn(DockerComposeService.prototype, "down");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("calls run when imported", async () => {
|
it("calls run when imported", async () => {
|
||||||
@ -36,14 +65,13 @@ describe("post", () => {
|
|||||||
serviceLogLevel: LogLevel.Debug,
|
serviceLogLevel: LogLevel.Debug,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
logsMock.mockResolvedValue({ error: "", output: "test logs" });
|
serviceLogsMock.mockResolvedValue({ error: "", output: "test logs" });
|
||||||
downMock.mockResolvedValueOnce();
|
serviceDownMock.mockResolvedValueOnce();
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
await import("./post.js");
|
||||||
await require("../src/post");
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||||
|
|
||||||
expect(logsMock).toHaveBeenCalledWith({
|
expect(serviceLogsMock).toHaveBeenCalledWith({
|
||||||
dockerFlags: [],
|
dockerFlags: [],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
composeFlags: [],
|
composeFlags: [],
|
||||||
@ -52,7 +80,7 @@ describe("post", () => {
|
|||||||
serviceLogger: debugMock,
|
serviceLogger: debugMock,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(downMock).toHaveBeenCalledWith({
|
expect(serviceDownMock).toHaveBeenCalledWith({
|
||||||
dockerFlags: [],
|
dockerFlags: [],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
composeFlags: [],
|
composeFlags: [],
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* The entrypoint for the post action.
|
* The entrypoint for the post action.
|
||||||
*/
|
*/
|
||||||
import { run } from "./post-runner";
|
import { run } from "./post-runner.js";
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|||||||
@ -1,27 +1,32 @@
|
|||||||
import * as dockerCompose from "docker-compose";
|
import { jest, describe, it, expect, beforeEach, afterEach } from "@jest/globals";
|
||||||
import { DockerComposeInstallerService } from "./docker-compose-installer.service";
|
import type { IDockerComposeResult } from "docker-compose";
|
||||||
import { ManualInstallerAdapter } from "./installer-adapter/manual-installer-adapter";
|
|
||||||
import { MockAgent, setGlobalDispatcher } from "undici";
|
import { MockAgent, setGlobalDispatcher } from "undici";
|
||||||
|
|
||||||
jest.mock("docker-compose");
|
// Mock docker-compose before importing the module under test
|
||||||
|
const versionMock = jest.fn<() => Promise<IDockerComposeResult & { data: { version: string } }>>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("docker-compose", () => ({
|
||||||
|
version: versionMock,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Create manual installer adapter mock
|
||||||
|
const manualInstallerAdapterMock = {
|
||||||
|
install: jest.fn<(version: string) => Promise<void>>(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Dynamic import after mock setup
|
||||||
|
const { DockerComposeInstallerService } = await import("./docker-compose-installer.service.js");
|
||||||
|
|
||||||
describe("DockerComposeInstallerService", () => {
|
describe("DockerComposeInstallerService", () => {
|
||||||
let mockAgent: MockAgent;
|
let mockAgent: MockAgent;
|
||||||
let versionMock: jest.SpiedFunction<typeof dockerCompose.version>;
|
let service: InstanceType<typeof DockerComposeInstallerService>;
|
||||||
let manualInstallerAdapterMock: jest.Mocked<ManualInstallerAdapter>;
|
|
||||||
let service: DockerComposeInstallerService;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
jest.clearAllMocks();
|
||||||
mockAgent = new MockAgent();
|
mockAgent = new MockAgent();
|
||||||
mockAgent.disableNetConnect();
|
mockAgent.disableNetConnect();
|
||||||
|
|
||||||
versionMock = jest.spyOn(dockerCompose, "version").mockImplementation();
|
service = new DockerComposeInstallerService(manualInstallerAdapterMock as never);
|
||||||
|
|
||||||
manualInstallerAdapterMock = {
|
|
||||||
install: jest.fn(),
|
|
||||||
} as unknown as jest.Mocked<ManualInstallerAdapter>;
|
|
||||||
|
|
||||||
service = new DockerComposeInstallerService(manualInstallerAdapterMock);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
@ -29,6 +34,29 @@ describe("DockerComposeInstallerService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("install", () => {
|
describe("install", () => {
|
||||||
|
it("should return current version when no version is provided", async () => {
|
||||||
|
// Arrange
|
||||||
|
versionMock.mockResolvedValue({
|
||||||
|
exitCode: 0,
|
||||||
|
out: "",
|
||||||
|
err: "",
|
||||||
|
data: {
|
||||||
|
version: "2.0.0",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Act
|
||||||
|
const result = await service.install({
|
||||||
|
composeVersion: null,
|
||||||
|
cwd: "/path/to/cwd",
|
||||||
|
githubToken: null,
|
||||||
|
});
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(result).toBe("2.0.0");
|
||||||
|
expect(manualInstallerAdapterMock.install).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
it("should not install anything when expected version is already installed", async () => {
|
it("should not install anything when expected version is already installed", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
versionMock.mockResolvedValue({
|
versionMock.mockResolvedValue({
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import * as github from "@actions/github";
|
import * as github from "@actions/github";
|
||||||
import { version } from "docker-compose";
|
import { version } from "docker-compose";
|
||||||
import { COMPOSE_VERSION_LATEST, Inputs } from "./input.service";
|
import { COMPOSE_VERSION_LATEST, Inputs } from "./input.service.js";
|
||||||
import { ManualInstallerAdapter } from "./installer-adapter/manual-installer-adapter";
|
import { ManualInstallerAdapter } from "./installer-adapter/manual-installer-adapter.js";
|
||||||
|
|
||||||
export type InstallInputs = {
|
export type InstallInputs = {
|
||||||
composeVersion: Inputs["composeVersion"];
|
composeVersion: Inputs["composeVersion"];
|
||||||
|
|||||||
@ -1,39 +1,46 @@
|
|||||||
import * as dockerCompose from "docker-compose";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import { DockerComposeService, DownInputs, LogsInputs, UpInputs } from "./docker-compose.service";
|
import type { IDockerComposeOptions, IDockerComposeResult } from "docker-compose";
|
||||||
|
|
||||||
jest.mock("docker-compose");
|
// Mock docker-compose before importing the module under test
|
||||||
|
const upAllMock = jest.fn<(options: IDockerComposeOptions) => Promise<IDockerComposeResult>>();
|
||||||
|
const upManyMock =
|
||||||
|
jest.fn<(services: string[], options: IDockerComposeOptions) => Promise<IDockerComposeResult>>();
|
||||||
|
const downMock = jest.fn<(options: IDockerComposeOptions) => Promise<IDockerComposeResult>>();
|
||||||
|
const logsMock =
|
||||||
|
jest.fn<(services: string[], options: IDockerComposeOptions) => Promise<IDockerComposeResult>>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("docker-compose", () => ({
|
||||||
|
upAll: upAllMock,
|
||||||
|
upMany: upManyMock,
|
||||||
|
down: downMock,
|
||||||
|
logs: logsMock,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic import after mock setup
|
||||||
|
const { DockerComposeService } = await import("./docker-compose.service.js");
|
||||||
|
|
||||||
describe("DockerComposeService", () => {
|
describe("DockerComposeService", () => {
|
||||||
let service: DockerComposeService;
|
let service: InstanceType<typeof DockerComposeService>;
|
||||||
let upAllMock: jest.SpiedFunction<typeof dockerCompose.upAll>;
|
|
||||||
let upManyMock: jest.SpiedFunction<typeof dockerCompose.upMany>;
|
|
||||||
let downMock: jest.SpiedFunction<typeof dockerCompose.down>;
|
|
||||||
let logsMock: jest.SpiedFunction<typeof dockerCompose.logs>;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
service = new DockerComposeService();
|
|
||||||
upAllMock = jest.spyOn(dockerCompose, "upAll").mockImplementation();
|
|
||||||
upManyMock = jest.spyOn(dockerCompose, "upMany").mockImplementation();
|
|
||||||
downMock = jest.spyOn(dockerCompose, "down").mockImplementation();
|
|
||||||
logsMock = jest.spyOn(dockerCompose, "logs").mockImplementation();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
service = new DockerComposeService();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("up", () => {
|
describe("up", () => {
|
||||||
it("should call up with correct options", async () => {
|
it("should call up with correct options", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
upAllMock.mockResolvedValue({ exitCode: 0, err: "", out: "" });
|
||||||
|
|
||||||
await service.up(upInputs);
|
await service.up(upInputs);
|
||||||
|
|
||||||
expect(upAllMock).toHaveBeenCalledWith({
|
expect(upAllMock).toHaveBeenCalledWith({
|
||||||
@ -49,7 +56,7 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Ensure callback is calling the service logger
|
// Ensure callback is calling the service logger
|
||||||
const callback = upAllMock?.mock?.calls[0][0]?.callback;
|
const callback = (upAllMock.mock.calls[0][0] as IDockerComposeOptions)?.callback;
|
||||||
expect(callback).toBeDefined();
|
expect(callback).toBeDefined();
|
||||||
|
|
||||||
const message = "test log output";
|
const message = "test log output";
|
||||||
@ -62,16 +69,18 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should call up with specific docker flags", async () => {
|
it("should call up with specific docker flags", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: ["--context", "dev"],
|
dockerFlags: ["--context", "dev"],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
upAllMock.mockResolvedValue({ exitCode: 0, err: "", out: "" });
|
||||||
|
|
||||||
await service.up(upInputs);
|
await service.up(upInputs);
|
||||||
|
|
||||||
expect(upAllMock).toHaveBeenCalledWith({
|
expect(upAllMock).toHaveBeenCalledWith({
|
||||||
@ -88,16 +97,18 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should call up with specific services", async () => {
|
it("should call up with specific services", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: ["helloworld2", "helloworld3"],
|
services: ["helloworld2", "helloworld3"],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: ["--build"],
|
upFlags: ["--build"],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
upManyMock.mockResolvedValue({ exitCode: 0, err: "", out: "" });
|
||||||
|
|
||||||
await service.up(upInputs);
|
await service.up(upInputs);
|
||||||
|
|
||||||
expect(upManyMock).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
|
expect(upManyMock).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
|
||||||
@ -114,12 +125,12 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should throw formatted error when upAll fails with docker-compose result", async () => {
|
it("should throw formatted error when upAll fails with docker-compose result", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -139,12 +150,12 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should throw formatted error when upMany fails with docker-compose result", async () => {
|
it("should throw formatted error when upMany fails with docker-compose result", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: ["web"],
|
services: ["web"],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -165,12 +176,12 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should pass through docker-compose result without exit code", async () => {
|
it("should pass through docker-compose result without exit code", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -187,12 +198,12 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should pass through standard Error objects", async () => {
|
it("should pass through standard Error objects", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -204,12 +215,12 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should pass through error strings", async () => {
|
it("should pass through error strings", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -221,12 +232,12 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should handle unknown error types gracefully", async () => {
|
it("should handle unknown error types gracefully", async () => {
|
||||||
const upInputs: UpInputs = {
|
const upInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: [],
|
services: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
upFlags: [],
|
upFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -240,15 +251,17 @@ describe("DockerComposeService", () => {
|
|||||||
|
|
||||||
describe("down", () => {
|
describe("down", () => {
|
||||||
it("should call down with correct options", async () => {
|
it("should call down with correct options", async () => {
|
||||||
const downInputs: DownInputs = {
|
const downInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: [],
|
composeFiles: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
downFlags: ["--volumes", "--remove-orphans"],
|
downFlags: ["--volumes", "--remove-orphans"],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
downMock.mockResolvedValue({ exitCode: 0, err: "", out: "" });
|
||||||
|
|
||||||
await service.down(downInputs);
|
await service.down(downInputs);
|
||||||
|
|
||||||
expect(downMock).toHaveBeenCalledWith({
|
expect(downMock).toHaveBeenCalledWith({
|
||||||
@ -265,11 +278,11 @@ describe("DockerComposeService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should throw formatted error when down fails with docker-compose result", async () => {
|
it("should throw formatted error when down fails with docker-compose result", async () => {
|
||||||
const downInputs: DownInputs = {
|
const downInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: [],
|
composeFiles: [] as string[],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
downFlags: [],
|
downFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: jest.fn(),
|
serviceLogger: jest.fn(),
|
||||||
};
|
};
|
||||||
@ -292,11 +305,11 @@ describe("DockerComposeService", () => {
|
|||||||
describe("logs", () => {
|
describe("logs", () => {
|
||||||
it("should call logs with correct options", async () => {
|
it("should call logs with correct options", async () => {
|
||||||
const debugMock = jest.fn();
|
const debugMock = jest.fn();
|
||||||
const logsInputs: LogsInputs = {
|
const logsInputs = {
|
||||||
dockerFlags: [],
|
dockerFlags: [] as string[],
|
||||||
composeFiles: ["docker-compose.yml"],
|
composeFiles: ["docker-compose.yml"],
|
||||||
services: ["helloworld2", "helloworld3"],
|
services: ["helloworld2", "helloworld3"],
|
||||||
composeFlags: [],
|
composeFlags: [] as string[],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
serviceLogger: debugMock,
|
serviceLogger: debugMock,
|
||||||
};
|
};
|
||||||
@ -305,7 +318,7 @@ describe("DockerComposeService", () => {
|
|||||||
|
|
||||||
await service.logs(logsInputs);
|
await service.logs(logsInputs);
|
||||||
|
|
||||||
expect(dockerCompose.logs).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
|
expect(logsMock).toHaveBeenCalledWith(["helloworld2", "helloworld3"], {
|
||||||
composeOptions: [],
|
composeOptions: [],
|
||||||
config: ["docker-compose.yml"],
|
config: ["docker-compose.yml"],
|
||||||
cwd: "/current/working/dir",
|
cwd: "/current/working/dir",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import {
|
|||||||
upAll,
|
upAll,
|
||||||
upMany,
|
upMany,
|
||||||
} from "docker-compose";
|
} from "docker-compose";
|
||||||
import { Inputs } from "./input.service";
|
import { Inputs } from "./input.service.js";
|
||||||
|
|
||||||
type OptionsInputs = {
|
type OptionsInputs = {
|
||||||
dockerFlags: Inputs["dockerFlags"];
|
dockerFlags: Inputs["dockerFlags"];
|
||||||
|
|||||||
@ -1,21 +1,36 @@
|
|||||||
import * as core from "@actions/core";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import fs from "fs";
|
|
||||||
import { InputService, InputNames } from "./input.service";
|
// Mock @actions/core before importing the module under test
|
||||||
import { LogLevel } from "./logger.service";
|
const getInputMock = jest.fn<(name: string, options?: { required?: boolean }) => string>();
|
||||||
|
const getMultilineInputMock =
|
||||||
|
jest.fn<(name: string, options?: { required?: boolean }) => string[]>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("@actions/core", () => ({
|
||||||
|
getInput: getInputMock,
|
||||||
|
getMultilineInput: getMultilineInputMock,
|
||||||
|
debug: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock node:fs
|
||||||
|
const existsSyncMock = jest.fn<(path: string) => boolean>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("node:fs", () => ({
|
||||||
|
existsSync: existsSyncMock,
|
||||||
|
default: { existsSync: existsSyncMock },
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic imports after mock setup
|
||||||
|
const { InputService, InputNames } = await import("./input.service.js");
|
||||||
|
const { LogLevel } = await import("./logger.service.js");
|
||||||
|
|
||||||
describe("InputService", () => {
|
describe("InputService", () => {
|
||||||
let service: InputService;
|
let service: InstanceType<typeof InputService>;
|
||||||
let getInputMock: jest.SpiedFunction<typeof core.getInput>;
|
|
||||||
let getMultilineInputMock: jest.SpiedFunction<typeof core.getMultilineInput>;
|
|
||||||
let existsSyncMock: jest.SpiedFunction<typeof fs.existsSync>;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
|
||||||
existsSyncMock = jest.spyOn(fs, "existsSync").mockImplementation();
|
|
||||||
getInputMock = jest.spyOn(core, "getInput").mockImplementation();
|
|
||||||
getMultilineInputMock = jest.spyOn(core, "getMultilineInput").mockImplementation();
|
|
||||||
|
|
||||||
getMultilineInputMock.mockImplementation((inputName) => {
|
getMultilineInputMock.mockImplementation((inputName) => {
|
||||||
switch (inputName) {
|
switch (inputName) {
|
||||||
case InputNames.ComposeFile:
|
case InputNames.ComposeFile:
|
||||||
@ -25,11 +40,9 @@ describe("InputService", () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
service = new InputService();
|
getInputMock.mockReturnValue("");
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
service = new InputService();
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("getInputs", () => {
|
describe("getInputs", () => {
|
||||||
@ -82,6 +95,50 @@ describe("InputService", () => {
|
|||||||
expect(inputs.composeFiles).toEqual(["file1", "file2"]);
|
expect(inputs.composeFiles).toEqual(["file1", "file2"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should ignore empty compose file entries", () => {
|
||||||
|
getMultilineInputMock.mockImplementation((inputName) => {
|
||||||
|
switch (inputName) {
|
||||||
|
case InputNames.ComposeFile:
|
||||||
|
return [" ", "file1"];
|
||||||
|
default:
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
getInputMock.mockReturnValue("");
|
||||||
|
existsSyncMock.mockReturnValue(true);
|
||||||
|
|
||||||
|
const inputs = service.getInputs();
|
||||||
|
|
||||||
|
expect(inputs.composeFiles).toEqual(["file1"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should accept compose file when it exists at the original path", () => {
|
||||||
|
getMultilineInputMock.mockImplementation((inputName) => {
|
||||||
|
switch (inputName) {
|
||||||
|
case InputNames.ComposeFile:
|
||||||
|
return ["./compose.yml"];
|
||||||
|
default:
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
getInputMock.mockImplementation((inputName) => {
|
||||||
|
switch (inputName) {
|
||||||
|
case InputNames.Cwd:
|
||||||
|
return "/current/working/directory";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
existsSyncMock.mockImplementation((file) => file === "./compose.yml");
|
||||||
|
|
||||||
|
const inputs = service.getInputs();
|
||||||
|
|
||||||
|
expect(inputs.composeFiles).toEqual(["./compose.yml"]);
|
||||||
|
});
|
||||||
|
|
||||||
it("should throws an error when a compose file does not exist", () => {
|
it("should throws an error when a compose file does not exist", () => {
|
||||||
getMultilineInputMock.mockImplementation((inputName) => {
|
getMultilineInputMock.mockImplementation((inputName) => {
|
||||||
switch (inputName) {
|
switch (inputName) {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { getInput, getMultilineInput } from "@actions/core";
|
import { getInput, getMultilineInput } from "@actions/core";
|
||||||
import { existsSync } from "fs";
|
import { existsSync } from "node:fs";
|
||||||
import { join } from "path";
|
import { join } from "node:path";
|
||||||
import { LogLevel } from "./logger.service";
|
import { LogLevel } from "./logger.service.js";
|
||||||
|
|
||||||
export type Inputs = {
|
export type Inputs = {
|
||||||
dockerFlags: string[];
|
dockerFlags: string[];
|
||||||
|
|||||||
@ -1,31 +1,40 @@
|
|||||||
import { ManualInstallerAdapter } from "./manual-installer-adapter";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import * as exec from "@actions/exec";
|
import type { ExecOptions } from "@actions/exec";
|
||||||
import * as io from "@actions/io";
|
|
||||||
import * as toolCache from "@actions/tool-cache";
|
|
||||||
|
|
||||||
jest.mock("@actions/exec");
|
// Mock @actions/exec
|
||||||
jest.mock("@actions/io");
|
const execMock =
|
||||||
jest.mock("@actions/tool-cache");
|
jest.fn<(command: string, args?: string[], options?: ExecOptions) => Promise<number>>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("@actions/exec", () => ({
|
||||||
|
exec: execMock,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock @actions/io
|
||||||
|
const mkdirPMock = jest.fn<(fsPath: string) => Promise<void>>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("@actions/io", () => ({
|
||||||
|
mkdirP: mkdirPMock,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock @actions/tool-cache
|
||||||
|
const cacheFileMock = jest.fn<() => Promise<string>>();
|
||||||
|
const downloadToolMock = jest.fn<() => Promise<string>>();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("@actions/tool-cache", () => ({
|
||||||
|
cacheFile: cacheFileMock,
|
||||||
|
downloadTool: downloadToolMock,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic import after mock setup
|
||||||
|
const { ManualInstallerAdapter } = await import("./manual-installer-adapter.js");
|
||||||
|
|
||||||
describe("ManualInstallerAdapter", () => {
|
describe("ManualInstallerAdapter", () => {
|
||||||
let mkdirPMock: jest.SpiedFunction<typeof io.mkdirP>;
|
let adapter: InstanceType<typeof ManualInstallerAdapter>;
|
||||||
let execMock: jest.SpiedFunction<typeof exec.exec>;
|
|
||||||
let cacheFileMock: jest.SpiedFunction<typeof toolCache.cacheFile>;
|
|
||||||
let downloadToolMock: jest.SpiedFunction<typeof toolCache.downloadTool>;
|
|
||||||
|
|
||||||
let adapter: ManualInstallerAdapter;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
mkdirPMock = jest.spyOn(io, "mkdirP").mockImplementation();
|
|
||||||
execMock = jest.spyOn(exec, "exec").mockImplementation();
|
|
||||||
cacheFileMock = jest.spyOn(toolCache, "cacheFile").mockImplementation();
|
|
||||||
downloadToolMock = jest.spyOn(toolCache, "downloadTool").mockImplementation();
|
|
||||||
|
|
||||||
adapter = new ManualInstallerAdapter();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
delete process.env.DOCKER_CONFIG;
|
||||||
|
adapter = new ManualInstallerAdapter();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("install", () => {
|
describe("install", () => {
|
||||||
@ -68,6 +77,32 @@ describe("ManualInstallerAdapter", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should use DOCKER_CONFIG when set", async () => {
|
||||||
|
// Arrange
|
||||||
|
const version = "v2.29.0";
|
||||||
|
|
||||||
|
execMock.mockImplementationOnce(async (_command, _args, options) => {
|
||||||
|
options?.listeners?.stdout?.(Buffer.from("Linux\n"));
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
execMock.mockImplementationOnce(async (_command, _args, options) => {
|
||||||
|
options?.listeners?.stdout?.(Buffer.from("x86_64\n"));
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
process.env.DOCKER_CONFIG = "/custom/docker";
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await adapter.install(version);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(downloadToolMock).toHaveBeenCalledWith(
|
||||||
|
"https://github.com/docker/compose/releases/download/v2.29.0/docker-compose-Linux-x86_64",
|
||||||
|
"/custom/docker/cli-plugins/docker-compose"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("should handle version without 'v' prefix", async () => {
|
it("should handle version without 'v' prefix", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const version = "2.29.0";
|
const version = "2.29.0";
|
||||||
@ -100,6 +135,35 @@ describe("ManualInstallerAdapter", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should not add 'v' prefix for 1.x versions", async () => {
|
||||||
|
// Arrange
|
||||||
|
const version = "1.29.0";
|
||||||
|
|
||||||
|
execMock.mockImplementationOnce(async (_command, _args, options) => {
|
||||||
|
options?.listeners?.stdout?.(Buffer.from("Linux\n"));
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
execMock.mockImplementationOnce(async (_command, _args, options) => {
|
||||||
|
options?.listeners?.stdout?.(Buffer.from("x86_64\n"));
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
delete process.env.DOCKER_CONFIG;
|
||||||
|
Object.defineProperty(process.env, "HOME", {
|
||||||
|
value: "/home/test",
|
||||||
|
});
|
||||||
|
|
||||||
|
// Act
|
||||||
|
await adapter.install(version);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
expect(downloadToolMock).toHaveBeenCalledWith(
|
||||||
|
"https://github.com/docker/compose/releases/download/1.29.0/docker-compose-Linux-x86_64",
|
||||||
|
"/home/test/.docker/cli-plugins/docker-compose"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("should throw an error if a command fails", async () => {
|
it("should throw an error if a command fails", async () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
const version = "v2.29.0";
|
const version = "v2.29.0";
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { exec } from "@actions/exec";
|
import { exec } from "@actions/exec";
|
||||||
import { mkdirP } from "@actions/io";
|
import { mkdirP } from "@actions/io";
|
||||||
import { basename } from "path";
|
import { basename } from "node:path";
|
||||||
import { cacheFile, downloadTool } from "@actions/tool-cache";
|
import { cacheFile, downloadTool } from "@actions/tool-cache";
|
||||||
import { DockerComposeInstallerAdapter } from "./docker-compose-installer-adapter";
|
import { DockerComposeInstallerAdapter } from "./docker-compose-installer-adapter.js";
|
||||||
|
|
||||||
export class ManualInstallerAdapter implements DockerComposeInstallerAdapter {
|
export class ManualInstallerAdapter implements DockerComposeInstallerAdapter {
|
||||||
async install(version: string): Promise<void> {
|
async install(version: string): Promise<void> {
|
||||||
|
|||||||
@ -1,46 +1,51 @@
|
|||||||
import { LoggerService, LogLevel } from "./logger.service";
|
import { jest, describe, it, expect, beforeEach } from "@jest/globals";
|
||||||
import { debug, info, warning } from "@actions/core";
|
|
||||||
|
|
||||||
jest.mock("@actions/core", () => ({
|
// Import types directly from the module
|
||||||
warning: jest.fn(),
|
import type { LogLevel as LogLevelType } from "./logger.service.js";
|
||||||
info: jest.fn(),
|
|
||||||
debug: jest.fn(),
|
// Mock @actions/core before importing the module under test
|
||||||
|
const warningMock = jest.fn();
|
||||||
|
const infoMock = jest.fn();
|
||||||
|
const debugMock = jest.fn();
|
||||||
|
|
||||||
|
jest.unstable_mockModule("@actions/core", () => ({
|
||||||
|
warning: warningMock,
|
||||||
|
info: infoMock,
|
||||||
|
debug: debugMock,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// Dynamic import after mock setup
|
||||||
|
const { LoggerService, LogLevel } = await import("./logger.service.js");
|
||||||
|
|
||||||
describe("LoggerService", () => {
|
describe("LoggerService", () => {
|
||||||
let loggerService: LoggerService;
|
let loggerService: InstanceType<typeof LoggerService>;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
loggerService = new LoggerService();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
|
loggerService = new LoggerService();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("warn", () => {
|
describe("warn", () => {
|
||||||
it("should call warning with the correct message", () => {
|
it("should call warning with the correct message", () => {
|
||||||
const message = "This is a warning message";
|
const message = "This is a warning message";
|
||||||
loggerService.warn(message);
|
loggerService.warn(message);
|
||||||
expect(warning).toHaveBeenCalledWith(message);
|
expect(warningMock).toHaveBeenCalledWith(message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("info", () => {
|
describe("info", () => {
|
||||||
it("should call info with the correct message", () => {
|
it("should call info with the correct message", () => {
|
||||||
const message = "This is an info message";
|
const message = "This is an info message";
|
||||||
|
|
||||||
loggerService.info(message);
|
loggerService.info(message);
|
||||||
expect(info).toHaveBeenCalledWith(message);
|
expect(infoMock).toHaveBeenCalledWith(message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("debug", () => {
|
describe("debug", () => {
|
||||||
it("should call debug with the correct message", () => {
|
it("should call debug with the correct message", () => {
|
||||||
const message = "This is a debug message";
|
const message = "This is a debug message";
|
||||||
|
|
||||||
loggerService.debug(message);
|
loggerService.debug(message);
|
||||||
expect(debug).toHaveBeenCalledWith(message);
|
expect(debugMock).toHaveBeenCalledWith(message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -56,7 +61,7 @@ describe("LoggerService", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should default to info level if an unknown level is provided", () => {
|
it("should default to info level if an unknown level is provided", () => {
|
||||||
const logger = loggerService.getServiceLogger("unknown" as LogLevel);
|
const logger = loggerService.getServiceLogger("unknown" as LogLevelType);
|
||||||
expect(logger).toBe(loggerService.info);
|
expect(logger).toBe(loggerService.info);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user