@ship.zone/szci 7.1.3 → 7.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/bin/szci-wrapper.js +67 -28
- package/changelog.md +13 -1
- package/deno.json +4 -4
- package/package.json +1 -1
- package/readme.md +7 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/manager.nodejs/index.ts +2 -2
- package/ts/szci.classes.szciconfig.ts +9 -6
- package/ts/szci.plugins.ts +3 -5
package/bin/szci-wrapper.js
CHANGED
|
@@ -9,7 +9,7 @@ import { spawn } from 'child_process';
|
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
10
|
import { dirname, join } from 'path';
|
|
11
11
|
import { existsSync } from 'fs';
|
|
12
|
-
import {
|
|
12
|
+
import { arch, platform } from 'os';
|
|
13
13
|
|
|
14
14
|
const __filename = fileURLToPath(import.meta.url);
|
|
15
15
|
const __dirname = dirname(__filename);
|
|
@@ -25,12 +25,12 @@ function getBinaryName() {
|
|
|
25
25
|
const platformMap = {
|
|
26
26
|
'darwin': 'macos',
|
|
27
27
|
'linux': 'linux',
|
|
28
|
-
'win32': 'windows'
|
|
28
|
+
'win32': 'windows',
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
const archMap = {
|
|
32
32
|
'x64': 'x64',
|
|
33
|
-
'arm64': 'arm64'
|
|
33
|
+
'arm64': 'arm64',
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const mappedPlatform = platformMap[plat];
|
|
@@ -61,12 +61,10 @@ function executeBinary() {
|
|
|
61
61
|
|
|
62
62
|
const denoSourcePath = join(__dirname, '..', 'mod.ts');
|
|
63
63
|
const denoConfigPath = join(__dirname, '..', 'deno.json');
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
? process.argv.slice(2)
|
|
67
|
-
: ['run', '--allow-all', '--config', denoConfigPath, denoSourcePath, ...process.argv.slice(2)];
|
|
64
|
+
const binaryExists = existsSync(binaryPath);
|
|
65
|
+
const sourceFallbackExists = existsSync(denoSourcePath) && existsSync(denoConfigPath);
|
|
68
66
|
|
|
69
|
-
if (!
|
|
67
|
+
if (!binaryExists && !sourceFallbackExists) {
|
|
70
68
|
console.error(`Error: Binary not found at ${binaryPath}`);
|
|
71
69
|
console.error(`Error: Deno source fallback not found at ${denoSourcePath}`);
|
|
72
70
|
console.error('Try reinstalling the package:');
|
|
@@ -75,35 +73,76 @@ function executeBinary() {
|
|
|
75
73
|
process.exit(1);
|
|
76
74
|
}
|
|
77
75
|
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
let activeChild;
|
|
77
|
+
const spawnCommand = (command, args, isStandaloneBinary) => {
|
|
78
|
+
const child = spawn(command, args, {
|
|
79
|
+
stdio: 'inherit',
|
|
80
|
+
shell: false,
|
|
81
|
+
});
|
|
82
|
+
activeChild = child;
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
});
|
|
84
|
+
child.on('error', (err) => {
|
|
85
|
+
console.error(`Error executing szci: ${err.message}`);
|
|
86
|
+
process.exit(1);
|
|
87
|
+
});
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
child.on('exit', (code, signal) => {
|
|
90
|
+
if (
|
|
91
|
+
isStandaloneBinary &&
|
|
92
|
+
signal === 'SIGILL' &&
|
|
93
|
+
sourceFallbackExists
|
|
94
|
+
) {
|
|
95
|
+
console.warn(
|
|
96
|
+
'SZCI standalone binary exited with SIGILL; retrying with the packaged Deno source fallback.',
|
|
97
|
+
);
|
|
98
|
+
spawnCommand(
|
|
99
|
+
'deno',
|
|
100
|
+
[
|
|
101
|
+
'run',
|
|
102
|
+
'--allow-all',
|
|
103
|
+
'--config',
|
|
104
|
+
denoConfigPath,
|
|
105
|
+
denoSourcePath,
|
|
106
|
+
...process.argv.slice(2),
|
|
107
|
+
],
|
|
108
|
+
false,
|
|
109
|
+
);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (signal) {
|
|
113
|
+
process.kill(process.pid, signal);
|
|
114
|
+
} else {
|
|
115
|
+
process.exit(code || 0);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
};
|
|
97
119
|
|
|
98
120
|
// Forward signals to child process
|
|
99
121
|
const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
|
|
100
|
-
signals.forEach(signal => {
|
|
122
|
+
signals.forEach((signal) => {
|
|
101
123
|
process.on(signal, () => {
|
|
102
|
-
if (!
|
|
103
|
-
|
|
124
|
+
if (activeChild && !activeChild.killed) {
|
|
125
|
+
activeChild.kill(signal);
|
|
104
126
|
}
|
|
105
127
|
});
|
|
106
128
|
});
|
|
129
|
+
|
|
130
|
+
if (binaryExists) {
|
|
131
|
+
spawnCommand(binaryPath, process.argv.slice(2), true);
|
|
132
|
+
} else {
|
|
133
|
+
spawnCommand(
|
|
134
|
+
'deno',
|
|
135
|
+
[
|
|
136
|
+
'run',
|
|
137
|
+
'--allow-all',
|
|
138
|
+
'--config',
|
|
139
|
+
denoConfigPath,
|
|
140
|
+
denoSourcePath,
|
|
141
|
+
...process.argv.slice(2),
|
|
142
|
+
],
|
|
143
|
+
false,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
107
146
|
}
|
|
108
147
|
|
|
109
148
|
// Execute
|
package/changelog.md
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 2026-07-28 - 7.1.5
|
|
4
4
|
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- retry the packaged Deno source when the standalone binary exits with `SIGILL`
|
|
8
|
+
- Keeps the normal standalone path on supported CPUs.
|
|
9
|
+
- Recovers ARM64 CI environments that reject an incompatible executable instruction.
|
|
10
|
+
|
|
11
|
+
## 2026-05-20 - 7.1.4
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- read `@ship.zone/szci` project config from `.smartconfig.json` via `@push.rocks/smartconfig`
|
|
16
|
+
- restore configured npm registry handling for Docker builds after `.smartconfig.json` migrations
|
|
5
17
|
|
|
6
18
|
## 2026-05-20 - 7.1.3
|
|
7
19
|
|
package/deno.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ship.zone/szci",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.5",
|
|
4
4
|
"exports": "./mod.ts",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"tasks": {
|
|
7
7
|
"dev": "deno run --allow-all mod.ts",
|
|
8
8
|
"compile": "deno task compile:all",
|
|
9
9
|
"compile:all": "bash scripts/compile-all.sh",
|
|
10
|
-
"test": "deno test --allow-all test
|
|
11
|
-
"test:watch": "deno test --allow-all --watch test
|
|
10
|
+
"test": "deno test --allow-all test/*.ts",
|
|
11
|
+
"test:watch": "deno test --allow-all --watch test/*.ts",
|
|
12
12
|
"check": "deno check mod.ts",
|
|
13
13
|
"fmt": "deno fmt",
|
|
14
14
|
"lint": "deno lint"
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@std/cli": "jsr:@std/cli@^1.0.0",
|
|
40
40
|
"@std/assert": "jsr:@std/assert@^1.0.0",
|
|
41
41
|
"@api.global/typedrequest": "npm:@api.global/typedrequest@^3.1.10",
|
|
42
|
-
"@push.rocks/npmextra": "npm:@push.rocks/npmextra@^5.1.2",
|
|
43
42
|
"@push.rocks/projectinfo": "npm:@push.rocks/projectinfo@^5.0.2",
|
|
44
43
|
"@push.rocks/qenv": "npm:@push.rocks/qenv@^6.0.2",
|
|
45
44
|
"@push.rocks/smartanalytics": "npm:@push.rocks/smartanalytics@^2.0.15",
|
|
46
45
|
"@push.rocks/smartcli": "npm:@push.rocks/smartcli@^4.0.11",
|
|
46
|
+
"@push.rocks/smartconfig": "npm:@push.rocks/smartconfig@^6.1.1",
|
|
47
47
|
"@push.rocks/smartfile": "npm:@push.rocks/smartfile@^11.0.21",
|
|
48
48
|
"@push.rocks/smartgit": "npm:@push.rocks/smartgit@^3.1.1",
|
|
49
49
|
"@push.rocks/smartlog": "npm:@push.rocks/smartlog@^3.0.7",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ship.zone/szci",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.5",
|
|
4
4
|
"description": "Serve Zone CI - A tool to streamline Node.js and Docker workflows within CI environments, particularly GitLab CI, providing various CI/CD utilities. Powered by Deno with standalone executables.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Node.js",
|
package/readme.md
CHANGED
|
@@ -52,6 +52,10 @@ curl -sSL https://code.foss.global/ship.zone/szci/raw/branch/main/install.sh | s
|
|
|
52
52
|
npm install -g @ship.zone/szci
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
The normal pre-compiled path does not require a runtime. If a standalone executable terminates with
|
|
56
|
+
`SIGILL`, the npm wrapper automatically retries the packaged source and requires `deno` to be
|
|
57
|
+
available on `PATH`.
|
|
58
|
+
|
|
55
59
|
### From Source
|
|
56
60
|
|
|
57
61
|
```sh
|
|
@@ -128,7 +132,7 @@ szci node install 21 # Any specific version
|
|
|
128
132
|
Uses NVM under the hood (auto-detected at `/usr/local/nvm/nvm.sh` or `~/.nvm/nvm.sh`). After installing, it:
|
|
129
133
|
1. Sets the installed version as `nvm alias default`
|
|
130
134
|
2. Upgrades npm to latest
|
|
131
|
-
3. Installs any global tools listed in
|
|
135
|
+
3. Installs any global tools listed in `.smartconfig.json` → `npmGlobalTools`
|
|
132
136
|
|
|
133
137
|
### `szci ssh` — SSH Key Deployment
|
|
134
138
|
|
|
@@ -148,7 +152,7 @@ Pushes all branches and tags to a GitHub mirror. Requires `SZCI_GIT_GITHUBTOKEN`
|
|
|
148
152
|
|
|
149
153
|
## ⚙️ Configuration
|
|
150
154
|
|
|
151
|
-
###
|
|
155
|
+
### `.smartconfig.json`
|
|
152
156
|
|
|
153
157
|
Place this in your project root to configure szci behavior:
|
|
154
158
|
|
|
@@ -371,7 +375,7 @@ deno task lint
|
|
|
371
375
|
|
|
372
376
|
## License and Legal Information
|
|
373
377
|
|
|
374
|
-
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [
|
|
378
|
+
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.
|
|
375
379
|
|
|
376
380
|
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
|
377
381
|
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@ship.zone/szci',
|
|
6
|
-
version: '7.1.
|
|
6
|
+
version: '7.1.5',
|
|
7
7
|
description: 'Serve Zone CI - A tool to streamline Node.js and Docker workflows within CI environments, particularly GitLab CI, providing various CI/CD utilities. Powered by Deno with standalone executables.'
|
|
8
8
|
}
|
|
@@ -30,7 +30,7 @@ export class SzciNodeJsManager {
|
|
|
30
30
|
} else {
|
|
31
31
|
logger.log(
|
|
32
32
|
'error',
|
|
33
|
-
`>>szci node ...<< cli arguments invalid... Please read the documentation
|
|
33
|
+
`>>szci node ...<< cli arguments invalid... Please read the documentation.`,
|
|
34
34
|
);
|
|
35
35
|
Deno.exit(1);
|
|
36
36
|
}
|
|
@@ -77,6 +77,6 @@ export class SzciNodeJsManager {
|
|
|
77
77
|
await bash(`npm install ${npmTool} -q -g`);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
logger.log('success', 'all global npm tools specified in
|
|
80
|
+
logger.log('success', 'all global npm tools specified in .smartconfig.json are now available!');
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -25,8 +25,8 @@ export interface ISzciOptions {
|
|
|
25
25
|
export class SzciConfig {
|
|
26
26
|
public szciRef: Szci;
|
|
27
27
|
|
|
28
|
-
public
|
|
29
|
-
public kvStorage!: plugins.
|
|
28
|
+
public szciSmartconfig!: plugins.smartconfig.Smartconfig;
|
|
29
|
+
public kvStorage!: plugins.smartconfig.KeyValueStore;
|
|
30
30
|
public szciQenv!: plugins.qenv.Qenv;
|
|
31
31
|
|
|
32
32
|
private configObject!: ISzciOptions;
|
|
@@ -36,15 +36,15 @@ export class SzciConfig {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
public async init() {
|
|
39
|
-
this.
|
|
40
|
-
this.kvStorage = new plugins.
|
|
39
|
+
this.szciSmartconfig = new plugins.smartconfig.Smartconfig(paths.cwd);
|
|
40
|
+
this.kvStorage = new plugins.smartconfig.KeyValueStore({
|
|
41
41
|
typeArg: 'userHomeDir',
|
|
42
42
|
identityArg: `.szci_${this.szciRef.szciEnv.repo.user}_${this.szciRef.szciEnv.repo.repo}`,
|
|
43
43
|
});
|
|
44
44
|
this.szciQenv = new plugins.qenv.Qenv(
|
|
45
45
|
paths.SzciProjectDir,
|
|
46
46
|
paths.SzciProjectNogitDir,
|
|
47
|
-
false
|
|
47
|
+
false,
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
this.configObject = {
|
|
@@ -54,7 +54,10 @@ export class SzciConfig {
|
|
|
54
54
|
npmRegistryUrl: 'registry.npmjs.org',
|
|
55
55
|
urlCloudly: await this.szciQenv.getEnvVarOnDemand('SZCI_URL_CLOUDLY'),
|
|
56
56
|
};
|
|
57
|
-
this.configObject = this.
|
|
57
|
+
this.configObject = this.szciSmartconfig.dataFor<ISzciOptions>(
|
|
58
|
+
'@ship.zone/szci',
|
|
59
|
+
this.configObject,
|
|
60
|
+
);
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
public getConfig(): ISzciOptions {
|
package/ts/szci.plugins.ts
CHANGED
|
@@ -14,12 +14,12 @@ import * as servezoneApi from '@serve.zone/api';
|
|
|
14
14
|
export { servezoneApi };
|
|
15
15
|
|
|
16
16
|
// @push.rocks
|
|
17
|
-
import * as npmextra from '@push.rocks/npmextra';
|
|
18
17
|
import * as projectinfo from '@push.rocks/projectinfo';
|
|
19
18
|
import * as qenv from '@push.rocks/qenv';
|
|
20
19
|
import * as smartanalytics from '@push.rocks/smartanalytics';
|
|
21
20
|
import * as smartfile from '@push.rocks/smartfile';
|
|
22
21
|
import * as smartcli from '@push.rocks/smartcli';
|
|
22
|
+
import * as smartconfig from '@push.rocks/smartconfig';
|
|
23
23
|
import * as smartgit from '@push.rocks/smartgit';
|
|
24
24
|
import * as smartlog from '@push.rocks/smartlog';
|
|
25
25
|
import * as smartlogDestinationLocal from '@push.rocks/smartlog-destination-local';
|
|
@@ -33,13 +33,13 @@ import * as smartssh from '@push.rocks/smartssh';
|
|
|
33
33
|
import * as smartstring from '@push.rocks/smartstring';
|
|
34
34
|
|
|
35
35
|
export {
|
|
36
|
-
npmextra,
|
|
37
36
|
projectinfo,
|
|
38
37
|
qenv,
|
|
39
38
|
smartanalytics,
|
|
39
|
+
smartcli,
|
|
40
|
+
smartconfig,
|
|
40
41
|
smartfile,
|
|
41
42
|
smartgit,
|
|
42
|
-
smartcli,
|
|
43
43
|
smartlog,
|
|
44
44
|
smartlogDestinationLocal,
|
|
45
45
|
smartobject,
|
|
@@ -56,5 +56,3 @@ export {
|
|
|
56
56
|
import * as tsclass from '@tsclass/tsclass';
|
|
57
57
|
|
|
58
58
|
export { tsclass };
|
|
59
|
-
|
|
60
|
-
|