@argos-ci/core 0.6.3-alpha.2 → 0.7.0

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.
Files changed (2) hide show
  1. package/dist/index.mjs +23 -26
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -94,7 +94,7 @@ const schema = {
94
94
  nullable: true
95
95
  },
96
96
  prNumber: {
97
- format: String,
97
+ format: Number,
98
98
  default: null,
99
99
  nullable: true
100
100
  },
@@ -437,34 +437,31 @@ const upload$1 = async (input)=>{
437
437
  const debug = createDebug("@argos-ci/core");
438
438
 
439
439
  const getConfigFromOptions = (options)=>{
440
- const { apiBaseUrl , commit , branch , token , buildName , parallel , prNumber } = options;
441
440
  const config = createConfig();
441
+ const ciEnv = getCiEnvironment();
442
+ if (ciEnv) {
443
+ config.load(omitUndefined({
444
+ commit: ciEnv.commit,
445
+ branch: ciEnv.branch,
446
+ ciService: ciEnv.name,
447
+ owner: ciEnv.owner,
448
+ repository: ciEnv.repository,
449
+ jobId: ciEnv.jobId,
450
+ runId: ciEnv.runId,
451
+ prNumber: ciEnv.prNumber
452
+ }));
453
+ }
442
454
  config.load(omitUndefined({
443
- apiBaseUrl,
444
- commit,
445
- branch,
446
- token,
447
- prNumber,
448
- buildName,
449
- parallel: Boolean(parallel),
450
- parallelNonce: parallel ? parallel.nonce : null,
451
- parallelTotal: parallel ? parallel.total : null
455
+ apiBaseUrl: options.apiBaseUrl,
456
+ commit: options.commit,
457
+ branch: options.branch,
458
+ token: options.token,
459
+ prNumber: options.prNumber,
460
+ buildName: options.buildName,
461
+ parallel: Boolean(options.parallel),
462
+ parallelNonce: options.parallel ? options.parallel.nonce : null,
463
+ parallelTotal: options.parallel ? options.parallel.total : null
452
464
  }));
453
- if (!config.get("commit")) {
454
- const ciEnv = getCiEnvironment();
455
- if (ciEnv) {
456
- config.load(omitUndefined({
457
- commit: ciEnv.commit,
458
- branch: ciEnv.branch,
459
- ciService: ciEnv.name,
460
- owner: ciEnv.owner,
461
- repository: ciEnv.repository,
462
- jobId: ciEnv.jobId,
463
- runId: ciEnv.runId,
464
- prNumber: ciEnv.prNumber
465
- }));
466
- }
467
- }
468
465
  config.validate();
469
466
  return config.get();
470
467
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/core",
3
3
  "description": "Visual testing solution to avoid visual regression. The core component of Argos SDK that handles build creation.",
4
- "version": "0.6.3-alpha.2+760abb1",
4
+ "version": "0.7.0",
5
5
  "scripts": {
6
6
  "prebuild": "rm -rf dist",
7
7
  "build": "rollup -c",
@@ -60,5 +60,5 @@
60
60
  "rollup-plugin-dts": "^4.2.3",
61
61
  "rollup-plugin-swc3": "^0.6.0"
62
62
  },
63
- "gitHead": "760abb140949348929f833a68929744de146e127"
63
+ "gitHead": "a7603beaf95ec4be8be9405450a445bfe94a6a12"
64
64
  }