@cellajs/cli 0.4.1 → 0.5.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 +114 -41
- package/dist/config.js.map +1 -1
- package/dist/index.js +1620 -861
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ pnpm cella audit
|
|
|
19
19
|
|---------|-------------|
|
|
20
20
|
| `analyze` | Dry run to see what would change on sync. It leaves your files and branches alone but updates git metadata: it fetches upstream and writes `refs/cella/last-sync` and a graft for the sync base |
|
|
21
21
|
| `sync` | Merge upstream changes onto a fresh branch, sync package.json and open a squash-merge PR into `main` |
|
|
22
|
-
| `
|
|
23
|
-
| `audit` | Update outdated packages and runtime pins, then rebuild the security overrides from a fresh audit |
|
|
22
|
+
| `align` | List the upstream alignments this app has not handled yet, read them, run their codemods, record them |
|
|
23
|
+
| `audit` | Update outdated packages and runtime pins, then rebuild the security overrides from a fresh audit; report the security fixes this machine's Node, pnpm and gh miss |
|
|
24
24
|
| `stats` | Count files by category and workspace package; with `--since <ref>`, count what the current branch changed, by kind of file |
|
|
25
25
|
| `forks` * | Run normal sync inside local fork repositories |
|
|
26
26
|
| `contributions` * | Pull and adopt changes from local forks |
|
|
@@ -37,9 +37,9 @@ Per-service help: `pnpm cella <service> --help`.
|
|
|
37
37
|
|
|
38
38
|
| Service | Useful options |
|
|
39
39
|
|---------|----------------|
|
|
40
|
-
| analyze | `--list`, `--json`, `--scope <all\|risk\|protected>`, `--track <release\|branch>`, `--ref <ref>`, `--unpinned` |
|
|
40
|
+
| analyze | `--list`, `--json`, `--scope <all\|risk\|protected>`, `--all`, `--track <release\|branch>`, `--ref <ref>`, `--unpinned` |
|
|
41
41
|
| sync | `--track <release\|branch>`, `--ref <ref>`, `--keep-config`, `--unpinned` |
|
|
42
|
-
|
|
|
42
|
+
| align | `--all`, `--json`, `--show <id>`, `--extract <id>`, `--run <id> [-- <codemod args>]`, `--mark <ids...>` |
|
|
43
43
|
| audit | `--list` |
|
|
44
44
|
| forks | `--fork <name>`, `--keep-config` |
|
|
45
45
|
| contributions | `--fork <name>`, `--json` |
|
|
@@ -146,39 +146,89 @@ git push -u origin cella/sync/<stamp>
|
|
|
146
146
|
gh pr create --base main --head cella/sync/<stamp> --fill
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
##
|
|
149
|
+
## Analyze output
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
`pnpm cella analyze` prints its file sections in the order they need you: what syncs on its own
|
|
152
|
+
first (`behind`, `diverged`), then pinned files, drifted files, and the upstream changes the sync
|
|
153
|
+
leaves out (`protected but behind upstream`). The summary and `next steps` close the run, so the
|
|
154
|
+
last lines are the ones to act on. A file row is its path, linked per `fileLinkMode`, with a count
|
|
155
|
+
and a short age (`3h`, `2d`, `3mo`) in columns.
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
Large groups collapse: more than 15 behind files become one row per folder, more than 8 pinned files
|
|
158
|
+
keep the ones missing 10 or more upstream lines, and five or more protected files of one kind under
|
|
159
|
+
one override entry become one row (`backend/drizzle/ · 42 × snapshot.json`). `--all` lists every
|
|
160
|
+
path.
|
|
160
161
|
|
|
161
|
-
|
|
162
|
+
Analyze and sync both end with `next steps`, numbered in the order you take them: the review page,
|
|
163
|
+
the command to run next, and the alignments the sync brings or that are still open.
|
|
162
164
|
|
|
163
165
|
```
|
|
164
|
-
|
|
166
|
+
next steps
|
|
167
|
+
────────────────────────────────────────────────────────────
|
|
168
|
+
|
|
169
|
+
1 review file:///Users/you/app/.git/cella-diff/analyze-review.html
|
|
170
|
+
22 diffs in 3 sections · 42 listed without a diff
|
|
171
|
+
2 sync pnpm cella sync
|
|
172
|
+
commits on a fresh branch, a rerun opens the PR · 36 update, 2 merge
|
|
173
|
+
3 align 1 alignment arrives with this sync
|
|
174
|
+
○ Migration notes become alignments · manual · not sync-breaking
|
|
175
|
+
after the sync: pnpm cella align
|
|
165
176
|
```
|
|
166
177
|
|
|
167
|
-
|
|
168
|
-
|
|
178
|
+
Without a terminal (piped, or read by an agent) each alignment row also gets its id, for
|
|
179
|
+
`pnpm cella align --show <id>`.
|
|
180
|
+
|
|
181
|
+
## Alignments
|
|
182
|
+
|
|
183
|
+
Upstream ships an alignment for every change that app code has to follow, in
|
|
184
|
+
`cella/alignments/<id>/`: a README (frontmatter, title, summary, then the steps) and sometimes a
|
|
185
|
+
codemod. Alignments stay upstream. The sync never brings that folder into the app and removes a
|
|
186
|
+
copy it finds (also of `cella/migrations/`, the migration notes upstream deleted when it started
|
|
187
|
+
the alignments); `align` reads them from the upstream commit the app last synced to, which the sync
|
|
188
|
+
already fetched.
|
|
189
|
+
|
|
190
|
+
The frontmatter says what the change asks of the app: `syncBreaking`, `clientCacheBump`,
|
|
191
|
+
`caughtBy` (`compiler`, `tests` or `nothing`: what catches app code the change leaves behind),
|
|
192
|
+
`generate` (the change needs `pnpm generate`), `grep` (words app code may still use) and, beside a
|
|
193
|
+
codemod, its `roots`.
|
|
194
|
+
|
|
195
|
+
The app keeps one small record, `cella/cella.alignments.json`, listing the alignments it has not
|
|
196
|
+
handled yet. The sync adds the ones that arrive with it, `align --mark` removes them, and the file
|
|
197
|
+
is deleted once the list is empty. No file means nothing is pending, so a new app starts without
|
|
198
|
+
one.
|
|
199
|
+
|
|
200
|
+
Alignments are information, never a gate. `analyze` and each sync run list them under
|
|
201
|
+
[`next steps`](#analyze-output): by title, with their kind, at most five. In `analyze` the ones in
|
|
202
|
+
the sync range *arrive with this sync*; they become open once the sync lands, which is when
|
|
203
|
+
`pnpm cella align` lists them. `pnpm cella align` itself ends with one line:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
alignments: 94 of 97 handled · 3 open: pnpm cella align
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The sync PR lists the open alignments with links. Handle them in the sync PR or later; they
|
|
210
|
+
stay listed until marked.
|
|
169
211
|
|
|
170
212
|
```bash
|
|
171
|
-
pnpm cella
|
|
172
|
-
pnpm cella
|
|
173
|
-
pnpm cella
|
|
174
|
-
pnpm cella
|
|
175
|
-
pnpm cella
|
|
176
|
-
pnpm cella
|
|
213
|
+
pnpm cella align # open alignments, with summary and links
|
|
214
|
+
pnpm cella align --show <id> # one alignment's README and what git tells about it
|
|
215
|
+
pnpm cella align --run <id> # run its codemod, report only
|
|
216
|
+
pnpm cella align --run <id> -- rewrite frontend/src # run it with your own arguments
|
|
217
|
+
pnpm cella align --extract <id> # its folder under node_modules/.cache/cella/alignments/<id>/
|
|
218
|
+
pnpm cella align --mark <id> [...] # record alignments as handled
|
|
177
219
|
```
|
|
178
220
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
221
|
+
Next to its README, each alignment shows what git can tell about it: the upstream commit and PR
|
|
222
|
+
that added it, the other alignments of that commit, the files of that commit the app pins, ignores
|
|
223
|
+
or changed, and the lines of app code that hold one of its `grep` words. Only files that differ
|
|
224
|
+
from the last synced upstream commit count, so a template file the app never touched is never a
|
|
225
|
+
hit. Two or more open alignments with `generate` get one line: work their code steps first, then
|
|
226
|
+
generate once. `--show` reads an alignment the sync point does not have yet from the fetched
|
|
227
|
+
upstream branch, so it works before the sync that brings it.
|
|
228
|
+
|
|
229
|
+
`--run` extracts the alignment and runs its codemod with `tsx` from your app root. Everything after
|
|
230
|
+
`--` goes to the codemod as given; without it the codemod gets `inventory` and the alignment's
|
|
231
|
+
`roots`, the report-only run.
|
|
182
232
|
|
|
183
233
|
A codemod's roots cover template-owned files too, and a file that is identical to upstream already
|
|
184
234
|
is the way upstream wants it: upstream may have changed it after writing the codemod, so a rewrite
|
|
@@ -230,8 +280,11 @@ upstream's hunks are dropped, not merged. That is easy to miss (a pinned stylesh
|
|
|
230
280
|
missing new upstream utilities that synced components rely on), so both commands call it out:
|
|
231
281
|
|
|
232
282
|
- `analyze` lists them in a `⚠ protected but behind upstream` section (pinned files as ⨀,
|
|
233
|
-
ignored as ⨂) with the number of lines upstream changed
|
|
234
|
-
|
|
283
|
+
ignored as ⨂) with the number of lines upstream changed, together with the ignored files only
|
|
284
|
+
upstream changed (tagged `new` or `deleted`, see below). New files come first, then the most
|
|
285
|
+
changed; generated output the fork regenerates itself (`sdk/gen`, `*.gen.*` files) is left out.
|
|
286
|
+
`--list`/`--json` include them in `--scope all` and `--scope protected` (`--json` adds
|
|
287
|
+
`upstreamChanged` and `upstreamChangedLines`).
|
|
235
288
|
- `sync` prints the same list at the end of its summary, right when the drop happens.
|
|
236
289
|
|
|
237
290
|
```
|
|
@@ -244,9 +297,9 @@ missing new upstream utilities that synced components rely on), so both commands
|
|
|
244
297
|
|
|
245
298
|
The [review page](#review-page) shows what upstream changed in each of them since the last sync.
|
|
246
299
|
The check is relative to the last sync point: a drop that happened in an earlier sync only shows
|
|
247
|
-
up as plain `ahead` afterwards. For that case the `↑ protected in fork` section
|
|
248
|
-
|
|
249
|
-
tips, `--json`: `upstreamLinesAbsent`). That is upstream content the fork never received,
|
|
300
|
+
up as plain `ahead` afterwards. For that case the `↑ protected in fork` section counts the
|
|
301
|
+
`upstream lines absent` from each pinned file (lines upstream has that the fork lacks, compared at
|
|
302
|
+
the tips, `--json`: `upstreamLinesAbsent`). That is upstream content the fork never received,
|
|
250
303
|
deliberately or not: the review page shows the difference, so you can decide. Ignored files are
|
|
251
304
|
not annotated.
|
|
252
305
|
|
|
@@ -257,13 +310,15 @@ syncs dropped come back too. Review the staged merge in your editor and keep wha
|
|
|
257
310
|
|
|
258
311
|
### Upstream changes that never sync
|
|
259
312
|
|
|
260
|
-
Two more kinds of upstream change never reach the fork on their own. `analyze`
|
|
261
|
-
|
|
313
|
+
Two more kinds of upstream change never reach the fork on their own. `analyze` lists the first in
|
|
314
|
+
`protected but behind upstream` and prints the second after its file sections; `sync` prints both
|
|
315
|
+
after its merge summary:
|
|
262
316
|
|
|
263
317
|
- **Ignored paths changed upstream.** Upstream changed, added or deleted a file under an `ignored`
|
|
264
318
|
entry (app-owned module folders included) and the fork left it untouched. No conflict marks it,
|
|
265
|
-
so this is where new config keys and version bumps under `shared/config` show up.
|
|
266
|
-
entry gets one line with a file count, and the [review page](#review-page) shows
|
|
319
|
+
so this is where new config keys and version bumps under `shared/config` show up. In `sync`
|
|
320
|
+
each `ignored` entry gets one line with a file count, and the [review page](#review-page) shows
|
|
321
|
+
the diffs. Files
|
|
267
322
|
both sides changed stay in the section above, and generated output the fork regenerates itself
|
|
268
323
|
(`sdk/gen`, `*.gen.*` files) is left out. `--list`/`--json` include these
|
|
269
324
|
files in `--scope all` and `--scope protected` (`--json`: `upstreamOnly`).
|
|
@@ -301,26 +356,29 @@ pnpm cella sync --keep-config # merge although upstream changed its sync confi
|
|
|
301
356
|
|
|
302
357
|
The terminal lists files; the review page shows their diffs, side by side and highlighted, on one
|
|
303
358
|
page in your browser under the same section titles. `analyze` and `sync` write it whenever a list
|
|
304
|
-
has files, and
|
|
359
|
+
has files, and list it first under [`next steps`](#analyze-output):
|
|
305
360
|
|
|
306
361
|
```
|
|
307
|
-
|
|
308
|
-
|
|
362
|
+
1 review file:///Users/you/app/.git/cella-diff/sync-review.html
|
|
363
|
+
3 diffs of upstream changes that did not arrive · opened in the browser
|
|
309
364
|
```
|
|
310
365
|
|
|
311
366
|
| Section | `analyze` | `sync` | The diff shows |
|
|
312
367
|
| --- | --- | --- | --- |
|
|
313
368
|
| protected but behind upstream (sync: protected files kept the fork version) | ✓ | ✓ | what upstream changed since the last sync |
|
|
314
|
-
| ignored paths changed upstream | ✓ | ✓ | what upstream changed since the last sync |
|
|
369
|
+
| ignored paths changed upstream (analyze: under protected but behind upstream) | ✓ | ✓ | what upstream changed since the last sync |
|
|
315
370
|
| pinned files that match the previous upstream | ✓ | ✓ | what upstream changed since the last sync |
|
|
316
371
|
| protected in fork, upstream lines absent | ✓ | | the fork against upstream, both as they are now |
|
|
317
372
|
| drifted from upstream | ✓ | | what the fork changed since the last sync |
|
|
318
373
|
|
|
319
374
|
`sync` opens the page in your browser when it runs in a terminal: the files on it are upstream
|
|
320
375
|
changes the merge did not bring in, and the committed sync branch is where you adopt them.
|
|
321
|
-
`analyze` only
|
|
376
|
+
`analyze` only lists the page, since you run it often and pinned files keep their absent lines.
|
|
322
377
|
The page lives in the git dir, so it never shows up in `git status`, and each run overwrites it. It
|
|
323
|
-
|
|
378
|
+
renders at most 50 diffs and 15,000 diff lines, and a single diff over 2,000 lines is listed
|
|
379
|
+
instead (a rendered line costs about 0.6 KB of page). Sections take turns, one file each, so every
|
|
380
|
+
section gets diffs before one fills the page. The rest, and files without a text diff, are listed
|
|
381
|
+
by path.
|
|
324
382
|
|
|
325
383
|
## Package.json sync
|
|
326
384
|
|
|
@@ -378,6 +436,21 @@ A pin moves within its major, to the newest version older than `minimumReleaseAg
|
|
|
378
436
|
waits until Docker Hub has the `node:<version><suffix>` images the Dockerfiles build from, and the
|
|
379
437
|
audit prints what is left to do on your machine: switching its Node, and building each changed image.
|
|
380
438
|
|
|
439
|
+
### This machine
|
|
440
|
+
|
|
441
|
+
The pins say what the workspace should run; the tools on your machine can still miss security
|
|
442
|
+
fixes. Below the table the audit shows, for each one, what it misses:
|
|
443
|
+
|
|
444
|
+
| Tool | Which one | Feed |
|
|
445
|
+
|------|-----------|------|
|
|
446
|
+
| Node | the one running the audit, which also runs the workspace | nodejs.org release index |
|
|
447
|
+
| pnpm | the one your terminal starts, before it switches to `packageManager` | npm advisory database |
|
|
448
|
+
| gh | the one on your PATH | OSV |
|
|
449
|
+
|
|
450
|
+
A tool that misses a fix gets a dot and the command to fix it, for the way it was installed (Volta,
|
|
451
|
+
Homebrew, or pnpm's own `self-update`), naming the newest version that has every fix and is older
|
|
452
|
+
than `minimumReleaseAge`. The audit does not change these tools itself.
|
|
453
|
+
|
|
381
454
|
### Holding a package back
|
|
382
455
|
|
|
383
456
|
To keep a package off the update list, use pnpm's own setting, with the reason as a comment.
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/types.ts"],"sourcesContent":["/**\n * Configuration types: the public cella/cella.config.ts surface, its runtime\n * schema, and the internal types the services share.\n */\n\nimport { z } from 'zod';\n\n// Public API for cella/cella.config.ts.\n\nconst PACKAGE_JSON_SYNC_KEYS = [\n 'dependencies',\n 'devDependencies',\n 'peerDependencies',\n 'optionalDependencies',\n 'scripts',\n 'engines',\n 'packageManager',\n 'overrides',\n 'exports',\n 'pnpm',\n] as const;\n\n/** Valid package.json keys that can be synced */\nexport type PackageJsonSyncKey = (typeof PACKAGE_JSON_SYNC_KEYS)[number];\n\n/**\n * Sync settings: all configurable options for the sync CLI.\n * Hover over each property for documentation.\n */\nexport interface SyncSettings {\n /** Upstream repository URL (e.g., 'git@github.com:cellajs/cella.git') */\n upstreamUrl: string;\n\n /**\n * Upstream branch, used for `upstreamTrack: 'branch'` and for GitHub file links.\n * Defaults to 'main'.\n */\n upstreamBranch?: string;\n\n /**\n * How to track upstream cella. Defaults to 'release'.\n * - 'release' (default): sync to a published cella release tag (`0.18.1`, with or without `v`). Stable and\n * reviewable: each bump maps to a changelog. Uses the latest release.\n * - 'branch': follow the bleeding-edge tip of `upstreamBranch`. For cella\n * maintainers and forks doing active development on top of unreleased changes.\n */\n upstreamTrack?: 'release' | 'branch';\n\n /**\n * Trunk branch that `pnpm cella sync` cuts the temporary branch from and that you open the\n * squash-merge PR into. Defaults to 'main'. Cutting fresh from trunk each cycle keeps every\n * PR limited to that cycle's upstream delta (no accumulation) and `main` linear.\n */\n releaseBase?: string;\n\n /** Which package.json keys to sync (default: ['dependencies', 'devDependencies']). `type` always syncs. */\n packageJsonSync?: PackageJsonSyncKey[];\n\n /** Automatic package.json sync after the sync service completes (default: true). Set to false to turn it off. */\n syncWithPackages?: boolean;\n\n /**\n * How to link files in CLI output.\n * - 'commit' (default): Link to the commit that changed the file on GitHub.\n * - 'file': Link to the file in the repo at the upstream branch on GitHub.\n */\n fileLinkMode?: 'commit' | 'file';\n}\n\n/**\n * Configuration for a downstream fork repository that cella interacts with.\n *\n * Cella is the upstream/source-of-truth. For each fork it can:\n * - pull contributions FROM the fork's `pullBranch` (contributions service)\n * - run the normal temporary-branch sync flow inside the fork (forks service)\n */\nexport interface ForkConfig {\n /** Display name for the fork (also used as the contrib/<name> branch slug) */\n name: string;\n /** Local path to the fork repository (relative to this config or absolute) */\n localPath: string;\n /**\n * Git remote URL of the fork (e.g. 'git@github.com:org/fork.git').\n * When set, the contributions service fetches the fork's `pullBranch` from this\n * remote (the authoritative committed ref), so the comparison does not depend on\n * the local checkout being up to date. The local clone is still used to read the\n * fork's owned-folder territory when available.\n */\n remoteUrl?: string;\n /** Fork branch that cella pulls contributions from (contributions service) */\n pullBranch: string;\n}\n\n/** User-configurable sync options for cella/cella.config.ts. */\nexport interface CellaCliConfig {\n /** Core sync settings */\n settings: SyncSettings;\n\n /**\n * File overrides for controlling sync behavior per folder/file.\n */\n overrides?: {\n /**\n * Paths the fork fully owns: never synced (existing or new).\n * Exact paths or directory prefixes, not globs: 'bench' matches 'bench/' and\n * everything under it, 'README.md' matches that exact file.\n * Local territory: upstream cannot add, modify, or delete anything under these.\n */\n ignored?: string[];\n\n /**\n * Paths pinned to the fork: the fork copy wins whole-file.\n * Exact paths or directory prefixes, not globs: 'bench' matches 'bench/' and\n * everything under it, 'README.md' matches that exact file.\n * Upstream changes to a pinned file are dropped, not merged: analyze lists them under\n * \"protected but behind upstream\" to adopt by hand.\n * If fork deleted a pinned file, deletion is respected.\n */\n pinned?: string[];\n };\n\n /**\n * Downstream fork repositories that cella interacts with (for upstream template repos).\n * When configured, the 'forks' and 'contributions' services appear in the CLI menu.\n */\n forks?: ForkConfig[];\n}\n\n/**\n * Helper function for defining cella/cella.config.ts with type checking.\n */\nexport function defineConfig(config: CellaCliConfig): CellaCliConfig {\n return config;\n}\n\n/**\n * Strict runtime schema mirroring {@link CellaCliConfig}.\n *\n * The TS interfaces above stay the source of truth (and keep their hover docs for\n * config authors). This schema is what's enforced at load time: `.strict()` rejects\n * unknown keys, so a typo like `ignoredFolders` for `ignored` fails closed; a silent\n * fallback would drop sync protection (tsx does not typecheck the config).\n *\n * The `satisfies z.ZodType<CellaCliConfig>` assertion keeps schema and interface in\n * lockstep: if either drifts (a renamed/removed/mis-typed field), TypeScript errors here.\n */\nexport const cellaConfigSchema = z\n .object({\n settings: z\n .object({\n upstreamUrl: z.string().min(1),\n upstreamBranch: z.string().min(1).optional(),\n upstreamTrack: z.enum(['release', 'branch']).optional(),\n releaseBase: z.string().min(1).optional(),\n packageJsonSync: z.array(z.enum(PACKAGE_JSON_SYNC_KEYS)).optional(),\n syncWithPackages: z.boolean().optional(),\n fileLinkMode: z.enum(['commit', 'file']).optional(),\n })\n .strict(),\n overrides: z\n .object({\n ignored: z.array(z.string()).optional(),\n pinned: z.array(z.string()).optional(),\n })\n .strict()\n .optional(),\n forks: z\n .array(\n z\n .object({\n name: z.string().min(1),\n localPath: z.string().min(1),\n remoteUrl: z.string().optional(),\n pullBranch: z.string().min(1),\n })\n .strict(),\n )\n .optional(),\n })\n .strict() satisfies z.ZodType<CellaCliConfig>;\n\n// Internal types for the services.\n\n/** Sync services available in the CLI */\nexport type SyncService = 'analyze' | 'sync' | 'migrate' | 'audit' | 'forks' | 'contributions' | 'stats';\n\n/** Analyze output scope for interactive and machine-readable flows */\nexport type AnalyzeScope = 'all' | 'risk' | 'protected';\n\n/** Runtime configuration with all resolved values */\nexport interface RuntimeConfig extends CellaCliConfig {\n /** Resolved fork repository path */\n forkPath: string;\n\n /** Full upstream remote ref (e.g., 'cella-upstream/development') */\n upstreamRef: string;\n\n /** Selected sync service */\n service: SyncService;\n\n /** Non-interactive list output (for LLM/agent usage) */\n list: boolean;\n\n /** Machine-readable JSON output (for tooling/agent usage) */\n json: boolean;\n\n /** Scope of files returned in analyze list/json output */\n scope?: AnalyzeScope;\n\n /** Show verbose output */\n verbose: boolean;\n\n /** Pre-selected fork name (skips fork selection prompt) */\n fork?: string;\n\n /**\n * Override upstream tracking for this run (analyze/sync), ignoring `settings.upstreamTrack`.\n * 'branch' follows the upstream branch tip (bleeding edge); 'release' uses a release tag.\n */\n track?: 'release' | 'branch';\n\n /**\n * Pin the upstream ref for this run (analyze/sync), overriding `track`: a commit sha, a release\n * tag or an upstream branch name. Must be on the upstream branch or in an upstream release.\n */\n ref?: string;\n\n /**\n * Merge with the fork's sync config as it stands (sync service). Without it, a new merge stops\n * before anything changes when upstream changed its own `overrides` or `packageJsonSync` in ways\n * the fork config does not follow.\n */\n keepConfig?: boolean;\n\n /**\n * Lift every pinned entry for this run (analyze, sync): managed files stay pinned, and the merge\n * uses the full upstream history, so upstream changes that earlier syncs dropped come back too.\n */\n unpinned?: boolean;\n\n /** Count what the current branch changed since it left this ref, by kind of file (stats service) */\n since?: string;\n\n /** Print the `since` table as markdown for a pull request description (stats service) */\n md?: boolean;\n\n /** List every upstream migration note, not only the open ones (migrate service) */\n all?: boolean;\n\n /** Print one migration note's README (migrate service) */\n show?: string;\n\n /** Write one migration note's folder where its codemod can run (migrate service) */\n extract?: string;\n\n /** Run one migration note's codemod, keeping files identical to upstream as they are (migrate service) */\n run?: string;\n\n /** Arguments after `--`, passed to the codemod as given (migrate service, with `run`) */\n runArgs?: string[];\n\n /** Migration note ids to record as handled (migrate service) */\n mark?: string[];\n}\n\n/** File status after analysis */\nexport type FileStatus =\n | 'identical' // No changes needed\n | 'ahead' // Fork is ahead, protected (pinned/ignored)\n | 'local' // Local file (never existed upstream)\n | 'drifted' // Fork is ahead, NOT protected (at risk)\n | 'behind' // Upstream has changes to sync\n | 'diverged' // Both changed, will merge\n | 'pinned' // Fork wins on conflict\n | 'ignored' // Excluded from sync entirely\n | 'deleted' // Fork deleted, will stay deleted\n | 'renamed'; // Upstream renamed file\n\n/** Statuses the sync applies changes for: a staged sync holds at least one file with one of these. */\nexport const SYNC_APPLIED_STATUSES: readonly FileStatus[] = ['behind', 'diverged', 'renamed', 'ignored', 'pinned'];\n\n/** Commit metadata for a single log entry */\nexport interface CommitRangeEntry {\n hash: string;\n message: string;\n date: string;\n}\n\n/** Analyzed file with status and metadata */\nexport interface AnalyzedFile {\n path: string;\n status: FileStatus;\n /** True if file is in ignored list */\n isIgnored: boolean;\n /** True if file is in pinned list */\n isPinned: boolean;\n /** True if file exists in fork */\n existsInFork: boolean;\n /** True if file exists in upstream */\n existsInUpstream: boolean;\n /** Relative date when file was last changed (since merge-base) */\n changedAt?: string;\n /** Unix epoch seconds of the last change, for sorting */\n changedTs?: number;\n /** Short commit hash of the last change */\n changedCommit?: string;\n /** For diverged files: relative date of upstream change */\n upstreamChangedAt?: string;\n /** For diverged files: Unix epoch seconds of the upstream change, for sorting */\n upstreamChangedTs?: number;\n /** For diverged files: short commit hash of the upstream change */\n upstreamCommit?: string;\n /** For renamed files: the original path before rename */\n renamedFrom?: string;\n /**\n * Protected (pinned/ignored) files only: both sides changed since the merge-base. The fork\n * side wins whole-file, so upstream's changes to this path are dropped by the sync.\n */\n upstreamChanged?: boolean;\n /** For `upstreamChanged` files: lines upstream changed since the merge-base (undefined for binary) */\n upstreamChangedLines?: number;\n /**\n * Ignored files only: upstream changed, added or deleted the file since the merge-base and the\n * fork did not touch it. Ignored paths never sync, so without this flag the change stays unseen\n * (new config keys, version bumps). Managed files and generated output (`isGeneratedFile`) are\n * never flagged.\n */\n upstreamOnly?: boolean;\n /**\n * Pinned `ahead` files only: lines present upstream but absent from the fork (undefined for\n * binary). Independent of the sync point, so it also shows upstream content dropped by an\n * earlier sync, or removed on purpose; only a diff can tell.\n */\n upstreamLinesAbsent?: number;\n}\n\n/** Summary counts by status */\nexport interface AnalysisSummary {\n /** Changed package/config files that are handled separately from normal sync categories */\n managed: number;\n identical: number;\n ahead: number;\n local: number;\n drifted: number;\n behind: number;\n diverged: number;\n pinned: number;\n ignored: number;\n deleted: number;\n renamed: number;\n}\n\n/** Merge result from merge-engine */\nexport interface MergeResult {\n success: boolean;\n /** Upstream branch name for file links */\n upstreamBranch?: string;\n /** Resolved concrete upstream ref that was merged (branch ref or release tag ref) */\n upstreamRef?: string;\n /** Upstream release tag synced (when tracking releases) */\n upstreamTag?: string;\n files: AnalyzedFile[];\n summary: AnalysisSummary;\n conflicts: string[];\n /** Upstream GitHub URL base for commit links */\n upstreamGitHubUrl?: string;\n /** Upstream commit info */\n upstreamCommit?: CommitRangeEntry;\n /** Files that were auto-merged by git (diverged without remaining conflicts) */\n autoMergedFiles?: string[];\n /**\n * Protected (pinned/ignored) files resolved to the fork side although upstream also changed\n * them: upstream's hunks were dropped, not merged. Review each against upstream.\n */\n protectedConflicts?: string[];\n /** `<merge-base>..<upstream>` range of short SHAs: what upstream changed since the last sync, for the review page. */\n upstreamDiffRange?: string;\n /** How upstream's own sync config changed since the merge-base, where the fork config does not follow. */\n upstreamOverrides?: UpstreamOverridesReport;\n /** Files flagged `upstreamOnly`, grouped by the `ignored` entry they fall under (config order). */\n ignoredUpstreamChanges?: IgnoredUpstreamGroup[];\n /**\n * Upstream migration notes: how many the incoming ref holds, which ones upstream added since the\n * sync point, and how many stay open in the fork once those are added.\n */\n migrationNotes?: { total: number; arrived: string[]; open: number };\n}\n\n/** Entries of one sync config list (`pinned`, `ignored` or `packageJsonSync`) that the fork config does not mirror. */\nexport interface OverrideListChanges {\n /** Entries upstream added since the merge-base that the fork list lacks. */\n added: string[];\n /** Entries upstream removed since the merge-base that the fork list still carries. */\n removed: string[];\n}\n\n/**\n * Upstream sync config changes the fork should review. The sync config is managed (never merged),\n * so new upstream `pinned`/`ignored` entries and `packageJsonSync` keys only reach the fork by\n * hand. `unreadable` means upstream's config was missing or unparsable at one side (`base` =\n * merge-base, `incoming` = upstream ref), so nothing was compared.\n */\nexport type UpstreamOverridesReport =\n | {\n kind: 'changes';\n pinned: OverrideListChanges;\n ignored: OverrideListChanges;\n packageJsonSync: OverrideListChanges;\n }\n | { kind: 'unreadable'; side: 'base' | 'incoming' };\n\n/** Upstream-only changes under one `ignored` entry. */\nexport interface IgnoredUpstreamGroup {\n /** The `ignored` entry (configured or derived from an app-owned module) the files fall under. */\n entry: string;\n /** Changed paths under the entry, sorted. */\n paths: string[];\n /** Paths the fork lacks (new upstream files). */\n added: number;\n /** Paths upstream deleted (the fork keeps them). */\n deleted: number;\n}\n"],"mappings":";AAKA,SAAS,SAAS;AAIlB,IAAM,yBAAyB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+GO,SAAS,aAAa,QAAwC;AACnE,SAAO;AACT;AAaO,IAAM,oBAAoB,EAC9B,OAAO;AAAA,EACN,UAAU,EACP,OAAO;AAAA,IACN,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,IAC7B,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,IAC3C,eAAe,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC,EAAE,SAAS;AAAA,IACtD,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,IACxC,iBAAiB,EAAE,MAAM,EAAE,KAAK,sBAAsB,CAAC,EAAE,SAAS;AAAA,IAClE,kBAAkB,EAAE,QAAQ,EAAE,SAAS;AAAA,IACvC,cAAc,EAAE,KAAK,CAAC,UAAU,MAAM,CAAC,EAAE,SAAS;AAAA,EACpD,CAAC,EACA,OAAO;AAAA,EACV,WAAW,EACR,OAAO;AAAA,IACN,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,IACtC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACvC,CAAC,EACA,OAAO,EACP,SAAS;AAAA,EACZ,OAAO,EACJ;AAAA,IACC,EACG,OAAO;AAAA,MACN,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,MACtB,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,MAC3B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,MAC/B,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,IAC9B,CAAC,EACA,OAAO;AAAA,EACZ,EACC,SAAS;AACd,CAAC,EACA,OAAO;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/config/types.ts"],"sourcesContent":["/**\n * Configuration types: the public cella/cella.config.ts surface, its runtime\n * schema, and the internal types the services share.\n */\n\nimport { z } from 'zod';\n\n// Public API for cella/cella.config.ts.\n\nconst PACKAGE_JSON_SYNC_KEYS = [\n 'dependencies',\n 'devDependencies',\n 'peerDependencies',\n 'optionalDependencies',\n 'scripts',\n 'engines',\n 'packageManager',\n 'overrides',\n 'exports',\n 'pnpm',\n] as const;\n\n/** Valid package.json keys that can be synced */\nexport type PackageJsonSyncKey = (typeof PACKAGE_JSON_SYNC_KEYS)[number];\n\n/**\n * Sync settings: all configurable options for the sync CLI.\n * Hover over each property for documentation.\n */\nexport interface SyncSettings {\n /** Upstream repository URL (e.g., 'git@github.com:cellajs/cella.git') */\n upstreamUrl: string;\n\n /**\n * Upstream branch, used for `upstreamTrack: 'branch'` and for GitHub file links.\n * Defaults to 'main'.\n */\n upstreamBranch?: string;\n\n /**\n * How to track upstream cella. Defaults to 'release'.\n * - 'release' (default): sync to a published cella release tag (`0.18.1`, with or without `v`). Stable and\n * reviewable: each bump maps to a changelog. Uses the latest release.\n * - 'branch': follow the bleeding-edge tip of `upstreamBranch`. For cella\n * maintainers and forks doing active development on top of unreleased changes.\n */\n upstreamTrack?: 'release' | 'branch';\n\n /**\n * Trunk branch that `pnpm cella sync` cuts the temporary branch from and that you open the\n * squash-merge PR into. Defaults to 'main'. Cutting fresh from trunk each cycle keeps every\n * PR limited to that cycle's upstream delta (no accumulation) and `main` linear.\n */\n releaseBase?: string;\n\n /** Which package.json keys to sync (default: ['dependencies', 'devDependencies']). `type` always syncs. */\n packageJsonSync?: PackageJsonSyncKey[];\n\n /** Automatic package.json sync after the sync service completes (default: true). Set to false to turn it off. */\n syncWithPackages?: boolean;\n\n /**\n * How to link files in CLI output.\n * - 'commit' (default): Link to the commit that changed the file on GitHub.\n * - 'file': Link to the file in the repo at the upstream branch on GitHub.\n */\n fileLinkMode?: 'commit' | 'file';\n}\n\n/**\n * Configuration for a downstream fork repository that cella interacts with.\n *\n * Cella is the upstream/source-of-truth. For each fork it can:\n * - pull contributions FROM the fork's `pullBranch` (contributions service)\n * - run the normal temporary-branch sync flow inside the fork (forks service)\n */\nexport interface ForkConfig {\n /** Display name for the fork (also used as the contrib/<name> branch slug) */\n name: string;\n /** Local path to the fork repository (relative to this config or absolute) */\n localPath: string;\n /**\n * Git remote URL of the fork (e.g. 'git@github.com:org/fork.git').\n * When set, the contributions service fetches the fork's `pullBranch` from this\n * remote (the authoritative committed ref), so the comparison does not depend on\n * the local checkout being up to date. The local clone is still used to read the\n * fork's owned-folder territory when available.\n */\n remoteUrl?: string;\n /** Fork branch that cella pulls contributions from (contributions service) */\n pullBranch: string;\n}\n\n/** User-configurable sync options for cella/cella.config.ts. */\nexport interface CellaCliConfig {\n /** Core sync settings */\n settings: SyncSettings;\n\n /**\n * File overrides for controlling sync behavior per folder/file.\n */\n overrides?: {\n /**\n * Paths the fork fully owns: never synced (existing or new).\n * Exact paths or directory prefixes, not globs: 'bench' matches 'bench/' and\n * everything under it, 'README.md' matches that exact file.\n * Local territory: upstream cannot add, modify, or delete anything under these.\n */\n ignored?: string[];\n\n /**\n * Paths pinned to the fork: the fork copy wins whole-file.\n * Exact paths or directory prefixes, not globs: 'bench' matches 'bench/' and\n * everything under it, 'README.md' matches that exact file.\n * Upstream changes to a pinned file are dropped, not merged: analyze lists them under\n * \"protected but behind upstream\" to adopt by hand.\n * If fork deleted a pinned file, deletion is respected.\n */\n pinned?: string[];\n };\n\n /**\n * Downstream fork repositories that cella interacts with (for upstream template repos).\n * When configured, the 'forks' and 'contributions' services appear in the CLI menu.\n */\n forks?: ForkConfig[];\n}\n\n/**\n * Helper function for defining cella/cella.config.ts with type checking.\n */\nexport function defineConfig(config: CellaCliConfig): CellaCliConfig {\n return config;\n}\n\n/**\n * Strict runtime schema mirroring {@link CellaCliConfig}.\n *\n * The TS interfaces above stay the source of truth (and keep their hover docs for\n * config authors). This schema is what's enforced at load time: `.strict()` rejects\n * unknown keys, so a typo like `ignoredFolders` for `ignored` fails closed; a silent\n * fallback would drop sync protection (tsx does not typecheck the config).\n *\n * The `satisfies z.ZodType<CellaCliConfig>` assertion keeps schema and interface in\n * lockstep: if either drifts (a renamed/removed/mis-typed field), TypeScript errors here.\n */\nexport const cellaConfigSchema = z\n .object({\n settings: z\n .object({\n upstreamUrl: z.string().min(1),\n upstreamBranch: z.string().min(1).optional(),\n upstreamTrack: z.enum(['release', 'branch']).optional(),\n releaseBase: z.string().min(1).optional(),\n packageJsonSync: z.array(z.enum(PACKAGE_JSON_SYNC_KEYS)).optional(),\n syncWithPackages: z.boolean().optional(),\n fileLinkMode: z.enum(['commit', 'file']).optional(),\n })\n .strict(),\n overrides: z\n .object({\n ignored: z.array(z.string()).optional(),\n pinned: z.array(z.string()).optional(),\n })\n .strict()\n .optional(),\n forks: z\n .array(\n z\n .object({\n name: z.string().min(1),\n localPath: z.string().min(1),\n remoteUrl: z.string().optional(),\n pullBranch: z.string().min(1),\n })\n .strict(),\n )\n .optional(),\n })\n .strict() satisfies z.ZodType<CellaCliConfig>;\n\n// Internal types for the services.\n\n/** Sync services available in the CLI */\nexport type SyncService = 'analyze' | 'sync' | 'align' | 'audit' | 'forks' | 'contributions' | 'stats';\n\n/** Analyze output scope for interactive and machine-readable flows */\nexport type AnalyzeScope = 'all' | 'risk' | 'protected';\n\n/** Runtime configuration with all resolved values */\nexport interface RuntimeConfig extends CellaCliConfig {\n /** Resolved fork repository path */\n forkPath: string;\n\n /** Full upstream remote ref (e.g., 'cella-upstream/development') */\n upstreamRef: string;\n\n /** Selected sync service */\n service: SyncService;\n\n /** Non-interactive list output (for LLM/agent usage) */\n list: boolean;\n\n /** Machine-readable JSON output (for tooling/agent usage) */\n json: boolean;\n\n /** Scope of files returned in analyze list/json output */\n scope?: AnalyzeScope;\n\n /** Show verbose output */\n verbose: boolean;\n\n /** Pre-selected fork name (skips fork selection prompt) */\n fork?: string;\n\n /**\n * Override upstream tracking for this run (analyze/sync), ignoring `settings.upstreamTrack`.\n * 'branch' follows the upstream branch tip (bleeding edge); 'release' uses a release tag.\n */\n track?: 'release' | 'branch';\n\n /**\n * Pin the upstream ref for this run (analyze/sync), overriding `track`: a commit sha, a release\n * tag or an upstream branch name. Must be on the upstream branch or in an upstream release.\n */\n ref?: string;\n\n /**\n * Merge with the fork's sync config as it stands (sync service). Without it, a new merge stops\n * before anything changes when upstream changed its own `overrides` or `packageJsonSync` in ways\n * the fork config does not follow.\n */\n keepConfig?: boolean;\n\n /**\n * Lift every pinned entry for this run (analyze, sync): managed files stay pinned, and the merge\n * uses the full upstream history, so upstream changes that earlier syncs dropped come back too.\n */\n unpinned?: boolean;\n\n /** Count what the current branch changed since it left this ref, by kind of file (stats service) */\n since?: string;\n\n /** Print the `since` table as markdown for a pull request description (stats service) */\n md?: boolean;\n\n /** List every file instead of collapsing large groups (analyze), or every upstream alignment (align) */\n all?: boolean;\n\n /** Print one alignment's README (align service) */\n show?: string;\n\n /** Write one alignment's folder where its codemod can run (align service) */\n extract?: string;\n\n /** Run one alignment's codemod, keeping files identical to upstream as they are (align service) */\n run?: string;\n\n /** Arguments after `--`, passed to the codemod as given (align service, with `run`) */\n runArgs?: string[];\n\n /** Alignment ids to record as handled (align service) */\n mark?: string[];\n}\n\n/** File status after analysis */\nexport type FileStatus =\n | 'identical' // No changes needed\n | 'ahead' // Fork is ahead, protected (pinned/ignored)\n | 'local' // Local file (never existed upstream)\n | 'drifted' // Fork is ahead, NOT protected (at risk)\n | 'behind' // Upstream has changes to sync\n | 'diverged' // Both changed, will merge\n | 'pinned' // Fork wins on conflict\n | 'ignored' // Excluded from sync entirely\n | 'deleted' // Fork deleted, will stay deleted\n | 'renamed'; // Upstream renamed file\n\n/** Statuses the sync applies changes for: a staged sync holds at least one file with one of these. */\nexport const SYNC_APPLIED_STATUSES: readonly FileStatus[] = ['behind', 'diverged', 'renamed', 'ignored', 'pinned'];\n\n/** Commit metadata for a single log entry */\nexport interface CommitRangeEntry {\n hash: string;\n message: string;\n date: string;\n /** Unix epoch seconds of the commit */\n timestamp?: number;\n}\n\n/** Analyzed file with status and metadata */\nexport interface AnalyzedFile {\n path: string;\n status: FileStatus;\n /** True if file is in ignored list */\n isIgnored: boolean;\n /** True if file is in pinned list */\n isPinned: boolean;\n /** True if file exists in fork */\n existsInFork: boolean;\n /** True if file exists in upstream */\n existsInUpstream: boolean;\n /** Relative date when file was last changed (since merge-base) */\n changedAt?: string;\n /** Unix epoch seconds of the last change, for sorting */\n changedTs?: number;\n /** Short commit hash of the last change */\n changedCommit?: string;\n /** For diverged files: relative date of upstream change */\n upstreamChangedAt?: string;\n /** For diverged files: Unix epoch seconds of the upstream change, for sorting */\n upstreamChangedTs?: number;\n /** For diverged files: short commit hash of the upstream change */\n upstreamCommit?: string;\n /** For renamed files: the original path before rename */\n renamedFrom?: string;\n /**\n * Protected (pinned/ignored) files only: both sides changed since the merge-base. The fork\n * side wins whole-file, so upstream's changes to this path are dropped by the sync.\n */\n upstreamChanged?: boolean;\n /** For `upstreamChanged` and `upstreamOnly` files: lines upstream changed since the merge-base (undefined for binary) */\n upstreamChangedLines?: number;\n /**\n * Ignored files only: upstream changed, added or deleted the file since the merge-base and the\n * fork did not touch it. Ignored paths never sync, so without this flag the change stays unseen\n * (new config keys, version bumps). Managed files and generated output (`isGeneratedFile`) are\n * never flagged.\n */\n upstreamOnly?: boolean;\n /**\n * Pinned `ahead` files only: lines present upstream but absent from the fork (undefined for\n * binary). Independent of the sync point, so it also shows upstream content dropped by an\n * earlier sync, or removed on purpose; only a diff can tell.\n */\n upstreamLinesAbsent?: number;\n}\n\n/** Summary counts by status */\nexport interface AnalysisSummary {\n /** Changed package/config files that are handled separately from normal sync categories */\n managed: number;\n identical: number;\n ahead: number;\n local: number;\n drifted: number;\n behind: number;\n diverged: number;\n pinned: number;\n ignored: number;\n deleted: number;\n renamed: number;\n}\n\n/** Merge result from merge-engine */\nexport interface MergeResult {\n success: boolean;\n /** Upstream branch name for file links */\n upstreamBranch?: string;\n /** Resolved concrete upstream ref that was merged (branch ref or release tag ref) */\n upstreamRef?: string;\n /** Upstream release tag synced (when tracking releases) */\n upstreamTag?: string;\n files: AnalyzedFile[];\n summary: AnalysisSummary;\n conflicts: string[];\n /** Upstream GitHub URL base for commit links */\n upstreamGitHubUrl?: string;\n /** Upstream commit info */\n upstreamCommit?: CommitRangeEntry;\n /** Upstream commits since the last sync point */\n upstreamCommitCount?: number;\n /** Files that were auto-merged by git (diverged without remaining conflicts) */\n autoMergedFiles?: string[];\n /**\n * Protected (pinned/ignored) files resolved to the fork side although upstream also changed\n * them: upstream's hunks were dropped, not merged. Review each against upstream.\n */\n protectedConflicts?: string[];\n /** `<merge-base>..<upstream>` range of short SHAs: what upstream changed since the last sync, for the review page. */\n upstreamDiffRange?: string;\n /** How upstream's own sync config changed since the merge-base, where the fork config does not follow. */\n upstreamOverrides?: UpstreamOverridesReport;\n /** Files flagged `upstreamOnly`, grouped by the `ignored` entry they fall under (config order). */\n ignoredUpstreamChanges?: IgnoredUpstreamGroup[];\n /**\n * Upstream alignments: how many the incoming ref holds, which ones upstream added since the\n * sync point, and the ones open in the fork after the run. A sync opens the arrivals; a dry run\n * leaves them out of `open`.\n */\n alignments?: { total: number; arrived: string[]; open: string[] };\n}\n\n/** Entries of one sync config list (`pinned`, `ignored` or `packageJsonSync`) that the fork config does not mirror. */\nexport interface OverrideListChanges {\n /** Entries upstream added since the merge-base that the fork list lacks. */\n added: string[];\n /** Entries upstream removed since the merge-base that the fork list still carries. */\n removed: string[];\n}\n\n/**\n * Upstream sync config changes the fork should review. The sync config is managed (never merged),\n * so new upstream `pinned`/`ignored` entries and `packageJsonSync` keys only reach the fork by\n * hand. `unreadable` means upstream's config was missing or unparsable at one side (`base` =\n * merge-base, `incoming` = upstream ref), so nothing was compared.\n */\nexport type UpstreamOverridesReport =\n | {\n kind: 'changes';\n pinned: OverrideListChanges;\n ignored: OverrideListChanges;\n packageJsonSync: OverrideListChanges;\n }\n | { kind: 'unreadable'; side: 'base' | 'incoming' };\n\n/** Upstream-only changes under one `ignored` entry. */\nexport interface IgnoredUpstreamGroup {\n /** The `ignored` entry (configured or derived from an app-owned module) the files fall under. */\n entry: string;\n /** Changed paths under the entry, sorted. */\n paths: string[];\n /** Paths the fork lacks (new upstream files). */\n added: number;\n /** Paths upstream deleted (the fork keeps them). */\n deleted: number;\n}\n"],"mappings":";AAKA,SAAS,SAAS;AAIlB,IAAM,yBAAyB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+GO,SAAS,aAAa,QAAwC;AACnE,SAAO;AACT;AAaO,IAAM,oBAAoB,EAC9B,OAAO;AAAA,EACN,UAAU,EACP,OAAO;AAAA,IACN,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,IAC7B,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,IAC3C,eAAe,EAAE,KAAK,CAAC,WAAW,QAAQ,CAAC,EAAE,SAAS;AAAA,IACtD,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,IACxC,iBAAiB,EAAE,MAAM,EAAE,KAAK,sBAAsB,CAAC,EAAE,SAAS;AAAA,IAClE,kBAAkB,EAAE,QAAQ,EAAE,SAAS;AAAA,IACvC,cAAc,EAAE,KAAK,CAAC,UAAU,MAAM,CAAC,EAAE,SAAS;AAAA,EACpD,CAAC,EACA,OAAO;AAAA,EACV,WAAW,EACR,OAAO;AAAA,IACN,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,IACtC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACvC,CAAC,EACA,OAAO,EACP,SAAS;AAAA,EACZ,OAAO,EACJ;AAAA,IACC,EACG,OAAO;AAAA,MACN,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,MACtB,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,MAC3B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,MAC/B,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,IAC9B,CAAC,EACA,OAAO;AAAA,EACZ,EACC,SAAS;AACd,CAAC,EACA,OAAO;","names":[]}
|