@ultimat3/cli 31.32.0 → 31.33.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/cli",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.33.0",
|
|
4
4
|
"description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -53,34 +53,34 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@babel/core": "^8.0.10",
|
|
56
|
-
"@ultimat3/action": "31.
|
|
57
|
-
"@ultimat3/admin": "31.
|
|
58
|
-
"@ultimat3/ai": "31.
|
|
59
|
-
"@ultimat3/auth": "31.
|
|
60
|
-
"@ultimat3/cache": "31.
|
|
61
|
-
"@ultimat3/core": "31.
|
|
62
|
-
"@ultimat3/db": "31.
|
|
63
|
-
"@ultimat3/entity": "31.
|
|
64
|
-
"@ultimat3/flags": "31.
|
|
65
|
-
"@ultimat3/http": "31.
|
|
66
|
-
"@ultimat3/i18n": "31.
|
|
67
|
-
"@ultimat3/jobs": "31.
|
|
68
|
-
"@ultimat3/mail": "31.
|
|
69
|
-
"@ultimat3/manifest": "31.
|
|
70
|
-
"@ultimat3/mcp": "31.
|
|
71
|
-
"@ultimat3/money": "31.
|
|
72
|
-
"@ultimat3/notify": "31.
|
|
73
|
-
"@ultimat3/policy": "31.
|
|
74
|
-
"@ultimat3/pwa": "31.
|
|
75
|
-
"@ultimat3/query": "31.
|
|
76
|
-
"@ultimat3/realtime": "31.
|
|
77
|
-
"@ultimat3/render": "31.
|
|
78
|
-
"@ultimat3/schema": "31.
|
|
79
|
-
"@ultimat3/scraping": "31.
|
|
80
|
-
"@ultimat3/seo": "31.
|
|
81
|
-
"@ultimat3/storage": "31.
|
|
82
|
-
"@ultimat3/testing": "31.
|
|
83
|
-
"@ultimat3/time": "31.
|
|
56
|
+
"@ultimat3/action": "31.33.0",
|
|
57
|
+
"@ultimat3/admin": "31.33.0",
|
|
58
|
+
"@ultimat3/ai": "31.33.0",
|
|
59
|
+
"@ultimat3/auth": "31.33.0",
|
|
60
|
+
"@ultimat3/cache": "31.33.0",
|
|
61
|
+
"@ultimat3/core": "31.33.0",
|
|
62
|
+
"@ultimat3/db": "31.33.0",
|
|
63
|
+
"@ultimat3/entity": "31.33.0",
|
|
64
|
+
"@ultimat3/flags": "31.33.0",
|
|
65
|
+
"@ultimat3/http": "31.33.0",
|
|
66
|
+
"@ultimat3/i18n": "31.33.0",
|
|
67
|
+
"@ultimat3/jobs": "31.33.0",
|
|
68
|
+
"@ultimat3/mail": "31.33.0",
|
|
69
|
+
"@ultimat3/manifest": "31.33.0",
|
|
70
|
+
"@ultimat3/mcp": "31.33.0",
|
|
71
|
+
"@ultimat3/money": "31.33.0",
|
|
72
|
+
"@ultimat3/notify": "31.33.0",
|
|
73
|
+
"@ultimat3/policy": "31.33.0",
|
|
74
|
+
"@ultimat3/pwa": "31.33.0",
|
|
75
|
+
"@ultimat3/query": "31.33.0",
|
|
76
|
+
"@ultimat3/realtime": "31.33.0",
|
|
77
|
+
"@ultimat3/render": "31.33.0",
|
|
78
|
+
"@ultimat3/schema": "31.33.0",
|
|
79
|
+
"@ultimat3/scraping": "31.33.0",
|
|
80
|
+
"@ultimat3/seo": "31.33.0",
|
|
81
|
+
"@ultimat3/storage": "31.33.0",
|
|
82
|
+
"@ultimat3/testing": "31.33.0",
|
|
83
|
+
"@ultimat3/time": "31.33.0",
|
|
84
84
|
"babel-preset-solid": "^1.9.16"
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// `x g resource --admin` wires the override it wrote.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// the
|
|
1
|
+
// `x g resource --admin` wires the override it wrote.
|
|
2
|
+
//
|
|
3
|
+
// The entity is already an admin screen — it is in the handle `defineAdmin({ entities:
|
|
4
|
+
// adminEntitiesOf(db) })` reads — so the override file is the ONLY thing `--admin` adds, and an
|
|
5
|
+
// override nothing lists under `resources:` is a dead file. Performed here; where the admin is not
|
|
6
|
+
// a `defineAdmin({ … })` this can add to, the finding names the two lines.
|
|
6
7
|
|
|
7
8
|
import { ERROR_DOCS_URL, maskLiterals, stripComments } from '@ultimat3/core';
|
|
8
9
|
import type { GenerateDisk } from './generate-disk';
|
package/src/affected.ts
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
// A ref diff is stable under that concurrency; `--dirty` opts back in, which is right for one
|
|
10
10
|
// developer iterating alone and wrong as a default here.
|
|
11
11
|
|
|
12
|
-
// `join`/`relative` are `node:`-only by necessity: Bun exposes no path primitive, and a
|
|
13
|
-
// directory is checkout-relative while a caller's scan yields paths relative to its own
|
|
12
|
+
// why: `join`/`relative` are `node:`-only by necessity: Bun exposes no path primitive, and a
|
|
13
|
+
// workspace directory is checkout-relative while a caller's scan yields paths relative to its own
|
|
14
|
+
// root.
|
|
14
15
|
import { join, relative } from 'node:path';
|
|
15
16
|
import { singleLine, UltimateError } from '@ultimat3/core';
|
|
16
17
|
import { DEFAULT_BASE, defaultBase, fetchFixFor } from './affected-base';
|
package/src/api-registration.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// Every generator hands the primitives it wrote to `apps/web/api/index.ts`.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// Every generator hands the primitives it wrote to `apps/web/api/index.ts`.
|
|
2
|
+
//
|
|
3
|
+
// The scan registers actions and queries by export name on its own and registers NO job: a job
|
|
4
|
+
// module nothing lists keeps the positional `anonymous-job-2` that `job()` minted, on the queue
|
|
5
|
+
// row, in `x.manifest.json` and in every dead-letter trace — under a green gate (plan 101 slice 11
|
|
6
|
+
// b). Actions and queries are listed for the TYPE: `Api` is what the browser's client is shaped
|
|
7
|
+
// from.
|
|
6
8
|
|
|
7
9
|
import { ERROR_DOCS_URL } from '@ultimat3/core';
|
|
8
10
|
import { API_INDEX } from './app-root';
|
package/src/app-agents-md.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// express — so the gate runs that package's own check rather than forming a second opinion about
|
|
4
4
|
// what a context file has to be. Warnings never fail: they are judgement calls a human makes.
|
|
5
5
|
|
|
6
|
-
// Bun ships no `Bun.*` path API: `join` builds the host-separator path the check reads.
|
|
6
|
+
// why: Bun ships no `Bun.*` path API: `join` builds the host-separator path the check reads.
|
|
7
7
|
import { join } from 'node:path';
|
|
8
8
|
import { AGENTS_MD_FILENAME, assertAgentsMd } from '@ultimat3/manifest';
|
|
9
9
|
import type { Finding } from './output';
|
package/src/app-boundaries.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// hands the files read here to `app-transport.ts`, so a raw `fetch(` in an island is a finding of
|
|
15
15
|
// this step with no second walk of the app.
|
|
16
16
|
|
|
17
|
-
// Bun ships no `Bun.*` path API: `joinPath` reaches a file on disk with the host's separator.
|
|
17
|
+
// why: Bun ships no `Bun.*` path API: `joinPath` reaches a file on disk with the host's separator.
|
|
18
18
|
import { join as joinPath } from 'node:path';
|
|
19
19
|
// The POSIX variants resolve specifiers against import-graph keys, which are POSIX on every host.
|
|
20
20
|
import { dirname, join, normalize, relative } from 'node:path/posix';
|
package/src/app-layout.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// The one feature layout, made a build error: a primitive module `actions.ts` (or `live`,
|
|
2
|
-
// `queries`, `jobs`, `tasks`) beside the directory of the same name is refused.
|
|
3
|
-
//
|
|
4
|
-
// `
|
|
5
|
-
//
|
|
6
|
-
// and
|
|
2
|
+
// `queries`, `jobs`, `tasks`) beside the directory of the same name is refused.
|
|
3
|
+
//
|
|
4
|
+
// `x g` writes the directory form — `<slice>/actions/<name>.ts`, one primitive per file — and an
|
|
5
|
+
// app that also keeps `actions.ts` has two homes for one kind of thing, where `./actions` resolves
|
|
6
|
+
// to the file and never the directory. A component module beside its folder (`ui.tsx` + `ui/`) is
|
|
7
|
+
// not a primitive's home, and `x g resource` writes exactly that pair.
|
|
7
8
|
|
|
8
9
|
import { ERROR_DOCS_URL } from '@ultimat3/core';
|
|
9
10
|
import type { SourceFile } from './app-boundaries';
|
package/src/app-load.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// `registerQueries` / `registerRoute` name the rest — so `x manifest`, `x routes` and `x verify`
|
|
4
4
|
// read exactly the tables the running server reads.
|
|
5
5
|
|
|
6
|
-
// Bun ships no `Bun.*` path API: `join`/`resolve` reach the files a scan imports.
|
|
6
|
+
// why: Bun ships no `Bun.*` path API: `join`/`resolve` reach the files a scan imports.
|
|
7
7
|
import { join, resolve } from 'node:path';
|
|
8
8
|
import { listActions } from '@ultimat3/action';
|
|
9
9
|
import { APP_CONFIG_FILE } from '@ultimat3/core';
|
package/src/app-manifest.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// table, which surface enforces each permission, the locales the app registered, and the error
|
|
4
4
|
// codes its source declares.
|
|
5
5
|
|
|
6
|
-
// Bun ships no `Bun.*` path API: `join` builds the host-separator path to `x.manifest.json`.
|
|
6
|
+
// why: Bun ships no `Bun.*` path API: `join` builds the host-separator path to `x.manifest.json`.
|
|
7
7
|
import { join } from 'node:path';
|
|
8
8
|
import { describeActions } from '@ultimat3/action';
|
|
9
9
|
import { primitiveRegistrar } from '@ultimat3/core';
|
package/src/app-mcp.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
// The app's own MCP endpoint, mounted by the web role.
|
|
2
|
-
//
|
|
3
|
-
// `
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
1
|
+
// The app's own MCP endpoint, mounted by the web role.
|
|
2
|
+
//
|
|
3
|
+
// `defineAppMcp` built `mcp.route` — a `POST` handler with token auth and per-class rate limits —
|
|
4
|
+
// and `app.config.ts` declared `ai: { mcp: { expose: true } }` by DEFAULT, and nothing between the
|
|
5
|
+
// two served it: neither `x dev` nor `runRole` mounted the route, so `POST /mcp` answered
|
|
6
|
+
// `X_ROUTE_NOT_FOUND` in every app ever scaffolded (measured 2026-09-05). The contract is one file:
|
|
7
|
+
// `apps/<app>/mcp.ts` exports `mcp` — one `AppMcp`, or an array of them, one per population
|
|
8
|
+
// (customers, staff, affiliates) — this module finds it, and both boots mount what it carries:
|
|
9
|
+
// EVERY endpoint at its own `defineAppMcp({ path })`, the one path its RFC 9728 metadata and its
|
|
10
|
+
// 401 also name — and every app directory's file mounts, so an admin surface's `apps/admin/mcp.ts`
|
|
11
|
+
// stands beside the web one.
|
|
10
12
|
|
|
11
13
|
// why: a directory's existence — `Bun.file().exists()` answers for files, and `apps/` is a directory.
|
|
12
14
|
import { existsSync } from 'node:fs';
|
package/src/app-openapi.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// `openapi.json`, projected from the two registries: the actions by `@ultimat3/action`'s
|
|
2
|
-
// `buildOpenApi`, the queries by `@ultimat3/query`'s `queryOpenApiPaths
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
2
|
+
// `buildOpenApi`, the queries by `@ultimat3/query`'s `queryOpenApiPaths`, merged and written.
|
|
3
|
+
//
|
|
4
|
+
// The CLI merges the two `paths` maps — those packages are one tier and cannot compose each other —
|
|
5
|
+
// writes the file and compares the bytes; it does not know how an operation is shaped, which is why
|
|
6
|
+
// there is no third OpenAPI builder to drift from the ones the packages serve. Until 2026-09 only
|
|
7
|
+
// the actions were here, and every `GET /_x/query/<name>` the server mounted was a route the spec
|
|
8
|
+
// had never heard of.
|
|
7
9
|
|
|
8
10
|
// why: Bun ships no path-join primitive.
|
|
9
11
|
import { join } from 'node:path';
|
package/src/app-reload-graph.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
// Which modules a rescan must evaluate again, and making Bun do it.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
1
|
+
// Which modules a rescan must evaluate again, and making Bun do it.
|
|
2
|
+
//
|
|
3
|
+
// `import()` caches by path for the life of the process, so a re-import sees the edited file only
|
|
4
|
+
// once that path has left Bun's module registry (`delete require.cache[path]`, which Bun 1.4
|
|
5
|
+
// honours for ES modules too). Until 2026-09-27 `x dev` re-imported only the edited ROUTE module,
|
|
6
|
+
// under `?x-reload=<hash>`, and every module that route imports resolved to the instance already
|
|
7
|
+
// cached: a save to a component, its `.module.scss` or a helper logged "reloaded" and rendered the
|
|
8
|
+
// old code until a restart (one adopter: the panel's balance card and the home page, observed twice
|
|
9
|
+
// on one day).
|
|
8
10
|
//
|
|
9
11
|
// The rule is a reverse-dependency closure. A rescan hashes every file this graph knows; each
|
|
10
12
|
// changed file, and every module that imports it transitively, leaves the registry, and the scan's
|
package/src/app-runtime.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
// The app's `RuntimeOverrides`, found rather than handed over
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// `
|
|
1
|
+
// The app's `RuntimeOverrides`, found rather than handed over: `apps/<app>/runtime.ts` exports
|
|
2
|
+
// `runtime`, read by `x dev` and by `runRole` when its caller passed nothing.
|
|
3
|
+
//
|
|
4
|
+
// `runRole({ runtime })` has taken them since the seam existed, and the scaffolded
|
|
5
|
+
// `apps/web/server.ts` passes none — so an app's own middleware reached no process the framework
|
|
6
|
+
// boots, and `x dev` had no parameter to reach at all (measured 2026-09-05: `x dev` passed only the
|
|
7
|
+
// read-replica override). The contract is one file: `apps/<app>/runtime.ts` exports `runtime`, a
|
|
8
|
+
// `RuntimeOverrides`; `x dev` reads it, and `runRole` reads it when its caller passed nothing, so
|
|
9
|
+
// the two boots compose the same chain.
|
|
7
10
|
|
|
8
11
|
// why: a directory's existence — `Bun.file().exists()` answers for files, and `apps/` is a directory.
|
|
9
12
|
import { existsSync } from 'node:fs';
|
package/src/async-pages.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// A route whose `Page` is an `async` function and which declares no `load
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// A route whose `Page` is an `async` function and which declares no `load`, refused.
|
|
2
|
+
//
|
|
3
|
+
// It renders — the renderer awaits whatever the component returns — so no suite fails on it, and
|
|
4
|
+
// its data read silently skips everything `load` is for: the route's cache, `meta` computed from
|
|
5
|
+
// the data, the streaming boundary and the measurement render `x build` weighs. The social demo
|
|
6
|
+
// shipped eleven (plan 101 slice 11 l); nothing asked.
|
|
6
7
|
|
|
7
8
|
import type { RouteEntry } from '@ultimat3/render';
|
|
8
9
|
import { routeEntries } from '@ultimat3/render';
|
package/src/browser-launcher.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
// Which browser `x shot` drives, and the raw-CDP driver over it (`cdp-shot-driver.ts`).
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// Which browser `x shot` drives, and the raw-CDP driver over it (`cdp-shot-driver.ts`).
|
|
2
|
+
//
|
|
3
|
+
// No browser library, in the app or here: Chrome is launched on its debugging pipe by
|
|
4
|
+
// `@ultimat3/testing`'s launcher — the one `x verify`'s e2e step already runs on — or ATTACHED to
|
|
5
|
+
// over `--cdp-url`, which is what every stealth provider sells. Until 22.0.0 this resolved the
|
|
6
|
+
// APP's `puppeteer-core`, so `x shot` needed an install the framework could not make, and two
|
|
7
|
+
// launchers drifted.
|
|
6
8
|
|
|
9
|
+
// why: `browserBinaryExists` is a synchronous predicate, and Bun's only existence check,
|
|
10
|
+
// `Bun.file().exists()`, is async.
|
|
7
11
|
import { existsSync } from 'node:fs';
|
|
8
12
|
import { UltimateError } from '@ultimat3/core';
|
|
9
13
|
import { CHROME_CANDIDATES } from '@ultimat3/scraping/cdp';
|
package/src/browser-transport.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
// The browser has ONE HTTP function and ONE socket, as a rule over a file tree: a raw
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// The browser has ONE HTTP function and ONE socket, as a rule over a file tree: a raw transport
|
|
2
|
+
// or a package's SERVER BARREL in browser-reachable code is refused.
|
|
3
|
+
//
|
|
4
|
+
// A raw `fetch(`, `new WebSocket(`, `new XMLHttpRequest(` or `new EventSource(` in
|
|
5
|
+
// browser-reachable code skips `@ultimat3/core`'s `clientTransport` — credentials, the idempotency
|
|
6
|
+
// header, the record envelope, the principal fence — so its rows never reach the page's store and
|
|
7
|
+
// it keeps running for the previous principal after a sign-out. A package's SERVER BARREL in that
|
|
8
|
+
// closure is refused too.
|
|
6
9
|
//
|
|
7
10
|
// BROWSER-REACHABLE is derived, never listed: every `*.island.tsx`, every module that names the
|
|
8
11
|
// client seam itself, and the import closure of each, followed name by name through barrels
|
package/src/budgets.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// routes are declared in. The one thing that lives here is the comparison against MEASURED bytes:
|
|
7
7
|
// render checks a bundle graph, this checks what the build actually emitted.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// why: Bun ships no path API; `join` builds the host-separator path to the build-stats file.
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { ERROR_DOCS_URL, formatBytes } from '@ultimat3/core';
|
|
12
12
|
import type { Manifest, RouteFact } from '@ultimat3/manifest';
|
|
@@ -236,8 +236,9 @@ export function checkBudgets(
|
|
|
236
236
|
|
|
237
237
|
export async function readBuildStats(root: string): Promise<BuildStats | undefined> {
|
|
238
238
|
const path = join(root, BUILD_STATS_FILE);
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
const file = Bun.file(path);
|
|
240
|
+
if (!(await file.exists())) return undefined;
|
|
241
|
+
const read = (await file.json()) as BuildStats;
|
|
241
242
|
// A file the current rules did not write carries no numbers this gate may read.
|
|
242
243
|
return read.measuredBy === BUILD_STATS_RULES ? read : { routes: [], stale: true };
|
|
243
244
|
}
|
package/src/cdp-shot-errors.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// The four ways `x shot`'s raw-CDP page refuses a verb.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// The four ways `x shot`'s raw-CDP page refuses a verb.
|
|
2
|
+
//
|
|
3
|
+
// A browser that is missing, dies or never answers is `@ultimat3/testing`'s `X_CDP_*` — the wire is
|
|
4
|
+
// the same one the e2e driver runs on. These four are what only a shot can be wrong about: which
|
|
5
|
+
// host it may open, which element it was pointed at, and which key it was asked to press. Their
|
|
6
|
+
// codes and titles are registered with every other CLI code, in `error-codes.ts` — never a second
|
|
7
|
+
// registration here.
|
|
6
8
|
import { renderCauseValue, UltimateError } from '@ultimat3/core';
|
|
7
9
|
|
|
8
10
|
/** A navigation to a host the run did not allow. Refused before a byte leaves. */
|
package/src/cdp-shot-page.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// One `ShotPage` over one attached CDP session: navigate, read, act, photograph.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// One `ShotPage` over one attached CDP session: navigate, read, act, photograph.
|
|
2
|
+
//
|
|
3
|
+
// The session is the driver's (`cdp-shot-driver.ts`), the rings and the allow list are
|
|
4
|
+
// `cdp-shot-watch.ts`'s, and what "ready to act on" means is `cdp-shot-element.ts`'s. Acts are real
|
|
5
|
+
// input — a click is a mouse press at the element's centre, a keystroke is a key event — because an
|
|
6
|
+
// in-page `.click()` skips `pointerdown`, which is what a dialog's backdrop listens to.
|
|
6
7
|
import { assert, finiteCount, hostDecision } from '@ultimat3/core';
|
|
7
8
|
import type { CdpConnection } from '@ultimat3/scraping/cdp';
|
|
8
9
|
import { CdpCallFailedError, CdpTimeoutError } from '@ultimat3/scraping/cdp';
|
package/src/cdp-shot-watch.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
// What one shot page saw
|
|
2
|
-
// tail
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// What one shot page saw — its console, uncaught exceptions and requests, each in a BOUNDED
|
|
2
|
+
// tail — and the host allow list, enforced in the browser on every paused request.
|
|
3
|
+
//
|
|
4
|
+
// Each tail carries a count of what the bound threw away. Every request is paused
|
|
5
|
+
// (`Fetch.requestPaused`) and refused unless its host is allowed, so an injected
|
|
6
|
+
// `<img src="http://169.254.169.254/…">` never leaves — it is recorded as `refused`. Paused at the
|
|
7
|
+
// BROWSER too, so a popup the page opens is decided by the same `hostDecision`.
|
|
6
8
|
|
|
7
9
|
import type { SleepClock } from '@ultimat3/core';
|
|
8
10
|
import { hostDecision } from '@ultimat3/core';
|
package/src/ci-log.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
// A GitHub Actions log, read back into the findings that produced it.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// A GitHub Actions log, read back into the findings that produced it.
|
|
2
|
+
//
|
|
3
|
+
// `gh run view --log-failed` prints `<job>\t<step>\t<timestamp> <text>` with a BOM, ANSI colour and
|
|
4
|
+
// `##[group]` markers in it — and underneath all of that, for a `verify` job, is `renderFinding`'s
|
|
5
|
+
// own three lines. So this file undoes the transport and reconstructs the `Finding`, rather than
|
|
6
|
+
// printing a wall of text and asking the reader to spot the code in it.
|
|
6
7
|
|
|
7
8
|
import type { Finding, JsonValue } from './output';
|
|
8
9
|
|
package/src/cmd-auth.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// `x auth seal-mfa` — seal every `x_users.mfa_secret` still stored in the clear, in place, under
|
|
2
|
-
// the app's master key.
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
2
|
+
// the app's master key.
|
|
3
|
+
//
|
|
4
|
+
// The one-shot an upgrade onto sealed second-factor secrets owes: readers refuse a plaintext value
|
|
5
|
+
// (`X_MFA_SECRET_UNSEALED`), and this is the command that refusal names. Idempotent — a sealed
|
|
6
|
+
// value is counted and left alone — so an interrupted run is finished by running it again.
|
|
6
7
|
|
|
7
8
|
import type { MfaSecretStore } from '@ultimat3/auth';
|
|
8
9
|
import { postgresAuthAdapter, sealMfaSecrets } from '@ultimat3/auth';
|
package/src/cmd-build.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// "anywhere that runs a container or a binary"; nothing here knows the name of a cloud. `prebuilt`
|
|
3
3
|
// is the docker target's other half: the line the Dockerfile runs INSIDE the image build.
|
|
4
4
|
|
|
5
|
+
// why: `requireEntry` is synchronous and Bun's `Bun.file().exists()` is async; Bun ships no
|
|
6
|
+
// path API, and `join`/`resolve` build the entry and `--out` paths.
|
|
5
7
|
import { existsSync } from 'node:fs';
|
|
6
8
|
import { join, resolve } from 'node:path';
|
|
7
9
|
import { ERROR_DOCS_URL, frameworkVersion, UltimateError, VERSION_DEFINE } from '@ultimat3/core';
|
package/src/cmd-ci.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
// `x ci` — one command instead of three
|
|
2
|
-
// the
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// `x ci` — one command instead of three: the failed runs' findings, read off their logs, in
|
|
2
|
+
// the three-line shape every Ultimate error is printed in.
|
|
3
|
+
//
|
|
4
|
+
// `gh run view` prints a tree of ticks and one cross, and the error is inside a per-job log that is
|
|
5
|
+
// mostly setup noise; for a `verify` job that log tail IS the findings block, with its `X_*` codes
|
|
6
|
+
// and executable `fix:` lines already in it. So this command fetches the runs, opens only the
|
|
7
|
+
// failed steps' log, and hands back the findings the gate already wrote — in the same three-line
|
|
8
|
+
// shape every other Ultimate error is printed in.
|
|
6
9
|
|
|
7
10
|
import { renderThrowable, UltimateError } from '@ultimat3/core';
|
|
8
11
|
import { parseDuration } from '@ultimat3/time';
|
package/src/cmd-clean.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
// `x clean` — every test leftover the framework knows of, cleared on demand (#738): the
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
1
|
+
// `x clean` — every test leftover the framework knows of, cleared on demand (#738): the same
|
|
2
|
+
// sweep the test runner makes before every run, keeping none.
|
|
3
|
+
//
|
|
4
|
+
// The set: the migrated test-database templates under `.x/test-db`, the whole `.x/cache`, the `.x`
|
|
5
|
+
// folders a process started in a source folder once wrote beside the code, and — with
|
|
6
|
+
// `TEST_DATABASE_URL` set — the probe databases whose run is over. The test runner sweeps the same
|
|
7
|
+
// set before every run, keeping the newest two of each cache (`test-housekeeping.ts`); this is the
|
|
8
|
+
// same sweep, keeping none. Never touched: `.x/pgdata` (the dev database), `.x/storage`, the build
|
|
9
|
+
// output.
|
|
7
10
|
|
|
8
11
|
import { requireAppRoot } from './app-root';
|
|
9
12
|
import { cleanSpec } from './cmd-clean-spec';
|
package/src/cmd-db-branch.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// `x db branch list|create|delete` — the wiring alone: which verb, which database, which refusal.
|
|
2
|
+
//
|
|
2
3
|
// A VERB is required and comes from a closed set, so a branch name can never be read as one:
|
|
3
4
|
// `x db branch ls` used to clone a database called `ls`, because the argument was the name. One
|
|
4
|
-
// verb each across every `x` registry (#709): `list` and `delete`, no `ls`/`drop` alias.
|
|
5
|
-
//
|
|
5
|
+
// verb each across every `x` registry (#709): `list` and `delete`, no `ls`/`drop` alias. The facts
|
|
6
|
+
// (what a branch is, per mode) are `db-branch.ts`; the client lifetime is here.
|
|
6
7
|
|
|
7
8
|
import { ERROR_DOCS_URL, nearestName } from '@ultimat3/core';
|
|
8
9
|
import { type DbClient, postgresClient } from '@ultimat3/db';
|
package/src/cmd-db.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// a release phase. Until 1.2.0 these shelled out to `bunx drizzle-kit` — a second engine with a
|
|
9
9
|
// second journal, declared in no `package.json` and fetched unpinned at run time.
|
|
10
10
|
|
|
11
|
-
// `node:fs/promises` for `rm` — `Bun.file().delete()` takes one file, and `x db reset` removes
|
|
12
|
-
// directory tree. `node:path` for `join` — Bun exposes no path joiner.
|
|
11
|
+
// why: `node:fs/promises` for `rm` — `Bun.file().delete()` takes one file, and `x db reset` removes
|
|
12
|
+
// a directory tree. `node:path` for `join` — Bun exposes no path joiner.
|
|
13
13
|
import { rm } from 'node:fs/promises';
|
|
14
14
|
import { join } from 'node:path';
|
|
15
15
|
import { NotImplementedError, resolveEnvironment } from '@ultimat3/core';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
// The compose half of `x deploy`, read off the app's compose file: which serving roles can
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// The compose half of `x deploy`, read off the app's compose file: which serving roles can
|
|
2
|
+
// start first, and what the file demands of `.env.production`.
|
|
3
|
+
//
|
|
4
|
+
// A start-first role starts its new container BEFORE the old one stops (the sequence is
|
|
5
|
+
// `cmd-deploy-start-first.ts`); the `.env.production` demands are read by the deploy's pre-flight
|
|
6
|
+
// and `x env init`. `docker compose up -d <role>` alone is stop-first — it
|
|
7
|
+
// recreates, so the role serves nothing between the old container's exit and the new one's
|
|
8
|
+
// healthcheck.
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* How one serving role is rolled. `start-first` is the zero-downtime path; `stop-first` is
|
package/src/cmd-deploy.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// not know the name of a cloud, a KV store or an edge runtime (axiom 7). What it emits is a plan
|
|
3
3
|
// anything that runs containers can execute.
|
|
4
4
|
|
|
5
|
+
// why: Bun ships no path API; `join` builds the host-separator paths to the app's deploy files.
|
|
5
6
|
import { join } from 'node:path';
|
|
6
7
|
import { ERROR_DOCS_URL } from '@ultimat3/core';
|
|
7
8
|
import { loadEnvSchema } from './app-env';
|
package/src/cmd-dev.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// mounted alongside the app — mounted, never re-implemented — so an agent can introspect it.
|
|
4
4
|
// No Docker, no env setup: an unset variable means the embedded default.
|
|
5
5
|
|
|
6
|
+
// why: Bun ships no path API; `join` builds the host-separator paths under the app root.
|
|
6
7
|
import { join } from 'node:path';
|
|
7
8
|
import { METRICS_PATH } from '@ultimat3/core';
|
|
8
9
|
import { MANIFEST_FILENAME } from '@ultimat3/manifest';
|
package/src/cmd-env.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// which variables exist, the answer to "does this process have them?", and (`init`,
|
|
3
3
|
// `cmd-env-init.ts`) the deploy's `.env.production`. All read the one `defineEnv` declaration.
|
|
4
4
|
|
|
5
|
-
// Bun ships no path-join primitive, and `.env.example` is written app-root-relative.
|
|
5
|
+
// why: Bun ships no path-join primitive, and `.env.example` is written app-root-relative.
|
|
6
6
|
import { join } from 'node:path';
|
|
7
7
|
import {
|
|
8
8
|
checkEnv,
|
package/src/cmd-errors.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { nearestName, singleLine } from '@ultimat3/core';
|
|
2
1
|
// `x errors explain <CODE>` / `x errors list` — the error table, programmatically. An agent that
|
|
3
2
|
// hits an `X_*` code should not have to leave the terminal to learn what it means, and a code it
|
|
4
|
-
// invented should come back refused:
|
|
5
|
-
// a plausible-sounding explanation an agent would then act on.
|
|
3
|
+
// invented should come back refused: "no such code", never a plausible-sounding explanation.
|
|
6
4
|
|
|
5
|
+
import { nearestName, singleLine } from '@ultimat3/core';
|
|
7
6
|
import type { ErrorExplanation } from '@ultimat3/mcp';
|
|
8
7
|
import { withRecent } from './cmd-errors-recent';
|
|
9
8
|
import { errorsSpec } from './cmd-errors-spec';
|