@tinycld/bootstrap 2.4.0 → 2.4.2
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 +11 -11
- package/dist/assemble-workspace.js +149 -0
- package/dist/assemble-workspace.js.map +1 -1
- package/dist/link-package.js +8 -10
- package/dist/link-package.js.map +1 -1
- package/package.json +1 -1
- package/templates/full/package.json +1 -1
- package/templates/shared/README.md +14 -2
- package/templates/workspace/scripts/link-members.ts +79 -8
- package/templates/workspace/tests/expo-image-stub.tsx +11 -0
- package/templates/workspace/tinycld.packages.ts +9 -4
- package/templates/workspace/vitest.config.ts +8 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`@tinycld/bootstrap` does two jobs:
|
|
4
4
|
|
|
5
5
|
- **`--new <slug>`** — scaffold a new feature package (manifest, CI workflow, sample screens, seed, migrations, optionally a Go server).
|
|
6
|
-
- **`--assemble-only`** — assemble a workspace root in the current directory by cloning the [`
|
|
6
|
+
- **`--assemble-only`** — assemble a workspace root in the current directory by cloning the [`tinycld`](https://github.com/tinycld/tinycld) shell repo (which carries `@tinycld/core` + `@tinycld/package-scripts` nested) and any features named with `--with <slug>`.
|
|
7
7
|
|
|
8
8
|
Modeled after [`create-vite`](https://github.com/vitejs/vite/tree/main/packages/create-vite): tiny CLI, templates embedded in the published npm package, no runtime network fetch.
|
|
9
9
|
|
|
@@ -20,16 +20,16 @@ The two modes are independent — scaffold mode does not require a pre-existing
|
|
|
20
20
|
mkdir ~/code/tinycld && cd ~/code/tinycld
|
|
21
21
|
npx @tinycld/bootstrap@latest --assemble-only --with mail --with contacts
|
|
22
22
|
pnpm install # links members + runs the generator (postinstall)
|
|
23
|
-
cd
|
|
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
|
|
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.
|
|
27
27
|
|
|
28
28
|
`--with name@ref` pins a clone to a tag, branch, or commit:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
npx @tinycld/bootstrap@latest --assemble-only \
|
|
32
|
-
--with
|
|
32
|
+
--with tinycld@v1.2.0 --with mail@v0.3.1
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Skipped if the target directory already exists, so re-running is safe.
|
|
@@ -49,7 +49,7 @@ npx @tinycld/bootstrap --new my-feature
|
|
|
49
49
|
|
|
50
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.
|
|
51
51
|
|
|
52
|
-
If `--new` runs from inside an existing workspace root (`
|
|
52
|
+
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
53
|
|
|
54
54
|
### Prompts
|
|
55
55
|
|
|
@@ -64,7 +64,7 @@ If `--new` runs from inside an existing workspace root (`app/` and `core/` sibli
|
|
|
64
64
|
| **Keyboard shortcut** (full only) | `f` | Single lowercase letter, or blank. |
|
|
65
65
|
| **Include a Go server?** (full only) | `y` / `n` | If no, `server/` and the manifest's `server` field are omitted. |
|
|
66
66
|
| **Target directory** | `./my-feature` | Default creates the new repo as a child of the current directory. Must not exist or must be empty. |
|
|
67
|
-
| **Link into the workspace?** | `y` / `n` | After scaffolding, the CLI adds the package to `pnpm-workspace.yaml`'s `packages:` list (and the `package.json` `workspaces` hint) and runs `pnpm install` at the workspace root. If cwd isn't a workspace root, it assembles one (cloning `
|
|
67
|
+
| **Link into the workspace?** | `y` / `n` | After scaffolding, the CLI adds the package to `pnpm-workspace.yaml`'s `packages:` list (and the `package.json` `workspaces` hint) and runs `pnpm install` at the workspace root. If cwd isn't a workspace root, it assembles one (cloning the `tinycld` repo) first. Suppress with `--no-link`. |
|
|
68
68
|
|
|
69
69
|
### Flags (non-interactive use)
|
|
70
70
|
|
|
@@ -120,7 +120,7 @@ my-feature/
|
|
|
120
120
|
├── pb-migrations/
|
|
121
121
|
│ └── 1800000000_create_my-feature.js # creates my_feature_items collection
|
|
122
122
|
├── server/
|
|
123
|
-
│ ├── go.mod # module tinycld.org/packages/my-feature;
|
|
123
|
+
│ ├── go.mod # module tinycld.org/packages/my-feature; requires tinycld.org/core (no replace — resolved via the workspace go.work)
|
|
124
124
|
│ └── register.go # func Register(app) hook for server-side wiring
|
|
125
125
|
├── tests/
|
|
126
126
|
│ └── manifest.test.ts # vitest smoke test of manifest shape
|
|
@@ -206,9 +206,9 @@ cd my-feature
|
|
|
206
206
|
pnpm exec tinycld-pkg check
|
|
207
207
|
```
|
|
208
208
|
|
|
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 `
|
|
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.
|
|
210
210
|
|
|
211
|
-
> ⚠️ **`
|
|
211
|
+
> ⚠️ **`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
212
|
|
|
213
213
|
### Day-to-day development
|
|
214
214
|
|
|
@@ -224,7 +224,7 @@ pnpm exec tinycld-pkg test:e2e # playwright for this member
|
|
|
224
224
|
To run the app itself, drop into the app shell:
|
|
225
225
|
|
|
226
226
|
```sh
|
|
227
|
-
cd ../
|
|
227
|
+
cd ../tinycld
|
|
228
228
|
pnpm run dev # expo + pocketbase, fronted by a single-port dev proxy
|
|
229
229
|
pnpm run checks # biome + tsc, ecosystem-wide
|
|
230
230
|
```
|
|
@@ -240,7 +240,7 @@ The package's `.github/workflows/ci.yml` mirrors what GitHub Actions runs:
|
|
|
240
240
|
3. `pnpm exec tinycld-pkg check` from inside the package directory — runs biome (scoped), tsc, and vitest.
|
|
241
241
|
4. `pnpm exec tinycld-pkg test:e2e` if the package ships Playwright specs under `tests/`.
|
|
242
242
|
|
|
243
|
-
Biome lives
|
|
243
|
+
The canonical Biome config lives in `tinycld/biome.json` (one rule set across every member). A minimal `root: true` config at the workspace root (written by bootstrap on assemble and by the generator on every install) extends it, so biome is resolvable from inside any member — `biome check .`, single-file checks, and the editor's biome LSP all pick up the right rules. A scaffolded package ships no `biome.json` and inherits these rules; it adds one (`{ "root": false, "extends": ["../tinycld/biome.json"], … }`) only to override a rule for that package. Typecheck runs against the app shell's tsconfig via `tinycld-pkg`, so the `expo` base, `uniwind` global augments, and the live `pbSchema` types are all in scope.
|
|
244
244
|
|
|
245
245
|
## Import conventions the templates assume
|
|
246
246
|
|
|
@@ -74,6 +74,16 @@ function pnpmWorkspaceYaml(dir) {
|
|
|
74
74
|
'strictPeerDependencies: false',
|
|
75
75
|
'enablePrePostScripts: true',
|
|
76
76
|
'',
|
|
77
|
+
'# pnpm 11 ships a default minimumReleaseAge supply-chain gate (~24h) that',
|
|
78
|
+
'# rejects very freshly-published versions. The @tinycld/* libraries are',
|
|
79
|
+
'# first-party and released in lockstep with these members, so a same-day',
|
|
80
|
+
'# pbtsdb (or other @tinycld dep) bump must install immediately rather than',
|
|
81
|
+
'# blocking install/CI for a day. Exclude them from the gate; third-party',
|
|
82
|
+
'# packages still get the freshness window.',
|
|
83
|
+
'minimumReleaseAgeExclude:',
|
|
84
|
+
' - pbtsdb',
|
|
85
|
+
" - '@tinycld/*'",
|
|
86
|
+
'',
|
|
77
87
|
'packages:',
|
|
78
88
|
members,
|
|
79
89
|
'',
|
|
@@ -84,6 +94,70 @@ function pnpmWorkspaceYaml(dir) {
|
|
|
84
94
|
'',
|
|
85
95
|
].join('\n');
|
|
86
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* .watchmanconfig contents: the directories watchman must NOT crawl or subscribe
|
|
99
|
+
* to. The motivating failure is native build artifacts — tinycld/ios (Pods) and
|
|
100
|
+
* tinycld/android (.gradle, .cxx, build/) are multi-GB and churn on every native
|
|
101
|
+
* build, overflowing the fsevents kernel queue ("MustScanSubDirs UserDropped")
|
|
102
|
+
* and forcing slow recrawls that stall Metro starts.
|
|
103
|
+
*
|
|
104
|
+
* CRITICAL: the root node_modules is NOT ignored. Under node-linker=hoisted it's
|
|
105
|
+
* the flat store Metro resolves EVERY dependency from (incl. expo-router/entry,
|
|
106
|
+
* the app entry point); hiding it from watchman makes Metro's file map miss those
|
|
107
|
+
* files → "Unable to resolve module ./node_modules/...". Only node_modules/.cache
|
|
108
|
+
* (Metro's transform cache, never a resolvable path) is excluded. Each MEMBER's
|
|
109
|
+
* own node_modules IS ignored — under hoisting those are near-empty (deps resolve
|
|
110
|
+
* up to the root store), so Metro never reads them and they're pure crawl cost.
|
|
111
|
+
*
|
|
112
|
+
* Ignore_dirs matches path prefixes relative to the watch root, so the bare
|
|
113
|
+
* ".git" covers only the root-level one and every member's .git is listed
|
|
114
|
+
* explicitly. Listing an ignore_dir that doesn't exist is harmless — watchman
|
|
115
|
+
* skips absent paths.
|
|
116
|
+
*
|
|
117
|
+
* NON_MEMBER_DIRS are sibling dirs that aren't workspace members (so they're
|
|
118
|
+
* absent from the member union above) but routinely exist in a dev checkout and
|
|
119
|
+
* carry their own node_modules/.git: bootstrap (cloned for development), and the
|
|
120
|
+
* utils/web ecosystem tooling. Their node_modules/.git/dist are excluded too —
|
|
121
|
+
* none are part of the Metro app graph.
|
|
122
|
+
*/
|
|
123
|
+
const NON_MEMBER_DIRS = ['bootstrap', 'utils', 'web'];
|
|
124
|
+
function watchmanConfig(dir) {
|
|
125
|
+
const members = [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])];
|
|
126
|
+
const memberDirs = members.flatMap((m) => [`${m}/node_modules`, `${m}/.git`]);
|
|
127
|
+
const testResultDirs = members.filter((m) => !m.startsWith('tinycld')).map((m) => `${m}/test-results`);
|
|
128
|
+
const nonMemberDirs = NON_MEMBER_DIRS.flatMap((d) => [`${d}/node_modules`, `${d}/.git`, `${d}/dist`]);
|
|
129
|
+
const ignoreDirs = [
|
|
130
|
+
// Root-level .git only. The root node_modules is deliberately NOT ignored:
|
|
131
|
+
// under node-linker=hoisted it's the flat store Metro resolves every dep
|
|
132
|
+
// from (incl. expo-router/entry), so hiding it breaks module resolution.
|
|
133
|
+
'.git',
|
|
134
|
+
// Metro's own transform cache under the root store — churns every build,
|
|
135
|
+
// never a resolvable module path.
|
|
136
|
+
'node_modules/.cache',
|
|
137
|
+
...memberDirs,
|
|
138
|
+
...nonMemberDirs,
|
|
139
|
+
// App-shell native + generated output that churns on builds. ios/android
|
|
140
|
+
// are multi-GB and the original motivation for this file.
|
|
141
|
+
'tinycld/ios',
|
|
142
|
+
'tinycld/android',
|
|
143
|
+
'tinycld/modules/app-updater/android/build',
|
|
144
|
+
'tinycld/modules/app-updater/ios/build',
|
|
145
|
+
'tinycld/.expo',
|
|
146
|
+
'tinycld/dist',
|
|
147
|
+
'tinycld/server/pb_data',
|
|
148
|
+
'tinycld/server/pb_test_data',
|
|
149
|
+
'tinycld/test-results',
|
|
150
|
+
'tinycld/playwright-report',
|
|
151
|
+
...testResultDirs,
|
|
152
|
+
];
|
|
153
|
+
const config = {
|
|
154
|
+
enable_parallel_crawl: true,
|
|
155
|
+
fsevents_try_resync: true,
|
|
156
|
+
fsevents_latency: 0.05,
|
|
157
|
+
ignore_dirs: [...new Set(ignoreDirs)],
|
|
158
|
+
};
|
|
159
|
+
return `${JSON.stringify(config, null, 4)}\n`;
|
|
160
|
+
}
|
|
87
161
|
/**
|
|
88
162
|
* Write (or merge into) the workspace-root coordination files in `dir`:
|
|
89
163
|
* package.json, pnpm-workspace.yaml, and scripts/link-members.ts.
|
|
@@ -150,6 +224,11 @@ export function writeWorkspaceManifest(dir) {
|
|
|
150
224
|
// pnpm-workspace.yaml is the source of truth for members + settings — always
|
|
151
225
|
// rewrite it (unlike package.json, no human-owned fields live here).
|
|
152
226
|
writeFileSync(join(dir, 'pnpm-workspace.yaml'), pnpmWorkspaceYaml(dir));
|
|
227
|
+
// .watchmanconfig is derived from the member list, like pnpm-workspace.yaml —
|
|
228
|
+
// always rewrite so it self-heals and can't drift to a stale ignore list (a
|
|
229
|
+
// hand-maintained one kept missing the hoisted root node_modules, which is
|
|
230
|
+
// what stalls Metro starts). No human-owned fields live here.
|
|
231
|
+
writeFileSync(join(dir, '.watchmanconfig'), watchmanConfig(dir));
|
|
153
232
|
// Minimal .npmrc: all pnpm settings live in pnpm-workspace.yaml (pnpm 10+
|
|
154
233
|
// reads them there, not from .npmrc). Only written when absent (don't
|
|
155
234
|
// clobber a real checkout's).
|
|
@@ -157,6 +236,76 @@ export function writeWorkspaceManifest(dir) {
|
|
|
157
236
|
if (!existsSync(npmrcPath)) {
|
|
158
237
|
writeFileSync(npmrcPath, '# pnpm settings live in pnpm-workspace.yaml (pnpm 10+ reads them there).\n');
|
|
159
238
|
}
|
|
239
|
+
writeRootBiomeConfig(dir);
|
|
240
|
+
}
|
|
241
|
+
// Re-root a biome glob written against the canonical's dir (<root>/tinycld/) so
|
|
242
|
+
// it means the same thing one level up at the workspace root. `**`-anchored globs
|
|
243
|
+
// already match at any depth; only bare relative segments need the tinycld/ prefix.
|
|
244
|
+
function rerootBiomeGlob(glob) {
|
|
245
|
+
const negated = glob.startsWith('!');
|
|
246
|
+
const body = negated ? glob.slice(1) : glob;
|
|
247
|
+
if (body.startsWith('**') || body.startsWith('/'))
|
|
248
|
+
return glob;
|
|
249
|
+
const rerooted = `tinycld/${body}`;
|
|
250
|
+
return negated ? `!${rerooted}` : rerooted;
|
|
251
|
+
}
|
|
252
|
+
function rerootBiomePluginPath(p) {
|
|
253
|
+
if (p.startsWith('/'))
|
|
254
|
+
return p;
|
|
255
|
+
return `./tinycld/${p.replace(/^\.\//, '')}`;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Write the workspace-root biome.json. Biome searches only UPWARD for config,
|
|
259
|
+
* and the canonical biome.json lives at <root>/tinycld/ — a SIBLING of the
|
|
260
|
+
* feature members, never an ancestor. Without a `root: true` config above the
|
|
261
|
+
* members, running biome from inside a sibling (or via the editor/LSP) finds
|
|
262
|
+
* nothing and falls back to biome's built-in defaults, flooding output with
|
|
263
|
+
* bogus reformatting.
|
|
264
|
+
*
|
|
265
|
+
* This config must NOT use `extends: ['./tinycld/biome.json']`: Biome 2.5.0
|
|
266
|
+
* silently DROPS the entire `plugins` array from any config reached through a
|
|
267
|
+
* file-path `extends` (biome #8488, only partially fixed by #8524, which covers
|
|
268
|
+
* `extends: "//"` but not a root extending a sibling file). Rules still load, so
|
|
269
|
+
* the GritQL pbtsdb guards would just never run. So the root config must INLINE
|
|
270
|
+
* the canonical's rules + plugins. The generator (tinycld/scripts/generate.ts,
|
|
271
|
+
* run by every install's postinstall) is the authoritative writer and re-derives
|
|
272
|
+
* this file from the canonical each install; this seed only has to be correct for
|
|
273
|
+
* the window between `--assemble-only` and the first install.
|
|
274
|
+
*
|
|
275
|
+
* Bootstrap can only inline when the canonical is already on disk (a re-assemble
|
|
276
|
+
* onto an existing workspace, or after the tinycld clone). On a fresh assemble the
|
|
277
|
+
* tinycld repo isn't cloned yet, so we fall back to a minimal `root: true` seed
|
|
278
|
+
* with no plugins — harmless because nothing is installed to lint yet, and the
|
|
279
|
+
* first install's generator immediately replaces it with the full inlined config.
|
|
280
|
+
*
|
|
281
|
+
* `files.includes`/plugin paths are re-rooted (the canonical writes them relative
|
|
282
|
+
* to tinycld/; inlining moves them up one dir). `vcs.root` points at tinycld/, not
|
|
283
|
+
* the workspace root: the canonical relies on tinycld/.gitignore to exclude
|
|
284
|
+
* generated/build artifacts, and every invocation under the workspace root
|
|
285
|
+
* resolves THIS config as the root and inherits its vcs settings. A fresh
|
|
286
|
+
* workspace root has no .gitignore (and isn't a git repo), so anchoring vcs there
|
|
287
|
+
* would error "couldn't find an ignore file".
|
|
288
|
+
*/
|
|
289
|
+
function writeRootBiomeConfig(root) {
|
|
290
|
+
const canonicalPath = join(root, 'tinycld', 'biome.json');
|
|
291
|
+
const config = existsSync(canonicalPath)
|
|
292
|
+
? (() => {
|
|
293
|
+
const canonical = JSON.parse(readFileSync(canonicalPath, 'utf8'));
|
|
294
|
+
const c = { ...canonical, root: true };
|
|
295
|
+
delete c.extends;
|
|
296
|
+
if (c.files?.includes) {
|
|
297
|
+
c.files = { ...c.files, includes: c.files.includes.map(rerootBiomeGlob) };
|
|
298
|
+
}
|
|
299
|
+
if (Array.isArray(c.plugins)) {
|
|
300
|
+
c.plugins = c.plugins.map((entry) => typeof entry === 'string'
|
|
301
|
+
? rerootBiomePluginPath(entry)
|
|
302
|
+
: { ...entry, path: rerootBiomePluginPath(entry.path) });
|
|
303
|
+
}
|
|
304
|
+
return c;
|
|
305
|
+
})()
|
|
306
|
+
: { $schema: 'https://biomejs.dev/schemas/2.5.0/schema.json', root: true };
|
|
307
|
+
config.vcs = { enabled: true, clientKind: 'git', useIgnoreFile: true, root: 'tinycld' };
|
|
308
|
+
writeFileSync(join(root, 'biome.json'), `${JSON.stringify(config, null, 4)}\n`);
|
|
160
309
|
}
|
|
161
310
|
/**
|
|
162
311
|
* Resolve the workspace-template dir relative to this module. Published builds
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{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CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAC3E,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAClB,SAAQ;QACZ,CAAC;QACD,IAAI,KAAK,CAAC,GAAG,QAAQ,IAAI,IAAI,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACvE,CAAC;IACD,OAAO,OAAO,CAAA;AAClB,CAAC"}
|
package/dist/link-package.js
CHANGED
|
@@ -61,10 +61,10 @@ export function ensureMember(workspaceDir, slug) {
|
|
|
61
61
|
* member and install. The existing root package.json is left untouched.
|
|
62
62
|
* - bootstrap: `workspaceDir` is a fresh wrapper that only contains the
|
|
63
63
|
* scaffolded `<slug>/` so far. Assemble the workspace *around* it —
|
|
64
|
-
* `assembleWorkspace` generates the root scaffolding and clones
|
|
65
|
-
* (no workspace meta-repo) — then ensure the new member and
|
|
66
|
-
* `postinstall` (`cd
|
|
67
|
-
* why we assemble before installing.
|
|
64
|
+
* `assembleWorkspace` generates the root scaffolding and clones the
|
|
65
|
+
* `tinycld` repo (no workspace meta-repo) — then ensure the new member and
|
|
66
|
+
* install. The `postinstall` (`cd tinycld && …`) only succeeds once
|
|
67
|
+
* `tinycld/` exists, which is why we assemble before installing.
|
|
68
68
|
*
|
|
69
69
|
* Returns true if the user chose to link (even if a subprocess failed — the
|
|
70
70
|
* error is already logged, and we don't want to follow up with manual steps
|
|
@@ -74,13 +74,11 @@ export function ensureMember(workspaceDir, slug) {
|
|
|
74
74
|
export async function offerLinkPackage({ slug, workspaceDir, mode, members, assemble = realAssemble, install = realInstall, }) {
|
|
75
75
|
if (mode === 'skip')
|
|
76
76
|
return false;
|
|
77
|
-
// A wrapper that isn't yet a workspace root needs
|
|
77
|
+
// A wrapper that isn't yet a workspace root needs the tinycld repo assembled in.
|
|
78
78
|
const needsClone = !looksLikeWorkspaceRoot(workspaceDir);
|
|
79
79
|
// Describe what we're about to clone in the prompt + spinner so the user
|
|
80
80
|
// (and the test runner) sees that --with members were honored.
|
|
81
|
-
const assemblyLabel = members && members.length > 0
|
|
82
|
-
? `app + core + ${members.map((m) => m.replace(/@.*$/, '')).join(' + ')}`
|
|
83
|
-
: 'app + core';
|
|
81
|
+
const assemblyLabel = members && members.length > 0 ? `tinycld + ${members.map((m) => m.replace(/@.*$/, '')).join(' + ')}` : 'tinycld';
|
|
84
82
|
if (mode === 'prompt') {
|
|
85
83
|
const message = needsClone
|
|
86
84
|
? `Assemble the tinycld workspace (${assemblyLabel}) and link ${pc.bold(slug)} now?`
|
|
@@ -115,8 +113,8 @@ export async function offerLinkPackage({ slug, workspaceDir, mode, members, asse
|
|
|
115
113
|
}
|
|
116
114
|
/**
|
|
117
115
|
* Assemble the workspace skeleton at `dir`: write the workspace manifest and
|
|
118
|
-
* clone
|
|
119
|
-
* for keyless/HTTPS envs.
|
|
116
|
+
* clone the `tinycld` repo (+ any `members` from --with), honoring
|
|
117
|
+
* `TINYCLD_REPO_BASE` for keyless/HTTPS envs.
|
|
120
118
|
* `assembleWorkspace` is synchronous and throws on failure (unknown member,
|
|
121
119
|
* clone error, etc.); `offerLinkPackage` wraps the call so the error surfaces
|
|
122
120
|
* in the spinner.
|
package/dist/link-package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-package.js","sourceRoot":"","sources":["../src/link-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,EAAE,MA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,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAA;IAClF,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,8BAA8B,CAAC,CAAA;QAC7D,OAAO,KAAK,CAAA;IAChB,CAAC;IACD,OAAO,IAAI,CAAA;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -44,8 +44,20 @@ pnpm exec tinycld-pkg test # vitest unit tests
|
|
|
44
44
|
pnpm exec tinycld-pkg test:e2e # playwright e2e specs (full preset only — packages with screens)
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
This repo ships no `biome.json` — it inherits the ecosystem-wide rules through
|
|
48
|
+
the workspace-root config (which extends the app shell's canonical `biome.json`),
|
|
49
|
+
so `biome check .` from inside this member, single-file checks, and the editor's
|
|
50
|
+
biome LSP all resolve the right rules. Add a `biome.json` here only if this
|
|
51
|
+
package genuinely needs to override a rule:
|
|
52
|
+
|
|
53
|
+
```jsonc
|
|
54
|
+
{
|
|
55
|
+
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
|
|
56
|
+
"root": false,
|
|
57
|
+
"extends": ["../tinycld/biome.json"],
|
|
58
|
+
"linter": { "rules": { /* your overrides */ } }
|
|
59
|
+
}
|
|
60
|
+
```
|
|
49
61
|
|
|
50
62
|
## CI
|
|
51
63
|
|
|
@@ -27,6 +27,15 @@ import { getPackages } from '../tinycld.packages'
|
|
|
27
27
|
|
|
28
28
|
const WS_ROOT = path.resolve(import.meta.dirname, '..')
|
|
29
29
|
|
|
30
|
+
// Absolute path to the app shell dir, which holds the nested core/,
|
|
31
|
+
// package-scripts/, and the generated output. Normally <WS_ROOT>/tinycld, but
|
|
32
|
+
// EAS cloud builds clone the shell into a dir named 'build', so the EAS install
|
|
33
|
+
// script exports TINYCLD_APP_DIR. Resolved as an absolute path to match the
|
|
34
|
+
// generator's scripts/paths.ts contract for the same env var.
|
|
35
|
+
const APP_DIR = process.env.TINYCLD_APP_DIR
|
|
36
|
+
? path.resolve(process.env.TINYCLD_APP_DIR)
|
|
37
|
+
: path.join(WS_ROOT, 'tinycld')
|
|
38
|
+
|
|
30
39
|
// Map a member's package name to its on-disk sibling dir by scanning the
|
|
31
40
|
// workspace root (the dir name need not equal the package name — e.g.
|
|
32
41
|
// @tinycld/google-takeout-import lives in google-takeout-import/).
|
|
@@ -45,11 +54,11 @@ function memberDirsByName(): Map<string, string> {
|
|
|
45
54
|
// not a dir, or no/unreadable package.json — skip
|
|
46
55
|
}
|
|
47
56
|
}
|
|
48
|
-
// @tinycld/core lives nested in the
|
|
57
|
+
// @tinycld/core lives nested in the app shell (<WS_ROOT>/<APP_DIR>/core/);
|
|
49
58
|
// the top-level scan won't find it. Register it explicitly so the
|
|
50
59
|
// node_modules/@tinycld/core symlink is still created.
|
|
51
60
|
if (!index.has('@tinycld/core')) {
|
|
52
|
-
const nestedCore = path.join(
|
|
61
|
+
const nestedCore = path.join(APP_DIR, 'core')
|
|
53
62
|
try {
|
|
54
63
|
const name = JSON.parse(
|
|
55
64
|
fs.readFileSync(path.join(nestedCore, 'package.json'), 'utf8')
|
|
@@ -83,13 +92,73 @@ function linkInto(nodeModulesDir: string, scopeName: string, targetDir: string):
|
|
|
83
92
|
fs.symlinkSync(relTarget, linkPath)
|
|
84
93
|
}
|
|
85
94
|
|
|
95
|
+
const GITIGNORE_BEGIN = '# >>> tinycld members (auto-managed by link-members.ts) >>>'
|
|
96
|
+
const GITIGNORE_END = '# <<< tinycld members <<<'
|
|
97
|
+
|
|
98
|
+
// Keep the workspace-root .gitignore's member list in sync with the
|
|
99
|
+
// independent repos present on disk. Every top-level dir that is its own git
|
|
100
|
+
// repo or carries a package.json (members like mail/drive, plus sibling repos
|
|
101
|
+
// like bootstrap/utils/web) must never be tracked by the workspace repo — each
|
|
102
|
+
// has its own history + remote, and the workspace repo commits only
|
|
103
|
+
// coordination files. Nested members (e.g. tinycld/core) are already covered by
|
|
104
|
+
// ignoring /tinycld/. The block is delimited so we rewrite only between the
|
|
105
|
+
// markers and never clobber hand-written rules (.env, node_modules, scratch).
|
|
106
|
+
function discoverSiblingRepos(): string[] {
|
|
107
|
+
const names = new Set<string>()
|
|
108
|
+
for (const entry of fs.readdirSync(WS_ROOT)) {
|
|
109
|
+
if (entry === 'node_modules') continue
|
|
110
|
+
const dir = path.join(WS_ROOT, entry)
|
|
111
|
+
try {
|
|
112
|
+
if (!fs.statSync(dir).isDirectory()) continue
|
|
113
|
+
} catch {
|
|
114
|
+
continue
|
|
115
|
+
}
|
|
116
|
+
const isRepo = fs.existsSync(path.join(dir, '.git'))
|
|
117
|
+
const hasPkg = fs.existsSync(path.join(dir, 'package.json'))
|
|
118
|
+
if (isRepo || hasPkg) names.add(`/${entry}/`)
|
|
119
|
+
}
|
|
120
|
+
return [...names].sort()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function syncGitignore(): void {
|
|
124
|
+
const topLevel = discoverSiblingRepos()
|
|
125
|
+
if (topLevel.length === 0) return
|
|
126
|
+
|
|
127
|
+
const block = [GITIGNORE_BEGIN, ...topLevel, GITIGNORE_END].join('\n')
|
|
128
|
+
const gitignorePath = path.join(WS_ROOT, '.gitignore')
|
|
129
|
+
let existing = ''
|
|
130
|
+
try {
|
|
131
|
+
existing = fs.readFileSync(gitignorePath, 'utf8')
|
|
132
|
+
} catch {
|
|
133
|
+
// no .gitignore yet — we'll create one
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const beginIdx = existing.indexOf(GITIGNORE_BEGIN)
|
|
137
|
+
const endIdx = existing.indexOf(GITIGNORE_END)
|
|
138
|
+
let next: string
|
|
139
|
+
if (beginIdx !== -1 && endIdx !== -1 && endIdx > beginIdx) {
|
|
140
|
+
// Replace the existing managed block in place.
|
|
141
|
+
const before = existing.slice(0, beginIdx)
|
|
142
|
+
const after = existing.slice(endIdx + GITIGNORE_END.length)
|
|
143
|
+
next = `${before}${block}${after}`
|
|
144
|
+
} else {
|
|
145
|
+
// Append a fresh block, separated by a blank line if there's prior content.
|
|
146
|
+
const sep = existing.length > 0 && !existing.endsWith('\n\n') ? '\n\n' : ''
|
|
147
|
+
const prefix = existing.length > 0 && !existing.endsWith('\n') ? '\n' : ''
|
|
148
|
+
next = `${existing}${prefix}${sep}${block}\n`
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (next !== existing) {
|
|
152
|
+
fs.writeFileSync(gitignorePath, next)
|
|
153
|
+
console.log(`[link-members] synced ${topLevel.length} member(s) into .gitignore`)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
86
157
|
function main(): void {
|
|
87
158
|
const names = getPackages() // ['@tinycld/core', '@tinycld/calc', ...]
|
|
88
159
|
const dirs = memberDirsByName()
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
path.join(WS_ROOT, 'tinycld', 'node_modules'),
|
|
92
|
-
]
|
|
160
|
+
syncGitignore()
|
|
161
|
+
const targets = [path.join(WS_ROOT, 'node_modules'), path.join(APP_DIR, 'node_modules')]
|
|
93
162
|
|
|
94
163
|
let linked = 0
|
|
95
164
|
for (const name of names) {
|
|
@@ -112,13 +181,15 @@ function main(): void {
|
|
|
112
181
|
// `@tinycld/app-generated/*` imports resolve by name from any consumer that
|
|
113
182
|
// pulls core in via its exports map. Skip if the generated dir doesn't exist
|
|
114
183
|
// yet (generator runs in the same postinstall, but ordering/partial runs vary).
|
|
115
|
-
const appGeneratedDir = path.join(
|
|
184
|
+
const appGeneratedDir = path.join(APP_DIR, 'lib', 'generated')
|
|
116
185
|
if (fs.existsSync(appGeneratedDir)) {
|
|
117
186
|
for (const nm of targets) {
|
|
118
187
|
if (fs.existsSync(nm)) linkInto(nm, 'app-generated', appGeneratedDir)
|
|
119
188
|
}
|
|
120
189
|
} else {
|
|
121
|
-
console.warn(
|
|
190
|
+
console.warn(
|
|
191
|
+
'[link-members] tinycld/lib/generated not present — skipping @tinycld/app-generated link'
|
|
192
|
+
)
|
|
122
193
|
}
|
|
123
194
|
|
|
124
195
|
console.log(`[link-members] linked ${linked} workspace member(s) into node_modules/@tinycld/`)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Test-only stub for expo-image. The real package transitively imports
|
|
2
|
+
// expo-modules-core, whose module-load-time side effects (e.g. reading
|
|
3
|
+
// the `__DEV__` global) don't survive a bare Node test environment.
|
|
4
|
+
// Tests that pull a component importing <Image> only need a harmless
|
|
5
|
+
// placeholder — they assert on logic, not on rendered pixels.
|
|
6
|
+
|
|
7
|
+
import type { ReactElement } from 'react'
|
|
8
|
+
|
|
9
|
+
export function Image(_props: unknown): ReactElement | null {
|
|
10
|
+
return null
|
|
11
|
+
}
|
|
@@ -49,11 +49,16 @@ export function getPackages(): string[] {
|
|
|
49
49
|
if (hasManifest(dir)) features.push(name)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
// @tinycld/core moved INSIDE the
|
|
53
|
-
//
|
|
54
|
-
// still listed first.
|
|
52
|
+
// @tinycld/core moved INSIDE the app shell (at <appDir>/core/); the
|
|
53
|
+
// top-level scan above won't see it. Look for it explicitly so it is
|
|
54
|
+
// still listed first. The app dir is normally <wsRoot>/tinycld, but EAS
|
|
55
|
+
// cloud builds clone the shell into a dir named 'build' and export
|
|
56
|
+
// TINYCLD_APP_DIR (absolute path) — honor it to match scripts/paths.ts.
|
|
55
57
|
if (!core) {
|
|
56
|
-
const
|
|
58
|
+
const appDir = process.env.TINYCLD_APP_DIR
|
|
59
|
+
? path.resolve(process.env.TINYCLD_APP_DIR)
|
|
60
|
+
: path.join(wsRoot, 'tinycld')
|
|
61
|
+
const nestedCorePkg = path.join(appDir, 'core', 'package.json')
|
|
57
62
|
try {
|
|
58
63
|
const name = JSON.parse(fs.readFileSync(nestedCorePkg, 'utf8')).name
|
|
59
64
|
if (name === CORE_NAME) core = name
|
|
@@ -75,6 +75,14 @@ export default defineConfig({
|
|
|
75
75
|
find: /^expo-clipboard$/,
|
|
76
76
|
replacement: path.join(ROOT, 'tests/expo-clipboard-stub.ts'),
|
|
77
77
|
},
|
|
78
|
+
// expo-image pulls in expo-modules-core the same way (its Platform
|
|
79
|
+
// module reads the global __DEV__ at load). Any unit test that
|
|
80
|
+
// imports a component rendering a Thumbnail / <Image> would
|
|
81
|
+
// otherwise crash at collect time.
|
|
82
|
+
{
|
|
83
|
+
find: /^expo-image$/,
|
|
84
|
+
replacement: path.join(ROOT, 'tests/expo-image-stub.tsx'),
|
|
85
|
+
},
|
|
78
86
|
// expo-router's CJS entry does `require("./global")` at module top,
|
|
79
87
|
// which Node can't resolve when reached through a member symlink.
|
|
80
88
|
{
|