@hype-stack/cli 0.9.0 → 1.0.1
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-latnLYWc.js → cli-C8n6X5xr.js} +4059 -1714
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts +26 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/config/bin.js +7 -7
- package/dist/constants/constants.d.ts +55 -5
- package/dist/constants/constants.d.ts.map +1 -1
- package/dist/core/agents-md.d.ts +16 -0
- package/dist/core/agents-md.d.ts.map +1 -0
- package/dist/core/codemods.d.ts +8 -0
- package/dist/core/codemods.d.ts.map +1 -1
- package/dist/core/cursor-rules.d.ts +25 -0
- package/dist/core/cursor-rules.d.ts.map +1 -0
- package/dist/core/editor-config.d.ts +3 -11
- package/dist/core/editor-config.d.ts.map +1 -1
- package/dist/core/installer.d.ts.map +1 -1
- package/dist/core/mcp-config.d.ts +2 -0
- package/dist/core/mcp-config.d.ts.map +1 -1
- package/dist/core/readme.d.ts +1 -1
- package/dist/core/readme.d.ts.map +1 -1
- package/dist/deploy/assets.d.ts +73 -0
- package/dist/deploy/assets.d.ts.map +1 -0
- package/dist/deploy/assign.d.ts +58 -0
- package/dist/deploy/assign.d.ts.map +1 -0
- package/dist/deploy/build.d.ts +29 -0
- package/dist/deploy/build.d.ts.map +1 -0
- package/dist/deploy/catalog.d.ts +60 -0
- package/dist/deploy/catalog.d.ts.map +1 -0
- package/dist/deploy/config.d.ts +94 -0
- package/dist/deploy/config.d.ts.map +1 -0
- package/dist/deploy/detect.d.ts +36 -0
- package/dist/deploy/detect.d.ts.map +1 -0
- package/dist/deploy/dry-run.d.ts +14 -0
- package/dist/deploy/dry-run.d.ts.map +1 -0
- package/dist/deploy/env-plan.d.ts +67 -0
- package/dist/deploy/env-plan.d.ts.map +1 -0
- package/dist/deploy/migrations.d.ts +11 -0
- package/dist/deploy/migrations.d.ts.map +1 -0
- package/dist/deploy/orchestrate.d.ts +31 -0
- package/dist/deploy/orchestrate.d.ts.map +1 -0
- package/dist/deploy/plan.d.ts +23 -0
- package/dist/deploy/plan.d.ts.map +1 -0
- package/dist/deploy/project-env.d.ts +17 -0
- package/dist/deploy/project-env.d.ts.map +1 -0
- package/dist/deploy/providers/fly.d.ts +56 -0
- package/dist/deploy/providers/fly.d.ts.map +1 -0
- package/dist/deploy/providers/index.d.ts +9 -0
- package/dist/deploy/providers/index.d.ts.map +1 -0
- package/dist/deploy/providers/railway.d.ts +29 -0
- package/dist/deploy/providers/railway.d.ts.map +1 -0
- package/dist/deploy/providers/types.d.ts +92 -0
- package/dist/deploy/providers/types.d.ts.map +1 -0
- package/dist/deploy/report.d.ts +13 -0
- package/dist/deploy/report.d.ts.map +1 -0
- package/dist/deploy/runner.d.ts +81 -0
- package/dist/deploy/runner.d.ts.map +1 -0
- package/dist/deploy/types.d.ts +208 -0
- package/dist/deploy/types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/mcp/tools/create-application.d.ts +16 -3
- package/dist/mcp/tools/create-application.d.ts.map +1 -1
- package/dist/types/types.d.ts +25 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils/exec.d.ts +8 -0
- package/dist/utils/exec.d.ts.map +1 -1
- package/dist/utils/fs.d.ts +2 -0
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/json.d.ts +11 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0EpC,wBAAgB,aAAa,IAAI,OAAO,CAuLvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAWnE,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAc,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAWnE,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA0W3E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { resolveAssignment } from '../deploy/assign.js';
|
|
2
|
+
import { DeployOptions, DeployTarget, ManagedService } from '../deploy/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Deploy the whole stack: the two frontends, the backend, and the Postgres,
|
|
5
|
+
* Valkey, and object storage they run on.
|
|
6
|
+
*
|
|
7
|
+
* Every provider assignment is saved to the `deploy` block of `stack.json` on
|
|
8
|
+
* the way out, so the second run is `hype-stack deploy` with no flags and lands
|
|
9
|
+
* on exactly the same infrastructure.
|
|
10
|
+
*/
|
|
11
|
+
export declare function deployCommand(options?: DeployOptions): Promise<void>;
|
|
12
|
+
export interface PromptGapsInput {
|
|
13
|
+
assignment: ReturnType<typeof resolveAssignment>;
|
|
14
|
+
availableTargets: DeployTarget[];
|
|
15
|
+
requestedTargets: DeployTarget[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* What the flags and the saved config left open, which is exactly what has to
|
|
19
|
+
* be asked about. Services only count when a backend is part of the run: a
|
|
20
|
+
* frontend-only deploy has nothing that would talk to a database.
|
|
21
|
+
*/
|
|
22
|
+
export declare function pendingAssignments(input: PromptGapsInput): {
|
|
23
|
+
targets: DeployTarget[];
|
|
24
|
+
services: ManagedService[];
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,iBAAiB,EAAqC,MAAM,qBAAqB,CAAC;AA4BzG,OAAO,KAAK,EAEV,aAAa,EAEb,YAAY,EACZ,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAM5B;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmJ9E;AA2BD,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,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { d as e, n as t, t as n, u as r } from "../cli-C8n6X5xr.js";
|
|
3
3
|
import { z as i } from "zod";
|
|
4
4
|
import * as a from "@sentry/node";
|
|
5
5
|
//#region src/core/sentry.ts
|
|
6
6
|
var o = 2e3;
|
|
7
|
-
function s({ command:
|
|
8
|
-
if (!
|
|
7
|
+
function s({ command: t, dsn: n }) {
|
|
8
|
+
if (!n) return !1;
|
|
9
9
|
try {
|
|
10
10
|
return a.init({
|
|
11
|
-
dsn:
|
|
12
|
-
release: `@hype-stack/cli@${
|
|
11
|
+
dsn: n,
|
|
12
|
+
release: `@hype-stack/cli@${e}`,
|
|
13
13
|
sendDefaultPii: !1,
|
|
14
14
|
initialScope: { tags: {
|
|
15
|
-
command:
|
|
15
|
+
command: t,
|
|
16
16
|
node: process.version,
|
|
17
17
|
platform: process.platform
|
|
18
18
|
} }
|
|
@@ -51,7 +51,7 @@ var l = i.object({
|
|
|
51
51
|
"onboard",
|
|
52
52
|
"template"
|
|
53
53
|
], f = process.argv[2], p = f && d.includes(f) ? f : "root";
|
|
54
|
-
f === "mcp" && process.argv[3] !== "install" && (
|
|
54
|
+
f === "mcp" && process.argv[3] !== "install" && (r("mcp"), t());
|
|
55
55
|
var m = s({
|
|
56
56
|
command: p,
|
|
57
57
|
dsn: process.env.CLI_SENTRY_DSN
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CodeEditor } from '../types/types.js';
|
|
1
2
|
/**
|
|
2
3
|
* The CLI version, replaced at build time by Vite `define` with the real
|
|
3
4
|
* `package.json` version (see `vite.config.ts`). The release pipeline bumps
|
|
@@ -35,24 +36,73 @@ export declare const DEFAULT_ALIASES: {
|
|
|
35
36
|
readonly frontendFeatures: "apps/frontend/src/features";
|
|
36
37
|
};
|
|
37
38
|
export declare const PROJECT_NAME_REGEX: RegExp;
|
|
39
|
+
/**
|
|
40
|
+
* Everything the rules can be converted for. Pick as many as the team uses: each
|
|
41
|
+
* editor reads a different folder, so several sets of rules live side by side in
|
|
42
|
+
* one repository.
|
|
43
|
+
*/
|
|
38
44
|
export declare const EDITOR_CHOICES: readonly [{
|
|
39
45
|
readonly value: "cursor";
|
|
40
46
|
readonly label: "Cursor";
|
|
41
|
-
readonly hint: "
|
|
47
|
+
readonly hint: ".cursor/rules";
|
|
48
|
+
}, {
|
|
49
|
+
readonly value: "t3code";
|
|
50
|
+
readonly label: "T3 Code";
|
|
51
|
+
readonly hint: "Cursor, Claude Code, and Codex at once";
|
|
42
52
|
}, {
|
|
43
53
|
readonly value: "claude";
|
|
44
54
|
readonly label: "Claude Code";
|
|
55
|
+
readonly hint: ".claude/rules";
|
|
45
56
|
}, {
|
|
46
|
-
readonly value: "
|
|
47
|
-
readonly label: "
|
|
57
|
+
readonly value: "codex";
|
|
58
|
+
readonly label: "Codex";
|
|
59
|
+
readonly hint: "AGENTS.md";
|
|
48
60
|
}, {
|
|
49
61
|
readonly value: "copilot";
|
|
50
62
|
readonly label: "GitHub Copilot";
|
|
63
|
+
readonly hint: ".github/instructions";
|
|
64
|
+
}, {
|
|
65
|
+
readonly value: "opencode";
|
|
66
|
+
readonly label: "OpenCode";
|
|
67
|
+
readonly hint: "AGENTS.md";
|
|
68
|
+
}, {
|
|
69
|
+
readonly value: "windsurf";
|
|
70
|
+
readonly label: "Windsurf";
|
|
71
|
+
readonly hint: ".windsurf/rules";
|
|
51
72
|
}];
|
|
52
|
-
export declare const VALID_EDITORS:
|
|
73
|
+
export declare const VALID_EDITORS: CodeEditor[];
|
|
74
|
+
export declare const DEFAULT_EDITOR: CodeEditor;
|
|
75
|
+
export declare function isCodeEditor(value: string): value is CodeEditor;
|
|
76
|
+
/** Human label for a pick, for prompts and the generated README. */
|
|
77
|
+
export declare function editorLabel(editor: CodeEditor): string;
|
|
78
|
+
/**
|
|
79
|
+
* Sort raw editor names (from a flag or an MCP argument) into the ones we can
|
|
80
|
+
* act on and the ones we cannot. The unknown names come back rather than being
|
|
81
|
+
* dropped quietly, so a typo can be reported instead of silently changing which
|
|
82
|
+
* rules a project ships.
|
|
83
|
+
*/
|
|
84
|
+
export declare function parseEditors(values: string[] | undefined): {
|
|
85
|
+
editors: CodeEditor[];
|
|
86
|
+
unknown: string[];
|
|
87
|
+
};
|
|
53
88
|
export declare const CURSOR_RULES_DIR = ".cursor/rules";
|
|
54
89
|
export declare const CURSOR_DIR = ".cursor";
|
|
55
|
-
|
|
90
|
+
/**
|
|
91
|
+
* The vendor-neutral skills location from the Agent Skills spec. Codex,
|
|
92
|
+
* OpenCode, Copilot, and Windsurf's Cascade all scan it as-is, so it stays put
|
|
93
|
+
* whichever editor the user picked. Claude Code is the one that needs a link.
|
|
94
|
+
*/
|
|
95
|
+
export declare const AGENTS_SKILLS_DIR = ".agents/skills";
|
|
96
|
+
export declare const CLAUDE_SKILLS_DIR = ".claude/skills";
|
|
97
|
+
/**
|
|
98
|
+
* Where scoped rules land for the `AGENTS.md` readers when `.cursor/rules` is
|
|
99
|
+
* not part of the project. `AGENTS.md` links to them so a Codex or OpenCode
|
|
100
|
+
* session reads a rule when it touches the paths it covers, instead of carrying
|
|
101
|
+
* every rule in context from the first message.
|
|
102
|
+
*/
|
|
103
|
+
export declare const AGENTS_RULES_DIR = ".agents/rules";
|
|
104
|
+
export declare const AGENTS_MD_FILE = "AGENTS.md";
|
|
105
|
+
export declare const CLAUDE_MD_FILE = "CLAUDE.md";
|
|
56
106
|
export declare function getApiUrl(): string;
|
|
57
107
|
export declare function getWebUrl(): string;
|
|
58
108
|
export declare function validateApiUrl(url: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,QAAkE,CAAC;AAEvF,eAAO,MAAM,aAAa,8BAA8B,CAAC;AAEzD,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAMhD,eAAO,MAAM,eAAe,+BAA+B,CAAC;AAE5D,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,uGAAuG;AACvG,eAAO,MAAM,eAAe,+BAA+B,CAAC;AAE5D,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAItC,mEAAmE;AACnE,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAErE,k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qB,CAAC;AAEnD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAE/D;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAOvG;AAED,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAClD,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,cAAc,cAAc,CAAC;AAC1C,eAAO,MAAM,cAAc,cAAc,CAAC;AAE1C,wBAAgB,SAAS,IAAI,MAAM,CAOlC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAOlC;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAYhD;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ParsedRule } from './cursor-rules.js';
|
|
2
|
+
/** Where the scoped rules the table links to actually live. */
|
|
3
|
+
export interface ScopedRuleLocation {
|
|
4
|
+
dir: string;
|
|
5
|
+
extension: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Render the Cursor rule set as a single `AGENTS.md`.
|
|
9
|
+
*
|
|
10
|
+
* Codex and OpenCode do not read `.mdc` files, so the always-on rules are
|
|
11
|
+
* copied in full rather than linked. Scoped rules stay as links to keep the file
|
|
12
|
+
* small: an agent reads them when it touches the paths they cover, which is the
|
|
13
|
+
* same progressive disclosure Cursor does with globs.
|
|
14
|
+
*/
|
|
15
|
+
export declare function renderAgentsMd(rules: ParsedRule[], scoped: ScopedRuleLocation): string;
|
|
16
|
+
//# sourceMappingURL=agents-md.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../src/core/agents-md.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/D,+DAA+D;AAC/D,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAuCtF"}
|
package/dist/core/codemods.d.ts
CHANGED
|
@@ -61,6 +61,14 @@ export interface PatchNavConstantsOptions {
|
|
|
61
61
|
* `/dashboard` wins over a layout pack's Dashboard at `/`, which installed first.
|
|
62
62
|
*/
|
|
63
63
|
override?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Move these entries to the front of their nav group once patched. The template
|
|
66
|
+
* overlay runs last, after every pack has appended into the primary group, so
|
|
67
|
+
* without this a template's Dashboard lands below pack pages like Calendar or
|
|
68
|
+
* Boards. Only affects the append groups (primary, secondary); tertiary and
|
|
69
|
+
* settings already insert on top and keep the template's Settings last.
|
|
70
|
+
*/
|
|
71
|
+
pinFirst?: boolean;
|
|
64
72
|
}
|
|
65
73
|
export declare function patchNavConstants(options: PatchNavConstantsOptions): Promise<void>;
|
|
66
74
|
export interface PatchPostLoginRedirectOptions {
|
|
@@ -1 +1 @@
|
|
|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
|
+
description?: string;
|
|
3
|
+
globs: string[];
|
|
4
|
+
alwaysApply: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface ParsedRule {
|
|
7
|
+
frontmatter: MdcFrontmatter;
|
|
8
|
+
content: string;
|
|
9
|
+
filename: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseMdcFrontmatter(raw: string): {
|
|
12
|
+
frontmatter: MdcFrontmatter;
|
|
13
|
+
content: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* How a rule reaches the agent, in Cursor's terms. Every other editor's
|
|
17
|
+
* activation model is a translation of one of these three.
|
|
18
|
+
*
|
|
19
|
+
* A rule with neither globs nor a description has nothing for an agent to match
|
|
20
|
+
* on, so it counts as always on rather than becoming unreachable.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ruleScope(rule: ParsedRule): "always" | "paths" | "described";
|
|
23
|
+
/** Sorted by filename so generated output does not shuffle between runs. */
|
|
24
|
+
export declare function readCursorRules(projectDir: string): Promise<ParsedRule[]>;
|
|
25
|
+
//# sourceMappingURL=cursor-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor-rules.d.ts","sourceRoot":"","sources":["../../src/core/cursor-rules.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,cAAc,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA8CjG;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAI5E;AAED,4EAA4E;AAC5E,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAkB/E"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { CodeEditor } from '../types/types.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
alwaysApply: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function parseMdcFrontmatter(raw: string): {
|
|
8
|
-
frontmatter: MdcFrontmatter;
|
|
9
|
-
content: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function convertEditorConfig(projectDir: string, editor: CodeEditor): Promise<void>;
|
|
12
|
-
export {};
|
|
2
|
+
/** Every place the picked editors will read rules from, in the order they are written. */
|
|
3
|
+
export declare function rulePathsFor(editors: CodeEditor[]): string[];
|
|
4
|
+
export declare function convertEditorConfig(projectDir: string, editors: CodeEditor[]): Promise<void>;
|
|
13
5
|
//# sourceMappingURL=editor-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-config.d.ts","sourceRoot":"","sources":["../../src/core/editor-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor-config.d.ts","sourceRoot":"","sources":["../../src/core/editor-config.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA0IpD,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,CAU5D;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBlG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/core/installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAA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C;IAC3B,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAwGjC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CodeEditor } from '../types/types.js';
|
|
1
2
|
/**
|
|
2
3
|
* Writing the `hype-stack` MCP server into each editor's config file.
|
|
3
4
|
*
|
|
@@ -37,6 +38,7 @@ interface EditorTarget {
|
|
|
37
38
|
}
|
|
38
39
|
export declare const EDITOR_TARGETS: Record<McpEditor, EditorTarget>;
|
|
39
40
|
export declare function isMcpEditor(value: string): value is McpEditor;
|
|
41
|
+
export declare function mcpTargetsFor(editors: CodeEditor[]): McpEditor[];
|
|
40
42
|
/** Scopes this editor actually supports, in the order we would suggest them. */
|
|
41
43
|
export declare function supportedScopes(editor: McpEditor): McpScope[];
|
|
42
44
|
export interface ResolveConfigPathArgs {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../../src/core/mcp-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp-config.d.ts","sourceRoot":"","sources":["../../src/core/mcp-config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD;;;;;;GAMG;AAEH,eAAO,MAAM,eAAe,eAAe,CAAC;AAE5C,6FAA6F;AAC7F,eAAO,MAAM,WAAW,wEAAyE,CAAC;AAClG,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IAC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GAKG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,CAmBtF;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5E"}
|
package/dist/core/readme.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { toDisplayName } from '../utils/naming.js';
|
|
|
3
3
|
export { toDisplayName };
|
|
4
4
|
export interface ReadmeOptions {
|
|
5
5
|
projectName: string;
|
|
6
|
-
|
|
6
|
+
editors: CodeEditor[];
|
|
7
7
|
workspace: DetectedWorkspace;
|
|
8
8
|
}
|
|
9
9
|
export declare function generateReadme(options: ReadmeOptions): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme.d.ts","sourceRoot":"","sources":["../../src/core/readme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readme.d.ts","sourceRoot":"","sources":["../../src/core/readme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AA4BD,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAkJ7D;AAED,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3F"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PlannedTarget } from './types.js';
|
|
2
|
+
/** Where generated deploy files land, relative to the project root. */
|
|
3
|
+
export declare const DEPLOY_ASSETS_DIR = ".hype-stack/deploy";
|
|
4
|
+
/**
|
|
5
|
+
* Port the generated static image listens on. Fixed rather than read from
|
|
6
|
+
* `$PORT` so the nginx config needs no templating, which keeps `try_files
|
|
7
|
+
* $uri` from being eaten by the base image's envsubst step. Both providers are
|
|
8
|
+
* told this number explicitly.
|
|
9
|
+
*/
|
|
10
|
+
export declare const STATIC_PORT = 8080;
|
|
11
|
+
export declare function assetsDir(projectRoot: string): string;
|
|
12
|
+
export interface FlyTomlInput {
|
|
13
|
+
app: string;
|
|
14
|
+
region?: string;
|
|
15
|
+
internalPort: number;
|
|
16
|
+
/** Static targets run one always-on machine; a suspended SPA host is pointless latency. */
|
|
17
|
+
minMachines?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Command to run in a temporary machine built from the new image, before any
|
|
20
|
+
* traffic moves to it. This is where migrations belong: Fly aborts the whole
|
|
21
|
+
* deploy if it exits non-zero, so a release never goes out against a database
|
|
22
|
+
* it cannot run on.
|
|
23
|
+
*/
|
|
24
|
+
releaseCommand?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function renderFlyToml(input: FlyTomlInput): string;
|
|
27
|
+
export interface WriteFlyTomlInput {
|
|
28
|
+
projectRoot: string;
|
|
29
|
+
target: PlannedTarget;
|
|
30
|
+
internalPort: number;
|
|
31
|
+
releaseCommand?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function writeFlyToml(input: WriteFlyTomlInput): Promise<string>;
|
|
34
|
+
/**
|
|
35
|
+
* nginx config for a single-page app: every unknown path falls back to
|
|
36
|
+
* `index.html` so client-side routing survives a hard refresh.
|
|
37
|
+
*/
|
|
38
|
+
export declare function renderStaticNginxConf(port: number): string;
|
|
39
|
+
export interface StaticDockerfileInput {
|
|
40
|
+
/** Build output directory, relative to the project root. */
|
|
41
|
+
contentDir: string;
|
|
42
|
+
/** nginx config path, relative to the project root. */
|
|
43
|
+
configPath: string;
|
|
44
|
+
port: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Image for a prebuilt SPA. The bundle is built on the machine running the
|
|
48
|
+
* deploy (so the `VITE_*` values are the resolved production ones) and this
|
|
49
|
+
* image only has to serve it, which keeps the remote build to a single COPY.
|
|
50
|
+
*/
|
|
51
|
+
export declare function renderStaticDockerfile(input: StaticDockerfileInput): string;
|
|
52
|
+
export interface StaticImageAssets {
|
|
53
|
+
/** Dockerfile path relative to the project root. */
|
|
54
|
+
dockerfile: string;
|
|
55
|
+
/** nginx config path relative to the project root. */
|
|
56
|
+
nginxConf: string;
|
|
57
|
+
port: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Write the Dockerfile and nginx config that turn a built SPA into a container,
|
|
61
|
+
* for the providers that host containers rather than static assets.
|
|
62
|
+
*/
|
|
63
|
+
export declare function writeStaticImageAssets(projectRoot: string, target: PlannedTarget, contentDir: string): Promise<StaticImageAssets>;
|
|
64
|
+
/**
|
|
65
|
+
* Locate the Dockerfile a container target builds from, relative to the project
|
|
66
|
+
* root. Returns null when the app ships none, which is what turns into the
|
|
67
|
+
* "add a Dockerfile" error instead of a confusing remote build failure.
|
|
68
|
+
*/
|
|
69
|
+
export declare function findTargetDockerfile(projectRoot: string, target: PlannedTarget): Promise<string | null>;
|
|
70
|
+
export declare function toPosixRelative(from: string, to: string): string;
|
|
71
|
+
/** Keep generated deploy files out of git; they are reproducible from `stack.json`. */
|
|
72
|
+
export declare function ensureAssetsGitignored(projectRoot: string): Promise<void>;
|
|
73
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/deploy/assets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,uEAAuE;AACvE,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,OAAO,CAAC;AAEhC,wB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AoB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAI7G;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED,uFAAuF;AACvF,wBAAsB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc/E"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ServeModes } from './detect.js';
|
|
2
|
+
import { DeployConfig, DeployResource, DeployTarget, ManagedService, ProviderId } from './types.js';
|
|
3
|
+
export type AssignmentIssueCode = "unassigned" | "missing-target" | "unsupported-serve-mode";
|
|
4
|
+
export interface AssignmentIssue {
|
|
5
|
+
resource: DeployResource;
|
|
6
|
+
provider?: ProviderId;
|
|
7
|
+
code: AssignmentIssueCode;
|
|
8
|
+
message: string;
|
|
9
|
+
/** How to get past it, phrased as something the user can paste. */
|
|
10
|
+
fix?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Assignment {
|
|
13
|
+
targets: Partial<Record<DeployTarget, ProviderId>>;
|
|
14
|
+
services: Partial<Record<ManagedService, ProviderId>>;
|
|
15
|
+
}
|
|
16
|
+
export interface ResolveAssignmentInput {
|
|
17
|
+
config: DeployConfig;
|
|
18
|
+
/** Provider for anything without a more specific assignment. Beats the saved `defaultProvider`. */
|
|
19
|
+
defaultProvider?: ProviderId;
|
|
20
|
+
/** Per-resource `--backend fly` style overrides. Beat everything else. */
|
|
21
|
+
overrides?: Partial<Record<DeployResource, ProviderId>>;
|
|
22
|
+
/** Targets that actually exist in the project, from `stack.json` -> `apps`. */
|
|
23
|
+
availableTargets: DeployTarget[];
|
|
24
|
+
/** Restrict this run to a subset of targets. Empty or omitted means all available. */
|
|
25
|
+
only?: DeployTarget[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Work out which provider owns each target and service.
|
|
29
|
+
*
|
|
30
|
+
* Precedence, highest first: an explicit `--<resource> <provider>` override, the
|
|
31
|
+
* saved `stack.json` entry, the `--provider` default for this run, then the
|
|
32
|
+
* saved `defaultProvider`. Anything still unresolved comes back absent, and
|
|
33
|
+
* {@link validateAssignment} turns that into an `unassigned` issue rather than
|
|
34
|
+
* guessing a provider that would bill the user.
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveAssignment(input: ResolveAssignmentInput): Assignment;
|
|
37
|
+
/**
|
|
38
|
+
* Narrow the targets to deploy: the intersection of what the project has and
|
|
39
|
+
* what `--only` asked for, in catalog order so the summary is always stable.
|
|
40
|
+
*/
|
|
41
|
+
export declare function selectTargets(availableTargets: DeployTarget[], only?: DeployTarget[]): DeployTarget[];
|
|
42
|
+
export interface ValidateAssignmentInput {
|
|
43
|
+
assignment: Assignment;
|
|
44
|
+
availableTargets: DeployTarget[];
|
|
45
|
+
/** Targets the user explicitly asked for, so a typo is reported rather than ignored. */
|
|
46
|
+
requestedTargets?: DeployTarget[];
|
|
47
|
+
/** Serve mode per app, from detection. A null entry means it cannot ship at all. */
|
|
48
|
+
serveModes?: ServeModes;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check every assignment against the provider capability matrix. Returns the
|
|
52
|
+
* full list of problems rather than the first one, so a bad plan is fixed in a
|
|
53
|
+
* single pass instead of one error per run.
|
|
54
|
+
*/
|
|
55
|
+
export declare function validateAssignment(input: ValidateAssignmentInput): AssignmentIssue[];
|
|
56
|
+
/** Format issues into one block for a note/error, newest-friendly for a terminal. */
|
|
57
|
+
export declare function formatIssues(issues: AssignmentIssue[]): string;
|
|
58
|
+
//# sourceMappingURL=assign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assign.d.ts","sourceRoot":"","sources":["../../src/deploy/assign.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE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,EAAE,CAAC;IAClC,oFAAoF;IACpF,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,eAAe,EAAE,CAsDpF;AAaD,qFAAqF;AACrF,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAO9D"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ProviderContext } from './providers/types.js';
|
|
2
|
+
import { PlannedTarget } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Pick the package script that produces the deployable artifact. Returns null
|
|
5
|
+
* when the app declares none, which the caller turns into an actionable error
|
|
6
|
+
* rather than deploying an empty directory.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveBuildScript(root: string): Promise<string | null>;
|
|
9
|
+
export interface BuildResult {
|
|
10
|
+
/** Script that ran, or null when the target needed no local build. */
|
|
11
|
+
script: string | null;
|
|
12
|
+
/** Build output directory relative to the project root, for static targets. */
|
|
13
|
+
outputDir?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface BuildTargetInput {
|
|
16
|
+
target: PlannedTarget;
|
|
17
|
+
/** Env for the build, which is where `VITE_*` values get baked into the bundle. */
|
|
18
|
+
env: Record<string, string>;
|
|
19
|
+
secrets: string[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build a static target locally.
|
|
23
|
+
*
|
|
24
|
+
* Vite inlines `VITE_*` at build time, so the bundle has to be produced with the
|
|
25
|
+
* production API origin already resolved. Building here (rather than on the
|
|
26
|
+
* provider) is also what lets a static host receive a plain folder of files.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildStaticTarget(ctx: ProviderContext, input: BuildTargetInput): Promise<BuildResult>;
|
|
29
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/deploy/build.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAchD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAI7E;AAED,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB,mFAAmF;IACnF,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAgC3G"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DeployResource, DeployTarget, ManagedService, ProviderId, ProviderSpec, ServiceSpec, TargetSpec } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Deploy settings live in the `deploy` block of `stack.json` rather than a file
|
|
4
|
+
* of their own. A project without `stack.json` is not a Hype Stack project, so
|
|
5
|
+
* there is nothing to deploy and nowhere sensible to record what was created.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEPLOY_CONFIG_FILE = "stack.json";
|
|
8
|
+
/** Key inside `stack.json` that holds everything below. */
|
|
9
|
+
export declare const DEPLOY_CONFIG_KEY = "deploy";
|
|
10
|
+
/**
|
|
11
|
+
* Dotted path to a deploy setting, for error messages that tell the user
|
|
12
|
+
* exactly what to edit, e.g. `deploy.services.bucket.external`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function settingPath(...segments: string[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Schema version written into the `deploy` block. Tracked separately from
|
|
17
|
+
* `stack.json`'s own version so the two can evolve without forcing each other.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DEPLOY_CONFIG_VERSION = 1;
|
|
20
|
+
/** Environment name used when neither the flag nor the saved config picks one. */
|
|
21
|
+
export declare const DEFAULT_ENVIRONMENT = "production";
|
|
22
|
+
export declare const DEPLOY_TARGETS: DeployTarget[];
|
|
23
|
+
export declare const MANAGED_SERVICES: ManagedService[];
|
|
24
|
+
/**
|
|
25
|
+
* Providers the CLI will drive.
|
|
26
|
+
*
|
|
27
|
+
* The bar for being here is deploying the whole stack unattended: all three
|
|
28
|
+
* apps as containers, plus Postgres, Valkey, and an S3-compatible bucket, from
|
|
29
|
+
* one command with no dashboard visits in the middle. Static hosts do not
|
|
30
|
+
* qualify, however good they are at the static half. Cloudflare and Netlify
|
|
31
|
+
* cannot run the backend at all and have no managed Postgres, which would leave
|
|
32
|
+
* the user assembling the rest by hand.
|
|
33
|
+
*/
|
|
34
|
+
export declare const PROVIDER_IDS: ProviderId[];
|
|
35
|
+
export declare const TARGET_SPECS: Record<DeployTarget, TargetSpec>;
|
|
36
|
+
export declare const SERVICE_SPECS: Record<ManagedService, ServiceSpec>;
|
|
37
|
+
export declare const PROVIDER_SPECS: Record<ProviderId, ProviderSpec>;
|
|
38
|
+
export declare function isDeployTarget(value: string): value is DeployTarget;
|
|
39
|
+
export declare function isManagedService(value: string): value is ManagedService;
|
|
40
|
+
export declare function isProviderId(value: string): value is ProviderId;
|
|
41
|
+
export declare function isDeployResource(value: string): value is DeployResource;
|
|
42
|
+
/** Human label for a target or service, for prompts and the summary. */
|
|
43
|
+
export declare function resourceLabel(resource: DeployResource): string;
|
|
44
|
+
export declare function providerLabel(provider: ProviderId): string;
|
|
45
|
+
/**
|
|
46
|
+
* Providers that can host `resource`.
|
|
47
|
+
*
|
|
48
|
+
* Every one of them can host all three apps and run all three services, which
|
|
49
|
+
* is the entry requirement, so this is the full list. It stays a function
|
|
50
|
+
* because the picker and the error messages read better asking the question
|
|
51
|
+
* than asserting the answer.
|
|
52
|
+
*/
|
|
53
|
+
export declare function providersForResource(_resource: DeployResource): ProviderId[];
|
|
54
|
+
/**
|
|
55
|
+
* Default remote resource name. Provider namespaces are global-ish (Fly app
|
|
56
|
+
* names are unique per organization, Railway service names per project), so the
|
|
57
|
+
* project name is always the prefix to keep two projects from colliding.
|
|
58
|
+
*/
|
|
59
|
+
export declare function defaultResourceName(projectName: string, resource: DeployResource): string;
|
|
60
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/deploy/catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,eAAoB,CAAC;AAEpD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD,eAAO,MAAM,cAAc,EAAE,YAAY,EAAqC,CAAC;AAE/E,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAAqC,CAAC;AAEnF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,EAAuB,CAAC;AAE7D,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAgCzD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,cAAc,EAAE,WAAW,CAgB7D,CAAC;A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