@mostra/cli 0.0.0-stage → 0.2.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/LICENSE +202 -0
- package/README.md +18 -2
- package/dist/bin.d.ts +1 -0
- package/dist/bin.js +79 -0
- package/dist/bin.js.map +1 -0
- package/dist/bootstrap-DfEe_yPr.js +113 -0
- package/dist/bootstrap-DfEe_yPr.js.map +1 -0
- package/dist/exit-CBIf8nAU.js +79 -0
- package/dist/exit-CBIf8nAU.js.map +1 -0
- package/dist/flush-BCuWs0Zh.js +718 -0
- package/dist/flush-BCuWs0Zh.js.map +1 -0
- package/dist/index.d.ts +230 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/reference/cli.md +977 -0
- package/dist/reference/diagnostics.json +1264 -0
- package/dist/reference/errors/MOSTRA_A11Y_MINOR.md +23 -0
- package/dist/reference/errors/MOSTRA_A11Y_SERIOUS.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_CANCELLED.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_EVENT_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_EXPORT_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_INTERRUPTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_RUN_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_THREW.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_UNKNOWN_FUNCTION.md +23 -0
- package/dist/reference/errors/MOSTRA_ACTION_UNSERIALIZABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_DIR_NOT_EMPTY.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_ENTRY_AMBIGUOUS.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_NO_ENTRY.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_NO_PAGE.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_SOURCE_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_SOURCE_UNREADABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_TEMPLATE_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_VERSION_COLLECTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ARTIFACT_VERSION_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_CRASHED.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_TIMEOUT.md +23 -0
- package/dist/reference/errors/MOSTRA_BUILD_UNRESOLVED.md +23 -0
- package/dist/reference/errors/MOSTRA_CLI_CONFIG_UNWRITABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_CLI_UNKNOWN_COMMAND.md +23 -0
- package/dist/reference/errors/MOSTRA_CLI_USAGE.md +23 -0
- package/dist/reference/errors/MOSTRA_CONSOLE_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_CONSOLE_WARNING.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_INSTALL_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_OFFLINE.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_SPEC_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_TIMEOUT.md +23 -0
- package/dist/reference/errors/MOSTRA_DEP_WARM_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BIND_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BROWSER_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BUNDLE_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_BUNDLE_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_NODE_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_PORT_TAKEN.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_RUNTIME_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_SERVICE_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_SHELL_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_ENV_WARM_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_DUPLICATE_ID.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_ID_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_ID_UNSTABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_MUTATION_ID_REUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_SHARED.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_FIELD_UNBOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_DISK_FULL.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_GC_INCOMPLETE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_GONE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_INTEGRITY.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_LEDGER_UNREADABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_LOCKED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_MISMATCH.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_NOT_ALWAYS_ON.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_NOT_OWNED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_SOCKET_TOO_LONG.md +23 -0
- package/dist/reference/errors/MOSTRA_HOME_TOO_NEW.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_CONNECTION_CLOSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_CURSOR_COMPACTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_IDENTITY_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_INITIALIZE_ORDER.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_INTERNAL_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_INVALID_PARAMS.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_MALFORMED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_MESSAGE_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_METHOD_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_NOTIFICATION_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_PORT_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_REQUEST_ID_REUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_REVISION_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_SHUTDOWN_REFUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_SUBSCRIPTION_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_HOST_TIMEOUT.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_CONTENT_TYPE.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_CSRF_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_HEADERS_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_HOST_REFUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_NOT_SERVED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_ORIGIN_REFUSED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_RATE_LIMITED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_REQUEST_MALFORMED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_SCOPE_DENIED.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_SESSION_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_SESSION_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_TOKEN_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_HYGIENE_TOKEN_REVOKED.md +23 -0
- package/dist/reference/errors/MOSTRA_LIVE_SOURCE_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_LIVE_TOO_LARGE.md +23 -0
- package/dist/reference/errors/MOSTRA_MANIFEST_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_MANIFEST_NOT_LITERAL.md +23 -0
- package/dist/reference/errors/MOSTRA_MANIFEST_UNKNOWN_KEY.md +23 -0
- package/dist/reference/errors/MOSTRA_NETWORK_EXTERNAL_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_NETWORK_REQUEST_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_PLATFORM_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_PUBLISH_ID_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_PUBLISH_SOURCE_CHANGED.md +23 -0
- package/dist/reference/errors/MOSTRA_PUBLISH_VERIFY_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_ACTION_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_ARIA.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_FIELD_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_LIVE_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_PAGE_REMOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_REGRESSION_PIXELS.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_BLANK.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_NOT_READY.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_PAGE_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_WORKER_CRASHED.md +23 -0
- package/dist/reference/errors/MOSTRA_RUNTIME_WORKER_PARKED.md +23 -0
- package/dist/reference/errors/MOSTRA_SECRET_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_SMOKE_BUDGET.md +23 -0
- package/dist/reference/errors/MOSTRA_SMOKE_NO_EFFECT.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_ALREADY.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_BLOCKED.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_CHANNEL_DENIED.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_POLICY_NONE.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_REVISION_MOVED.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_SIGNAL_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_SUBMIT_VIEW_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_TARGET_UNAVAILABLE.md +23 -0
- package/dist/reference/errors/MOSTRA_TYPE_ERROR.md +23 -0
- package/dist/reference/errors/MOSTRA_TYPE_UNTYPED_PACKAGE.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_ACTION_SKIPPED.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_BASELINE_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_CRASHED.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_LIVE_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_NO_BASELINE.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_SECRET_MISSING.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_SKIP_CONSEQUENCE.md +23 -0
- package/dist/reference/errors/MOSTRA_VERIFY_TIMEOUT.md +23 -0
- package/dist/reference/telemetry.md +82 -0
- package/dist/run-BJaRnz-Q.js +3824 -0
- package/dist/run-BJaRnz-Q.js.map +1 -0
- package/dist/run-CMyjOm0Q.js +2 -0
- package/dist/telemetry/flush-main.d.ts +1 -0
- package/dist/telemetry/flush-main.js +14 -0
- package/dist/telemetry/flush-main.js.map +1 -0
- package/package.json +62 -3
- package/src/bin.ts +70 -0
- package/src/bootstrap.ts +156 -0
- package/src/browser.ts +186 -0
- package/src/client.ts +313 -0
- package/src/command.ts +147 -0
- package/src/commands/admin.ts +791 -0
- package/src/commands/authoring.ts +244 -0
- package/src/commands/dev.ts +106 -0
- package/src/commands/index.ts +71 -0
- package/src/commands/interaction.ts +288 -0
- package/src/commands/shared.ts +71 -0
- package/src/commands/viewing.ts +153 -0
- package/src/docs.ts +111 -0
- package/src/exit.ts +89 -0
- package/src/help.ts +170 -0
- package/src/home.ts +111 -0
- package/src/index.ts +23 -0
- package/src/node-gate.ts +15 -0
- package/src/parse.ts +246 -0
- package/src/run.ts +387 -0
- package/src/telemetry/decision.ts +101 -0
- package/src/telemetry/events.ts +147 -0
- package/src/telemetry/flush-main.ts +13 -0
- package/src/telemetry/flush.ts +143 -0
- package/src/telemetry/harness.ts +39 -0
- package/src/telemetry/index.ts +318 -0
- package/src/telemetry/store.ts +379 -0
- package/src/telemetry/timezone.ts +72 -0
- package/src/telemetry/words.ts +87 -0
- package/src/telemetry/zone-sets.ts +182 -0
- package/src/telemetry/zones.generated.ts +720 -0
- package/src/version.ts +43 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_CLI_USAGE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_CLI_USAGE
|
|
10
|
+
|
|
11
|
+
Command used wrongly. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The command line didn't fit the command's definition: a missing or extra argument, an unknown flag, a flag without its value, or a value of the wrong form (a duration, a number, JSON). Nothing ran. In `--json` mode the error is the envelope's `error`, and the exit code is 2.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Read `mostra <command> --help` (or `--help --json` for the machine-readable definition) and correct the arguments.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run `mostra <command> --help` for the command's arguments and flags, then run it again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_CONSOLE_ERROR
|
|
3
|
+
severity: error
|
|
4
|
+
phase: console
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_CONSOLE_ERROR
|
|
10
|
+
|
|
11
|
+
Error logged to the console. Severity: error. Phase: console.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The page logged an error with `console.error` while verify rendered it or used its controls. Errors caught by React error boundaries, the root's included, are logged this way. A viewer's page would log the same.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Read the message and fix its cause in the artifact's code. Errors logged by a library usually name what it was given.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Fix what the logged error describes; React logs errors its boundaries catch here too.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_CONSOLE_WARNING
|
|
3
|
+
severity: hint
|
|
4
|
+
phase: console
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_CONSOLE_WARNING
|
|
10
|
+
|
|
11
|
+
Warning logged to the console. Severity: hint. Phase: console.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The page logged a warning with `console.warn`. Warnings are often a library's advice, so they are hints.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Nothing is required.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the warning; nothing is broken by it.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_INSTALL_FAILED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_INSTALL_FAILED
|
|
10
|
+
|
|
11
|
+
Package install failed. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The package installer failed for a reason other than a missing package or the network: most often a package's lifecycle script (`preinstall`, `install`, `postinstall`) exited with an error, or a downloaded package didn't match its integrity hash. Lifecycle scripts run in an install child in the artifact's directory with the artifact's environment. The message carries the end of the installer's output.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Fix what the output names. For a failing install script, check what it needs (a compiler, a system library) or use another version of the package.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the installer's output in the message, then fix the package spec or choose another version.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_MISSING
|
|
10
|
+
|
|
11
|
+
Package not added. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The artifact imports a package that is neither in Mostra's warm set nor in the artifact's lockfile, and the host has set the dependency policy to `explicit`. Under that policy a package enters an artifact's lockfile only when it is added on purpose, so Mostra installs nothing on its own. The location points at the first import of the package, and the fix carries the exact command that adds every missing package.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run the command from the fix (`mostra add <package…> --artifact <path>`, or the host protocol method `deps/add`), then publish again. To use a package from the warm set instead, change the import.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run the `mostra add` command in this diagnostic's fix, then publish again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_NOT_FOUND
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_NOT_FOUND
|
|
10
|
+
|
|
11
|
+
Package not found. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The registry has no package by that name, or no version that matches the requested one. A spec without an exact version only matches releases at least a day old, so a package whose every release is newer than that isn't found either. The message names the package and what the registry answered.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the package name in the import or in the `mostra add` spec. To use a release less than a day old, add it at its exact version: `mostra add <package>@<version>`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the package name and version against the npm registry, then fix the import or the spec.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_OFFLINE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_OFFLINE
|
|
10
|
+
|
|
11
|
+
Package unavailable offline. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Mostra is offline (`MOSTRA_OFFLINE` is set, no network interface is up, or the registry can't be reached), and the artifact needs a package that the home's package store doesn't hold yet. Everything the store holds keeps working offline, including rebuilds of published versions. The message names the missing package.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Publish again once the registry is reachable; the package then stays in the store for later offline use. Otherwise remove the import, or use a package from the warm set.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Connect to the network and publish again, or import a package the home already holds.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_SPEC_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_SPEC_INVALID
|
|
10
|
+
|
|
11
|
+
Invalid package spec. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A package spec given to `mostra add` (`deps/add`) isn't an npm registry spec. Mostra adds packages from the registry by name, optionally with a version, a semver range or a dist-tag; scoped names such as `@scope/name@1.2.3` work too. Git URLs, local paths and tarball URLs aren't registry specs.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the spec, for example `mostra add three@0.186.1` or `mostra add @xyflow/react`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Write the spec as `name`, `name@version`, `name@range` or `name@tag`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_TIMEOUT
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_TIMEOUT
|
|
10
|
+
|
|
11
|
+
Package install timed out. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Installing the artifact's packages took longer than 300 seconds and was stopped. A slow registry, a stalled download or a lifecycle script that never ends are the usual causes. Nothing was published, and packages already in the store stay there.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Publish again; packages that finished downloading aren't fetched twice. When a package's install script hangs, use another version of the package or another package.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the network and the registry, then publish again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_DEP_WARM_CONFLICT
|
|
3
|
+
severity: error
|
|
4
|
+
phase: compile
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_DEP_WARM_CONFLICT
|
|
10
|
+
|
|
11
|
+
Warm package version requested. Severity: error. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The package is part of Mostra's warm set, which every artifact resolves at one fixed version so that React and the other shared packages exist exactly once. The requested version doesn't match the warm one, and an artifact can't replace a warm package.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Drop the version from the spec (`mostra add react`), or request a range the warm version satisfies. The message names the warm version.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Add the package without a version, or with one the warm set's version satisfies.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_BIND_FAILED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_BIND_FAILED
|
|
10
|
+
|
|
11
|
+
Gateway can't bind. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The gateway couldn't listen on the address it was given: `--bind` named an address no interface has, a wildcard bind came without `--url-host`, or the operating system refused the address. Mostra doesn't start rather than serve on an address nobody asked for.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Omit `--bind` to serve on `127.0.0.1` only (the default). For a wider bind, pass an address of one of this machine's interfaces, and with `0.0.0.0` or `::` also `--url-host <name>`, the name viewers use to reach it.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Start Mostra with an address this machine has, or without `--bind` to use the loopback address.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_BROWSER_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_BROWSER_MISSING
|
|
10
|
+
|
|
11
|
+
Browser for verify missing. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Verify renders pages in the Chromium headless shell its Playwright release pins. The runtime bundle fetches that browser when it is set up and checks every file of it (D142). It wasn't there, so verify ran only the stages that need no browser (type check, build and the field-ID scan) and reported this error. Publishing needs `--force` until it is installed.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run `bin/mostra-setup` in the runtime bundle's directory (the message names it) with network access; it fetches and checks the pinned browser. Outside a bundle, in a development checkout, run `npx playwright-core install chromium-headless-shell`. Then verify again.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run the runtime bundle's `bin/mostra-setup` (with network access) to fetch the browser verify uses, then verify again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: platform
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_BUNDLE_DOWNLOAD_FAILED
|
|
10
|
+
|
|
11
|
+
Runtime bundle download failed. Severity: error. Phase: platform.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The runtime bundle for this release and platform isn't in the local cache yet, and fetching it failed: the network or a proxy refused it, the server answered with an error, the connection stalled for 60 seconds, or the disk ran out of space while it was written. Nothing partial is kept.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Check the connection, and set `HTTPS_PROXY` (and `NO_PROXY`) when the network needs a proxy. Behind a firewall that blocks GitHub, host the release's files on a reachable server and set `MOSTRA_BUNDLE_MIRROR` to its base URL (a `file:` URL works for a local directory). Free space in the cache directory (`MOSTRA_CACHE_DIR`) if the message says the disk is full.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the network or proxy (`HTTPS_PROXY`), then run the command again: a retry starts the download over.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_BUNDLE_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: platform
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_BUNDLE_INVALID
|
|
10
|
+
|
|
11
|
+
Runtime bundle failed verification. Severity: error. Phase: platform.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Mostra checks every runtime bundle before it runs anything from it: the archive against the SHA-256 the installing package pins, then each extracted file against the bundle's own file list, and the verify browser against the bundle's browser pin. One of them differed, so the download was corrupted, changed on the way or replaced, and Mostra refused it. A bundle already installed that fails a later check (`mostra doctor --deep`) is refused the same way.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run the install again (`npm create mostra`, or the command that started it), which downloads a fresh copy. When a mirror is configured (`MOSTRA_BUNDLE_MIRROR`), check that it serves the release's files unchanged. Check a file you downloaded yourself against the release's `SHA256SUMS`, or with `gh attestation verify <file> --repo mostra-dev/mostra`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Nothing was installed; install Mostra again, and if it fails the same way, report it with the message.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_BUNDLE_UNAVAILABLE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: platform
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_BUNDLE_UNAVAILABLE
|
|
10
|
+
|
|
11
|
+
No runtime bundle available. Severity: error. Phase: platform.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Mostra runs on its own runtime bundle, found in the local cache, beside the installed package or at `MOSTRA_BUNDLE`. None was there, and no download could start: Mostra is offline (`MOSTRA_OFFLINE`), this build of the package pins no bundle for this platform, or the platform has none.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run the command once with network access and without `MOSTRA_OFFLINE`, so the pinned bundle is fetched and cached; later runs work offline. On a machine without network access, extract the release's archive for the platform and set `MOSTRA_BUNDLE` to its directory. A development checkout uses its own built runtime instead.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run this once with network access, or point `MOSTRA_BUNDLE` at an extracted bundle.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_NODE_UNSUPPORTED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: platform
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_NODE_UNSUPPORTED
|
|
10
|
+
|
|
11
|
+
Node.js too old to start Mostra. Severity: error. Phase: platform.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A `mostra` (or `npm create mostra`) installed from npm starts on the machine's Node.js only long enough to find its runtime bundle, then every Mostra process runs on the bundle's own Node.js (RT-01, D142). That start needs Node.js 22.19 or later, and this one is older, so Mostra stopped before loading anything.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Upgrade the machine's Node.js to 22.19 or later, or run Mostra without npm: download the runtime bundle for your platform from the GitHub release, check it against `SHA256SUMS`, extract it, run its `bin/mostra-setup` once, then use its `bin/mostra`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run `mostra` with Node.js 22.19 or later, or run the runtime bundle's own `bin/mostra`, which needs no Node.js.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_PORT_TAKEN
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_PORT_TAKEN
|
|
10
|
+
|
|
11
|
+
Leased port taken. Severity: warning. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The shell's port or an artifact's port is leased per home and reused across restarts, so links keep working (D62, D99). At start-up another program held the leased port, so Mostra leased a new one. Links that named the old port stop working; the shell's port changing affects every link of the home.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Mint new links with `view/url` (the publish receipt of the next publish carries the new default link too). Stop the program that took the port if you want the old links back; `mostra doctor` names it where it can.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Open the artifact through a new link: `view/url` or `mostra open` mints one on the new port.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_RUNTIME_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_RUNTIME_MISSING
|
|
10
|
+
|
|
11
|
+
Runtime not found. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The CLI starts and attaches to the home's instance through the runtime binary (`mostra-runtime`, D85). It looked, in order, for `MOSTRA_BUNDLE`, `MOSTRA_RUNTIME_BIN`, the runtime bundle it runs from, its release's pinned bundle and a development checkout's built runtime (D142), and found nothing it could run: here, `MOSTRA_RUNTIME_BIN` names a file that doesn't exist, or the runtime couldn't be started.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Unset `MOSTRA_RUNTIME_BIN` or point it at a `mostra-runtime` entry (its `dist/bin.js`), or reinstall Mostra so the CLI and its runtime are complete.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Reinstall Mostra, or set `MOSTRA_RUNTIME_BIN` to the runtime's `mostra-runtime` entry.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_SERVICE_FAILED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_SERVICE_FAILED
|
|
10
|
+
|
|
11
|
+
Login service could not be installed. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
`mostra daemon install` couldn't register the home's daemon as a login service: writing the launchd agent or systemd user unit failed, or `launchctl` or `systemctl --user` refused to load it.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Check the named file's directory permissions, and on Linux that a systemd user session is running (`systemctl --user status`). On a machine without one, start the daemon from your own login scripts with `mostra daemon start`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the message, fix what it names, and run the install again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_SHELL_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_SHELL_MISSING
|
|
10
|
+
|
|
11
|
+
Shell app missing. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Viewers open artifacts inside the shell, Mostra's trusted page, which ships with the runtime as built files. The runtime couldn't find them, which means the runtime installation is incomplete. Artifact frames are still served.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Reinstall Mostra so the runtime bundle is complete. A custom layout can point the runtime at the shell's built directory with `MOSTRA_SHELL_DIR`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Reinstall the Mostra runtime, or set `MOSTRA_SHELL_DIR` to its built shell.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_ENV_WARM_MISSING
|
|
3
|
+
severity: error
|
|
4
|
+
phase: host
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_ENV_WARM_MISSING
|
|
10
|
+
|
|
11
|
+
Warm package set missing. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Builds resolve React, Tailwind and Mostra's own client packages from the warm package set that ships with the runtime. The runtime couldn't find it, which means the runtime installation is incomplete.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Reinstall Mostra so the runtime bundle is complete. A custom layout can point the runtime at the warm set's directory with `MOSTRA_WARM_DIR`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Reinstall the Mostra runtime, or set `MOSTRA_WARM_DIR` to its warm package set.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_FIELD_CONFLICT
|
|
3
|
+
severity: error
|
|
4
|
+
phase: runtime
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_FIELD_CONFLICT
|
|
10
|
+
|
|
11
|
+
Field changed by another writer. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Every write names the revision it was based on, and a field changed after it is a conflict, never overwritten silently (D22). `window.storage` writes end with the last write: on a conflict it writes again over the newer value, a few times. When another writer kept changing the field each time, the write is refused with this code, and the field keeps the other writer's value.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Read the key again and write the new value. For a counter or a list that many viewers change at once, store each viewer's part under its own key (`votes.<viewer>`) and combine them when reading.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the value again, then write it; for a value several writers change often, give each writer a field of its own.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_FIELD_DUPLICATE_ID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: lint
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_FIELD_DUPLICATE_ID
|
|
10
|
+
|
|
11
|
+
Field ID used for two different fields. Severity: error. Phase: lint.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
One field ID is used for two different fields: with two hook kinds (`useField` and `useChoice`, say), two scopes (`viewer` and `artifact`), or initial values of two types. The two would overwrite each other's saved value. The same ID used the same way twice is a deliberately shared value and isn't reported here.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Rename one of them, for example `notes` and `notes.summary`, so each persisted value has its own ID.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Give each of these fields its own ID.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_FIELD_ID_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: runtime
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_FIELD_ID_INVALID
|
|
10
|
+
|
|
11
|
+
Invalid field ID. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Every persisted value has an explicit, stable field ID (D52). An ID is 1 to 256 characters with no control characters; dots separate the parts that nest in results (`reply.m1`), so it can't start or end with a dot or hold two in a row.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Give the field a fixed ID such as `layout` or `reply.m1` (one per message, from its ID), and keep it the same across renders and versions so drafts carry over.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Use a stable field ID of 1 to 256 characters: dot-separated parts, none empty.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_FIELD_ID_UNSTABLE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: lint
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_FIELD_ID_UNSTABLE
|
|
10
|
+
|
|
11
|
+
Field ID changes between renders. Severity: error. Phase: lint.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Verify loaded the page twice with identical inputs and a fixed clock, and a field ID differed between the two loads. A viewer's saved answer would then be lost on every reload. IDs an interaction creates, such as a new list row's, are new fields and aren't reported.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Derive the ID from something stable, for example a template with the record's ID instead of one with `Math.random()`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Build the field's ID from stable data, such as a record's ID, never from random numbers or the time.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_FIELD_MUTATION_ID_REUSED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: runtime
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_FIELD_MUTATION_ID_REUSED
|
|
10
|
+
|
|
11
|
+
Mutation ID reused. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A mutation ID identifies one change, so a retry after a timeout replays its recorded result (IN-01). This ID was already used for a change with other contents or another target. Mostra refuses it rather than answer with the result of a change nobody sent now.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Create a fresh `mut_` ID for each change and reuse an ID only to retry exactly the same change.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Generate a new mutation ID for every new change.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_FIELD_SHARED
|
|
3
|
+
severity: hint
|
|
4
|
+
phase: lint
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from packages/protocol/src/diagnostics/codes by `node tools/docs/diagnostics.ts write`. Edit the area file, not this page. -->
|
|
8
|
+
|
|
9
|
+
# MOSTRA_FIELD_SHARED
|
|
10
|
+
|
|
11
|
+
Field ID shared by several controls. Severity: hint. Phase: lint.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Several mounted components use one field ID in the same way, so they all edit one saved value. That is how a value is shared deliberately; in a list, it can also mean every row edits the same answer.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
If each row should keep its own answer, include the row's identity in the ID, such as a template that adds the task's ID after `done.`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Nothing to fix if these controls are meant to edit one value; give each its own ID if not.
|