@tinycld/bootstrap 2.4.7 → 3.0.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 CHANGED
@@ -23,7 +23,9 @@ pnpm install # links members + runs the generator (postinstall)
23
23
  cd tinycld && pnpm run dev
24
24
  ```
25
25
 
26
- The CLI writes the workspace coordination files (`package.json`, `tinycld.packages.ts`, `vitest.config.ts`, shared test stubs) from embedded templates, then clones the `tinycld` repo (which carries `@tinycld/core` + `@tinycld/package-scripts` nested) as a sibling. Each `--with <slug>` adds one feature sibling. `tinycld` is always cloned; everything else is opt-in.
26
+ The CLI writes a small set of workspace files from embedded templates (`tinycld.packages.ts`, `vitest.config.ts`, shared test stubs), then clones the `tinycld` repo (which carries `@tinycld/core` + `@tinycld/package-scripts` nested) as a sibling. Each `--with <slug>` adds one feature sibling. `tinycld` is always cloned; everything else is opt-in.
27
+
28
+ Bootstrap carries no vendor version pins and owns none of the root coordination-file formats. Immediately after cloning, it runs `scripts/write-workspace-root.ts` **from inside the freshly cloned `tinycld` repo** to write `package.json`, `pnpm-workspace.yaml` (incl. the pnpm `overrides:` block), a root `package-versions.json` copy, `biome.json`, `.watchmanconfig`, and `.npmrc` — all derived from `tinycld/core/package-versions.json`, the pins' source of truth. This means `--assemble-only` requires a tinycld ref that contains `scripts/write-workspace-root.ts` (the first tinycld release after 2026-08); an older ref fails assembly with a clear error naming the missing script, rather than silently producing a workspace with stale or missing root files.
27
29
 
28
30
  `--with name@ref` pins a clone to a tag, branch, or commit:
29
31
 
@@ -47,7 +49,7 @@ TINYCLD_REPO_BASE=https://github.com/tinycld \
47
49
  npx @tinycld/bootstrap --new my-feature
48
50
  ```
49
51
 
50
- You'll be walked through an interactive prompt. The positional argument (`my-feature`) is the **slug** — kebab-case, 3–40 chars, becomes `@tinycld/my-feature`, the URL segment `/a/<orgSlug>/my-feature/`, and the Go module `tinycld.org/packages/my-feature`. Leave it off to be asked for it.
52
+ You'll be walked through an interactive prompt. The positional argument (`my-feature`) is the **slug** — kebab-case, 3–40 chars, becomes `@tinycld/my-feature`, the URL segment `/a/my-feature/`, and the Go module `tinycld.org/packages/my-feature`. Leave it off to be asked for it.
51
53
 
52
54
  If `--new` runs from inside an existing workspace root (a `tinycld/` shell sibling detected), the new package is scaffolded as a sibling and the link step adds it to `pnpm-workspace.yaml`. Otherwise the CLI creates a wrapper directory `./tinycld-<slug>/` with the package at `./tinycld-<slug>/<slug>/`, assembles a workspace around it (cloning the `tinycld` repo), and links — leaving you a self-contained, runnable workspace.
53
55
 
@@ -131,7 +133,7 @@ my-feature/
131
133
  ├── sidebar.tsx # sidebar rendered for this package's routes
132
134
  ├── types.ts # MyFeatureSchema + record interfaces
133
135
  └── screens/
134
- ├── _layout.tsx # Stack layout for /a/[orgSlug]/my-feature/**
136
+ ├── _layout.tsx # Stack layout for /a/my-feature/**
135
137
  ├── [id].tsx # detail route
136
138
  └── index.tsx # list route
137
139
  ```
@@ -142,7 +144,7 @@ The `tinycld/my-feature/` nesting gives the package a stable public API surface
142
144
 
143
145
  ### `settings-only` — service package
144
146
 
145
- Matches `@tinycld/google-takeout-import`. The package contributes only a settings panel — no routes, no nav entry, no collections, no server. Use this for integrations or admin-style tools that live under `/a/<orgSlug>/settings/**`.
147
+ Matches `@tinycld/google-takeout-import`. The package contributes only a settings panel — no routes, no nav entry, no collections, no server. Use this for integrations or admin-style tools that live under `/a/settings/**`.
146
148
 
147
149
  <details>
148
150
  <summary>Generated tree</summary>
@@ -172,7 +174,7 @@ The scaffolded `manifest.ts` is the single source of truth for what a package co
172
174
  | Field | Meaning |
173
175
  |---|---|
174
176
  | `name`, `slug`, `version`, `description` | Identity. `slug` is the URL segment and the npm name's last segment. |
175
- | `routes.directory` | Subpath (resolved through `package.json` exports) where org-scoped screens live. Generator re-exports each screen file under `app/a/[orgSlug]/<slug>/`. |
177
+ | `routes.directory` | Subpath (resolved through `package.json` exports) where the package's screens live. Generator re-exports each screen file under `app/a/(app)/<slug>/`. |
176
178
  | `nav` | `{ label, icon, order, shortcut }` — sidebar entry for the org workspace. |
177
179
  | `sidebar.component` | Subpath to the package's sidebar component, rendered when on its routes. |
178
180
  | `provider.component` | Optional context provider mounted around the package's routes. |
@@ -180,7 +182,7 @@ The scaffolded `manifest.ts` is the single source of truth for what a package co
180
182
  | `collections.register`, `collections.types` | Subpaths to the pbtsdb registration function and the schema types. |
181
183
  | `seed.script` | Default-export async function called by the dev seeder for this package. |
182
184
  | `server` | `{ package, module }` — relative dir + Go module path for the optional server extension. |
183
- | `settings[]` | One entry per panel contributed under `/a/<orgSlug>/settings/<slug>`. |
185
+ | `settings[]` | One entry per panel contributed under `/a/settings/<slug>`. |
184
186
 
185
187
  All path-shaped fields use **short subpaths** (`'screens'`, `'sidebar'`, `'collections'`) that match the keys in `package.json`'s `exports` map — the generator follows the exports map to find the actual files under `tinycld/<slug>/...`.
186
188
 
@@ -206,7 +208,7 @@ cd my-feature
206
208
  pnpm exec tinycld-pkg check
207
209
  ```
208
210
 
209
- Once linked, the app shell's generator wires your manifest in automatically: routes appear at `/a/<orgSlug>/my-feature/**`, the sidebar renders, the settings panel shows up, migrations get picked up by PocketBase. No further changes to the `tinycld` shell or `@tinycld/core` are needed.
211
+ Once linked, the app shell's generator wires your manifest in automatically: routes appear at `/a/my-feature/**`, the sidebar renders, the settings panel shows up, migrations get picked up by PocketBase. No further changes to the `tinycld` shell or `@tinycld/core` are needed.
210
212
 
211
213
  > ⚠️ **`tinycld/metro.config.cjs` watches the workspace root**, but Expo's resolver caches package metadata at boot. If you add a new sibling while `pnpm run dev` is already running, restart it (Ctrl-C, then `pnpm run dev`) so the new member is picked up. CI is fine — it always starts fresh.
212
214
 
@@ -1,5 +1,5 @@
1
1
  import { spawnSync } from 'node:child_process';
2
- import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
2
+ import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from 'node:fs';
3
3
  import { dirname, join, relative } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  // All feature members that exist in the ecosystem. The workspace manifest lists
@@ -11,394 +11,27 @@ const ALL_FEATURES = ['contacts', 'mail', 'calendar', 'drive', 'calc', 'text', '
11
11
  // tinycldRef. Both @tinycld/core (at tinycld/core) and @tinycld/package-scripts
12
12
  // (the tinycld-pkg CLI, at tinycld/package-scripts) live NESTED inside it, so
13
13
  // they arrive with the single clone and are never cloned separately.
14
- // Listed in the manifest workspaces array (everything that could exist). The
15
- // nested member paths tinycld/core and tinycld/package-scripts are valid npm
16
- // workspace entries that resolve inside the one cloned `tinycld` repo.
17
- const ALL_MEMBERS = ['tinycld', 'tinycld/core', 'tinycld/package-scripts', ...ALL_FEATURES];
18
- // pnpm version pinned via the package.json "packageManager" field so corepack
19
- // resolves the same pnpm everywhere (local, CI, EAS). Bump in lockstep with the
20
- // workspace's committed packageManager.
21
- const PNPM_VERSION = '11.3.0';
22
- // Framework / native / styling version pins, written to package-versions.json and
23
- // transcribed into the pnpm `overrides:` block. The in-app OTA rebuild installs
24
- // with `pnpm install --no-frozen-lockfile` (admin package editing changes the
25
- // FEATURE set, so the lockfile can't be frozen), which would otherwise re-resolve
26
- // every caret/tilde range and drift these deps past the device's embedded native
27
- // binary — a native-module mismatch breaks the OTA bundle, a uniwind/tailwindcss
28
- // bump recompiles classNames differently (app-wide visual drift). Overrides force
29
- // the embedded-binary versions regardless of --no-frozen-lockfile while leaving
30
- // feature packages free. Bump in lockstep with each native (EAS) build.
31
- const FRAMEWORK_OVERRIDES = {
32
- expo: '55.0.26',
33
- react: '19.2.0',
34
- 'react-dom': '19.2.0',
35
- 'react-native': '0.83.6',
36
- 'react-native-reanimated': '4.2.1',
37
- 'react-native-worklets': '0.7.4',
38
- 'react-native-gesture-handler': '3.0.1',
39
- 'react-native-safe-area-context': '5.6.2',
40
- 'react-native-screens': '4.23.0',
41
- 'react-native-svg': '15.15.3',
42
- 'react-native-web': '0.21.2',
43
- 'expo-router': '55.0.16',
44
- 'expo-image': '55.0.11',
45
- 'expo-image-picker': '55.0.20',
46
- '@sentry/react-native': '7.11.0',
47
- uniwind: '1.8.0',
48
- tailwindcss: '4.3.0',
49
- 'tailwind-variants': '0.1.20',
50
- 'tailwind-merge': '3.6.0',
51
- '@gluestack-ui/utils': '5.0.5-alpha.0',
52
- '@shopify/flash-list': '2.0.2',
53
- 'lucide-react-native': '1.17.0',
54
- 'react-hook-form': '7.77.0',
55
- '@tanstack/db': '0.6.8',
56
- // Must move in lockstep with @tanstack/db above: react-db calls internals of
57
- // a specific db version, so pinning one and letting the other float produces
58
- // a workspace that installs clean and throws on first render
59
- // ("(0, t.isCollection) is not a function" — every screen dead).
60
- '@tanstack/react-db': '0.1.86',
61
- '@tanstack/react-query': '5.101.0',
62
- // Not a version pin: a git fork. Upstream drax has unmerged fixes the board
63
- // drag depends on, so every workspace must resolve to the fork or the
64
- // kanban drag regresses. The fork commits its built lib/ and declares no
65
- // prepare script, so this needs no allowBuilds entry — pnpm only blocks git
66
- // deps that would run a build script on install.
67
- 'react-native-drax': 'github:nathanstitt/react-native-drax#b863d89a70c73454d7f3495bf79e382586495fa4',
68
- };
69
- // The documentation key carried in package-versions.json (ignored by the YAML
70
- // generators — it isn't a valid package name). Kept in sync with the Go reader's
71
- // delete("//") in rebuild_assemble.go.
72
- const OVERRIDES_DOC = 'Source of truth for the pnpm `overrides:` block in pnpm-workspace.yaml. Both generators (this file and the Go writePnpmWorkspaceYAML in the OTA rebuild) read these pins so the dev workspace and the OTA build pin identically. See FRAMEWORK_OVERRIDES in assemble-workspace.ts for why. Bump in lockstep with each native (EAS) build.';
73
- // renderOverridesBlock formats FRAMEWORK_OVERRIDES as a pnpm `overrides:` YAML
74
- // block, sorted for a stable diff. Scoped names (leading @) are single-quoted so
75
- // YAML doesn't read them as anchors; plain names are bare. Mirrors the Go
76
- // renderOverridesBlock so both generators emit byte-identical blocks.
77
- function renderOverridesBlock() {
78
- const lines = ['overrides:'];
79
- for (const name of Object.keys(FRAMEWORK_OVERRIDES).sort()) {
80
- const key = name.startsWith('@') ? `'${name}'` : name;
81
- lines.push(` ${key}: ${FRAMEWORK_OVERRIDES[name]}`);
82
- }
83
- return lines.join('\n');
84
- }
85
14
  /**
86
- * Direct child dirs of `root` that look like a feature member already on disk:
87
- * a package.json plus a manifest.ts/js. This mirrors the app generator's own
88
- * discovery (it scans the workspace root for manifest-bearing members), so the
89
- * member list bootstrap writes stays in sync with what the generator will load.
90
- *
91
- * The motivating case is CI / a custom package: a member checked out into its
92
- * slot but absent from ALL_MEMBERS is discovered by the generator yet never
93
- * linked by pnpm (→ "No manifest found"). Self-registering it here closes that
94
- * gap without requiring every package to be hardcoded in ALL_FEATURES.
15
+ * Run the workspace root-writer that ships INSIDE the cloned tinycld repo.
16
+ * Bootstrap deliberately knows nothing about the root files' contents — not
17
+ * the vendor version pins (tinycld/core/package-versions.json) and not the
18
+ * file formats. A vendor bump or format change is a tinycld commit, never a
19
+ * bootstrap release. Node >=24 (our engines floor) executes the TypeScript
20
+ * directly via native type stripping; the script is self-contained by
21
+ * contract, so no install has to have happened yet.
95
22
  */
96
- function discoverPresentMembers(root) {
97
- let entries;
98
- try {
99
- entries = readdirSync(root);
23
+ function delegateWorkspaceRoot(root) {
24
+ const script = join(root, 'tinycld', 'scripts', 'write-workspace-root.ts');
25
+ const tinycldDir = join(root, 'tinycld');
26
+ if (!existsSync(script)) {
27
+ throw new Error(`${script} not found — the tinycld checkout at ${tinycldDir} predates core-owned ` +
28
+ 'workspace roots — update it (git pull) or pass a newer tinycldRef; or use an ' +
29
+ 'older @tinycld/bootstrap that still writes root files itself.');
100
30
  }
101
- catch {
102
- return [];
31
+ const r = spawnSync(process.execPath, [script], { cwd: root, stdio: 'inherit' });
32
+ if (r.status !== 0) {
33
+ throw new Error(`write-workspace-root failed (exit ${r.status ?? 'signal'}) — see output above`);
103
34
  }
104
- return entries.filter((name) => {
105
- if (name === 'node_modules' || name.startsWith('.'))
106
- return false;
107
- const dir = join(root, name);
108
- try {
109
- if (!statSync(dir).isDirectory())
110
- return false;
111
- }
112
- catch {
113
- return false;
114
- }
115
- const hasManifest = existsSync(join(dir, 'manifest.ts')) || existsSync(join(dir, 'manifest.js'));
116
- return existsSync(join(dir, 'package.json')) && hasManifest;
117
- });
118
- }
119
- /**
120
- * pnpm-workspace.yaml contents: member discovery list + the settings the
121
- * ecosystem depends on. node-linker=hoisted reproduces npm's flat node_modules
122
- * so feature siblings (peerDeps-only, no node_modules of their own) resolve
123
- * react/expo/etc. up to the root, and Metro/tsc resolution work unchanged.
124
- * pnpm 10+ reads these keys from THIS file, not .npmrc.
125
- *
126
- * `dir` is the workspace root: any manifest-bearing member already on disk but
127
- * not in ALL_MEMBERS (a CI- or custom-package checkout) is unioned into the
128
- * `packages:` list so pnpm links what the generator discovers. This list is the
129
- * source of truth pnpm reads — unlike the package.json `workspaces` hint.
130
- */
131
- function pnpmWorkspaceYaml(dir) {
132
- const allMembers = [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])];
133
- const members = allMembers.map((m) => ` - ${m}`).join('\n');
134
- return [
135
- 'nodeLinker: hoisted',
136
- 'linkWorkspacePackages: true',
137
- 'strictPeerDependencies: false',
138
- 'enablePrePostScripts: true',
139
- '',
140
- '# pnpm 11 ships a default minimumReleaseAge supply-chain gate (~24h) that',
141
- '# rejects very freshly-published versions. The @tinycld/* libraries are',
142
- '# first-party and released in lockstep with these members, so a same-day',
143
- '# pbtsdb (or other @tinycld dep) bump must install immediately rather than',
144
- '# blocking install/CI for a day. Exclude them from the gate; third-party',
145
- '# packages still get the freshness window.',
146
- 'minimumReleaseAgeExclude:',
147
- ' - pbtsdb',
148
- " - '@tinycld/*'",
149
- '',
150
- 'packages:',
151
- members,
152
- '',
153
- '# Build-script approvals (pnpm blocks dependency build scripts by default).',
154
- 'allowBuilds:',
155
- ' esbuild: true',
156
- " '@sentry/cli': true",
157
- '',
158
- '# Framework/native/styling version pins — see package-versions.json (the',
159
- '# source of truth) and FRAMEWORK_OVERRIDES in @tinycld/bootstrap. These keep',
160
- "# the OTA rebuild's --no-frozen-lockfile install from drifting these deps off",
161
- '# the embedded native binary.',
162
- renderOverridesBlock(),
163
- '',
164
- ].join('\n');
165
- }
166
- /**
167
- * .watchmanconfig contents: the directories watchman must NOT crawl or subscribe
168
- * to. The motivating failure is native build artifacts — tinycld/ios (Pods) and
169
- * tinycld/android (.gradle, .cxx, build/) are multi-GB and churn on every native
170
- * build, overflowing the fsevents kernel queue ("MustScanSubDirs UserDropped")
171
- * and forcing slow recrawls that stall Metro starts.
172
- *
173
- * CRITICAL: the root node_modules is NOT ignored. Under node-linker=hoisted it's
174
- * the flat store Metro resolves EVERY dependency from (incl. expo-router/entry,
175
- * the app entry point); hiding it from watchman makes Metro's file map miss those
176
- * files → "Unable to resolve module ./node_modules/...". Only node_modules/.cache
177
- * (Metro's transform cache, never a resolvable path) is excluded. Each MEMBER's
178
- * own node_modules IS ignored — under hoisting those are near-empty (deps resolve
179
- * up to the root store), so Metro never reads them and they're pure crawl cost.
180
- *
181
- * Ignore_dirs matches path prefixes relative to the watch root, so the bare
182
- * ".git" covers only the root-level one and every member's .git is listed
183
- * explicitly. Listing an ignore_dir that doesn't exist is harmless — watchman
184
- * skips absent paths.
185
- *
186
- * NON_MEMBER_DIRS are sibling dirs that aren't workspace members (so they're
187
- * absent from the member union above) but routinely exist in a dev checkout and
188
- * carry their own node_modules/.git: bootstrap (cloned for development), and the
189
- * utils/web ecosystem tooling. Their node_modules/.git/dist are excluded too —
190
- * none are part of the Metro app graph.
191
- */
192
- const NON_MEMBER_DIRS = ['bootstrap', 'utils', 'web'];
193
- function watchmanConfig(dir) {
194
- const members = [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])];
195
- const memberDirs = members.flatMap((m) => [`${m}/node_modules`, `${m}/.git`]);
196
- const testResultDirs = members.filter((m) => !m.startsWith('tinycld')).map((m) => `${m}/test-results`);
197
- const nonMemberDirs = NON_MEMBER_DIRS.flatMap((d) => [`${d}/node_modules`, `${d}/.git`, `${d}/dist`]);
198
- const ignoreDirs = [
199
- // Root-level .git only. The root node_modules is deliberately NOT ignored:
200
- // under node-linker=hoisted it's the flat store Metro resolves every dep
201
- // from (incl. expo-router/entry), so hiding it breaks module resolution.
202
- '.git',
203
- // Metro's own transform cache under the root store — churns every build,
204
- // never a resolvable module path.
205
- 'node_modules/.cache',
206
- ...memberDirs,
207
- ...nonMemberDirs,
208
- // App-shell native + generated output that churns on builds. ios/android
209
- // are multi-GB and the original motivation for this file.
210
- 'tinycld/ios',
211
- 'tinycld/android',
212
- 'tinycld/modules/app-updater/android/build',
213
- 'tinycld/modules/app-updater/ios/build',
214
- 'tinycld/.expo',
215
- 'tinycld/dist',
216
- 'tinycld/server/pb_data',
217
- 'tinycld/server/pb_test_data',
218
- 'tinycld/test-results',
219
- 'tinycld/playwright-report',
220
- ...testResultDirs,
221
- ];
222
- const config = {
223
- enable_parallel_crawl: true,
224
- // fsevents_try_resync is FALSE — watchman's own default since Dec 2021.
225
- // When fsevents drops events (kFSEventStreamEventFlagUserDropped, common
226
- // under the ~110k-file root store on a `pnpm install` / `git checkout`
227
- // burst), resync-from-journal usually fails on macOS and falls back to a
228
- // full recrawl — that's the 60s "syncToNow: timed out waiting for cookie
229
- // file" stall on Metro start. Leaving it false skips the doomed resync.
230
- fsevents_try_resync: false,
231
- // Latency passed to FSEventStreamCreate (seconds). Higher = the OS batches
232
- // more change notifications per wakeup, so a burst overflows the kernel
233
- // queue less. Measured on a fast SSD here, an 8k-file burst (a `pnpm
234
- // install` / `git checkout`) still drops events at 0.1/0.25, goes clean at
235
- // 0.5, and survives even a 20k-file burst at 1.0. We ship 1.0 because this
236
- // default lands on unknown hardware: a slow / encrypted / cloud-synced
237
- // volume drains the fsevents queue more slowly, so it drops at a FAR
238
- // smaller burst than an SSD — the extra latency is the margin those
239
- // machines need. The cost is ~1s of detection lag before HMR fires per
240
- // save; on a slow disk (where rebuilds are already slower) that's
241
- // proportionally minor, and stability beats shaving it. (default is 0.01.)
242
- fsevents_latency: 1.0,
243
- ignore_dirs: [...new Set(ignoreDirs)],
244
- };
245
- return `${JSON.stringify(config, null, 4)}\n`;
246
- }
247
- /**
248
- * Write (or merge into) the workspace-root coordination files in `dir`:
249
- * package.json, pnpm-workspace.yaml, and scripts/link-members.ts.
250
- *
251
- * The workspace is a pnpm workspace. Member discovery + pnpm settings live in
252
- * pnpm-workspace.yaml (always rewritten — bootstrap owns the member list).
253
- * package.json carries the pinned packageManager, the tsx devDep the postinstall
254
- * needs, and the postinstall script (link-members + generator). When a
255
- * package.json already exists (real workspace checkout), its other fields are
256
- * preserved and only the bootstrap-owned bits are enforced.
257
- *
258
- * A legacy npm `workspaces` array is also written as a monorepo-detection HINT
259
- * for external tooling (EAS/expo archiver keys off it, not pnpm-workspace.yaml).
260
- * pnpm ignores it when pnpm-workspace.yaml is present.
261
- */
262
- export function writeWorkspaceManifest(dir) {
263
- const pkgPath = join(dir, 'package.json');
264
- let existing = {};
265
- if (existsSync(pkgPath)) {
266
- try {
267
- existing = JSON.parse(readFileSync(pkgPath, 'utf-8'));
268
- }
269
- catch {
270
- // Unparseable existing file — start from defaults
271
- }
272
- }
273
- const existingScripts = typeof existing.scripts === 'object' && existing.scripts !== null
274
- ? existing.scripts
275
- : {};
276
- const existingDevDeps = typeof existing.devDependencies === 'object' && existing.devDependencies !== null
277
- ? existing.devDependencies
278
- : {};
279
- const pkg = {
280
- name: '@tinycld/workspace',
281
- version: '0.0.0',
282
- private: true,
283
- type: 'module',
284
- ...existing,
285
- packageManager: `pnpm@${PNPM_VERSION}`,
286
- // Monorepo-detection hint for external tooling (see doc comment); pnpm
287
- // itself reads members from pnpm-workspace.yaml and ignores this. Union
288
- // in any manifest-bearing member already on disk so the hint matches the
289
- // authoritative pnpm-workspace.yaml member list.
290
- workspaces: [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])],
291
- scripts: {
292
- ...existingScripts,
293
- // link-members runs FIRST so the @tinycld/<member> symlinks (notably
294
- // @tinycld/core) exist before the generator's package-build step
295
- // (text's webview-editor build.ts does a bare `import '@tinycld/core/...'`
296
- // resolved by package name, which fails on a CLEAN install if the
297
- // symlink isn't there yet). It then runs AGAIN after generate to add
298
- // the @tinycld/app-generated link (whose target, tinycld/lib/generated,
299
- // only exists once generate has run); link-members is idempotent and
300
- // skips app-generated when absent, so the first pass is harmless and
301
- // the second completes the graph. All app scripts run from tinycld/.
302
- postinstall: 'tsx scripts/link-members.ts && cd tinycld && pnpm run packages:generate && cd .. && tsx scripts/link-members.ts && cd tinycld && pnpm run assets:copy-pdfjs',
303
- },
304
- devDependencies: {
305
- ...existingDevDeps,
306
- tsx: '^4.21.0',
307
- },
308
- };
309
- writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 4)}\n`);
310
- // pnpm-workspace.yaml is the source of truth for members + settings — always
311
- // rewrite it (unlike package.json, no human-owned fields live here).
312
- writeFileSync(join(dir, 'pnpm-workspace.yaml'), pnpmWorkspaceYaml(dir));
313
- // package-versions.json holds the version pins transcribed into the YAML
314
- // `overrides:` block above. It's a standalone file (not just inline in the
315
- // YAML) because the Go OTA-rebuild generator reads it to emit the same block
316
- // on the server, where bootstrap never runs — so dev and OTA pin identically.
317
- // Always rewritten: the pins are bootstrap-owned, no human fields live here.
318
- const overridesJson = { '//': OVERRIDES_DOC, ...FRAMEWORK_OVERRIDES };
319
- writeFileSync(join(dir, 'package-versions.json'), `${JSON.stringify(overridesJson, null, 4)}\n`);
320
- // .watchmanconfig is derived from the member list, like pnpm-workspace.yaml —
321
- // always rewrite so it self-heals and can't drift to a stale ignore list (a
322
- // hand-maintained one kept missing the hoisted root node_modules, which is
323
- // what stalls Metro starts). No human-owned fields live here.
324
- writeFileSync(join(dir, '.watchmanconfig'), watchmanConfig(dir));
325
- // Minimal .npmrc: all pnpm settings live in pnpm-workspace.yaml (pnpm 10+
326
- // reads them there, not from .npmrc). Only written when absent (don't
327
- // clobber a real checkout's).
328
- const npmrcPath = join(dir, '.npmrc');
329
- if (!existsSync(npmrcPath)) {
330
- writeFileSync(npmrcPath, '# pnpm settings live in pnpm-workspace.yaml (pnpm 10+ reads them there).\n');
331
- }
332
- writeRootBiomeConfig(dir);
333
- }
334
- // Re-root a biome glob written against the canonical's dir (<root>/tinycld/) so
335
- // it means the same thing one level up at the workspace root. `**`-anchored globs
336
- // already match at any depth; only bare relative segments need the tinycld/ prefix.
337
- function rerootBiomeGlob(glob) {
338
- const negated = glob.startsWith('!');
339
- const body = negated ? glob.slice(1) : glob;
340
- if (body.startsWith('**') || body.startsWith('/'))
341
- return glob;
342
- const rerooted = `tinycld/${body}`;
343
- return negated ? `!${rerooted}` : rerooted;
344
- }
345
- function rerootBiomePluginPath(p) {
346
- if (p.startsWith('/'))
347
- return p;
348
- return `./tinycld/${p.replace(/^\.\//, '')}`;
349
- }
350
- /**
351
- * Write the workspace-root biome.json. Biome searches only UPWARD for config,
352
- * and the canonical biome.json lives at <root>/tinycld/ — a SIBLING of the
353
- * feature members, never an ancestor. Without a `root: true` config above the
354
- * members, running biome from inside a sibling (or via the editor/LSP) finds
355
- * nothing and falls back to biome's built-in defaults, flooding output with
356
- * bogus reformatting.
357
- *
358
- * This config must NOT use `extends: ['./tinycld/biome.json']`: Biome 2.5.0
359
- * silently DROPS the entire `plugins` array from any config reached through a
360
- * file-path `extends` (biome #8488, only partially fixed by #8524, which covers
361
- * `extends: "//"` but not a root extending a sibling file). Rules still load, so
362
- * the GritQL pbtsdb guards would just never run. So the root config must INLINE
363
- * the canonical's rules + plugins. The generator (tinycld/scripts/generate.ts,
364
- * run by every install's postinstall) is the authoritative writer and re-derives
365
- * this file from the canonical each install; this seed only has to be correct for
366
- * the window between `--assemble-only` and the first install.
367
- *
368
- * Bootstrap can only inline when the canonical is already on disk (a re-assemble
369
- * onto an existing workspace, or after the tinycld clone). On a fresh assemble the
370
- * tinycld repo isn't cloned yet, so we fall back to a minimal `root: true` seed
371
- * with no plugins — harmless because nothing is installed to lint yet, and the
372
- * first install's generator immediately replaces it with the full inlined config.
373
- *
374
- * `files.includes`/plugin paths are re-rooted (the canonical writes them relative
375
- * to tinycld/; inlining moves them up one dir). `vcs.root` points at tinycld/, not
376
- * the workspace root: the canonical relies on tinycld/.gitignore to exclude
377
- * generated/build artifacts, and every invocation under the workspace root
378
- * resolves THIS config as the root and inherits its vcs settings. A fresh
379
- * workspace root has no .gitignore (and isn't a git repo), so anchoring vcs there
380
- * would error "couldn't find an ignore file".
381
- */
382
- function writeRootBiomeConfig(root) {
383
- const canonicalPath = join(root, 'tinycld', 'biome.json');
384
- const config = existsSync(canonicalPath)
385
- ? (() => {
386
- const canonical = JSON.parse(readFileSync(canonicalPath, 'utf8'));
387
- const c = { ...canonical, root: true };
388
- delete c.extends;
389
- if (c.files?.includes) {
390
- c.files = { ...c.files, includes: c.files.includes.map(rerootBiomeGlob) };
391
- }
392
- if (Array.isArray(c.plugins)) {
393
- c.plugins = c.plugins.map((entry) => typeof entry === 'string'
394
- ? rerootBiomePluginPath(entry)
395
- : { ...entry, path: rerootBiomePluginPath(entry.path) });
396
- }
397
- return c;
398
- })()
399
- : { $schema: 'https://biomejs.dev/schemas/2.5.0/schema.json', root: true };
400
- config.vcs = { enabled: true, clientKind: 'git', useIgnoreFile: true, root: 'tinycld' };
401
- writeFileSync(join(root, 'biome.json'), `${JSON.stringify(config, null, 4)}\n`);
402
35
  }
403
36
  /**
404
37
  * Resolve the workspace-template dir relative to this module. Published builds
@@ -458,13 +91,17 @@ function realClone(url, dest, ref) {
458
91
  return r.status === 0;
459
92
  }
460
93
  /**
461
- * Assemble a workspace skeleton at opts.root: write the canonical root manifest
462
- * (writeWorkspaceManifest) + lay down the root scaffolding (copyWorkspaceTemplate:
463
- * tinycld.packages.ts, vitest.config.ts, tests/ stubs, version files), then clone
464
- * ONLY the tinycld member (merged app shell + core) + the explicitly-requested
465
- * feature members (skipping any already present — e.g. a CI-checked-out member,
466
- * where the merged repo is checked out into the tinycld/ slot). There is NO workspace
467
- * meta-repo clone: bootstrap is the source of all root scaffolding.
94
+ * Assemble a workspace skeleton at opts.root: clone ONLY the tinycld member
95
+ * (merged app shell + core) + the explicitly-requested feature members
96
+ * (skipping any already present — e.g. a CI-checked-out member, where the
97
+ * merged repo is checked out into the tinycld/ slot), then lay down the root
98
+ * scaffolding bootstrap still owns (copyWorkspaceTemplate: tinycld.packages.ts,
99
+ * vitest.config.ts, tests/ stubs, version files) and delegate everything
100
+ * content-bearing about the workspace root (package.json, pnpm-workspace.yaml,
101
+ * package-versions.json, .watchmanconfig, biome.json, .npmrc) to the
102
+ * root-writer script that ships INSIDE the cloned tinycld repo. There is NO
103
+ * workspace meta-repo clone: bootstrap only clones members, never writes
104
+ * vendor version pins or root-file formats itself.
468
105
  * Unknown member names throw. Returns the members that ended up present. Does
469
106
  * NOT run the install (the caller / CI controls that — e.g. `pnpm install` or a
470
107
  * frozen-lockfile install for reproducible builds).
@@ -478,14 +115,6 @@ export function assembleWorkspace(opts) {
478
115
  }
479
116
  const repoBase = opts.repoBase ?? 'git@github.com:tinycld';
480
117
  const clone = opts.clone ?? realClone;
481
- const present = [];
482
- // Write the canonical root manifest (workspaces list + postinstall), then
483
- // lay down the root scaffolding bootstrap owns (tinycld.packages.ts,
484
- // vitest.config.ts, tests/ stubs, .node-version, .go-version). Both are
485
- // non-destructive: anything already present (a real workspace checkout, or
486
- // a CI lane that supplied its own) is left as-is.
487
- writeWorkspaceManifest(opts.root);
488
- copyWorkspaceTemplate(opts.root);
489
118
  // Build the clone set keyed by member NAME so a member passed both bare and
490
119
  // with an @ref dedupes to one clone (the ref-bearing entry wins). The
491
120
  // `tinycld` repo (merged app shell + core, with core + package-scripts
@@ -498,6 +127,7 @@ export function assembleWorkspace(opts) {
498
127
  if (ref !== undefined || !refByName.has(name))
499
128
  refByName.set(name, ref);
500
129
  }
130
+ const present = [];
501
131
  for (const [name, ref] of refByName) {
502
132
  const dest = join(opts.root, name);
503
133
  if (existsSync(join(dest, '.git')) || existsSync(join(dest, 'package.json'))) {
@@ -507,6 +137,14 @@ export function assembleWorkspace(opts) {
507
137
  if (clone(`${repoBase}/${name}.git`, dest, ref))
508
138
  present.push(name);
509
139
  }
140
+ // Root scaffolding AFTER cloning: the static template files bootstrap
141
+ // still owns (never overwrites), then the cloned repo's own root-writer
142
+ // for everything content-bearing. Skip delegation when tinycld itself
143
+ // failed to clone — the caller (runAssembleOnly) raises the clearer
144
+ // "failed to clone required member" error.
145
+ copyWorkspaceTemplate(opts.root);
146
+ if (present.includes('tinycld'))
147
+ delegateWorkspaceRoot(opts.root);
510
148
  return present;
511
149
  }
512
150
  //# sourceMappingURL=assemble-workspace.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assemble-workspace.js","sourceRoot":"","sources":["../src/assemble-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC3G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,gFAAgF;AAChF,iFAAiF;AACjF,kFAAkF;AAClF,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,CAAU,CAAA;AAEhH,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,qEAAqE;AAErE,6EAA6E;AAC7E,6EAA6E;AAC7E,uEAAuE;AACvE,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,yBAAyB,EAAE,GAAG,YAAY,CAAU,CAAA;AAEpG,8EAA8E;AAC9E,gFAAgF;AAChF,wCAAwC;AACx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AAC,IAAI,CAAC,CAAA;IACvE,CAAC;IAED,sEAAsE;IACtE,wEAAwE;IACxE,sEAAsE;IACtE,oEAAoE;IACpE,2CAA2C;IAC3C,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAChC,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACjE,OAAO,OAAO,CAAA;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinycld/bootstrap",
3
- "version": "2.4.7",
3
+ "version": "3.0.0",
4
4
  "description": "Scaffolder for @tinycld feature packages",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,13 +24,5 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@tinycld/package-scripts": "*"
27
- },
28
- "peerDependencies": {
29
- "react": ">=19",
30
- "react-native": ">=0.83",
31
- "expo-router": ">=55.0.0",
32
- "pbtsdb": ">=0.6.3",
33
- "@tanstack/react-db": ">=0.1",
34
- "@tanstack/db": ">=0.6"
35
27
  }
36
28
  }
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react'
2
2
 
3
- // Optional context provider mounted by core inside /a/[orgSlug]/{{PKG_SLUG}}.
3
+ // Optional context provider mounted by core inside /a/{{PKG_SLUG}}.
4
4
  // Wrap any package-specific context providers or run mount-time side
5
5
  // effects (e.g. subscribing to events, prefetching queries) here.
6
6
  //
@@ -3,11 +3,11 @@ import { useLocalSearchParams } from 'expo-router'
3
3
  import { Text, View } from 'react-native'
4
4
 
5
5
  // Dynamic detail route. Wired automatically by core's generator to
6
- // /a/<orgSlug>/{{PKG_SLUG}}/<id>.
6
+ // /a/{{PKG_SLUG}}/<id>.
7
7
  //
8
- // To navigate back to the index or to another org-scoped screen, use
9
- // `useOrgHref()` from `@tinycld/core/lib/org-routes`. See
10
- // https://tinycld.org/docs/tasks/routing
8
+ // To navigate back to the index or to another app screen, use `useOrgHref()`
9
+ // from `@tinycld/core/lib/org-routes` rather than a literal path — it supplies
10
+ // the /a app-route prefix. See https://tinycld.org/docs/tasks/routing
11
11
 
12
12
  export default function {{PKG_PASCAL}}Detail() {
13
13
  const { id } = useLocalSearchParams<{ id: string }>()
@@ -1,13 +1,15 @@
1
1
  import { useThemeColor } from '@tinycld/core/lib/use-app-theme'
2
2
  import { ScrollView, Text, View } from 'react-native'
3
3
 
4
- // Org-scoped index route for {{PKG_NAME}}, served at /a/<orgSlug>/{{PKG_SLUG}}.
4
+ // Index route for {{PKG_NAME}}, served at /a/{{PKG_SLUG}}.
5
5
  // Replace this placeholder with your list view (cards, table, whatever you
6
6
  // need) and wire it to your pbtsdb collections using `useOrgLiveQuery`.
7
7
  //
8
8
  // For navigation, use `useOrgHref()` from `@tinycld/core/lib/org-routes` —
9
- // never literal paths like `router.push('/{{PKG_SLUG}}/new')`, which drop
10
- // the org segment. See https://tinycld.org/docs/tasks/routing
9
+ // never literal paths like `router.push('/{{PKG_SLUG}}/new')`, which miss the
10
+ // /a app-route prefix and resolve to +not-found. `/a` is a constant segment,
11
+ // not an org slug: single-org deployments give each org its own host, so
12
+ // nothing interpolates into it. See https://tinycld.org/docs/tasks/routing
11
13
  //
12
14
  // const orgHref = useOrgHref()
13
15
  // router.push(orgHref('{{PKG_SLUG}}/new'))
@@ -2,7 +2,7 @@ import { useThemeColor } from '@tinycld/core/lib/use-app-theme'
2
2
  import { Text, View } from 'react-native'
3
3
 
4
4
  // Sidebar for the {{PKG_NAME}} package. Rendered in the workspace drawer
5
- // when a user is on any /a/<orgSlug>/{{PKG_SLUG}}/... route.
5
+ // when a user is on any /a/{{PKG_SLUG}}/... route.
6
6
  //
7
7
  // Replace with real navigation (folders, favorites, filters, etc). See
8
8
  // @tinycld/calendar or @tinycld/mail sidebars for richer examples.
@@ -19,10 +19,5 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@tinycld/package-scripts": "*"
22
- },
23
- "peerDependencies": {
24
- "react": ">=19",
25
- "react-native": ">=0.83",
26
- "expo-router": ">=55.0.0"
27
22
  }
28
23
  }
@@ -2,7 +2,7 @@ import { useThemeColor } from '@tinycld/core/lib/use-app-theme'
2
2
  import { ScrollView, Text, View } from 'react-native'
3
3
 
4
4
  // The settings panel for {{PKG_NAME}}. Mounted by core inside
5
- // /a/<orgSlug>/settings/{{PKG_SLUG}}/{{PKG_SLUG}} via the manifest's
5
+ // /a/settings/{{PKG_SLUG}}/{{PKG_SLUG}} via the manifest's
6
6
  // `settings[]` entry. This is the only screen the package contributes.
7
7
 
8
8
  export default function {{PKG_PASCAL}}Settings() {