@hype-stack/cli 0.1.0 → 0.2.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-B_p3GdS8.js +4845 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/compose.d.ts +16 -0
- package/dist/commands/compose.d.ts.map +1 -0
- package/dist/commands/create.d.ts +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/init.d.ts +24 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/install-helpers.d.ts +41 -0
- package/dist/commands/install-helpers.d.ts.map +1 -0
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/logout.d.ts +2 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/template.d.ts +13 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/config/bin.d.ts.map +1 -0
- package/dist/config/bin.js +2439 -0
- package/dist/config/env.d.ts +8 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/constants/constants.d.ts +58 -0
- package/dist/constants/constants.d.ts.map +1 -0
- package/dist/constants/themes.d.ts +40 -0
- package/dist/constants/themes.d.ts.map +1 -0
- package/dist/core/access-prompts.d.ts +15 -0
- package/dist/core/access-prompts.d.ts.map +1 -0
- package/dist/core/apply-theme.d.ts +17 -0
- package/dist/core/apply-theme.d.ts.map +1 -0
- package/dist/core/auth-api.d.ts +9 -0
- package/dist/core/auth-api.d.ts.map +1 -0
- package/dist/core/auth-store.d.ts +16 -0
- package/dist/core/auth-store.d.ts.map +1 -0
- package/dist/core/client.d.ts +2 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/clone.d.ts.map +1 -1
- package/dist/core/codegen.d.ts +18 -0
- package/dist/core/codegen.d.ts.map +1 -0
- package/dist/core/codemods.d.ts +58 -0
- package/dist/core/codemods.d.ts.map +1 -0
- package/dist/core/device.d.ts +3 -0
- package/dist/core/device.d.ts.map +1 -0
- package/dist/core/editor-config.d.ts +1 -1
- package/dist/core/editor-config.d.ts.map +1 -1
- package/dist/core/env-files.d.ts +2 -0
- package/dist/core/env-files.d.ts.map +1 -0
- package/dist/core/installer.d.ts +104 -0
- package/dist/core/installer.d.ts.map +1 -0
- package/dist/core/license.d.ts +7 -0
- package/dist/core/license.d.ts.map +1 -0
- package/dist/core/login.d.ts +13 -0
- package/dist/core/login.d.ts.map +1 -0
- package/dist/core/npm-deps.d.ts +32 -0
- package/dist/core/npm-deps.d.ts.map +1 -0
- package/dist/core/open-browser.d.ts +2 -0
- package/dist/core/open-browser.d.ts.map +1 -0
- package/dist/core/pack-categories.d.ts +40 -0
- package/dist/core/pack-categories.d.ts.map +1 -0
- package/dist/core/post-clone.d.ts.map +1 -1
- package/dist/core/post-setup.d.ts +6 -0
- package/dist/core/post-setup.d.ts.map +1 -0
- package/dist/core/readme.d.ts +10 -0
- package/dist/core/readme.d.ts.map +1 -0
- package/dist/core/registry.d.ts +35 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/resolve.d.ts +44 -0
- package/dist/core/resolve.d.ts.map +1 -0
- package/dist/core/stack-config.d.ts +3 -1
- package/dist/core/stack-config.d.ts.map +1 -1
- package/dist/core/templates.d.ts +15 -0
- package/dist/core/templates.d.ts.map +1 -0
- package/dist/core/tracking.d.ts +9 -0
- package/dist/core/tracking.d.ts.map +1 -0
- package/dist/core/variants.d.ts +47 -0
- package/dist/core/variants.d.ts.map +1 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/themes.js +833 -0
- package/dist/types/types.d.ts +303 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/logger.d.ts.map +1 -1
- package/dist/ui/theme.d.ts +13 -0
- package/dist/ui/theme.d.ts.map +1 -1
- package/package.json +37 -3
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js +0 -5
- package/dist/cli-B_f7CCee.js +0 -548
- package/dist/commands/add.d.ts +0 -2
- package/dist/commands/add.d.ts.map +0 -1
- package/dist/constants.d.ts +0 -30
- package/dist/constants.d.ts.map +0 -1
- package/dist/types.d.ts +0 -23
- package/dist/types.d.ts.map +0 -1
- /package/dist/{bin.d.ts → config/bin.d.ts} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const envSchema: z.ZodObject<{
|
|
3
|
+
HYPE_STACK_API_URL: z.ZodOptional<z.ZodString>;
|
|
4
|
+
HYPE_STACK_WEB_URL: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type CliEnv = z.infer<typeof envSchema>;
|
|
7
|
+
export declare const validateEnv: () => CliEnv;
|
|
8
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/config/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;iBAGpB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE/C,eAAO,MAAM,WAAW,QAAO,MAS9B,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const VERSION = "0.0.1";
|
|
2
|
+
export declare const TEMPLATE_REPO = "gh:BetterTyped/hype-stack";
|
|
3
|
+
export declare const STACK_CONFIG_FILE = "stack.json";
|
|
4
|
+
export declare const SCHEMA_PATH = "/schema/stack.json";
|
|
5
|
+
export declare const DEFAULT_API_URL = "https://hype-stack.dev";
|
|
6
|
+
export declare const API_URL_ENV_KEY = "HYPE_STACK_API_URL";
|
|
7
|
+
/** The web app (storefront / login pages). Defaults to the API host when not set separately. */
|
|
8
|
+
export declare const WEB_URL_ENV_KEY = "HYPE_STACK_WEB_URL";
|
|
9
|
+
export declare const STACK_CONFIG_VERSION = 1;
|
|
10
|
+
/** API path for license validation */
|
|
11
|
+
export declare const LICENSE_VALIDATE_PATH = "/api/licenses/validate";
|
|
12
|
+
/** API path for the pack registry (list of all available packs) */
|
|
13
|
+
export declare const REGISTRY_PATH = "/api/registry";
|
|
14
|
+
/** API path template for a pack's manifest - replace :packId with the actual ID */
|
|
15
|
+
export declare const PACK_MANIFEST_PATH = "/api/packs/:packId/manifest.json";
|
|
16
|
+
/** API path template for a pack's file archive */
|
|
17
|
+
export declare const PACK_FILES_PATH = "/api/packs/:packId/files.tar.gz";
|
|
18
|
+
/** Marker comment written into schema.prisma after a pack's models are applied */
|
|
19
|
+
export declare const PRISMA_PATCH_COMMENT_PREFIX = "// --- ";
|
|
20
|
+
/** Default alias paths used when not overridden in stack.json */
|
|
21
|
+
export declare const DEFAULT_ALIASES: {
|
|
22
|
+
readonly backendSrc: "apps/backend/src";
|
|
23
|
+
readonly frontendSrc: "apps/frontend/src";
|
|
24
|
+
readonly prismaSchema: "apps/backend/prisma/schema.prisma";
|
|
25
|
+
readonly middleware: "apps/backend/src/middleware";
|
|
26
|
+
readonly libs: "apps/backend/src/libs";
|
|
27
|
+
readonly utils: "apps/backend/src/utils";
|
|
28
|
+
readonly backendFeatures: "apps/backend/src/features";
|
|
29
|
+
readonly frontendFeatures: "apps/frontend/src/features";
|
|
30
|
+
};
|
|
31
|
+
export declare const PROJECT_NAME_REGEX: RegExp;
|
|
32
|
+
export declare const EDITOR_CHOICES: readonly [{
|
|
33
|
+
readonly value: "cursor";
|
|
34
|
+
readonly label: "Cursor";
|
|
35
|
+
readonly hint: "default";
|
|
36
|
+
}, {
|
|
37
|
+
readonly value: "claude";
|
|
38
|
+
readonly label: "Claude Code";
|
|
39
|
+
}, {
|
|
40
|
+
readonly value: "windsurf";
|
|
41
|
+
readonly label: "Windsurf";
|
|
42
|
+
}, {
|
|
43
|
+
readonly value: "copilot";
|
|
44
|
+
readonly label: "GitHub Copilot";
|
|
45
|
+
}];
|
|
46
|
+
export declare const VALID_EDITORS: ("cursor" | "claude" | "windsurf" | "copilot")[];
|
|
47
|
+
export declare const CURSOR_RULES_DIR = ".cursor/rules";
|
|
48
|
+
export declare const CURSOR_DIR = ".cursor";
|
|
49
|
+
export declare const AGENTS_DIR = ".agents";
|
|
50
|
+
export declare function getApiUrl(): string;
|
|
51
|
+
export declare function getWebUrl(): string;
|
|
52
|
+
export declare function validateApiUrl(url: string): void;
|
|
53
|
+
export declare function getSchemaUrl(): string;
|
|
54
|
+
export declare function getRegistryUrl(): string;
|
|
55
|
+
export declare function getLicenseValidateUrl(): string;
|
|
56
|
+
export declare function getPackManifestUrl(packId: string): string;
|
|
57
|
+
export declare function getPackFilesUrl(packId: string): string;
|
|
58
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC;AAE/B,eAAO,MAAM,aAAa,8BAA8B,CAAC;AAEzD,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAEhD,eAAO,MAAM,eAAe,2BAA2B,CAAC;AAExD,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,gGAAgG;AAChG,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAItC,sCAAsC;AACtC,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,mEAAmE;AACnE,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAErE,kDAAkD;AAClD,eAAO,MAAM,eAAe,oCAAoC,CAAC;AAEjE,kFAAkF;AAClF,eAAO,MAAM,2BAA2B,YAAY,CAAC;AAErD,iEAAiE;AACjE,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC;AAEX,eAAO,MAAM,kBAAkB,QAAwC,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;;;;;;;EAKjB,CAAC;AAEX,eAAO,MAAM,aAAa,kDAAqC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC,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,qBAAqB,IAAI,MAAM,CAE9C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type ThemeName = "default" | "slate" | "rose" | "emerald" | "violet" | "amber" | "ocean" | "zinc-mono" | "crimson" | "midnight";
|
|
2
|
+
/** Keys are CSS variable names without the `--` prefix. */
|
|
3
|
+
export type ThemeTokens = Record<string, string>;
|
|
4
|
+
export interface Theme {
|
|
5
|
+
name: ThemeName;
|
|
6
|
+
label: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
light: ThemeTokens;
|
|
9
|
+
dark: ThemeTokens;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_THEME: ThemeName;
|
|
12
|
+
export declare const THEME_TOKEN_KEYS: ReadonlyArray<string>;
|
|
13
|
+
export declare const THEMES: Record<ThemeName, Theme>;
|
|
14
|
+
export declare const THEME_LIST: Theme[];
|
|
15
|
+
export declare const THEME_CHOICES: {
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
hint: string | undefined;
|
|
19
|
+
}[];
|
|
20
|
+
export declare const VALID_THEME_NAMES: ReadonlySet<string>;
|
|
21
|
+
export declare function isThemeName(value: string): value is ThemeName;
|
|
22
|
+
export declare function getTheme(name: ThemeName): Theme;
|
|
23
|
+
export declare function getThemeTokenKeys(): ReadonlyArray<string>;
|
|
24
|
+
/**
|
|
25
|
+
* A theme reduced to the shape the preview/capture pipeline consumes: an id, a
|
|
26
|
+
* display name, and the `light` / `dark` CSS-variable maps. Keys are CSS custom
|
|
27
|
+
* property names WITHOUT the leading `--` (matching `ThemeTokens`); callers
|
|
28
|
+
* that set inline styles prefix them with `--`. The `default` preset carries
|
|
29
|
+
* the full token set too, but preview/capture callers treat `default` as the
|
|
30
|
+
* reset target by skipping overrides.
|
|
31
|
+
*/
|
|
32
|
+
export interface ThemePreset {
|
|
33
|
+
id: ThemeName;
|
|
34
|
+
name: string;
|
|
35
|
+
light: ThemeTokens;
|
|
36
|
+
dark: ThemeTokens;
|
|
37
|
+
}
|
|
38
|
+
export declare const THEME_PRESET_LIST: ThemePreset[];
|
|
39
|
+
export declare function getThemePreset(id: string): ThemePreset | null;
|
|
40
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/constants/themes.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,OAAO,GACP,MAAM,GACN,SAAS,GACT,QAAQ,GACR,OAAO,GACP,OAAO,GACP,WAAW,GACX,SAAS,GACT,UAAU,CAAC;AAEf,2DAA2D;AAC3D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjD,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,EAAE,SAAuB,CAAC;AA2CpD,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAoB,CAAC;AAOxE,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CA41B3C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,EAA0B,CAAC;AAEzD,eAAO,MAAM,aAAa;WACH,MAAM;;;GAG1B,CAAC;AAEJ,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAkD,CAAC;AAErG,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAE7D;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,CAE/C;AAED,wBAAgB,iBAAiB,IAAI,aAAa,CAAC,MAAM,CAAC,CAEzD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,EAAE,WAAW,EAKxC,CAAC;AAEJ,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAI7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Offer a browser login when access is needed without credentials. Returns the token on success,
|
|
3
|
+
* or null if the user declined or login failed (the caller then falls back to a purchase prompt).
|
|
4
|
+
*/
|
|
5
|
+
export declare function promptLogin(): Promise<string | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Show purchase pages for one or more locked packs and offer to open them in the browser. Used by
|
|
8
|
+
* compose when the selection includes paid packs the user does not own.
|
|
9
|
+
*/
|
|
10
|
+
export declare function promptPurchasePacks(packs: {
|
|
11
|
+
name: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
price: number;
|
|
14
|
+
}[]): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=access-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access-prompts.d.ts","sourceRoot":"","sources":["../../src/core/access-prompts.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqB1D;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCtH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Theme } from '../constants/themes.js';
|
|
2
|
+
/**
|
|
3
|
+
* Rewrite the `:root` and `.dark` color tokens in `css` according to `theme`.
|
|
4
|
+
* Non-color tokens (typography, sugar-high syntax, docs accents, code surface)
|
|
5
|
+
* outside the two blocks are left untouched, and tokens that those blocks define
|
|
6
|
+
* but the theme does not list are preserved. Idempotent: applying the same theme
|
|
7
|
+
* twice yields the same output.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyThemeToCss(css: string, theme: Theme): string;
|
|
10
|
+
export declare const THEME_STYLES_RELATIVE_PATH = "assets/styles.css";
|
|
11
|
+
/**
|
|
12
|
+
* Apply `theme` to the `assets/styles.css` of the frontend app rooted at
|
|
13
|
+
* `frontendRoot`. Returns true when the file was rewritten, false when the file
|
|
14
|
+
* is missing (the create flow keeps going in that case rather than failing).
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyThemeToProject(frontendRoot: string, theme: Theme): Promise<boolean>;
|
|
17
|
+
//# sourceMappingURL=apply-theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-theme.d.ts","sourceRoot":"","sources":["../../src/core/apply-theme.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,wBAAwB,CAAC;AAsDjE;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAyBjE;AAED,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAE9D;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAe9F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface CliIdentity {
|
|
2
|
+
email: string;
|
|
3
|
+
organizationId: string;
|
|
4
|
+
}
|
|
5
|
+
/** Resolve who a token belongs to. Returns null when the token is not accepted. */
|
|
6
|
+
export declare function fetchIdentity(token: string): Promise<CliIdentity | null>;
|
|
7
|
+
/** Revoke a token server-side. Best-effort; callers should still clear local state. */
|
|
8
|
+
export declare function revokeToken(token: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=auth-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-api.d.ts","sourceRoot":"","sources":["../../src/core/auth-api.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,mFAAmF;AACnF,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAU9E;AAED,uFAAuF;AACvF,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO9D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface StoredToken {
|
|
2
|
+
token: string;
|
|
3
|
+
email?: string;
|
|
4
|
+
organizationId?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Per-user config directory for the CLI. We deliberately keep tokens here, NOT in
|
|
8
|
+
* the project's `stack.json`, because `stack.json` is committed to the repo and a
|
|
9
|
+
* token is a secret. `HYPE_STACK_CONFIG_DIR` overrides the location (used by tests).
|
|
10
|
+
*/
|
|
11
|
+
export declare function getConfigDir(): string;
|
|
12
|
+
export declare function getAuthFilePath(): string;
|
|
13
|
+
export declare function readToken(apiUrl: string): Promise<StoredToken | null>;
|
|
14
|
+
export declare function writeToken(apiUrl: string, data: StoredToken): Promise<void>;
|
|
15
|
+
export declare function clearToken(apiUrl: string): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=auth-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-store.d.ts","sourceRoot":"","sources":["../../src/core/auth-store.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAYD;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAiBrC;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAiBD,wBAAsB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAG3E;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjF;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,wFAAqC,CAAC"}
|
package/dist/core/clone.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/core/clone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/core/clone.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAU3E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StackPaths } from '../types/types.js';
|
|
2
|
+
import { ExecResult } from '../utils/exec.js';
|
|
3
|
+
export type CodegenCommandRunner = (command: string, args: string[], options: {
|
|
4
|
+
cwd: string;
|
|
5
|
+
}) => Promise<ExecResult>;
|
|
6
|
+
/**
|
|
7
|
+
* After packs are installed, offer to run codegen so new Prisma models and the generated client
|
|
8
|
+
* are picked up. Prisma generate runs first because it needs no database; the migration runs
|
|
9
|
+
* second. Anything that can't run (declined, no backend, no database) falls back to printed
|
|
10
|
+
* instructions instead of failing the install. This is the shared mechanism templates reuse.
|
|
11
|
+
*/
|
|
12
|
+
export declare function promptPackCodegen(options: {
|
|
13
|
+
projectRoot: string;
|
|
14
|
+
paths: StackPaths;
|
|
15
|
+
skipPrompts: boolean;
|
|
16
|
+
runCommand?: CodegenCommandRunner;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=codegen.d.ts.map
|
|
@@ -0,0 +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;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,KACrB,OAAO,CAAC,UAAU,CAAC,CAAC;AAczB;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,oBAAoB,CAAC;CACnC,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ChB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { PackContextEntry, PackEnumEntry, PackEnvEntry, PackFile, PackFrontendRoute, PackNavbarAction, PackNavEntry, PackOnboardingStep, PackRoute, PackSdkConfiguration, PackSlot, PackSocket, StackPaths } from '../types/types.js';
|
|
2
|
+
export declare function patchEnv(env: PackEnvEntry[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
3
|
+
export declare function patchRoutes(routes: PackRoute[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
4
|
+
export declare function patchContext(context: PackContextEntry[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
5
|
+
export declare function patchEnums(enums: PackEnumEntry[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
6
|
+
export declare function patchSockets(sockets: PackSocket[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
7
|
+
export declare function patchSdkConfigurations(configurations: PackSdkConfiguration[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
8
|
+
export declare function patchFrontendUrl(frontendRoutes: PackFrontendRoute[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
9
|
+
export interface PatchNavConstantsOptions {
|
|
10
|
+
entries: PackNavEntry[];
|
|
11
|
+
paths: StackPaths;
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
/** App shell to target (frontend by default, admin when retargeted). */
|
|
14
|
+
slot?: PackSlot;
|
|
15
|
+
}
|
|
16
|
+
export declare function patchNavConstants(options: PatchNavConstantsOptions): Promise<void>;
|
|
17
|
+
export interface PatchPostLoginRedirectOptions {
|
|
18
|
+
/** Path the app should redirect to after login (e.g. /dashboard). */
|
|
19
|
+
postLoginRedirect: string;
|
|
20
|
+
paths: StackPaths;
|
|
21
|
+
projectRoot: string;
|
|
22
|
+
/** App shell to target (frontend by default, admin when retargeted). */
|
|
23
|
+
slot?: PackSlot;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Rewrite the starter's `POST_LOGIN_REDIRECT_PATH` constant to the manifest-declared
|
|
27
|
+
* path so login lands on the right authenticated page (e.g. /dashboard for a template
|
|
28
|
+
* whose public landing owns /). No-op when the constants file is absent (no starter
|
|
29
|
+
* installed) or the constant isn't found, so the codemod is safe to run unconditionally.
|
|
30
|
+
*/
|
|
31
|
+
export declare function patchPostLoginRedirect(options: PatchPostLoginRedirectOptions): Promise<void>;
|
|
32
|
+
export declare function patchOnboardingSteps(steps: PackOnboardingStep[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
33
|
+
export interface PatchActionsOptions {
|
|
34
|
+
actions: PackNavbarAction[];
|
|
35
|
+
paths: StackPaths;
|
|
36
|
+
projectRoot: string;
|
|
37
|
+
/** App shell to target (frontend by default, admin when retargeted). */
|
|
38
|
+
slot?: PackSlot;
|
|
39
|
+
}
|
|
40
|
+
export declare function patchNavbarActions(options: PatchActionsOptions): Promise<void>;
|
|
41
|
+
export declare function patchUserMenuActions(options: PatchActionsOptions): Promise<void>;
|
|
42
|
+
interface RewritePackScopeOptions {
|
|
43
|
+
files: PackFile[];
|
|
44
|
+
paths: StackPaths;
|
|
45
|
+
projectRoot: string;
|
|
46
|
+
projectName: string;
|
|
47
|
+
}
|
|
48
|
+
export declare function rewritePackScope(options: RewritePackScopeOptions): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Rewrite the `@hype-stack/` scope to `@<projectName>/` across every source file under `rootDir`.
|
|
51
|
+
* `create` only renames the scope inside package.json, so base-template source files (e.g.
|
|
52
|
+
* `app.constants.ts` importing `@hype-stack/enums`) keep dangling specifiers once the workspace
|
|
53
|
+
* packages are renamed. This walks the freshly cloned tree and fixes those imports so they match
|
|
54
|
+
* the renamed package names. Pack files are handled separately by `rewritePackScope`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function rewriteScopeInTree(rootDir: string, projectName: string): Promise<void>;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=codemods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codemods.d.ts","sourceRoot":"","sources":["../../src/core/codemods.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAc3B,wBAAsB,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzG;AA6ED,wBAAsB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc5G;AAmCD,wBAAsB,YAAY,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBrH;AA8ED,wBAAsB,UAAU,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY9G;AAoBD,wBAAsB,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,EA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QAAQ,CAAC;CACjB;AAED,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtF;AA6ED,UAAU,uBAAuB;IAC/B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBtF;AAID;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/core/device.ts"],"names":[],"mappings":"AAkBA,wBAAgB,oBAAoB,IAAI,MAAM,CAG7C;AAED,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}
|
|
@@ -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":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,UAAU,cAAc;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB;AAcD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,WAAW,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA8CjG;AAqFD,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB/F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-files.d.ts","sourceRoot":"","sources":["../../src/core/env-files.ts"],"names":[],"mappings":"AAOA,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiB1E"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { PackManifest, PackSlot, StackConfig, TemplateManifest } from '../types/types.js';
|
|
2
|
+
export interface InstallResult {
|
|
3
|
+
installed: string[];
|
|
4
|
+
skipped: string[];
|
|
5
|
+
errors: string[];
|
|
6
|
+
}
|
|
7
|
+
interface PackInstallOptions {
|
|
8
|
+
manifest: PackManifest;
|
|
9
|
+
config: StackConfig;
|
|
10
|
+
projectRoot: string;
|
|
11
|
+
force: boolean;
|
|
12
|
+
/** Resolved target paths the user explicitly approved overwriting (in addition to `force`). */
|
|
13
|
+
overwrite?: Set<string>;
|
|
14
|
+
/** Directory holding the pack files downloaded from the backend. */
|
|
15
|
+
packDir: string;
|
|
16
|
+
/** Selected slots for this pack, used to scope which file entries install. */
|
|
17
|
+
slots?: PackSlot[];
|
|
18
|
+
}
|
|
19
|
+
export interface FileConflict {
|
|
20
|
+
/** Pack the conflicting file belongs to. */
|
|
21
|
+
packName: string;
|
|
22
|
+
/** The manifest target template, for display. */
|
|
23
|
+
target: string;
|
|
24
|
+
/** Resolved absolute path of the file that already exists. */
|
|
25
|
+
targetPath: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Find every file that `applyPackInstall` would silently skip because its target already exists.
|
|
29
|
+
* Only `create` files can conflict: `skip-if-exists` is an intentional no-op and `merge` edits the
|
|
30
|
+
* existing file in place. Deduplicated by resolved path so the same target is never reported twice.
|
|
31
|
+
*/
|
|
32
|
+
export declare function findInstallConflicts(options: {
|
|
33
|
+
packs: PreparedPack[];
|
|
34
|
+
config: StackConfig;
|
|
35
|
+
projectRoot: string;
|
|
36
|
+
/** Per-pack selected slots, used to scope which files count as conflicts. */
|
|
37
|
+
slotsByPack?: Map<string, PackSlot[]>;
|
|
38
|
+
}): Promise<FileConflict[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Validate one pack's file mappings without writing. Returns the list of blocking errors
|
|
41
|
+
* (missing sources, missing merge markers, unknown strategies). An empty array means the pack
|
|
42
|
+
* is safe to apply.
|
|
43
|
+
*/
|
|
44
|
+
export declare function planPackInstall(options: PackInstallOptions): Promise<string[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Apply one pack: copy its files to the project and run every codemod the manifest declares
|
|
47
|
+
* (routes, context, sockets, sdk configurations, enums, env, nav, onboarding, scope rewrite).
|
|
48
|
+
* Assumes the pack has already been validated with `planPackInstall`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function applyPackInstall(options: PackInstallOptions): Promise<InstallResult>;
|
|
51
|
+
export interface PreparedPack {
|
|
52
|
+
manifest: PackManifest;
|
|
53
|
+
/** Directory holding the pack files downloaded from the backend. */
|
|
54
|
+
packDir: string;
|
|
55
|
+
}
|
|
56
|
+
export interface InstallPlanResult {
|
|
57
|
+
installed: string[];
|
|
58
|
+
skipped: string[];
|
|
59
|
+
errors: string[];
|
|
60
|
+
/** Packs that were applied and marked installed, in install order. */
|
|
61
|
+
appliedPacks: string[];
|
|
62
|
+
/** True when validation failed and nothing was written. */
|
|
63
|
+
aborted: boolean;
|
|
64
|
+
/** The config after marking each applied pack installed. */
|
|
65
|
+
config: StackConfig;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Install a set of prepared packs as one unit. Validates every pack first and aborts before
|
|
69
|
+
* writing anything if any pack fails validation, so a bad plan never leaves a half-modified
|
|
70
|
+
* project. On success, applies each pack in order and marks it installed immediately, so a
|
|
71
|
+
* re-run resumes cleanly after a mid-apply failure.
|
|
72
|
+
*/
|
|
73
|
+
export declare function installPlan(options: {
|
|
74
|
+
packs: PreparedPack[];
|
|
75
|
+
config: StackConfig;
|
|
76
|
+
projectRoot: string;
|
|
77
|
+
force: boolean;
|
|
78
|
+
/** Resolved target paths the user explicitly approved overwriting (in addition to `force`). */
|
|
79
|
+
overwrite?: Set<string>;
|
|
80
|
+
/** Per-pack selected slots, used to scope which file entries install for each pack. */
|
|
81
|
+
slotsByPack?: Map<string, PackSlot[]>;
|
|
82
|
+
}): Promise<InstallPlanResult>;
|
|
83
|
+
export declare function markPackInstalled(config: StackConfig, packName: string, projectRoot: string): Promise<StackConfig>;
|
|
84
|
+
export interface TemplateOverlayResult {
|
|
85
|
+
installed: string[];
|
|
86
|
+
errors: string[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Apply a template's frontend overlay after every pack has landed. Template
|
|
90
|
+
* files use the `override` strategy to take responsibility for a path a pack
|
|
91
|
+
* shipped (or `create` for files no pack ships, like the landing route), and
|
|
92
|
+
* this pass runs last so the template always wins. It also runs the template's
|
|
93
|
+
* frontend-route and nav codemods so the generated app knows about the new
|
|
94
|
+
* routes (e.g. `/landing`) and sidebar entries.
|
|
95
|
+
*/
|
|
96
|
+
export declare function applyTemplateOverlay(options: {
|
|
97
|
+
manifest: TemplateManifest;
|
|
98
|
+
config: StackConfig;
|
|
99
|
+
projectRoot: string;
|
|
100
|
+
/** Directory holding the template override files downloaded from the backend. */
|
|
101
|
+
templateDir: string;
|
|
102
|
+
}): Promise<TemplateOverlayResult>;
|
|
103
|
+
export {};
|
|
104
|
+
//# sourceMappingURL=installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/core/installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,YAAY,EACZ,QAAQ,EACR,WAAW,EAEX,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAoB3B,MAAM,WAAW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* (not the API URL). Locally the web app and API live on different ports; in production they share
|
|
4
|
+
* a host and `getWebUrl()` falls back to the API URL.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getPurchaseUrl(packName: string): string;
|
|
7
|
+
//# sourceMappingURL=license.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/core/license.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StoredToken } from './auth-store.js';
|
|
2
|
+
export interface LoginCallbacks {
|
|
3
|
+
/** Called with the authorize URL once the local server is listening. */
|
|
4
|
+
onUrl?: (url: string) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Loopback browser login. We start a throwaway HTTP server on 127.0.0.1, open the
|
|
8
|
+
* web authorize page pointed at it, and wait for the browser to redirect back with
|
|
9
|
+
* a token. Only a process on this machine can reach the callback, and we verify the
|
|
10
|
+
* `state` we generated before trusting anything.
|
|
11
|
+
*/
|
|
12
|
+
export declare function loginViaBrowser(callbacks?: LoginCallbacks): Promise<StoredToken>;
|
|
13
|
+
//# sourceMappingURL=login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/core/login.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,iBAAiB,CAAC;AAM/D,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAOD;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,SAAS,GAAE,cAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,CA+E1F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StackPaths } from '../types/types.js';
|
|
2
|
+
import { ExecResult } from '../utils/exec.js';
|
|
3
|
+
/** One workspace package (`--dir`) and specs for `pnpm add spec1 spec2 ...`. */
|
|
4
|
+
export interface NpmInstallOperation {
|
|
5
|
+
/** Path relative to the project root (as in stack.json), e.g. `apps/backend` */
|
|
6
|
+
relativeDir: string;
|
|
7
|
+
/** Each entry is `<package>@<range>`, suitable for `pnpm add` arguments */
|
|
8
|
+
specs: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface PreparePackNpmInstallsResult {
|
|
11
|
+
errors: string[];
|
|
12
|
+
operations: NpmInstallOperation[];
|
|
13
|
+
}
|
|
14
|
+
/** Validate manifest `dependencies_npm` against `paths` and build p/npm install operations. */
|
|
15
|
+
export declare function preparePackNpmInstalls(dependenciesNpm: Record<string, Record<string, string>> | undefined, paths: StackPaths): PreparePackNpmInstallsResult;
|
|
16
|
+
/**
|
|
17
|
+
* Merge several packs' `dependencies_npm` into one record, so a multi-pack install runs `pnpm add`
|
|
18
|
+
* once per workspace instead of once per pack. When two packs request the same package for the same
|
|
19
|
+
* app, the last one wins (versions are pinned by the registry, so collisions are expected to match).
|
|
20
|
+
*/
|
|
21
|
+
export declare function mergePackNpmDependencies(dependenciesNpmList: (Record<string, Record<string, string>> | undefined)[]): Record<string, Record<string, string>>;
|
|
22
|
+
export type NpmDepsCommandRunner = (command: string, args: string[], options: {
|
|
23
|
+
cwd: string;
|
|
24
|
+
onData?: (line: string) => void;
|
|
25
|
+
}) => Promise<ExecResult>;
|
|
26
|
+
export interface PackNpmInstallResult {
|
|
27
|
+
ok: boolean;
|
|
28
|
+
errors: string[];
|
|
29
|
+
}
|
|
30
|
+
/** Run `pnpm add` once per workspace package; must be invoked from workspace root (`projectRoot`). */
|
|
31
|
+
export declare function installPackNpmDependencies(operations: NpmInstallOperation[], projectRoot: string, runCommand?: NpmDepsCommandRunner): Promise<PackNpmInstallResult>;
|
|
32
|
+
//# sourceMappingURL=npm-deps.d.ts.map
|
|
@@ -0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wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,mBAAmB,EAAE,EACjC,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,oBAA2B,GACtC,OAAO,CAAC,oBAAoB,CAAC,CAiC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-browser.d.ts","sourceRoot":"","sources":["../../src/core/open-browser.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAS7C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PackCategory, PackListItem, PackSlot } from '../types/types.js';
|
|
2
|
+
/** How a category is chosen in the compose picker. */
|
|
3
|
+
export type ChoiceMode = "single" | "multiple";
|
|
4
|
+
export interface PackChoiceGroup {
|
|
5
|
+
category: PackCategory;
|
|
6
|
+
/** Heading shown above the prompt. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Single-choice categories use a radio select; multiple uses a multiselect. */
|
|
9
|
+
mode: ChoiceMode;
|
|
10
|
+
/** Packs offered in this group, in catalog order. */
|
|
11
|
+
packs: PackListItem[];
|
|
12
|
+
/** Pack name to highlight by default for single-choice groups, or null. */
|
|
13
|
+
preselect: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* App shell this group targets. Layout packs are installed per slot so the
|
|
16
|
+
* frontend and the admin app can pick different shells. Omitted for non-layout
|
|
17
|
+
* groups (starter, features), which install without a slot.
|
|
18
|
+
*/
|
|
19
|
+
slot?: PackSlot;
|
|
20
|
+
}
|
|
21
|
+
/** Fixed order the picker walks the modules in: foundation first, then shell, then add-ons. */
|
|
22
|
+
export declare const CATEGORY_ORDER: PackCategory[];
|
|
23
|
+
export interface BuildPackChoiceGroupsOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Whether the project has an `apps/admin` to install a layout into. When true and
|
|
26
|
+
* layout packs are on offer, a second single-choice "Admin Layout" group is emitted
|
|
27
|
+
* (slot `admin`) alongside the frontend layout group.
|
|
28
|
+
*/
|
|
29
|
+
adminAvailable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Group the selectable packs into ordered choice groups for the compose picker.
|
|
33
|
+
* Starter and Layout are single-choice; Features is multiselect. Layout defaults
|
|
34
|
+
* to Basic when it is on offer. When `adminAvailable` is set, a second layout group
|
|
35
|
+
* is emitted so the admin app gets its own independent layout pick. Categories with
|
|
36
|
+
* no selectable packs are dropped, so a fully-installed module never shows an empty
|
|
37
|
+
* prompt.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildPackChoiceGroups(selectable: PackListItem[], options?: BuildPackChoiceGroupsOptions): PackChoiceGroup[];
|
|
40
|
+
//# sourceMappingURL=pack-categories.d.ts.map
|
|
@@ -0,0 +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;AAc/E,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,CAqBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-clone.d.ts","sourceRoot":"","sources":["../../src/core/post-clone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post-clone.d.ts","sourceRoot":"","sources":["../../src/core/post-clone.ts"],"names":[],"mappings":"AAwBA,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;AAED,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBnE;AAED,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCvF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface PostSetupOptions {
|
|
2
|
+
postgresCheckIntervalMs?: number;
|
|
3
|
+
postgresMaxAttempts?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function promptDockerAndMigrations(targetDir: string, skipPrompts: boolean, options?: PostSetupOptions): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=post-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-setup.d.ts","sourceRoot":"","sources":["../../src/core/post-setup.ts"],"names":[],"mappings":"AAgEA,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CA6Ef"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CodeEditor, DetectedWorkspace } from '../types/types.js';
|
|
2
|
+
export interface ReadmeOptions {
|
|
3
|
+
projectName: string;
|
|
4
|
+
editor: CodeEditor;
|
|
5
|
+
workspace: DetectedWorkspace;
|
|
6
|
+
}
|
|
7
|
+
export declare function toDisplayName(projectName: string): string;
|
|
8
|
+
export declare function generateReadme(options: ReadmeOptions): string;
|
|
9
|
+
export declare function writeReadme(projectDir: string, options: ReadmeOptions): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=readme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readme.d.ts","sourceRoot":"","sources":["../../src/core/readme.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAwBD,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAMzD;AAWD,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CA+I7D;AAED,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3F"}
|