@hype-stack/cli 1.4.6 → 1.5.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/dist/{cli-BeT09qbv.js → cli-DkPX-eLF.js} +2449 -2257
- package/dist/commands/compose.d.ts +1 -8
- package/dist/commands/compose.d.ts.map +1 -1
- package/dist/commands/template.d.ts.map +1 -1
- package/dist/config/bin.js +1 -1
- package/dist/core/codegen.d.ts +4 -1
- package/dist/core/codegen.d.ts.map +1 -1
- package/dist/core/pack-categories.d.ts +2 -0
- package/dist/core/pack-categories.d.ts.map +1 -1
- package/dist/core/pack-slots.d.ts +30 -0
- package/dist/core/pack-slots.d.ts.map +1 -0
- package/dist/core/ports.d.ts +64 -0
- package/dist/core/ports.d.ts.map +1 -0
- package/dist/core/post-setup.d.ts +21 -2
- package/dist/core/post-setup.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComposeOptions, PackListItem, PackSelection
|
|
1
|
+
import { ComposeOptions, PackListItem, PackSelection } from '../types/types.js';
|
|
2
2
|
export declare function composeCommand(options?: ComposeOptions): Promise<void>;
|
|
3
3
|
/**
|
|
4
4
|
* Names of layout packs pinned to the admin slot that the admin app can't render. A layout is
|
|
@@ -13,11 +13,4 @@ export declare function findIncompatibleAdminLayouts(selection: PackSelection[],
|
|
|
13
13
|
* installs without a slot, which preserves the pre-slot behavior of installing every file.
|
|
14
14
|
*/
|
|
15
15
|
export declare function parsePackSelectionArg(raw: string): PackSelection;
|
|
16
|
-
/** Deduplicate selected pack names, preserving the first-seen order for the install plan. */
|
|
17
|
-
export declare function uniqueNames(selection: PackSelection[]): string[];
|
|
18
|
-
/**
|
|
19
|
-
* Build the per-pack slot map from the selection. Packs without a slot are left out so the
|
|
20
|
-
* installer treats them as install-everything. A layout pack picked for both slots gets both.
|
|
21
|
-
*/
|
|
22
|
-
export declare function buildSlotsByPack(selection: PackSelection[]): SlotsByPack;
|
|
23
16
|
//# sourceMappingURL=compose.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAqB3B,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8RhF;AA0HD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAUxG;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAIhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAIV,sBAAsB,EAGvB,MAAM,mBAAmB,CAAC;AAoB3B;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAwYzF"}
|
package/dist/config/bin.js
CHANGED
package/dist/core/codegen.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export type CodegenCommandRunner = (command: string, args: string[], options: {
|
|
|
13
13
|
* `prisma migrate dev` then creates + applies the initial migration. Anything
|
|
14
14
|
* that can't run (declined, no backend, no database) falls back to printed
|
|
15
15
|
* instructions instead of failing the install.
|
|
16
|
+
*
|
|
17
|
+
* Returns true only when `migrate dev` applied the schema, so callers know the
|
|
18
|
+
* migrations exist on disk and can mirror them into the test database.
|
|
16
19
|
*/
|
|
17
20
|
export declare function promptPackCodegen(options: {
|
|
18
21
|
projectRoot: string;
|
|
@@ -25,5 +28,5 @@ export declare function promptPackCodegen(options: {
|
|
|
25
28
|
runCommand?: CodegenCommandRunner;
|
|
26
29
|
/** Captured runner for the read-only reachability probe. Defaults to a real, output-capturing exec. */
|
|
27
30
|
probeCommand?: CodegenCommandRunner;
|
|
28
|
-
}): Promise<
|
|
31
|
+
}): Promise<boolean>;
|
|
29
32
|
//# sourceMappingURL=codegen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/core/codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/core/codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AA2CtH;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,uGAAuG;IACvG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sGAAsG;IACtG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,uGAAuG;IACvG,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC,GAAG,OAAO,CAAC,OAAO,CAAC,CA0GnB"}
|
|
@@ -20,6 +20,8 @@ export interface PackChoiceGroup {
|
|
|
20
20
|
}
|
|
21
21
|
/** Fixed order the picker walks the modules in: foundation first, then shell, then add-ons. */
|
|
22
22
|
export declare const CATEGORY_ORDER: PackCategory[];
|
|
23
|
+
/** The layout that should be highlighted by default, and the admin app's fallback shell. */
|
|
24
|
+
export declare const DEFAULT_LAYOUT = "layout-basic";
|
|
23
25
|
export interface BuildPackChoiceGroupsOptions {
|
|
24
26
|
/**
|
|
25
27
|
* Whether the project has an `apps/admin` to install a layout into. When true and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack-categories.d.ts","sourceRoot":"","sources":["../../src/core/pack-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE9E,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,IAAI,EAAE,UAAU,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,+FAA+F;AAC/F,eAAO,MAAM,cAAc,EAAE,YAAY,EAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"pack-categories.d.ts","sourceRoot":"","sources":["../../src/core/pack-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE9E,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,IAAI,EAAE,UAAU,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,+FAA+F;AAC/F,eAAO,MAAM,cAAc,EAAE,YAAY,EAAqC,CAAC;AAc/E,4FAA4F;AAC5F,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAE7C,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,YAAY,EAAE,EAC1B,OAAO,GAAE,4BAAiC,GACzC,eAAe,EAAE,CAgCnB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PackListItem, PackSelection, SlotsByPack } from '../types/types.js';
|
|
2
|
+
/** Deduplicate selected pack names, preserving the first-seen order for the install plan. */
|
|
3
|
+
export declare function uniqueNames(selection: PackSelection[]): string[];
|
|
4
|
+
/**
|
|
5
|
+
* Build the per-pack slot map from the selection. Packs without a slot are left out so the
|
|
6
|
+
* installer treats them as install-everything. A layout pack picked for both slots gets both.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildSlotsByPack(selection: PackSelection[]): SlotsByPack;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve which app shells each selected layout installs into.
|
|
11
|
+
*
|
|
12
|
+
* Without a slot, a layout installs its admin-slotted files into any project that has an
|
|
13
|
+
* `apps/admin`. That's right for a layout the admin app can mount and wrong for one it
|
|
14
|
+
* can't: `compose --packs layout-native-app-shell` would write a frontend-only shell into
|
|
15
|
+
* the admin app, which then fails to compile against modules that only exist on the
|
|
16
|
+
* frontend. So an admin-incompatible layout gets pinned to the frontend, and the admin
|
|
17
|
+
* app picks up {@link DEFAULT_LAYOUT} instead.
|
|
18
|
+
*
|
|
19
|
+
* The substitution only fires when nothing else already covers the admin slot: an explicit
|
|
20
|
+
* `@admin` pick, another admin-compatible layout in the same selection, or one installed by
|
|
21
|
+
* an earlier run. Leaving the admin app with no layout at all is not an option, since the
|
|
22
|
+
* starter's admin features import their shells (`components/layouts/shells/*`) from it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveLayoutSlots(args: {
|
|
25
|
+
selection: PackSelection[];
|
|
26
|
+
packs: PackListItem[];
|
|
27
|
+
hasAdminApp: boolean;
|
|
28
|
+
installed: string[];
|
|
29
|
+
}): PackSelection[];
|
|
30
|
+
//# sourceMappingURL=pack-slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-slots.d.ts","sourceRoot":"","sources":["../../src/core/pack-slots.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElF,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CAShE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,WAAW,CAYxE;AA0BD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,GAAG,aAAa,EAAE,CAoBlB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The template pins fixed host ports in both compose files, so a second Hype
|
|
3
|
+
* Stack project (or anything else squatting on 5436, 5434, etc.) makes
|
|
4
|
+
* `docker compose up` die with a bind error. Instead of telling the user to go
|
|
5
|
+
* free the port, this module finds every busy host port before a stack starts,
|
|
6
|
+
* picks the nearest free one, and rewrites the new number everywhere the
|
|
7
|
+
* project references it: the compose file itself, the matching env file, and
|
|
8
|
+
* the backend package.json test scripts that hardcode the test DATABASE_URL.
|
|
9
|
+
*/
|
|
10
|
+
export interface ComposePortMapping {
|
|
11
|
+
/** Compose service the mapping belongs to (e.g. "postgres-test"). */
|
|
12
|
+
service: string;
|
|
13
|
+
hostPort: number;
|
|
14
|
+
containerPort: number;
|
|
15
|
+
/** The exact text of the mapping as it appears in the file (e.g. `"5436:5432"`). */
|
|
16
|
+
raw: string;
|
|
17
|
+
}
|
|
18
|
+
export interface PortReassignment {
|
|
19
|
+
service: string;
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pull `HOST:CONTAINER` port mappings out of a compose file with a line scan.
|
|
25
|
+
* The CLI ships no YAML parser, and the two template compose files only use
|
|
26
|
+
* the short mapping syntax, so tracking the current top-level service key is
|
|
27
|
+
* enough. Quoted and unquoted forms are both accepted; container-internal
|
|
28
|
+
* ports (environment values, healthchecks) are never touched because only
|
|
29
|
+
* entries under a `ports:` block are considered.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseComposePortMappings(content: string): ComposePortMapping[];
|
|
32
|
+
/** Whether the host port can be bound right now. Probes all interfaces, the same bind Docker asks for. */
|
|
33
|
+
export declare function isPortFree(port: number): Promise<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Pick a replacement for a busy port: the nearest higher port that is free on
|
|
36
|
+
* the machine and not reserved by any other service in the project (including
|
|
37
|
+
* replacements already handed out in this run), so postgres never lands on the
|
|
38
|
+
* port valkey is about to move to.
|
|
39
|
+
*/
|
|
40
|
+
export declare function findFreePort(start: number, reserved: Set<number>): Promise<number>;
|
|
41
|
+
/** Replace the host side of the given compose port mappings, leaving container ports and everything else alone. */
|
|
42
|
+
export declare function rewriteComposeHostPorts(content: string, reassignments: PortReassignment[]): string;
|
|
43
|
+
/**
|
|
44
|
+
* Rewrite host-port references in an env-style or script file. Covers the
|
|
45
|
+
* three shapes the template uses: `localhost:5436` (URLs), `127.0.0.1:5436`,
|
|
46
|
+
* and `_PORT=5436` (plain port variables). Deliberately narrow so an unrelated
|
|
47
|
+
* number that happens to equal a port is never rewritten.
|
|
48
|
+
*/
|
|
49
|
+
export declare function rewritePortReferences(content: string, reassignments: PortReassignment[]): string;
|
|
50
|
+
export interface EnsureFreePortsResult {
|
|
51
|
+
reassignments: PortReassignment[];
|
|
52
|
+
/** Files (relative to apps/backend) that were rewritten. */
|
|
53
|
+
updatedFiles: string[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Make sure every host port a compose stack wants is actually free, and when
|
|
57
|
+
* one is taken, move the service to the nearest free port and rewrite the new
|
|
58
|
+
* number in the compose file and every project file that references it. Ports
|
|
59
|
+
* held by the stack's own already-running containers are left alone (the
|
|
60
|
+
* caller checks that); this only sees ports as busy when something else on the
|
|
61
|
+
* machine holds them. Returns what moved so the caller can tell the user.
|
|
62
|
+
*/
|
|
63
|
+
export declare function ensureFreeHostPorts(targetDir: string, composeFile: string): Promise<EnsureFreePortsResult>;
|
|
64
|
+
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../src/core/ports.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AAEH,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,EAAE,CA+C9E;AAED,0GAA0G;AAC1G,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASzD;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxF;AAED,mHAAmH;AACnH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAWlG;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAShG;AA+BD,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAsChH"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the CLI has. A tool call should not do either behind the user's back, so
|
|
4
4
|
* headless runs skip them and report the commands as follow-up steps instead.
|
|
5
5
|
*/
|
|
6
|
-
export declare const HEADLESS_SETUP_STEPS: readonly ["docker compose up -d", "pnpm --filter @internal/backend migration:latest"];
|
|
6
|
+
export declare const HEADLESS_SETUP_STEPS: readonly ["docker compose up -d", "pnpm --filter @internal/backend migration:latest", "pnpm --filter @internal/backend test:setup"];
|
|
7
7
|
export declare function isDockerRunning(): Promise<boolean>;
|
|
8
8
|
export declare function startDockerServices(targetDir: string, skipPrompts: boolean, dockerRunning: boolean): Promise<boolean>;
|
|
9
9
|
/**
|
|
@@ -13,7 +13,15 @@ export declare function startDockerServices(targetDir: string, skipPrompts: bool
|
|
|
13
13
|
* start. Both cases have the same fix: free the resource, then retry.
|
|
14
14
|
*/
|
|
15
15
|
export declare function classifyDockerConflict(output: string): "container" | "port" | null;
|
|
16
|
-
export
|
|
16
|
+
export interface WaitForPostgresOptions {
|
|
17
|
+
maxAttempts?: number;
|
|
18
|
+
intervalMs?: number;
|
|
19
|
+
/** Compose file to target (`-f`); defaults to the dev stack's default file. */
|
|
20
|
+
composeFile?: string;
|
|
21
|
+
/** Compose service to probe; defaults to the dev stack's `postgres`. */
|
|
22
|
+
service?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function waitForPostgres(targetDir: string, options?: WaitForPostgresOptions): Promise<boolean>;
|
|
17
25
|
export interface PostSetupOptions {
|
|
18
26
|
postgresCheckIntervalMs?: number;
|
|
19
27
|
postgresMaxAttempts?: number;
|
|
@@ -26,6 +34,15 @@ export interface PostSetupOptions {
|
|
|
26
34
|
export declare function areMigrationsApplied(targetDir: string): Promise<boolean>;
|
|
27
35
|
/** Apply pending migrations via the backend's `migration:latest` script. Returns success. */
|
|
28
36
|
export declare function runMigrations(targetDir: string): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Bring up the template's isolated test stack and prepare its database, so
|
|
39
|
+
* `pnpm test` passes right after the CLI finishes instead of failing until
|
|
40
|
+
* someone discovers `test:setup`. Piggybacks on the Docker consent the user
|
|
41
|
+
* already gave for the dev stack in the same run, so it never prompts on its
|
|
42
|
+
* own. Skipped silently when the project ships no test compose file. Failures
|
|
43
|
+
* warn and print the manual command; they never fail the install.
|
|
44
|
+
*/
|
|
45
|
+
export declare function setupTestDatabase(targetDir: string, options?: PostSetupOptions): Promise<boolean>;
|
|
29
46
|
/**
|
|
30
47
|
* Start Docker services (if the user agrees) and wait for Postgres to accept
|
|
31
48
|
* connections. Returns true when Postgres is ready, false when the user
|
|
@@ -36,6 +53,8 @@ export declare function startDockerAndWait(targetDir: string, skipPrompts: boole
|
|
|
36
53
|
* Start Docker + wait for Postgres, then offer to apply migrations. Used by
|
|
37
54
|
* `create` and `compose`, which always offer migrations regardless of current
|
|
38
55
|
* state. `onboard` does its own check-first gate and calls the pieces directly.
|
|
56
|
+
* When the dev database is migrated, the test stack is set up in the same
|
|
57
|
+
* breath so `pnpm test` works without a manual `test:setup`.
|
|
39
58
|
*/
|
|
40
59
|
export declare function runDockerAndMigrations(targetDir: string, skipPrompts: boolean, options?: PostSetupOptions): Promise<void>;
|
|
41
60
|
export declare function promptDockerAndMigrations(targetDir: string, skipPrompts: boolean, options?: PostSetupOptions): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-setup.d.ts","sourceRoot":"","sources":["../../src/core/post-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post-setup.d.ts","sourceRoot":"","sources":["../../src/core/post-setup.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qIAIvB,CAAC;AASX,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAGxD;AAyCD,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,OAAO,CAAC,CA+BlB;AAOD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,IAAI,CAOlF;AA2DD,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,CAyB/G;AAED,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAKD;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM9E;AAED,6FAA6F;AAC7F,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAiBvE;AAWD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CAgE3G;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAwBlB;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAalB"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, o as i, r as a, s as o, t as s } from "./cli-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, o as i, r as a, s as o, t as s } from "./cli-DkPX-eLF.js";
|
|
2
2
|
export { i as composeCommand, r as createCommand, s as createProgram, e as deployCommand, o as ensureInit, t as initCommand, n as loginCommand, a as logoutCommand };
|