@hype-stack/cli 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cli-CPOgUkiJ.js +4056 -0
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/commands/compose.d.ts +3 -0
  4. package/dist/commands/compose.d.ts.map +1 -0
  5. package/dist/commands/create.d.ts +1 -1
  6. package/dist/commands/create.d.ts.map +1 -1
  7. package/dist/commands/init.d.ts +1 -1
  8. package/dist/commands/init.d.ts.map +1 -1
  9. package/dist/commands/login.d.ts +2 -0
  10. package/dist/commands/login.d.ts.map +1 -0
  11. package/dist/commands/logout.d.ts +2 -0
  12. package/dist/commands/logout.d.ts.map +1 -0
  13. package/dist/config/bin.d.ts.map +1 -0
  14. package/dist/config/bin.js +2440 -0
  15. package/dist/config/env.d.ts +9 -0
  16. package/dist/config/env.d.ts.map +1 -0
  17. package/dist/constants/constants.d.ts +60 -0
  18. package/dist/constants/constants.d.ts.map +1 -0
  19. package/dist/core/access-prompts.d.ts +15 -0
  20. package/dist/core/access-prompts.d.ts.map +1 -0
  21. package/dist/core/auth-api.d.ts +9 -0
  22. package/dist/core/auth-api.d.ts.map +1 -0
  23. package/dist/core/auth-store.d.ts +16 -0
  24. package/dist/core/auth-store.d.ts.map +1 -0
  25. package/dist/core/client.d.ts +2 -0
  26. package/dist/core/client.d.ts.map +1 -0
  27. package/dist/core/clone.d.ts.map +1 -1
  28. package/dist/core/codegen.d.ts +18 -0
  29. package/dist/core/codegen.d.ts.map +1 -0
  30. package/dist/core/codemods.d.ts +19 -0
  31. package/dist/core/codemods.d.ts.map +1 -0
  32. package/dist/core/device.d.ts +3 -0
  33. package/dist/core/device.d.ts.map +1 -0
  34. package/dist/core/editor-config.d.ts +1 -1
  35. package/dist/core/editor-config.d.ts.map +1 -1
  36. package/dist/core/env-files.d.ts +2 -0
  37. package/dist/core/env-files.d.ts.map +1 -0
  38. package/dist/core/installer.d.ts +57 -0
  39. package/dist/core/installer.d.ts.map +1 -0
  40. package/dist/core/license.d.ts +2 -0
  41. package/dist/core/license.d.ts.map +1 -0
  42. package/dist/core/login.d.ts +13 -0
  43. package/dist/core/login.d.ts.map +1 -0
  44. package/dist/core/npm-deps.d.ts +32 -0
  45. package/dist/core/npm-deps.d.ts.map +1 -0
  46. package/dist/core/open-browser.d.ts +2 -0
  47. package/dist/core/open-browser.d.ts.map +1 -0
  48. package/dist/core/post-setup.d.ts +6 -0
  49. package/dist/core/post-setup.d.ts.map +1 -0
  50. package/dist/core/readme.d.ts +10 -0
  51. package/dist/core/readme.d.ts.map +1 -0
  52. package/dist/core/registry.d.ts +35 -0
  53. package/dist/core/registry.d.ts.map +1 -0
  54. package/dist/core/resolve.d.ts +44 -0
  55. package/dist/core/resolve.d.ts.map +1 -0
  56. package/dist/core/stack-config.d.ts +3 -1
  57. package/dist/core/stack-config.d.ts.map +1 -1
  58. package/dist/index.d.ts +7 -5
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +2 -2
  61. package/dist/types/types.d.ts +177 -0
  62. package/dist/types/types.d.ts.map +1 -0
  63. package/dist/ui/banner.d.ts.map +1 -1
  64. package/dist/ui/logger.d.ts.map +1 -1
  65. package/dist/ui/theme.d.ts.map +1 -1
  66. package/package.json +15 -11
  67. package/dist/bin.d.ts.map +0 -1
  68. package/dist/bin.js +0 -5
  69. package/dist/cli-B_f7CCee.js +0 -548
  70. package/dist/commands/add.d.ts +0 -2
  71. package/dist/commands/add.d.ts.map +0 -1
  72. package/dist/constants.d.ts +0 -30
  73. package/dist/constants.d.ts.map +0 -1
  74. package/dist/types.d.ts +0 -23
  75. package/dist/types.d.ts.map +0 -1
  76. /package/dist/{bin.d.ts → config/bin.d.ts} +0 -0
@@ -0,0 +1,9 @@
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
+ HYPE_STACK_LICENSE_KEY: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type CliEnv = z.infer<typeof envSchema>;
8
+ export declare const validateEnv: () => CliEnv;
9
+ //# 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;;;;iBAIpB,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,60 @@
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://hypestack.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
+ /** Env var for the license key used to validate paid pack installs */
11
+ export declare const LICENSE_KEY_ENV = "HYPE_STACK_LICENSE_KEY";
12
+ /** API path for license validation */
13
+ export declare const LICENSE_VALIDATE_PATH = "/api/licenses/validate";
14
+ /** API path for the pack registry (list of all available packs) */
15
+ export declare const REGISTRY_PATH = "/api/registry";
16
+ /** API path template for a pack's manifest - replace :packId with the actual ID */
17
+ export declare const PACK_MANIFEST_PATH = "/api/packs/:packId/manifest.json";
18
+ /** API path template for a pack's file archive */
19
+ export declare const PACK_FILES_PATH = "/api/packs/:packId/files.tar.gz";
20
+ /** Marker comment written into schema.prisma after a pack's models are applied */
21
+ export declare const PRISMA_PATCH_COMMENT_PREFIX = "// --- ";
22
+ /** Default alias paths used when not overridden in stack.json */
23
+ export declare const DEFAULT_ALIASES: {
24
+ readonly backendSrc: "apps/backend/src";
25
+ readonly frontendSrc: "apps/frontend/src";
26
+ readonly prismaSchema: "apps/backend/prisma/schema.prisma";
27
+ readonly middleware: "apps/backend/src/middleware";
28
+ readonly libs: "apps/backend/src/libs";
29
+ readonly utils: "apps/backend/src/utils";
30
+ readonly backendFeatures: "apps/backend/src/features";
31
+ readonly frontendFeatures: "apps/frontend/src/features";
32
+ };
33
+ export declare const PROJECT_NAME_REGEX: RegExp;
34
+ export declare const EDITOR_CHOICES: readonly [{
35
+ readonly value: "cursor";
36
+ readonly label: "Cursor";
37
+ readonly hint: "default";
38
+ }, {
39
+ readonly value: "claude";
40
+ readonly label: "Claude Code";
41
+ }, {
42
+ readonly value: "windsurf";
43
+ readonly label: "Windsurf";
44
+ }, {
45
+ readonly value: "copilot";
46
+ readonly label: "GitHub Copilot";
47
+ }];
48
+ export declare const VALID_EDITORS: ("cursor" | "claude" | "windsurf" | "copilot")[];
49
+ export declare const CURSOR_RULES_DIR = ".cursor/rules";
50
+ export declare const CURSOR_DIR = ".cursor";
51
+ export declare const AGENTS_DIR = ".agents";
52
+ export declare function getApiUrl(): string;
53
+ export declare function getWebUrl(): string;
54
+ export declare function validateApiUrl(url: string): void;
55
+ export declare function getSchemaUrl(): string;
56
+ export declare function getRegistryUrl(): string;
57
+ export declare function getLicenseValidateUrl(): string;
58
+ export declare function getPackManifestUrl(packId: string): string;
59
+ export declare function getPackFilesUrl(packId: string): string;
60
+ //# 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,eAA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,MAAM,GAAG,MAAM,CAEtD"}
@@ -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,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,2 @@
1
+ export declare const client: import('@hyper-fetch/core').Client<Error, import('@hyper-fetch/core').HttpAdapterType>;
2
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,wFAAqC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"clone.d.ts","sourceRoot":"","sources":["../../src/core/clone.ts"],"names":[],"mappings":"AAGA,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"}
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,19 @@
1
+ import { PackContextEntry, PackEnumEntry, PackEnvEntry, PackFile, PackFrontendRoute, PackNavbarAction, PackNavEntry, PackOnboardingStep, PackRoute, 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 patchFrontendUrl(frontendRoutes: PackFrontendRoute[], paths: StackPaths, projectRoot: string): Promise<void>;
8
+ export declare function patchNavConstants(entries: PackNavEntry[], paths: StackPaths, projectRoot: string): Promise<void>;
9
+ export declare function patchOnboardingSteps(steps: PackOnboardingStep[], paths: StackPaths, projectRoot: string): Promise<void>;
10
+ export declare function patchNavbarActions(actions: PackNavbarAction[], paths: StackPaths, projectRoot: string): Promise<void>;
11
+ interface RewritePackScopeOptions {
12
+ files: PackFile[];
13
+ paths: StackPaths;
14
+ projectRoot: string;
15
+ projectName: string;
16
+ }
17
+ export declare function rewritePackScope(options: RewritePackScopeOptions): Promise<void>;
18
+ export {};
19
+ //# 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,UAAU,EACV,UAAU,EACX,MAAM,mBAAmB,CAAC;AAS3B,wBAAsB,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCzG;AAyDD,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;AA0DD,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,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB/G;AAoDD,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,iBAAiB,EAAE,EACnC,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAiBf;AA2DD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,YAAY,EAAE,EACvB,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAqBf;AAgHD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,kBAAkB,EAAE,EAC3B,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAef;AA+DD,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,gBAAgB,EAAE,EAC3B,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAqBf;AAkDD,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"}
@@ -0,0 +1,3 @@
1
+ export declare function getDeviceFingerprint(): string;
2
+ export declare function getClientInfo(): string;
3
+ //# sourceMappingURL=device.d.ts.map
@@ -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,4 +1,4 @@
1
- import { CodeEditor } from '../types.js';
1
+ import { CodeEditor } from '../types/types.js';
2
2
  interface MdcFrontmatter {
3
3
  description?: string;
4
4
  globs: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"editor-config.d.ts","sourceRoot":"","sources":["../../src/core/editor-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,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,CA2CjG;AAqFD,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB/F"}
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,2 @@
1
+ export declare function createEnvFiles(projectDir: string): Promise<string[]>;
2
+ //# sourceMappingURL=env-files.d.ts.map
@@ -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,57 @@
1
+ import { PackManifest, StackConfig } 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
+ /** Directory holding the pack files downloaded from the backend. */
13
+ packDir: string;
14
+ }
15
+ /**
16
+ * Validate one pack's file mappings without writing. Returns the list of blocking errors
17
+ * (missing sources, missing merge markers, unknown strategies). An empty array means the pack
18
+ * is safe to apply.
19
+ */
20
+ export declare function planPackInstall(options: PackInstallOptions): Promise<string[]>;
21
+ /**
22
+ * Apply one pack: copy its files to the project and run every codemod the manifest declares
23
+ * (routes, context, sockets, enums, env, nav, onboarding, scope rewrite). Assumes the pack has
24
+ * already been validated with `planPackInstall`.
25
+ */
26
+ export declare function applyPackInstall(options: PackInstallOptions): Promise<InstallResult>;
27
+ export interface PreparedPack {
28
+ manifest: PackManifest;
29
+ /** Directory holding the pack files downloaded from the backend. */
30
+ packDir: string;
31
+ }
32
+ export interface InstallPlanResult {
33
+ installed: string[];
34
+ skipped: string[];
35
+ errors: string[];
36
+ /** Packs that were applied and marked installed, in install order. */
37
+ appliedPacks: string[];
38
+ /** True when validation failed and nothing was written. */
39
+ aborted: boolean;
40
+ /** The config after marking each applied pack installed. */
41
+ config: StackConfig;
42
+ }
43
+ /**
44
+ * Install a set of prepared packs as one unit. Validates every pack first and aborts before
45
+ * writing anything if any pack fails validation, so a bad plan never leaves a half-modified
46
+ * project. On success, applies each pack in order and marks it installed immediately, so a
47
+ * re-run resumes cleanly after a mid-apply failure.
48
+ */
49
+ export declare function installPlan(options: {
50
+ packs: PreparedPack[];
51
+ config: StackConfig;
52
+ projectRoot: string;
53
+ force: boolean;
54
+ }): Promise<InstallPlanResult>;
55
+ export declare function markPackInstalled(config: StackConfig, packName: string, projectRoot: string): Promise<StackConfig>;
56
+ export {};
57
+ //# sourceMappingURL=installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"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AC;CAChB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA2C7B;AAED,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAOxH"}
@@ -0,0 +1,2 @@
1
+ export declare function getPurchaseUrl(packName: string): string;
2
+ //# sourceMappingURL=license.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../src/core/license.ts"],"names":[],"mappings":"AAEA,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,CAwE1F"}
@@ -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,0 +1 @@
1
+ {"version":3,"file":"npm-deps.d.ts","sourceRoot":"","sources":["../../src/core/npm-deps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,mBAAmB,EAAE,CAAC;CACnC;AAED,+FAA+F;AAC/F,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EACnE,KAAK,EAAE,UAAU,GAChB,4BAA4B,CA+B9B;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,mBAAmB,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GAC1E,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAYxC;AAED,MAAM,MAAM,oBAAoB,GAAG,CACjC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IACP,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,KACE,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,sGAAsG;AACtG,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,2 @@
1
+ export declare function openBrowser(url: string): void;
2
+ //# sourceMappingURL=open-browser.d.ts.map
@@ -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,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"}
@@ -0,0 +1,35 @@
1
+ import { PackAuthorizationMap, PackDownloadResult, PackListItem, PackManifest, StackConfig, StackPaths } from '../types/types.js';
2
+ /**
3
+ * Fetch a pack manifest from the backend. The registry is NEVER read from disk by the CLI - all
4
+ * pack content comes through the API so paid packs stay behind the license gate.
5
+ */
6
+ export declare function loadPackManifest(packName: string): Promise<PackManifest>;
7
+ /**
8
+ * Download a pack's files from the backend into a fresh temp directory.
9
+ *
10
+ * For paid packs the backend authorizes before sending a single byte, via either a logged-in CLI
11
+ * token (browser login) or a license key (CI). There is no way to install a paid pack without
12
+ * access. The caller is responsible for removing the returned `packDir` once installation finishes.
13
+ */
14
+ export declare function downloadPack(packName: string, auth?: {
15
+ licenseKey?: string | null;
16
+ token?: string | null;
17
+ }): Promise<PackDownloadResult>;
18
+ export declare function resolveTargetPath(target: string, paths: StackPaths, projectRoot: string): string;
19
+ export declare function resolveSourcePath(source: string, packDir: string): string;
20
+ export declare function checkDependencies(manifest: PackManifest, installedPacks: string[]): {
21
+ satisfied: boolean;
22
+ missing: string[];
23
+ };
24
+ export declare function isPackInstalled(packName: string, config: StackConfig): boolean;
25
+ export declare function fetchPackList(): Promise<PackListItem[]>;
26
+ /**
27
+ * Classify a set of packs as owned or locked for the compose picker. This is a non-mutating
28
+ * pre-flight check: the backend never serves source or touches download counters here, it only
29
+ * reports access so the CLI can render free/owned/paid states and gate the upsell flow.
30
+ */
31
+ export declare function authorizePacks(packNames: string[], auth?: {
32
+ token?: string | null;
33
+ key?: string | null;
34
+ }): Promise<PackAuthorizationMap>;
35
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.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"}
@@ -0,0 +1,44 @@
1
+ import { PackListItem } from '../types/types.js';
2
+ export interface PackNode {
3
+ name: string;
4
+ dependencies: string[];
5
+ }
6
+ export type PackGraph = Map<string, PackNode>;
7
+ /** Build a dependency graph from the pack list returned by the backend. */
8
+ export declare function buildPackGraph(packs: PackListItem[]): PackGraph;
9
+ /**
10
+ * Topologically order a single pack and its transitive dependencies, dependencies first.
11
+ * Packs already in `resolved` are skipped. Throws on a circular dependency or an unknown pack.
12
+ * Mirrors the registry's `resolveDependencyOrder` so the CLI installs in the same order the
13
+ * dev sandbox does.
14
+ */
15
+ export declare function resolveDependencyOrder(name: string, graph: PackGraph, resolved?: Set<string>): string[];
16
+ export interface InstallPlan {
17
+ /** Packs to install, dependencies first, with already-installed packs removed. */
18
+ order: string[];
19
+ /** Selected packs that are already installed (nothing to do for them). */
20
+ alreadyInstalled: string[];
21
+ }
22
+ /**
23
+ * Resolve the full install order for a selection of packs. Pulls in transitive dependencies,
24
+ * removes packs already present in the project, and deduplicates shared dependencies.
25
+ */
26
+ export declare function resolveInstallPlan(selected: string[], graph: PackGraph, installed?: string[]): InstallPlan;
27
+ export interface AccessPartition {
28
+ /** Packs from the order that can be installed (not locked, no locked dependency). */
29
+ installable: string[];
30
+ /** Packs that cannot install because they, or one of their dependencies, is locked. */
31
+ blocked: string[];
32
+ }
33
+ /**
34
+ * Split an install order into what can be installed now versus what is blocked. A pack is blocked
35
+ * if it is locked (paid and unowned), or if any of its not-yet-installed dependencies is blocked.
36
+ * Because `order` is dependency-first, a single forward pass is enough.
37
+ */
38
+ export declare function partitionByAccess(options: {
39
+ order: string[];
40
+ graph: PackGraph;
41
+ isLocked: (name: string) => boolean;
42
+ installed?: string[];
43
+ }): AccessPartition;
44
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/core/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE9C,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,SAAS,CAM/D;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,GAAE,GAAG,CAAC,MAAM,CAAa,GAAG,MAAM,EAAE,CA0BlH;AAED,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAE,MAAM,EAAO,GAAG,WAAW,CAkB9G;AAED,MAAM,WAAW,eAAe;IAC9B,qFAAqF;IACrF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,uFAAuF;IACvF,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,eAAe,CAiBlB"}
@@ -1,9 +1,11 @@
1
- import { DetectedWorkspace, StackConfig } from '../types.js';
1
+ import { DetectedWorkspace, StackConfig, StackPaths } from '../types/types.js';
2
2
  export declare function loadStackConfig(cwd: string): Promise<StackConfig | null>;
3
3
  export declare function hasStackConfig(cwd: string): Promise<boolean>;
4
4
  export declare function writeStackConfig(cwd: string, config: StackConfig): Promise<void>;
5
5
  export declare function detectWorkspace(cwd: string): Promise<DetectedWorkspace>;
6
+ export declare function getDefaultPaths(workspace: DetectedWorkspace): StackPaths;
6
7
  export declare function createStackConfig(name: string, workspace: DetectedWorkspace): StackConfig;
7
8
  export declare function ensureStackConfig(cwd: string): Promise<StackConfig | null>;
8
9
  export declare function isHypeStackProject(cwd: string): Promise<boolean>;
10
+ export declare function resolvePathTemplate(template: string, paths: StackPaths): string;
9
11
  //# sourceMappingURL=stack-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-config.d.ts","sourceRoot":"","sources":["../../src/core/stack-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGlE,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAG9E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGlE;AAED,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtF;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAO7E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,WAAW,CAQzF;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAMhF;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOtE"}
1
+ {"version":3,"file":"stack-config.d.ts","sourceRoot":"","sources":["../../src/core/stack-config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpF,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAG9E;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGlE;AAED,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtF;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAO7E;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,iBAAiB,GAAG,UAAU,CA4BxE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,WAAW,CAWzF;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAMhF;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOtE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAY/E"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- export { createProgram } from './cli.js';
2
- export { createCommand } from './commands/create.js';
3
- export { initCommand, ensureInit } from './commands/init.js';
4
- export { addCommand } from './commands/add.js';
5
- export type { StackConfig, CreateOptions, InitOptions, DetectedWorkspace, CodeEditor } from './types.js';
1
+ export { createProgram } from './cli';
2
+ export { createCommand } from './commands/create';
3
+ export { initCommand, ensureInit } from './commands/init';
4
+ export { composeCommand } from './commands/compose';
5
+ export { loginCommand } from './commands/login';
6
+ export { logoutCommand } from './commands/logout';
7
+ export type { StackConfig, CreateOptions, InitOptions, DetectedWorkspace, CodeEditor, StackPaths, AppPaths, PackManifest, PackFile, PackTier, FileStrategy, PackValidationResult, PackListItem, PackAuthorization, PackAuthorizationMap, ComposeOptions, } from './types/types';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,GACf,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./cli-B_f7CCee.js";
2
- export { n as addCommand, e as createCommand, i as createProgram, r as ensureInit, t as initCommand };
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-CPOgUkiJ.js";
2
+ export { e as composeCommand, t as createCommand, o as createProgram, r as ensureInit, a as initCommand, i as loginCommand, n as logoutCommand };