build-strap 5.1.0 → 5.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "build-strap",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Node scripts for building things",
5
5
  "license": "MIT",
6
6
  "authors": [
package/src/orbstack.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export declare const ensureOrbStackInstalled: () => Promise<void>;
1
+ import { SpawnOptions, SpawnResult } from './cp';
2
+ export declare const ensureOrbStackInstalled: (options?: SpawnOptions) => Promise<SpawnResult | null>;
2
3
  export declare const ensureOrbStackRunning: (timeoutSeconds?: number) => Promise<void>;
3
4
  export declare const ensureOrbStackConfigured: (desiredConfig?: null | Record<string, unknown>) => Promise<void>;
package/src/orbstack.js CHANGED
@@ -6,13 +6,14 @@ import { spawn } from './cp';
6
6
  import { dockerIsRunning } from './docker';
7
7
  import { cmdExists, isMac } from './env';
8
8
  import { buildLog } from './run';
9
- export const ensureOrbStackInstalled = async () => {
9
+ export const ensureOrbStackInstalled = async (options) => {
10
10
  if (!isMac()) {
11
11
  throw new Error('OrbStack is only supported on macOS');
12
12
  }
13
13
  if (!(await cmdExists('orb'))) {
14
- await brew(['install', 'orbstack']);
14
+ return brew(['install', 'orbstack'], options);
15
15
  }
16
+ return null;
16
17
  };
17
18
  export const ensureOrbStackRunning = async (timeoutSeconds = 600) => {
18
19
  if (!(await dockerIsRunning())) {