brigadestack 0.0.0-stage → 0.31.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/LICENSE +21 -0
- package/README.md +46 -2
- package/launcher.cjs +60 -0
- package/package.json +33 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Solomon Neas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Brigade Stack
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`brigadestack@0.31.0` installs stable `@escoffier-labs/brigade@0.31.0` and adds
|
|
4
|
+
the `brigadestack` command. Existing packages and the `brigade` command remain
|
|
5
|
+
supported. This package exposes only `brigadestack`, so installing it globally
|
|
6
|
+
leaves an existing global `brigade` executable in place.
|
|
7
|
+
|
|
8
|
+
Requires Node.js 22.15 or newer in the 22.x line, or Node.js 23.11 or newer.
|
|
9
|
+
Keep optional dependencies enabled: the stable
|
|
10
|
+
dependency needs its platform runtime package. Its first launch provisions managed
|
|
11
|
+
Python and may need network access. Supported runtimes are Linux with glibc
|
|
12
|
+
(x64 or arm64), macOS (x64 or arm64), and Windows x64.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm install --global brigadestack@0.31.0
|
|
16
|
+
brigadestack --version
|
|
17
|
+
brigadestack --help
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
For a project-local install:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install brigadestack@0.31.0
|
|
24
|
+
npm exec -- brigadestack --help
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For a one-off invocation:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
npm exec --yes --package=brigadestack@0.31.0 -- brigadestack --version
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The launcher resolves its installed dependency independently of your working
|
|
34
|
+
directory and `PATH`, then runs it with the current Node executable. Arguments,
|
|
35
|
+
standard streams, environment, working directory, and CLI exit status pass through.
|
|
36
|
+
On POSIX, `process.execve` replaces the bridge with the dependency, preserving
|
|
37
|
+
its PID, process group, controlling terminal, and shell job control. The dependency
|
|
38
|
+
receives signals directly and owns runtime cleanup. On Windows, an attached child
|
|
39
|
+
inherits the console and receives console events directly.
|
|
40
|
+
|
|
41
|
+
The CLI reports Brigade 0.31.0. Commands, Python imports, workspace files, and
|
|
42
|
+
storage formats keep their existing identities.
|
|
43
|
+
|
|
44
|
+
[Homepage](https://brigade.tools) |
|
|
45
|
+
[Documentation](https://brigade.tools/docs) |
|
|
46
|
+
[Source](https://github.com/escoffier-labs/brigade/tree/main/distribution/brigadestack/npm) |
|
|
47
|
+
[Issues](https://github.com/escoffier-labs/brigade/issues)
|
package/launcher.cjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
const { spawn } = require('node:child_process');
|
|
4
|
+
const { constants } = require('node:os');
|
|
5
|
+
|
|
6
|
+
let launcher;
|
|
7
|
+
try {
|
|
8
|
+
launcher = require.resolve('@escoffier-labs/brigade/launcher.cjs');
|
|
9
|
+
} catch (error) {
|
|
10
|
+
console.error(`brigadestack: could not resolve dependency. Reinstall brigadestack with dependencies enabled. ${error.message}`);
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (process.platform !== 'win32') {
|
|
16
|
+
if (typeof process.execve !== 'function') {
|
|
17
|
+
console.error(`brigadestack: process replacement requires Node.js ^22.15.0 || >=23.11.0 with process.execve available (running ${process.version}).`);
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
} else {
|
|
20
|
+
try {
|
|
21
|
+
// Replace the bridge, preserving its PID, process group and controlling tty.
|
|
22
|
+
process.execve(process.execPath, [process.execPath, launcher, ...process.argv.slice(2)], process.env);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.error(`brigadestack: could not replace process: ${error.message}`);
|
|
25
|
+
process.exitCode = 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
try {
|
|
30
|
+
const child = spawn(process.execPath, [launcher, ...process.argv.slice(2)], {
|
|
31
|
+
stdio: 'inherit', shell: false,
|
|
32
|
+
});
|
|
33
|
+
const handlers = new Map();
|
|
34
|
+
for (const signal of ['SIGINT', 'SIGBREAK', 'SIGTERM', 'SIGHUP']) {
|
|
35
|
+
const handler = () => {
|
|
36
|
+
// Attached console events already reach the dependency. Only a direct
|
|
37
|
+
// SIGTERM needs forwarding from the bridge to its child.
|
|
38
|
+
if (signal !== 'SIGTERM') return;
|
|
39
|
+
if (child.exitCode === null && child.signalCode === null) child.kill(signal);
|
|
40
|
+
};
|
|
41
|
+
handlers.set(signal, handler);
|
|
42
|
+
process.on(signal, handler);
|
|
43
|
+
}
|
|
44
|
+
function cleanup() {
|
|
45
|
+
for (const [signal, handler] of handlers) process.removeListener(signal, handler);
|
|
46
|
+
}
|
|
47
|
+
child.once('error', error => {
|
|
48
|
+
cleanup();
|
|
49
|
+
console.error(`brigadestack: could not spawn dependency: ${error.message}`);
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
});
|
|
52
|
+
child.once('exit', (code, signal) => {
|
|
53
|
+
cleanup();
|
|
54
|
+
process.exitCode = code !== null ? code : 128 + (constants.signals[signal] || 1);
|
|
55
|
+
});
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error(`brigadestack: could not spawn dependency: ${error.message}`);
|
|
58
|
+
process.exitCode = 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brigadestack",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.31.0",
|
|
4
|
+
"description": "Brigade Stack command alias for the stable Brigade CLI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^22.15.0 || >=23.11.0"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"brigadestack": "launcher.cjs"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"launcher.cjs",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@escoffier-labs/brigade": "0.31.0"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "node --test launcher.test.cjs"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://brigadestack.com",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/escoffier-labs/brigade/issues"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/escoffier-labs/brigade.git",
|
|
30
|
+
"directory": "distribution/brigadestack/npm"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
}
|
|
35
|
+
}
|