@argos-ci/core 4.1.3 → 4.1.5
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 +10 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -788,6 +788,11 @@ async function readConfig(options = {}) {
|
|
|
788
788
|
ciProvider: ciEnv?.key || null,
|
|
789
789
|
previewBaseUrl: defaultConfig.previewBaseUrl || null
|
|
790
790
|
});
|
|
791
|
+
if (!config.get("branch") || !config.get("commit")) {
|
|
792
|
+
throw new Error(
|
|
793
|
+
"Argos requires a branch and a commit to be set. If you are running in a non-git environment consider setting ARGOS_BRANCH and ARGOS_COMMIT environment variables."
|
|
794
|
+
);
|
|
795
|
+
}
|
|
791
796
|
config.validate();
|
|
792
797
|
return config.get();
|
|
793
798
|
}
|
|
@@ -977,10 +982,10 @@ async function getConfigFromOptions({
|
|
|
977
982
|
}) {
|
|
978
983
|
return readConfig({
|
|
979
984
|
...options,
|
|
980
|
-
parallel: Boolean(parallel),
|
|
981
|
-
parallelNonce: parallel ? parallel.nonce :
|
|
982
|
-
parallelTotal: parallel ? parallel.total :
|
|
983
|
-
parallelIndex: parallel ? parallel.index :
|
|
985
|
+
parallel: parallel !== void 0 ? Boolean(parallel) : void 0,
|
|
986
|
+
parallelNonce: parallel ? parallel.nonce : void 0,
|
|
987
|
+
parallelTotal: parallel ? parallel.total : void 0,
|
|
988
|
+
parallelIndex: parallel ? parallel.index : void 0
|
|
984
989
|
});
|
|
985
990
|
}
|
|
986
991
|
async function uploadFilesToS3(files) {
|
|
@@ -1206,7 +1211,7 @@ async function upload(params) {
|
|
|
1206
1211
|
import { createClient as createClient2, throwAPIError as throwAPIError2 } from "@argos-ci/api-client";
|
|
1207
1212
|
async function finalize(params) {
|
|
1208
1213
|
const config = await readConfig({
|
|
1209
|
-
parallelNonce: params.parallel?.nonce
|
|
1214
|
+
parallelNonce: params.parallel?.nonce
|
|
1210
1215
|
});
|
|
1211
1216
|
const authToken = getAuthToken(config);
|
|
1212
1217
|
const apiClient = createClient2({
|
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.1.
|
|
4
|
+
"version": "4.1.5",
|
|
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": "a865ca5004133efd5bf86e866116afabe3c1a478"
|
|
68
68
|
}
|