@ultimat3/cli 31.32.0 → 31.34.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/package.json +29 -29
- package/src/admin-registration.ts +6 -5
- package/src/affected.ts +3 -2
- package/src/api-registration.ts +7 -5
- package/src/app-agents-md.ts +1 -1
- package/src/app-boundaries.ts +1 -1
- package/src/app-layout.ts +6 -5
- package/src/app-load.ts +1 -1
- package/src/app-manifest.ts +1 -1
- package/src/app-mcp.ts +11 -9
- package/src/app-openapi.ts +7 -5
- package/src/app-reload-graph.ts +9 -7
- package/src/app-runtime.ts +9 -6
- package/src/async-pages.ts +6 -5
- package/src/browser-launcher.ts +9 -5
- package/src/browser-transport.ts +8 -5
- package/src/budgets.ts +4 -3
- package/src/cdp-shot-errors.ts +7 -5
- package/src/cdp-shot-page.ts +6 -5
- package/src/cdp-shot-watch.ts +7 -5
- package/src/ci-log.ts +6 -5
- package/src/cmd-auth.ts +5 -4
- package/src/cmd-build.ts +2 -0
- package/src/cmd-ci.ts +8 -5
- package/src/cmd-clean.ts +9 -6
- package/src/cmd-db-branch.ts +3 -2
- package/src/cmd-db.ts +2 -2
- package/src/cmd-deploy-compose.ts +8 -5
- package/src/cmd-deploy.ts +1 -0
- package/src/cmd-dev.ts +1 -0
- package/src/cmd-env.ts +1 -1
- package/src/cmd-errors.ts +2 -3
- package/src/cmd-generate.ts +2 -0
- package/src/cmd-i18n.ts +5 -4
- package/src/cmd-jobs.ts +3 -2
- package/src/cmd-manifest.ts +1 -0
- package/src/cmd-new.ts +2 -0
- package/src/cmd-pr.ts +7 -6
- package/src/cmd-registries.ts +5 -4
- package/src/cmd-secrets.ts +1 -1
- package/src/cmd-shot.ts +1 -0
- package/src/cmd-tasks.ts +7 -5
- package/src/cmd-test.ts +8 -6
- package/src/db-backfill.ts +4 -3
- package/src/db-branch.ts +2 -2
- package/src/db-generate.ts +1 -1
- package/src/db-schema-refresh.ts +5 -4
- package/src/db-seed.ts +1 -1
- package/src/dev-child-watch.ts +7 -6
- package/src/dev-environment.ts +6 -5
- package/src/dev-lock.ts +3 -0
- package/src/dev-n-plus-one.ts +7 -5
- package/src/dev-reload.ts +7 -5
- package/src/dev-restart-retire.ts +7 -5
- package/src/dev-supervisor.ts +9 -6
- package/src/dev-watch-tree.ts +9 -7
- package/src/dev-watch.ts +7 -5
- package/src/document-styles.ts +7 -5
- package/src/drift.ts +9 -5
- package/src/duplicate-packages.ts +7 -5
- package/src/error-contract.ts +4 -2
- package/src/error-fixes.ts +7 -6
- package/src/error-unthrown.ts +7 -5
- package/src/fix-imports.ts +1 -1
- package/src/flag-reads.ts +1 -1
- package/src/framework-schema-apply.ts +7 -5
- package/src/framework-scope.ts +1 -1
- package/src/generate-follow-ups.ts +8 -5
- package/src/generate-shadow.ts +6 -4
- package/src/generate-sibling.ts +6 -4
- package/src/guards.ts +2 -2
- package/src/handle-registration.ts +4 -3
- package/src/i18n-audit.ts +4 -4
- package/src/i18n-registration.ts +5 -3
- package/src/import-closure.ts +7 -6
- package/src/island-bundle.ts +7 -6
- package/src/island-cache-inputs.ts +2 -1
- package/src/island-realtime-state.ts +6 -5
- package/src/island-realtime.ts +8 -6
- package/src/island-shot.ts +6 -5
- package/src/load-findings.ts +8 -5
- package/src/local-cli.ts +8 -6
- package/src/mcp-db-target.ts +2 -2
- package/src/mcp-ui-diff.ts +8 -5
- package/src/mcp-ui-inspect.ts +8 -6
- package/src/mcp-ui-interact.ts +9 -6
- package/src/mcp-ui.ts +11 -9
- package/src/measure-database.ts +8 -6
- package/src/measure-paths.ts +7 -5
- package/src/measure-scope.ts +10 -8
- package/src/migrations.ts +2 -0
- package/src/page-navigation.ts +9 -7
- package/src/page-speculation.ts +8 -6
- package/src/path-segments.ts +2 -1
- package/src/prerender.ts +4 -4
- package/src/runtime-assets.ts +8 -6
- package/src/runtime-bindings.ts +2 -0
- package/src/runtime-cache.ts +7 -5
- package/src/runtime-live-feed.ts +7 -5
- package/src/runtime-overrides.ts +7 -5
- package/src/runtime-queue.ts +6 -5
- package/src/script-csp.ts +4 -2
- package/src/secrets-rotation.ts +7 -5
- package/src/serve-boot.ts +8 -6
- package/src/serve.ts +8 -5
- package/src/server-barrels.ts +7 -5
- package/src/shot-theme.ts +8 -6
- package/src/site-config.ts +2 -1
- package/src/site-llms-pages.ts +8 -2
- package/src/source-list-edit.ts +8 -6
- package/src/static-cards.ts +2 -2
- package/src/static-report.ts +4 -3
- package/src/sync-authenticator.ts +6 -5
- package/src/templates/admin-page.ts +8 -5
- package/src/templates/admin.ts +6 -5
- package/src/templates/guard-animated-layout-property.ts +7 -5
- package/src/templates/guard-focus-visible.ts +7 -5
- package/src/templates/guard-image-dimensions.ts +8 -5
- package/src/templates/guard-island-without-states.ts +5 -3
- package/src/templates/guard-semantic-interactive.ts +1 -0
- package/src/templates/island.ts +9 -6
- package/src/templates/resource-form-island.ts +3 -2
- package/src/templates/resource-page.ts +8 -6
- package/src/templates/route.ts +1 -0
- package/src/templates/scaffold-docs.ts +7 -6
- package/src/templates/scaffold-entries.ts +7 -5
- package/src/templates/scaffold-errors.ts +8 -6
- package/src/templates/scaffold-repo.ts +5 -4
- package/src/templates/scaffold-shell.ts +7 -5
- package/src/templates/scaffold-site.ts +7 -5
- package/src/test-housekeeping.ts +3 -6
- package/src/test-select.ts +2 -2
- package/src/ts-scan.ts +6 -4
- package/src/tsconfig-references.ts +6 -6
- package/src/verify-checks.ts +9 -9
- package/src/verify-e2e.ts +8 -6
- package/src/verify-floor.ts +6 -7
- package/src/verify-pace.ts +3 -1
- package/src/verify-role-load.ts +8 -5
- package/src/verify-tests.ts +2 -2
- package/src/verify-typecheck.ts +7 -5
- package/src/version-loader.ts +1 -1
- package/src/worker-bundle.ts +7 -5
- package/src/workspace-checks.ts +2 -0
- package/src/workspace-graph.ts +4 -3
- package/src/write-line.ts +1 -1
package/src/test-select.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// validation behind the type positional and `--sample`. Selection only — nothing here splits a
|
|
3
3
|
// shard or spawns a process, so a wrong file list is always this file's bug and never a race.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
// Bun ships no equivalent: `join` builds the host-separator path from the scan root to a hit.
|
|
5
|
+
// why: Bun ships no path API: `join` builds the host-separator path from the scan root to a hit.
|
|
7
6
|
// Sizing is Bun's own (`Bun.file().size`), so nothing here reaches for `node:fs`.
|
|
7
|
+
import { join } from 'node:path';
|
|
8
8
|
import { nearestName, renderFixShellArg } from '@ultimat3/core';
|
|
9
9
|
import { TEST_TYPES } from '@ultimat3/testing';
|
|
10
10
|
import { BadFlagError } from './errors';
|
package/src/ts-scan.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Reading TypeScript source without a parser: the masking every scan here shares, and the `X_*`
|
|
2
|
-
// codes a package declares.
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
2
|
+
// codes a package declares.
|
|
3
|
+
//
|
|
4
|
+
// Deliberately not `tsc` — a regex over a masked file is the whole job. Masking is the load-bearing
|
|
5
|
+
// part: the contract's own 3-line rendering appears verbatim in doc blocks and template literals,
|
|
6
|
+
// and a scanner that reads it as code invents work. What a `fix:` can evaluate to is `fix-scan.ts`,
|
|
7
|
+
// which reads these primitives and is the only file that grew.
|
|
6
8
|
|
|
7
9
|
export interface SourceSite {
|
|
8
10
|
/** Repo-relative file the site was read from. */
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// which compiles referenced projects and nothing else — so a package no reference names is a
|
|
3
3
|
// package the gate's `typecheck` step reports green over without having read a line of it.
|
|
4
4
|
|
|
5
|
-
// Bun ships no equivalent: `join` builds the host-separator path from the scan root to the
|
|
6
|
-
// Nothing else here is `node:` — the read is `Bun.file`, and its rejection is also the
|
|
7
|
-
// root that has no `tsconfig.json` at all, so an `existsSync` ahead of it was a second
|
|
8
|
-
// with one answer.
|
|
5
|
+
// why: Bun ships no equivalent: `join` builds the host-separator path from the scan root to the
|
|
6
|
+
// config. Nothing else here is `node:` — the read is `Bun.file`, and its rejection is also the
|
|
7
|
+
// answer for a root that has no `tsconfig.json` at all, so an `existsSync` ahead of it was a second
|
|
8
|
+
// question with one answer.
|
|
9
9
|
import { join } from 'node:path';
|
|
10
|
-
import { ERROR_DOCS_URL, maskLiterals, stripComments } from '@ultimat3/core';
|
|
10
|
+
import { ERROR_DOCS_URL, maskLiterals, stripComments, trimTrailingSlashes } from '@ultimat3/core';
|
|
11
11
|
import type { Finding } from './output';
|
|
12
12
|
|
|
13
13
|
const ROOT_TSCONFIG = 'tsconfig.json';
|
|
@@ -20,7 +20,7 @@ const ROOT_TSCONFIG = 'tsconfig.json';
|
|
|
20
20
|
* scaffolder appends a duplicate entry the check already considered present.
|
|
21
21
|
*/
|
|
22
22
|
export const normalizeReferencePath = (path: string): string =>
|
|
23
|
-
path.replace(/^\.\//, '')
|
|
23
|
+
trimTrailingSlashes(path.replace(/^\.\//, ''));
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* A tsconfig is JSONC and `JSON.parse` is not, so the comments and trailing commas `tsc` accepts —
|
package/src/verify-checks.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// now the `x verify` command surface alone: the list is the definition of shippable and grows with
|
|
3
3
|
// the framework, while the command that runs it does not.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// why: Bun ships no path API; `join` builds the host-separator path each step's `applies` probes.
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import { APP_CONFIG_FILE, ERROR_DOCS_URL } from '@ultimat3/core';
|
|
8
8
|
import { AGENTS_MD_FILENAME } from '@ultimat3/manifest';
|
|
@@ -222,7 +222,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
222
222
|
// The destructive rail rides here rather than becoming a step of its own because it asks this
|
|
223
223
|
// step's own question — do the committed migrations still describe what the app is doing to its
|
|
224
224
|
// schema? — off the same directory, in the same pass, with no database either.
|
|
225
|
-
applies: async (ctx) =>
|
|
225
|
+
applies: async (ctx) => Bun.file(join(ctx.root, APP_CONFIG_FILE)).exists(),
|
|
226
226
|
run: async (ctx) => {
|
|
227
227
|
// Loaded first: the drivers the app's modules construct are what decide (`drift-store.ts`).
|
|
228
228
|
await loadApp(ctx.root);
|
|
@@ -275,7 +275,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
275
275
|
//
|
|
276
276
|
// A repo with no `app.config.ts` is the framework monorepo, which renders no documents and has
|
|
277
277
|
// no stylesheet registry to read; there is nothing for either half to weigh.
|
|
278
|
-
applies: async (ctx) =>
|
|
278
|
+
applies: async (ctx) => Bun.file(join(ctx.root, APP_CONFIG_FILE)).exists(),
|
|
279
279
|
async run(ctx) {
|
|
280
280
|
// No stats file is NOT "nothing to weigh" — it is every declared budget unmeasured. So the
|
|
281
281
|
// step MEASURES first, whenever the stats are missing, of an earlier rule, or older than the
|
|
@@ -334,7 +334,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
334
334
|
// this one asks what it SAYS, and a missing `<title>` reported under `budgets` would hand the
|
|
335
335
|
// reader a fix for the wrong question (axiom 4). It costs no second app load — `loadApp`
|
|
336
336
|
// imports each module once per process, so this runs on the registries `budgets` just filled.
|
|
337
|
-
applies: async (ctx) =>
|
|
337
|
+
applies: async (ctx) => Bun.file(join(ctx.root, APP_CONFIG_FILE)).exists(),
|
|
338
338
|
async run(ctx) {
|
|
339
339
|
const scan = await scanSiteMeta(ctx.root);
|
|
340
340
|
// No `baseUrl`: an app declares no base URL anywhere (`packages/core/src/config.ts` has no
|
|
@@ -376,7 +376,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
376
376
|
// second load. A repo with no `app.config.ts` is the framework monorepo, which registers no
|
|
377
377
|
// app catalogs — SKIPPED there, never passed, because a step that answers `ok` about nothing
|
|
378
378
|
// is the vacuous green this check exists to refuse.
|
|
379
|
-
applies: async (ctx) =>
|
|
379
|
+
applies: async (ctx) => Bun.file(join(ctx.root, APP_CONFIG_FILE)).exists(),
|
|
380
380
|
run: async (ctx) => fromFindings(await catalogFindings(ctx.root)),
|
|
381
381
|
}),
|
|
382
382
|
blockedByLoad({
|
|
@@ -385,7 +385,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
385
385
|
// A repo with no `app.config.ts` is the framework monorepo, which declares no roles and
|
|
386
386
|
// registers no routes — SKIPPED there, never passed, for the reason `i18n` gives: a step that
|
|
387
387
|
// answers `ok` about nothing is the vacuous green these checks exist to refuse.
|
|
388
|
-
applies: async (ctx) =>
|
|
388
|
+
applies: async (ctx) => Bun.file(join(ctx.root, APP_CONFIG_FILE)).exists(),
|
|
389
389
|
run: async (ctx) => fromFindings(await policyFindings(ctx.root)),
|
|
390
390
|
}),
|
|
391
391
|
{
|
|
@@ -409,7 +409,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
409
409
|
const floor = await readVerifyFloor(ctx.root);
|
|
410
410
|
const agents = await checkAgentsMd(ctx.root, floor?.agentsMdMaxBytes);
|
|
411
411
|
// The app's load failures, once, here — every other step that loaded it points at this one.
|
|
412
|
-
const app =
|
|
412
|
+
const app = await Bun.file(join(ctx.root, APP_CONFIG_FILE)).exists();
|
|
413
413
|
// Started first and awaited last: it is a child process, and it runs beside the rest.
|
|
414
414
|
const roleLoad = app ? roleLoadFindings(ctx.root, ctx.runner) : Promise.resolve([]);
|
|
415
415
|
const drift = await driftFindings(ctx.root);
|
|
@@ -418,7 +418,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
418
418
|
const findings = [
|
|
419
419
|
...(app ? await withLoadFindings(ctx.root, drift) : drift),
|
|
420
420
|
// An app only: the framework monorepo declares no `defineApi`, so it has no list to be in.
|
|
421
|
-
...(
|
|
421
|
+
...(app
|
|
422
422
|
? [
|
|
423
423
|
...(await unregisteredJobFindings(ctx.root)),
|
|
424
424
|
...(await retainUnsweptFindings(ctx.root)),
|
|
@@ -462,7 +462,7 @@ export const VERIFY_STEPS: readonly VerifyStep[] = [
|
|
|
462
462
|
// is a fact about the CALL: a caller of the exported `runVerify(VERIFY_STEPS, ctx)` passing no
|
|
463
463
|
// `hostChecks`, in a repo whose committed `x.verify.json` names `roadmap`, got
|
|
464
464
|
// `X_VERIFY_SUITE_VANISHED` — whose `fix:` is the command that had just failed.
|
|
465
|
-
applies: async (ctx) =>
|
|
465
|
+
applies: async (ctx) => Bun.file(join(ctx.root, ROADMAP_FILE)).exists(),
|
|
466
466
|
run: async (ctx) => fromFindings(await hostFindings(ctx, 'roadmap')),
|
|
467
467
|
},
|
|
468
468
|
];
|
package/src/verify-e2e.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
// What the gate's `e2e` step does around the suite in an APP:
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// `
|
|
6
|
-
//
|
|
1
|
+
// What the gate's `e2e` step does around the suite in an APP: with a browser, it runs the suite
|
|
2
|
+
// under the e2e preload, which spawns the app in the test process.
|
|
3
|
+
//
|
|
4
|
+
// The step names the app root to the preload, so the app lives in the test process, where
|
|
5
|
+
// `deploy.newBuild()` can restart it. No browser, or not an app: the suite runs as before and its
|
|
6
|
+
// browser-backed cases skip — or refuse under `E2E_BROWSER_REQUIRED=1`. An app whose
|
|
7
|
+
// `x.verify.json` requires `e2e` and ran nothing for want of a browser is red by `judgeE2eBrowser`,
|
|
8
|
+
// with the command that installs one.
|
|
7
9
|
|
|
8
10
|
import { ERROR_DOCS_URL } from '@ultimat3/core';
|
|
9
11
|
import { CHROME_PATH_ENV, chromeCandidates, findChrome } from '@ultimat3/scraping/cdp';
|
package/src/verify-floor.ts
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
// reads as a skip and keeps the gate green. The floor turns that skip back into a failure. Read
|
|
4
4
|
// here and written by nothing: a gate that edits its own floor ratchets both ways, which is none.
|
|
5
5
|
|
|
6
|
-
// Bun ships no
|
|
7
|
-
// all, and `join` builds the host-separator path to it.
|
|
8
|
-
import { existsSync } from 'node:fs';
|
|
6
|
+
// why: Bun ships no path API; `join` builds the host-separator path to the floor file.
|
|
9
7
|
import { join } from 'node:path';
|
|
10
8
|
import { ERROR_DOCS_URL, renderThrowable } from '@ultimat3/core';
|
|
11
9
|
import { AGENTS_MD_MAX_BYTES } from '@ultimat3/manifest';
|
|
@@ -277,10 +275,11 @@ export function parseVerifyFloor(
|
|
|
277
275
|
/** No file is no floor: a repo that never committed one is not ratcheted, and reports nothing. */
|
|
278
276
|
export async function readVerifyFloor(root: string): Promise<VerifyFloor | undefined> {
|
|
279
277
|
const path = join(root, VERIFY_FLOOR_FILE);
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
278
|
+
const file = Bun.file(path);
|
|
279
|
+
// `stat`, never `exists()`: that answers false for a directory, which would read as no floor and
|
|
280
|
+
// skip the ratchet silently. Only a path that is not there at all is no floor.
|
|
281
|
+
if ((await file.stat().catch(() => undefined)) === undefined) return undefined;
|
|
282
|
+
const text = await file.text().catch(() => undefined);
|
|
284
283
|
if (text === undefined) return { steps: [], problems: ['it could not be read as a file'] };
|
|
285
284
|
return parseVerifyFloor(text);
|
|
286
285
|
}
|
package/src/verify-pace.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
// How much slower this machine runs the gate than the one its declared numbers were measured
|
|
1
|
+
// How much slower this machine runs the gate than the one its declared numbers were measured
|
|
2
|
+
// on, measured once per gate and applied to every declared deadline.
|
|
3
|
+
//
|
|
2
4
|
// Every deadline the gate declares — a step's (`verify-deadline.ts`), Bun's 5 s per test, a test's
|
|
3
5
|
// own — was set against a 4-core CI runner, and on a 2-core 1.8 GHz box the same honest work runs
|
|
4
6
|
// five to seven times longer: the gate failed there on the deadlines, never on the code. Measured
|
package/src/verify-role-load.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
// The gate's half of per-role loading (`manifest` step): a
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// The gate's half of per-role loading (`manifest` step): a registration a worker's import set
|
|
2
|
+
// never reaches is a build error.
|
|
3
|
+
//
|
|
4
|
+
// A worker and a scheduler import the API index and every module that reaches no component or
|
|
5
|
+
// stylesheet (`role-load.ts`). A registration made in a module that DOES reach one, and that the
|
|
6
|
+
// index does not import, exists in the web role and in every tool — and not in a worker. At boot
|
|
7
|
+
// only jobs and tasks are checked, against the manifest; this is the build error for everything
|
|
8
|
+
// else a job reads by name.
|
|
6
9
|
|
|
7
10
|
// why: Bun ships no path API; the fix names the import relative to the API index.
|
|
8
11
|
import { dirname, join } from 'node:path';
|
package/src/verify-tests.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
// `eval` carries one rule beyond its suite — every prompt must have an eval — so it is the only
|
|
7
7
|
// step here that can fail with no test file of its own.
|
|
8
8
|
|
|
9
|
-
// Bun ships no
|
|
10
|
-
// and `join` builds the
|
|
9
|
+
// why: Bun ships no synchronous existence check (`Bun.file().exists()` is async, and `isApp` is
|
|
10
|
+
// read inside sync object literals) and no path API — `join` builds the path to the config file.
|
|
11
11
|
import { existsSync } from 'node:fs';
|
|
12
12
|
import { join } from 'node:path';
|
|
13
13
|
import { APP_CONFIG_FILE } from '@ultimat3/core';
|
package/src/verify-typecheck.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// Which `tsc` invocation the `typecheck` step runs
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// Which `tsc` invocation the `typecheck` step runs: `-p` with `incremental`, never `-b`.
|
|
2
|
+
//
|
|
3
|
+
// `tsc -b` decides "up to date" by mtime, and Bun installs a package as HARDLINKS out of its cache,
|
|
4
|
+
// carrying the cache's old mtimes — so upgrading a dependency to a version already in the cache
|
|
5
|
+
// left every input older than the buildinfo, `-b` skipped the program and reported green while a
|
|
6
|
+
// cold CI went red (#450). `-p` with `incremental` re-reads every input and compares content
|
|
7
|
+
// hashes, so it cannot be fooled by a date.
|
|
6
8
|
|
|
7
9
|
import { checkRootReferences } from './tsconfig-references';
|
|
8
10
|
|
package/src/version-loader.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// at import, and a top-level cross-package import from there is what broke module initialisation
|
|
3
3
|
// order before — so the value is fetched at the call, not at module scope.
|
|
4
4
|
|
|
5
|
-
// Bun has no path-join primitive; `import.meta.dir` is this module's directory in both the
|
|
5
|
+
// why: Bun has no path-join primitive; `import.meta.dir` is this module's directory in both the
|
|
6
6
|
// checked-out `src/` layout and the published `dist/` one, each one level below the package root.
|
|
7
7
|
import { resolve } from 'node:path';
|
|
8
8
|
import { resolveVersion } from '@ultimat3/core';
|
package/src/worker-bundle.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// The page's framework scripts (plan 101)
|
|
2
|
-
// named by a hash of its bytes, served `immutable
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// The page's framework scripts (plan 101) — the ONE sync worker and the ONE page boot — each
|
|
2
|
+
// built as a classic-script browser bundle, named by a hash of its bytes, served `immutable`.
|
|
3
|
+
//
|
|
4
|
+
// One route serves them in `x dev` and the container. The sync worker is
|
|
5
|
+
// `@ultimat3/realtime/sync-worker` (slice 11); the page boot is `@ultimat3/realtime/boot` — the
|
|
6
|
+
// disk restore and the outbox, once per page instead of once per island. A new deploy is a new URL,
|
|
7
|
+
// so an old tab keeps what it started with.
|
|
6
8
|
|
|
7
9
|
// why: Bun ships no path API; the entry is resolved to a file and named in the cause.
|
|
8
10
|
import { dirname, join, relative } from 'node:path';
|
package/src/workspace-checks.ts
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
// public subject. `isReExportManifest` is the whole carve-out — one statement of logic in such a
|
|
11
11
|
// file re-arms the ceiling on the same save, which is what keeps it from being a hole.
|
|
12
12
|
|
|
13
|
+
// why: a published `files` entry is often a DIRECTORY, which `Bun.file().exists()` answers false
|
|
14
|
+
// for; `readFileSync` fills a sources map inside one glob walk. Bun ships no path API either.
|
|
13
15
|
import { existsSync, readFileSync } from 'node:fs';
|
|
14
16
|
import { join } from 'node:path';
|
|
15
17
|
import { ERROR_DOCS_URL, renderCauseValue } from '@ultimat3/core';
|
package/src/workspace-graph.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
// second is covered by the first, with no unused framework sibling declarations. A tsconfig-only
|
|
4
4
|
// edge resolves for `tsc` but is invisible to bun, `--filter` ordering and change-detection tools.
|
|
5
5
|
|
|
6
|
+
// why: Bun ships no path API; `join` builds the host-separator path to each workspace manifest.
|
|
6
7
|
import { join } from 'node:path';
|
|
7
|
-
import { ERROR_DOCS_URL, maskLiterals } from '@ultimat3/core';
|
|
8
|
+
import { ERROR_DOCS_URL, maskLiterals, trimTrailingSlashes } from '@ultimat3/core';
|
|
8
9
|
import { CATALOG_PACKAGES } from './error-catalog';
|
|
9
10
|
import { scanAllImports } from './import-scan';
|
|
10
11
|
import type { Finding } from './output';
|
|
@@ -78,10 +79,10 @@ export async function workspaceManifestPaths(
|
|
|
78
79
|
): Promise<readonly string[]> {
|
|
79
80
|
const excluded = globs
|
|
80
81
|
.filter((glob) => glob.startsWith('!'))
|
|
81
|
-
.map((glob) => new Bun.Glob(glob.slice(1)
|
|
82
|
+
.map((glob) => new Bun.Glob(trimTrailingSlashes(glob.slice(1))));
|
|
82
83
|
const found = new Set<string>();
|
|
83
84
|
for (const glob of globs.filter((candidate) => !candidate.startsWith('!'))) {
|
|
84
|
-
const manifests = new Bun.Glob(`${glob
|
|
85
|
+
const manifests = new Bun.Glob(`${trimTrailingSlashes(glob)}/package.json`);
|
|
85
86
|
for await (const path of manifests.scan({ cwd: root, absolute: false })) {
|
|
86
87
|
const manifest = path.replaceAll('\\', '/');
|
|
87
88
|
const dir = manifest.slice(0, -'/package.json'.length);
|
package/src/write-line.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// pair the note below rules out. fd 2 exists because fd 1 is not always a log: under
|
|
4
4
|
// `x mcp serve --transport stdio` it is the protocol, under `--json` one document a caller parses.
|
|
5
5
|
|
|
6
|
-
// `node:fs`, and unavoidable: Bun has no synchronous stdout write of its own.
|
|
6
|
+
// why: `node:fs`, and unavoidable: Bun has no synchronous stdout write of its own.
|
|
7
7
|
import { writeSync } from 'node:fs';
|
|
8
8
|
// The one import beyond `node:fs`, and it costs nothing here: `create-ultimate` reaches this
|
|
9
9
|
// module through `@ultimat3/cli`'s barrel, which has already evaluated core.
|