@fluidgrids/cli 2026.1108.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 (238) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +9705 -33
  3. package/package.json +36 -32
  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 -607
  16. package/dist/code-first/api.d.ts.map +0 -1
  17. package/dist/code-first/api.js +0 -438
  18. package/dist/code-first/api.js.map +0 -1
  19. package/dist/code-first/code-upload.d.ts +0 -68
  20. package/dist/code-first/code-upload.d.ts.map +0 -1
  21. package/dist/code-first/code-upload.js +0 -223
  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 -55
  32. package/dist/code-first/commands/hotfix.d.ts.map +0 -1
  33. package/dist/code-first/commands/hotfix.js +0 -231
  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 -104
  52. package/dist/code-first/commands/push.d.ts.map +0 -1
  53. package/dist/code-first/commands/push.js +0 -320
  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 -271
  58. package/dist/code-first/commands/replay.js.map +0 -1
  59. package/dist/code-first/commands/runs.d.ts +0 -168
  60. package/dist/code-first/commands/runs.d.ts.map +0 -1
  61. package/dist/code-first/commands/runs.js +0 -598
  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 -104
  100. package/dist/code-first/lowering.d.ts.map +0 -1
  101. package/dist/code-first/lowering.js +0 -254
  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 -130
  120. package/dist/code-first/project.d.ts.map +0 -1
  121. package/dist/code-first/project.js +0 -308
  122. package/dist/code-first/project.js.map +0 -1
  123. package/dist/code-first/python-build.d.ts +0 -78
  124. package/dist/code-first/python-build.d.ts.map +0 -1
  125. package/dist/code-first/python-build.js +0 -268
  126. package/dist/code-first/python-build.js.map +0 -1
  127. package/dist/code-first/python.d.ts +0 -103
  128. package/dist/code-first/python.d.ts.map +0 -1
  129. package/dist/code-first/python.js +0 -260
  130. package/dist/code-first/python.js.map +0 -1
  131. package/dist/code-first/redact.d.ts +0 -31
  132. package/dist/code-first/redact.d.ts.map +0 -1
  133. package/dist/code-first/redact.js +0 -159
  134. package/dist/code-first/redact.js.map +0 -1
  135. package/dist/code-first/register.d.ts +0 -35
  136. package/dist/code-first/register.d.ts.map +0 -1
  137. package/dist/code-first/register.js +0 -420
  138. package/dist/code-first/register.js.map +0 -1
  139. package/dist/code-first/remote.d.ts +0 -58
  140. package/dist/code-first/remote.d.ts.map +0 -1
  141. package/dist/code-first/remote.js +0 -126
  142. package/dist/code-first/remote.js.map +0 -1
  143. package/dist/code-first/replay.d.ts +0 -36
  144. package/dist/code-first/replay.d.ts.map +0 -1
  145. package/dist/code-first/replay.js +0 -52
  146. package/dist/code-first/replay.js.map +0 -1
  147. package/dist/code-first/shared.d.ts +0 -53
  148. package/dist/code-first/shared.d.ts.map +0 -1
  149. package/dist/code-first/shared.js +0 -94
  150. package/dist/code-first/shared.js.map +0 -1
  151. package/dist/code-first/test-suite-operations.d.ts +0 -16
  152. package/dist/code-first/test-suite-operations.d.ts.map +0 -1
  153. package/dist/code-first/test-suite-operations.js +0 -44
  154. package/dist/code-first/test-suite-operations.js.map +0 -1
  155. package/dist/config/apply.d.ts +0 -51
  156. package/dist/config/apply.d.ts.map +0 -1
  157. package/dist/config/apply.js +0 -121
  158. package/dist/config/apply.js.map +0 -1
  159. package/dist/config/commands.d.ts +0 -58
  160. package/dist/config/commands.d.ts.map +0 -1
  161. package/dist/config/commands.js +0 -252
  162. package/dist/config/commands.js.map +0 -1
  163. package/dist/config/profiles.d.ts +0 -108
  164. package/dist/config/profiles.d.ts.map +0 -1
  165. package/dist/config/profiles.js +0 -339
  166. package/dist/config/profiles.js.map +0 -1
  167. package/dist/flag-hint.d.ts +0 -46
  168. package/dist/flag-hint.d.ts.map +0 -1
  169. package/dist/flag-hint.js +0 -114
  170. package/dist/flag-hint.js.map +0 -1
  171. package/dist/modules.d.ts +0 -17
  172. package/dist/modules.d.ts.map +0 -1
  173. package/dist/modules.js +0 -65
  174. package/dist/modules.js.map +0 -1
  175. package/dist/phase-c/api.d.ts +0 -433
  176. package/dist/phase-c/api.d.ts.map +0 -1
  177. package/dist/phase-c/api.js +0 -334
  178. package/dist/phase-c/api.js.map +0 -1
  179. package/dist/phase-c/commands/activities.d.ts +0 -119
  180. package/dist/phase-c/commands/activities.d.ts.map +0 -1
  181. package/dist/phase-c/commands/activities.js +0 -287
  182. package/dist/phase-c/commands/activities.js.map +0 -1
  183. package/dist/phase-c/commands/batch.d.ts +0 -90
  184. package/dist/phase-c/commands/batch.d.ts.map +0 -1
  185. package/dist/phase-c/commands/batch.js +0 -296
  186. package/dist/phase-c/commands/batch.js.map +0 -1
  187. package/dist/phase-c/commands/queues.d.ts +0 -67
  188. package/dist/phase-c/commands/queues.d.ts.map +0 -1
  189. package/dist/phase-c/commands/queues.js +0 -183
  190. package/dist/phase-c/commands/queues.js.map +0 -1
  191. package/dist/phase-c/commands/run-control.d.ts +0 -76
  192. package/dist/phase-c/commands/run-control.d.ts.map +0 -1
  193. package/dist/phase-c/commands/run-control.js +0 -245
  194. package/dist/phase-c/commands/run-control.js.map +0 -1
  195. package/dist/phase-c/commands/schedules.d.ts +0 -63
  196. package/dist/phase-c/commands/schedules.d.ts.map +0 -1
  197. package/dist/phase-c/commands/schedules.js +0 -198
  198. package/dist/phase-c/commands/schedules.js.map +0 -1
  199. package/dist/phase-c/commands/search-attributes.d.ts +0 -30
  200. package/dist/phase-c/commands/search-attributes.d.ts.map +0 -1
  201. package/dist/phase-c/commands/search-attributes.js +0 -70
  202. package/dist/phase-c/commands/search-attributes.js.map +0 -1
  203. package/dist/phase-c/commands/signal-tokens.d.ts +0 -27
  204. package/dist/phase-c/commands/signal-tokens.d.ts.map +0 -1
  205. package/dist/phase-c/commands/signal-tokens.js +0 -68
  206. package/dist/phase-c/commands/signal-tokens.js.map +0 -1
  207. package/dist/phase-c/commands/worker-run.d.ts +0 -109
  208. package/dist/phase-c/commands/worker-run.d.ts.map +0 -1
  209. package/dist/phase-c/commands/worker-run.js +0 -484
  210. package/dist/phase-c/commands/worker-run.js.map +0 -1
  211. package/dist/phase-c/commands/workers.d.ts +0 -46
  212. package/dist/phase-c/commands/workers.d.ts.map +0 -1
  213. package/dist/phase-c/commands/workers.js +0 -140
  214. package/dist/phase-c/commands/workers.js.map +0 -1
  215. package/dist/phase-c/index.d.ts +0 -16
  216. package/dist/phase-c/index.d.ts.map +0 -1
  217. package/dist/phase-c/index.js +0 -25
  218. package/dist/phase-c/index.js.map +0 -1
  219. package/dist/phase-c/operations.d.ts +0 -67
  220. package/dist/phase-c/operations.d.ts.map +0 -1
  221. package/dist/phase-c/operations.js +0 -559
  222. package/dist/phase-c/operations.js.map +0 -1
  223. package/dist/phase-c/register.d.ts +0 -39
  224. package/dist/phase-c/register.d.ts.map +0 -1
  225. package/dist/phase-c/register.js +0 -678
  226. package/dist/phase-c/register.js.map +0 -1
  227. package/dist/phase-c/shared.d.ts +0 -44
  228. package/dist/phase-c/shared.d.ts.map +0 -1
  229. package/dist/phase-c/shared.js +0 -146
  230. package/dist/phase-c/shared.js.map +0 -1
  231. package/dist/product-defaults.d.ts +0 -11
  232. package/dist/product-defaults.d.ts.map +0 -1
  233. package/dist/product-defaults.js +0 -25
  234. package/dist/product-defaults.js.map +0 -1
  235. package/dist/program.d.ts +0 -25
  236. package/dist/program.d.ts.map +0 -1
  237. package/dist/program.js +0 -60
  238. package/dist/program.js.map +0 -1
@@ -1,104 +0,0 @@
1
- /**
2
- * `fluidgrids push [key…] [--dry-run]`: lower the project locally and create a
3
- * version for every workflow whose IR changed (spec 07 §4, Phase A).
4
- *
5
- * - An existing key gets `createWorkflowVersion`; a new key gets `importWorkflow`
6
- * (a DRAFT, with the installed-node check and the workflow-count quota).
7
- * - Unchanged workflows (same `irHash` as the latest version) get no version.
8
- * - The result prints `workflowVersionDiff` between the previous latest version
9
- * and the new one.
10
- * - Connection names resolve in the target workspace; a name that does not
11
- * resolve fails the push before anything is written.
12
- * - Every workflow is validated locally first, so a push is all-or-nothing up
13
- * to the first service-side refusal.
14
- * - A workflow whose latest stored version is newer than the one `lock.json`
15
- * records (changed on the canvas or pushed from elsewhere since the pull) is
16
- * refused, unless `--force` is given, so a push never silently reverts it.
17
- *
18
- * Durable functions (Phase B, BOFF-9905):
19
- * - A workflow whose definition carries a `code` block (tier-2 `workflow()`
20
- * functions, or a tier-1 graph with `wf.codeWorkflow`) gets its version with
21
- * `codeBundle`: the bundle is uploaded through `prepareWorkflowCodeUpload`
22
- * (see `code-upload.ts`). One bundle serves every version of the push.
23
- * - Findings in the sources (`durable.phaseC`, `durable.activityTypeNotAllowed`)
24
- * refuse the push before anything is written.
25
- * - Phase C (BOFF-9906): the bundle is also written to `.fluidgrids/build/`
26
- * (`bundle.mjs`, or `bundle.pyz`), so `fluidgrids worker run` serves the
27
- * bytes and `buildId` the version records (CWD8). Python durable functions
28
- * are built with the Python SDK's `build_project` and uploaded as a `.pyz`
29
- * (`prepareWorkflowCodeUpload(language: python)`); the service refuses them
30
- * unless fluidgrids.python-durable-functions is on. Self-hosted task queues
31
- * and user activities are no longer refused here: the service decides with
32
- * fluidgrids.self-hosted-workers.
33
- * - `--hotfix <version>` replaces the bundle of an existing version instead
34
- * (see `hotfix.ts`).
35
- * - `lock.json` records `{buildId, sourceHash, sdkVersion}` of the bundle and
36
- * the `buildId` of each version that references it.
37
- */
38
- import { type DurableIssue, type LocalWorkflow, type LoweredProject } from '../lowering.js';
39
- import { type Project } from '../project.js';
40
- import { RemoteWorkflows } from '../remote.js';
41
- import { type CommandEnv, type ProjectOptions } from '../shared.js';
42
- export interface PushOptions extends ProjectOptions {
43
- dryRun?: boolean;
44
- message?: string;
45
- /** Push even over versions created in the workspace after the project pulled the workflow. */
46
- force?: boolean;
47
- /** Replace the code bundle of this existing version instead of creating a version. */
48
- hotfix?: string;
49
- /** With `--hotfix`: replay this many recent runs of the version locally first. */
50
- replaySample?: string;
51
- /** With `--hotfix`: false skips the service's replay verification (audited). */
52
- verifyReplay?: boolean;
53
- /** With `--hotfix`: how long to wait for the replacement job, in milliseconds. */
54
- timeout?: string;
55
- }
56
- export type PushAction = 'created' | 'versioned' | 'unchanged' | 'would-create' | 'would-version';
57
- export interface PushItem {
58
- key: string;
59
- action: PushAction;
60
- fromVersion: string | null;
61
- toVersion: string | null;
62
- irHash: string;
63
- /** `workflowVersionDiff` entries after a push; the local diff on a dry run. */
64
- changes: Array<{
65
- path: string;
66
- kind: string;
67
- before?: unknown;
68
- after?: unknown;
69
- }>;
70
- truncated: boolean;
71
- warnings: string[];
72
- /** The code bundle the version references; null for a graph-only workflow. */
73
- bundle: {
74
- buildId: string;
75
- uploaded: boolean;
76
- } | null;
77
- }
78
- export interface PushResult {
79
- dryRun: boolean;
80
- buildId: string | null;
81
- sourceHash: string | null;
82
- workflows: PushItem[];
83
- }
84
- /** The sentence `push` and `validate` give for durable-function findings. */
85
- export declare function durableSummary(issues: readonly DurableIssue[]): string;
86
- /** Refuse a project with durable-function findings, before anything is written. */
87
- export declare function assertNoDurableIssues(issues: readonly DurableIssue[]): void;
88
- /** The `buildId` a definition's `code` block records. */
89
- export declare function codeBuildId(workflow: LocalWorkflow): string | undefined;
90
- /** What a push works from: the project, its lowering and the selected workflows. */
91
- export interface PushInputs {
92
- project: Project;
93
- lowered: LoweredProject;
94
- selected: LocalWorkflow[];
95
- remote: RemoteWorkflows;
96
- }
97
- /**
98
- * Load, lower and validate the project for a push (and a hotfix): connection
99
- * names resolve in the workspace, the named keys must exist, every selected
100
- * workflow must validate, and durable-function findings refuse the push.
101
- */
102
- export declare function loadPushInputs(env: CommandEnv, keys: readonly string[], options: PushOptions): Promise<PushInputs>;
103
- export declare function runPush(env: CommandEnv, keys: readonly string[], options: PushOptions): Promise<PushResult>;
104
- //# sourceMappingURL=push.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../../src/code-first/commands/push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAcH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,eAAe,EAEhB,MAAM,cAAc,CAAC;AACtB,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5F,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sFAAsF;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,cAAc,GAAG,eAAe,CAAC;AAElG,MAAM,WAAW,QAAQ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C,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CA8BrB;AAED,wBAAsB,OAAO,CAC3B,GAAG,EAAE,UAAU,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CAqMrB"}
@@ -1,320 +0,0 @@
1
- /**
2
- * `fluidgrids push [key…] [--dry-run]`: lower the project locally and create a
3
- * version for every workflow whose IR changed (spec 07 §4, Phase A).
4
- *
5
- * - An existing key gets `createWorkflowVersion`; a new key gets `importWorkflow`
6
- * (a DRAFT, with the installed-node check and the workflow-count quota).
7
- * - Unchanged workflows (same `irHash` as the latest version) get no version.
8
- * - The result prints `workflowVersionDiff` between the previous latest version
9
- * and the new one.
10
- * - Connection names resolve in the target workspace; a name that does not
11
- * resolve fails the push before anything is written.
12
- * - Every workflow is validated locally first, so a push is all-or-nothing up
13
- * to the first service-side refusal.
14
- * - A workflow whose latest stored version is newer than the one `lock.json`
15
- * records (changed on the canvas or pushed from elsewhere since the pull) is
16
- * refused, unless `--force` is given, so a push never silently reverts it.
17
- *
18
- * Durable functions (Phase B, BOFF-9905):
19
- * - A workflow whose definition carries a `code` block (tier-2 `workflow()`
20
- * functions, or a tier-1 graph with `wf.codeWorkflow`) gets its version with
21
- * `codeBundle`: the bundle is uploaded through `prepareWorkflowCodeUpload`
22
- * (see `code-upload.ts`). One bundle serves every version of the push.
23
- * - Findings in the sources (`durable.phaseC`, `durable.activityTypeNotAllowed`)
24
- * refuse the push before anything is written.
25
- * - Phase C (BOFF-9906): the bundle is also written to `.fluidgrids/build/`
26
- * (`bundle.mjs`, or `bundle.pyz`), so `fluidgrids worker run` serves the
27
- * bytes and `buildId` the version records (CWD8). Python durable functions
28
- * are built with the Python SDK's `build_project` and uploaded as a `.pyz`
29
- * (`prepareWorkflowCodeUpload(language: python)`); the service refuses them
30
- * unless fluidgrids.python-durable-functions is on. Self-hosted task queues
31
- * and user activities are no longer refused here: the service decides with
32
- * fluidgrids.self-hosted-workers.
33
- * - `--hotfix <version>` replaces the bundle of an existing version instead
34
- * (see `hotfix.ts`).
35
- * - `lock.json` records `{buildId, sourceHash, sdkVersion}` of the bundle and
36
- * the `buildId` of each version that references it.
37
- */
38
- import { diffDefinitions, irHash, validate } from '@fluidgrids/workflows/ir';
39
- import { CliUserError } from '@burdenoff/cli-sdk/core';
40
- import { bundleCodeBlock, codeBundleInput, prepareProjectBundle, uploadBundle, } from '../code-upload.js';
41
- import { explainUnresolved } from '../connections.js';
42
- import { lowerProject, } from '../lowering.js';
43
- import { assertProjectWorkspace, loadProject, writeLock, } from '../project.js';
44
- import { comparableRemote, outgoingDefinition, projectConnectionIndex, RemoteWorkflows, sameContent, } from '../remote.js';
45
- import { emit, requireKnownKeys } from '../shared.js';
46
- /** The sentence `push` and `validate` give for durable-function findings. */
47
- export function durableSummary(issues) {
48
- return issues.some((issue) => issue.code === 'durable.phaseC')
49
- ? 'The project uses durable-function features that arrive in Phase C'
50
- : 'The project uses durable-function features this release refuses';
51
- }
52
- /** Refuse a project with durable-function findings, before anything is written. */
53
- export function assertNoDurableIssues(issues) {
54
- if (issues.length === 0)
55
- return;
56
- const lines = issues.map((issue) => `${issue.key ? `${issue.key}: ` : ''}${issue.code}: ${issue.message}`);
57
- throw new CliUserError(`${durableSummary(issues)}; nothing was pushed.`, {
58
- hint: lines.join('\n'),
59
- });
60
- }
61
- function localChanges(changes) {
62
- return changes.map((change) => ({
63
- path: change.path,
64
- kind: change.kind.toUpperCase(),
65
- ...(change.before !== undefined ? { before: change.before } : {}),
66
- ...(change.after !== undefined ? { after: change.after } : {}),
67
- }));
68
- }
69
- function lockEntry(workflow, version, hash) {
70
- const buildId = workflow.durable ? codeBuildId(workflow) : undefined;
71
- return {
72
- version,
73
- irHash: hash,
74
- format: workflow.format,
75
- path: workflow.path,
76
- ...(buildId ? { buildId } : {}),
77
- };
78
- }
79
- function isRecord(value) {
80
- return typeof value === 'object' && value !== null && !Array.isArray(value);
81
- }
82
- /** The `buildId` a definition's `code` block records. */
83
- export function codeBuildId(workflow) {
84
- const code = workflow.definition['code'];
85
- if (!isRecord(code))
86
- return undefined;
87
- const buildId = code['buildId'];
88
- return typeof buildId === 'string' ? buildId : undefined;
89
- }
90
- function validationErrors(workflows) {
91
- const errors = [];
92
- for (const workflow of workflows) {
93
- const result = validate(workflow.definition);
94
- for (const issue of result.errors) {
95
- const where = [issue.nodeId, issue.path].filter(Boolean).join(' ');
96
- errors.push(`${workflow.key}: ${issue.code}${where ? ` (${where})` : ''}: ${issue.message}`);
97
- }
98
- }
99
- return errors;
100
- }
101
- /**
102
- * Load, lower and validate the project for a push (and a hotfix): connection
103
- * names resolve in the workspace, the named keys must exist, every selected
104
- * workflow must validate, and durable-function findings refuse the push.
105
- */
106
- export async function loadPushInputs(env, keys, options) {
107
- const project = loadProject(options.project, env.cwd());
108
- assertProjectWorkspace(env, project);
109
- const remote = new RemoteWorkflows(env.api, 'latest');
110
- const index = await projectConnectionIndex(env.api, project, keys, remote);
111
- const lowered = await lowerProject(project, {
112
- connections: (name) => (Object.hasOwn(index.refs, name) ? index.refs[name] : undefined),
113
- connectionNames: Object.keys(index.refs),
114
- explainUnresolved: (names) => explainUnresolved(names, index),
115
- });
116
- const defined = lowered.workflows.map((workflow) => workflow.key);
117
- requireKnownKeys(keys, defined);
118
- const selected = keys.length > 0
119
- ? lowered.workflows.filter((workflow) => keys.includes(workflow.key))
120
- : lowered.workflows;
121
- if (selected.length === 0) {
122
- throw new CliUserError('The project defines no workflows to push.', {
123
- hint: 'Add workflows/<key>.ts|.py, or pull one with `fluidgrids pull <key>`.',
124
- });
125
- }
126
- // Phase C features first: their definitions may not validate in this release.
127
- assertNoDurableIssues(lowered.issues);
128
- const errors = validationErrors(selected);
129
- if (errors.length > 0) {
130
- throw new CliUserError(`Validation failed; nothing was pushed.`, { hint: errors.join('\n') });
131
- }
132
- return { project, lowered, selected, remote };
133
- }
134
- export async function runPush(env, keys, options) {
135
- if (options.hotfix !== undefined) {
136
- throw new CliUserError('`--hotfix` is handled by runHotfix.');
137
- }
138
- const { project, lowered, selected, remote } = await loadPushInputs(env, keys, options);
139
- // A workflow that changed in the workspace after the project pulled it (a
140
- // canvas edit, someone else's push) would get a version built from the local
141
- // code alone, silently reverting those changes. Refuse before anything is
142
- // written, unless --force says to push over them.
143
- const stale = new Map();
144
- for (const workflow of selected) {
145
- const tracked = project.lock.workflows[workflow.key];
146
- const base = (await remote.get(workflow.key)).export;
147
- if (!tracked || !base || tracked.version === base.version)
148
- continue;
149
- const baseDefinition = comparableRemote(base.definitionJson, workflow.key);
150
- if (sameContent(outgoingDefinition(workflow.definition, baseDefinition), baseDefinition)) {
151
- continue;
152
- }
153
- stale.set(workflow.key, `${workflow.key} was pulled as ${tracked.version}, but the workspace now has ${base.version}`);
154
- }
155
- if (stale.size > 0 && !options.force && !options.dryRun) {
156
- throw new CliUserError('The workspace changed since the last pull; nothing was pushed.', {
157
- hint: [
158
- ...stale.values(),
159
- 'Run `fluidgrids pull <key>` and re-apply the local edits, or pass --force to push over the newer versions.',
160
- ].join('\n'),
161
- });
162
- }
163
- const bundleOf = (workflow, uploaded) => workflow.durable && lowered.buildId ? { buildId: lowered.buildId, uploaded } : null;
164
- // Decide every workflow's action first, so the local refusals (bundle and
165
- // source-archive caps, a missing bundle, a buildId mismatch) happen before
166
- // the first version is written, and on a dry run too.
167
- const plans = [];
168
- for (const workflow of selected) {
169
- const base = (await remote.get(workflow.key)).export;
170
- const baseDefinition = base ? comparableRemote(base.definitionJson, workflow.key) : undefined;
171
- const outgoing = outgoingDefinition(workflow.definition, baseDefinition);
172
- plans.push({
173
- workflow,
174
- base,
175
- baseDefinition,
176
- outgoing,
177
- unchanged: baseDefinition !== undefined && sameContent(outgoing, baseDefinition),
178
- });
179
- }
180
- const toWrite = plans.filter((plan) => !plan.unchanged && plan.workflow.durable);
181
- const prepared = toWrite.length > 0 ? await prepareProjectBundle(project, lowered) : undefined;
182
- if (prepared) {
183
- for (const plan of toWrite)
184
- bundleCodeBlock(plan.workflow, prepared);
185
- }
186
- const items = [];
187
- for (const { workflow, base, baseDefinition, outgoing, unchanged } of plans) {
188
- const hash = irHash(outgoing);
189
- const staleness = stale.get(workflow.key);
190
- const warnings = staleness
191
- ? [options.force ? `${staleness}; pushed over it (--force)` : staleness]
192
- : [];
193
- if (unchanged) {
194
- items.push({
195
- key: workflow.key,
196
- action: 'unchanged',
197
- fromVersion: base?.version ?? null,
198
- toVersion: base?.version ?? null,
199
- irHash: hash,
200
- changes: [],
201
- truncated: false,
202
- warnings,
203
- bundle: bundleOf(workflow, false),
204
- });
205
- continue;
206
- }
207
- if (options.dryRun) {
208
- items.push({
209
- key: workflow.key,
210
- action: base ? 'would-version' : 'would-create',
211
- fromVersion: base?.version ?? null,
212
- toVersion: null,
213
- irHash: hash,
214
- changes: baseDefinition ? localChanges(diffDefinitions(baseDefinition, outgoing)) : [],
215
- truncated: false,
216
- warnings,
217
- bundle: bundleOf(workflow, false),
218
- });
219
- continue;
220
- }
221
- const description = options.message;
222
- let codeBundle;
223
- let uploaded = false;
224
- if (workflow.durable && prepared) {
225
- const upload = await uploadBundle(env, prepared, workflow.key);
226
- uploaded = upload.bundleSent;
227
- codeBundle = codeBundleInput(upload.uploadId, workflow, prepared);
228
- }
229
- if (base) {
230
- const saved = await env.api.createWorkflowVersion(workflow.key, {
231
- definitionJson: outgoing,
232
- ...(description ? { description } : {}),
233
- ...(codeBundle ? { codeBundle } : {}),
234
- });
235
- warnings.push(...saved.validationWarnings);
236
- const diff = await env.api.workflowVersionDiff(workflow.key, base.version, saved.version);
237
- items.push({
238
- key: workflow.key,
239
- action: 'versioned',
240
- fromVersion: base.version,
241
- toVersion: saved.version,
242
- irHash: hash,
243
- changes: diff.entries,
244
- truncated: diff.truncated,
245
- warnings,
246
- bundle: bundleOf(workflow, uploaded),
247
- });
248
- project.lock.workflows[workflow.key] = lockEntry(workflow, saved.version, hash);
249
- }
250
- else {
251
- const name = typeof workflow.definition['name'] === 'string' && workflow.definition['name'] !== ''
252
- ? workflow.definition['name']
253
- : workflow.key;
254
- const saved = await env.api.importWorkflow({
255
- definitionJson: outgoing,
256
- name,
257
- workflowKey: workflow.key,
258
- ...(description ? { description } : {}),
259
- ...(codeBundle ? { codeBundle } : {}),
260
- });
261
- warnings.push(...saved.validationWarnings);
262
- items.push({
263
- key: workflow.key,
264
- action: 'created',
265
- fromVersion: null,
266
- toVersion: saved.version,
267
- irHash: hash,
268
- changes: [],
269
- truncated: false,
270
- warnings,
271
- bundle: bundleOf(workflow, uploaded),
272
- });
273
- project.lock.workflows[workflow.key] = lockEntry(workflow, saved.version, hash);
274
- }
275
- if (prepared && workflow.durable) {
276
- project.lock.bundle = {
277
- buildId: prepared.buildId,
278
- sourceHash: prepared.sourceHash,
279
- sdkVersion: prepared.sdkVersion,
280
- };
281
- }
282
- // Written after every version, so a later failure leaves the lock true to the workspace.
283
- writeLock(project);
284
- }
285
- const result = {
286
- dryRun: options.dryRun === true,
287
- buildId: lowered.buildId ?? null,
288
- sourceHash: lowered.sourceHash ?? null,
289
- workflows: items,
290
- };
291
- const details = [];
292
- for (const item of items) {
293
- for (const change of item.changes)
294
- details.push(`${item.key}: ${change.kind} ${change.path}`);
295
- if (item.truncated)
296
- details.push(`${item.key}: the diff was truncated by the service`);
297
- for (const warning of item.warnings)
298
- details.push(`${item.key}: warning: ${warning}`);
299
- }
300
- details.push(...lowered.warnings);
301
- if (result.buildId)
302
- details.push(`buildId ${result.buildId}`);
303
- for (const item of items) {
304
- if (item.bundle) {
305
- details.push(`${item.key}: code bundle ${item.bundle.buildId}${item.bundle.uploaded ? ' (uploaded)' : ''}`);
306
- }
307
- }
308
- emit(env, options, result, {
309
- headers: ['Workflow', 'Action', 'From', 'To', 'Changes'],
310
- rows: items.map((item) => [
311
- item.key,
312
- item.action,
313
- item.fromVersion ?? '-',
314
- item.toVersion ?? '-',
315
- String(item.changes.length),
316
- ]),
317
- }, details);
318
- return result;
319
- }
320
- //# sourceMappingURL=push.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"push.js","sourceRoot":"","sources":["../../../src/code-first/commands/push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAyB,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EACL,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,YAAY,GAEb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACL,YAAY,GAIb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,SAAS,GAGV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAwC,MAAM,cAAc,CAAC;AAwC5F,6EAA6E;AAC7E,MAAM,UAAU,cAAc,CAAC,MAA+B;IAC5D,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC;QAC5D,CAAC,CAAC,mEAAmE;QACrE,CAAC,CAAC,iEAAiE,CAAC;AACxE,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,qBAAqB,CAAC,MAA+B;IACnE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAChC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CACtB,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CA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MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAC9F,CAAC;QACJ,CAAC;IACH,CAAC;IACD,IAAI,CACF,GAAG,EACH,OAAO,EACP,MAAM,EACN;QACE,OAAO,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC;QACxD,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YACxB,IAAI,CAAC,GAAG;YACR,IAAI,CAAC,MAAM;YACX,IAAI,CAAC,WAAW,IAAI,GAAG;YACvB,IAAI,CAAC,SAAS,IAAI,GAAG;YACrB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;SAC5B,CAAC;KACH,EACD,OAAO,CACR,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,44 +0,0 @@
1
- /**
2
- * `fluidgrids replay <file|runId>` and `fluidgrids test [--replay dir]`:
3
- * determinism checks of the project's durable functions against recorded
4
- * histories (spec 10 §1).
5
- *
6
- * - `replay` takes a history file (from `fluidgrids history --out`, a test
7
- * run, or a fixture) or a run id, whose history it downloads first, and
8
- * replays it against the bundle built from the local code. `--isolate` uses
9
- * the QuickJS runner the managed workers use; the default is a Node `vm`.
10
- * `--debug` prints the full task result (commands, logs, stack). The
11
- * inspector that breaks at the first mismatch is the Phase D replay
12
- * debugger (spec 11 §2.21).
13
- * - `test` runs the project's own `test` script, then replays every
14
- * `*.history.json` under `--replay <dir>`, so CI fails on a code change that
15
- * breaks a recorded run.
16
- *
17
- * Lowering here needs no workspace: connection names get placeholder ids,
18
- * which never reach the bundle, so `buildId` is the one a push would upload.
19
- */
20
- import { type LoweredProject } from '../lowering.js';
21
- import { type ReplayOutcome } from '../replay.js';
22
- import { type CommandEnv, type ProjectOptions } from '../shared.js';
23
- export interface ReplayOptions extends ProjectOptions {
24
- isolate?: boolean;
25
- debug?: boolean;
26
- }
27
- /** Export names of the durable functions in the project's bundle. */
28
- export declare function durableExportNames(lowered: LoweredProject): string[];
29
- export declare function runReplay(env: CommandEnv, target: string, options: ReplayOptions): Promise<ReplayOutcome>;
30
- export interface TestOptions extends ProjectOptions {
31
- replay?: string;
32
- isolate?: boolean;
33
- /** False skips the project's own test script (`--no-script`). */
34
- script?: boolean;
35
- }
36
- export interface TestResult {
37
- script: {
38
- command: string;
39
- exitCode: number;
40
- } | null;
41
- replays: Array<Record<string, unknown>>;
42
- }
43
- export declare function runTest(env: CommandEnv, options: TestOptions): Promise<TestResult>;
44
- //# sourceMappingURL=replay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../../src/code-first/commands/replay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAInE,OAAO,EAAkD,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAAQ,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAcD,qEAAqE;AACrE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE,CASpE;AA0DD,wBAAsB,SAAS,CAC7B,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CA4DxB;AAID,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACrD,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzC;AA6CD,wBAAsB,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA8ExF"}