zephyr-agent 0.0.39 → 0.0.42
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.
|
@@ -14,7 +14,7 @@ const exec = (0, node_util_1.promisify)(node_child_process_1.default.exec);
|
|
|
14
14
|
/** Loads the git information from the current repository. */
|
|
15
15
|
async function getGitInfo() {
|
|
16
16
|
const hasToken = (0, secret_token_1.hasSecretToken)();
|
|
17
|
-
const { name, email, remoteOrigin, branch, commit, stdout } = await loadGitInfo(hasToken);
|
|
17
|
+
const { name, email, remoteOrigin, branch, commit, tags, stdout } = await loadGitInfo(hasToken);
|
|
18
18
|
if (!hasToken && (!name || !email)) {
|
|
19
19
|
throw new errors_1.ZephyrError(errors_1.ZeErrors.ERR_NO_GIT_USERNAME_EMAIL, {
|
|
20
20
|
data: { stdout },
|
|
@@ -22,7 +22,7 @@ async function getGitInfo() {
|
|
|
22
22
|
}
|
|
23
23
|
const app = parseGitUrl(remoteOrigin, stdout);
|
|
24
24
|
const gitInfo = {
|
|
25
|
-
git: { name, email, branch, commit },
|
|
25
|
+
git: { name, email, branch, commit, tags },
|
|
26
26
|
app,
|
|
27
27
|
};
|
|
28
28
|
(0, logging_1.ze_log)('Loaded: git info', gitInfo);
|
|
@@ -42,19 +42,23 @@ async function loadGitInfo(hasSecretToken) {
|
|
|
42
42
|
'git config --get remote.origin.url',
|
|
43
43
|
'git rev-parse --abbrev-ref HEAD',
|
|
44
44
|
'git rev-parse HEAD',
|
|
45
|
+
'git tag --points-at HEAD',
|
|
45
46
|
].join(` && echo ${delimiter} && `);
|
|
46
47
|
try {
|
|
47
48
|
const { stdout } = await exec(command);
|
|
48
|
-
const [name, email, remoteOrigin, branch, commit] = stdout
|
|
49
|
+
const [name, email, remoteOrigin, branch, commit, tagsOutput] = stdout
|
|
49
50
|
.trim()
|
|
50
51
|
.split(delimiter)
|
|
51
52
|
.map((x) => x.trim());
|
|
53
|
+
// Parse tags - if multiple tags point to HEAD, they'll be on separate lines
|
|
54
|
+
const tags = tagsOutput ? tagsOutput.split('\n').filter(Boolean) : [];
|
|
52
55
|
return {
|
|
53
56
|
name,
|
|
54
57
|
email,
|
|
55
58
|
remoteOrigin,
|
|
56
59
|
branch,
|
|
57
60
|
commit,
|
|
61
|
+
tags,
|
|
58
62
|
stdout,
|
|
59
63
|
};
|
|
60
64
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ze-util-get-git-info.js","sourceRoot":"","sources":["../../../src/lib/build-context/ze-util-get-git-info.ts"],"names":[],"mappings":";;AAkBA,gCAsBC;;AAxCD,0EAAwC;AACxC,0DAAyB;AACzB,oFAAoC;AACpC,6CAAyC;AACzC,yCAAsC;AAEtC,sCAAkD;AAClD,wCAAoC;AACpC,+DAA8D;AAE9D,MAAM,IAAI,GAAG,IAAA,qBAAS,EAAC,4BAAE,CAAC,IAAI,CAAC,CAAC;AAOhC,6DAA6D;AACtD,KAAK,UAAU,UAAU;IAC9B,MAAM,QAAQ,GAAG,IAAA,6BAAc,GAAE,CAAC;IAElC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"ze-util-get-git-info.js","sourceRoot":"","sources":["../../../src/lib/build-context/ze-util-get-git-info.ts"],"names":[],"mappings":";;AAkBA,gCAsBC;;AAxCD,0EAAwC;AACxC,0DAAyB;AACzB,oFAAoC;AACpC,6CAAyC;AACzC,yCAAsC;AAEtC,sCAAkD;AAClD,wCAAoC;AACpC,+DAA8D;AAE9D,MAAM,IAAI,GAAG,IAAA,qBAAS,EAAC,4BAAE,CAAC,IAAI,CAAC,CAAC;AAOhC,6DAA6D;AACtD,KAAK,UAAU,UAAU;IAC9B,MAAM,QAAQ,GAAG,IAAA,6BAAc,GAAE,CAAC;IAElC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,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EAAE,MAAM,EAAE;SACjB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,IAAI,oBAAW,CAAC,iBAAQ,CAAC,qBAAqB,EAAE;YACpD,IAAI,EAAE,EAAE,MAAM,EAAE;SACjB,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE;QACrC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;KACzC,CAAC;AACJ,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zephyr-agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
|
+
"description": "Zephyr plugin agent",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/ZephyrCloudIO/zephyr-packages.git",
|
|
8
|
+
"directory": "libs/zephyr-agent"
|
|
9
|
+
},
|
|
4
10
|
"license": "Apache-2.0",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "nx build zephyr-agent",
|
|
10
|
-
"test": "nx test zephyr-agent",
|
|
11
|
-
"patch-version": "pnpm version"
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "ZephyrCloudIO",
|
|
13
|
+
"url": "https://github.com/ZephyrCloudIO"
|
|
12
14
|
},
|
|
15
|
+
"type": "commonjs",
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
15
18
|
"import": "./dist/index.js",
|
|
@@ -22,28 +25,39 @@
|
|
|
22
25
|
"types": "./dist/node-persist/index.d.ts"
|
|
23
26
|
}
|
|
24
27
|
},
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "nx build zephyr-agent",
|
|
32
|
+
"patch-version": "pnpm version",
|
|
33
|
+
"test": "nx test zephyr-agent"
|
|
34
|
+
},
|
|
25
35
|
"dependencies": {
|
|
26
36
|
"cloudflare": "^3.4.0",
|
|
37
|
+
"debug": "^4.3.4",
|
|
27
38
|
"git-url-parse": "^15.0.0",
|
|
28
39
|
"is-ci": "catalog:plugin-shared",
|
|
29
40
|
"jose": "^5.10.0",
|
|
41
|
+
"node-persist": "^4.0.1",
|
|
30
42
|
"open": "^10.1.0",
|
|
31
43
|
"socket.io-client": "^4.7.5",
|
|
32
44
|
"tslib": "catalog:typescript",
|
|
33
45
|
"uuid": "^8.3.2",
|
|
34
|
-
"node-persist": "^4.0.1",
|
|
35
|
-
"debug": "^4.3.4",
|
|
36
46
|
"zephyr-edge-contract": "workspace:*"
|
|
37
47
|
},
|
|
38
48
|
"devDependencies": {
|
|
49
|
+
"@jest/globals": "catalog:react",
|
|
50
|
+
"@types/debug": "^4.1.12",
|
|
39
51
|
"@types/git-url-parse": "^9.0.3",
|
|
40
52
|
"@types/is-ci": "catalog:typescript",
|
|
53
|
+
"@types/jest": "catalog:typescript",
|
|
54
|
+
"@types/node-persist": "catalog:typescript",
|
|
41
55
|
"@types/uuid": "^9.0.8",
|
|
42
56
|
"@typescript-eslint/eslint-plugin": "catalog:eslint",
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
57
|
+
"ts-jest": "catalog:typescript"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"provenance": true
|
|
48
62
|
}
|
|
49
63
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zephyr-agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
|
+
"description": "Zephyr plugin agent",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/ZephyrCloudIO/zephyr-packages.git",
|
|
8
|
+
"directory": "libs/zephyr-agent"
|
|
9
|
+
},
|
|
4
10
|
"license": "Apache-2.0",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "ZephyrCloudIO",
|
|
13
|
+
"url": "https://github.com/ZephyrCloudIO"
|
|
14
|
+
},
|
|
5
15
|
"type": "commonjs",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
16
|
"exports": {
|
|
9
17
|
".": {
|
|
10
18
|
"import": "./dist/index.js",
|
|
@@ -17,33 +25,39 @@
|
|
|
17
25
|
"types": "./dist/node-persist/index.d.ts"
|
|
18
26
|
}
|
|
19
27
|
},
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
20
30
|
"dependencies": {
|
|
21
31
|
"cloudflare": "^3.4.0",
|
|
32
|
+
"debug": "^4.3.4",
|
|
22
33
|
"git-url-parse": "^15.0.0",
|
|
23
34
|
"is-ci": "^4.1.0",
|
|
24
35
|
"jose": "^5.10.0",
|
|
36
|
+
"node-persist": "^4.0.1",
|
|
25
37
|
"open": "^10.1.0",
|
|
26
38
|
"socket.io-client": "^4.7.5",
|
|
27
39
|
"tslib": "^2.8.1",
|
|
28
40
|
"uuid": "^8.3.2",
|
|
29
|
-
"
|
|
30
|
-
"debug": "^4.3.4",
|
|
31
|
-
"zephyr-edge-contract": "0.0.39"
|
|
41
|
+
"zephyr-edge-contract": "0.0.42"
|
|
32
42
|
},
|
|
33
43
|
"devDependencies": {
|
|
44
|
+
"@jest/globals": "^29.7.0",
|
|
45
|
+
"@types/debug": "^4.1.12",
|
|
34
46
|
"@types/git-url-parse": "^9.0.3",
|
|
35
47
|
"@types/is-ci": "3.0.4",
|
|
48
|
+
"@types/jest": "29.5.14",
|
|
49
|
+
"@types/node-persist": "^3.1.8",
|
|
36
50
|
"@types/uuid": "^9.0.8",
|
|
37
51
|
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
52
|
+
"ts-jest": "^29.2.6"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"provenance": true
|
|
43
57
|
},
|
|
44
58
|
"scripts": {
|
|
45
59
|
"build": "nx build zephyr-agent",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
60
|
+
"patch-version": "pnpm version",
|
|
61
|
+
"test": "nx test zephyr-agent"
|
|
48
62
|
}
|
|
49
63
|
}
|