start-command 0.19.0 → 0.20.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/CHANGELOG.md +37 -0
- package/package.json +1 -1
- package/src/bin/cli.js +4 -3
- package/test/cli.test.js +94 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# start-command
|
|
2
2
|
|
|
3
|
+
## 0.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ad9e796: feat: Rename spine to timeline, add virtual command visualization for Docker
|
|
8
|
+
|
|
9
|
+
This release updates the internal terminology from "spine" to "timeline" for the status output format, and adds automatic visualization of Docker image pull operations as virtual commands.
|
|
10
|
+
|
|
11
|
+
Timeline terminology changes:
|
|
12
|
+
- The `│` prefixed output format is now consistently referred to as "timeline" format throughout the codebase
|
|
13
|
+
- All deprecated "spine" names remain available for backwards compatibility
|
|
14
|
+
- API changes are reflected in the Rust library (no breaking changes in JS)
|
|
15
|
+
|
|
16
|
+
Virtual command visualization for Docker:
|
|
17
|
+
- When Docker isolation requires pulling an image, it now appears as a separate `$ docker pull <image>` command
|
|
18
|
+
- Pull output is streamed in real-time with success (✓) or failure (✗) markers
|
|
19
|
+
- Only shown when the image actually needs to be pulled (not when using cached images)
|
|
20
|
+
- Provides better visibility into what's happening during Docker-based command execution
|
|
21
|
+
|
|
22
|
+
Version bumped to 0.20.0 to match the Rust library version.
|
|
23
|
+
|
|
24
|
+
Fixes #70
|
|
25
|
+
|
|
26
|
+
## 0.19.1
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- c84c1bb: fix: Always display session/container name in isolation output
|
|
31
|
+
|
|
32
|
+
When using isolation backends (screen, docker, tmux), the output now shows the actual session/container name that users need to reconnect to sessions, especially in detached mode. Previously, only the session UUID was shown, but users need the actual backend name to:
|
|
33
|
+
- Reconnect to detached screen sessions: `screen -r <name>`
|
|
34
|
+
- Attach to tmux sessions: `tmux attach -t <name>`
|
|
35
|
+
- View Docker container logs: `docker logs <name>`
|
|
36
|
+
- Remove containers: `docker rm -f <name>`
|
|
37
|
+
|
|
38
|
+
Fixes #67
|
|
39
|
+
|
|
3
40
|
## 0.19.0
|
|
4
41
|
|
|
5
42
|
### Minor Changes
|
package/package.json
CHANGED
package/src/bin/cli.js
CHANGED
|
@@ -470,9 +470,10 @@ async function runWithIsolation(
|
|
|
470
470
|
// Add isolation info to extra lines
|
|
471
471
|
if (environment) {
|
|
472
472
|
extraLines.push(`[Isolation] Environment: ${environment}, Mode: ${mode}`);
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
473
|
+
// Always add the session name so users can reconnect to detached sessions
|
|
474
|
+
// This is important for screen, tmux, docker where the session/container name
|
|
475
|
+
// is different from the session UUID used for tracking (see issue #67)
|
|
476
|
+
extraLines.push(`[Isolation] Session: ${sessionName}`);
|
|
476
477
|
}
|
|
477
478
|
if (effectiveImage) {
|
|
478
479
|
extraLines.push(`[Isolation] Image: ${effectiveImage}`);
|
package/test/cli.test.js
CHANGED
|
@@ -122,3 +122,97 @@ describe('CLI basic behavior', () => {
|
|
|
122
122
|
assert.ok(result.stdout.includes('Usage:'), 'Should display usage');
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
|
+
|
|
126
|
+
describe('CLI isolation output (issue #67)', () => {
|
|
127
|
+
const { isCommandAvailable } = require('../src/lib/isolation');
|
|
128
|
+
|
|
129
|
+
it('should display screen session name when using screen isolation', async () => {
|
|
130
|
+
if (!isCommandAvailable('screen')) {
|
|
131
|
+
console.log(' Skipping: screen not installed');
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const result = runCLI(['-i', 'screen', '--', 'echo', 'hello']);
|
|
136
|
+
|
|
137
|
+
// The output should contain the screen session name (in format screen-timestamp-random)
|
|
138
|
+
// Check that the session UUID is displayed
|
|
139
|
+
assert.ok(
|
|
140
|
+
result.stdout.includes('│ session'),
|
|
141
|
+
'Should display session UUID'
|
|
142
|
+
);
|
|
143
|
+
// Check that screen isolation info is displayed
|
|
144
|
+
assert.ok(
|
|
145
|
+
result.stdout.includes('│ isolation screen'),
|
|
146
|
+
'Should display screen isolation'
|
|
147
|
+
);
|
|
148
|
+
// Check that the actual screen session name is displayed (issue #67 fix)
|
|
149
|
+
assert.ok(
|
|
150
|
+
result.stdout.includes('│ screen screen-'),
|
|
151
|
+
'Should display actual screen session name for reconnection (issue #67)'
|
|
152
|
+
);
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it('should display tmux session name when using tmux isolation', async () => {
|
|
156
|
+
if (!isCommandAvailable('tmux')) {
|
|
157
|
+
console.log(' Skipping: tmux not installed');
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const result = runCLI(['-i', 'tmux', '--', 'echo', 'hello']);
|
|
162
|
+
|
|
163
|
+
// The output should contain the tmux session name
|
|
164
|
+
assert.ok(
|
|
165
|
+
result.stdout.includes('│ session'),
|
|
166
|
+
'Should display session UUID'
|
|
167
|
+
);
|
|
168
|
+
assert.ok(
|
|
169
|
+
result.stdout.includes('│ isolation tmux'),
|
|
170
|
+
'Should display tmux isolation'
|
|
171
|
+
);
|
|
172
|
+
// Check that the actual tmux session name is displayed (issue #67 fix)
|
|
173
|
+
assert.ok(
|
|
174
|
+
result.stdout.includes('│ tmux tmux-'),
|
|
175
|
+
'Should display actual tmux session name for reconnection (issue #67)'
|
|
176
|
+
);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('should display docker container name when using docker isolation', async () => {
|
|
180
|
+
const { canRunLinuxDockerImages } = require('../src/lib/isolation');
|
|
181
|
+
|
|
182
|
+
if (!canRunLinuxDockerImages()) {
|
|
183
|
+
console.log(
|
|
184
|
+
' Skipping: docker not available or cannot run Linux images'
|
|
185
|
+
);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const result = runCLI([
|
|
190
|
+
'-i',
|
|
191
|
+
'docker',
|
|
192
|
+
'--image',
|
|
193
|
+
'alpine:latest',
|
|
194
|
+
'--',
|
|
195
|
+
'echo',
|
|
196
|
+
'hello',
|
|
197
|
+
]);
|
|
198
|
+
|
|
199
|
+
// The output should contain the docker container name
|
|
200
|
+
assert.ok(
|
|
201
|
+
result.stdout.includes('│ session'),
|
|
202
|
+
'Should display session UUID'
|
|
203
|
+
);
|
|
204
|
+
assert.ok(
|
|
205
|
+
result.stdout.includes('│ isolation docker'),
|
|
206
|
+
'Should display docker isolation'
|
|
207
|
+
);
|
|
208
|
+
assert.ok(
|
|
209
|
+
result.stdout.includes('│ image alpine:latest'),
|
|
210
|
+
'Should display docker image'
|
|
211
|
+
);
|
|
212
|
+
// Check that the actual container name is displayed (issue #67 fix)
|
|
213
|
+
assert.ok(
|
|
214
|
+
result.stdout.includes('│ container docker-'),
|
|
215
|
+
'Should display actual container name for reconnection (issue #67)'
|
|
216
|
+
);
|
|
217
|
+
});
|
|
218
|
+
});
|