@monosmith/plugin-sdk 0.8.0 → 0.9.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monosmith/plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The TypeScript SDK for writing smith plugins: the protocol's types, the serve loop, a test host, the conformance checks, templating and key-order-keeping JSON editing. No runtime dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -2612,6 +2612,10 @@ export const protocolSchema = {
|
|
|
2612
2612
|
},
|
|
2613
2613
|
"description": "Ship names what the task makes in a tool's work folder that the project ships: globs relative to the project root (\"../../dist/cargo/debug/api\"). After the task succeeds, smith hard-links each match into the project's shipped folder (ProjectBuildDir), a folder file by file, under its base name, and copies a file it cannot link. A glob that matches nothing is skipped. Such a task lists the shipped folder in Outputs, never the tool's work folder: a cache restore empties each output folder first."
|
|
2614
2614
|
},
|
|
2615
|
+
"release": {
|
|
2616
|
+
"$ref": "#/$defs/TaskProfile",
|
|
2617
|
+
"description": "Release is the task as `smith run --release` runs it: the command of the optimised profile (\"cargo build --release\") and what that profile ships. Nil means the task has one profile and runs the same way with the flag. The cache key holds the command, so each profile has its own cache entry."
|
|
2618
|
+
},
|
|
2615
2619
|
"dependsOn": {
|
|
2616
2620
|
"type": "array",
|
|
2617
2621
|
"items": {
|
|
@@ -2647,6 +2651,29 @@ export const protocolSchema = {
|
|
|
2647
2651
|
"command"
|
|
2648
2652
|
]
|
|
2649
2653
|
},
|
|
2654
|
+
"TaskProfile": {
|
|
2655
|
+
"description": "TaskProfile is another build profile of a task: the command that builds it and what it ships (see Task.Ship).",
|
|
2656
|
+
"type": "object",
|
|
2657
|
+
"properties": {
|
|
2658
|
+
"command": {
|
|
2659
|
+
"type": "array",
|
|
2660
|
+
"items": {
|
|
2661
|
+
"type": "string"
|
|
2662
|
+
},
|
|
2663
|
+
"description": "Command is an argv array; it is never passed through a shell."
|
|
2664
|
+
},
|
|
2665
|
+
"ship": {
|
|
2666
|
+
"type": "array",
|
|
2667
|
+
"items": {
|
|
2668
|
+
"type": "string"
|
|
2669
|
+
},
|
|
2670
|
+
"description": "Ship names what this profile makes in a tool's work folder that the project ships, as Task.Ship does. Empty means the task ships nothing."
|
|
2671
|
+
}
|
|
2672
|
+
},
|
|
2673
|
+
"required": [
|
|
2674
|
+
"command"
|
|
2675
|
+
]
|
|
2676
|
+
},
|
|
2650
2677
|
"ToolInstall": {
|
|
2651
2678
|
"description": "ToolInstall is one way to get a tool with a package manager. Manager is one of: \"winget\", \"brew\", \"brew-cask\", \"apt\", \"dnf\", \"pacman\", \"npm\", \"uv\", \"fnm\", \"rustup\", \"cargo\" and \"go\" (go install, for a tool published as a Go module). The host builds the exact command from the manager and Package; Package may hold {major}, {major.minor} and {version} (the whole version), which the pinned or suggested version fills. The language's own installers (uv, fnm, rustup, cargo) are offered only when they are already on the machine.",
|
|
2652
2679
|
"type": "object",
|
|
@@ -1417,6 +1417,13 @@ export interface Task {
|
|
|
1417
1417
|
* each output folder first.
|
|
1418
1418
|
*/
|
|
1419
1419
|
ship?: string[];
|
|
1420
|
+
/**
|
|
1421
|
+
* Release is the task as `smith run --release` runs it: the command of the optimised profile
|
|
1422
|
+
* ("cargo build --release") and what that profile ships. Nil means the task has one profile and
|
|
1423
|
+
* runs the same way with the flag. The cache key holds the command, so each profile has its own
|
|
1424
|
+
* cache entry.
|
|
1425
|
+
*/
|
|
1426
|
+
release?: TaskProfile;
|
|
1420
1427
|
/**
|
|
1421
1428
|
* DependsOn lists task names: "build" runs this project's build first, "^build" runs the build of
|
|
1422
1429
|
* every project this one imports first.
|
|
@@ -1446,6 +1453,19 @@ export interface Task {
|
|
|
1446
1453
|
/** ServeTimeout is how long to wait for ServeURL, as a Go duration ("60s"); empty means 60s. */
|
|
1447
1454
|
serveTimeout?: string;
|
|
1448
1455
|
}
|
|
1456
|
+
/**
|
|
1457
|
+
* TaskProfile is another build profile of a task: the command that builds it and what it ships (see
|
|
1458
|
+
* Task.Ship).
|
|
1459
|
+
*/
|
|
1460
|
+
export interface TaskProfile {
|
|
1461
|
+
/** Command is an argv array; it is never passed through a shell. */
|
|
1462
|
+
command: string[];
|
|
1463
|
+
/**
|
|
1464
|
+
* Ship names what this profile makes in a tool's work folder that the project ships, as Task.Ship
|
|
1465
|
+
* does. Empty means the task ships nothing.
|
|
1466
|
+
*/
|
|
1467
|
+
ship?: string[];
|
|
1468
|
+
}
|
|
1449
1469
|
/**
|
|
1450
1470
|
* ToolInstall is one way to get a tool with a package manager. Manager is one of: "winget", "brew",
|
|
1451
1471
|
* "brew-cask", "apt", "dnf", "pacman", "npm", "uv", "fnm", "rustup", "cargo" and "go" (go install,
|