@marktiderman/genesis-cli 1.20.0 → 1.22.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 (43) hide show
  1. package/README.md +168 -9
  2. package/dist/cli.js +1114 -103
  3. package/dist/cli.js.map +1 -1
  4. package/dist/{config-Dj_f9T7J.d.ts → config-HOmiOLQc.d.ts} +2 -0
  5. package/dist/doctor.d.ts +10 -5
  6. package/dist/doctor.js +1515 -1095
  7. package/dist/doctor.js.map +1 -1
  8. package/dist/expo.d.ts +2 -2
  9. package/dist/expo.js +10 -0
  10. package/dist/expo.js.map +1 -1
  11. package/dist/genesis-catalog.json +140 -20
  12. package/dist/index.d.ts +114 -2
  13. package/dist/index.js +1538 -1099
  14. package/dist/index.js.map +1 -1
  15. package/dist/starter/README.md +8 -5
  16. package/dist/starter/__tests__/components/setup.ts +11 -0
  17. package/dist/starter/__tests__/starter.test.ts +28 -0
  18. package/dist/starter/package.json +4 -3
  19. package/dist/starter/pnpm-workspace.yaml +22 -0
  20. package/dist/starter/src/lib/app.ts +13 -5
  21. package/dist/starter/src/lib/check-in.ts +5 -3
  22. package/dist/starter/src/lib/define-starter.ts +1 -1
  23. package/dist/starter/src/lib/devtools-overlay.ts +3 -4
  24. package/dist/starter/src/lib/native-modules.ts +9 -2
  25. package/dist/starter/src/lib/offline.ts +14 -0
  26. package/dist/starter/supabase/migrations/20261024000750_support_default_tenant.sql +18 -0
  27. package/dist/starter/supabase/migrations/20261024000800_genesis_support_tickets.sql +800 -0
  28. package/dist/starter/supabase/migrations/20261025000070_starter_tenancy.sql +26 -0
  29. package/dist/starter/supabase/migrations/20261025000080_genesis_chat_tenants.sql +716 -0
  30. package/dist/starter/supabase/migrations/20261025000090_genesis_chat_attachment_paths.sql +80 -0
  31. package/dist/starter/supabase/tests/database/chat_people.test.sql +1 -1
  32. package/dist/starter/supabase/tests/database/genesis_chat.test.sql +10 -2
  33. package/dist/starter/supabase/tests/database/genesis_chat_attachment_paths.test.sql +111 -0
  34. package/dist/starter/supabase/tests/database/genesis_chat_coaching.test.sql +8 -0
  35. package/dist/starter/supabase/tests/database/genesis_chat_search_threads.test.sql +8 -0
  36. package/dist/starter/supabase/tests/database/genesis_chat_tenants.test.sql +259 -0
  37. package/dist/starter/supabase/tests/database/genesis_support.test.sql +15 -3
  38. package/dist/starter/supabase/tests/database/genesis_support_findings.test.sql +10 -0
  39. package/dist/starter/supabase/tests/database/genesis_support_tickets.test.sql +327 -0
  40. package/dist/starter/supabase/tests/database/starter_tenancy.test.sql +19 -0
  41. package/dist/vite.js +1514 -1094
  42. package/dist/vite.js.map +1 -1
  43. package/package.json +3 -3
@@ -410,6 +410,8 @@ interface GenesisConfigFile {
410
410
  privacy?: GenesisPrivacy;
411
411
  /** Set only when the database files live elsewhere (see {@link GenesisSupabase}). */
412
412
  supabase?: GenesisSupabase;
413
+ /** Where this app sits in its repository (`mobile`), when that isn't the root: see {@link validateAppFolder}. */
414
+ appFolder?: string;
413
415
  }
414
416
  interface LoadedConfig {
415
417
  config: DoctorConfig;
package/dist/doctor.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DoctorConfig, l as GenesisFacts, m as PatternRule, h as DoctorPlugin, S as SourceFile, g as DoctorContext, n as PreferRule, o as DeclaringPackage, q as PackageDeclaration, i as DoctorResult, F as Finding } from './config-Dj_f9T7J.js';
2
- export { A as AllowEntry, C as CompanionPackage, s as ContractsConfig, f as DoctorConfigError, t as DoctorPack, u as FindingInput, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, k as GenesisSupabase, L as Level, N as NativePackConfig, w as PackageRuleSetting, x as PackagesPackConfig, y as PluginSpec, z as PrimitiveEntry, R as RuleSetting, B as SupabasePackConfig, E as loadConfig, r as readGenesisConfig, H as validateConfig, v as validateLinks } from './config-Dj_f9T7J.js';
1
+ import { D as DoctorConfig, l as GenesisFacts, m as PatternRule, h as DoctorPlugin, S as SourceFile, g as DoctorContext, n as PreferRule, o as DeclaringPackage, q as PackageDeclaration, i as DoctorResult, F as Finding } from './config-HOmiOLQc.js';
2
+ export { A as AllowEntry, C as CompanionPackage, s as ContractsConfig, f as DoctorConfigError, t as DoctorPack, u as FindingInput, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, k as GenesisSupabase, L as Level, N as NativePackConfig, w as PackageRuleSetting, x as PackagesPackConfig, y as PluginSpec, z as PrimitiveEntry, R as RuleSetting, B as SupabasePackConfig, E as loadConfig, r as readGenesisConfig, H as validateConfig, v as validateLinks } from './config-HOmiOLQc.js';
3
3
  import '@marktiderman/genesis-features';
4
4
 
5
5
  /** The installed folder of `name`, looking in node_modules from `from` upward (works with hoisting and pnpm). */
@@ -27,7 +27,7 @@ declare function parseRulesMarkdown(markdown: string): PatternRule[];
27
27
  declare function defineDoctorPlugin(plugin: DoctorPlugin): DoctorPlugin;
28
28
 
29
29
  /** Ids of the built-in rules, for `rules` overrides and `allow` entries. */
30
- 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", "resource-view-tree", "studio-server-auth-import", "removed-scope-name", "scope-practice-id", "deprecated-import", "beta-import", "native-raw-primitive", "native-literal-color", "native-custom-header", "native-screen-layout", "store-readiness", "eas-placeholder", "migration-grants", "migration-rls", "migration-definer-search-path", "migration-edited", "migration-testing-kit", "migration-view-rls", "package-app-import", "package-undeclared-dependency", "package-migration-test", "package-migration-number", "package-migration-edited", "package-unregistered", "package-unversioned-change", "package-export-missing", "package-block-invalid", "package-untagged-tests", "package-doctor-declaration", "overlay-unmarked", "overlay-invalid", "overlay-age", "overlay-version", "overlay-behind", "package-rules-invalid", "package-rule-override", "ratchet-skipped", "allow-grew", "rules-weakened", "agent-guide-stale", "contracts-stale", "lock-files", "database-elsewhere", "genesis-eslint-config"];
30
+ declare const BUILTIN_RULES: readonly ["local-primitives", "figma-routes", "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", "resource-view-tree", "studio-server-auth-import", "removed-scope-name", "scope-practice-id", "deprecated-import", "beta-import", "native-raw-primitive", "native-literal-color", "native-custom-header", "native-screen-layout", "store-readiness", "eas-placeholder", "migration-grants", "migration-rls", "migration-definer-search-path", "migration-edited", "migration-testing-kit", "migration-view-rls", "package-app-import", "package-undeclared-dependency", "package-migration-test", "package-migration-number", "package-migration-edited", "package-unregistered", "package-unversioned-change", "package-export-missing", "package-block-invalid", "package-untagged-tests", "package-doctor-declaration", "overlay-unmarked", "overlay-invalid", "overlay-age", "overlay-version", "overlay-behind", "package-rules-invalid", "package-rule-override", "ratchet-skipped", "allow-grew", "rules-weakened", "agent-guide-stale", "contracts-stale", "lock-files", "database-elsewhere", "genesis-eslint-config"];
31
31
 
32
32
  /**
33
33
  * Minimal globs for config: `*` matches within a folder, `**` across folders,
@@ -243,6 +243,8 @@ interface RunDoctorOptions {
243
243
  changedFiles?: string[];
244
244
  /** Run the supabase pack's contract check (it reads the database). Default true; the Vite plugin (build and dev) passes false. */
245
245
  contracts?: boolean;
246
+ /** Run the figma-routes check (it reads the Figma file) when the config has a figma block. Default true; the Vite plugin passes false. */
247
+ figma?: boolean;
246
248
  }
247
249
  declare function runDoctor(options?: RunDoctorOptions): Promise<DoctorResult>;
248
250
  /**
@@ -252,9 +254,12 @@ declare function runDoctor(options?: RunDoctorOptions): Promise<DoctorResult>;
252
254
  */
253
255
  declare function builtinChecks(config: DoctorConfig, options?: {
254
256
  contracts?: boolean;
257
+ figma?: boolean;
255
258
  }): DoctorPlugin[];
256
- /** The human-readable report. */
257
- declare function formatReport(result: DoctorResult): string;
259
+ /** The human-readable report. `verbose` lists the components no file imports; otherwise only their count. */
260
+ declare function formatReport(result: DoctorResult, options?: {
261
+ verbose?: boolean;
262
+ }): string;
258
263
  /** The `--json` report: plain data, sets turned into sorted lists. */
259
264
  declare function toJson(result: DoctorResult): {
260
265
  ok: boolean;