@marktiderman/genesis-cli 1.17.3 → 1.19.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 +162 -17
- package/dist/cli.js +2099 -747
- package/dist/cli.js.map +1 -1
- package/dist/{config-1jP8eCZy.d.ts → config-Dj_f9T7J.d.ts} +14 -1
- package/dist/doctor.d.ts +3 -3
- package/dist/doctor.js +944 -361
- package/dist/doctor.js.map +1 -1
- package/dist/expo.d.ts +2 -2
- package/dist/expo.js +18 -0
- package/dist/expo.js.map +1 -1
- package/dist/genesis-catalog.json +29 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +944 -361
- package/dist/index.js.map +1 -1
- package/dist/starter/README.md +9 -0
- package/dist/starter/__tests__/components/gestures.test.tsx +64 -0
- package/dist/starter/__tests__/components/resolver.js +14 -2
- package/dist/starter/__tests__/components/setup.ts +5 -0
- package/dist/starter/__tests__/starter.test.ts +56 -22
- package/dist/starter/genesis.config.json +10 -0
- package/dist/starter/jest.config.js +3 -0
- package/dist/starter/package.json +2 -0
- package/dist/starter/src/lib/link-hosts.ts +12 -0
- package/dist/starter/src/lib/links.ts +2 -1
- package/dist/starter/supabase/functions/genesis-apple-revoke/apple.ts +7 -2
- package/dist/starter/supabase/migrations/20261024000700_genesis_support_findings.sql +339 -0
- package/dist/starter/supabase/tests/database/genesis_notifications.test.sql +5 -3
- package/dist/starter/supabase/tests/database/genesis_support.test.sql +1 -1
- package/dist/starter/supabase/tests/database/genesis_support_findings.test.sql +219 -0
- package/dist/templates/ci/genesis-upgrade.yml +1 -0
- package/dist/vite.js +945 -362
- package/dist/vite.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -106,12 +106,72 @@ inside the CLI, at the version the CLI was released with:
|
|
|
106
106
|
build scripts, one React);
|
|
107
107
|
- the templates: `templates/eas` to `eas.json` and `.eas/`, `templates/maestro` to `.maestro/`,
|
|
108
108
|
`templates/ci` to `.github/workflows/` (replace `GENESIS_SHA` in them);
|
|
109
|
-
- `genesis.lock.json`, recording the blocks the starter carries (`account`,
|
|
110
|
-
`push`), every file Genesis owns in
|
|
111
|
-
can refresh them and `migrate` knows the
|
|
109
|
+
- `genesis.lock.json`, recording the blocks the starter carries that are on (`account`,
|
|
110
|
+
`app-updates`, `push`, `notifications`, `support-feedback`, `chat`), every file Genesis owns in
|
|
111
|
+
the app with its checksum, and the renames, so `upgrade` can refresh them and `migrate` knows the
|
|
112
|
+
blocks. Every file the lock names is written.
|
|
113
|
+
|
|
114
|
+
`--without <switches>` (comma-separated, e.g. `--without chat,support,updates`) turns those
|
|
115
|
+
`starter.config.ts` switches off. A block an off switch carries (the starter's genesis.config.json
|
|
116
|
+
`starter.blocks`: `updates` → `app-updates`, `push`, `notifications`, `support` →
|
|
117
|
+
`support-feedback`, `chat`) is left out whole, unless a block that's on requires it: its
|
|
118
|
+
migrations, pgTAP tests and Edge Functions, the starter's own `supabase/` files tagged only with it
|
|
119
|
+
(`chat_people` goes with chat), their `supabase/config.toml` sections and the API schemas its
|
|
120
|
+
migrations create. Turning a switch off later works the same way for the commands: `upgrade`,
|
|
121
|
+
`migrate` and the doctor's `lock-files` leave a locked block out while its switch is off, so delete
|
|
122
|
+
its files or keep them, as you like. To have a left-out block back, turn its switch on and run
|
|
123
|
+
`genesis add <block>` (the starter's own files that went with it, such as `chat_people`, are in
|
|
124
|
+
the starter).
|
|
125
|
+
|
|
126
|
+
The summary ends with what is left by hand: `GENESIS_SHA`, the EAS project id, the links domain,
|
|
127
|
+
and each store id still a `REPLACE_WITH_…` placeholder in `eas.json` with what replaces it (the
|
|
128
|
+
doctor's `eas-placeholder` warnings say the same). Init can't fill those: only you have them.
|
|
112
129
|
|
|
113
130
|
The starter's migrations are copied byte for byte (its own tests check that); `migrate` knows them
|
|
114
|
-
by name and text.
|
|
131
|
+
by name and text. They are the app's applied baseline: its genesis.config.json gets
|
|
132
|
+
`doctor.supabase.since` just after the newest, so the supabase pack checks only later migrations as
|
|
133
|
+
new, even before the app has a git history to compare with. `init --native` (the brand-package scaffold for an Expo app) is unchanged.
|
|
134
|
+
|
|
135
|
+
### A phone app beside a web app
|
|
136
|
+
|
|
137
|
+
A phone app often has no Supabase project of its own: it signs in to, and reads from, the web app's
|
|
138
|
+
database, and the web app's `supabase/` is the only migrations folder. Make it with
|
|
139
|
+
`--beside <web-app>`:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
genesis init sample-app --template native --target mobile --beside app
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
When the web app has a `supabase/` folder, init writes none of the starter's `supabase/` files (or
|
|
146
|
+
the database CI workflow), sets `"supabase": { "app": "../app" }` in the new app's
|
|
147
|
+
`genesis.config.json` (the web app's folder, relative to the phone app) and drops the doctor's
|
|
148
|
+
supabase pack there. The lock still records the blocks that are on, with no Supabase files, and the
|
|
149
|
+
summary's first line says what to run in the web app for the ones whose database files it lacks
|
|
150
|
+
(a migration it has no copy of, newer ones of a block it has included, or an Edge Function with no
|
|
151
|
+
folder there), in the order to run them (a block's requirements first, `notifications` before
|
|
152
|
+
`push`). Each is `genesis add <block> --database-only`: only the block's migrations, pgTAP tests,
|
|
153
|
+
Edge Functions and `config.toml` sections, and the packages they're read from. A phone block's
|
|
154
|
+
install, routes, skills, steps and feature entry stay the phone app's, and the web app's lock
|
|
155
|
+
doesn't list the block (its copies are tracked by their headers and lock entries):
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
In ../app (it holds this app's database), run: genesis add account --database-only && genesis add chat --database-only
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
A web app with no `supabase/` folder gets a note instead, and the phone app keeps its own, as
|
|
162
|
+
without `--beside`.
|
|
163
|
+
|
|
164
|
+
The setting, on any app: `"supabase": { "app": "<folder>" }` says this app's database files live in
|
|
165
|
+
that app's `supabase/`; `"supabase": false` says this app has none. With either, `genesis add`,
|
|
166
|
+
`migrate` and `upgrade` never write or plan Supabase files here (migrations, pgTAP tests, Edge
|
|
167
|
+
Functions, `config.toml` sections); they say where to run them instead (`genesis add <block> --database-only`), and which of this
|
|
168
|
+
app's blocks' database files the other app lacks; `upgrade` still lists new package migrations,
|
|
169
|
+
to apply there. They don't write into the other app: its lock, its
|
|
170
|
+
installed package versions and its doctor are its own, so the commands run there. `upgrade` leaves
|
|
171
|
+
lock entries under `supabase/` alone, so an app that moves to the setting can delete its
|
|
172
|
+
`supabase/` folder and those entries. The doctor's supabase pack doesn't run, and
|
|
173
|
+
`database-elsewhere` warns when the named app has no `supabase/`, or when a `supabase/` folder is
|
|
174
|
+
still here (a second, unused copy).
|
|
115
175
|
|
|
116
176
|
## Blocks: add, migrate, upgrade
|
|
117
177
|
|
|
@@ -239,6 +299,7 @@ any local package. Then:
|
|
|
239
299
|
| `overlay-invalid` | error | A marker that doesn't validate (each problem with `upstream`, `since`, `owner`, `reason`, or an unknown key), a `since` later than tomorrow, an overlay that isn't `private: true`, or an overlay folder that holds the app's scanned source (`src`, or the app root). Such an overlay doesn't count as the package below. |
|
|
240
300
|
| `overlay-age` | info / warn | A marker older than 14 days is reported as info, which never fails a run; older than 30 days it warns, which fails `--strict`. An overlay never blocks a release in its first month, and must be promoted or dropped within it. |
|
|
241
301
|
| `overlay-version` | warn | The version isn't the upstream version, `<upstream>+local.N` or `<upstream>-local.N`. |
|
|
302
|
+
| `overlay-behind` | warn | The marker's `upstream` is older than the version the app now pins: the installed release's (`@marktiderman/genesis`'s `versions.json`), else the app's own dependency on the package. Fails `--strict`. `genesis upgrade` rebases the overlay and clears it. (`version-skew` then says nothing about that overlay; it still flags one copied from a release newer than the installed one.) |
|
|
242
303
|
|
|
243
304
|
A marked overlay (valid marker, private, in a package folder of its own) **is** the package it
|
|
244
305
|
shadows, so for files inside it `shadowed-export`, `raw-tag`, `local-genesis-copy` and
|
|
@@ -251,6 +312,33 @@ asks for no changeset or version bump. A block migration that names another pack
|
|
|
251
312
|
in that package, not in the overlay; a name that isn't valid, or a package that isn't installed or
|
|
252
313
|
local, is reported by `package-migration-test`.
|
|
253
314
|
|
|
315
|
+
**On every upgrade.** `genesis upgrade` cleans out each overlay whose `upstream` is older than
|
|
316
|
+
the release it moves to, before it writes anything:
|
|
317
|
+
|
|
318
|
+
1. It reads the package's source at the upstream tag and at the new version from the Genesis
|
|
319
|
+
repository's `<package>@<version>` git tags, diffs the overlay against the upstream tag, and
|
|
320
|
+
sorts each hunk: **shipped** (the new version already has it: dropped), **promoted** (a
|
|
321
|
+
`promoted` entry in `docs/genesis-upstream.md` for the package lists the file: link its Genesis
|
|
322
|
+
PR there) or **kept** (the app's own change: say why in the pull request).
|
|
323
|
+
2. It rebases what's left onto the new version: a three-way merge per file (the upstream tag the
|
|
324
|
+
base, the overlay and the new version the two sides; package.json merged as JSON). A file new
|
|
325
|
+
upstream comes in, one gone upstream goes (unless the app changed it), and one the overlay never
|
|
326
|
+
carried stays out. The marker's `upstream` becomes `<package>@<new version>` and the version
|
|
327
|
+
`<new version>+local.N`.
|
|
328
|
+
3. An overlay with nothing of the app's own left, in its source or its package.json (past its
|
|
329
|
+
version, `private` and marker), is deleted, and each `workspace:`/`file:`/`link:` dependency on
|
|
330
|
+
it (resolved from that package.json's own folder) pins the release, its override dropped. If
|
|
331
|
+
pnpm-workspace.yaml, a tsconfig or a vite, vitest, metro or babel config still names its folder
|
|
332
|
+
(or pnpm-workspace.yaml overrides the package to a local copy), it stays, on the checklist.
|
|
333
|
+
4. When a merge conflicts, it writes nothing at all: it stops and lists the files to rebase by hand
|
|
334
|
+
(`--dry-run` lists them without stopping). A file that isn't text is never merged: it takes the
|
|
335
|
+
new version's copy when the app's is the old one's, and is a conflict otherwise. An overlay whose
|
|
336
|
+
tags can't be read (the fetch never prompts and gives up after two minutes) is left as it is, and
|
|
337
|
+
the checklist says why. `--genesis-repo <url>` reads the tags from another clone or mirror.
|
|
338
|
+
|
|
339
|
+
The checklist goes into the summary and the pull request: **an upgrade PR isn't done until that
|
|
340
|
+
checklist is.**
|
|
341
|
+
|
|
254
342
|
**Promotion: manual for now.**
|
|
255
343
|
|
|
256
344
|
1. Diff the overlay against the source of its upstream tag (`upstream` in the marker), so only the
|
|
@@ -293,9 +381,14 @@ It never overwrites a file the app has: one with other text is reported and left
|
|
|
293
381
|
run creates and changes nothing. `--dry-run` prints the plan and writes nothing. `genesis add
|
|
294
382
|
--list` lists the blocks the app can add. `genesis studio init` is unchanged.
|
|
295
383
|
|
|
384
|
+
In an app whose database files live elsewhere ([A phone app beside a web app](#a-phone-app-beside-a-web-app)),
|
|
385
|
+
`add` copies none of the block's migrations, pgTAP tests, Edge Functions or `config.toml`
|
|
386
|
+
sections; a step says to run `genesis add <block>` in that app, unless its lock already lists it.
|
|
387
|
+
|
|
296
388
|
### genesis migrate
|
|
297
389
|
|
|
298
|
-
Compares the migrations of the app's blocks (`genesis.lock.json`,
|
|
390
|
+
Compares the migrations of the app's blocks (`genesis.lock.json`, less any whose
|
|
391
|
+
`starter.config.ts` switch is off, plus `--block <id>`) in the
|
|
299
392
|
installed packages with the app's copies, and every copy that carries a header:
|
|
300
393
|
|
|
301
394
|
| State | Meaning | What happens |
|
|
@@ -306,6 +399,7 @@ installed packages with the app's copies, and every copy that carries a header:
|
|
|
306
399
|
| `changed-upstream` | the package now ships different text than the copy was made from | reported; never rewritten |
|
|
307
400
|
| `differs` | a file with the migration's name, other text and no header | treated as the app's own; never rewritten |
|
|
308
401
|
| `deleted` | the app deleted a copy `genesis.lock.json` records (its `migrations` map: where each package migration was copied) | reported; never copied again |
|
|
402
|
+
| `provided` | not in the app, but a migration that is (or comes in the same run) provides its objects | never copied |
|
|
309
403
|
|
|
310
404
|
Every file already in `supabase/migrations` counts as applied: none is ever written again, and a
|
|
311
405
|
new file is created only if its name is free (otherwise it fails). A package migration is copied
|
|
@@ -319,6 +413,33 @@ runs count that copy as handled. It exits 1 when something still needs you (a de
|
|
|
319
413
|
choice, so it doesn't). `genesis add`, `genesis migrate` and `init --template native` record each
|
|
320
414
|
copy in the lock; a run on an older lock records the copies it finds.
|
|
321
415
|
|
|
416
|
+
A migration that creates or adopts another package migration's objects says so in its block
|
|
417
|
+
manifest, `provides` on the migration entry (package.json `genesis.blocks`):
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"file": "migrations/0001_genesis_notifications.sql",
|
|
422
|
+
"provides": [{ "package": "@marktiderman/genesis-supabase", "file": "migrations/0005_genesis_push.sql", "functions": ["functions/genesis-push-send"] }]
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Once the providing migration is in the app (a copy, by its header or, made before headers, by
|
|
427
|
+
name; or the file the lock says it was copied to, while it's there), or is copied in the same run,
|
|
428
|
+
the provided one is `provided`, never `new`: notifications 0001 adopts the push tables of supabase
|
|
429
|
+
0005, and copying 0005 after it would fail on tables that already exist.
|
|
430
|
+
|
|
431
|
+
`provides` doesn't mean the provider creates everything: 0001 creates 0005's tables and its
|
|
432
|
+
register and forget functions, not the sender's (`genesis_push_targets`, `_status`,
|
|
433
|
+
`_tickets_record`, `_receipts_claim`/`_settle`, `_devices_forget`). `functions` names the Edge
|
|
434
|
+
Functions of the provided migration's package that call what only it creates: where it's provided
|
|
435
|
+
they're superseded, so `genesis add push` neither copies nor deploys `genesis-push-send`, and its
|
|
436
|
+
steps point at the notifications runner (`genesis-notifications`), which sends instead. Applying
|
|
437
|
+
0001 after 0005 works too (it adopts the tables); then stop calling `genesis-push-send`, as
|
|
438
|
+
notifications' steps say.
|
|
439
|
+
|
|
440
|
+
In an app whose database files live elsewhere ([A phone app beside a web app](#a-phone-app-beside-a-web-app)),
|
|
441
|
+
migrate plans nothing and says where to run it.
|
|
442
|
+
|
|
322
443
|
With the notifications block and a named registry (`--notifications <file>`, or
|
|
323
444
|
`"notifications": { "registry": "src/notifications.ts" }` in `genesis.config.json`; a relative
|
|
324
445
|
path is resolved against the app's root, `--dir`), it also mirrors the app's `defineNotifications`
|
|
@@ -353,22 +474,44 @@ doesn't fit, is a warning.
|
|
|
353
474
|
| --- | --- | --- |
|
|
354
475
|
| `genesis-core-2-scope-names` | genesis-core crosses 2.0.0 | Genesis API usage only, never an app's own names that match (a view field means one inside `defineView(…)` or an object typed `ViewDefinition`/`ViewField`; the prop means an attribute of `<NativeResourceView>` or a key of an object typed `NativeResourceViewProps`; each with the name imported from Genesis): a view field's `timeZone: "practice"` → `"scope"`, NativeResourceView's `practiceTimeZone` (attribute or object key) → `scopeTimeZone`, `resolveZone("practice", …)` → `"scope"`, and DisplayTimeZones' `practice` (a `{ viewer, practice }` object's key, `.practice` on a value from `useDisplayTimeZones()` or typed `DisplayTimeZones`) → `scope`. `scope={{ practiceId }}` needs nothing (it is the app's own key in ResourceScope's open slot); when a file reads `scope.practiceId` and nothing declares it, the codemod prints the one-line `ResourceScope` augmentation that types it. The doctor's `removed-scope-name` rule finds what it would rewrite. |
|
|
355
476
|
3. Reinstalls. With pnpm, a release younger than the app's `minimumReleaseAge` is installed in
|
|
356
|
-
loose mode and pnpm pins it in `minimumReleaseAgeExclude`, in the pnpm-workspace.yaml pnpm reads
|
|
357
|
-
(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
477
|
+
loose mode and pnpm pins it in `minimumReleaseAgeExclude`, in the pnpm-workspace.yaml pnpm reads
|
|
478
|
+
(the nearest one at or above the app, but never above the repository's top level, else beside
|
|
479
|
+
the lockfile), one entry per version (`'@marktiderman/genesis-ui@2.26.0'`). pnpm 11.1.3's frozen
|
|
480
|
+
install honours only the first entry for a package, so a second one (this upgrade's next to an
|
|
481
|
+
earlier one's) fails `pnpm install --frozen-lockfile` in CI with
|
|
482
|
+
`ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. The upgrade merges them into one entry per Genesis
|
|
483
|
+
package that lists its exact versions (`'@marktiderman/genesis-features@0.8.0 || 0.8.1'`), which
|
|
484
|
+
both a resolving and a frozen install honour on pnpm 11, and drops versions the lockfile beside
|
|
485
|
+
it no longer holds, so the list doesn't grow (with `sharedWorkspaceLockfile: false`, or
|
|
486
|
+
`shared-workspace-lockfile=false` in the `.npmrc`, it drops nothing). It never writes a pattern
|
|
487
|
+
such as `'@marktiderman/genesis-*'`: that would let every future Genesis release, a compromised
|
|
488
|
+
one included, skip the wait. The two that genesis-cli 1.17.3 wrote, `'@marktiderman/genesis-*'`
|
|
489
|
+
and the bare `'@marktiderman/genesis'`, are replaced with the lockfile's exact versions. Any
|
|
490
|
+
other pattern or bare name, and every other entry, comment and line, is left as it is, since the
|
|
491
|
+
list is the app's supply-chain guard. A range the app wrote for a Genesis package
|
|
492
|
+
(`'…genesis-ui@~2.25.0'`) takes the new pins into its entry with `||`, with a warning: pnpm 11
|
|
493
|
+
rejects ranges there (`ERR_PNPM_INVALID_MINIMUM_RELEASE_AGE_EXCLUDE`). Exact versions and `||`
|
|
494
|
+
need **pnpm 10.19 or later**; an older pnpm reads them as matching nothing, and the upgrade
|
|
495
|
+
warns. Then it runs `pnpm dedupe` (`npm dedupe` with npm; bun
|
|
496
|
+
and yarn are skipped), so a Genesis package isn't left installed at two versions
|
|
365
497
|
(`duplicate-genesis-package`), and commits pnpm-workspace.yaml with `--pr`.
|
|
498
|
+
|
|
499
|
+
With `minimumReleaseAge` set in the app, pnpm runs in strict mode instead: the install fails
|
|
500
|
+
with `ERR_PNPM_NO_MATURE_MATCHING_VERSION` before any tidy, and the upgrade stops and names the
|
|
501
|
+
versions pnpm refused. It never loosens that setting for you: add those versions to
|
|
502
|
+
`minimumReleaseAgeExclude` (exact versions, one entry per package), or wait until they are old
|
|
503
|
+
enough, and run `genesis upgrade` again.
|
|
504
|
+
|
|
366
505
|
Then it refreshes every file in `genesis.lock.json` from the newly installed package:
|
|
367
506
|
unchanged in the app, it takes the new version; changed by both, it is merged with `git
|
|
368
507
|
merge-file` against the old version (the base); a conflict goes to `<file>.genesis-next` and
|
|
369
508
|
your file is kept. `--keep-mine` never merges: the new text goes to `.genesis-next`. A file you
|
|
370
|
-
deleted stays deleted
|
|
371
|
-
|
|
509
|
+
deleted stays deleted (mark its entry `"deleted": true` so the doctor's `lock-files` knows it's
|
|
510
|
+
meant). A block whose `starter.config.ts` switch is off is left out: no migrations listed, no
|
|
511
|
+
files refreshed or added. AGENTS.md fragments are replaced, skills a block gained are copied, and
|
|
512
|
+
new package migrations are listed (run `genesis migrate`). In an app whose database files live
|
|
513
|
+
elsewhere, nothing under `supabase/` is refreshed or added and no migrations are listed: the
|
|
514
|
+
summary says to run `genesis upgrade` in that app.
|
|
372
515
|
4. Runs `genesis doctor` and prints a summary; `--pr` commits to `genesis-upgrade/<version>`,
|
|
373
516
|
pushes and opens a pull request with `gh`. It checks first, before writing anything, that the
|
|
374
517
|
tree is clean, a branch is checked out and the branch name is free; it commits the lockfile
|
|
@@ -551,6 +694,8 @@ Exit codes: `0` pass, `1` findings, `2` the doctor couldn't run (bad config, Gen
|
|
|
551
694
|
| `package-rules-invalid` | warn | An installed or local package's `genesis.doctor` declaration (or its plugin) that doesn't validate: its rules don't run; the rest of the doctor does. Read forward-compatibly, since a package can be newer than the CLI: an unknown key is ignored, and a `prefer` rule or primitive that doesn't validate is skipped on its own, each with this warning. An unknown key on a `prefer` rule itself or in its `unless` could narrow where it applies, so that rule is skipped whole rather than run wider; an unknown key in `forbid` is only dropped. It is never an error, so a package upgrade can't break an app's build. See [Package rules](#package-rules). |
|
|
552
695
|
| `package-rule-override` | warn | `rules` changes a package rule's level without a reason; move it to `packageRules` with one. |
|
|
553
696
|
| `agent-guide-stale` | warn | The agent guide `genesis agents` wrote (`.claude/skills/genesis/SKILL.md` and the `genesis-primitives` block in AGENTS.md) doesn't match the installed packages, one of the two is missing, or the block's markers are broken (one missing, repeated or out of order; `genesis agents` then writes nothing). An app with neither isn't checked. Line endings don't count. |
|
|
697
|
+
| `database-elsewhere` | warn | An app whose `genesis.config.json` `supabase` setting puts its database files in another app (`{ "app": "../app" }`) or nowhere (`false`): **warn** when the named app has no `supabase/` folder, and when this app still has one (`add`, `migrate` and `upgrade` never plan it, so it's a second, unused copy). The supabase pack doesn't run in such an app. |
|
|
698
|
+
| `lock-files` | warn / info | `genesis.lock.json` against the files on disk. **warn**: a file the lock owns is missing; `genesis upgrade` never brings a deleted owned file back, so a lock naming files that aren't there passes every upgrade silently. A file you deleted on purpose gets `"deleted": true` in its lock entry: the warning stops and upgrade still leaves it deleted. **info**: a locked file whose checksum differs from the lock's (an app edit, which upgrade three-way merges the next version into, or one waiting on its `.genesis-next`); a file marked deleted that is back; a locked block whose `starter.config.ts` switch is off (upgrade and migrate leave it out, and its files aren't checked); files under `supabase/` the lock still lists in an app whose database lives elsewhere (upgrade leaves them alone, so delete the entries). |
|
|
554
699
|
| `ratchet-skipped` | warn / error | `--base` was given, but git couldn't compare (not a repository, or the ref isn't fetched). A warning when only the ratchet was skipped (every rule ran at its full level); an error when the config file holds `allow`, `rules` or `packageRules`, which then went uncompared. In CI, check out with `fetch-depth: 0`. |
|
|
555
700
|
| `allow-grew` | error | Under `--base`: an `allow` entry (its rule, file and match) that the doctor settings at the merge base didn't have. The list only shrinks. Rewording a `reason` is fine. The base's settings are found as the doctor finds them (genesis.config.json's `doctor`, else package.json's `genesis.doctor`), so moving them between the two compares as usual; when the base had none (adopting the doctor), nothing is compared. |
|
|
556
701
|
| `rules-weakened` | error | Under `--base`, comparing the app's settings with the base's only (never with a rule's own level, which a package upgrade may change): a rule the base's `rules` or `packageRules` set that this branch sets lower, a rule newly set to `off`, or an `exclude` glob a `packageRules` entry gained. A new entry at any other level isn't compared, so pinning a rule its package raised is fine; an entry renamed with its rule counts as new. `files` isn't compared. Not compared when the base had no doctor settings. |
|
|
@@ -642,7 +787,7 @@ keep `raw-color`).
|
|
|
642
787
|
| `native-custom-header` | warn | A file that sets `headerShown: false` and draws its own header (a `<…Header>` of the app's own, or `style={styles.header}`); a screen that draws one when the `_layout` beside it hides the navigator's; a hand-built tab bar (`tabBar={…}` in a file with `<Tabs>`, or a `<…TabBar>` of the app's own). Section headers (`SectionHeader`, `ListHeader`, `CardHeader`, …) and Genesis components don't count. Only the `_layout` in the screen's own folder is followed, not ancestors. |
|
|
643
788
|
| `native-screen-layout` | warn | A route screen under the router root (`native.routerRoot`, default `src/app`, else `app`) that renders no Genesis screen layout, directly or through one local import (`./`, `../`, `@/`, `~/`). `_layout`, `+html`, `+native-intent`, `+middleware`, `+api` files, re-export-only routes and `<Redirect>` routes are skipped. Also a warning when the router root is missing, or when `src` leaves it unscanned. |
|
|
644
789
|
| `store-readiness` | warn | Static checks of `app.json`, `app.config.json` and (as text, best-effort) `app.config.{ts,js,mjs,cjs}`. **Usage strings**: Expo applies an installed module's config plugin even when it isn't listed, with a generic default string (`Allow $(PRODUCT_NAME) to access your camera`), and App Review rejects generic purpose strings; so a module without its own sentence (`ios.infoPlist.<Key>` or the plugin option) is flagged, and `false` (Expo's opt-out) counts as set. Covered: `expo-camera`, `expo-image-picker` (photos; camera only "if the app takes photos"), `expo-media-library`, `expo-location`, `expo-av` / `expo-audio` (microphone "if the app records audio"), `expo-contacts`, `expo-local-authentication` (Face ID). **Sign in with Apple**: third-party sign-in (`@react-native-google-signin/google-signin`, `react-native-fbsdk-next`, or a Supabase `signInWithOAuth` / `signInWithIdToken` with a non-Apple provider) without Apple sign-in (`expo-apple-authentication`, or Supabase's `apple` provider). Guideline 4.8 accepts any equivalent privacy-focused login, so this is a warning to `allow` with the reason when another option qualifies; `expo-auth-session` alone doesn't trigger it (it serves non-login OAuth too). Also the export-compliance flag (`ios.config.usesNonExemptEncryption` or `ITSAppUsesNonExemptEncryption`), `ios.privacyManifests`, and a missing Expo config. Those two count as set when the [Expo config plugin](#expo-config-plugin) (`@marktiderman/genesis-cli` in `plugins`) will set them: export compliance unless `exportCompliance: false`, the privacy manifest unless `privacyManifest: false` and only when a dependency needs one. |
|
|
645
|
-
| `eas-placeholder` | warn | A `REPLACE_WITH_…` placeholder from the EAS templates still in `eas.json` or `.eas/workflows/*.yml` (YAML comment lines aren't read): the store ids in `eas.json` `submit.production
|
|
790
|
+
| `eas-placeholder` | warn | A `REPLACE_WITH_…` placeholder from the EAS templates still in `eas.json` or `.eas/workflows/*.yml` (YAML comment lines aren't read), each with what replaces it: the store ids in `eas.json` `submit.production` (the App Store Connect Apple ID, the Apple Team ID, the Google Play service account key's path), or `REPLACE_WITH_APP_FOLDER` in `pr-preview.yml`'s `paths`, which otherwise matches nothing, so code changes never start a preview. `genesis init --template native` fills the app folder in (`src`). |
|
|
646
791
|
|
|
647
792
|
**`supabase`**, for `supabase/migrations/*.sql` (`supabase.migrations`). The SQL is read
|
|
648
793
|
statement by statement with comments removed and string (`'…'`, `E'…'`) and dollar-quoted
|