@argos-ci/core 1.2.1 → 1.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.
- package/dist/index.mjs +26 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,29 @@ import axios from 'axios';
|
|
|
12
12
|
import { readFile } from 'node:fs/promises';
|
|
13
13
|
import { readMetadata, getPlaywrightTracePath } from '@argos-ci/util';
|
|
14
14
|
|
|
15
|
+
const getPrNumber$2 = ({ env })=>{
|
|
16
|
+
return env.BITRISE_PULL_REQUEST ? Number(env.BITRISE_PULL_REQUEST) : null;
|
|
17
|
+
};
|
|
18
|
+
const service$7 = {
|
|
19
|
+
name: "Bitrise",
|
|
20
|
+
detect: ({ env })=>Boolean(env.BITRISE_IO),
|
|
21
|
+
config: ({ env })=>{
|
|
22
|
+
return {
|
|
23
|
+
commit: env.BITRISE_GIT_COMMIT || null,
|
|
24
|
+
branch: env.BITRISE_GIT_BRANCH || null,
|
|
25
|
+
owner: env.BITRISEIO_GIT_REPOSITORY_OWNER || null,
|
|
26
|
+
repository: env.BITRISEIO_GIT_REPOSITORY_SLUG || null,
|
|
27
|
+
jobId: null,
|
|
28
|
+
runId: null,
|
|
29
|
+
prNumber: getPrNumber$2({
|
|
30
|
+
env
|
|
31
|
+
}),
|
|
32
|
+
prHeadCommit: null,
|
|
33
|
+
nonce: env.BITRISEIO_PIPELINE_ID || null
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
15
38
|
/**
|
|
16
39
|
* Check if the current directory is a git repository.
|
|
17
40
|
*/ const checkIsGitRepository = ()=>{
|
|
@@ -207,7 +230,6 @@ const service = {
|
|
|
207
230
|
detect: ()=>checkIsGitRepository(),
|
|
208
231
|
config: ()=>{
|
|
209
232
|
return {
|
|
210
|
-
// Buildkite doesn't work well so we fallback to git to ensure we have commit and branch
|
|
211
233
|
commit: head() || null,
|
|
212
234
|
branch: branch() || null,
|
|
213
235
|
owner: null,
|
|
@@ -236,6 +258,8 @@ const debugTimeEnd = (arg)=>{
|
|
|
236
258
|
}
|
|
237
259
|
};
|
|
238
260
|
|
|
261
|
+
// List of services ordered by usage
|
|
262
|
+
// "git" must be the last one
|
|
239
263
|
const services = [
|
|
240
264
|
service$5,
|
|
241
265
|
service$4,
|
|
@@ -243,6 +267,7 @@ const services = [
|
|
|
243
267
|
service$2,
|
|
244
268
|
service$6,
|
|
245
269
|
service$1,
|
|
270
|
+
service$7,
|
|
246
271
|
service
|
|
247
272
|
];
|
|
248
273
|
const getCiEnvironment = ({ env = process.env } = {})=>{
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
10
11
|
"require": "./dist/index.cjs",
|
|
11
12
|
"import": "./dist/index.mjs",
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
13
|
"default": "./dist/index.mjs"
|
|
14
14
|
},
|
|
15
15
|
"./package.json": "./package.json"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@argos-ci/util": "1.
|
|
43
|
+
"@argos-ci/util": "1.2.0",
|
|
44
44
|
"axios": "^1.5.0",
|
|
45
45
|
"convict": "^6.2.4",
|
|
46
46
|
"debug": "^4.3.4",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"build": "rollup -c",
|
|
60
60
|
"e2e": "node ./e2e/upload.cjs && node ./e2e/upload.mjs"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "ac02d37ca89f73359fba70cfe9b579396c3260d8"
|
|
63
63
|
}
|