@argos-ci/core 6.0.0 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1063,7 +1063,7 @@ const base64Encode = (obj) => Buffer.from(JSON.stringify(obj), "utf8").toString(
|
|
|
1063
1063
|
* Check if GitHub Actions tokenless authentication is available for auto-detection.
|
|
1064
1064
|
*/
|
|
1065
1065
|
function isGitHubActionsTokenlessAvailable(config) {
|
|
1066
|
-
return
|
|
1066
|
+
return config.ciProvider === "github-actions";
|
|
1067
1067
|
}
|
|
1068
1068
|
/**
|
|
1069
1069
|
* Build a tokenless GitHub Actions bearer token from the CI environment.
|
|
@@ -1085,11 +1085,11 @@ function getTokenlessBearerToken(config) {
|
|
|
1085
1085
|
*/
|
|
1086
1086
|
async function exchangeGitHubActionsTokenlessToken(args) {
|
|
1087
1087
|
const { apiBaseUrl, config } = args;
|
|
1088
|
-
|
|
1088
|
+
const commit = config.prHeadCommit ?? config.commit;
|
|
1089
1089
|
const tokenlessToken = getTokenlessBearerToken(config);
|
|
1090
1090
|
const result = await createClient({ baseUrl: apiBaseUrl }).POST("/auth/github-actions/tokenless/exchange", { body: {
|
|
1091
1091
|
tokenlessToken,
|
|
1092
|
-
commit
|
|
1092
|
+
commit,
|
|
1093
1093
|
branch: config.branch
|
|
1094
1094
|
} });
|
|
1095
1095
|
if (result.error) throwAPIError(result.error);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/core",
|
|
3
3
|
"description": "Node.js SDK for visual testing with Argos.",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@argos-ci/api-client": "0.20.
|
|
42
|
+
"@argos-ci/api-client": "0.20.1",
|
|
43
43
|
"@argos-ci/util": "4.0.0",
|
|
44
44
|
"convict": "^6.2.5",
|
|
45
45
|
"debug": "^4.4.3",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@types/node": "catalog:",
|
|
57
57
|
"@types/tmp": "^0.2.6",
|
|
58
58
|
"@vercel/repository-dispatch": "^0.1.0",
|
|
59
|
-
"msw": "^2.14.
|
|
59
|
+
"msw": "^2.14.6",
|
|
60
60
|
"vitest": "catalog:"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"lint": "eslint .",
|
|
68
68
|
"test": "vitest"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "9c0f1aa0c2ca4bd1255f95f2dc1a9ad7c4cf36e9"
|
|
71
71
|
}
|