@marktiderman/genesis-cli 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -5
- package/dist/cli.js +764 -257
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +31 -4
- package/dist/doctor.js +644 -144
- package/dist/doctor.js.map +1 -1
- package/dist/genesis-catalog.json +73 -15
- package/dist/index.js +647 -147
- package/dist/index.js.map +1 -1
- package/dist/vite.js +648 -148
- package/dist/vite.js.map +1 -1
- package/package.json +3 -3
package/dist/doctor.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare function parseRulesMarkdown(markdown: string): PatternRule[];
|
|
|
26
26
|
declare function defineDoctorPlugin(plugin: DoctorPlugin): DoctorPlugin;
|
|
27
27
|
|
|
28
28
|
/** Ids of the built-in rules, for `rules` overrides and `allow` entries. */
|
|
29
|
-
declare const BUILTIN_RULES: readonly ["local-primitives", "starter-leftover", "forbidden-import", "raw-tag", "palette-color", "arbitrary-color", "raw-color", "undefined-token", "shadowed-export", "version-skew", "duplicate-genesis-package", "peer-range-mismatch", "hand-rolled-sub-nav", "local-genesis-copy", "resource-workspace", "page-layout", "iso-date-slice", "native-raw-primitive", "native-literal-color", "native-custom-header", "native-screen-layout", "store-readiness", "migration-grants", "migration-rls", "migration-definer-search-path", "migration-edited", "migration-testing-kit"];
|
|
29
|
+
declare const BUILTIN_RULES: readonly ["local-primitives", "starter-leftover", "forbidden-import", "raw-tag", "palette-color", "arbitrary-color", "raw-color", "undefined-token", "shadowed-export", "version-skew", "duplicate-genesis-package", "peer-range-mismatch", "hand-rolled-sub-nav", "local-genesis-copy", "resource-workspace", "page-layout", "iso-date-slice", "native-raw-primitive", "native-literal-color", "native-custom-header", "native-screen-layout", "store-readiness", "migration-grants", "migration-rls", "migration-definer-search-path", "migration-edited", "migration-testing-kit", "migration-view-rls"];
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Minimal globs for config: `*` matches within a folder, `**` across folders,
|
|
@@ -69,6 +69,14 @@ interface GenesisInstall {
|
|
|
69
69
|
by: string;
|
|
70
70
|
range?: string;
|
|
71
71
|
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Reached only through dev tooling: every path to it from the app runs through
|
|
74
|
+
* a declared devDependency, or the Genesis CLI's own tree. Such a copy runs in
|
|
75
|
+
* scripts and builds, not in the app.
|
|
76
|
+
*/
|
|
77
|
+
devOnly: boolean;
|
|
78
|
+
/** Reached from a declared runtime dependency of the app: it ships. */
|
|
79
|
+
runtime: boolean;
|
|
72
80
|
}
|
|
73
81
|
/**
|
|
74
82
|
* Every installed copy of every Genesis package the app can load, by name.
|
|
@@ -80,6 +88,13 @@ interface GenesisInstall {
|
|
|
80
88
|
* app or at a workspace root above a sub-app) and bun's isolated `.bun` store,
|
|
81
89
|
* where a package's dependencies are its siblings in the store entry. Copies
|
|
82
90
|
* nothing resolves to are left out: they never load.
|
|
91
|
+
*
|
|
92
|
+
* Each copy records which roots reach it: the app's declared dependencies
|
|
93
|
+
* (`runtime`; devDependencies included, since a bundler ships what the app
|
|
94
|
+
* imports from them), hoisted packages nobody declared (they could be anyone's),
|
|
95
|
+
* and the dev roots: declared tooling (test runners, type packages, linters,
|
|
96
|
+
* bundlers, the Genesis CLI wherever it's listed), whose trees never ship. Only
|
|
97
|
+
* a copy reached from dev roots alone is `devOnly`.
|
|
83
98
|
*/
|
|
84
99
|
declare function genesisInstalls(root: string): Map<string, GenesisInstall[]>;
|
|
85
100
|
|
|
@@ -91,16 +106,28 @@ declare function genesisInstalls(root: string): Map<string, GenesisInstall[]>;
|
|
|
91
106
|
declare function satisfies(version: string, range: string): boolean | null;
|
|
92
107
|
|
|
93
108
|
interface RouteFile {
|
|
109
|
+
/** The file holding the route's component: the `.lazy` file when there is one. */
|
|
94
110
|
file: SourceFile;
|
|
111
|
+
/** Every file of the route (`posts.tsx` and `posts.lazy.tsx`). */
|
|
112
|
+
files: SourceFile[];
|
|
95
113
|
/** Path segments (`$param`, `[param]` and pathless `_layout` segments included), without the index/route stem. */
|
|
96
114
|
segments: string[];
|
|
115
|
+
/** Where it sits in the route tree: the segments, plus Next's `(group)` / `@slot` folders. Layouts wrap what's below them here. */
|
|
116
|
+
tree: string[];
|
|
97
117
|
/** The folder's own page: `index.tsx`, `page.tsx`, `my.index.tsx`. */
|
|
98
118
|
index: boolean;
|
|
99
|
-
/** Wraps child routes: `route.tsx
|
|
119
|
+
/** Wraps child routes: a layout file (`route.tsx`, `layout.tsx`, `__root`), a pathless `_layout` route, or one rendering `<Outlet>` (itself or in a component it imports). */
|
|
100
120
|
layout: boolean;
|
|
101
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* A page of its own: not a pure layout. `__root`, Next's `layout` and a
|
|
123
|
+
* pathless `_layout` route are pure; a route with an `<Outlet>` is a page
|
|
124
|
+
* only when it renders content of its own beside it (text, a heading, a
|
|
125
|
+
* list or table), so a wrapper `<div><Outlet /></div>` isn't.
|
|
126
|
+
*/
|
|
127
|
+
page: boolean;
|
|
128
|
+
/** A page whose own last segment is a param (`$courseId`, `[id]`): a detail page. */
|
|
102
129
|
detail: boolean;
|
|
103
|
-
/** Renders nothing but a redirect (or no
|
|
130
|
+
/** Renders nothing but a redirect (or no component at all). */
|
|
104
131
|
redirectOnly: boolean;
|
|
105
132
|
/** The layout routes around it, nearest first. */
|
|
106
133
|
parents: RouteFile[];
|