@tinycld/bootstrap 2.3.2 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/assemble-workspace.js +117 -19
- package/dist/assemble-workspace.js.map +1 -1
- package/dist/index.js +16 -22
- package/dist/index.js.map +1 -1
- package/dist/link-package.js +8 -10
- package/dist/link-package.js.map +1 -1
- package/package.json +48 -45
- package/templates/full/package.json +1 -1
- package/templates/shared/README.md +14 -2
- package/templates/shared/tsconfig.json +3 -5
- package/templates/workspace/scripts/link-members.ts +34 -4
- package/templates/workspace/tinycld.packages.ts +13 -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
|
|
|
@@ -116,11 +116,11 @@ my-feature/
|
|
|
116
116
|
├── README.md # developer-facing onboarding for this package
|
|
117
117
|
├── manifest.ts # name, slug, routes, nav, collections, seed, server, ...
|
|
118
118
|
├── package.json # @tinycld/my-feature, peer deps, scripts, exports map
|
|
119
|
-
├── tsconfig.json # extends
|
|
119
|
+
├── tsconfig.json # extends @tinycld/core/tsconfig.package-base.json (by name)
|
|
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
|
|
|
@@ -6,33 +6,84 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
// ALL of them (npm tolerates absent dirs), so a partial checkout still installs.
|
|
7
7
|
// But --assemble-only CLONES only app+core+requested — we do NOT force-clone all.
|
|
8
8
|
const ALL_FEATURES = ['contacts', 'mail', 'calendar', 'drive', 'calc', 'text', 'google-takeout-import'];
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// the
|
|
13
|
-
//
|
|
9
|
+
// The `tinycld` member is the one always-cloned repo (tinycld/tinycld): it is
|
|
10
|
+
// the merged app shell + core. assembleWorkspace seeds it directly, pinnable via
|
|
11
|
+
// tinycldRef. Both @tinycld/core (at tinycld/core) and @tinycld/package-scripts
|
|
12
|
+
// (the tinycld-pkg CLI, at tinycld/package-scripts) live NESTED inside it, so
|
|
13
|
+
// they arrive with the single clone and are never cloned separately.
|
|
14
14
|
// Listed in the manifest workspaces array (everything that could exist). The
|
|
15
|
-
// nested member
|
|
16
|
-
|
|
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];
|
|
17
18
|
// pnpm version pinned via the package.json "packageManager" field so corepack
|
|
18
19
|
// resolves the same pnpm everywhere (local, CI, EAS). Bump in lockstep with the
|
|
19
20
|
// workspace's committed packageManager.
|
|
20
21
|
const PNPM_VERSION = '11.3.0';
|
|
22
|
+
/**
|
|
23
|
+
* Direct child dirs of `root` that look like a feature member already on disk:
|
|
24
|
+
* a package.json plus a manifest.ts/js. This mirrors the app generator's own
|
|
25
|
+
* discovery (it scans the workspace root for manifest-bearing members), so the
|
|
26
|
+
* member list bootstrap writes stays in sync with what the generator will load.
|
|
27
|
+
*
|
|
28
|
+
* The motivating case is CI / a custom package: a member checked out into its
|
|
29
|
+
* slot but absent from ALL_MEMBERS is discovered by the generator yet never
|
|
30
|
+
* linked by pnpm (→ "No manifest found"). Self-registering it here closes that
|
|
31
|
+
* gap without requiring every package to be hardcoded in ALL_FEATURES.
|
|
32
|
+
*/
|
|
33
|
+
function discoverPresentMembers(root) {
|
|
34
|
+
let entries;
|
|
35
|
+
try {
|
|
36
|
+
entries = readdirSync(root);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
return entries.filter((name) => {
|
|
42
|
+
if (name === 'node_modules' || name.startsWith('.'))
|
|
43
|
+
return false;
|
|
44
|
+
const dir = join(root, name);
|
|
45
|
+
try {
|
|
46
|
+
if (!statSync(dir).isDirectory())
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
const hasManifest = existsSync(join(dir, 'manifest.ts')) || existsSync(join(dir, 'manifest.js'));
|
|
53
|
+
return existsSync(join(dir, 'package.json')) && hasManifest;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
21
56
|
/**
|
|
22
57
|
* pnpm-workspace.yaml contents: member discovery list + the settings the
|
|
23
58
|
* ecosystem depends on. node-linker=hoisted reproduces npm's flat node_modules
|
|
24
59
|
* so feature siblings (peerDeps-only, no node_modules of their own) resolve
|
|
25
60
|
* react/expo/etc. up to the root, and Metro/tsc resolution work unchanged.
|
|
26
61
|
* pnpm 10+ reads these keys from THIS file, not .npmrc.
|
|
62
|
+
*
|
|
63
|
+
* `dir` is the workspace root: any manifest-bearing member already on disk but
|
|
64
|
+
* not in ALL_MEMBERS (a CI- or custom-package checkout) is unioned into the
|
|
65
|
+
* `packages:` list so pnpm links what the generator discovers. This list is the
|
|
66
|
+
* source of truth pnpm reads — unlike the package.json `workspaces` hint.
|
|
27
67
|
*/
|
|
28
|
-
function pnpmWorkspaceYaml() {
|
|
29
|
-
const
|
|
68
|
+
function pnpmWorkspaceYaml(dir) {
|
|
69
|
+
const allMembers = [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])];
|
|
70
|
+
const members = allMembers.map((m) => ` - ${m}`).join('\n');
|
|
30
71
|
return [
|
|
31
72
|
'nodeLinker: hoisted',
|
|
32
73
|
'linkWorkspacePackages: true',
|
|
33
74
|
'strictPeerDependencies: false',
|
|
34
75
|
'enablePrePostScripts: true',
|
|
35
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
|
+
'',
|
|
36
87
|
'packages:',
|
|
37
88
|
members,
|
|
38
89
|
'',
|
|
@@ -83,11 +134,22 @@ export function writeWorkspaceManifest(dir) {
|
|
|
83
134
|
...existing,
|
|
84
135
|
packageManager: `pnpm@${PNPM_VERSION}`,
|
|
85
136
|
// Monorepo-detection hint for external tooling (see doc comment); pnpm
|
|
86
|
-
// itself reads members from pnpm-workspace.yaml and ignores this.
|
|
87
|
-
|
|
137
|
+
// itself reads members from pnpm-workspace.yaml and ignores this. Union
|
|
138
|
+
// in any manifest-bearing member already on disk so the hint matches the
|
|
139
|
+
// authoritative pnpm-workspace.yaml member list.
|
|
140
|
+
workspaces: [...new Set([...ALL_MEMBERS, ...discoverPresentMembers(dir)])],
|
|
88
141
|
scripts: {
|
|
89
142
|
...existingScripts,
|
|
90
|
-
|
|
143
|
+
// link-members runs FIRST so the @tinycld/<member> symlinks (notably
|
|
144
|
+
// @tinycld/core) exist before the generator's package-build step
|
|
145
|
+
// (text's webview-editor build.ts does a bare `import '@tinycld/core/...'`
|
|
146
|
+
// resolved by package name, which fails on a CLEAN install if the
|
|
147
|
+
// symlink isn't there yet). It then runs AGAIN after generate to add
|
|
148
|
+
// the @tinycld/app-generated link (whose target, tinycld/lib/generated,
|
|
149
|
+
// only exists once generate has run); link-members is idempotent and
|
|
150
|
+
// skips app-generated when absent, so the first pass is harmless and
|
|
151
|
+
// the second completes the graph. All app scripts run from tinycld/.
|
|
152
|
+
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',
|
|
91
153
|
},
|
|
92
154
|
devDependencies: {
|
|
93
155
|
...existingDevDeps,
|
|
@@ -97,7 +159,7 @@ export function writeWorkspaceManifest(dir) {
|
|
|
97
159
|
writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 4)}\n`);
|
|
98
160
|
// pnpm-workspace.yaml is the source of truth for members + settings — always
|
|
99
161
|
// rewrite it (unlike package.json, no human-owned fields live here).
|
|
100
|
-
writeFileSync(join(dir, 'pnpm-workspace.yaml'), pnpmWorkspaceYaml());
|
|
162
|
+
writeFileSync(join(dir, 'pnpm-workspace.yaml'), pnpmWorkspaceYaml(dir));
|
|
101
163
|
// Minimal .npmrc: all pnpm settings live in pnpm-workspace.yaml (pnpm 10+
|
|
102
164
|
// reads them there, not from .npmrc). Only written when absent (don't
|
|
103
165
|
// clobber a real checkout's).
|
|
@@ -105,6 +167,41 @@ export function writeWorkspaceManifest(dir) {
|
|
|
105
167
|
if (!existsSync(npmrcPath)) {
|
|
106
168
|
writeFileSync(npmrcPath, '# pnpm settings live in pnpm-workspace.yaml (pnpm 10+ reads them there).\n');
|
|
107
169
|
}
|
|
170
|
+
writeRootBiomeConfig(dir);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Write the workspace-root biome.json. Biome searches only UPWARD for config,
|
|
174
|
+
* and the canonical biome.json lives at <root>/tinycld/ — a SIBLING of the
|
|
175
|
+
* feature members, never an ancestor. Without a root config, running biome from
|
|
176
|
+
* inside a member (or via the editor/LSP) finds nothing and falls back to
|
|
177
|
+
* biome's built-in defaults, flooding output with bogus reformatting. This
|
|
178
|
+
* minimal `root: true` config extends the canonical one (which is `root: false`)
|
|
179
|
+
* so it's resolvable from anywhere. Members may add their own `root: false`
|
|
180
|
+
* biome.json extending canonical to override rules; most don't.
|
|
181
|
+
*
|
|
182
|
+
* Seeded here so a freshly-assembled root lints before its first install. The
|
|
183
|
+
* generator also writes it on every install (the canonical config's `root:
|
|
184
|
+
* false` ships via the tinycld repo and breaks `pnpm run lint` if no root config
|
|
185
|
+
* sits above it), so this is the belt to the generator's suspenders. Content is
|
|
186
|
+
* static, so always rewrite.
|
|
187
|
+
*
|
|
188
|
+
* `vcs.root` points at the tinycld/ member, NOT the workspace root: the
|
|
189
|
+
* canonical config relies on `.gitignore` to exclude generated/build artifacts,
|
|
190
|
+
* and the only .gitignore listing them is tinycld/.gitignore. Once canonical is
|
|
191
|
+
* `root: false`, every invocation under the workspace root resolves THIS config
|
|
192
|
+
* as the root and inherits its vcs settings, so useIgnoreFile must be anchored
|
|
193
|
+
* here. A freshly-assembled workspace root has no .gitignore (and isn't a git
|
|
194
|
+
* repo), so pointing biome there would make it error "couldn't find an ignore
|
|
195
|
+
* file".
|
|
196
|
+
*/
|
|
197
|
+
function writeRootBiomeConfig(root) {
|
|
198
|
+
const config = {
|
|
199
|
+
$schema: 'https://biomejs.dev/schemas/2.4.16/schema.json',
|
|
200
|
+
root: true,
|
|
201
|
+
extends: ['./tinycld/biome.json'],
|
|
202
|
+
vcs: { enabled: true, clientKind: 'git', useIgnoreFile: true, root: 'tinycld' },
|
|
203
|
+
};
|
|
204
|
+
writeFileSync(join(root, 'biome.json'), `${JSON.stringify(config, null, 4)}\n`);
|
|
108
205
|
}
|
|
109
206
|
/**
|
|
110
207
|
* Resolve the workspace-template dir relative to this module. Published builds
|
|
@@ -167,8 +264,9 @@ function realClone(url, dest, ref) {
|
|
|
167
264
|
* Assemble a workspace skeleton at opts.root: write the canonical root manifest
|
|
168
265
|
* (writeWorkspaceManifest) + lay down the root scaffolding (copyWorkspaceTemplate:
|
|
169
266
|
* tinycld.packages.ts, vitest.config.ts, tests/ stubs, version files), then clone
|
|
170
|
-
* ONLY app + core + the explicitly-requested
|
|
171
|
-
* already present — e.g. a CI-checked-out member
|
|
267
|
+
* ONLY the tinycld member (merged app shell + core) + the explicitly-requested
|
|
268
|
+
* feature members (skipping any already present — e.g. a CI-checked-out member,
|
|
269
|
+
* where the merged repo is checked out into the tinycld/ slot). There is NO workspace
|
|
172
270
|
* meta-repo clone: bootstrap is the source of all root scaffolding.
|
|
173
271
|
* Unknown member names throw. Returns the members that ended up present. Does
|
|
174
272
|
* NOT run the install (the caller / CI controls that — e.g. `pnpm install` or a
|
|
@@ -192,11 +290,11 @@ export function assembleWorkspace(opts) {
|
|
|
192
290
|
writeWorkspaceManifest(opts.root);
|
|
193
291
|
copyWorkspaceTemplate(opts.root);
|
|
194
292
|
// Build the clone set keyed by member NAME so a member passed both bare and
|
|
195
|
-
// with an @ref dedupes to one clone (the ref-bearing entry wins).
|
|
196
|
-
//
|
|
293
|
+
// with an @ref dedupes to one clone (the ref-bearing entry wins). The
|
|
294
|
+
// `tinycld` repo (merged app shell + core, with core + package-scripts
|
|
295
|
+
// nested) is always cloned and pinnable via tinycldRef.
|
|
197
296
|
const refByName = new Map();
|
|
198
|
-
refByName.set('
|
|
199
|
-
refByName.set('core', opts.coreRef);
|
|
297
|
+
refByName.set('tinycld', opts.tinycldRef);
|
|
200
298
|
for (const { name, ref } of requested) {
|
|
201
299
|
// A later ref overrides an earlier bare entry; a bare entry never clears
|
|
202
300
|
// an existing ref.
|
|
@@ -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;AAC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AAI,UAAU,CAAC,IAAI,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/index.js
CHANGED
|
@@ -12,22 +12,19 @@ import { offerLinkPackage } from "./link-package.js";
|
|
|
12
12
|
import { runPrompts } from "./prompts.js";
|
|
13
13
|
export function runAssembleOnly(opts) {
|
|
14
14
|
const root = opts.root ?? process.cwd();
|
|
15
|
-
// app + core
|
|
16
|
-
// `members` list through assembleWorkspace's
|
|
17
|
-
// in the SAME `--with name@ref` surface for a
|
|
18
|
-
// (`--with
|
|
19
|
-
// out of `members` into
|
|
20
|
-
let
|
|
21
|
-
let coreRef = opts.coreRef;
|
|
15
|
+
// `tinycld` (the merged app shell + core) is the always-cloned member, not a
|
|
16
|
+
// feature, so it can't ride the `members` list through assembleWorkspace's
|
|
17
|
+
// feature validation. Accept it in the SAME `--with name@ref` surface for a
|
|
18
|
+
// uniform pinned invocation (`--with tinycld@v1 --with mail@v3`) by peeling
|
|
19
|
+
// tinycld@ref out of `members` into tinycldRef. An explicit opts.tinycldRef wins.
|
|
20
|
+
let tinycldRef = opts.tinycldRef;
|
|
22
21
|
const features = [];
|
|
23
22
|
for (const spec of opts.members ?? []) {
|
|
24
23
|
const at = spec.indexOf('@');
|
|
25
24
|
const name = at === -1 ? spec : spec.slice(0, at);
|
|
26
25
|
const ref = at === -1 ? undefined : spec.slice(at + 1) || undefined;
|
|
27
|
-
if (name === '
|
|
28
|
-
|
|
29
|
-
else if (name === 'core')
|
|
30
|
-
coreRef = coreRef ?? ref;
|
|
26
|
+
if (name === 'tinycld')
|
|
27
|
+
tinycldRef = tinycldRef ?? ref;
|
|
31
28
|
else
|
|
32
29
|
features.push(spec);
|
|
33
30
|
}
|
|
@@ -38,15 +35,12 @@ export function runAssembleOnly(opts) {
|
|
|
38
35
|
repoBase: process.env.TINYCLD_REPO_BASE,
|
|
39
36
|
...opts,
|
|
40
37
|
members: features,
|
|
41
|
-
|
|
42
|
-
coreRef,
|
|
38
|
+
tinycldRef,
|
|
43
39
|
root,
|
|
44
40
|
});
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
throw new Error(`Failed to clone required member '${required}'. Check network/auth and retry.`);
|
|
49
|
-
}
|
|
41
|
+
// The mandatory member must clone — a missing tinycld means a broken workspace.
|
|
42
|
+
if (!present.includes('tinycld')) {
|
|
43
|
+
throw new Error("Failed to clone required member 'tinycld'. Check network/auth and retry.");
|
|
50
44
|
}
|
|
51
45
|
console.log(`Workspace skeleton ready at ${root} (members: ${present.join(', ')})`);
|
|
52
46
|
}
|
|
@@ -105,7 +99,7 @@ async function main() {
|
|
|
105
99
|
}
|
|
106
100
|
export function composeAssembleOutro(members) {
|
|
107
101
|
const extras = members?.length ? `, ${members.join(', ')}` : '';
|
|
108
|
-
return `Workspace assembled (
|
|
102
|
+
return `Workspace assembled (tinycld${extras}). Run \`pnpm install\` at the root.`;
|
|
109
103
|
}
|
|
110
104
|
export function resolveMode(args) {
|
|
111
105
|
if (args.assembleOnly && args.new) {
|
|
@@ -125,7 +119,7 @@ function printUsage() {
|
|
|
125
119
|
'',
|
|
126
120
|
pc.bold('Modes (one is required):'),
|
|
127
121
|
` ${pc.cyan('--new <slug>')} Scaffold a new feature package.`,
|
|
128
|
-
` ${pc.cyan('--assemble-only')} Assemble a workspace root (clones
|
|
122
|
+
` ${pc.cyan('--assemble-only')} Assemble a workspace root (clones tinycld + --with features).`,
|
|
129
123
|
'',
|
|
130
124
|
pc.bold('Examples:'),
|
|
131
125
|
' npx @tinycld/bootstrap --new my-feature',
|
|
@@ -171,7 +165,7 @@ function printNextSteps({ slug, relTarget, linked, layout }) {
|
|
|
171
165
|
// The meta-repo was cloned into the wrapper, so the wrapper itself is the
|
|
172
166
|
// workspace root and the new package is a member directory inside it.
|
|
173
167
|
// New users may not realize they just got a self-contained workspace.
|
|
174
|
-
lines.push(pc.dim(` Scaffolded a self-contained tinycld workspace.\n The workspace root is ./${wsRoot}/ and your package is ./${relTarget}/.\n The app member (Expo + PocketBase) is ./${wsRoot}/
|
|
168
|
+
lines.push(pc.dim(` Scaffolded a self-contained tinycld workspace.\n The workspace root is ./${wsRoot}/ and your package is ./${relTarget}/.\n The app member (Expo + PocketBase) is ./${wsRoot}/tinycld/.\n`));
|
|
175
169
|
}
|
|
176
170
|
lines.push(` ${pc.dim(`# ${step++}. Initialize git and push to GitHub`)}`);
|
|
177
171
|
lines.push(` cd ${relTarget}`);
|
|
@@ -197,7 +191,7 @@ function printNextSteps({ slug, relTarget, linked, layout }) {
|
|
|
197
191
|
lines.push(' pnpm exec tinycld-pkg check');
|
|
198
192
|
lines.push('');
|
|
199
193
|
lines.push(` ${pc.dim(`# ${step++}. Run the app (Expo + PocketBase, single-port dev proxy)`)}`);
|
|
200
|
-
lines.push(` cd ${join(wsRoot, '
|
|
194
|
+
lines.push(` cd ${join(wsRoot, 'tinycld')}`);
|
|
201
195
|
lines.push(' pnpm run dev');
|
|
202
196
|
lines.push('');
|
|
203
197
|
console.log(lines.join('\n'));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,O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,KAAK,IAAI,EAAE,0DAA0D,CAAC,EAAE,CAAC,CAAA;IAChG,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,CAAA;IAC7C,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IAC5B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;AACjC,CAAC;AAED,SAAS,YAAY;IACjB,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC7B,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,IAAI,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;IACtE,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAA;IAChB,CAAC;AACL,CAAC;AAED,IAAI,YAAY,EAAE,EAAE,CAAC;IACjB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACjB,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,OAAO,IAAI,GAAG,CAAC,CAAA;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;AACN,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,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAyBpD;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,YAAoB,EAAE,IAAY;IAC3D,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAA;IAClD,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;QACtD,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;QACpE,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,GAA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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
2
|
+
"name": "@tinycld/bootstrap",
|
|
3
|
+
"version": "2.4.1",
|
|
4
|
+
"description": "Scaffolder for @tinycld feature packages",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/tinycld/bootstrap.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"bootstrap": "dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"templates"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"build": "pnpm run clean && tsc",
|
|
24
|
+
"dev": "tsx src/index.ts",
|
|
25
|
+
"lint": "biome check .",
|
|
26
|
+
"lint:fix": "biome check --write .",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"checks": "pnpm run lint && pnpm run typecheck",
|
|
29
|
+
"test": "vitest run --exclude '**/tests/integration/**'",
|
|
30
|
+
"test:integration": "vitest run tests/integration",
|
|
31
|
+
"prepublishOnly": "pnpm run checks && pnpm run test && pnpm run build",
|
|
32
|
+
"release": "pnpm publish"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@clack/prompts": "^0.8.0",
|
|
36
|
+
"picocolors": "^1.1.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@biomejs/biome": "^2.4.12",
|
|
40
|
+
"@types/node": "^22.10.0",
|
|
41
|
+
"tsx": "^4.21.0",
|
|
42
|
+
"typescript": "^5.9.0",
|
|
43
|
+
"vitest": "^3.0.0"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=24"
|
|
47
|
+
},
|
|
48
|
+
"packageManager": "pnpm@11.3.0"
|
|
49
|
+
}
|
|
@@ -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
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "
|
|
2
|
+
"extends": "@tinycld/core/tsconfig.package-base.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": ".",
|
|
5
5
|
"paths": {
|
|
6
|
-
"~/tinycld/{{PKG_SLUG}}/*": ["./tinycld/{{PKG_SLUG}}/*"]
|
|
7
|
-
"@tinycld/core/*": ["../core/*"],
|
|
8
|
-
"@tinycld/app-generated/*": ["../app/lib/generated/*"]
|
|
6
|
+
"~/tinycld/{{PKG_SLUG}}/*": ["./tinycld/{{PKG_SLUG}}/*"]
|
|
9
7
|
}
|
|
10
8
|
},
|
|
11
|
-
"include": ["tinycld/**/*.ts", "tinycld/**/*.tsx"
|
|
9
|
+
"include": ["tinycld/**/*.ts", "tinycld/**/*.tsx"],
|
|
12
10
|
"exclude": ["node_modules", "server", "pb-migrations", "tests/**/*.spec.ts"]
|
|
13
11
|
}
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
// getPackages() discovers it.
|
|
18
18
|
//
|
|
19
19
|
// Members are linked into BOTH the workspace-root node_modules/@tinycld/ and
|
|
20
|
-
//
|
|
21
|
-
// app-scoped links are the ones that matter for
|
|
22
|
-
// resolution from the workspace root and other
|
|
20
|
+
// tinycld/node_modules/@tinycld/. Metro resolves deps from the tinycld member
|
|
21
|
+
// (the app shell), so the tinycld-scoped links are the ones that matter for
|
|
22
|
+
// bundling; the root links cover resolution from the workspace root and other
|
|
23
|
+
// members.
|
|
23
24
|
import * as fs from 'node:fs'
|
|
24
25
|
import * as path from 'node:path'
|
|
25
26
|
import { getPackages } from '../tinycld.packages'
|
|
@@ -44,6 +45,20 @@ function memberDirsByName(): Map<string, string> {
|
|
|
44
45
|
// not a dir, or no/unreadable package.json — skip
|
|
45
46
|
}
|
|
46
47
|
}
|
|
48
|
+
// @tinycld/core lives nested in the tinycld member (<WS_ROOT>/tinycld/core/);
|
|
49
|
+
// the top-level scan won't find it. Register it explicitly so the
|
|
50
|
+
// node_modules/@tinycld/core symlink is still created.
|
|
51
|
+
if (!index.has('@tinycld/core')) {
|
|
52
|
+
const nestedCore = path.join(WS_ROOT, 'tinycld', 'core')
|
|
53
|
+
try {
|
|
54
|
+
const name = JSON.parse(
|
|
55
|
+
fs.readFileSync(path.join(nestedCore, 'package.json'), 'utf8')
|
|
56
|
+
).name
|
|
57
|
+
if (name === '@tinycld/core') index.set('@tinycld/core', nestedCore)
|
|
58
|
+
} catch {
|
|
59
|
+
// no nested core — skip
|
|
60
|
+
}
|
|
61
|
+
}
|
|
47
62
|
return index
|
|
48
63
|
}
|
|
49
64
|
|
|
@@ -73,7 +88,7 @@ function main(): void {
|
|
|
73
88
|
const dirs = memberDirsByName()
|
|
74
89
|
const targets = [
|
|
75
90
|
path.join(WS_ROOT, 'node_modules'),
|
|
76
|
-
path.join(WS_ROOT, '
|
|
91
|
+
path.join(WS_ROOT, 'tinycld', 'node_modules'),
|
|
77
92
|
]
|
|
78
93
|
|
|
79
94
|
let linked = 0
|
|
@@ -91,6 +106,21 @@ function main(): void {
|
|
|
91
106
|
}
|
|
92
107
|
linked++
|
|
93
108
|
}
|
|
109
|
+
|
|
110
|
+
// @tinycld/app-generated is NOT a workspace member (it's the generator's
|
|
111
|
+
// output dir, tinycld/lib/generated/). Link it explicitly so core's
|
|
112
|
+
// `@tinycld/app-generated/*` imports resolve by name from any consumer that
|
|
113
|
+
// pulls core in via its exports map. Skip if the generated dir doesn't exist
|
|
114
|
+
// yet (generator runs in the same postinstall, but ordering/partial runs vary).
|
|
115
|
+
const appGeneratedDir = path.join(WS_ROOT, 'tinycld', 'lib', 'generated')
|
|
116
|
+
if (fs.existsSync(appGeneratedDir)) {
|
|
117
|
+
for (const nm of targets) {
|
|
118
|
+
if (fs.existsSync(nm)) linkInto(nm, 'app-generated', appGeneratedDir)
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
console.warn('[link-members] tinycld/lib/generated not present — skipping @tinycld/app-generated link')
|
|
122
|
+
}
|
|
123
|
+
|
|
94
124
|
console.log(`[link-members] linked ${linked} workspace member(s) into node_modules/@tinycld/`)
|
|
95
125
|
}
|
|
96
126
|
|
|
@@ -48,6 +48,19 @@ export function getPackages(): string[] {
|
|
|
48
48
|
}
|
|
49
49
|
if (hasManifest(dir)) features.push(name)
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
// @tinycld/core moved INSIDE the tinycld member (at <wsRoot>/tinycld/core/);
|
|
53
|
+
// the top-level scan above won't see it. Look for it explicitly so it is
|
|
54
|
+
// still listed first.
|
|
55
|
+
if (!core) {
|
|
56
|
+
const nestedCorePkg = path.join(wsRoot, 'tinycld', 'core', 'package.json')
|
|
57
|
+
try {
|
|
58
|
+
const name = JSON.parse(fs.readFileSync(nestedCorePkg, 'utf8')).name
|
|
59
|
+
if (name === CORE_NAME) core = name
|
|
60
|
+
} catch {
|
|
61
|
+
// no nested core present — fine for feature-only test trees
|
|
62
|
+
}
|
|
63
|
+
}
|
|
51
64
|
}
|
|
52
65
|
|
|
53
66
|
features.sort()
|