@fluidgrids/cli 2026.1028.1 → 2026.1029.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.
Files changed (97) hide show
  1. package/README.md +100 -3
  2. package/dist/code-first/api.d.ts +380 -0
  3. package/dist/code-first/api.d.ts.map +1 -1
  4. package/dist/code-first/api.js +256 -1
  5. package/dist/code-first/api.js.map +1 -1
  6. package/dist/code-first/code-upload.d.ts +53 -0
  7. package/dist/code-first/code-upload.d.ts.map +1 -0
  8. package/dist/code-first/code-upload.js +165 -0
  9. package/dist/code-first/code-upload.js.map +1 -0
  10. package/dist/code-first/commands/hotfix.d.ts +54 -0
  11. package/dist/code-first/commands/hotfix.d.ts.map +1 -0
  12. package/dist/code-first/commands/hotfix.js +225 -0
  13. package/dist/code-first/commands/hotfix.js.map +1 -0
  14. package/dist/code-first/commands/push.d.ts +47 -1
  15. package/dist/code-first/commands/push.d.ts.map +1 -1
  16. package/dist/code-first/commands/push.js +115 -19
  17. package/dist/code-first/commands/push.js.map +1 -1
  18. package/dist/code-first/commands/replay.d.ts +44 -0
  19. package/dist/code-first/commands/replay.d.ts.map +1 -0
  20. package/dist/code-first/commands/replay.js +238 -0
  21. package/dist/code-first/commands/replay.js.map +1 -0
  22. package/dist/code-first/commands/runs.d.ts +160 -0
  23. package/dist/code-first/commands/runs.d.ts.map +1 -0
  24. package/dist/code-first/commands/runs.js +565 -0
  25. package/dist/code-first/commands/runs.js.map +1 -0
  26. package/dist/code-first/commands/validate.d.ts +4 -0
  27. package/dist/code-first/commands/validate.d.ts.map +1 -1
  28. package/dist/code-first/commands/validate.js +31 -6
  29. package/dist/code-first/commands/validate.js.map +1 -1
  30. package/dist/code-first/commands/versions.d.ts +63 -0
  31. package/dist/code-first/commands/versions.d.ts.map +1 -0
  32. package/dist/code-first/commands/versions.js +204 -0
  33. package/dist/code-first/commands/versions.js.map +1 -0
  34. package/dist/code-first/durable-operations.d.ts +41 -0
  35. package/dist/code-first/durable-operations.d.ts.map +1 -0
  36. package/dist/code-first/durable-operations.js +135 -0
  37. package/dist/code-first/durable-operations.js.map +1 -0
  38. package/dist/code-first/history.d.ts +30 -0
  39. package/dist/code-first/history.d.ts.map +1 -0
  40. package/dist/code-first/history.js +139 -0
  41. package/dist/code-first/history.js.map +1 -0
  42. package/dist/code-first/imports.d.ts +22 -0
  43. package/dist/code-first/imports.d.ts.map +1 -0
  44. package/dist/code-first/imports.js +67 -0
  45. package/dist/code-first/imports.js.map +1 -0
  46. package/dist/code-first/index.d.ts +4 -1
  47. package/dist/code-first/index.d.ts.map +1 -1
  48. package/dist/code-first/index.js +6 -2
  49. package/dist/code-first/index.js.map +1 -1
  50. package/dist/code-first/lowering.d.ts +53 -1
  51. package/dist/code-first/lowering.d.ts.map +1 -1
  52. package/dist/code-first/lowering.js +126 -6
  53. package/dist/code-first/lowering.js.map +1 -1
  54. package/dist/code-first/operations.d.ts +1 -3
  55. package/dist/code-first/operations.d.ts.map +1 -1
  56. package/dist/code-first/operations.js +1 -3
  57. package/dist/code-first/operations.js.map +1 -1
  58. package/dist/code-first/parity-operations.d.ts +44 -0
  59. package/dist/code-first/parity-operations.d.ts.map +1 -0
  60. package/dist/code-first/parity-operations.js +211 -0
  61. package/dist/code-first/parity-operations.js.map +1 -0
  62. package/dist/code-first/parity.d.ts +83 -0
  63. package/dist/code-first/parity.d.ts.map +1 -0
  64. package/dist/code-first/parity.js +301 -0
  65. package/dist/code-first/parity.js.map +1 -0
  66. package/dist/code-first/presigned.d.ts +21 -0
  67. package/dist/code-first/presigned.d.ts.map +1 -0
  68. package/dist/code-first/presigned.js +85 -0
  69. package/dist/code-first/presigned.js.map +1 -0
  70. package/dist/code-first/project.d.ts +9 -0
  71. package/dist/code-first/project.d.ts.map +1 -1
  72. package/dist/code-first/project.js +22 -0
  73. package/dist/code-first/project.js.map +1 -1
  74. package/dist/code-first/python.d.ts +11 -0
  75. package/dist/code-first/python.d.ts.map +1 -1
  76. package/dist/code-first/python.js +31 -1
  77. package/dist/code-first/python.js.map +1 -1
  78. package/dist/code-first/redact.d.ts +31 -0
  79. package/dist/code-first/redact.d.ts.map +1 -0
  80. package/dist/code-first/redact.js +150 -0
  81. package/dist/code-first/redact.js.map +1 -0
  82. package/dist/code-first/register.d.ts +13 -0
  83. package/dist/code-first/register.d.ts.map +1 -1
  84. package/dist/code-first/register.js +275 -2
  85. package/dist/code-first/register.js.map +1 -1
  86. package/dist/code-first/remote.d.ts.map +1 -1
  87. package/dist/code-first/remote.js +6 -0
  88. package/dist/code-first/remote.js.map +1 -1
  89. package/dist/code-first/replay.d.ts +36 -0
  90. package/dist/code-first/replay.d.ts.map +1 -0
  91. package/dist/code-first/replay.js +52 -0
  92. package/dist/code-first/replay.js.map +1 -0
  93. package/dist/code-first/shared.d.ts +14 -0
  94. package/dist/code-first/shared.d.ts.map +1 -1
  95. package/dist/code-first/shared.js +37 -0
  96. package/dist/code-first/shared.js.map +1 -1
  97. package/package.json +2 -2
@@ -104,7 +104,37 @@ export function parseLowerResult(stdout) {
104
104
  definition: item['definition'],
105
105
  };
106
106
  });
107
- return { sdkVersion, sourceHash: value['sourceHash'], workflows, warnings };
107
+ return {
108
+ sdkVersion,
109
+ sourceHash: value['sourceHash'],
110
+ workflows,
111
+ warnings,
112
+ issues: parseIssues(value['issues']),
113
+ };
114
+ }
115
+ /** The optional `issues` of a lowering result (present only when there are some). */
116
+ export function parseIssues(value) {
117
+ if (value === undefined)
118
+ return [];
119
+ if (!Array.isArray(value)) {
120
+ throw new CliUserError(`python -m ${PYTHON_MODULE} lower returned malformed issues.`, {
121
+ hint: UPGRADE_HINT,
122
+ });
123
+ }
124
+ return value.map((item, index) => {
125
+ if (!isRecord(item) ||
126
+ typeof item['code'] !== 'string' ||
127
+ typeof item['message'] !== 'string' ||
128
+ typeof item['module'] !== 'string') {
129
+ throw new CliUserError(`python -m ${PYTHON_MODULE} lower returned a malformed issue at index ${index}.`, { hint: UPGRADE_HINT });
130
+ }
131
+ return {
132
+ code: item['code'],
133
+ message: item['message'],
134
+ module: item['module'],
135
+ ...(typeof item['key'] === 'string' ? { key: item['key'] } : {}),
136
+ };
137
+ });
108
138
  }
109
139
  /** The connection names in an "unresolved connections" message, or null. */
110
140
  export function unresolvedNames(message) {
@@ -1 +1 @@
1
- {"version":3,"file":"python.js","sourceRoot":"","sources":["../../src/code-first/python.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAsB,MAAM,0BAA0B,CAAC;AAEtE,MAAM,CAAC,MAAM,aAAa,GAAG,sBAAsB,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,sBAAsB,CAAC;AACrD,MAAM,CAAC,MAAM,mBAAmB,GAAG,gCAAgC,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,6FAA6F;AAC7F,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;AAiB9E,iFAAiF;AACjF,MAAM,OAAO,gCAAiC,SAAQ,YAAY;IAGrD;IAFX,YACE,OAAe,EACN,KAAe;QAExB,KAAK,CAAC,OAAO,CAAC,CAAC;QAFN,UAAK,GAAL,KAAK,CAAU;QAGxB,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC;IACjD,CAAC;CACF;AAeD;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CACtC,IAAY,EACZ,UAA8B,EAC9B,MAAoD,OAAO,CAAC,GAAG;IAE/D,MAAM,OAAO,GAAG,G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CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACnD,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACnD,MAAM,CAAC,GAAG,EAAE;gBACV,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;oBACf,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;oBACnD,OAAO;gBACT,CAAC;gBACD,IAAI,CAAC;oBACH,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;gBACjC,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,CAAC,KAAK,CAAC,CAAC;gBAChB,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,2FAA2F;QAC3F,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACzC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Keep credentials that travel in GraphQL variables out of anything the CLI prints.
3
+ *
4
+ * graphql-request's ClientError builds its `message` from
5
+ * `JSON.stringify({ response, request: { query, variables } })`, and the cli-sdk error printer
6
+ * falls back to that message whenever the response carries no GraphQL error (a 413 from the
7
+ * gateway's body limit, a 502 from a load balancer, a WAF page). Parity starts carry the
8
+ * completion-callback signing secret and headers in their variables, so without this the CLI
9
+ * printed them on stderr (BOFF-9905 B19-P8).
10
+ */
11
+ export declare const REDACTED = "[REDACTED]";
12
+ /** Deep copy of `value` with every credential value replaced by {@link REDACTED}. */
13
+ export declare function redactVariables(value: unknown): unknown;
14
+ /** Every credential string inside `value` (the values {@link redactVariables} replaces). */
15
+ export declare function collectSecrets(value: unknown, into?: string[]): string[];
16
+ /** Replace every occurrence of each secret (and its JSON-escaped form) in `text`. */
17
+ export declare function scrubSecrets(text: string, secrets: readonly string[]): string;
18
+ /**
19
+ * Strip the request variables out of a gateway error before anything prints it.
20
+ *
21
+ * - An error whose message is a graphql-request ClientError dump (cli-sdk rethrows the
22
+ * ClientError message as a plain Error) keeps only the part before the dump. When that is
23
+ * `GraphQL Error (Code: N)`, the response had no GraphQL error (an HTML 413 or 502 page), and
24
+ * the error becomes a CliUserError, or a CliAuthError for 401/403, naming the status only.
25
+ * - A raw ClientError (an Error with `response` and `request`) is handled the same way from its
26
+ * `response`; with a GraphQL error it keeps its class, its message becomes that error alone and
27
+ * its `request.variables` are redacted.
28
+ * - Every message and stack left has the secrets in `variables` scrubbed.
29
+ */
30
+ export declare function sanitizeGatewayError(err: unknown, variables: Record<string, unknown>): unknown;
31
+ //# sourceMappingURL=redact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/code-first/redact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,eAAO,MAAM,QAAQ,eAAe,CAAC;AAYrC,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAcvD;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE,CAgB5E;AAED,qFAAqF;AACrF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAQ7E;AAsCD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAyB9F"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Keep credentials that travel in GraphQL variables out of anything the CLI prints.
3
+ *
4
+ * graphql-request's ClientError builds its `message` from
5
+ * `JSON.stringify({ response, request: { query, variables } })`, and the cli-sdk error printer
6
+ * falls back to that message whenever the response carries no GraphQL error (a 413 from the
7
+ * gateway's body limit, a 502 from a load balancer, a WAF page). Parity starts carry the
8
+ * completion-callback signing secret and headers in their variables, so without this the CLI
9
+ * printed them on stderr (BOFF-9905 B19-P8).
10
+ */
11
+ import { CliAuthError, CliUserError } from '@burdenoff/cli-sdk/core';
12
+ export const REDACTED = '[REDACTED]';
13
+ /** Variable keys whose values are credentials, whatever their prefix or case. */
14
+ const SENSITIVE_KEY = /(secret|token|password|passphrase|authorization|credential|apikey|api_key)/i;
15
+ /** Keys whose value is a map of header names to (often credential) values. */
16
+ const HEADER_MAP_KEY = /headers$/i;
17
+ function isRecord(value) {
18
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
19
+ }
20
+ /** Deep copy of `value` with every credential value replaced by {@link REDACTED}. */
21
+ export function redactVariables(value) {
22
+ if (Array.isArray(value))
23
+ return value.map((item) => redactVariables(item));
24
+ if (!isRecord(value))
25
+ return value;
26
+ const out = {};
27
+ for (const [key, inner] of Object.entries(value)) {
28
+ if (SENSITIVE_KEY.test(key)) {
29
+ out[key] = inner === null || inner === undefined ? inner : REDACTED;
30
+ }
31
+ else if (HEADER_MAP_KEY.test(key) && isRecord(inner)) {
32
+ out[key] = Object.fromEntries(Object.keys(inner).map((name) => [name, REDACTED]));
33
+ }
34
+ else {
35
+ out[key] = redactVariables(inner);
36
+ }
37
+ }
38
+ return out;
39
+ }
40
+ /** Every credential string inside `value` (the values {@link redactVariables} replaces). */
41
+ export function collectSecrets(value, into = []) {
42
+ if (Array.isArray(value)) {
43
+ for (const item of value)
44
+ collectSecrets(item, into);
45
+ return into;
46
+ }
47
+ if (!isRecord(value))
48
+ return into;
49
+ for (const [key, inner] of Object.entries(value)) {
50
+ if (SENSITIVE_KEY.test(key) && typeof inner === 'string') {
51
+ into.push(inner);
52
+ }
53
+ else if (HEADER_MAP_KEY.test(key) && isRecord(inner)) {
54
+ for (const header of Object.values(inner))
55
+ if (typeof header === 'string')
56
+ into.push(header);
57
+ }
58
+ else {
59
+ collectSecrets(inner, into);
60
+ }
61
+ }
62
+ return into;
63
+ }
64
+ /** Replace every occurrence of each secret (and its JSON-escaped form) in `text`. */
65
+ export function scrubSecrets(text, secrets) {
66
+ let out = text;
67
+ for (const secret of secrets) {
68
+ if (secret.length === 0)
69
+ continue;
70
+ const escaped = JSON.stringify(secret).slice(1, -1);
71
+ for (const form of new Set([secret, escaped]))
72
+ out = out.split(form).join(REDACTED);
73
+ }
74
+ return out;
75
+ }
76
+ function firstGraphQLMessage(response) {
77
+ const errors = response['errors'];
78
+ if (!Array.isArray(errors))
79
+ return undefined;
80
+ const first = errors[0];
81
+ if (!isRecord(first))
82
+ return undefined;
83
+ const message = first['message'];
84
+ return typeof message === 'string' && message.length > 0 ? message : undefined;
85
+ }
86
+ /** graphql-request's ClientError message: `<first GraphQL error | GraphQL Error (Code: N)>: <JSON>`. */
87
+ const CLIENT_ERROR_DUMP = ': {"response":';
88
+ const NO_GRAPHQL_ERROR = /^GraphQL Error \(Code: (\d{3})\)$/;
89
+ /** Remove a ClientError dump (it ends at the end of its line: JSON escapes newlines). */
90
+ function dropDump(text) {
91
+ const start = text.indexOf(CLIENT_ERROR_DUMP);
92
+ if (start < 0)
93
+ return text;
94
+ const end = text.indexOf('\n', start);
95
+ return end < 0 ? text.slice(0, start) : text.slice(0, start) + text.slice(end);
96
+ }
97
+ function httpStatusError(status) {
98
+ const what = `The workspace gateway answered HTTP ${status ?? 'error'} with no GraphQL error.`;
99
+ if (status === 401 || status === 403) {
100
+ return new CliAuthError(what, {
101
+ hint: 'Run `fluidgrids auth login` again, or check FLUIDGRIDS_TOKEN.',
102
+ });
103
+ }
104
+ return new CliUserError(what, status === 413
105
+ ? { hint: 'The request is larger than the gateway accepts.' }
106
+ : { hint: 'Retry; if it persists, check the gateway status.' });
107
+ }
108
+ /**
109
+ * Strip the request variables out of a gateway error before anything prints it.
110
+ *
111
+ * - An error whose message is a graphql-request ClientError dump (cli-sdk rethrows the
112
+ * ClientError message as a plain Error) keeps only the part before the dump. When that is
113
+ * `GraphQL Error (Code: N)`, the response had no GraphQL error (an HTML 413 or 502 page), and
114
+ * the error becomes a CliUserError, or a CliAuthError for 401/403, naming the status only.
115
+ * - A raw ClientError (an Error with `response` and `request`) is handled the same way from its
116
+ * `response`; with a GraphQL error it keeps its class, its message becomes that error alone and
117
+ * its `request.variables` are redacted.
118
+ * - Every message and stack left has the secrets in `variables` scrubbed.
119
+ */
120
+ export function sanitizeGatewayError(err, variables) {
121
+ if (!(err instanceof Error))
122
+ return err;
123
+ const secrets = collectSecrets(variables);
124
+ const response = Reflect.get(err, 'response');
125
+ const request = Reflect.get(err, 'request');
126
+ if (isRecord(response) && isRecord(request)) {
127
+ const status = response['status'];
128
+ const graphQLMessage = firstGraphQLMessage(response);
129
+ if (graphQLMessage === undefined) {
130
+ return httpStatusError(typeof status === 'number' ? status : undefined);
131
+ }
132
+ err.message = graphQLMessage;
133
+ Reflect.set(err, 'request', { ...request, variables: redactVariables(request['variables']) });
134
+ }
135
+ else {
136
+ const dump = err.message.indexOf(CLIENT_ERROR_DUMP);
137
+ if (dump >= 0) {
138
+ const head = err.message.slice(0, dump);
139
+ const noGraphQLError = NO_GRAPHQL_ERROR.exec(head);
140
+ if (noGraphQLError)
141
+ return httpStatusError(Number(noGraphQLError[1]));
142
+ err.message = head;
143
+ }
144
+ }
145
+ err.message = scrubSecrets(err.message, secrets);
146
+ if (typeof err.stack === 'string')
147
+ err.stack = scrubSecrets(dropDump(err.stack), secrets);
148
+ return err;
149
+ }
150
+ //# sourceMappingURL=redact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/code-first/redact.ts"],"names":[],"mappings":"AAAA;;;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AM,cAAc,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,OAAO,eAAe,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC1E,CAAC;QACD,GAAG,CAAC,OAAO,GAAG,cAAc,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAChG,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACpD,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;YACd,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YACxC,MAAM,cAAc,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,IAAI,cAAc;gBAAE,OAAO,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;QACrB,CAAC;IACH,CAAC;IACD,GAAG,CAAC,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ;QAAE,GAAG,CAAC,KAAK,GAAG,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;IAC1F,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -18,4 +18,17 @@ export declare function registerDiff(program: Command, env: CommandEnv): void;
18
18
  export declare function registerValidate(program: Command, env: CommandEnv): void;
19
19
  export declare function registerImport(program: Command, env: CommandEnv): void;
20
20
  export declare function registerInterface(program: Command, env: CommandEnv): void;
21
+ /**
22
+ * Durable-function commands (Phase B): `runs start|describe|history|signal|
23
+ * terminate|stack` on the cli-sdk `runs` group, plus the top-level `history`,
24
+ * `signal`, `replay`, `test`, `run` and `versions list`.
25
+ *
26
+ * Durable-function parity (BOFF-9905 B19): the parity options of `runs start`,
27
+ * run targets (`--workflow-id --key`) on `runs describe|history|signal|cancel|
28
+ * terminate|stack|result`, `runs describe --pending`, `runs result
29
+ * --follow-runs`, `runs count`, `runs stack --metadata`, and `versions
30
+ * rollout|rollout delete|drainage|override`. `runs cancel` replaces the cli-sdk
31
+ * command of the same name.
32
+ */
33
+ export declare function registerDurable(program: Command, env: CommandEnv): void;
21
34
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/code-first/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASzC,OAAO,EAAoB,KAAK,UAAU,EAAuB,MAAM,aAAa,CAAC;AAQrF,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAgBpE;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAavE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAkBpE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAgBpE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,IAAI,CAYpE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EA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-8,7 +8,7 @@
8
8
  * …) starts as fast as it did before the code-first commands existed. Only
9
9
  * types are imported statically here; keep it that way.
10
10
  */
11
- import { withGlobalFormat } from './shared.js';
11
+ import { withGlobalFormat, } from './shared.js';
12
12
  const PROJECT_OPTION = [
13
13
  '--project <dir>',
14
14
  'Project directory (default: nearest fluidgrids.config.json)',
@@ -64,11 +64,21 @@ export function registerPush(program, env) {
64
64
  .option('--dry-run', 'Lower, validate and diff against the latest version; create nothing')
65
65
  .option('-m, --message <text>', 'Description for the new versions')
66
66
  .option('--force', 'Push even when the workspace has versions newer than the one the project pulled')
67
+ .option('--hotfix <version>', 'Replace the code bundle of this existing version instead (durable functions; replay-verified by the service)')
68
+ .option('--replay-sample <n>', 'With --hotfix: replay the n latest runs of the version locally first')
69
+ .option('--no-verify-replay', 'With --hotfix: skip the service replay verification (audited)')
70
+ .option('--timeout <ms>', 'With --hotfix: how long to wait for the replacement job', '600000')
67
71
  .option(...PROJECT_OPTION)
68
72
  .option(...OUTPUT_OPTION)
69
73
  .action(async (keys, options, command) => {
74
+ const resolved = withGlobalFormat(options, command);
75
+ if (resolved.hotfix !== undefined) {
76
+ const { runHotfix } = await import('./commands/hotfix.js');
77
+ await runHotfix(env, keys, resolved);
78
+ return;
79
+ }
70
80
  const { runPush } = await import('./commands/push.js');
71
- await runPush(env, keys, withGlobalFormat(options, command));
81
+ await runPush(env, keys, resolved);
72
82
  });
73
83
  }
74
84
  export function registerDiff(program, env) {
@@ -123,4 +133,267 @@ export function registerInterface(program, env) {
123
133
  await runInterface(env, key, withGlobalFormat(options, command));
124
134
  });
125
135
  }
136
+ const WAIT_OPTIONS = {
137
+ timeout: ['--timeout <ms>', 'With --wait: give up after this many milliseconds', '300000'],
138
+ poll: ['--poll-interval <ms>', 'With --wait: delay between polls in milliseconds', '1000'],
139
+ };
140
+ function collect(value, previous = []) {
141
+ return [...previous, value];
142
+ }
143
+ /**
144
+ * The run-target options (durable-function parity): act on the latest run of a
145
+ * workflow id instead of a run id.
146
+ */
147
+ function addTargetOptions(command) {
148
+ return command
149
+ .option('--workflow-id <id>', 'The latest run of this workflow id instead of a run id (with --key; needs durable-function parity)')
150
+ .option('--key <workflowKey>', 'With --workflow-id: the workflow key')
151
+ .option('--first-run-id <id>', 'With --workflow-id: only the chain that started with this run');
152
+ }
153
+ function addHistory(parent, env, name) {
154
+ addTargetOptions(parent
155
+ .command(`${name} [runId]`)
156
+ .description("Download a durable run's event history (a fluidgrids.history file for replay)")
157
+ .option('--out <file>', 'Write the history file here instead of printing the events'))
158
+ .option(...OUTPUT_OPTION)
159
+ .action(async (runId, options, command) => {
160
+ const { runHistory } = await import('./commands/runs.js');
161
+ await runHistory(env, runId, withGlobalFormat(options, command));
162
+ });
163
+ }
164
+ function addSignal(parent, env, name) {
165
+ addTargetOptions(parent
166
+ .command(`${name} <runIdOrSignal> [signal]`)
167
+ .description('Send a signal to a run (a durable run, or a canvas run waiting for it): `<runId> <signal>`, or `<signal> --workflow-id <id> --key <key>`')
168
+ .option('--payload <json>', 'Signal payload (JSON)')
169
+ .option('--idempotency-key <key>', 'Deliver at most once for this key'))
170
+ .option(...OUTPUT_OPTION)
171
+ .action(async (first, second, options, command) => {
172
+ const { runSignal } = await import('./commands/runs.js');
173
+ await runSignal(env, first, second, withGlobalFormat(options, command));
174
+ });
175
+ }
176
+ /**
177
+ * Durable-function commands (Phase B): `runs start|describe|history|signal|
178
+ * terminate|stack` on the cli-sdk `runs` group, plus the top-level `history`,
179
+ * `signal`, `replay`, `test`, `run` and `versions list`.
180
+ *
181
+ * Durable-function parity (BOFF-9905 B19): the parity options of `runs start`,
182
+ * run targets (`--workflow-id --key`) on `runs describe|history|signal|cancel|
183
+ * terminate|stack|result`, `runs describe --pending`, `runs result
184
+ * --follow-runs`, `runs count`, `runs stack --metadata`, and `versions
185
+ * rollout|rollout delete|drainage|override`. `runs cancel` replaces the cli-sdk
186
+ * command of the same name.
187
+ */
188
+ export function registerDurable(program, env) {
189
+ const runs = program.commands.find((command) => command.name() === 'runs') ??
190
+ program.command('runs').description('FluidGrids workflow runs');
191
+ runs
192
+ .command('start <workflowKey>')
193
+ .description('Start a durable-function run of a workflow (startWorkflow)')
194
+ .option('--wf-version <version>', 'Version (default: the active version)')
195
+ .option('--fn <name>', 'Workflow function (default: the single exported one)')
196
+ .option('-i, --input <json>', 'Input (JSON)')
197
+ .option('--signal <name[=json]>', 'Signal delivered with the start (repeatable)', collect)
198
+ .option('--idempotency-key <key>', 'Return the existing run for a repeated key')
199
+ // Durable-function parity (BOFF-9905 B19): each needs fluidgrids.durable-parity.
200
+ .option('--workflow-id <id>', 'Workflow id: unique among the open runs of the key')
201
+ .option('--id-reuse <policy>', 'When a closed run has the workflow id: allow-duplicate, allow-duplicate-failed-only or reject-duplicate')
202
+ .option('--id-conflict <policy>', 'When an open run has the workflow id: fail, use-existing or terminate-existing')
203
+ .option('--delay <duration>', 'Start delay (ms, or 1.5s, 5m, 2h, 2w, PT2H; at most 30 days)')
204
+ .option('--run-timeout <duration>', 'Bounds this run; restarts on continue-as-new and retries')
205
+ .option('--execution-timeout <duration>', 'Bounds the whole chain under the workflow id')
206
+ .option('--task-timeout <duration>', 'Workflow-task budget (at most 120 s)')
207
+ .option('--summary <text>', 'One line shown in run lists (at most 200 characters)')
208
+ .option('--details-file <file>', 'Markdown shown on the run page (at most 20 KiB)')
209
+ .option('--memo <json>', "The run's memo (a JSON object)")
210
+ .option('--callback <url>', 'POSTed to with the outcome once the run (its chain) closes')
211
+ .option('--callback-header <name: value>', 'Extra callback request header (repeatable); prefer --callback-header-env for credentials', collect)
212
+ .option('--callback-header-env <name=ENV_VAR>', 'Extra callback request header whose value is read from an environment variable (repeatable)', collect)
213
+ .option('--callback-secret-env <name>', 'Environment variable holding the callback signing secret (never given on the command line)')
214
+ .option('--priority <n>', '1 (highest) to 5 (default 3)')
215
+ .option('--versioning-behavior <behavior>', 'pinned or auto-upgrade')
216
+ .option('--force', 'With --id-conflict terminate-existing: skip the confirmation prompt')
217
+ .option('--wait', 'Wait for the run to finish and print its output')
218
+ .option(...WAIT_OPTIONS.timeout)
219
+ .option(...WAIT_OPTIONS.poll)
220
+ .option(...OUTPUT_OPTION)
221
+ .action(async (workflowKey, options, command) => {
222
+ const { runStart } = await import('./commands/runs.js');
223
+ await runStart(env, workflowKey, withGlobalFormat(options, command));
224
+ });
225
+ addTargetOptions(runs
226
+ .command('describe [runId]')
227
+ .description('A run with its durable fields (kind, function, build, history length, task state)')
228
+ .option('--pending', 'Also show what the run is waiting on (durable-function parity)'))
229
+ .option(...OUTPUT_OPTION)
230
+ .action(async (runId, options, command) => {
231
+ const { runDescribe } = await import('./commands/runs.js');
232
+ await runDescribe(env, runId, withGlobalFormat(options, command));
233
+ });
234
+ addHistory(runs, env, 'history');
235
+ addSignal(runs, env, 'signal');
236
+ // The cli-sdk `runs cancel <id>` is replaced so the command can take a run
237
+ // target; a plain run id behaves as before.
238
+ const sdkCancel = runs.commands.findIndex((command) => command.name() === 'cancel');
239
+ // Commander exposes `commands` read-only, but it is the group's own mutable
240
+ // array and has no removal API; dropping the entry is how a command is replaced.
241
+ if (sdkCancel >= 0)
242
+ runs.commands.splice(sdkCancel, 1);
243
+ addTargetOptions(runs
244
+ .command('cancel [runId]')
245
+ .description('Cancel a run (a durable run records WORKFLOW_CANCEL_REQUESTED; its code decides)'))
246
+ .option(...OUTPUT_OPTION)
247
+ .action(async (runId, options, command) => {
248
+ const { runCancel } = await import('./commands/runs.js');
249
+ await runCancel(env, runId, withGlobalFormat(options, command));
250
+ });
251
+ addTargetOptions(runs
252
+ .command('terminate [runId]')
253
+ .description('Terminate a run now: no further code or node runs (both kinds)')
254
+ .option('--reason <text>', 'Reason recorded on the run')
255
+ .option('--force', 'Skip the confirmation prompt'))
256
+ .option(...OUTPUT_OPTION)
257
+ .action(async (runId, options, command) => {
258
+ const { runTerminate } = await import('./commands/runs.js');
259
+ await runTerminate(env, runId, withGlobalFormat(options, command));
260
+ });
261
+ addTargetOptions(runs
262
+ .command('stack [runId]')
263
+ .description("Where a durable run's code is waiting (the __stack_trace query)")
264
+ .option('--enhanced', 'Structured trace with source locations (__enhanced_stack_trace)')
265
+ .option('--metadata', "Also the run's __metadata (durable-function parity)"))
266
+ .option(...OUTPUT_OPTION)
267
+ .action(async (runId, options, command) => {
268
+ const { runStack } = await import('./commands/runs.js');
269
+ await runStack(env, runId, withGlobalFormat(options, command));
270
+ });
271
+ addTargetOptions(runs
272
+ .command('result [runId]')
273
+ .description('Wait for a run and print its output (or how it ended)')
274
+ .option('--follow-runs', 'Follow continue-as-new and run retries to the run that ends the chain (durable-function parity)')
275
+ .option(...WAIT_OPTIONS.timeout)
276
+ .option(...WAIT_OPTIONS.poll))
277
+ .option(...OUTPUT_OPTION)
278
+ .action(async (runId, options, command) => {
279
+ const { runResult } = await import('./commands/runs.js');
280
+ await runResult(env, runId, withGlobalFormat(options, command));
281
+ });
282
+ runs
283
+ .command('count')
284
+ .description('How many runs match, in total and per group (durable-function parity)')
285
+ .option('--key <workflowKey>', 'Only runs of this workflow key')
286
+ .option('--status <status>', 'Only runs with this status')
287
+ .option('--kind <kind>', 'Only GRAPH or DURABLE_FN runs')
288
+ .option('--workflow-id <id>', 'Only runs with this workflow id')
289
+ .option('--first-run-id <id>', 'Only the chain that started with this run')
290
+ .option('--root-run-id <id>', 'Only runs under this root run')
291
+ .option('--memo <json>', 'Only runs whose memo contains this JSON object')
292
+ .option('--group-by <columns>', 'Up to two of status, workflow-key, execution-kind, task-queue (comma separated)')
293
+ .option(...OUTPUT_OPTION)
294
+ .action(async (options, command) => {
295
+ const { runCount } = await import('./commands/runs.js');
296
+ await runCount(env, withGlobalFormat(options, command));
297
+ });
298
+ addHistory(program, env, 'history');
299
+ addSignal(program, env, 'signal');
300
+ program
301
+ .command('replay <history>')
302
+ .description('Replay a history file (or a run id) against the local code; fails on non-determinism')
303
+ .option('--isolate', 'Replay in the QuickJS isolate the managed workers use')
304
+ .option('--debug', 'Print the full task result (commands, logs, stack)')
305
+ .option(...PROJECT_OPTION)
306
+ .option(...OUTPUT_OPTION)
307
+ .action(async (history, options, command) => {
308
+ const { runReplay } = await import('./commands/replay.js');
309
+ await runReplay(env, history, withGlobalFormat(options, command));
310
+ });
311
+ program
312
+ .command('test')
313
+ .description("Run the project's test script, then replay every *.history.json under --replay")
314
+ .option('--replay <dir>', 'Directory of history files to replay against the local code')
315
+ .option('--isolate', 'Replay in the QuickJS isolate the managed workers use')
316
+ .option('--no-script', 'Do not run the package.json test script')
317
+ .option(...PROJECT_OPTION)
318
+ .option(...OUTPUT_OPTION)
319
+ .action(async (options, command) => {
320
+ const { runTest } = await import('./commands/replay.js');
321
+ await runTest(env, withGlobalFormat(options, command));
322
+ });
323
+ program
324
+ .command('run <workflowKey>')
325
+ .description("Trigger a workflow from its version's trigger node, optionally waiting for the result")
326
+ .option('--wf-version <version>', 'Version (default: the active version, else the newest)')
327
+ .option('--trigger-node <id>', 'Trigger node (default: the only one)')
328
+ .option('-i, --input <json>', 'Trigger data (a JSON object)')
329
+ .option('--test', 'Run in TEST mode instead of PRODUCTION')
330
+ .option('--wait', 'Wait for the run to finish')
331
+ .option(...WAIT_OPTIONS.timeout)
332
+ .option(...WAIT_OPTIONS.poll)
333
+ .option(...OUTPUT_OPTION)
334
+ .action(async (workflowKey, options, command) => {
335
+ const { runRun } = await import('./commands/runs.js');
336
+ await runRun(env, workflowKey, withGlobalFormat(options, command));
337
+ });
338
+ const versions = program
339
+ .command('versions')
340
+ .description('Workflow versions, their code bundles, rollouts and drainage');
341
+ versions
342
+ .command('list <workflowKey>')
343
+ .description('Every stored version with the code bundle it runs')
344
+ .option(...OUTPUT_OPTION)
345
+ .action(async (workflowKey, options, command) => {
346
+ const { runVersionsList } = await import('./commands/versions.js');
347
+ await runVersionsList(env, workflowKey, withGlobalFormat(options, command));
348
+ });
349
+ // Durable-function parity (BOFF-9905 B19, spec code-first 11 §2.27).
350
+ const rollout = versions
351
+ .command('rollout')
352
+ .description('Show the rollouts of a workflow, or send --percent of its new starts to --to (durable-function parity)')
353
+ .argument('<workflowKey>', 'Workflow key')
354
+ .option('--to <version>', 'The version a share of new starts runs')
355
+ .option('--percent <n>', '0 to 100; 100 promotes --to (activates it after its check)')
356
+ .option('--from <version>', 'The ACTIVE version the rollout starts from (the default)')
357
+ .option('--environment <env>', 'PROD (the only one in this release)')
358
+ .option(...OUTPUT_OPTION)
359
+ // The parent and `delete` both declare --environment. Without positional options Commander
360
+ // lets the parent take it from anywhere in argv, so `rollout delete k --environment STAGING`
361
+ // reached `delete` with no environment and the service removed the PROD rollout. With them,
362
+ // every option after `delete` belongs to `delete`.
363
+ .enablePositionalOptions()
364
+ .action(async (workflowKey, options, command) => {
365
+ const { runRollout } = await import('./commands/versions.js');
366
+ await runRollout(env, workflowKey, withGlobalFormat(options, command));
367
+ });
368
+ rollout
369
+ .command('delete <workflowKey>')
370
+ .description('Remove a rollout: new starts run the ACTIVE version again')
371
+ .option('--environment <env>', 'PROD (the default)')
372
+ .option('--force', 'Skip the confirmation prompt')
373
+ .option(...OUTPUT_OPTION)
374
+ .action(async (workflowKey, options, command) => {
375
+ const { runRolloutDelete, rolloutDeleteOptions } = await import('./commands/versions.js');
376
+ await runRolloutDelete(env, workflowKey, withGlobalFormat(rolloutDeleteOptions(options, command.parent?.opts() ?? {}), command));
377
+ });
378
+ versions
379
+ .command('drainage <workflowKey> <version>')
380
+ .description("Whether a version's bundle still serves open runs (durable-function parity)")
381
+ .option(...OUTPUT_OPTION)
382
+ .action(async (workflowKey, version, options, command) => {
383
+ const { runDrainage } = await import('./commands/versions.js');
384
+ await runDrainage(env, workflowKey, version, withGlobalFormat(options, command));
385
+ });
386
+ addTargetOptions(versions
387
+ .command('override [runId]')
388
+ .description("Set or clear a run's versioning override (durable-function parity); a move to another bundle is replay-checked first")
389
+ .option('--pin <version>', "Pin the run to this version's bundle")
390
+ .option('--auto-upgrade', "Move the run to the ACTIVE version's bundle at each task")
391
+ .option('--clear', 'Remove the override')
392
+ .option('--reason <text>', 'Reason recorded on the run'))
393
+ .option(...OUTPUT_OPTION)
394
+ .action(async (runId, options, command) => {
395
+ const { runOverride } = await import('./commands/versions.js');
396
+ await runOverride(env, runId, withGlobalFormat(options, command));
397
+ });
398
+ }
126
399
  //# sourceMappingURL=register.js.map