@fluidgrids/cli 2026.1114.2 → 2026.1114.3

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 (3) hide show
  1. package/README.md +37 -0
  2. package/dist/cli.js +429 -150
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -285,6 +285,43 @@ fluidgrids run lead-enrichment --workflow-id customer-7 --id-conflict use-existi
285
285
  - `push` also uploads the bundle's source map inside the source archive, so
286
286
  `runs stack` locations point at your sources.
287
287
 
288
+ ### Environments and promotion: `deploy`
289
+
290
+ `fluidgrids deploy` moves a workflow through DEV, STAGING and PROD the way the
291
+ builder's Environments panel does (spec `code-first` 06 §6, 07 §7):
292
+
293
+ ```bash
294
+ fluidgrids deploy approvals --env dev # the newest version (or --wf-version v4)
295
+ fluidgrids deploy approvals --env staging --note 'QA passed'
296
+ fluidgrids deploy approvals --env prod # waits for an approver
297
+ fluidgrids deploy approvals --env prod --ramp 10 # 10% of new PROD starts run the STAGING version
298
+ fluidgrids deploy approvals --env prod --ramp 100 # promote it in full
299
+ ```
300
+
301
+ - `--env dev` binds a version to DEV (`deployWorkflowVersionToDev`).
302
+ `--wf-version` names it; the default is the newest stored version, and
303
+ `active` names the ACTIVE one.
304
+ - `--env staging` promotes the version DEV holds, and `--env prod` the version
305
+ STAGING holds (`requestWorkflowPromotion`). With `--wf-version` the command
306
+ refuses unless the source environment holds that version.
307
+ - A promotion that needs an approver is polled (`workflowPromotionRequests`)
308
+ until it is applied, rejected or canceled. A rejected or canceled request
309
+ fails the command. After `--timeout` (default 15 minutes) the command fails
310
+ but the request stays open, and running the same command again waits on that
311
+ request instead of filing another. `--no-wait` returns as soon as the request
312
+ is made. The workspace policy decides who approves; the CLI never approves.
313
+ - `--ramp N` (PROD only, durable workflow functions, needs
314
+ `fluidgrids.durable-parity`) sets the PROD rollout so `N` percent of new
315
+ automatic starts run the STAGING version (`setWorkflowRollout`). `--ramp 0`
316
+ sends every start back to the ACTIVE version. `--ramp 100` is a full
317
+ promotion through `requestWorkflowPromotion`, so the PROD approval rule
318
+ applies, and applying it removes the rollout. A workspace that locks PROD to
319
+ approved promotions refuses ramps.
320
+ - A deploy whose target already holds the version writes nothing and reports
321
+ `UNCHANGED`, so a pipeline can rerun it. With `-f json` the result is
322
+ `{workflowKey, environment, version, action, promotion, rollout}`, where
323
+ `action` is `DEPLOYED`, `APPLIED`, `PENDING`, `RAMPED` or `UNCHANGED`.
324
+
288
325
  ### Workflow ids, rollouts and other parity features
289
326
 
290
327
  With the `fluidgrids.durable-parity` feature on the workspace (BOFF-9905 B19,