@fluidgrids/cli 2026.1107.1 → 2026.1109.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 (162) hide show
  1. package/README.md +98 -6
  2. package/dist/cli.js +9705 -33
  3. package/package.json +42 -35
  4. package/dist/auth/device-login.d.ts +0 -31
  5. package/dist/auth/device-login.d.ts.map +0 -1
  6. package/dist/auth/device-login.js +0 -75
  7. package/dist/auth/device-login.js.map +0 -1
  8. package/dist/auth/token-auth.d.ts +0 -49
  9. package/dist/auth/token-auth.d.ts.map +0 -1
  10. package/dist/auth/token-auth.js +0 -279
  11. package/dist/auth/token-auth.js.map +0 -1
  12. package/dist/cli.d.ts +0 -10
  13. package/dist/cli.d.ts.map +0 -1
  14. package/dist/cli.js.map +0 -1
  15. package/dist/code-first/api.d.ts +0 -601
  16. package/dist/code-first/api.d.ts.map +0 -1
  17. package/dist/code-first/api.js +0 -432
  18. package/dist/code-first/api.js.map +0 -1
  19. package/dist/code-first/code-upload.d.ts +0 -53
  20. package/dist/code-first/code-upload.d.ts.map +0 -1
  21. package/dist/code-first/code-upload.js +0 -165
  22. package/dist/code-first/code-upload.js.map +0 -1
  23. package/dist/code-first/commands/codegen.d.ts +0 -20
  24. package/dist/code-first/commands/codegen.d.ts.map +0 -1
  25. package/dist/code-first/commands/codegen.js +0 -50
  26. package/dist/code-first/commands/codegen.js.map +0 -1
  27. package/dist/code-first/commands/diff.d.ts +0 -28
  28. package/dist/code-first/commands/diff.d.ts.map +0 -1
  29. package/dist/code-first/commands/diff.js +0 -73
  30. package/dist/code-first/commands/diff.js.map +0 -1
  31. package/dist/code-first/commands/hotfix.d.ts +0 -54
  32. package/dist/code-first/commands/hotfix.d.ts.map +0 -1
  33. package/dist/code-first/commands/hotfix.js +0 -225
  34. package/dist/code-first/commands/hotfix.js.map +0 -1
  35. package/dist/code-first/commands/import.d.ts +0 -40
  36. package/dist/code-first/commands/import.d.ts.map +0 -1
  37. package/dist/code-first/commands/import.js +0 -235
  38. package/dist/code-first/commands/import.js.map +0 -1
  39. package/dist/code-first/commands/init.d.ts +0 -33
  40. package/dist/code-first/commands/init.d.ts.map +0 -1
  41. package/dist/code-first/commands/init.js +0 -177
  42. package/dist/code-first/commands/init.js.map +0 -1
  43. package/dist/code-first/commands/interface.d.ts +0 -12
  44. package/dist/code-first/commands/interface.d.ts.map +0 -1
  45. package/dist/code-first/commands/interface.js +0 -21
  46. package/dist/code-first/commands/interface.js.map +0 -1
  47. package/dist/code-first/commands/pull.d.ts +0 -63
  48. package/dist/code-first/commands/pull.d.ts.map +0 -1
  49. package/dist/code-first/commands/pull.js +0 -266
  50. package/dist/code-first/commands/pull.js.map +0 -1
  51. package/dist/code-first/commands/push.d.ts +0 -97
  52. package/dist/code-first/commands/push.d.ts.map +0 -1
  53. package/dist/code-first/commands/push.js +0 -313
  54. package/dist/code-first/commands/push.js.map +0 -1
  55. package/dist/code-first/commands/replay.d.ts +0 -44
  56. package/dist/code-first/commands/replay.d.ts.map +0 -1
  57. package/dist/code-first/commands/replay.js +0 -238
  58. package/dist/code-first/commands/replay.js.map +0 -1
  59. package/dist/code-first/commands/runs.d.ts +0 -160
  60. package/dist/code-first/commands/runs.d.ts.map +0 -1
  61. package/dist/code-first/commands/runs.js +0 -565
  62. package/dist/code-first/commands/runs.js.map +0 -1
  63. package/dist/code-first/commands/suite.d.ts +0 -57
  64. package/dist/code-first/commands/suite.d.ts.map +0 -1
  65. package/dist/code-first/commands/suite.js +0 -197
  66. package/dist/code-first/commands/suite.js.map +0 -1
  67. package/dist/code-first/commands/validate.d.ts +0 -38
  68. package/dist/code-first/commands/validate.d.ts.map +0 -1
  69. package/dist/code-first/commands/validate.js +0 -140
  70. package/dist/code-first/commands/validate.js.map +0 -1
  71. package/dist/code-first/commands/versions.d.ts +0 -63
  72. package/dist/code-first/commands/versions.d.ts.map +0 -1
  73. package/dist/code-first/commands/versions.js +0 -204
  74. package/dist/code-first/commands/versions.js.map +0 -1
  75. package/dist/code-first/connections.d.ts +0 -55
  76. package/dist/code-first/connections.d.ts.map +0 -1
  77. package/dist/code-first/connections.js +0 -180
  78. package/dist/code-first/connections.js.map +0 -1
  79. package/dist/code-first/durable-operations.d.ts +0 -41
  80. package/dist/code-first/durable-operations.d.ts.map +0 -1
  81. package/dist/code-first/durable-operations.js +0 -135
  82. package/dist/code-first/durable-operations.js.map +0 -1
  83. package/dist/code-first/history.d.ts +0 -30
  84. package/dist/code-first/history.d.ts.map +0 -1
  85. package/dist/code-first/history.js +0 -139
  86. package/dist/code-first/history.js.map +0 -1
  87. package/dist/code-first/imports.d.ts +0 -22
  88. package/dist/code-first/imports.d.ts.map +0 -1
  89. package/dist/code-first/imports.js +0 -67
  90. package/dist/code-first/imports.js.map +0 -1
  91. package/dist/code-first/index.d.ts +0 -18
  92. package/dist/code-first/index.d.ts.map +0 -1
  93. package/dist/code-first/index.js +0 -36
  94. package/dist/code-first/index.js.map +0 -1
  95. package/dist/code-first/junit.d.ts +0 -24
  96. package/dist/code-first/junit.d.ts.map +0 -1
  97. package/dist/code-first/junit.js +0 -163
  98. package/dist/code-first/junit.js.map +0 -1
  99. package/dist/code-first/lowering.d.ts +0 -94
  100. package/dist/code-first/lowering.d.ts.map +0 -1
  101. package/dist/code-first/lowering.js +0 -248
  102. package/dist/code-first/lowering.js.map +0 -1
  103. package/dist/code-first/operations.d.ts +0 -55
  104. package/dist/code-first/operations.d.ts.map +0 -1
  105. package/dist/code-first/operations.js +0 -165
  106. package/dist/code-first/operations.js.map +0 -1
  107. package/dist/code-first/parity-operations.d.ts +0 -44
  108. package/dist/code-first/parity-operations.d.ts.map +0 -1
  109. package/dist/code-first/parity-operations.js +0 -211
  110. package/dist/code-first/parity-operations.js.map +0 -1
  111. package/dist/code-first/parity.d.ts +0 -83
  112. package/dist/code-first/parity.d.ts.map +0 -1
  113. package/dist/code-first/parity.js +0 -301
  114. package/dist/code-first/parity.js.map +0 -1
  115. package/dist/code-first/presigned.d.ts +0 -21
  116. package/dist/code-first/presigned.d.ts.map +0 -1
  117. package/dist/code-first/presigned.js +0 -85
  118. package/dist/code-first/presigned.js.map +0 -1
  119. package/dist/code-first/project.d.ts +0 -123
  120. package/dist/code-first/project.d.ts.map +0 -1
  121. package/dist/code-first/project.js +0 -301
  122. package/dist/code-first/project.js.map +0 -1
  123. package/dist/code-first/python.d.ts +0 -81
  124. package/dist/code-first/python.d.ts.map +0 -1
  125. package/dist/code-first/python.js +0 -249
  126. package/dist/code-first/python.js.map +0 -1
  127. package/dist/code-first/redact.d.ts +0 -31
  128. package/dist/code-first/redact.d.ts.map +0 -1
  129. package/dist/code-first/redact.js +0 -159
  130. package/dist/code-first/redact.js.map +0 -1
  131. package/dist/code-first/register.d.ts +0 -35
  132. package/dist/code-first/register.d.ts.map +0 -1
  133. package/dist/code-first/register.js +0 -415
  134. package/dist/code-first/register.js.map +0 -1
  135. package/dist/code-first/remote.d.ts +0 -58
  136. package/dist/code-first/remote.d.ts.map +0 -1
  137. package/dist/code-first/remote.js +0 -126
  138. package/dist/code-first/remote.js.map +0 -1
  139. package/dist/code-first/replay.d.ts +0 -36
  140. package/dist/code-first/replay.d.ts.map +0 -1
  141. package/dist/code-first/replay.js +0 -52
  142. package/dist/code-first/replay.js.map +0 -1
  143. package/dist/code-first/shared.d.ts +0 -53
  144. package/dist/code-first/shared.d.ts.map +0 -1
  145. package/dist/code-first/shared.js +0 -94
  146. package/dist/code-first/shared.js.map +0 -1
  147. package/dist/code-first/test-suite-operations.d.ts +0 -16
  148. package/dist/code-first/test-suite-operations.d.ts.map +0 -1
  149. package/dist/code-first/test-suite-operations.js +0 -44
  150. package/dist/code-first/test-suite-operations.js.map +0 -1
  151. package/dist/modules.d.ts +0 -15
  152. package/dist/modules.d.ts.map +0 -1
  153. package/dist/modules.js +0 -61
  154. package/dist/modules.js.map +0 -1
  155. package/dist/product-defaults.d.ts +0 -11
  156. package/dist/product-defaults.d.ts.map +0 -1
  157. package/dist/product-defaults.js +0 -25
  158. package/dist/product-defaults.js.map +0 -1
  159. package/dist/program.d.ts +0 -20
  160. package/dist/program.d.ts.map +0 -1
  161. package/dist/program.js +0 -44
  162. package/dist/program.js.map +0 -1
@@ -1,135 +0,0 @@
1
- /**
2
- * GraphQL documents for durable functions (managed tier-2 workflows, BOFF-9905
3
- * Phase B): code bundle upload and hotfix, durable run start, history, signal,
4
- * terminate and stack trace.
5
- *
6
- * Every document targets the WORKSPACE gateway (wspace-workflow-svc). The names
7
- * and shapes are the Phase B contract (PLAN-B §5 B8 and B9, spec 08 §4). They
8
- * are validated by `tests/code-first/durable-operations.test.ts` against the
9
- * vendored supergraph.
10
- *
11
- * The service gates every operation that starts new durable work
12
- * (`prepareWorkflowCodeUpload`, `replaceWorkflowVersionCode`, `startWorkflow`,
13
- * `signalWorkflowRun` on a DURABLE_FN run, and versions with a `codeBundle`) on
14
- * the `fluidgrids.durable-functions` feature flag, fail closed. A workspace
15
- * without the flag gets a GraphQL error that the CLI prints as it is; the CLI
16
- * never decides the flag itself.
17
- */
18
- const PRESIGNED_PUT_FIELDS = 'url method headers expiresAt alreadyStored';
19
- /** A presigned bundle PUT (skipped when `alreadyStored`) and a presigned source PUT. */
20
- export const CF_PREPARE_WORKFLOW_CODE_UPLOAD = `
21
- mutation FluidgridsCodePrepareWorkflowCodeUpload($input: PrepareWorkflowCodeUploadInput!) {
22
- prepareWorkflowCodeUpload(input: $input) {
23
- uploadId
24
- bundle { ${PRESIGNED_PUT_FIELDS} }
25
- source { ${PRESIGNED_PUT_FIELDS} }
26
- }
27
- }
28
- `;
29
- const CODE_REPLACE_FIELDS = `
30
- id status buildId previousBuildId verifiedRuns
31
- violations { runId seq message }
32
- `;
33
- /** Hotfix: replace the bundle of an existing version; an asynchronous, replay-verified job. */
34
- export const CF_REPLACE_WORKFLOW_VERSION_CODE = `
35
- mutation FluidgridsCodeReplaceWorkflowVersionCode(
36
- $workflowKey: String!
37
- $version: String!
38
- $codeBundle: CodeBundleInput!
39
- $verifyReplay: Boolean
40
- ) {
41
- replaceWorkflowVersionCode(
42
- workflowKey: $workflowKey
43
- version: $version
44
- codeBundle: $codeBundle
45
- verifyReplay: $verifyReplay
46
- ) { ${CODE_REPLACE_FIELDS} }
47
- }
48
- `;
49
- /** Poll a hotfix job. */
50
- export const CF_WORKFLOW_CODE_REPLACE = `
51
- query FluidgridsCodeWorkflowCodeReplace($id: ID!) {
52
- workflowCodeReplace(id: $id) { ${CODE_REPLACE_FIELDS} }
53
- }
54
- `;
55
- /** The code bundle a version references, or null for a version without code. */
56
- export const CF_WORKFLOW_CODE_BUNDLE = `
57
- query FluidgridsCodeWorkflowCodeBundle($workflowKey: String!, $version: String!) {
58
- workflowCodeBundle(workflowKey: $workflowKey, version: $version) {
59
- id buildId language sdkVersion entry exports determinism
60
- bundleBytes sourceBytes compatibleBuildIds replacedAt createdAt
61
- }
62
- }
63
- `;
64
- /** Run fields the durable commands print. */
65
- const DURABLE_RUN_FIELDS = `
66
- id workflowId workflowKey version status mode triggerNodeId
67
- executionKind workflowFn taskQueue buildId historyLength parentClosePolicy
68
- parentRunId rootRunId cancelRequestedAt
69
- createdAt startedAt completedAt errorMessage errorType
70
- determinism { failing cause attempts since lastFailureSeq message }
71
- `;
72
- /** Start a root durable-function run (DB18). */
73
- export const CF_START_WORKFLOW = `
74
- mutation FluidgridsCodeStartWorkflow($input: StartWorkflowInput!) {
75
- startWorkflow(input: $input) {
76
- existing
77
- run { ${DURABLE_RUN_FIELDS} }
78
- }
79
- }
80
- `;
81
- /** One run with its durable fields. */
82
- export const CF_DESCRIBE_RUN = `
83
- query FluidgridsCodeDescribeRun($id: ID!) {
84
- workflowRun(id: $id) { ${DURABLE_RUN_FIELDS} }
85
- }
86
- `;
87
- /** One page of a run's event history. */
88
- export const CF_WORKFLOW_RUN_HISTORY = `
89
- query FluidgridsCodeWorkflowRunHistory($runId: ID!, $after: Int, $limit: Int) {
90
- workflowRunHistory(runId: $runId, after: $after, limit: $limit) {
91
- events { runId seq type taskId payload payloadUrl createdAt }
92
- nextAfter hasMore historyLength historyBytes
93
- }
94
- }
95
- `;
96
- export const CF_SIGNAL_WORKFLOW_RUN = `
97
- mutation FluidgridsCodeSignalWorkflowRun(
98
- $runId: ID!
99
- $name: String!
100
- $payload: JSON
101
- $idempotencyKey: String
102
- ) {
103
- signalWorkflowRun(runId: $runId, name: $name, payload: $payload, idempotencyKey: $idempotencyKey) {
104
- accepted delivered buffered forwardedToRunId seq duplicate
105
- }
106
- }
107
- `;
108
- /** Terminate a run of either kind; no code runs (durable) and no node runs (graph). */
109
- export const CF_TERMINATE_WORKFLOW_RUN = `
110
- mutation FluidgridsCodeTerminateWorkflowRun($runId: ID!, $reason: String) {
111
- terminateWorkflowRun(runId: $runId, reason: $reason) { id status completedAt errorMessage }
112
- }
113
- `;
114
- /** The built-in `__stack_trace` / `__enhanced_stack_trace` query, replayed in the service. */
115
- export const CF_WORKFLOW_RUN_STACK_TRACE = `
116
- query FluidgridsCodeWorkflowRunStackTrace($runId: ID!, $enhanced: Boolean) {
117
- workflowRunStackTrace(runId: $runId, enhanced: $enhanced) { trace enhanced }
118
- }
119
- `;
120
- /** Runs of one workflow key (newest first), for `push --hotfix --replay-sample`. */
121
- export const CF_LIST_RUNS = `
122
- query FluidgridsCodeListRuns($input: ListWorkflowRunsInput!) {
123
- workflowRuns(input: $input) {
124
- items { id workflowKey version status executionKind }
125
- hasMore
126
- }
127
- }
128
- `;
129
- /** Trigger a stored version from one of its trigger nodes (`fluidgrids run`). */
130
- export const CF_TRIGGER_WORKFLOW = `
131
- mutation FluidgridsCodeTriggerWorkflow($input: TriggerWorkflowInput!) {
132
- triggerWorkflow(input: $input) { runId status workflowKey version triggerNodeId }
133
- }
134
- `;
135
- //# sourceMappingURL=durable-operations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"durable-operations.js","sourceRoot":"","sources":["../../src/code-first/durable-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,oBAAoB,GAAG,4CAA4C,CAAC;AAE1E,wFAAwF;AACxF,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;iBAI9B,oBAAoB;iBACpB,oBAAoB;;;CAGpC,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;CAG3B,CAAC;AAEF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;UAYtC,mBAAmB;;CAE5B,CAAC;AAEF,yBAAyB;AACzB,MAAM,CAAC,MAAM,wBAAwB,GAAG;;qCAEH,mBAAmB;;CAEvD,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;CAOtC,CAAC;AAEF,6CAA6C;AAC7C,MAAM,kBAAkB,GAAG;;;;;;CAM1B,CAAC;AAEF,gDAAgD;AAChD,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;cAInB,kBAAkB;;;CAG/B,CAAC;AAEF,uCAAuC;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG;;6BAEF,kBAAkB;;CAE9C,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;CAOtC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;CAWrC,CAAC;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;CAIxC,CAAC;AAEF,8FAA8F;AAC9F,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;CAI1C,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;CAO3B,CAAC;AAEF,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;CAIlC,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * A durable run's history as a `fluidgrids.history` file (C-HIST,
3
- * `schema/history-file.schema.json` of `@fluidgrids/workflows`): every page of
4
- * `workflowRunHistory`, with offloaded payloads fetched through their
5
- * presigned `payloadUrl` and inlined, so the file replays on its own.
6
- */
7
- import { type HistoryFile, type RunEventRecord } from '@fluidgrids/workflows/history';
8
- import { type DurableRun } from './api.js';
9
- import { type CommandEnv } from './shared.js';
10
- /** Events per `workflowRunHistory` page (the service's default and maximum). */
11
- export declare const HISTORY_PAGE_SIZE = 500;
12
- /** Largest offloaded payload the CLI reads (the service's resolved-bytes cap). */
13
- export declare const MAX_OFFLOADED_PAYLOAD_BYTES: number;
14
- export interface FetchedHistory {
15
- run: DurableRun;
16
- file: HistoryFile;
17
- historyBytes: number;
18
- }
19
- /** The run's events, every page, offloaded payloads inlined. */
20
- export declare function fetchRunEvents(env: CommandEnv, runId: string): Promise<{
21
- events: RunEventRecord[];
22
- historyBytes: number;
23
- }>;
24
- /** Refuse a run that has no event history (a canvas run). */
25
- export declare function assertDurable(run: DurableRun): void;
26
- /** Download a durable run's history as a validated history file. */
27
- export declare function fetchHistory(env: CommandEnv, runId: string): Promise<FetchedHistory>;
28
- /** Read and validate a history file from disk. */
29
- export declare function parseHistoryText(text: string, path: string): HistoryFile;
30
- //# sourceMappingURL=history.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/code-first/history.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,cAAc,EAEpB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAa,KAAK,UAAU,EAAuB,MAAM,UAAU,CAAC;AAE3E,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE7D,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,kFAAkF;AAClF,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAoDD,gEAAgE;AAChE,wBAAsB,cAAc,CAClC,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CA2B7D;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,IAAI,CAOnD;AAED,oEAAoE;AACpE,wBAAsB,YAAY,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAmC1F;AAED,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAWxE"}
@@ -1,139 +0,0 @@
1
- /**
2
- * A durable run's history as a `fluidgrids.history` file (C-HIST,
3
- * `schema/history-file.schema.json` of `@fluidgrids/workflows`): every page of
4
- * `workflowRunHistory`, with offloaded payloads fetched through their
5
- * presigned `payloadUrl` and inlined, so the file replays on its own.
6
- */
7
- import { CliUserError } from '@burdenoff/cli-sdk/core';
8
- import { createHistoryFile, HistoryFileError, parseHistoryFile, } from '@fluidgrids/workflows/history';
9
- import { MAX_PAGES } from './api.js';
10
- import { presignedUrl, readCapped } from './presigned.js';
11
- import { describeError } from './shared.js';
12
- /** Events per `workflowRunHistory` page (the service's default and maximum). */
13
- export const HISTORY_PAGE_SIZE = 500;
14
- /** Largest offloaded payload the CLI reads (the service's resolved-bytes cap). */
15
- export const MAX_OFFLOADED_PAYLOAD_BYTES = 64 * 1024 * 1024;
16
- function isRecord(value) {
17
- return typeof value === 'object' && value !== null && !Array.isArray(value);
18
- }
19
- /** A JSON object from a parsed value; the history contract has object payloads only. */
20
- function objectPayload(value, where) {
21
- if (value === null || value === undefined)
22
- return {};
23
- if (!isRecord(value))
24
- throw new CliUserError(`${where}: the payload is not a JSON object.`);
25
- // Parsed JSON (from the gateway or the payload object) is JSON by construction.
26
- return value;
27
- }
28
- async function offloadedPayload(env, event, runId) {
29
- const where = `Run ${runId} event ${event.seq}`;
30
- const raw = event.payloadUrl ?? '';
31
- presignedUrl(raw, `offloaded payload of event ${event.seq}`);
32
- let response;
33
- try {
34
- response = await env.fetch(raw, { method: 'GET' });
35
- }
36
- catch (error) {
37
- // The presigned URL carries a signature; it is never printed.
38
- throw new CliUserError(`${where}: fetching the offloaded payload failed: ${describeError(error)}`);
39
- }
40
- if (!response.ok) {
41
- throw new CliUserError(`${where}: fetching the offloaded payload failed with HTTP ${response.status}.`);
42
- }
43
- const tooLarge = () => new CliUserError(`${where}: the offloaded payload is larger than the history cap (${MAX_OFFLOADED_PAYLOAD_BYTES} bytes).`);
44
- const text = new TextDecoder().decode(await readCapped(response, MAX_OFFLOADED_PAYLOAD_BYTES, tooLarge));
45
- let parsed;
46
- try {
47
- parsed = JSON.parse(text);
48
- }
49
- catch {
50
- throw new CliUserError(`${where}: the offloaded payload is not JSON.`);
51
- }
52
- return objectPayload(parsed, where);
53
- }
54
- /** The run's events, every page, offloaded payloads inlined. */
55
- export async function fetchRunEvents(env, runId) {
56
- const events = [];
57
- let after = 0;
58
- let historyBytes = 0;
59
- for (let page = 0; page < MAX_PAGES; page++) {
60
- const result = await env.api.runHistoryPage(runId, after, HISTORY_PAGE_SIZE);
61
- historyBytes = result.historyBytes;
62
- for (const event of result.events) {
63
- const payload = event.payloadUrl
64
- ? await offloadedPayload(env, event, runId)
65
- : objectPayload(event.payload, `Run ${runId} event ${event.seq}`);
66
- events.push({
67
- seq: event.seq,
68
- // Validated against the event enum by parseHistoryFile below.
69
- type: event.type,
70
- ...(event.taskId ? { taskId: event.taskId } : {}),
71
- payload,
72
- createdAt: event.createdAt,
73
- });
74
- }
75
- const last = result.events[result.events.length - 1];
76
- if (!result.hasMore || !last)
77
- return { events, historyBytes };
78
- after = result.nextAfter ?? last.seq;
79
- }
80
- throw new CliUserError(`The history of run ${runId} did not end after ${MAX_PAGES} pages; refusing to continue.`);
81
- }
82
- /** Refuse a run that has no event history (a canvas run). */
83
- export function assertDurable(run) {
84
- if (run.executionKind !== 'DURABLE_FN') {
85
- throw new CliUserError(`Run ${run.id} is a ${run.executionKind} run; only durable-function runs have an event history.`, { hint: `Use \`fluidgrids runs logs ${run.id}\` for a canvas run.` });
86
- }
87
- }
88
- /** Download a durable run's history as a validated history file. */
89
- export async function fetchHistory(env, runId) {
90
- const run = await env.api.describeRun(runId);
91
- assertDurable(run);
92
- const { events, historyBytes } = await fetchRunEvents(env, runId);
93
- const started = events[0]?.type === 'WORKFLOW_STARTED' ? events[0].payload : undefined;
94
- const workflowFn = run.workflowFn ??
95
- (started && typeof started['workflowFn'] === 'string' ? started['workflowFn'] : undefined);
96
- if (!workflowFn) {
97
- throw new CliUserError(`Run ${runId} records no workflow function.`);
98
- }
99
- const workspaceId = env.ctx.auth.read()?.workspaceId ?? 'unknown';
100
- const file = createHistoryFile(workflowFn, events, {
101
- name: run.id,
102
- info: {
103
- runId: run.id,
104
- workspaceId,
105
- workflowKey: run.workflowKey,
106
- version: run.version,
107
- ...(run.buildId ? { buildId: run.buildId } : {}),
108
- ...(run.taskQueue ? { taskQueue: run.taskQueue } : {}),
109
- parentRunId: run.parentRunId,
110
- rootRunId: run.rootRunId,
111
- },
112
- });
113
- try {
114
- return { run, file: parseHistoryFile(file), historyBytes };
115
- }
116
- catch (error) {
117
- if (error instanceof HistoryFileError) {
118
- throw new CliUserError(`The history of run ${runId} is not a valid history file.`, {
119
- hint: [error.message, ...error.issues].join('\n'),
120
- });
121
- }
122
- throw error;
123
- }
124
- }
125
- /** Read and validate a history file from disk. */
126
- export function parseHistoryText(text, path) {
127
- try {
128
- return parseHistoryFile(text);
129
- }
130
- catch (error) {
131
- if (error instanceof HistoryFileError) {
132
- throw new CliUserError(`${path} is not a valid history file: ${error.message}`, {
133
- ...(error.issues.length > 0 ? { hint: error.issues.join('\n') } : {}),
134
- });
135
- }
136
- throw error;
137
- }
138
- }
139
- //# sourceMappingURL=history.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AAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACtE,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * The project files a set of TypeScript entry modules reaches through
3
- * relative imports, found by a static scan of the import statements.
4
- *
5
- * A durable project's code bundle is built from exactly these files (plus the
6
- * sidecars), and the source archive carries exactly these files, so the
7
- * service's rebuild (`buildBundle` over the archive with the SDK's default
8
- * entries) sees the same modules the CLI bundled. Files no workflow imports,
9
- * such as co-located `*.spec.ts` tests or Node-only scripts under
10
- * `activities/`, stay out of both.
11
- *
12
- * The scan errs on the side of including a file: a commented-out import adds
13
- * a file the bundle does not need, which is harmless. A missed import cannot
14
- * produce a wrong bundle silently: the bundler then fails to resolve it.
15
- */
16
- /** The relative specifiers a module imports at runtime (type-only imports excluded). */
17
- export declare function relativeImports(source: string): string[];
18
- /** The project file a relative specifier names, the way the bundler resolves it. */
19
- export declare function resolveRelative(importer: string, specifier: string, files: ReadonlySet<string>): string | undefined;
20
- /** Every file in `sources` the entries reach, the entries included. */
21
- export declare function importClosure(sources: ReadonlyMap<string, string>, entries: readonly string[]): Set<string>;
22
- //# sourceMappingURL=imports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/code-first/imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAaxD;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,MAAM,GAAG,SAAS,CAMpB;AAED,uEAAuE;AACvE,wBAAgB,aAAa,CAC3B,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,GAAG,CAAC,MAAM,CAAC,CAab"}
@@ -1,67 +0,0 @@
1
- /**
2
- * The project files a set of TypeScript entry modules reaches through
3
- * relative imports, found by a static scan of the import statements.
4
- *
5
- * A durable project's code bundle is built from exactly these files (plus the
6
- * sidecars), and the source archive carries exactly these files, so the
7
- * service's rebuild (`buildBundle` over the archive with the SDK's default
8
- * entries) sees the same modules the CLI bundled. Files no workflow imports,
9
- * such as co-located `*.spec.ts` tests or Node-only scripts under
10
- * `activities/`, stay out of both.
11
- *
12
- * The scan errs on the side of including a file: a commented-out import adds
13
- * a file the bundle does not need, which is harmless. A missed import cannot
14
- * produce a wrong bundle silently: the bundler then fails to resolve it.
15
- */
16
- import { posix } from 'path';
17
- /** `import … from '…'` and `export … from '…'`, with an optional `type` modifier. */
18
- const FROM_CLAUSE = /\b(import|export)(\s+type\b)?[^'"`;]*?\bfrom\s*(['"])([^'"\r\n]+)\3/g;
19
- /** `import '…'` (side effects only). */
20
- const BARE_IMPORT = /\bimport\s*(['"])([^'"\r\n]+)\1/g;
21
- /** `import('…')`. */
22
- const DYNAMIC_IMPORT = /\bimport\s*\(\s*(['"])([^'"\r\n]+)\1\s*\)/g;
23
- /** The relative specifiers a module imports at runtime (type-only imports excluded). */
24
- export function relativeImports(source) {
25
- const found = [];
26
- for (const match of source.matchAll(FROM_CLAUSE)) {
27
- const specifier = match[4];
28
- if (match[2] === undefined && specifier !== undefined)
29
- found.push(specifier);
30
- }
31
- for (const match of source.matchAll(BARE_IMPORT)) {
32
- if (match[2] !== undefined)
33
- found.push(match[2]);
34
- }
35
- for (const match of source.matchAll(DYNAMIC_IMPORT)) {
36
- if (match[2] !== undefined)
37
- found.push(match[2]);
38
- }
39
- return found.filter((specifier) => specifier.startsWith('./') || specifier.startsWith('../'));
40
- }
41
- /** The project file a relative specifier names, the way the bundler resolves it. */
42
- export function resolveRelative(importer, specifier, files) {
43
- const base = posix.normalize(posix.join(posix.dirname(importer), specifier));
44
- const candidates = [base];
45
- if (/\.m?js$/.test(base))
46
- candidates.push(base.replace(/\.(m?)js$/, '.$1ts'));
47
- candidates.push(`${base}.ts`, `${base}/index.ts`);
48
- return candidates.find((candidate) => files.has(candidate));
49
- }
50
- /** Every file in `sources` the entries reach, the entries included. */
51
- export function importClosure(sources, entries) {
52
- const paths = new Set(sources.keys());
53
- const reached = new Set();
54
- const pending = entries.filter((entry) => paths.has(entry));
55
- for (let path = pending.pop(); path !== undefined; path = pending.pop()) {
56
- if (reached.has(path))
57
- continue;
58
- reached.add(path);
59
- for (const specifier of relativeImports(sources.get(path) ?? '')) {
60
- const target = resolveRelative(path, specifier, paths);
61
- if (target !== undefined && !reached.has(target))
62
- pending.push(target);
63
- }
64
- }
65
- return reached;
66
- }
67
- //# sourceMappingURL=imports.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imports.js","sourceRoot":"","sources":["../../src/code-first/imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,qFAAqF;AACrF,MAAM,WAAW,GAAG,sEAAsE,CAAC;AAC3F,wCAAwC;AACxC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AACvD,qBAAqB;AACrB,MAAM,cAAc,GAAG,4CAA4C,CAAC;AAEpE,wFAAwF;AACxF,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACjD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;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,CAAC,CAAC;AAC9D,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,aAAa,CAC3B,OAAoC,EACpC,OAA0B;IAE1B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,KAAK,SAAS,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACxE,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAS;QAChC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,KAAK,MAAM,SAAS,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YACjE,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;YACvD,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * The code-first commands (spec 07 §7, Phase A): `init`, `codegen`, `pull`,
3
- * `push`, `diff`, `validate`, plus `import` (a new workflow from one file,
4
- * through the service's import path) and `interface`; and the durable-function
5
- * commands of Phase B (`push --hotfix`, `runs start|describe|history|signal|
6
- * terminate|stack`, `history`, `signal`, `replay`, `test`, `run`,
7
- * `versions list`). `test <workflowKey>` runs a workflow's saved test cases on
8
- * the service (BOFF-9960) and needs neither a project nor `@fluidgrids/workflows`.
9
- *
10
- * Product-local rather than in `@burdenoff/cli-sdk`: they depend on
11
- * `@fluidgrids/workflows` (esbuild, Prettier, QuickJS), which the other product
12
- * CLIs built on cli-sdk must not pull in. The implementations load on first
13
- * use (see `register.ts`), so the other commands do not pay for them.
14
- */
15
- import type { CliModule } from '@burdenoff/cli-sdk/core';
16
- declare const codeFirstModule: CliModule;
17
- export default codeFirstModule;
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/code-first/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAezD,QAAA,MAAM,eAAe,EAAE,SAiBtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * The code-first commands (spec 07 §7, Phase A): `init`, `codegen`, `pull`,
3
- * `push`, `diff`, `validate`, plus `import` (a new workflow from one file,
4
- * through the service's import path) and `interface`; and the durable-function
5
- * commands of Phase B (`push --hotfix`, `runs start|describe|history|signal|
6
- * terminate|stack`, `history`, `signal`, `replay`, `test`, `run`,
7
- * `versions list`). `test <workflowKey>` runs a workflow's saved test cases on
8
- * the service (BOFF-9960) and needs neither a project nor `@fluidgrids/workflows`.
9
- *
10
- * Product-local rather than in `@burdenoff/cli-sdk`: they depend on
11
- * `@fluidgrids/workflows` (esbuild, Prettier, QuickJS), which the other product
12
- * CLIs built on cli-sdk must not pull in. The implementations load on first
13
- * use (see `register.ts`), so the other commands do not pay for them.
14
- */
15
- import { registerCodegen, registerDiff, registerDurable, registerImport, registerInit, registerInterface, registerPull, registerPush, registerValidate, } from './register.js';
16
- import { createCommandEnv } from './shared.js';
17
- const codeFirstModule = {
18
- id: 'fluidgrids-code-first',
19
- version: '1.0.0',
20
- displayName: 'FluidGrids code-first workflows',
21
- dependsOn: ['auth', 'fluidgrids'],
22
- register(program, ctx) {
23
- const env = createCommandEnv(ctx);
24
- registerInit(program, env);
25
- registerCodegen(program, env);
26
- registerPull(program, env);
27
- registerPush(program, env);
28
- registerDiff(program, env);
29
- registerValidate(program, env);
30
- registerImport(program, env);
31
- registerInterface(program, env);
32
- registerDurable(program, env);
33
- },
34
- };
35
- export default codeFirstModule;
36
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/code-first/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,eAAe,GAAc;IACjC,EAAE,EAAE,uBAAuB;IAC3B,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,iCAAiC;IAC9C,SAAS,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,GAAG;QACnB,MAAM,GAAG,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAClC,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC9B,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC/B,cAAc,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC7B,iBAAiB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAChC,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;CACF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * JUnit XML for a workflow test suite run (`fluidgrids test <key> --junit`),
3
- * the report format CI systems (GitHub Actions reporters, GitLab, Jenkins,
4
- * Azure DevOps) read.
5
- *
6
- * One `<testsuite>` per suite run and one `<testcase>` per test case:
7
- * - PASSED: an empty `<testcase>`;
8
- * - FAILED: a `<failure>` (an assertion did not hold, or the run did not end
9
- * as the case expects);
10
- * - ERROR: an `<error>` (the case could not run);
11
- * - PENDING or RUNNING, when the CLI stopped waiting first: an `<error>` of type
12
- * NOT_FINISHED, so an unfinished case never reads as a pass.
13
- *
14
- * `time` is the seconds from the suite's start to the case's completion: the
15
- * service records when a case finished, not when its run started.
16
- */
17
- import type { WorkflowTestSuite } from './api.js';
18
- /** Text safe for an XML attribute value or element content. */
19
- export declare function escapeXml(value: string): string;
20
- /** Seconds between two ISO instants, 3 decimals; 0 when either is missing or unparsable. */
21
- export declare function elapsedSeconds(from: string | null, to: string | null): string;
22
- /** The JUnit XML document for a suite run (final or not). */
23
- export declare function suiteToJUnit(suite: WorkflowTestSuite): string;
24
- //# sourceMappingURL=junit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"junit.d.ts","sourceRoot":"","sources":["../../src/code-first/junit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAqB1E,+DAA+D;AAC/D,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA8B/C;AAQD,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAK7E;AAoCD,6DAA6D;AAC7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CA4D7D"}