@sanity/workflow-cli 0.12.0 → 0.13.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/CHANGELOG.md +36 -0
- package/README.md +45 -26
- package/dist/commands/{abort.d.ts → editorial-workflows/abort.d.ts} +3 -2
- package/dist/commands/{abort.js → editorial-workflows/abort.js} +7 -6
- package/dist/commands/{definition → editorial-workflows/definition}/delete.d.ts +3 -2
- package/dist/commands/{definition → editorial-workflows/definition}/delete.js +6 -5
- package/dist/commands/{definition → editorial-workflows/definition}/diff.d.ts +2 -1
- package/dist/commands/{definition → editorial-workflows/definition}/diff.js +7 -6
- package/dist/commands/{definition → editorial-workflows/definition}/list.d.ts +2 -1
- package/dist/commands/{definition → editorial-workflows/definition}/list.js +21 -21
- package/dist/commands/{definition → editorial-workflows/definition}/show.d.ts +3 -2
- package/dist/commands/{definition → editorial-workflows/definition}/show.js +7 -6
- package/dist/commands/{deploy.d.ts → editorial-workflows/deploy.d.ts} +2 -1
- package/dist/commands/{deploy.js → editorial-workflows/deploy.js} +14 -13
- package/dist/commands/{diagnose.d.ts → editorial-workflows/diagnose.d.ts} +2 -1
- package/dist/commands/{diagnose.js → editorial-workflows/diagnose.js} +7 -6
- package/dist/commands/{fire-action.d.ts → editorial-workflows/fire-action.d.ts} +3 -2
- package/dist/commands/{fire-action.js → editorial-workflows/fire-action.js} +8 -7
- package/dist/commands/{list.d.ts → editorial-workflows/list.d.ts} +2 -1
- package/dist/commands/{list.js → editorial-workflows/list.js} +24 -24
- package/dist/commands/{nuke.d.ts → editorial-workflows/nuke.d.ts} +2 -1
- package/dist/commands/{nuke.js → editorial-workflows/nuke.js} +10 -9
- package/dist/commands/{reset-activity.d.ts → editorial-workflows/reset-activity.d.ts} +2 -1
- package/dist/commands/{reset-activity.js → editorial-workflows/reset-activity.js} +2 -1
- package/dist/commands/{set-stage.d.ts → editorial-workflows/set-stage.d.ts} +4 -3
- package/dist/commands/{set-stage.js → editorial-workflows/set-stage.js} +6 -5
- package/dist/commands/{show.d.ts → editorial-workflows/show.d.ts} +2 -1
- package/dist/commands/{show.js → editorial-workflows/show.js} +40 -26
- package/dist/commands/{start.d.ts → editorial-workflows/start.d.ts} +3 -2
- package/dist/commands/{start.js → editorial-workflows/start.js} +9 -8
- package/dist/commands/{tail.d.ts → editorial-workflows/tail.d.ts} +2 -1
- package/dist/commands/{tail.js → editorial-workflows/tail.js} +6 -5
- package/dist/hooks/finally/telemetry.js +2 -2
- package/dist/hooks/prerun/telemetry.d.ts +4 -3
- package/dist/lib/base-command.d.ts +4 -6
- package/dist/lib/base-command.js +6 -0
- package/dist/lib/flags.d.ts +4 -3
- package/dist/lib/prompt.d.ts +3 -2
- package/dist/lib/select-deployment.d.ts +12 -7
- package/dist/lib/select-deployment.js +26 -1
- package/dist/lib/share-definitions.d.ts +23 -28
- package/dist/lib/share-definitions.js +26 -38
- package/dist/lib/telemetry-setup.d.ts +2 -2
- package/dist/lib/telemetry.d.ts +18 -10
- package/dist/lib/telemetry.js +5 -2
- package/dist/lib/ui.d.ts +12 -0
- package/dist/lib/ui.js +9 -0
- package/oclif.manifest.json +93 -48
- package/package.json +11 -9
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { styleText } from 'node:util';
|
|
2
2
|
import { getUserConfig } from '@sanity/cli-core';
|
|
3
|
-
import {
|
|
4
|
-
import { assertReadableModel, definitionDeployedData, errorMessage, isTelemetryEnvDenied, } from '@sanity/workflow-engine';
|
|
3
|
+
import { assertReadableModel, definitionDeployedData, errorMessage, } from '@sanity/workflow-engine';
|
|
5
4
|
import { buildDefinitionShowQuery } from "./definitions.js";
|
|
6
5
|
import { canPromptOnStderr } from "./prompt.js";
|
|
7
6
|
import { cliTelemetry, WorkflowDefinitionShared, WorkflowDefinitionSharingDecided, } from "./telemetry.js";
|
|
8
7
|
export const SHARE_ENDPOINT_URI = '/workflow/definition-feedback';
|
|
9
8
|
const SHARE_TAG = 'definition.share';
|
|
10
9
|
const SHARE_DECISION_KEY = 'workflowCliDefinitionSharing';
|
|
11
|
-
export const
|
|
10
|
+
export const SHARE_FIRST_RUN_NOTICE = `${styleText('bold', 'Sharing new workflow definitions with Sanity')} to improve Editorial Workflows.\n` +
|
|
12
11
|
'They are sent verbatim (structure, names, filters, effect configuration,\n' +
|
|
13
|
-
'seeded values) with their deployment coordinates, and kept
|
|
14
|
-
'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
'seeded values) with their deployment coordinates, and kept — never your\n' +
|
|
13
|
+
'content documents, workflow instances, or Sanity auth token. This notice is\n' +
|
|
14
|
+
`shown once on this machine; opt out of any run with ${styleText('cyan', '--no-share-defs')}.\n`;
|
|
15
|
+
export const SHARE_REMINDER = `${styleText('bold', 'Definition sharing: ON (default)')}\n` +
|
|
16
|
+
'New workflow definition versions are being shared with Sanity to improve Editorial Workflows.\n' +
|
|
17
|
+
'Examples:\n' +
|
|
18
|
+
` ${styleText('dim', '$')} sanity-workflows deploy ${styleText('dim', '# share by default')}\n` +
|
|
19
|
+
` ${styleText('dim', '$')} sanity-workflows deploy ${styleText('cyan', '--share-defs')} ${styleText('dim', '# share explicitly; hide this warning')}\n` +
|
|
20
|
+
` ${styleText('dim', '$')} sanity-workflows deploy ${styleText('cyan', '--no-share-defs')} ${styleText('dim', '# opt out')}\n`;
|
|
20
21
|
export function definitionShareMarker(args) {
|
|
21
22
|
const { status: _status, ...structural } = definitionDeployedData(args.definition, {
|
|
22
23
|
contentHash: args.contentHash,
|
|
@@ -27,7 +28,7 @@ export function definitionShareMarker(args) {
|
|
|
27
28
|
}
|
|
28
29
|
export function shouldForceShareTelemetry(args) {
|
|
29
30
|
const { commandId, argv } = args;
|
|
30
|
-
if (commandId !== 'deploy') {
|
|
31
|
+
if (commandId !== 'editorial-workflows:deploy') {
|
|
31
32
|
return false;
|
|
32
33
|
}
|
|
33
34
|
const terminator = argv.indexOf('--');
|
|
@@ -35,7 +36,8 @@ export function shouldForceShareTelemetry(args) {
|
|
|
35
36
|
if (tokens.includes('--dry-run') || tokens.includes('--check')) {
|
|
36
37
|
return false;
|
|
37
38
|
}
|
|
38
|
-
return tokens.lastIndexOf('--share-defs') > tokens.lastIndexOf('--no-share-defs')
|
|
39
|
+
return (tokens.lastIndexOf('--share-defs') > tokens.lastIndexOf('--no-share-defs') ||
|
|
40
|
+
!tokens.includes('--no-share-defs'));
|
|
39
41
|
}
|
|
40
42
|
async function loadShareEntry(args) {
|
|
41
43
|
const { candidate, result, warn } = args;
|
|
@@ -84,43 +86,32 @@ function collectCreated(candidates) {
|
|
|
84
86
|
.filter((result) => result.status === 'created')
|
|
85
87
|
.map((result) => ({ candidate, result })));
|
|
86
88
|
}
|
|
87
|
-
function
|
|
89
|
+
function wasShareNoticeShown(userConfig) {
|
|
88
90
|
const value = userConfig.get(SHARE_DECISION_KEY);
|
|
89
|
-
return typeof value === 'boolean'
|
|
91
|
+
return typeof value === 'boolean';
|
|
90
92
|
}
|
|
91
|
-
|
|
92
|
-
let share;
|
|
93
|
+
function rememberShareNotice(userConfig) {
|
|
93
94
|
try {
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
catch {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
try {
|
|
100
|
-
args.userConfig.set(SHARE_DECISION_KEY, share);
|
|
95
|
+
userConfig.set(SHARE_DECISION_KEY, true);
|
|
101
96
|
}
|
|
102
97
|
catch {
|
|
103
98
|
}
|
|
104
|
-
return share;
|
|
105
99
|
}
|
|
106
|
-
|
|
100
|
+
function resolveShareIntent(args) {
|
|
107
101
|
if (args.flag === true) {
|
|
108
102
|
return { share: true, decision: 'opt-in' };
|
|
109
103
|
}
|
|
110
104
|
if (args.flag === false) {
|
|
111
105
|
return { share: false, decision: 'opt-out' };
|
|
112
106
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
if (args.interactive && !wasShareNoticeShown(args.userConfig)) {
|
|
108
|
+
args.writeStderr(SHARE_FIRST_RUN_NOTICE);
|
|
109
|
+
rememberShareNotice(args.userConfig);
|
|
116
110
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
args.writeStderr(remembered ? SHARE_REMINDER_ON : SHARE_REMINDER_OFF);
|
|
120
|
-
return { share: remembered, decision: remembered ? 'remembered-share' : 'remembered-decline' };
|
|
111
|
+
else {
|
|
112
|
+
args.writeStderr(SHARE_REMINDER);
|
|
121
113
|
}
|
|
122
|
-
|
|
123
|
-
return { share: accepted, decision: accepted ? 'prompt-accepted' : 'prompt-declined' };
|
|
114
|
+
return { share: true, decision: 'default' };
|
|
124
115
|
}
|
|
125
116
|
async function donate(args) {
|
|
126
117
|
const shared = [];
|
|
@@ -171,14 +162,11 @@ export async function shareDefinitionsAfterDeploy(args) {
|
|
|
171
162
|
return;
|
|
172
163
|
}
|
|
173
164
|
try {
|
|
174
|
-
const { share, decision } =
|
|
165
|
+
const { share, decision } = resolveShareIntent({
|
|
175
166
|
flag: args.flag,
|
|
176
167
|
interactive: args.interactive ?? canPromptOnStderr(),
|
|
177
|
-
envDenied: args.envDenied ?? isTelemetryEnvDenied(process.env),
|
|
178
168
|
userConfig: args.userConfig ?? getUserConfig(),
|
|
179
169
|
writeStderr: args.writeStderr ?? ((message) => void process.stderr.write(message)),
|
|
180
|
-
confirmShare: args.confirmShare ??
|
|
181
|
-
(() => confirm({ message: SHARE_CONSENT_PROMPT, default: true }, { output: process.stderr })),
|
|
182
170
|
});
|
|
183
171
|
const shared = share ? await donate({ created, warn: args.warn }) : false;
|
|
184
172
|
emitSharingDecided({ decision, shared, definitionCount: created.length });
|
|
@@ -40,8 +40,8 @@ export declare function setupCliTelemetry(args?: {
|
|
|
40
40
|
/** The oclif config's version — the prerun hook supplies it. */
|
|
41
41
|
cliVersion?: string;
|
|
42
42
|
/** Override the environment denial (CI / `DO_NOT_TRACK`) — the prerun hook
|
|
43
|
-
* sets this for a deploy that
|
|
44
|
-
* `--share-defs`. */
|
|
43
|
+
* sets this for a deploy that may share definitions, either by default or
|
|
44
|
+
* through `--share-defs`. */
|
|
45
45
|
forceSend?: boolean;
|
|
46
46
|
/** Intake client override — tests inject a fake here, like the other
|
|
47
47
|
* hook dependencies above; omitted, the real project client applies. */
|
package/dist/lib/telemetry.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* Definition Shared` is a content-free marker (hash + structural counts); the shared
|
|
25
25
|
* document itself rides the first-party feedback endpoint, never
|
|
26
26
|
* telemetry (see `share-definitions.ts`). `Editorial Workflows Definition
|
|
27
|
-
* Sharing Decided` records the per-invocation
|
|
27
|
+
* Sharing Decided` records the per-invocation sharing decision (default /
|
|
28
28
|
* opt-in / opt-out and whether anything was donated) — also content-free.
|
|
29
29
|
*/
|
|
30
30
|
import { type DefinedTelemetryTrace, type TelemetryStore } from '@sanity/telemetry';
|
|
@@ -47,14 +47,11 @@ export declare const WorkflowDefinitionShared: import("@sanity/telemetry").Defin
|
|
|
47
47
|
/**
|
|
48
48
|
* How the donation decision was reached, and what it was. Paired with `shared`
|
|
49
49
|
* (whether it actually reached the endpoint) this keeps every case distinct —
|
|
50
|
-
* an explicit
|
|
51
|
-
* failed POST:
|
|
50
|
+
* an explicit opt-out vs default sharing, and a chosen share vs a failed POST:
|
|
52
51
|
* - `opt-in` / `opt-out` — an explicit `--share-defs` / `--no-share-defs`.
|
|
53
|
-
* - `
|
|
54
|
-
* - `remembered-share` / `remembered-decline` — a persisted earlier answer.
|
|
55
|
-
* - `unattended` — CI / `DO_NOT_TRACK` / non-TTY: never asked, never shares.
|
|
52
|
+
* - `default` — no sharing flag; definitions are donated in every environment.
|
|
56
53
|
*/
|
|
57
|
-
export type DefinitionSharingDecision = 'opt-in' | 'opt-out' | '
|
|
54
|
+
export type DefinitionSharingDecision = 'opt-in' | 'opt-out' | 'default';
|
|
58
55
|
export interface WorkflowDefinitionSharingDecidedData {
|
|
59
56
|
decision: DefinitionSharingDecision;
|
|
60
57
|
/** Whether the donation actually reached the feedback endpoint — `false` for
|
|
@@ -93,9 +90,8 @@ export declare function setCliTelemetry(telemetry: CliTelemetry): void;
|
|
|
93
90
|
export declare function clearCliTelemetry(): void;
|
|
94
91
|
/** Build the built-in Sanity-intake shell over an authenticated,
|
|
95
92
|
* project-bound client. `forceSend` overrides the environment denial
|
|
96
|
-
* (CI / `DO_NOT_TRACK`)
|
|
97
|
-
*
|
|
98
|
-
* vars). Account-level consent is unaffected: the intake still fetches
|
|
93
|
+
* (CI / `DO_NOT_TRACK`) when a deploy may share definitions—flagless by
|
|
94
|
+
* default or explicitly enabled. Account-level consent is unaffected: the intake still fetches
|
|
99
95
|
* `/intake/telemetry-status`, so `sanity telemetry disable` still mutes. */
|
|
100
96
|
export declare function createBuiltinTelemetry(args: {
|
|
101
97
|
client: TelemetryIntakeClient;
|
|
@@ -119,6 +115,18 @@ export declare function raceWithDeadline<T>(work: Promise<T>, deadlineMs: number
|
|
|
119
115
|
* the same payload through its `log` seam and owns its own delivery.
|
|
120
116
|
*/
|
|
121
117
|
export declare function finishCliTelemetry(data: WorkflowCliCommandData): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* The command id a trace reports: the resolved class's canonical id when
|
|
120
|
+
* oclif supplies it, else the id as typed. An alias invocation must report
|
|
121
|
+
* under the same name as the canonical form — one command, one telemetry
|
|
122
|
+
* identity.
|
|
123
|
+
*/
|
|
124
|
+
export declare function traceCommandId(options: {
|
|
125
|
+
id: string;
|
|
126
|
+
Command?: {
|
|
127
|
+
id: string;
|
|
128
|
+
} | undefined;
|
|
129
|
+
}): string;
|
|
122
130
|
/**
|
|
123
131
|
* The names of declared flags present in `argv` — long form (`--name`,
|
|
124
132
|
* `--name=value`), negated booleans (`--no-name`), and short chars
|
package/dist/lib/telemetry.js
CHANGED
|
@@ -12,8 +12,8 @@ export const WorkflowDefinitionShared = defineEvent({
|
|
|
12
12
|
});
|
|
13
13
|
export const WorkflowDefinitionSharingDecided = defineEvent({
|
|
14
14
|
name: 'Editorial Workflows Definition Sharing Decided',
|
|
15
|
-
version:
|
|
16
|
-
description: 'One per deploy invocation that created new definition versions:
|
|
15
|
+
version: 2,
|
|
16
|
+
description: 'One per deploy invocation that created new definition versions: whether donation followed the default or an explicit flag, whether anything reached the endpoint, and how many versions were eligible. Content-free — measures the true opt-out rate without ever carrying the document.',
|
|
17
17
|
});
|
|
18
18
|
const OFF = { kind: 'off', logger: noopTelemetry };
|
|
19
19
|
let current = OFF;
|
|
@@ -77,6 +77,9 @@ export async function finishCliTelemetry(data) {
|
|
|
77
77
|
store.end();
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
+
export function traceCommandId(options) {
|
|
81
|
+
return options.Command?.id ?? options.id;
|
|
82
|
+
}
|
|
80
83
|
export function usedFlagNames(argv, flagDefs) {
|
|
81
84
|
const terminator = argv.indexOf('--');
|
|
82
85
|
const tokens = argv.slice(0, terminator === -1 ? argv.length : terminator);
|
package/dist/lib/ui.d.ts
CHANGED
|
@@ -32,6 +32,18 @@ export declare function clipToLimit<T>(rows: T[], limit: number): {
|
|
|
32
32
|
rows: T[];
|
|
33
33
|
note?: string;
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* The shared tail of a list command: {@link clipToLimit} the probe-fetched
|
|
37
|
+
* rows, render them through {@link formatTable}, print every line, and print
|
|
38
|
+
* the clip note (when present) beneath the table.
|
|
39
|
+
*/
|
|
40
|
+
export declare function logClippedTable<T>({ rows, limit, headers, toCells, log, }: {
|
|
41
|
+
rows: T[];
|
|
42
|
+
limit: number;
|
|
43
|
+
headers: string[];
|
|
44
|
+
toCells: (row: T) => string[];
|
|
45
|
+
log: (line: string) => void;
|
|
46
|
+
}): void;
|
|
35
47
|
/**
|
|
36
48
|
* The `▸ label` banner printed above a group's output when a run spans
|
|
37
49
|
* several groups (deployments for deploy, resources for fanned-out reads),
|
package/dist/lib/ui.js
CHANGED
|
@@ -31,6 +31,15 @@ export function clipToLimit(rows, limit) {
|
|
|
31
31
|
note: styleText('dim', `showing the first ${limit} — raise --limit to see more`),
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
export function logClippedTable({ rows, limit, headers, toCells, log, }) {
|
|
35
|
+
const { rows: clipped, note } = clipToLimit(rows, limit);
|
|
36
|
+
for (const line of formatTable(headers, clipped.map(toCells))) {
|
|
37
|
+
log(line);
|
|
38
|
+
}
|
|
39
|
+
if (note) {
|
|
40
|
+
log(note);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
34
43
|
export function groupBanner({ label, index, total, }) {
|
|
35
44
|
if (total <= 1) {
|
|
36
45
|
return undefined;
|
package/oclif.manifest.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"abort": {
|
|
4
|
-
"aliases": [
|
|
3
|
+
"editorial-workflows:abort": {
|
|
4
|
+
"aliases": [
|
|
5
|
+
"abort"
|
|
6
|
+
],
|
|
5
7
|
"args": {
|
|
6
8
|
"instanceId": {
|
|
7
9
|
"description": "Workflow instance id.",
|
|
@@ -9,7 +11,7 @@
|
|
|
9
11
|
"required": true
|
|
10
12
|
}
|
|
11
13
|
},
|
|
12
|
-
"description": "Abort an in-flight workflow instance — a hard stop: pending effects are cancelled, stage guards
|
|
14
|
+
"description": "Abort an in-flight workflow instance — a hard stop: pending effects are cancelled, stage guards removed, and the instance is marked terminal where it stands.",
|
|
13
15
|
"examples": [
|
|
14
16
|
"<%= config.bin %> abort wf-instance.abc123",
|
|
15
17
|
"<%= config.bin %> abort wf-instance.abc123 --reason 'superseded by relaunch'"
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
},
|
|
33
35
|
"hasDynamicHelp": false,
|
|
34
36
|
"hiddenAliases": [],
|
|
35
|
-
"id": "abort",
|
|
37
|
+
"id": "editorial-workflows:abort",
|
|
36
38
|
"pluginAlias": "@sanity/workflow-cli",
|
|
37
39
|
"pluginName": "@sanity/workflow-cli",
|
|
38
40
|
"pluginType": "core",
|
|
@@ -41,11 +43,14 @@
|
|
|
41
43
|
"relativePath": [
|
|
42
44
|
"dist",
|
|
43
45
|
"commands",
|
|
46
|
+
"editorial-workflows",
|
|
44
47
|
"abort.js"
|
|
45
48
|
]
|
|
46
49
|
},
|
|
47
|
-
"deploy": {
|
|
48
|
-
"aliases": [
|
|
50
|
+
"editorial-workflows:deploy": {
|
|
51
|
+
"aliases": [
|
|
52
|
+
"deploy"
|
|
53
|
+
],
|
|
49
54
|
"args": {},
|
|
50
55
|
"description": "Validate, diff, and deploy workflow definitions to the resource bound by the selected deployment.",
|
|
51
56
|
"examples": [
|
|
@@ -92,7 +97,7 @@
|
|
|
92
97
|
"type": "option"
|
|
93
98
|
},
|
|
94
99
|
"share-defs": {
|
|
95
|
-
"description": "Share the definition documents newly created by this deploy with Sanity — the full document, verbatim (structure, names, filters, effect configuration, seeded values), plus its deployment coordinates (project and dataset, or resource id); never content documents, instances, or your Sanity auth token.
|
|
100
|
+
"description": "Share the definition documents newly created by this deploy with Sanity — the full document, verbatim (structure, names, filters, effect configuration, seeded values), plus its deployment coordinates (project and dataset, or resource id); never content documents, instances, or your Sanity auth token. Sharing is the default in every environment, including CI / non-TTY / DO_NOT_TRACK. Use --no-share-defs to opt out.",
|
|
96
101
|
"name": "share-defs",
|
|
97
102
|
"allowNo": true,
|
|
98
103
|
"type": "boolean"
|
|
@@ -100,7 +105,7 @@
|
|
|
100
105
|
},
|
|
101
106
|
"hasDynamicHelp": false,
|
|
102
107
|
"hiddenAliases": [],
|
|
103
|
-
"id": "deploy",
|
|
108
|
+
"id": "editorial-workflows:deploy",
|
|
104
109
|
"pluginAlias": "@sanity/workflow-cli",
|
|
105
110
|
"pluginName": "@sanity/workflow-cli",
|
|
106
111
|
"pluginType": "core",
|
|
@@ -109,11 +114,14 @@
|
|
|
109
114
|
"relativePath": [
|
|
110
115
|
"dist",
|
|
111
116
|
"commands",
|
|
117
|
+
"editorial-workflows",
|
|
112
118
|
"deploy.js"
|
|
113
119
|
]
|
|
114
120
|
},
|
|
115
|
-
"diagnose": {
|
|
116
|
-
"aliases": [
|
|
121
|
+
"editorial-workflows:diagnose": {
|
|
122
|
+
"aliases": [
|
|
123
|
+
"diagnose"
|
|
124
|
+
],
|
|
117
125
|
"args": {
|
|
118
126
|
"instanceId": {
|
|
119
127
|
"description": "Workflow instance id.",
|
|
@@ -144,7 +152,7 @@
|
|
|
144
152
|
},
|
|
145
153
|
"hasDynamicHelp": false,
|
|
146
154
|
"hiddenAliases": [],
|
|
147
|
-
"id": "diagnose",
|
|
155
|
+
"id": "editorial-workflows:diagnose",
|
|
148
156
|
"pluginAlias": "@sanity/workflow-cli",
|
|
149
157
|
"pluginName": "@sanity/workflow-cli",
|
|
150
158
|
"pluginType": "core",
|
|
@@ -153,11 +161,14 @@
|
|
|
153
161
|
"relativePath": [
|
|
154
162
|
"dist",
|
|
155
163
|
"commands",
|
|
164
|
+
"editorial-workflows",
|
|
156
165
|
"diagnose.js"
|
|
157
166
|
]
|
|
158
167
|
},
|
|
159
|
-
"fire-action": {
|
|
160
|
-
"aliases": [
|
|
168
|
+
"editorial-workflows:fire-action": {
|
|
169
|
+
"aliases": [
|
|
170
|
+
"fire-action"
|
|
171
|
+
],
|
|
161
172
|
"args": {
|
|
162
173
|
"instanceId": {
|
|
163
174
|
"description": "Workflow instance id.",
|
|
@@ -210,7 +221,7 @@
|
|
|
210
221
|
},
|
|
211
222
|
"hasDynamicHelp": false,
|
|
212
223
|
"hiddenAliases": [],
|
|
213
|
-
"id": "fire-action",
|
|
224
|
+
"id": "editorial-workflows:fire-action",
|
|
214
225
|
"pluginAlias": "@sanity/workflow-cli",
|
|
215
226
|
"pluginName": "@sanity/workflow-cli",
|
|
216
227
|
"pluginType": "core",
|
|
@@ -219,11 +230,14 @@
|
|
|
219
230
|
"relativePath": [
|
|
220
231
|
"dist",
|
|
221
232
|
"commands",
|
|
233
|
+
"editorial-workflows",
|
|
222
234
|
"fire-action.js"
|
|
223
235
|
]
|
|
224
236
|
},
|
|
225
|
-
"list": {
|
|
226
|
-
"aliases": [
|
|
237
|
+
"editorial-workflows:list": {
|
|
238
|
+
"aliases": [
|
|
239
|
+
"list"
|
|
240
|
+
],
|
|
227
241
|
"args": {},
|
|
228
242
|
"description": "List workflow instances in the configured dataset (in-flight by default).",
|
|
229
243
|
"examples": [
|
|
@@ -278,7 +292,7 @@
|
|
|
278
292
|
},
|
|
279
293
|
"hasDynamicHelp": false,
|
|
280
294
|
"hiddenAliases": [],
|
|
281
|
-
"id": "list",
|
|
295
|
+
"id": "editorial-workflows:list",
|
|
282
296
|
"pluginAlias": "@sanity/workflow-cli",
|
|
283
297
|
"pluginName": "@sanity/workflow-cli",
|
|
284
298
|
"pluginType": "core",
|
|
@@ -287,11 +301,14 @@
|
|
|
287
301
|
"relativePath": [
|
|
288
302
|
"dist",
|
|
289
303
|
"commands",
|
|
304
|
+
"editorial-workflows",
|
|
290
305
|
"list.js"
|
|
291
306
|
]
|
|
292
307
|
},
|
|
293
|
-
"nuke": {
|
|
294
|
-
"aliases": [
|
|
308
|
+
"editorial-workflows:nuke": {
|
|
309
|
+
"aliases": [
|
|
310
|
+
"nuke"
|
|
311
|
+
],
|
|
295
312
|
"args": {},
|
|
296
313
|
"description": "The reset for a dataset holding engine documents the versioned upgrade framework cannot yet migrate: deletes the tag's instances, definitions, and guards (across every alias-bound resource). Content documents are never touched. Prints a dry-run plan, then requires you to type back every involved dataset (--force skips the prompt; the plan still prints).",
|
|
297
314
|
"examples": [
|
|
@@ -316,7 +333,7 @@
|
|
|
316
333
|
},
|
|
317
334
|
"hasDynamicHelp": false,
|
|
318
335
|
"hiddenAliases": [],
|
|
319
|
-
"id": "nuke",
|
|
336
|
+
"id": "editorial-workflows:nuke",
|
|
320
337
|
"pluginAlias": "@sanity/workflow-cli",
|
|
321
338
|
"pluginName": "@sanity/workflow-cli",
|
|
322
339
|
"pluginType": "core",
|
|
@@ -326,10 +343,11 @@
|
|
|
326
343
|
"relativePath": [
|
|
327
344
|
"dist",
|
|
328
345
|
"commands",
|
|
346
|
+
"editorial-workflows",
|
|
329
347
|
"nuke.js"
|
|
330
348
|
]
|
|
331
349
|
},
|
|
332
|
-
"reset-activity": {
|
|
350
|
+
"editorial-workflows:reset-activity": {
|
|
333
351
|
"aliases": [],
|
|
334
352
|
"args": {
|
|
335
353
|
"instanceId": {
|
|
@@ -347,8 +365,10 @@
|
|
|
347
365
|
"flags": {},
|
|
348
366
|
"hasDynamicHelp": false,
|
|
349
367
|
"hidden": true,
|
|
350
|
-
"hiddenAliases": [
|
|
351
|
-
|
|
368
|
+
"hiddenAliases": [
|
|
369
|
+
"reset-activity"
|
|
370
|
+
],
|
|
371
|
+
"id": "editorial-workflows:reset-activity",
|
|
352
372
|
"pluginAlias": "@sanity/workflow-cli",
|
|
353
373
|
"pluginName": "@sanity/workflow-cli",
|
|
354
374
|
"pluginType": "core",
|
|
@@ -357,11 +377,14 @@
|
|
|
357
377
|
"relativePath": [
|
|
358
378
|
"dist",
|
|
359
379
|
"commands",
|
|
380
|
+
"editorial-workflows",
|
|
360
381
|
"reset-activity.js"
|
|
361
382
|
]
|
|
362
383
|
},
|
|
363
|
-
"set-stage": {
|
|
364
|
-
"aliases": [
|
|
384
|
+
"editorial-workflows:set-stage": {
|
|
385
|
+
"aliases": [
|
|
386
|
+
"set-stage"
|
|
387
|
+
],
|
|
365
388
|
"args": {
|
|
366
389
|
"instanceId": {
|
|
367
390
|
"description": "Workflow instance id to move.",
|
|
@@ -400,7 +423,7 @@
|
|
|
400
423
|
},
|
|
401
424
|
"hasDynamicHelp": false,
|
|
402
425
|
"hiddenAliases": [],
|
|
403
|
-
"id": "set-stage",
|
|
426
|
+
"id": "editorial-workflows:set-stage",
|
|
404
427
|
"pluginAlias": "@sanity/workflow-cli",
|
|
405
428
|
"pluginName": "@sanity/workflow-cli",
|
|
406
429
|
"pluginType": "core",
|
|
@@ -409,11 +432,14 @@
|
|
|
409
432
|
"relativePath": [
|
|
410
433
|
"dist",
|
|
411
434
|
"commands",
|
|
435
|
+
"editorial-workflows",
|
|
412
436
|
"set-stage.js"
|
|
413
437
|
]
|
|
414
438
|
},
|
|
415
|
-
"show": {
|
|
416
|
-
"aliases": [
|
|
439
|
+
"editorial-workflows:show": {
|
|
440
|
+
"aliases": [
|
|
441
|
+
"show"
|
|
442
|
+
],
|
|
417
443
|
"args": {
|
|
418
444
|
"instanceId": {
|
|
419
445
|
"description": "Workflow instance document id.",
|
|
@@ -448,7 +474,7 @@
|
|
|
448
474
|
},
|
|
449
475
|
"hasDynamicHelp": false,
|
|
450
476
|
"hiddenAliases": [],
|
|
451
|
-
"id": "show",
|
|
477
|
+
"id": "editorial-workflows:show",
|
|
452
478
|
"pluginAlias": "@sanity/workflow-cli",
|
|
453
479
|
"pluginName": "@sanity/workflow-cli",
|
|
454
480
|
"pluginType": "core",
|
|
@@ -457,11 +483,14 @@
|
|
|
457
483
|
"relativePath": [
|
|
458
484
|
"dist",
|
|
459
485
|
"commands",
|
|
486
|
+
"editorial-workflows",
|
|
460
487
|
"show.js"
|
|
461
488
|
]
|
|
462
489
|
},
|
|
463
|
-
"start": {
|
|
464
|
-
"aliases": [
|
|
490
|
+
"editorial-workflows:start": {
|
|
491
|
+
"aliases": [
|
|
492
|
+
"start"
|
|
493
|
+
],
|
|
465
494
|
"args": {
|
|
466
495
|
"name": {
|
|
467
496
|
"description": "Workflow definition name.",
|
|
@@ -515,7 +544,7 @@
|
|
|
515
544
|
},
|
|
516
545
|
"hasDynamicHelp": false,
|
|
517
546
|
"hiddenAliases": [],
|
|
518
|
-
"id": "start",
|
|
547
|
+
"id": "editorial-workflows:start",
|
|
519
548
|
"pluginAlias": "@sanity/workflow-cli",
|
|
520
549
|
"pluginName": "@sanity/workflow-cli",
|
|
521
550
|
"pluginType": "core",
|
|
@@ -524,11 +553,14 @@
|
|
|
524
553
|
"relativePath": [
|
|
525
554
|
"dist",
|
|
526
555
|
"commands",
|
|
556
|
+
"editorial-workflows",
|
|
527
557
|
"start.js"
|
|
528
558
|
]
|
|
529
559
|
},
|
|
530
|
-
"tail": {
|
|
531
|
-
"aliases": [
|
|
560
|
+
"editorial-workflows:tail": {
|
|
561
|
+
"aliases": [
|
|
562
|
+
"tail"
|
|
563
|
+
],
|
|
532
564
|
"args": {
|
|
533
565
|
"instanceId": {
|
|
534
566
|
"description": "Workflow instance id to tail.",
|
|
@@ -551,7 +583,7 @@
|
|
|
551
583
|
},
|
|
552
584
|
"hasDynamicHelp": false,
|
|
553
585
|
"hiddenAliases": [],
|
|
554
|
-
"id": "tail",
|
|
586
|
+
"id": "editorial-workflows:tail",
|
|
555
587
|
"pluginAlias": "@sanity/workflow-cli",
|
|
556
588
|
"pluginName": "@sanity/workflow-cli",
|
|
557
589
|
"pluginType": "core",
|
|
@@ -560,11 +592,14 @@
|
|
|
560
592
|
"relativePath": [
|
|
561
593
|
"dist",
|
|
562
594
|
"commands",
|
|
595
|
+
"editorial-workflows",
|
|
563
596
|
"tail.js"
|
|
564
597
|
]
|
|
565
598
|
},
|
|
566
|
-
"definition:delete": {
|
|
567
|
-
"aliases": [
|
|
599
|
+
"editorial-workflows:definition:delete": {
|
|
600
|
+
"aliases": [
|
|
601
|
+
"definition:delete"
|
|
602
|
+
],
|
|
568
603
|
"args": {
|
|
569
604
|
"name": {
|
|
570
605
|
"description": "Workflow definition name.",
|
|
@@ -609,7 +644,7 @@
|
|
|
609
644
|
},
|
|
610
645
|
"hasDynamicHelp": false,
|
|
611
646
|
"hiddenAliases": [],
|
|
612
|
-
"id": "definition:delete",
|
|
647
|
+
"id": "editorial-workflows:definition:delete",
|
|
613
648
|
"pluginAlias": "@sanity/workflow-cli",
|
|
614
649
|
"pluginName": "@sanity/workflow-cli",
|
|
615
650
|
"pluginType": "core",
|
|
@@ -618,12 +653,15 @@
|
|
|
618
653
|
"relativePath": [
|
|
619
654
|
"dist",
|
|
620
655
|
"commands",
|
|
656
|
+
"editorial-workflows",
|
|
621
657
|
"definition",
|
|
622
658
|
"delete.js"
|
|
623
659
|
]
|
|
624
660
|
},
|
|
625
|
-
"definition:diff": {
|
|
626
|
-
"aliases": [
|
|
661
|
+
"editorial-workflows:definition:diff": {
|
|
662
|
+
"aliases": [
|
|
663
|
+
"definition:diff"
|
|
664
|
+
],
|
|
627
665
|
"args": {
|
|
628
666
|
"name": {
|
|
629
667
|
"description": "Workflow definition name.",
|
|
@@ -654,7 +692,7 @@
|
|
|
654
692
|
},
|
|
655
693
|
"hasDynamicHelp": false,
|
|
656
694
|
"hiddenAliases": [],
|
|
657
|
-
"id": "definition:diff",
|
|
695
|
+
"id": "editorial-workflows:definition:diff",
|
|
658
696
|
"pluginAlias": "@sanity/workflow-cli",
|
|
659
697
|
"pluginName": "@sanity/workflow-cli",
|
|
660
698
|
"pluginType": "core",
|
|
@@ -663,12 +701,15 @@
|
|
|
663
701
|
"relativePath": [
|
|
664
702
|
"dist",
|
|
665
703
|
"commands",
|
|
704
|
+
"editorial-workflows",
|
|
666
705
|
"definition",
|
|
667
706
|
"diff.js"
|
|
668
707
|
]
|
|
669
708
|
},
|
|
670
|
-
"definition:list": {
|
|
671
|
-
"aliases": [
|
|
709
|
+
"editorial-workflows:definition:list": {
|
|
710
|
+
"aliases": [
|
|
711
|
+
"definition:list"
|
|
712
|
+
],
|
|
672
713
|
"args": {},
|
|
673
714
|
"description": "List deployed workflow definitions.",
|
|
674
715
|
"examples": [
|
|
@@ -701,7 +742,7 @@
|
|
|
701
742
|
},
|
|
702
743
|
"hasDynamicHelp": false,
|
|
703
744
|
"hiddenAliases": [],
|
|
704
|
-
"id": "definition:list",
|
|
745
|
+
"id": "editorial-workflows:definition:list",
|
|
705
746
|
"pluginAlias": "@sanity/workflow-cli",
|
|
706
747
|
"pluginName": "@sanity/workflow-cli",
|
|
707
748
|
"pluginType": "core",
|
|
@@ -710,12 +751,15 @@
|
|
|
710
751
|
"relativePath": [
|
|
711
752
|
"dist",
|
|
712
753
|
"commands",
|
|
754
|
+
"editorial-workflows",
|
|
713
755
|
"definition",
|
|
714
756
|
"list.js"
|
|
715
757
|
]
|
|
716
758
|
},
|
|
717
|
-
"definition:show": {
|
|
718
|
-
"aliases": [
|
|
759
|
+
"editorial-workflows:definition:show": {
|
|
760
|
+
"aliases": [
|
|
761
|
+
"definition:show"
|
|
762
|
+
],
|
|
719
763
|
"args": {
|
|
720
764
|
"name": {
|
|
721
765
|
"description": "Workflow definition name.",
|
|
@@ -742,7 +786,7 @@
|
|
|
742
786
|
},
|
|
743
787
|
"hasDynamicHelp": false,
|
|
744
788
|
"hiddenAliases": [],
|
|
745
|
-
"id": "definition:show",
|
|
789
|
+
"id": "editorial-workflows:definition:show",
|
|
746
790
|
"pluginAlias": "@sanity/workflow-cli",
|
|
747
791
|
"pluginName": "@sanity/workflow-cli",
|
|
748
792
|
"pluginType": "core",
|
|
@@ -751,10 +795,11 @@
|
|
|
751
795
|
"relativePath": [
|
|
752
796
|
"dist",
|
|
753
797
|
"commands",
|
|
798
|
+
"editorial-workflows",
|
|
754
799
|
"definition",
|
|
755
800
|
"show.js"
|
|
756
801
|
]
|
|
757
802
|
}
|
|
758
803
|
},
|
|
759
|
-
"version": "0.
|
|
804
|
+
"version": "0.13.0"
|
|
760
805
|
}
|