start-command 0.11.0 → 0.13.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/.github/workflows/release.yml +18 -0
- package/CHANGELOG.md +14 -0
- package/bun.lock +5 -0
- package/experiments/test-command-stream-cjs.cjs +30 -0
- package/experiments/test-command-stream-wrapper.js +54 -0
- package/experiments/test-command-stream.mjs +56 -0
- package/package.json +4 -1
- package/src/bin/cli.js +167 -390
- package/src/lib/args-parser.js +8 -0
- package/src/lib/command-stream.js +258 -0
- package/src/lib/failure-handler.js +397 -0
- package/test/args-parser.test.js +33 -0
package/test/args-parser.test.js
CHANGED
|
@@ -708,6 +708,39 @@ describe('user isolation option', () => {
|
|
|
708
708
|
});
|
|
709
709
|
});
|
|
710
710
|
|
|
711
|
+
describe('use-command-stream option', () => {
|
|
712
|
+
it('should parse --use-command-stream flag', () => {
|
|
713
|
+
const result = parseArgs(['--use-command-stream', '--', 'npm', 'test']);
|
|
714
|
+
assert.strictEqual(result.wrapperOptions.useCommandStream, true);
|
|
715
|
+
assert.strictEqual(result.command, 'npm test');
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
it('should default useCommandStream to false', () => {
|
|
719
|
+
const result = parseArgs(['npm', 'test']);
|
|
720
|
+
assert.strictEqual(result.wrapperOptions.useCommandStream, false);
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
it('should work with other options', () => {
|
|
724
|
+
const result = parseArgs([
|
|
725
|
+
'-i',
|
|
726
|
+
'screen',
|
|
727
|
+
'--use-command-stream',
|
|
728
|
+
'--',
|
|
729
|
+
'npm',
|
|
730
|
+
'test',
|
|
731
|
+
]);
|
|
732
|
+
assert.strictEqual(result.wrapperOptions.isolated, 'screen');
|
|
733
|
+
assert.strictEqual(result.wrapperOptions.useCommandStream, true);
|
|
734
|
+
assert.strictEqual(result.command, 'npm test');
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
it('should work without other options', () => {
|
|
738
|
+
const result = parseArgs(['--use-command-stream', 'echo', 'hello']);
|
|
739
|
+
assert.strictEqual(result.wrapperOptions.useCommandStream, true);
|
|
740
|
+
assert.strictEqual(result.command, 'echo hello');
|
|
741
|
+
});
|
|
742
|
+
});
|
|
743
|
+
|
|
711
744
|
describe('keep-user option', () => {
|
|
712
745
|
it('should parse --keep-user flag', () => {
|
|
713
746
|
const result = parseArgs([
|