@argos-ci/core 4.0.0 → 4.0.1
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.js +4 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -692,11 +692,6 @@ var schema = {
|
|
|
692
692
|
default: null,
|
|
693
693
|
nullable: true
|
|
694
694
|
},
|
|
695
|
-
owner: {
|
|
696
|
-
format: String,
|
|
697
|
-
default: null,
|
|
698
|
-
nullable: true
|
|
699
|
-
},
|
|
700
695
|
repository: {
|
|
701
696
|
format: String,
|
|
702
697
|
default: null,
|
|
@@ -859,7 +854,6 @@ var base64Encode = (obj) => Buffer.from(JSON.stringify(obj), "utf8").toString("b
|
|
|
859
854
|
function getAuthToken({
|
|
860
855
|
token,
|
|
861
856
|
ciProvider,
|
|
862
|
-
owner,
|
|
863
857
|
repository,
|
|
864
858
|
jobId,
|
|
865
859
|
runId,
|
|
@@ -870,17 +864,18 @@ function getAuthToken({
|
|
|
870
864
|
}
|
|
871
865
|
switch (ciProvider) {
|
|
872
866
|
case "github-actions": {
|
|
873
|
-
if (!
|
|
867
|
+
if (!repository || !jobId || !runId) {
|
|
874
868
|
throw new Error(
|
|
875
869
|
`Automatic GitHub Actions variables detection failed. Please add the 'ARGOS_TOKEN'`
|
|
876
870
|
);
|
|
877
871
|
}
|
|
872
|
+
const [owner, repo] = repository.split("/");
|
|
878
873
|
return `tokenless-github-${base64Encode({
|
|
879
874
|
owner,
|
|
880
|
-
repository,
|
|
875
|
+
repository: repo,
|
|
881
876
|
jobId,
|
|
882
877
|
runId,
|
|
883
|
-
prNumber
|
|
878
|
+
prNumber: prNumber ?? void 0
|
|
884
879
|
})}`;
|
|
885
880
|
}
|
|
886
881
|
default:
|
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": "4.0.
|
|
4
|
+
"version": "4.0.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"exports": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"lint": "eslint .",
|
|
65
65
|
"test": "vitest"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "db55659eaaffc6a3a92655f621be0d6344901da2"
|
|
68
68
|
}
|