tenant-emit 0.2.0 → 0.2.1

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/bin/tenant-emit.js +11 -3
  2. package/package.json +9 -9
@@ -11,6 +11,7 @@
11
11
  // source if the launcher contract changes.
12
12
 
13
13
  const { execFileSync } = require('node:child_process');
14
+ const os = require('node:os');
14
15
  const { resolveBinaryPath } = require('../lib/platform.js');
15
16
 
16
17
  let binPath;
@@ -24,13 +25,20 @@ try {
24
25
  try {
25
26
  execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
26
27
  } catch (err) {
27
- if (typeof err.status === 'number') {
28
- process.exit(err.status); // forward the binary's own exit code
29
- }
28
+ // Signal termination (SIGINT/SIGSEGV/...) leaves err.status === null and
29
+ // err.signal set to the signal name: forward it as 128 + signal number, the
30
+ // shell convention (Ctrl-C -> 130), instead of flattening it to exit 1.
30
31
  if (err.signal) {
32
+ const signalNum = os.constants.signals[err.signal];
33
+ if (typeof signalNum === 'number') {
34
+ process.exit(128 + signalNum);
35
+ }
31
36
  process.stderr.write(`tenant-emit: binary terminated by signal ${err.signal}\n`);
32
37
  process.exit(1);
33
38
  }
39
+ if (typeof err.status === 'number') {
40
+ process.exit(err.status); // forward the binary's own exit code
41
+ }
34
42
  process.stderr.write(`tenant-emit: failed to run binary: ${err.message}\n`);
35
43
  process.exit(1);
36
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tenant-emit",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "The tenant-emit CLI: an emit-only toolkit that produces a factory's run-side governance certificate (build-certificate) with no trust handed to the producer beyond the operator key it signs with. Ships the prebuilt binary; no Rust toolchain required.",
5
5
  "keywords": [
6
6
  "governance",
@@ -12,14 +12,14 @@
12
12
  "rust",
13
13
  "tenant"
14
14
  ],
15
- "homepage": "https://github.com/bartekus/tenant-emit#readme",
15
+ "homepage": "https://github.com/stagecraft-ing/tenant-emit#readme",
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "git+https://github.com/bartekus/tenant-emit.git",
18
+ "url": "git+https://github.com/stagecraft-ing/tenant-emit.git",
19
19
  "directory": "npm"
20
20
  },
21
21
  "bugs": {
22
- "url": "https://github.com/bartekus/tenant-emit/issues"
22
+ "url": "https://github.com/stagecraft-ing/tenant-emit/issues"
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "author": "The tenant-emit Authors",
@@ -42,11 +42,11 @@
42
42
  "smoke": "scripts/smoke-test.sh"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@tenant-emit/cli-darwin-arm64": "0.2.0",
46
- "@tenant-emit/cli-darwin-x64": "0.2.0",
47
- "@tenant-emit/cli-linux-x64": "0.2.0",
48
- "@tenant-emit/cli-linux-arm64": "0.2.0",
49
- "@tenant-emit/cli-win32-x64": "0.2.0"
45
+ "@tenant-emit/cli-darwin-arm64": "0.2.1",
46
+ "@tenant-emit/cli-darwin-x64": "0.2.1",
47
+ "@tenant-emit/cli-linux-x64": "0.2.1",
48
+ "@tenant-emit/cli-linux-arm64": "0.2.1",
49
+ "@tenant-emit/cli-win32-x64": "0.2.1"
50
50
  },
51
51
  "tenant-emit": {
52
52
  "spec": "002-distribution"