@hype-stack/cli 0.5.17 → 0.5.19
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-CpvJkOtv.js → cli-ZWQz14xS.js} +941 -878
- package/dist/commands/compose.d.ts.map +1 -1
- package/dist/commands/template.d.ts.map +1 -1
- package/dist/config/bin.js +1 -1
- package/dist/core/codemods.d.ts +22 -6
- package/dist/core/codemods.d.ts.map +1 -1
- package/dist/core/post-clone.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/commands/compose.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,cAAc,EAEd,aAAa,EAEb,WAAW,EAEZ,MAAM,mBAAmB,CAAC;AAoB3B,wBAAsB,cAAc,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6NhF;AAmFD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAIhE;AAED,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CAShE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,WAAW,CAYxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/commands/template.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAIV,sBAAsB,EAGvB,MAAM,mBAAmB,CAAC;AAkB3B;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAiWzF"}
|
package/dist/config/bin.js
CHANGED
package/dist/core/codemods.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { PackContextEntry, PackEnumEntry, PackEnvEntry, PackFile, PackFrontendRoute, PackNavbarAction, PackNavEntry, PackOnboardingStep, PackRoute, PackSdkConfiguration, PackSlot, PackSocket, StackPaths } from '../types/types.js';
|
|
2
2
|
/** Replace the template workspace scope with the project scope, preserving `@hype-stack/cli`. */
|
|
3
3
|
export declare function rewriteTemplateScope(content: string, newScope: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Rewrite every template-identity marker in a file's content to the new project: the
|
|
6
|
+
* `@hype-stack/` workspace scope (preserving the published `@hype-stack/cli`), the "Hype Stack"
|
|
7
|
+
* display name, and the bare `hype-stack` slug used as an identifier. This is the single source
|
|
8
|
+
* of truth for what "renaming to the project" means, so the tree walk and any callers stay
|
|
9
|
+
* consistent. Returns the input unchanged when there is nothing to rewrite.
|
|
10
|
+
*/
|
|
11
|
+
export declare function rewriteProjectIdentityContent(content: string, projectName: string): string;
|
|
4
12
|
export declare function patchEnv(env: PackEnvEntry[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
5
13
|
export declare function patchRoutes(routes: PackRoute[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
6
14
|
export declare function patchContext(context: PackContextEntry[], paths: StackPaths, projectRoot: string): Promise<void>;
|
|
@@ -55,12 +63,20 @@ interface RewritePackScopeOptions {
|
|
|
55
63
|
}
|
|
56
64
|
export declare function rewritePackScope(options: RewritePackScopeOptions): Promise<void>;
|
|
57
65
|
/**
|
|
58
|
-
* Rewrite the
|
|
59
|
-
* `
|
|
60
|
-
* `
|
|
61
|
-
*
|
|
62
|
-
*
|
|
66
|
+
* Rewrite the template's identity to the project across every text file in the tree under
|
|
67
|
+
* `rootDir`: the `@hype-stack/` workspace scope, the "Hype Stack" display name, and the bare
|
|
68
|
+
* `hype-stack` slug.
|
|
69
|
+
*
|
|
70
|
+
* This deliberately is NOT gated on file extension. The scope-only pass historically only touched
|
|
71
|
+
* `.ts/.tsx/.js/.jsx`, which left `tsconfig.json` path mappings, `.cursor/rules/*.mdc`, the
|
|
72
|
+
* backend `Dockerfile`, and `index.html` (`<title>Hype Stack</title>`) pinned to the template, so
|
|
73
|
+
* a renamed project failed to typecheck and still showed "Hype Stack" in the browser. Walk the
|
|
74
|
+
* whole tree instead, skipping dependency/build dirs, lockfiles, and binary assets.
|
|
75
|
+
*
|
|
76
|
+
* Idempotent: re-running finds nothing to change, so it is safe to call after `create` and again
|
|
77
|
+
* after every `compose`/`template` install (packs and template overlays ship their own
|
|
78
|
+
* `@hype-stack/` references that this catches).
|
|
63
79
|
*/
|
|
64
|
-
export declare function
|
|
80
|
+
export declare function rewriteProjectIdentity(rootDir: string, projectName: string): Promise<void>;
|
|
65
81
|
export {};
|
|
66
82
|
//# sourceMappingURL=codemods.d.ts.map
|
|
@@ -1 +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;
|
|
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;AA2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AgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBtF;AA0DD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-clone.d.ts","sourceRoot":"","sources":["../../src/core/post-clone.ts"],"names":[],"mappings":"AA4BA,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,
|
|
1
|
+
{"version":3,"file":"post-clone.d.ts","sourceRoot":"","sources":["../../src/core/post-clone.ts"],"names":[],"mappings":"AA4BA,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,CA8CvF"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./cli-ZWQz14xS.js";
|
|
2
2
|
export { t as composeCommand, a as createCommand, o as createProgram, e as ensureInit, r as initCommand, i as loginCommand, n as logoutCommand };
|