@mostra/cli 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +2 -2
- package/dist/{bootstrap-3_Tdfdg7.js → bootstrap-CYgyuZFk.js} +8 -4
- package/dist/bootstrap-CYgyuZFk.js.map +1 -0
- package/dist/bootstrap-DHnt5zU_.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/reference/cli.md +147 -5
- package/dist/reference/diagnostics.json +234 -0
- package/dist/reference/errors/MOSTRA_LICENSE_ACCEPT_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_LICENSE_MISMATCH.md +23 -0
- package/dist/reference/errors/MOSTRA_LICENSE_UNACCEPTED.md +23 -0
- package/dist/reference/errors/MOSTRA_LICENSE_UNDECLARED.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_ADDRESS_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_CSS_UNIMPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_FETCH_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_FILE_EXISTS.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_ITEM_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_ITEM_NOT_FOUND.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_NOT_APPLIED.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_OFFLINE.md +23 -0
- package/dist/reference/errors/MOSTRA_PACK_TARGET_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_CONFLICT.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_CONTRACT_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_ENTRY_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_EXPORTER_UNKNOWN.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_FAILED.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_MANIFEST_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_MANIFEST_WARNING.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_NOT_A_PLUGIN.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_NOT_INSTALLED.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_OPTIONS_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_PLATFORM_UNSUPPORTED.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_SCOPE_INVALID.md +23 -0
- package/dist/reference/errors/MOSTRA_PLUGIN_SHADOWED.md +23 -0
- package/dist/{run-CtR0PFMj.js → run-BsUzIBQj.js} +437 -29
- package/dist/run-BsUzIBQj.js.map +1 -0
- package/dist/run-c8U3GkBy.js +1 -0
- package/dist/skill/SKILL.md +4 -2
- package/dist/skill/references/mcp.md +2 -2
- package/dist/skill/references/plugins.md +51 -0
- package/package.json +7 -5
- package/src/command.ts +2 -0
- package/src/commands/authoring.ts +129 -18
- package/src/commands/index.ts +14 -3
- package/src/commands/plugins.ts +219 -0
- package/src/exit.ts +7 -0
- package/src/plugin-commands.ts +170 -0
- package/src/run.ts +64 -4
- package/dist/bootstrap-3_Tdfdg7.js.map +0 -1
- package/dist/bootstrap-C9a2gSWf.js +0 -1
- package/dist/run-CtR0PFMj.js.map +0 -1
- package/dist/run-NWeQcyh9.js +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_LICENSE_ACCEPT_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_LICENSE_ACCEPT_INVALID
|
|
10
|
+
|
|
11
|
+
Accepted license not understood. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A value of `--accept-license` (or of the host's `licenses.accept`) is neither an SPDX license ID, nor a `LicenseRef-` reference, nor `*`.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Copy the ID from the `MOSTRA_LICENSE_UNACCEPTED` diagnostic that asked for it.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Pass a license ID such as LicenseRef-Remotion, or * for every license.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_LICENSE_MISMATCH
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: manifest
|
|
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_LICENSE_MISMATCH
|
|
10
|
+
|
|
11
|
+
Declared license differs. Severity: warning. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The manifest declares a license for a package (in `bundledLicenses`, or its own `license`) that differs from the license field the package itself carries. Mostra discloses the package's own field, which it can read, and uses a declaration only where the field can't be read.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the declaration, or the package's license field if the declaration is right.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Make the manifest's declaration match the package's own license field.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_LICENSE_UNACCEPTED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: contract
|
|
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_LICENSE_UNACCEPTED
|
|
10
|
+
|
|
11
|
+
License needs acknowledgment. Severity: error. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The install brings a license that isn't OSI-approved and isn't a public-domain dedication or another free license: a source-available or proprietary license, or one Mostra can't read. Such a license is accepted once per artifact (or for the home), by `--accept-license <id>` or by the host's policy, and the lockfile records it (D31). This is disclosure, not a limit: anyone may accept, and nothing was installed or recorded before they do. The message names each license, its class and the packages under it.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Read the license's terms (the message gives its summary and URL when the plugin declares them), then add the plugin again with `--accept-license <id>` for each ID, as the fix shows.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the license the message names, then run the command in this diagnostic's fix to accept it.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_LICENSE_UNDECLARED
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: manifest
|
|
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_LICENSE_UNDECLARED
|
|
10
|
+
|
|
11
|
+
Dependency license not declared. Severity: warning. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A package the plugin brings has a license that needs an acknowledgment, and the manifest's `bundledLicenses` doesn't declare it, so the person installing sees only the package's own license field. Mostra still finds and discloses it from the installed packages.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Add `{ "package": "<name>", "license": "<expression>", "summary": "…", "url": "…" }` to `bundledLicenses`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Declare the license in the plugin manifest's bundledLicenses, with a summary and a URL.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_ADDRESS_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_PACK_ADDRESS_INVALID
|
|
10
|
+
|
|
11
|
+
Item address not understood. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
`mostra add` reads an item address in shadcn's forms: an `https:` URL of an item's JSON, a path to a local `.json` item, a GitHub item (`owner/repo/item[#ref]`), or `@namespace/item` resolved through the `registries` of the artifact's `components.json`. A bare name in an item's `registryDependencies` means shadcn's own registry. This address is none of those, or names a namespace the artifact doesn't register, or a plain `http:` URL to another machine.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the address, or add the namespace to `registries` in the artifact's `components.json` (`"@acme": "https://registry.acme.com/r/{name}.json"`).
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Use an item URL, a local .json item, owner/repo/item for GitHub, or an @namespace/item your components.json registers.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_CSS_UNIMPORTED
|
|
3
|
+
severity: warning
|
|
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_PACK_CSS_UNIMPORTED
|
|
10
|
+
|
|
11
|
+
Item CSS not imported. Severity: warning. Phase: compile.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The item brings CSS variables or rules, which Mostra wrote into a stylesheet of the artifact, but the artifact's entry doesn't import that stylesheet, so the page doesn't load them yet. Mostra writes into the stylesheet the entry imports when there is one (or the one `components.json` names), and creates `styles.css` otherwise.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Add `import "./styles.css";` (the path the message names) to the artifact's entry, after any other stylesheet.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Import the stylesheet this diagnostic names from the artifact's entry.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_FETCH_FAILED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: network
|
|
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_PACK_FETCH_FAILED
|
|
10
|
+
|
|
11
|
+
Registry item couldn't be read. Severity: error. Phase: network.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Reading the item failed: the registry couldn't be reached, answered an error other than 404, sent more than 8 MiB, took longer than 30 s, or redirected to an address Mostra doesn't follow. Nothing was written.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run the command again once the registry answers. Behind a proxy, set `HTTPS_PROXY` for the Mostra daemon.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the network and the registry, then run the command again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_FILE_EXISTS
|
|
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_PACK_FILE_EXISTS
|
|
10
|
+
|
|
11
|
+
File already exists. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The artifact already has files where the item writes, with other content. Mostra never replaces an artifact's file without being asked, as shadcn asks before it overwrites; nothing was written.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Add `--overwrite` to replace them (`mostra add <item> --artifact <path> --overwrite`), or rename your files and add the item again.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Run the command again with `--overwrite` to replace the files the message lists, or move them first.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_ITEM_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: manifest
|
|
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_PACK_ITEM_INVALID
|
|
10
|
+
|
|
11
|
+
Registry item invalid. Severity: error. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The item isn't a shadcn registry item Mostra can install: it isn't JSON, misses `name` or `type`, a file has no `path`, a `registry:file` or `registry:page` has no `target`, a file has neither `content` nor a path its registry holds, or the `mostra` block has a wrong value. Every field shadcn's schema allows is accepted, and unknown keys are kept.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the item (its JSON Schema is `https://ui.shadcn.com/schema/registry-item.json`, plus the `mostra` block in `@mostra/protocol/schemas/plugin-manifest.schema.json`).
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Fix the field this diagnostic names in the item's JSON.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_ITEM_NOT_FOUND
|
|
3
|
+
severity: error
|
|
4
|
+
phase: network
|
|
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_PACK_ITEM_NOT_FOUND
|
|
10
|
+
|
|
11
|
+
Registry item not found. Severity: error. Phase: network.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The registry answered that the item doesn't exist (HTTP 404), the local file isn't there, or a GitHub repository's root `registry.json` has no item by that name. The message names the address and where Mostra looked.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the address. For a GitHub item, `owner/repo/item` names an item of the repository's root `registry.json`, at its default branch unless `#ref` says otherwise.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the address; for a GitHub item, check the repository's registry.json and the ref.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_NOT_APPLIED
|
|
3
|
+
severity: hint
|
|
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_PACK_NOT_APPLIED
|
|
10
|
+
|
|
11
|
+
Item part not applied. Severity: hint. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The item asks for something an artifact doesn't have: environment variables (`envVars`; server code reads secrets with `secret()`, set by `mostra secret set`), a Tailwind 3 configuration (`tailwind.config`; Tailwind 4 reads `cssVars.theme`), a font through `next/font`, or a design-system configuration (`registry:base`, `registry:style`). Mostra installs the rest and lists these.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Set the secrets the item's server code needs with `mostra secret set NAME`, and move any Tailwind 3 theme into the item's `cssVars.theme` or your stylesheet's `@theme`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read what the item asked for and apply it yourself if the artifact needs it.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_OFFLINE
|
|
3
|
+
severity: error
|
|
4
|
+
phase: network
|
|
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_PACK_OFFLINE
|
|
10
|
+
|
|
11
|
+
Registry item unavailable offline. Severity: error. Phase: network.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Mostra is offline (`MOSTRA_OFFLINE` is set, or no network interface is up), and the item, or one of its registry dependencies, is on a remote registry. Nothing was written.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run the command again with the network up, or download the item and add it from its file: `mostra add ./item.json --artifact <path>`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Connect to the network, or add the item from a local .json file.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PACK_TARGET_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_PACK_TARGET_INVALID
|
|
10
|
+
|
|
11
|
+
Item file outside the artifact. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A file of the item would land outside the artifact's directory (`../`, an absolute path), on a name not every system can hold (`<>:"|?*`, a Windows device name, a trailing dot or space), on Mostra's own files, or on two names that differ only in case. Nothing was written.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Use a corrected item, or copy the files you need into the artifact yourself.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Ask the item's author to fix its target; Mostra writes an item's files only inside the artifact.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_CONFLICT
|
|
3
|
+
severity: error
|
|
4
|
+
phase: contract
|
|
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_PLUGIN_CONFLICT
|
|
10
|
+
|
|
11
|
+
Plugins contribute the same ID. Severity: error. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Two plugins of one artifact, or one of the artifact's and one of the home's, contribute the same ID to the same contract (two exporters `pdf`, two commands `term record`), or a plugin takes an ID Mostra builds in (the exporters `static`, `html`, `bundle` and `snapshot`). Nothing is overridden silently (ROUND-3 §6.4): the message names both sides.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Remove one plugin with `mostra plugin remove <package> --artifact <path>` (or `--global`), then add the other again if needed.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Remove one of the two plugins the message names, or use releases whose IDs differ.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_CONTRACT_UNSUPPORTED
|
|
3
|
+
severity: error
|
|
4
|
+
phase: contract
|
|
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_PLUGIN_CONTRACT_UNSUPPORTED
|
|
10
|
+
|
|
11
|
+
Contract version not implemented. Severity: error. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The plugin declares a contract range, or carries a definition stamped with a contract version, that this Mostra release doesn't serve. Each extension contract is its own package with its own version (D30): within a line changes are additive, so Mostra serves stamps of its line up to the version it implements, and a range must admit that version. The message names the contract, the plugin's range or stamp, and the version this release implements. Mostra reports it when the plugin is added, and when `verify` or `publish` loads it, so an artifact whose plugin a newer runtime no longer serves is told before it is published.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Add a release of the plugin whose range admits the version the message names (`mostra plugin add <package>@<version> --artifact <path>`), or run a Mostra release that implements the plugin's contract version, or remove the plugin with `mostra plugin remove`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Install a version of the plugin built for this Mostra's contracts, or update Mostra.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_ENTRY_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: contract
|
|
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_PLUGIN_ENTRY_INVALID
|
|
10
|
+
|
|
11
|
+
Plugin entry doesn't load. Severity: error. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A contribution's `entry` module is missing from the package, leaves it, failed to load, or doesn't export (at `export`, `default` when absent) a definition stamped by the contract's blueprint (`defineExporter`, `defineCliCommand` …) with the ID the manifest gives. Mostra reads the stamp from the loaded object itself, in a child process of the instance, so a manifest alone can't claim a contract. Contributions that run in the page (embed engines, anchor providers) are checked when the page uses them.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Build the plugin so the module exists, export the value its `define*` function returns, and keep the manifest's ID equal to the definition's. Then run `mostra plugin validate <dir>`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Fix the module the message names so it exports the definition its contract's define function returns.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_EXPORTER_UNKNOWN
|
|
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_PLUGIN_EXPORTER_UNKNOWN
|
|
10
|
+
|
|
11
|
+
No such exporter. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
`mostra export <artifact> --as <id> --out <path>` names an exporter that neither Mostra builds in nor any plugin of the artifact or the home contributes. The message lists every exporter available for the artifact.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Pick an exporter from the list, or install a plugin that contributes it: `mostra plugin add <package> --artifact <path>`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Use one of the exporters the message lists, or add a plugin that contributes this one.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_FAILED
|
|
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_PLUGIN_FAILED
|
|
10
|
+
|
|
11
|
+
Plugin failed. Severity: error. Phase: runtime.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A plugin's contribution threw, returned something its contract doesn't allow (a file outside the export, a result that isn't JSON), or ran past its time limit while Mostra ran it. It runs in a child process of the instance, so the instance and other artifacts are unaffected; nothing it returned was kept.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Fix the contribution if it is your plugin; otherwise update or remove it (`mostra plugin remove`).
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Read the plugin's error in the message and report it to the plugin's author if it isn't yours to fix.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_MANIFEST_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: manifest
|
|
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_PLUGIN_MANIFEST_INVALID
|
|
10
|
+
|
|
11
|
+
Plugin manifest invalid. Severity: error. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
A field of the plugin's manifest, the `"mostra"` key of its `package.json`, isn't one Mostra can load: a required field is missing, a value has the wrong form, a contribution kind has no contract range, an ID is contributed twice, a command would take one of `mostra`'s own words, or a license isn't an SPDX expression. The location points at the field, and `mostra plugin validate` reports every one at once.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the field (the message says what it expects) and validate again. The manifest's shape is published as JSON Schema in `@mostra/protocol/schemas/plugin-manifest.schema.json`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Fix the field this diagnostic names in the plugin's package.json, then run `mostra plugin validate` again.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_MANIFEST_WARNING
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: manifest
|
|
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_PLUGIN_MANIFEST_WARNING
|
|
10
|
+
|
|
11
|
+
Plugin manifest questionable. Severity: warning. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The plugin's manifest has something this Mostra release loads around: a key it doesn't know, an effect or a system it doesn't know, or a contract declared with nothing contributed to it. Manifests grow additively, so a newer plugin may carry keys an older Mostra skips; a misspelled key is skipped the same way, which can leave a contribution or a license undeclared.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Correct the field if it is a mistake. If it is something a newer Mostra reads, nothing is needed.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the field this diagnostic names; Mostra loads the plugin and ignores what it doesn't know.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_NOT_A_PLUGIN
|
|
3
|
+
severity: error
|
|
4
|
+
phase: manifest
|
|
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_PLUGIN_NOT_A_PLUGIN
|
|
10
|
+
|
|
11
|
+
Not a Mostra plugin. Severity: error. Phase: manifest.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The package has no `"mostra"` key in its `package.json`, so it contributes nothing Mostra could load. `mostra plugin add` installs only plugins; ordinary npm packages go through `mostra add`.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run `mostra add <package> --artifact <path>` for an ordinary package. For a plugin you write, add the manifest (`mostra docs guide/plugins`) and run `mostra plugin validate`.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Add the package with `mostra add` if it is an ordinary package, or give it a "mostra" manifest if it is a plugin.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_NOT_INSTALLED
|
|
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_PLUGIN_NOT_INSTALLED
|
|
10
|
+
|
|
11
|
+
Plugin not installed. Severity: error. Phase: host.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The package isn't one of the plugins of the artifact (or of the home) the call names, so there is nothing to remove.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
List the scope's plugins with `mostra plugin list --artifact <path>` (or `--global`) and use a name from it.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Check the package name against `mostra plugin list`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_OPTIONS_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: contract
|
|
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_PLUGIN_OPTIONS_INVALID
|
|
10
|
+
|
|
11
|
+
Exporter options invalid. Severity: error. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The options given to a plugin's exporter don't fit the JSON Schema its definition declares (`options`), or it declares none and was given some. Mostra checks them in the plugin's child before the exporter runs, so nothing was exported.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Read the exporter's options in its plugin's documentation (`mostra plugin list` names the plugin), and run `mostra export <artifact> --as <exporter> --out <path> --option name=value` with them. A value that reads as JSON (`3`, `true`, `["a"]`) is passed as that value, anything else as text.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Give the options the exporter's schema asks for, each as `--option name=value`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_PLATFORM_UNSUPPORTED
|
|
3
|
+
severity: warning
|
|
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_PLUGIN_PLATFORM_UNSUPPORTED
|
|
10
|
+
|
|
11
|
+
Plugin doesn't name this system. Severity: warning. Phase: platform.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
The plugin's manifest lists the systems it runs on (`platforms`), and this one isn't among them. Mostra installs it anyway (it adds no capability limits), and says so, since its exporters, checks, connectors or commands may fail here.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Use the plugin on a system it lists, or ask its author to support this one.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Expect the plugin's Node.js parts to fail here, or use a plugin that supports this system.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_SCOPE_INVALID
|
|
3
|
+
severity: error
|
|
4
|
+
phase: contract
|
|
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_PLUGIN_SCOPE_INVALID
|
|
10
|
+
|
|
11
|
+
Plugin can't be installed there. Severity: error. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
Plugins are installed for one artifact (recorded in its lockfile, part of its versions) or, when they contribute only exporters and CLI commands, for the whole home (ROUND-3 §6.4). This plugin contributes something that changes what an artifact's version is (an embed engine, a verify check, an anchor provider, a connector or a pack), so it can't be installed for the home; or the call named both scopes or neither.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Run `mostra plugin add <package> --artifact <path>` for each artifact that uses it.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Install the plugin for an artifact with `--artifact`, or pass exactly one of `--artifact` and `--global`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: MOSTRA_PLUGIN_SHADOWED
|
|
3
|
+
severity: warning
|
|
4
|
+
phase: contract
|
|
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_PLUGIN_SHADOWED
|
|
10
|
+
|
|
11
|
+
Plugin contribution shadowed. Severity: warning. Phase: contract.
|
|
12
|
+
|
|
13
|
+
## What it means
|
|
14
|
+
|
|
15
|
+
An artifact's plugin and one of the home's (`--global`) contribute the same exporter or CLI command. Nothing is refused: in this artifact its own plugin's contribution is used, and the home's everywhere else. A home install never breaks an artifact that worked.
|
|
16
|
+
|
|
17
|
+
## How to fix it
|
|
18
|
+
|
|
19
|
+
Nothing is needed when the artifact's own contribution is the one it should use. Otherwise remove it from the artifact (`mostra plugin remove <package> --artifact <path>`), and the home's is used.
|
|
20
|
+
|
|
21
|
+
## Hint
|
|
22
|
+
|
|
23
|
+
Remove one of the two plugins if the artifact should use the other's contribution.
|