@marktiderman/genesis-cli 1.21.0 → 1.22.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/README.md +142 -9
- package/dist/cli.js +1026 -101
- package/dist/cli.js.map +1 -1
- package/dist/{config-Dj_f9T7J.d.ts → config-HOmiOLQc.d.ts} +2 -0
- package/dist/doctor.d.ts +10 -5
- package/dist/doctor.js +1502 -1115
- package/dist/doctor.js.map +1 -1
- package/dist/expo.d.ts +2 -2
- package/dist/expo.js +10 -0
- package/dist/expo.js.map +1 -1
- package/dist/genesis-catalog.json +69 -18
- package/dist/index.d.ts +114 -2
- package/dist/index.js +1525 -1119
- package/dist/index.js.map +1 -1
- package/dist/starter/README.md +4 -4
- package/dist/starter/__tests__/starter.test.ts +9 -0
- package/dist/starter/pnpm-workspace.yaml +22 -0
- package/dist/starter/src/lib/check-in.ts +5 -3
- package/dist/starter/src/lib/native-modules.ts +4 -1
- package/dist/starter/supabase/migrations/20261025000090_genesis_chat_attachment_paths.sql +80 -0
- package/dist/starter/supabase/tests/database/genesis_chat_attachment_paths.test.sql +111 -0
- package/dist/vite.js +1501 -1114
- package/dist/vite.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { FileSystem, ScaffoldLogger, ScaffoldOptions, ScaffoldResult, planScaffold, runScaffold, validateConsumerName } from './scaffolder.js';
|
|
2
2
|
import postgres from 'postgres';
|
|
3
3
|
export { RunDoctorOptions, defineDoctorPlugin, formatReport, runDoctor } from './doctor.js';
|
|
4
|
-
export { D as DoctorConfig, f as DoctorConfigError, g as DoctorContext, h as DoctorPlugin, i as DoctorResult, F as Finding, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, k as GenesisSupabase, r as readGenesisConfig, v as validateLinks } from './config-
|
|
4
|
+
export { D as DoctorConfig, f as DoctorConfigError, g as DoctorContext, h as DoctorPlugin, i as DoctorResult, F as Finding, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, k as GenesisSupabase, r as readGenesisConfig, v as validateLinks } from './config-HOmiOLQc.js';
|
|
5
5
|
import '@marktiderman/genesis-features';
|
|
6
6
|
|
|
7
7
|
type StorageType = "string" | "number" | "boolean" | "datetime" | "json";
|
|
@@ -164,4 +164,116 @@ interface InitPlan {
|
|
|
164
164
|
declare function detectHost(facts: ProjectFacts): StudioHost;
|
|
165
165
|
declare function planStudioInit(facts: ProjectFacts, options?: InitOptions): InitPlan;
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
type Platform = "web" | "native";
|
|
168
|
+
interface FigmaConfig {
|
|
169
|
+
/** The app file's key (from its URL: figma.com/design/<key>/…). */
|
|
170
|
+
file: string;
|
|
171
|
+
/** The page that holds each platform's route frames. */
|
|
172
|
+
pages: Partial<Record<Platform, string>>;
|
|
173
|
+
/** The page proposals live on. Default `Proposals`. */
|
|
174
|
+
proposalsPage: string;
|
|
175
|
+
}
|
|
176
|
+
declare class FigmaConfigError extends Error {
|
|
177
|
+
}
|
|
178
|
+
/** Check the `figma` block of genesis.config.json. */
|
|
179
|
+
declare function validateFigmaConfig(raw: unknown, source?: string): FigmaConfig;
|
|
180
|
+
/** The `figma` block of the app's genesis.config.json, or null when there is none. */
|
|
181
|
+
declare function readFigmaConfig(root: string): FigmaConfig | null;
|
|
182
|
+
interface AppRoute {
|
|
183
|
+
/** As written, without a leading slash: `(tabs)/settings`, `courses/$id`, `index` for the root. */
|
|
184
|
+
route: string;
|
|
185
|
+
platform: Platform;
|
|
186
|
+
/** App-relative, POSIX. */
|
|
187
|
+
file: string;
|
|
188
|
+
/** From a `// figma: <node-id>` line in the file's first lines. */
|
|
189
|
+
figmaId?: string;
|
|
190
|
+
}
|
|
191
|
+
/** The app's routes: Expo Router (`src/app` or `app`, native) and TanStack file routes (`src/routes`, web). */
|
|
192
|
+
declare function appRoutes(root: string): AppRoute[];
|
|
193
|
+
interface NavTarget {
|
|
194
|
+
/** App-relative file holding the call. */
|
|
195
|
+
file: string;
|
|
196
|
+
line: number;
|
|
197
|
+
target: string;
|
|
198
|
+
}
|
|
199
|
+
/** Every navigation target in the app's code (`src/`, `app/`). */
|
|
200
|
+
declare function appNavTargets(root: string): NavTarget[];
|
|
201
|
+
interface Frame {
|
|
202
|
+
id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
page: string;
|
|
205
|
+
/** For a frame inside a section (every Proposals frame), the section's name. */
|
|
206
|
+
section?: string;
|
|
207
|
+
/** The route part of the name (before ` · `), and the state after it. */
|
|
208
|
+
route: string;
|
|
209
|
+
state?: string;
|
|
210
|
+
}
|
|
211
|
+
interface Hotspot {
|
|
212
|
+
/** The top-level frame the hotspot sits in. */
|
|
213
|
+
from: string;
|
|
214
|
+
/** The destination node. */
|
|
215
|
+
to: string;
|
|
216
|
+
}
|
|
217
|
+
interface FigmaFacts {
|
|
218
|
+
pages: string[];
|
|
219
|
+
frames: Frame[];
|
|
220
|
+
hotspots: Hotspot[];
|
|
221
|
+
}
|
|
222
|
+
type FetchLike = (url: string, init: {
|
|
223
|
+
headers: Record<string, string>;
|
|
224
|
+
signal?: AbortSignal;
|
|
225
|
+
}) => Promise<{
|
|
226
|
+
ok: boolean;
|
|
227
|
+
status: number;
|
|
228
|
+
json(): Promise<unknown>;
|
|
229
|
+
}>;
|
|
230
|
+
/** Read pages, frames and prototype links. The token goes in a header and nowhere else. */
|
|
231
|
+
declare function readFigma(config: FigmaConfig, token: string, fetchImpl?: FetchLike, timeoutMs?: number): Promise<FigmaFacts>;
|
|
232
|
+
interface MissingHotspot extends NavTarget {
|
|
233
|
+
from: string;
|
|
234
|
+
to: string;
|
|
235
|
+
/** False when the destination route has no frame either (it is also under routesWithoutFrame). */
|
|
236
|
+
targetHasFrame: boolean;
|
|
237
|
+
}
|
|
238
|
+
interface CoverageReport {
|
|
239
|
+
file: string;
|
|
240
|
+
summary: {
|
|
241
|
+
routes: number;
|
|
242
|
+
frames: number;
|
|
243
|
+
covered: number;
|
|
244
|
+
coveredPercent: number;
|
|
245
|
+
hotspots: number;
|
|
246
|
+
missing: number;
|
|
247
|
+
};
|
|
248
|
+
/** Pages the config names that the file doesn't have. */
|
|
249
|
+
missingPages: string[];
|
|
250
|
+
routesWithoutFrame: AppRoute[];
|
|
251
|
+
/** Frames on a route page whose name is no route: candidates for the Proposals page. */
|
|
252
|
+
framesWithoutRoute: Frame[];
|
|
253
|
+
/** The Proposals page's frames, by section. */
|
|
254
|
+
proposals: Record<string, Frame[]>;
|
|
255
|
+
missingHotspots: MissingHotspot[];
|
|
256
|
+
deadHotspots: {
|
|
257
|
+
from: Frame;
|
|
258
|
+
to: Frame;
|
|
259
|
+
}[];
|
|
260
|
+
idMismatches: (AppRoute & {
|
|
261
|
+
frames: string[];
|
|
262
|
+
})[];
|
|
263
|
+
/** Navigation in a route file the check can't resolve (a template literal, a `{ pathname }` object): not checked. */
|
|
264
|
+
uncheckedNavigation: NavTarget[];
|
|
265
|
+
}
|
|
266
|
+
declare function compare(config: FigmaConfig, routes: AppRoute[], targets: NavTarget[], figma: FigmaFacts, dynamicTargets?: NavTarget[]): CoverageReport;
|
|
267
|
+
interface CheckOptions {
|
|
268
|
+
root: string;
|
|
269
|
+
/** Default `process.env.FIGMA_ACCESS_TOKEN`. */
|
|
270
|
+
token?: string;
|
|
271
|
+
fetch?: FetchLike;
|
|
272
|
+
config?: FigmaConfig;
|
|
273
|
+
}
|
|
274
|
+
/** Read everything and compare. Throws FigmaConfigError when there is no config or no token. */
|
|
275
|
+
declare function checkFigmaRoutes(options: CheckOptions): Promise<CoverageReport>;
|
|
276
|
+
/** The report as text: a summary line, then one table per kind of finding. */
|
|
277
|
+
declare function formatCoverage(r: CoverageReport): string;
|
|
278
|
+
|
|
279
|
+
export { type AppRoute, CommentSettingsError, type CoverageReport, EmitError, type EmitOptions, type FieldSettings, type FigmaConfig, FigmaConfigError, type FigmaFacts, type InitOptions, type InitPlan, type IntrospectedColumn, type IntrospectedTable, type NavTarget, type OpenApiDocument, type PlannedFile, type ProjectFacts, type StorageType, type StudioHost, type TableSettings, appNavTargets, appRoutes, checkFigmaRoutes, compare as compareFigmaRoutes, detectHost, emitContracts, formatCoverage, introspectOpenApi, introspectPostgres, parseColumnComment, parseTableComment, planStudioInit, readFigma, readFigmaConfig, validateFigmaConfig };
|