@marktiderman/genesis-cli 1.11.3 → 1.12.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.
@@ -58,7 +58,12 @@ interface PatternRule {
58
58
  /** A plugin entry in config: a module path, or `[path, options]`. */
59
59
  type PluginSpec = string | [string, unknown];
60
60
  /** An opt-in rule pack. */
61
- type DoctorPack = "native" | "supabase";
61
+ type DoctorPack = "native" | "supabase" | "packages";
62
+ /** Settings for the `packages` pack (the app's local packages). */
63
+ interface PackagesPackConfig {
64
+ /** The git ref the change gate compares against when `--base` isn't given. No default: without one the gate is skipped (info). */
65
+ base?: string;
66
+ }
62
67
  /** Settings for the `native` pack. */
63
68
  interface NativePackConfig {
64
69
  /** The Expo Router root, relative to the app. Default: `src/app`, else `app`. */
@@ -85,6 +90,7 @@ interface DoctorConfig {
85
90
  packs?: DoctorPack[];
86
91
  native?: NativePackConfig;
87
92
  supabase?: SupabasePackConfig;
93
+ packages?: PackagesPackConfig;
88
94
  /** Folders to scan, relative to the app root. Default `["src"]` (`["app", "src", "components"]` with the native pack). */
89
95
  src?: string[];
90
96
  /** File extensions to scan. Default `.ts .tsx .js .jsx .mts .cts .css`. */
@@ -183,6 +189,8 @@ interface DoctorContext {
183
189
  files: readonly SourceFile[];
184
190
  genesis: GenesisFacts;
185
191
  config: DoctorConfig;
192
+ /** The git ref change checks compare against (`--base`), when given. */
193
+ base?: string;
186
194
  /** Record a finding. Config `rules` levels and `allow` entries apply afterwards. */
187
195
  report(finding: FindingInput): void;
188
196
  }
@@ -290,4 +298,4 @@ declare function validateLinks(raw: unknown, source?: string): GenesisLinks;
290
298
  /** Check the shape, so a typo fails loudly instead of silently disabling a check. */
291
299
  declare function validateConfig(raw: unknown, source?: string): DoctorConfig;
292
300
 
293
- export { type AllowEntry as A, type CompanionPackage as C, type DoctorConfig as D, type Finding as F, type GenesisDataUse as G, type Level as L, type NativePackConfig as N, PRIVACY_DATA_TYPES as P, type RuleSetting as R, type SourceFile as S, type GenesisPrivacy as a, type GenesisLinks as b, GenesisConfigError as c, PRIVACY_PURPOSES as d, validatePrivacy as e, DoctorConfigError as f, type DoctorContext as g, type DoctorPlugin as h, type DoctorResult as i, type GenesisConfigFile as j, type GenesisFacts as k, type PatternRule as l, type DoctorPack as m, type FindingInput as n, type PluginSpec as o, privacyDataType as p, type SupabasePackConfig as q, readGenesisConfig as r, loadConfig as s, validateConfig as t, validateLinks as v };
301
+ export { type AllowEntry as A, type CompanionPackage as C, type DoctorConfig as D, type Finding as F, type GenesisDataUse as G, type Level as L, type NativePackConfig as N, PRIVACY_DATA_TYPES as P, type RuleSetting as R, type SourceFile as S, type GenesisPrivacy as a, type GenesisLinks as b, GenesisConfigError as c, PRIVACY_PURPOSES as d, validatePrivacy as e, DoctorConfigError as f, type DoctorContext as g, type DoctorPlugin as h, type DoctorResult as i, type GenesisConfigFile as j, type GenesisFacts as k, type PatternRule as l, type DoctorPack as m, type FindingInput as n, type PackagesPackConfig as o, privacyDataType as p, type PluginSpec as q, readGenesisConfig as r, type SupabasePackConfig as s, loadConfig as t, validateConfig as u, validateLinks as v };
package/dist/doctor.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DoctorConfig, k as GenesisFacts, l as PatternRule, h as DoctorPlugin, S as SourceFile, g as DoctorContext, i as DoctorResult, F as Finding } from './config-QC_Ewwwp.js';
2
- export { A as AllowEntry, C as CompanionPackage, f as DoctorConfigError, m as DoctorPack, n as FindingInput, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, L as Level, N as NativePackConfig, o as PluginSpec, R as RuleSetting, q as SupabasePackConfig, s as loadConfig, r as readGenesisConfig, t as validateConfig, v as validateLinks } from './config-QC_Ewwwp.js';
1
+ import { D as DoctorConfig, k as GenesisFacts, l as PatternRule, h as DoctorPlugin, S as SourceFile, g as DoctorContext, i as DoctorResult, F as Finding } from './config-4MhgqkFT.js';
2
+ export { A as AllowEntry, C as CompanionPackage, f as DoctorConfigError, m as DoctorPack, n as FindingInput, c as GenesisConfigError, j as GenesisConfigFile, b as GenesisLinks, L as Level, N as NativePackConfig, o as PackagesPackConfig, q as PluginSpec, R as RuleSetting, s as SupabasePackConfig, t as loadConfig, r as readGenesisConfig, u as validateConfig, v as validateLinks } from './config-4MhgqkFT.js';
3
3
 
4
4
  /** The installed folder of `name`, looking in node_modules from `from` upward (works with hoisting and pnpm). */
5
5
  declare function findPackageDir(from: string, name: string): string | null;
@@ -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", "migration-view-rls"];
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", "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"];
30
30
 
31
31
  /**
32
32
  * Minimal globs for config: `*` matches within a folder, `**` across folders,
@@ -152,6 +152,8 @@ interface RunDoctorOptions {
152
152
  quietBuild?: boolean;
153
153
  /** Reuse facts read earlier (the Vite dev server caches them). */
154
154
  genesis?: GenesisFacts;
155
+ /** The git ref change checks compare against (`--base`): the packages pack's change gate. */
156
+ base?: string;
155
157
  }
156
158
  declare function runDoctor(options?: RunDoctorOptions): Promise<DoctorResult>;
157
159
  /**