@flighthq/shell 0.5.1-next.658.9cb44d7 → 0.5.1-next.685.f72fc7f

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @flighthq/shell
2
2
 
3
- OS shell commands over six explicit Host capability slots with required external URL policy
3
+ OS shell commands over seven explicit Host capability slots with required external URL policy
4
4
 
5
5
  ## Install
6
6
 
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/shell`. The `@flight
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/shell@0.5.1-next.658.9cb44d7](https://github.com/flighthq/flight/tree/9cb44d76b981adad2503d5e62207be99adb35c55/packages/shell)
17
- - [License](https://github.com/flighthq/flight/blob/9cb44d76b981adad2503d5e62207be99adb35c55/LICENSE.md)
16
+ - [Source for @flighthq/shell@0.5.1-next.685.f72fc7f](https://github.com/flighthq/flight/tree/f72fc7feaa9653d950f39c7d2fe6365f48e82e51/packages/shell)
17
+ - [License](https://github.com/flighthq/flight/blob/f72fc7feaa9653d950f39c7d2fe6365f48e82e51/LICENSE.md)
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { isShellUrlAllowed, moveShellItemToTrash, moveShellItemsToTrash, openShellExternalUrl, openShellPath, readShellShortcutLink, revealShellPath, shellBeep, writeShellShortcutLink, } from './contract';
1
+ export { isShellUrlAllowed, moveShellItemToTrash, moveShellItemsToTrash, openShellExternalUrl, openShellPath, readShellShortcutLink, revealShellPath, shellBeep, spawnShellProcess, writeShellShortcutLink, } from './contract';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,SAAS,EACT,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { isShellUrlAllowed, moveShellItemToTrash, moveShellItemsToTrash, openShellExternalUrl, openShellPath, readShellShortcutLink, revealShellPath, shellBeep, writeShellShortcutLink, } from './contract';
1
+ export { isShellUrlAllowed, moveShellItemToTrash, moveShellItemsToTrash, openShellExternalUrl, openShellPath, readShellShortcutLink, revealShellPath, shellBeep, spawnShellProcess, writeShellShortcutLink, } from './contract';
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,SAAS,EACT,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
package/dist/shell.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { HasShellBeep, HasShellExternal, HasShellPathOpen, HasShellPathReveal, HasShellShortcutLink, HasShellTrash, ShellExternalOutcome, ShellExternalUrlPolicy, ShellPathOpenOutcome, ShellPathRevealOutcome, ShellShortcutLink, ShellShortcutLinkReadOutcome, ShellShortcutLinkWriteOutcome, ShellShortcutWriteOperation, ShellTrashOutcome } from '@flighthq/types/contract';
1
+ import type { HasShellBeep, HasShellExternal, HasShellPathOpen, HasShellPathReveal, HasShellShortcutLink, HasShellTrash, ShellExternalOutcome, ShellExternalUrlPolicy, ShellPathOpenOutcome, ShellPathRevealOutcome, ShellProcess, ShellProcessHost, ShellProcessOptions, ShellShortcutLink, ShellShortcutLinkReadOutcome, ShellShortcutLinkWriteOutcome, ShellShortcutWriteOperation, ShellTrashOutcome } from '@flighthq/types/contract';
2
2
  export declare function isShellUrlAllowed(url: string, policy: Readonly<ShellExternalUrlPolicy>): boolean;
3
3
  export declare function moveShellItemsToTrash(host: HasShellTrash, paths: readonly string[]): Promise<readonly ShellTrashOutcome[]>;
4
4
  export declare function moveShellItemToTrash(host: HasShellTrash, path: string): Promise<ShellTrashOutcome>;
@@ -7,5 +7,6 @@ export declare function openShellPath(host: HasShellPathOpen, path: string): Pro
7
7
  export declare function readShellShortcutLink(host: HasShellShortcutLink, shortcutPath: string): Promise<ShellShortcutLinkReadOutcome>;
8
8
  export declare function revealShellPath(host: HasShellPathReveal, path: string): Promise<ShellPathRevealOutcome>;
9
9
  export declare function shellBeep(host: HasShellBeep): void;
10
+ export declare function spawnShellProcess(host: ShellProcessHost, command: string, args: readonly string[], options?: Readonly<ShellProcessOptions>): ShellProcess | null;
10
11
  export declare function writeShellShortcutLink(host: HasShellShortcutLink, shortcutPath: string, link: Readonly<ShellShortcutLink>, operation: ShellShortcutWriteOperation): Promise<ShellShortcutLinkWriteOutcome>;
11
12
  //# sourceMappingURL=shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,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kB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAEvG;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAElD;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GACtC,YAAY,GAAG,IAAI,CAErB;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,EAC1B,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,QAAQ,CAAC,iBAAiB,CAAC,EACjC,SAAS,EAAE,2BAA2B,GACrC,OAAO,CAAC,6BAA6B,CAAC,CAExC"}
package/dist/shell.js CHANGED
@@ -37,6 +37,9 @@ export function revealShellPath(host, path) {
37
37
  export function shellBeep(host) {
38
38
  host.shell.beep.beep();
39
39
  }
40
+ export function spawnShellProcess(host, command, args, options) {
41
+ return host.shell.process?.spawn(command, args, options) ?? null;
42
+ }
40
43
  export function writeShellShortcutLink(host, shortcutPath, link, operation) {
41
44
  return host.shell.shortcutLink.write(shortcutPath, link, operation);
42
45
  }
package/dist/shell.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"shell.js","sourceRoot":"","sources":["../src/shell.ts"],"names":[],"mappings":"AAkBA,sGAAsG;AACtG,4FAA4F;AAC5F,MAAM,UAAU,iBAAiB,CAAC,GAAW,EAAE,MAAwC;IACrF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QACrE,OAAO,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,CAAC;IACn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CAAC;AACtE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/shell",
3
- "version": "0.5.1-next.658.9cb44d7",
3
+ "version": "0.5.1-next.685.f72fc7f",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,12 +38,12 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/types": "0.5.1-next.658.9cb44d7"
41
+ "@flighthq/types": "0.5.1-next.685.f72fc7f"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@flighthq/entity": "*",
45
45
  "typescript": "^5.3.0"
46
46
  },
47
- "description": "OS shell commands over six explicit Host capability slots with required external URL policy",
47
+ "description": "OS shell commands over seven explicit Host capability slots with required external URL policy",
48
48
  "sideEffects": false
49
49
  }
package/src/shell.test.ts CHANGED
@@ -12,6 +12,10 @@ import type {
12
12
  ShellExternalUrlPolicy,
13
13
  ShellPathOpenBackend,
14
14
  ShellPathRevealBackend,
15
+ ShellProcess,
16
+ ShellProcessBackend,
17
+ ShellProcessHost,
18
+ ShellProcessOptions,
15
19
  ShellShortcutLinkBackend,
16
20
  ShellTrashBackend,
17
21
  } from '@flighthq/types/contract';
@@ -25,6 +29,7 @@ import {
25
29
  readShellShortcutLink,
26
30
  revealShellPath,
27
31
  shellBeep,
32
+ spawnShellProcess,
28
33
  writeShellShortcutLink,
29
34
  } from './shell';
30
35
 
@@ -160,6 +165,30 @@ describe('shellBeep', () => {
160
165
  });
161
166
  });
162
167
 
168
+ describe('spawnShellProcess', () => {
169
+ it('exposes the explicit host, command, argument-vector, and optional-options API', () => {
170
+ expectTypeOf(spawnShellProcess).parameters.toEqualTypeOf<
171
+ [ShellProcessHost, string, readonly string[], Readonly<ShellProcessOptions>?]
172
+ >();
173
+ expectTypeOf(spawnShellProcess).returns.toEqualTypeOf<ShellProcess | null>();
174
+ });
175
+
176
+ it('forwards the command, argument vector, and options to the host backend unchanged', () => {
177
+ const process = shellProcess();
178
+ const spawn = vi.fn(() => process);
179
+ const host = processHost(createEntity({ spawn }));
180
+ const args = ['--flag', 'value'] as const;
181
+ const options = { cwd: '/work', environment: { MODE: 'test' } } as const;
182
+
183
+ expect(spawnShellProcess(host, '/bin/tool', args, options)).toBe(process);
184
+ expect(spawn).toHaveBeenCalledWith('/bin/tool', args, options);
185
+ });
186
+
187
+ it('returns null when the host does not expose child-process support', () => {
188
+ expect(spawnShellProcess({ shell: {} }, '/bin/tool', [])).toBeNull();
189
+ });
190
+ });
191
+
163
192
  describe('writeShellShortcutLink', () => {
164
193
  it('requires an explicit write operation and returns the write-specific outcome', async () => {
165
194
  const provider = shortcutLinkProvider();
@@ -188,6 +217,20 @@ function pathRevealHost(pathReveal: ShellPathRevealBackend): HasShellPathReveal
188
217
  return { shell: { pathReveal } };
189
218
  }
190
219
 
220
+ function processHost(process: ShellProcessBackend): ShellProcessHost {
221
+ return { shell: { process } };
222
+ }
223
+
224
+ function shellProcess(): ShellProcess {
225
+ return createEntity({
226
+ exit: Promise.resolve({ code: 0, signal: null }),
227
+ stderr: new ReadableStream<Uint8Array>(),
228
+ stdin: new WritableStream<Uint8Array>(),
229
+ stdout: new ReadableStream<Uint8Array>(),
230
+ terminate: vi.fn(),
231
+ });
232
+ }
233
+
191
234
  function shortcutLinkHost(shortcutLink: ShellShortcutLinkBackend): HasShellShortcutLink {
192
235
  return { shell: { shortcutLink } };
193
236
  }