@hype-stack/cli 1.12.1 → 1.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/dist/{cli-Mv2zSNXA.js → cli-CPgkEDN3.js} +1264 -1168
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/config/bin.js +1 -1
- package/dist/deploy/migrations.d.ts +32 -0
- package/dist/deploy/migrations.d.ts.map +1 -1
- package/dist/deploy/providers/railway.d.ts +11 -0
- package/dist/deploy/providers/railway.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,iBAAiB,EAAqC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,iBAAiB,EAAqC,MAAM,qBAAqB,CAAC;AA+BzG,OAAO,KAAK,EAEV,aAAa,EAEb,YAAY,EACZ,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAQ5B;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgM9E;AAiED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;IACjD,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,gBAAgB,EAAE,YAAY,EAAE,CAAC;CAClC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG;IAC1D,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B,CAUA"}
|
package/dist/config/bin.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ExecResult } from '../utils/exec.js';
|
|
1
2
|
/**
|
|
2
3
|
* Work out the command that applies pending migrations inside the deployed
|
|
3
4
|
* backend container.
|
|
@@ -8,4 +9,35 @@
|
|
|
8
9
|
* works for a stock layout.
|
|
9
10
|
*/
|
|
10
11
|
export declare function resolveMigrationCommand(backendRoot: string, projectRoot: string): Promise<string[]>;
|
|
12
|
+
export interface MigrationsPreflightResult {
|
|
13
|
+
status: "ok" | "generated" | "would-generate" | "failed";
|
|
14
|
+
detail: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MigrationsPreflightInput {
|
|
17
|
+
backendRoot: string;
|
|
18
|
+
projectRoot: string;
|
|
19
|
+
/** On a dry run nothing is written; the result reports what would happen. */
|
|
20
|
+
dryRun?: boolean;
|
|
21
|
+
/** Swapped for a fake in tests. */
|
|
22
|
+
execFn?: (command: string, args: string[], options: {
|
|
23
|
+
cwd: string;
|
|
24
|
+
}) => Promise<ExecResult>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Make sure the deploy has migrations to apply, before anything ships.
|
|
28
|
+
*
|
|
29
|
+
* `prisma migrate deploy` against an empty `prisma/migrations` succeeds and
|
|
30
|
+
* does nothing, so a project whose migrations were never generated (or never
|
|
31
|
+
* committed) deploys green and then dies on the first query with "relation
|
|
32
|
+
* does not exist". That shipped. This preflight closes both ways it happens:
|
|
33
|
+
*
|
|
34
|
+
* - No migrations at all: generate the init migration right here with
|
|
35
|
+
* `prisma migrate diff --from-empty`, which needs no database, and tell the
|
|
36
|
+
* user to commit it.
|
|
37
|
+
* - Migrations exist but are gitignored: uploads honor `.gitignore`, so the
|
|
38
|
+
* files never reach the provider and the remote database stays empty while
|
|
39
|
+
* everything looks committed locally. That one the user has to fix, so the
|
|
40
|
+
* deploy stops and says how.
|
|
41
|
+
*/
|
|
42
|
+
export declare function ensureMigrationsExist(input: MigrationsPreflightInput): Promise<MigrationsPreflightResult>;
|
|
11
43
|
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/deploy/migrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/deploy/migrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAWzD;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAUzG;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,IAAI,GAAG,WAAW,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IACzD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CAC7F;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CA8D/G"}
|
|
@@ -16,6 +16,17 @@ export declare function parseRailwayDomain(output: string): string | null;
|
|
|
16
16
|
* when the service already has some, and both shapes land here.
|
|
17
17
|
*/
|
|
18
18
|
export declare function parseRailwayDomainList(output: string): string[];
|
|
19
|
+
/**
|
|
20
|
+
* The domain the stack should address a service by, out of everything the
|
|
21
|
+
* service holds. A custom domain the user attached wins over the generated
|
|
22
|
+
* `*.up.railway.app` one. This is what lets a re-run of `deploy` heal a stack
|
|
23
|
+
* whose domains changed after the first deploy: the frontends inline these
|
|
24
|
+
* URLs at build time (Railway build args don't resolve references), so the
|
|
25
|
+
* reserve pass has to hand them the domain users actually reach the app on.
|
|
26
|
+
* Railway resolves the backend's `RAILWAY_PUBLIC_DOMAIN` references to the
|
|
27
|
+
* custom domain the same way, so both halves of the stack agree.
|
|
28
|
+
*/
|
|
29
|
+
export declare function pickServiceDomain(domains: string[]): string | null;
|
|
19
30
|
export interface RailwayService {
|
|
20
31
|
id: string;
|
|
21
32
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"railway.d.ts","sourceRoot":"","sources":["../../../src/deploy/providers/railway.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAiC,cAAc,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,KAAK,EAEV,qBAAqB,EAGrB,eAAe,EAIhB,MAAM,YAAY,CAAC;AAEpB,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,aAAa,CAAC;AA0DnD,kEAAkE;AAClE,eAAO,MAAM,cAAc,UAA+B,CAAC;AAiB3D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWhE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAW/D;
|
|
1
|
+
{"version":3,"file":"railway.d.ts","sourceRoot":"","sources":["../../../src/deploy/providers/railway.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAiC,cAAc,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,KAAK,EAEV,qBAAqB,EAGrB,eAAe,EAIhB,MAAM,YAAY,CAAC;AAEpB,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,aAAa,CAAC;AA0DnD,kEAAkE;AAClE,eAAO,MAAM,cAAc,UAA+B,CAAC;AAiB3D;;;;GAIG;AACH,wBAAgB,kBAAkB,CA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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-CPgkEDN3.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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hype-stack/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Scaffold a full-stack TypeScript app (React 19, Hono, Prisma, Kysely, Postgres) and compose features like auth, billing, and notifications into code you own. Deploys to Railway or Fly.io.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|