@argos-ci/cli 0.3.3-alpha.2 → 0.4.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 +24 -27
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -97,7 +97,7 @@ const schema = {
97
97
  nullable: true
98
98
  },
99
99
  prNumber: {
100
- format: String,
100
+ format: Number,
101
101
  default: null,
102
102
  nullable: true
103
103
  },
@@ -440,34 +440,31 @@ const upload$1 = async (input)=>{
440
440
  const debug = createDebug("@argos-ci/core");
441
441
 
442
442
  const getConfigFromOptions = (options)=>{
443
- const { apiBaseUrl , commit , branch , token , buildName , parallel , prNumber } = options;
444
443
  const config = createConfig();
444
+ const ciEnv = getCiEnvironment();
445
+ if (ciEnv) {
446
+ config.load(omitUndefined({
447
+ commit: ciEnv.commit,
448
+ branch: ciEnv.branch,
449
+ ciService: ciEnv.name,
450
+ owner: ciEnv.owner,
451
+ repository: ciEnv.repository,
452
+ jobId: ciEnv.jobId,
453
+ runId: ciEnv.runId,
454
+ prNumber: ciEnv.prNumber
455
+ }));
456
+ }
445
457
  config.load(omitUndefined({
446
- apiBaseUrl,
447
- commit,
448
- branch,
449
- token,
450
- prNumber,
451
- buildName,
452
- parallel: Boolean(parallel),
453
- parallelNonce: parallel ? parallel.nonce : null,
454
- parallelTotal: parallel ? parallel.total : null
458
+ apiBaseUrl: options.apiBaseUrl,
459
+ commit: options.commit,
460
+ branch: options.branch,
461
+ token: options.token,
462
+ prNumber: options.prNumber,
463
+ buildName: options.buildName,
464
+ parallel: Boolean(options.parallel),
465
+ parallelNonce: options.parallel ? options.parallel.nonce : null,
466
+ parallelTotal: options.parallel ? options.parallel.total : null
455
467
  }));
456
- if (!config.get("commit")) {
457
- const ciEnv = getCiEnvironment();
458
- if (ciEnv) {
459
- config.load(omitUndefined({
460
- commit: ciEnv.commit,
461
- branch: ciEnv.branch,
462
- ciService: ciEnv.name,
463
- owner: ciEnv.owner,
464
- repository: ciEnv.repository,
465
- jobId: ciEnv.jobId,
466
- runId: ciEnv.runId,
467
- prNumber: ciEnv.prNumber
468
- }));
469
- }
470
- }
471
468
  config.validate();
472
469
  return config.get();
473
470
  };
@@ -551,7 +548,7 @@ program.command("upload").argument("<directory>", "Directory to upload").descrip
551
548
  buildName: options.buildName,
552
549
  files: options.files,
553
550
  ignore: options.ignore,
554
- prNumber: options.pullRequest,
551
+ prNumber: options.pullRequest ? Number(options.pullRequest) : undefined,
555
552
  parallel: options.parallel ? {
556
553
  nonce: options.parallelNonce,
557
554
  total: options.parallelTotal
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/cli",
3
3
  "description": "Visual testing solution to avoid visual regression. Argos CLI is used to interact with and upload screenshots to argos-ci.com via command line.",
4
- "version": "0.3.3-alpha.2+760abb1",
4
+ "version": "0.4.0",
5
5
  "bin": {
6
6
  "argos": "./bin/argos-cli.js"
7
7
  },
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@argos-ci/core": "^0.6.3-alpha.2+760abb1",
43
+ "@argos-ci/core": "^0.7.0",
44
44
  "commander": "^9.4.1",
45
45
  "ora": "^6.1.2",
46
46
  "update-notifier": "^6.0.2"
@@ -49,5 +49,5 @@
49
49
  "rollup": "^2.79.1",
50
50
  "rollup-plugin-swc3": "^0.6.0"
51
51
  },
52
- "gitHead": "760abb140949348929f833a68929744de146e127"
52
+ "gitHead": "a7603beaf95ec4be8be9405450a445bfe94a6a12"
53
53
  }