@monosmith/plugin-sdk 2.0.0-beta.6 → 2.0.0-beta.8

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": "2.0.0-beta.6",
3
+ "version": "2.0.0-beta.8",
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",
@@ -2044,6 +2044,17 @@ export const protocolSchema = {
2044
2044
  "tag": {
2045
2045
  "type": "string",
2046
2046
  "description": "Tag is the name of the release channel the version belongs to (npm's dist-tag \"beta\"). When set, the plugin publishes under it and leaves the registry's stable pointer where it is, or ignores it when its registry has no such pointer. Only sent to a plugin with the channels capability."
2047
+ },
2048
+ "propagationWait": {
2049
+ "type": "string",
2050
+ "description": "PropagationWait is the longest time a plugin waits, in a Finalize call, for the packages of the release to be fetchable from the registry: a duration such as \"15m\", \"0\" to not wait. Empty means the default. Only npm has such a wait. A publish never waits."
2051
+ },
2052
+ "finalize": {
2053
+ "type": "array",
2054
+ "items": {
2055
+ "$ref": "#/$defs/TagMove"
2056
+ },
2057
+ "description": "Finalize turns the call into the last phase of a release: nothing is published; for each move the plugin waits until its packages are fetchable, then moves the dist-tag. The host sends it after every project has published, so a wait never blocks another publish."
2047
2058
  }
2048
2059
  },
2049
2060
  "required": [
@@ -2071,6 +2082,20 @@ export const protocolSchema = {
2071
2082
  },
2072
2083
  "description": "Notes are things the person must know about a publish that succeeded, such as a dist-tag that was not moved; the host prints them and the report keeps them."
2073
2084
  },
2085
+ "pendingMoves": {
2086
+ "type": "array",
2087
+ "items": {
2088
+ "$ref": "#/$defs/TagMove"
2089
+ },
2090
+ "description": "PendingMoves are the dist-tags the call did not move, because the packages the release needs were not fetchable yet. A publish returns them for the host to move at the end of the release; a Finalize call returns the ones still waiting when its time ran out. The release then ends with a warning, never silently."
2091
+ },
2092
+ "moved": {
2093
+ "type": "array",
2094
+ "items": {
2095
+ "type": "string"
2096
+ },
2097
+ "description": "Moved names the dist-tags a Finalize call moved (\"name@version tag\")."
2098
+ },
2074
2099
  "assets": {
2075
2100
  "type": "array",
2076
2101
  "items": {
@@ -2479,6 +2504,36 @@ export const protocolSchema = {
2479
2504
  "blocking"
2480
2505
  ]
2481
2506
  },
2507
+ "TagMove": {
2508
+ "description": "TagMove is a dist-tag a publish left where it was, because the packages the release needs were not fetchable yet.",
2509
+ "type": "object",
2510
+ "properties": {
2511
+ "package": {
2512
+ "type": "string",
2513
+ "description": "Package and Version name the package that carries the tag."
2514
+ },
2515
+ "version": {
2516
+ "type": "string"
2517
+ },
2518
+ "tag": {
2519
+ "type": "string",
2520
+ "description": "Tag is the dist-tag to move to Version."
2521
+ },
2522
+ "awaits": {
2523
+ "type": "array",
2524
+ "items": {
2525
+ "type": "string"
2526
+ },
2527
+ "description": "Awaits are the packages that must be fetchable first."
2528
+ }
2529
+ },
2530
+ "required": [
2531
+ "package",
2532
+ "version",
2533
+ "tag",
2534
+ "awaits"
2535
+ ]
2536
+ },
2482
2537
  "Task": {
2483
2538
  "description": "Task is a command the host can run, hash and cache.",
2484
2539
  "type": "object",
@@ -1091,6 +1091,18 @@ export interface PublishParams {
1091
1091
  * capability.
1092
1092
  */
1093
1093
  tag?: string;
1094
+ /**
1095
+ * PropagationWait is the longest time a plugin waits, in a Finalize call, for the packages of the
1096
+ * release to be fetchable from the registry: a duration such as "15m", "0" to not wait. Empty
1097
+ * means the default. Only npm has such a wait. A publish never waits.
1098
+ */
1099
+ propagationWait?: string;
1100
+ /**
1101
+ * Finalize turns the call into the last phase of a release: nothing is published; for each move
1102
+ * the plugin waits until its packages are fetchable, then moves the dist-tag. The host sends it
1103
+ * after every project has published, so a wait never blocks another publish.
1104
+ */
1105
+ finalize?: TagMove[];
1094
1106
  }
1095
1107
  /**
1096
1108
  * PublishResult reports what happened. Skipped with a reason is a success: an already-published
@@ -1105,6 +1117,15 @@ export interface PublishResult {
1105
1117
  * was not moved; the host prints them and the report keeps them.
1106
1118
  */
1107
1119
  notes?: string[];
1120
+ /**
1121
+ * PendingMoves are the dist-tags the call did not move, because the packages the release needs
1122
+ * were not fetchable yet. A publish returns them for the host to move at the end of the release;
1123
+ * a Finalize call returns the ones still waiting when its time ran out. The release then ends
1124
+ * with a warning, never silently.
1125
+ */
1126
+ pendingMoves?: TagMove[];
1127
+ /** Moved names the dist-tags a Finalize call moved ("name@version tag"). */
1128
+ moved?: string[];
1108
1129
  /**
1109
1130
  * Assets are the workspace-relative files built for the release, in upload order; in a dry run,
1110
1131
  * the files that would be built.
@@ -1308,6 +1329,19 @@ export interface Step {
1308
1329
  */
1309
1330
  cacheFiles?: string[];
1310
1331
  }
1332
+ /**
1333
+ * TagMove is a dist-tag a publish left where it was, because the packages the release needs were
1334
+ * not fetchable yet.
1335
+ */
1336
+ export interface TagMove {
1337
+ /** Package and Version name the package that carries the tag. */
1338
+ package: string;
1339
+ version: string;
1340
+ /** Tag is the dist-tag to move to Version. */
1341
+ tag: string;
1342
+ /** Awaits are the packages that must be fetchable first. */
1343
+ awaits: string[];
1344
+ }
1311
1345
  /** Task is a command the host can run, hash and cache. */
1312
1346
  export interface Task {
1313
1347
  /** Command is an argv array; it is never passed through a shell. */