@keystrokehq/cli 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accept.handler-PpOOUemk.mjs → accept.handler-DWuxmMuY.mjs} +4 -4
- package/dist/{admin-Bhm7VkGG.mjs → admin-BK4bFTTd.mjs} +10 -10
- package/dist/{agents-DYP6fmGE.mjs → agents-DYnw2VPX.mjs} +6 -6
- package/dist/{api-keys-CC5yevJn.mjs → api-keys-Dizx3YqE.mjs} +6 -6
- package/dist/{auth-KRUcoMkk.mjs → auth-BqsKd4IA.mjs} +6 -6
- package/dist/{auth.handler-BLU7LnW2.mjs → auth.handler-BsoWeCFD.mjs} +1 -1
- package/dist/{build-agents-DfbiMZ_e-CLHxZKOg.mjs → build-agents-DfbiMZ_e-CgnKa9A6.mjs} +2 -2
- package/dist/{build-progress-Mzsk4RKr.mjs → build-progress-DigAP-BN.mjs} +2 -2
- package/dist/{build-tasks-O1jYtlv1-Cr7vs_B_.mjs → build-tasks-O1jYtlv1-Bkw0w1r3.mjs} +2 -2
- package/dist/{build-workflows-3fdvdHHf-DnDmsKuG.mjs → build-workflows-3fdvdHHf-BDTy9QgT.mjs} +2 -2
- package/dist/{build.handler-CXqfqwho.mjs → build.handler-B2UDhh72.mjs} +5 -5
- package/dist/{clear-cache.handler-BuSx_ZDn.mjs → clear-cache.handler-D-wboLB6.mjs} +1 -1
- package/dist/{clear.handler-DgIXlYTs.mjs → clear.handler-BR97yudD.mjs} +1 -1
- package/dist/{commander-Wr7RrODw.mjs → commander-DcftG6dX.mjs} +12 -12
- package/dist/{connect-CbzAP3Zo.mjs → connect-DQ4xIcyE.mjs} +3 -3
- package/dist/{connect.handler-BmOVKYSN.mjs → connect.handler-CWSLgf87.mjs} +3 -3
- package/dist/{context-DT06adrn.mjs → context-1VgRbzr-.mjs} +2 -2
- package/dist/{create.handler-BWaULspg.mjs → create.handler-C2CkPWsy.mjs} +3 -3
- package/dist/{credential-schema-mismatch-C-4kBAFw.mjs → credential-schema-mismatch-DM9Y91jL.mjs} +1 -1
- package/dist/{credentials-BpfWiGuG.mjs → credentials-D8_AwH9o.mjs} +6 -6
- package/dist/{current-deployment-workflow-C5oiOVsx.mjs → current-deployment-workflow-B05z0EQa.mjs} +4 -4
- package/dist/{current.handler-CUVgMZ-O.mjs → current.handler-CuAtMZmm.mjs} +2 -2
- package/dist/{delete.handler-CzW7Rm5M.mjs → delete.handler-DDY3X1Zm.mjs} +2 -2
- package/dist/{deploy-B7BCgf_y.mjs → deploy-Cn6FFnOM.mjs} +2 -2
- package/dist/{deploy-progress-BkpuGfGt.mjs → deploy-progress-XAfautnA.mjs} +2 -2
- package/dist/{deploy.handler-BLp-JNV2.mjs → deploy.handler-D1DcAe-h.mjs} +13 -13
- package/dist/{diff-utils-D1jYu6ny.mjs → diff-utils-AATn2n56.mjs} +1 -1
- package/dist/{diff.handler-zVbHzE1Q.mjs → diff.handler-BU6IewNG.mjs} +5 -5
- package/dist/{env.handler-CqfOZEou.mjs → env.handler-C6YAmHLi.mjs} +5 -5
- package/dist/{error-boundary-D6KTx1HL.mjs → error-boundary-CpaVvFXk.mjs} +3 -3
- package/dist/{iam-command-utils-B5G-N3Hx.mjs → iam-command-utils-ByLX0A-V.mjs} +2 -2
- package/dist/{init-DwVARQud.mjs → init-Da6_obl0.mjs} +2 -2
- package/dist/{init.handler-HsCte00n.mjs → init.handler-Cq2nk8DO.mjs} +22 -11
- package/dist/{inspect.handler-CcyFNUJP.mjs → inspect.handler-D4YGryQB.mjs} +4 -4
- package/dist/{integration-catalog-4T5Yad-n.mjs → integration-catalog-DtNWaMvh.mjs} +3 -3
- package/dist/{integrations-DCMkBcjI.mjs → integrations-CB_Ukq2g.mjs} +5 -5
- package/dist/{invites-DpJjZznC.mjs → invites-BOhuBtoq.mjs} +5 -5
- package/dist/{invites.list.handler-CBtOq8W4.mjs → invites.list.handler-C-Wv6E1g.mjs} +4 -4
- package/dist/{invites.resend.handler-D-E2NxY1.mjs → invites.resend.handler-CI78XlQS.mjs} +4 -4
- package/dist/{invites.revoke.handler-DFTxBZcm.mjs → invites.revoke.handler-DigAgNwB.mjs} +4 -4
- package/dist/keystroke.mjs +53 -49
- package/dist/{list-enrichment-Bou_BqL0.mjs → list-enrichment-Cxlq6BB9.mjs} +1 -1
- package/dist/{list.handler-BFjtABDv.mjs → list.handler--a1JEGSD.mjs} +4 -4
- package/dist/{list.handler-fGaEAMUZ.mjs → list.handler-B6IByHHB.mjs} +5 -5
- package/dist/{list.handler-BHmG2GY8.mjs → list.handler-BpVNYShU.mjs} +2 -2
- package/dist/{list.handler-CXT-te4G.mjs → list.handler-BsyGhXns.mjs} +4 -4
- package/dist/{list.handler-gjAg1aM6.mjs → list.handler-CsODcH6e.mjs} +3 -3
- package/dist/{list.handler-Val6EmGK.mjs → list.handler-Dr9Ti-dt.mjs} +5 -5
- package/dist/{list.handler-BWGnEnM8.mjs → list.handler-OiLEylzS.mjs} +2 -2
- package/dist/{listen-C_YrC5Go.mjs → listen-DUPk6cZC.mjs} +3 -3
- package/dist/{listen.handler-BKfcYsfv.mjs → listen.handler-B5WimrfF.mjs} +3 -3
- package/dist/{logs-C1f6RjQ7.mjs → logs-C5_4lh3p.mjs} +2 -2
- package/dist/{logs.handler-BNFUmakA.mjs → logs.handler-CBHPwDuC.mjs} +3 -3
- package/dist/{logs.handler-CB2FtCvP.mjs → logs.handler-ClIIOeQB.mjs} +1 -1
- package/dist/{members.add.handler-BXldE_ec.mjs → members.add.handler-LcQJYBsu.mjs} +4 -4
- package/dist/{members.invite.handler-CWFsj5Gz.mjs → members.invite.handler-p279O2aC.mjs} +4 -4
- package/dist/{members.list.handler-DFg6VThp.mjs → members.list.handler-Cjukjuot.mjs} +4 -4
- package/dist/{members.remove.handler-lStbH_4M.mjs → members.remove.handler-CzxPiQFv.mjs} +4 -4
- package/dist/{members.update.handler-CzcdsbtG.mjs → members.update.handler-CX5q86e3.mjs} +4 -4
- package/dist/{org-8Dsab2dz.mjs → org-CnlKW-Hl.mjs} +16 -16
- package/dist/{orgs.create.handler-CiYGUXBZ.mjs → orgs.create.handler-DRILhxdn.mjs} +4 -4
- package/dist/{orgs.get.handler-BgFsnpme.mjs → orgs.get.handler-Cue6stoX.mjs} +4 -4
- package/dist/{orgs.list.handler-BuyOTc8K.mjs → orgs.list.handler-fuDLNI5X.mjs} +4 -4
- package/dist/{output-BCDZb3Gy.mjs → output-CGdYhH0p.mjs} +1 -1
- package/dist/{paused.handler-wgaf8sse.mjs → paused.handler-CuOVH4DZ.mjs} +3 -3
- package/dist/{projects-CZbAqlPQ.mjs → projects-DdgHbUpR.mjs} +5 -5
- package/dist/{register.handler-BA6p-TmU.mjs → register.handler-CpP_KB2u.mjs} +2 -2
- package/dist/{requirements.handler-DI4mgZ2l.mjs → requirements.handler-CX13XiXT.mjs} +4 -4
- package/dist/{resolve-project-BREjwFKO.mjs → resolve-project-C6UAOfAG.mjs} +1 -1
- package/dist/{try-deploy.handler-BCvwi1jc.mjs → run-polling-1CTIeDea.mjs} +86 -185
- package/dist/run.handler-BxLH75WW.mjs +136 -0
- package/dist/{runs-C7uqumfa.mjs → runs-lfE7r6i2.mjs} +4 -4
- package/dist/{skills-sync.handler-CuuCiUGT.mjs → skills-sync.handler-CntKndFm.mjs} +2 -2
- package/dist/{skills.command-23jSicQp.mjs → skills.command-X5zZwz2d.mjs} +4 -4
- package/dist/{skills.handler-BQ3Qfej3.mjs → skills.handler-CofL4oKs.mjs} +1 -1
- package/dist/{spinner-progress-BB2EHL-l.mjs → spinner-progress-Bt8zXPOc.mjs} +1 -1
- package/dist/{status.handler-Bh0MtNu1.mjs → status.handler-6cuHa0R0.mjs} +1 -1
- package/dist/{switch.handler-CSOycIbR.mjs → switch.handler-RaeKZ3ZB.mjs} +2 -2
- package/dist/{sync-Pzb3od7n.mjs → sync-C89mJp7Y.mjs} +2 -2
- package/dist/{sync.handler-bEzSgeTW.mjs → sync.handler-BoAHHUQs.mjs} +6 -6
- package/dist/{task-target-build-BA67W_6d.mjs → task-target-build-D5IrHqSl.mjs} +3 -3
- package/dist/task-target-deploy-runner.mjs +4 -4
- package/dist/{test-B4uana86.mjs → test-gPQJRkqa.mjs} +9 -8
- package/dist/{test.handler-Duqj67Qi.mjs → test.handler-B5GF5txS.mjs} +2 -2
- package/dist/{trigger-artifacts-B3OCTX9K-37Ca-ELC.mjs → trigger-artifacts-B3OCTX9K-ME6IVdUB.mjs} +2 -2
- package/dist/try-deploy.handler-dA_YGWRq.mjs +169 -0
- package/dist/{upgrade-Bp9gnslY.mjs → upgrade-xByIxaYu.mjs} +2 -2
- package/dist/{upgrade.handler-D82k9CHa.mjs → upgrade.handler-DhKeyCy5.mjs} +1 -1
- package/dist/{upload.handler-BMJiaCzk.mjs → upload.handler-BFDM6n_6.mjs} +6 -6
- package/dist/{users.get.handler-eJtaB-2G.mjs → users.get.handler-CzaYM2bi.mjs} +4 -4
- package/dist/{users.list.handler-DE6s08i0.mjs → users.list.handler-CpOWwzBb.mjs} +4 -4
- package/dist/{users.set-role.handler-BVNvaKKS.mjs → users.set-role.handler-BjiSNP2d.mjs} +4 -4
- package/dist/{validate.handler-BiToUknO.mjs → validate.handler-BtDSKAFY.mjs} +5 -5
- package/dist/{workflow-build-KCdasPyU.mjs → workflow-build-Z2_jkOsZ.mjs} +6 -6
- package/dist/{workflow-bundler-BzHk73PM-C1NWDEju.mjs → workflow-bundler-BzHk73PM-tt09RbIA.mjs} +1 -1
- package/dist/{workflows-Bhd_vuCI.mjs → workflows-V09d2r2H.mjs} +107 -12
- package/package.json +2 -2
- /package/dist/{build-metadata-zidV9Cai-BNC_-zub.mjs → build-metadata-zidV9Cai-Bq37kBOM.mjs} +0 -0
- /package/dist/{deploy-CHfWGM32.mjs → deploy-B8TYutOi.mjs} +0 -0
- /package/dist/{detect-env-access-CwkOYeYM-KtEle6I3.mjs → detect-env-access-CwkOYeYM-D4o8gRZs.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-DMmY6oDW.mjs → read-credential-keys-77a91T8M-B0eiobOd.mjs} +0 -0
- /package/dist/{task-target-deploy-DqX7bJ55.mjs → task-target-deploy-Bzfftyru.mjs} +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { N as throwReportedCliExit, a as getProcessEnv, k as CliExitError, n as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { l as resolveAuthOptions } from "./dist-BF6r1hfv.mjs";
|
|
5
5
|
import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
|
|
6
|
-
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
7
|
-
import { t as createTypedCommand } from "./commander-
|
|
8
|
-
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
6
|
+
import { i as writeJson, n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-CGdYhH0p.mjs";
|
|
7
|
+
import { t as createTypedCommand } from "./commander-DcftG6dX.mjs";
|
|
8
|
+
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-1VgRbzr-.mjs";
|
|
9
9
|
import { a as readManifestsFromOutDir } from "./dist-DvO0q6Fo.mjs";
|
|
10
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
10
|
+
import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
|
|
11
11
|
import { a as registerHostedActionDispatcher, c as registerOperationCredentialResolver, f as registerOperationContext, g as getOfficialIntegrationMetadata, h as registerRuntime, n as clearHostedActionExecutionPolicy, o as registerHostedActionExecutionPolicy, p as clearRuntime, s as clearOperationCredentialResolver, t as clearHostedActionDispatcher, u as clearOperationContext } from "./hosted-action-dispatcher-registry-BWEtn13o.mjs";
|
|
12
|
-
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-
|
|
13
|
-
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-
|
|
12
|
+
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Z2_jkOsZ.mjs";
|
|
13
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-B05z0EQa.mjs";
|
|
14
14
|
import { n as WorkflowsRunOptionsSchema, t as RUN_OPTIONS_CONFIG } from "./options-CIVqkc8V.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { t as handleWorkflowsTryDeploy } from "./try-deploy.handler-dA_YGWRq.mjs";
|
|
16
|
+
import { n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-1CTIeDea.mjs";
|
|
16
17
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
17
18
|
import { tmpdir } from "node:os";
|
|
18
19
|
import path from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { a as validateApiKey, i as requireClient } from "./context-
|
|
3
|
+
import { n as ui } from "./keystroke.mjs";
|
|
4
|
+
import { a as validateApiKey, i as requireClient } from "./context-1VgRbzr-.mjs";
|
|
5
5
|
//#region src/commands/auth/test.handler.ts
|
|
6
6
|
async function handleAuthTest(_options, ctx) {
|
|
7
7
|
const result = await validateApiKey(requireClient(ctx));
|
package/dist/{trigger-artifacts-B3OCTX9K-37Ca-ELC.mjs → trigger-artifacts-B3OCTX9K-ME6IVdUB.mjs}
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { n as readOptionalJsonSchemaKeys } from "./declared-credential-requirements-BtlcsEVn.mjs";
|
|
4
4
|
import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-RuJszab7.mjs";
|
|
5
|
-
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-
|
|
6
|
-
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-
|
|
5
|
+
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-B0eiobOd.mjs";
|
|
6
|
+
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-D4o8gRZs.mjs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { rolldown } from "rolldown";
|
|
9
9
|
//#region ../../packages/workflow-builder/dist/trigger-artifacts-B3OCTX9K.mjs
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
+
import { k as CliExitError, n as ui, o as isLocalMode, x as toErrorMessage } from "./keystroke.mjs";
|
|
5
|
+
import { d as trackProject } from "./dist-BF6r1hfv.mjs";
|
|
6
|
+
import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
|
|
7
|
+
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-1VgRbzr-.mjs";
|
|
8
|
+
import { o as readWorkflowsFromDisk, s as uploadTestBundle } from "./dist-DvO0q6Fo.mjs";
|
|
9
|
+
import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
|
|
10
|
+
import { a as runWorkflowBuild, t as WorkflowNotFoundError } from "./workflow-build-Z2_jkOsZ.mjs";
|
|
11
|
+
import { r as isUnknownSchema } from "./schema-display-DuWBmkwk.mjs";
|
|
12
|
+
import { t as createBuildProgress } from "./build-progress-DigAP-BN.mjs";
|
|
13
|
+
import { t as withErrorBoundary } from "./error-boundary-CpaVvFXk.mjs";
|
|
14
|
+
import { a as tryReadExistingInputSchema, n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-1CTIeDea.mjs";
|
|
15
|
+
//#region src/lib/format.ts
|
|
16
|
+
function formatBytes(bytes) {
|
|
17
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
18
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
19
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/commands/workflows/_shared/run-helpers.ts
|
|
23
|
+
/**
|
|
24
|
+
* Resolve input and validate against existing schema if available.
|
|
25
|
+
* Returns input and workflowsDir for downstream use.
|
|
26
|
+
*/
|
|
27
|
+
async function resolveAndValidateInputForRun(options) {
|
|
28
|
+
const input = await resolveInput(options);
|
|
29
|
+
const workflowsDir = await requireWorkflowsDir(options.path);
|
|
30
|
+
trackProject(workflowsDir);
|
|
31
|
+
const existingSchema = await tryReadExistingInputSchema(workflowsDir, options.workflow);
|
|
32
|
+
if (existingSchema && !isUnknownSchema(existingSchema)) validateInputOrExit(options.workflow, input, existingSchema);
|
|
33
|
+
return {
|
|
34
|
+
input,
|
|
35
|
+
workflowsDir
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Build workflow(s) for run using the standard build pipeline, then read
|
|
40
|
+
* prepared artifacts from disk filtered by workflow ref.
|
|
41
|
+
*/
|
|
42
|
+
async function buildWorkflowsForRun(options) {
|
|
43
|
+
const progress = createBuildProgress(options.workflow);
|
|
44
|
+
try {
|
|
45
|
+
const { result, outDir } = await runWorkflowBuild({
|
|
46
|
+
workflowsDir: options.workflowsDir,
|
|
47
|
+
workflowRef: options.workflow,
|
|
48
|
+
verbose: options.verbose,
|
|
49
|
+
onProgressEvent: progress.handleEvent
|
|
50
|
+
});
|
|
51
|
+
const filtered = (await readWorkflowsFromDisk(outDir)).filter((wf) => wf.manifestData.id === options.workflow || wf.name === options.workflow);
|
|
52
|
+
if (filtered.length === 0) {
|
|
53
|
+
const availableNames = result.artifacts.map((a) => a.manifest.name);
|
|
54
|
+
throw new WorkflowNotFoundError(options.workflow, availableNames);
|
|
55
|
+
}
|
|
56
|
+
return filtered;
|
|
57
|
+
} finally {
|
|
58
|
+
progress.stop();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Validate input against the first build's input schema if available.
|
|
63
|
+
*/
|
|
64
|
+
function validateInputWithFirstBuild(options, input, builds) {
|
|
65
|
+
const inputSchema = builds[0]?.manifestData.workflowSchemas.input;
|
|
66
|
+
if (inputSchema && typeof inputSchema === "object" && !isUnknownSchema(inputSchema)) validateInputOrExit(options.workflow, input, inputSchema);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Render success message after build.
|
|
70
|
+
*/
|
|
71
|
+
function renderBuildSuccessMessage(builds) {
|
|
72
|
+
const first = builds[0];
|
|
73
|
+
if (!first) return;
|
|
74
|
+
if (builds.length > 1) ui.success(`Built ${builds.length} workflow(s) with name "${first.name}"`);
|
|
75
|
+
else ui.success(`Built ${first.name} (${formatBytes(first.bundleSize)})`);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Render completion success message (single or multi).
|
|
79
|
+
*/
|
|
80
|
+
function renderRunCompletionSuccessMessage(builds, elapsedSeconds) {
|
|
81
|
+
if (builds.length === 0) return;
|
|
82
|
+
if (builds.length > 1) ui.success(`All ${builds.length} workflow(s) completed in ${elapsedSeconds}s`);
|
|
83
|
+
else ui.success(`Workflow completed in ${elapsedSeconds}s`);
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/commands/workflows/try-deploy.handler/index.ts
|
|
87
|
+
var try_deploy_handler_exports = /* @__PURE__ */ __exportAll({ handleWorkflowsTryDeploy: () => handleWorkflowsTryDeploy });
|
|
88
|
+
async function handleWorkflowsTryDeploy(options, ctx) {
|
|
89
|
+
return withErrorBoundary("Try-deploy", async () => {
|
|
90
|
+
const client = requireClient(ctx);
|
|
91
|
+
const startTime = Date.now();
|
|
92
|
+
const local = isLocalMode();
|
|
93
|
+
const { input, workflowsDir } = await resolveAndValidateInputForRun(options);
|
|
94
|
+
const storagePaths = [];
|
|
95
|
+
let runError;
|
|
96
|
+
try {
|
|
97
|
+
const builds = await buildWorkflowsForRun({
|
|
98
|
+
...options,
|
|
99
|
+
workflowsDir
|
|
100
|
+
});
|
|
101
|
+
renderBuildSuccessMessage(builds);
|
|
102
|
+
validateInputWithFirstBuild(options, input, builds);
|
|
103
|
+
const projectConfig = await assertWorkflowProjectRoot(workflowsDir);
|
|
104
|
+
await assertProjectConfigMatchesAuthenticatedOrg(client, projectConfig);
|
|
105
|
+
for (const [i, build] of builds.entries()) {
|
|
106
|
+
if (builds.length > 1) ui.header(`Running "${build.name}" (${i + 1}/${builds.length})...`);
|
|
107
|
+
let storagePath;
|
|
108
|
+
if (local) {
|
|
109
|
+
storagePath = build.bundlePath;
|
|
110
|
+
if (i === 0) ui.hint("Local mode: using bundle from build output (skipping upload)");
|
|
111
|
+
} else {
|
|
112
|
+
ui.header("Uploading test bundle...");
|
|
113
|
+
storagePath = (await uploadTestBundle(client, build, false)).storagePath;
|
|
114
|
+
storagePaths.push(storagePath);
|
|
115
|
+
ui.success("Upload complete");
|
|
116
|
+
}
|
|
117
|
+
ui.header("Executing workflow...");
|
|
118
|
+
const { runId } = await client.workflows.testById({
|
|
119
|
+
workflowName: build.name,
|
|
120
|
+
storagePath,
|
|
121
|
+
exportName: build.exportName,
|
|
122
|
+
manifest: build.manifestData,
|
|
123
|
+
flowJson: build.flowData,
|
|
124
|
+
triggers: build.triggers,
|
|
125
|
+
bundleHash: build.bundleHash,
|
|
126
|
+
bundleSize: build.bundleSize,
|
|
127
|
+
args: [input],
|
|
128
|
+
organizationId: projectConfig.organizationId,
|
|
129
|
+
projectId: projectConfig.projectId
|
|
130
|
+
});
|
|
131
|
+
ui.hint(`Run ID: ${runId}`);
|
|
132
|
+
const snapshot = await pollForCompletion(client, runId, options.timeout, options.verbose);
|
|
133
|
+
const elapsed = ((Date.now() - startTime) / 1e3).toFixed(1);
|
|
134
|
+
if (snapshot.run.status === "completed") {
|
|
135
|
+
if (snapshot.run.output !== void 0 && snapshot.run.output !== null) {
|
|
136
|
+
ui.br();
|
|
137
|
+
ui.header("Output:");
|
|
138
|
+
ui.text(JSON.stringify(snapshot.run.output, null, 2));
|
|
139
|
+
}
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (snapshot.run.status === "failed") {
|
|
143
|
+
ui.br();
|
|
144
|
+
ui.error(`Workflow failed after ${elapsed}s`);
|
|
145
|
+
if (snapshot.run.error) ui.error(toErrorMessage(snapshot.run.error));
|
|
146
|
+
runError = snapshot.run.error ?? /* @__PURE__ */ new Error("Workflow failed");
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
ui.br();
|
|
150
|
+
ui.warn(`Workflow still ${snapshot.run.status} after ${elapsed}s (timeout: ${options.timeout}s)`);
|
|
151
|
+
ui.hint(`Check status: keystroke runs get ${runId}`);
|
|
152
|
+
runError = /* @__PURE__ */ new Error(`Workflow still ${snapshot.run.status} after timeout`);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
if (!runError) {
|
|
156
|
+
ui.br();
|
|
157
|
+
renderRunCompletionSuccessMessage(builds, ((Date.now() - startTime) / 1e3).toFixed(1));
|
|
158
|
+
}
|
|
159
|
+
} finally {
|
|
160
|
+
if (!local) for (const sp of storagePaths) try {
|
|
161
|
+
await client.workflows.deleteTestBundle({ storagePath: sp });
|
|
162
|
+
if (options.verbose) ui.hint("Test bundle cleaned up");
|
|
163
|
+
} catch {}
|
|
164
|
+
}
|
|
165
|
+
if (runError) throw new CliExitError("Workflow execution failed");
|
|
166
|
+
}, { json: ctx.jsonMode });
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { try_deploy_handler_exports as n, handleWorkflowsTryDeploy as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { t as createTypedCommand } from "./commander-DcftG6dX.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/commands/upgrade/upgrade.command.ts
|
|
6
6
|
const PackageManagerSchema = z.enum([
|
|
@@ -34,7 +34,7 @@ function createUpgradeCommand() {
|
|
|
34
34
|
description: "Upgrade the Keystroke CLI to the latest published version",
|
|
35
35
|
schema: UpgradeOptionsSchema,
|
|
36
36
|
optionsConfig: UPGRADE_OPTIONS_CONFIG,
|
|
37
|
-
loadHandler: async () => (await import("./upgrade.handler-
|
|
37
|
+
loadHandler: async () => (await import("./upgrade.handler-DhKeyCy5.mjs")).handleUpgrade
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { N as throwReportedCliExit, n as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
//#region src/commands/upgrade/upgrade.handler.ts
|
|
6
6
|
const CLI_PACKAGE_NAME = "@keystrokehq/cli";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { N as throwReportedCliExit, a as getProcessEnv, n as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
|
|
5
|
-
import { a as writeJsonError, i as writeJson } from "./output-
|
|
6
|
-
import { i as requireClient } from "./context-
|
|
5
|
+
import { a as writeJsonError, i as writeJson } from "./output-CGdYhH0p.mjs";
|
|
6
|
+
import { i as requireClient } from "./context-1VgRbzr-.mjs";
|
|
7
7
|
import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-DvO0q6Fo.mjs";
|
|
8
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
8
|
+
import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
|
|
9
9
|
import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-DAQfKqn0.mjs";
|
|
10
|
-
import { t as getIntegrationCatalog } from "./integration-catalog-
|
|
10
|
+
import { t as getIntegrationCatalog } from "./integration-catalog-DtNWaMvh.mjs";
|
|
11
11
|
import { t as readCredentialEnvMap } from "./credential-env-map-C23GV6LN.mjs";
|
|
12
|
-
import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-
|
|
12
|
+
import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-DM9Y91jL.mjs";
|
|
13
13
|
import * as path$1 from "node:path";
|
|
14
14
|
import { confirm, isCancel } from "@clack/prompts";
|
|
15
15
|
//#region src/commands/credentials/upload/upload.handler.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
6
|
-
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-
|
|
3
|
+
import { n as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-CGdYhH0p.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-1VgRbzr-.mjs";
|
|
6
|
+
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-ByLX0A-V.mjs";
|
|
7
7
|
//#region src/commands/admin/users.get.handler.ts
|
|
8
8
|
async function handleAdminUsersGet(options, ctx) {
|
|
9
9
|
const client = requireClient(ctx);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
6
|
-
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-
|
|
3
|
+
import { n as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-CGdYhH0p.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-1VgRbzr-.mjs";
|
|
6
|
+
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-ByLX0A-V.mjs";
|
|
7
7
|
import Table from "cli-table3";
|
|
8
8
|
//#region src/commands/admin/users.list.handler.ts
|
|
9
9
|
async function handleAdminUsersList(options, ctx) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { i as writeJson } from "./output-
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
6
|
-
import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-
|
|
3
|
+
import { n as ui } from "./keystroke.mjs";
|
|
4
|
+
import { i as writeJson } from "./output-CGdYhH0p.mjs";
|
|
5
|
+
import { i as requireClient } from "./context-1VgRbzr-.mjs";
|
|
6
|
+
import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-ByLX0A-V.mjs";
|
|
7
7
|
//#region src/commands/admin/users.set-role.handler.ts
|
|
8
8
|
async function handleAdminUsersSetRole(options, ctx) {
|
|
9
9
|
const client = requireClient(ctx);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { N as throwReportedCliExit, n as ui, x as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { d as trackProject } from "./dist-BF6r1hfv.mjs";
|
|
5
|
-
import { i as writeJson } from "./output-
|
|
6
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
7
|
-
import { s as build, t as WorkflowNotFoundError } from "./workflow-build-
|
|
8
|
-
import { t as createBuildProgress } from "./build-progress-
|
|
5
|
+
import { i as writeJson } from "./output-CGdYhH0p.mjs";
|
|
6
|
+
import { t as requireWorkflowsDir } from "./resolve-project-C6UAOfAG.mjs";
|
|
7
|
+
import { s as build, t as WorkflowNotFoundError } from "./workflow-build-Z2_jkOsZ.mjs";
|
|
8
|
+
import { t as createBuildProgress } from "./build-progress-DigAP-BN.mjs";
|
|
9
9
|
import { mkdtemp, rm } from "node:fs/promises";
|
|
10
10
|
import * as os from "node:os";
|
|
11
11
|
import * as path$1 from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { i as __toESM, n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { d as originalConsole, f as ANSI, n as ui, p as style, u as logger, x as toErrorMessage } from "./keystroke.mjs";
|
|
5
5
|
import { a as getKeystrokeTmpDir } from "./dist-BF6r1hfv.mjs";
|
|
6
6
|
import { t as assertWorkflowProjectRoot } from "./project-config-D9eFU8Jk.mjs";
|
|
7
7
|
import { a as FlowGraphSchema, i as WorkflowManifestSchema } from "./workflow-manifest-BfL74mjp.mjs";
|
|
@@ -978,7 +978,7 @@ async function buildDiscoveredWorkflows(options) {
|
|
|
978
978
|
const failures = [...buildPlan.failures];
|
|
979
979
|
const warnings = [];
|
|
980
980
|
if (buildPlan.workflows.length > 0) {
|
|
981
|
-
const { buildWorkflowArtifacts } = await import("./build-workflows-3fdvdHHf-
|
|
981
|
+
const { buildWorkflowArtifacts } = await import("./build-workflows-3fdvdHHf-BDTy9QgT.mjs");
|
|
982
982
|
const result = await buildWorkflowArtifacts({
|
|
983
983
|
entries: buildPlan.workflows,
|
|
984
984
|
workflowsByKey,
|
|
@@ -993,7 +993,7 @@ async function buildDiscoveredWorkflows(options) {
|
|
|
993
993
|
warnings.push(...result.warnings);
|
|
994
994
|
}
|
|
995
995
|
if (buildPlan.agents.length > 0) {
|
|
996
|
-
const { buildAgentArtifacts } = await import("./build-agents-DfbiMZ_e-
|
|
996
|
+
const { buildAgentArtifacts } = await import("./build-agents-DfbiMZ_e-CgnKa9A6.mjs");
|
|
997
997
|
const result = await buildAgentArtifacts({
|
|
998
998
|
entries: buildPlan.agents,
|
|
999
999
|
projectRoot: options.projectRoot
|
|
@@ -1002,7 +1002,7 @@ async function buildDiscoveredWorkflows(options) {
|
|
|
1002
1002
|
failures.push(...result.failures);
|
|
1003
1003
|
}
|
|
1004
1004
|
if (buildPlan.tasks.length > 0) {
|
|
1005
|
-
const { buildTaskArtifacts } = await import("./build-tasks-O1jYtlv1-
|
|
1005
|
+
const { buildTaskArtifacts } = await import("./build-tasks-O1jYtlv1-Bkw0w1r3.mjs");
|
|
1006
1006
|
const result = await buildTaskArtifacts({
|
|
1007
1007
|
entries: buildPlan.tasks,
|
|
1008
1008
|
projectRoot: options.projectRoot,
|
|
@@ -1110,7 +1110,7 @@ async function createBuildPlan(options) {
|
|
|
1110
1110
|
const currentWorkflowIndex = workflowProgressIndex;
|
|
1111
1111
|
workflowProgressIndex += 1;
|
|
1112
1112
|
if (!loadResult?.ok) {
|
|
1113
|
-
const { createWorkflowMetadataFailure } = await import("./build-workflows-3fdvdHHf-
|
|
1113
|
+
const { createWorkflowMetadataFailure } = await import("./build-workflows-3fdvdHHf-BDTy9QgT.mjs");
|
|
1114
1114
|
plan.failures.push(createWorkflowMetadataFailure(discoveredWorkflow, loadResult?.error));
|
|
1115
1115
|
continue;
|
|
1116
1116
|
}
|
|
@@ -1333,7 +1333,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
|
|
|
1333
1333
|
elapsedMs: performance.now() - writeStartedAt,
|
|
1334
1334
|
...writeResult.skippedWriteCount !== void 0 && writeResult.skippedWriteCount > 0 ? { skippedWriteCount: writeResult.skippedWriteCount } : {}
|
|
1335
1335
|
});
|
|
1336
|
-
const { buildMetadataArtifacts } = await import("./build-metadata-zidV9Cai-
|
|
1336
|
+
const { buildMetadataArtifacts } = await import("./build-metadata-zidV9Cai-Bq37kBOM.mjs");
|
|
1337
1337
|
const metadata = await buildMetadataArtifacts({
|
|
1338
1338
|
projectRoot: config.projectRoot,
|
|
1339
1339
|
outputDir,
|
package/dist/{workflow-bundler-BzHk73PM-C1NWDEju.mjs → workflow-bundler-BzHk73PM-tt09RbIA.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-ghZc3xZ5.mjs";
|
|
4
|
-
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-
|
|
4
|
+
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-D4o8gRZs.mjs";
|
|
5
5
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-
|
|
4
|
-
import { t as createTypedCommand } from "./commander-
|
|
3
|
+
import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-CGdYhH0p.mjs";
|
|
4
|
+
import { t as createTypedCommand } from "./commander-DcftG6dX.mjs";
|
|
5
5
|
import { r as SHA256HashSchema, t as JsonSchemaSchema } from "./common-B3bLe3Mk.mjs";
|
|
6
6
|
import { l as TriggerUploadDataSchema } from "./credential-requirements-BCW8aQWS.mjs";
|
|
7
7
|
import { a as FlowGraphSchema, i as WorkflowManifestSchema } from "./workflow-manifest-BfL74mjp.mjs";
|
|
@@ -321,7 +321,7 @@ function createWorkflowsBuildCommand() {
|
|
|
321
321
|
description: "Build workflows locally",
|
|
322
322
|
schema: WorkflowsBuildOptionsSchema,
|
|
323
323
|
optionsConfig: BUILD_OPTIONS_CONFIG,
|
|
324
|
-
loadHandler: async () => (await import("./build.handler-
|
|
324
|
+
loadHandler: async () => (await import("./build.handler-B2UDhh72.mjs")).handleWorkflowsBuild
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
//#endregion
|
|
@@ -348,7 +348,7 @@ function createWorkflowsDiffCommand() {
|
|
|
348
348
|
description: "Authored workflow id (preferred) or workflow name",
|
|
349
349
|
key: "workflow"
|
|
350
350
|
},
|
|
351
|
-
loadHandler: async () => (await import("./diff.handler-
|
|
351
|
+
loadHandler: async () => (await import("./diff.handler-BU6IewNG.mjs")).handleWorkflowsDiff
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
//#endregion
|
|
@@ -381,7 +381,7 @@ function createWorkflowsEnvCommand() {
|
|
|
381
381
|
key: "workflow",
|
|
382
382
|
required: false
|
|
383
383
|
},
|
|
384
|
-
loadHandler: async () => (await import("./env.handler-
|
|
384
|
+
loadHandler: async () => (await import("./env.handler-C6YAmHLi.mjs")).handleWorkflowsEnv
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
//#endregion
|
|
@@ -413,7 +413,7 @@ function createWorkflowsInspectCommand() {
|
|
|
413
413
|
description: "Authored workflow id (preferred) or workflow name",
|
|
414
414
|
key: "workflow"
|
|
415
415
|
},
|
|
416
|
-
loadHandler: async () => (await import("./inspect.handler-
|
|
416
|
+
loadHandler: async () => (await import("./inspect.handler-D4YGryQB.mjs")).handleWorkflowsInspect
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
//#endregion
|
|
@@ -509,7 +509,7 @@ function createWorkflowsLogsCommand() {
|
|
|
509
509
|
key: "workflow",
|
|
510
510
|
required: false
|
|
511
511
|
},
|
|
512
|
-
loadHandler: async () => (await import("./logs.handler-
|
|
512
|
+
loadHandler: async () => (await import("./logs.handler-CBHPwDuC.mjs")).handleWorkflowsLogs
|
|
513
513
|
});
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
@@ -700,7 +700,101 @@ function createWorkflowsPausedCommand() {
|
|
|
700
700
|
key: "workflow",
|
|
701
701
|
required: false
|
|
702
702
|
},
|
|
703
|
-
loadHandler: async () => (await import("./paused.handler-
|
|
703
|
+
loadHandler: async () => (await import("./paused.handler-CuOVH4DZ.mjs")).handleWorkflowsPaused
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
//#endregion
|
|
707
|
+
//#region src/commands/workflows/run.command.ts
|
|
708
|
+
const WorkflowsRunCommandOptionsSchema = JsonOptionSchema.extend({
|
|
709
|
+
workflow: z.string().min(1),
|
|
710
|
+
payload: z.string().optional(),
|
|
711
|
+
projectId: z.uuid().optional(),
|
|
712
|
+
input: z.string().optional(),
|
|
713
|
+
inputFile: z.string().optional(),
|
|
714
|
+
workflowGlobals: z.string().optional(),
|
|
715
|
+
workflowGlobalsFile: z.string().optional(),
|
|
716
|
+
path: z.string().optional(),
|
|
717
|
+
wait: z.boolean().default(false),
|
|
718
|
+
follow: z.boolean().default(false),
|
|
719
|
+
timeout: z.coerce.number().int().min(1).default(120),
|
|
720
|
+
verbose: z.boolean().default(false)
|
|
721
|
+
}).superRefine((value, ctx) => {
|
|
722
|
+
const inputSources = [
|
|
723
|
+
value.payload ? "positional payload" : null,
|
|
724
|
+
value.input ? "--input" : null,
|
|
725
|
+
value.inputFile ? "--input-file" : null
|
|
726
|
+
].filter((source) => source !== null);
|
|
727
|
+
if (inputSources.length > 1) ctx.addIssue({
|
|
728
|
+
code: z.ZodIssueCode.custom,
|
|
729
|
+
path: ["input"],
|
|
730
|
+
message: `Use only one workflow input source: ${inputSources.join(", ")}.`
|
|
731
|
+
});
|
|
732
|
+
if (value.workflowGlobals && value.workflowGlobalsFile) ctx.addIssue({
|
|
733
|
+
code: z.ZodIssueCode.custom,
|
|
734
|
+
path: ["workflowGlobals"],
|
|
735
|
+
message: "Use either --workflow-globals or --workflow-globals-file, not both."
|
|
736
|
+
});
|
|
737
|
+
});
|
|
738
|
+
const WORKFLOWS_RUN_OPTIONS_CONFIG = {
|
|
739
|
+
...JSON_OPTION_CONFIG,
|
|
740
|
+
projectId: {
|
|
741
|
+
flag: "--project-id <uuid>",
|
|
742
|
+
description: "Project override. If omitted, read keystroke.config.ts from --path/CWD"
|
|
743
|
+
},
|
|
744
|
+
input: {
|
|
745
|
+
flag: "--input <json>",
|
|
746
|
+
description: "Workflow input as inline JSON object"
|
|
747
|
+
},
|
|
748
|
+
inputFile: {
|
|
749
|
+
flag: "--input-file <path>",
|
|
750
|
+
description: "Path to a JSON file containing workflow input"
|
|
751
|
+
},
|
|
752
|
+
workflowGlobals: {
|
|
753
|
+
flag: "--workflow-globals <json>",
|
|
754
|
+
description: "Workflow globals as inline JSON object"
|
|
755
|
+
},
|
|
756
|
+
workflowGlobalsFile: {
|
|
757
|
+
flag: "--workflow-globals-file <path>",
|
|
758
|
+
description: "Path to a JSON file containing workflow globals"
|
|
759
|
+
},
|
|
760
|
+
path: {
|
|
761
|
+
flag: "--path <dir>",
|
|
762
|
+
description: "Path to project root (directory containing keystroke.config.ts); auto-discovered from CWD if omitted"
|
|
763
|
+
},
|
|
764
|
+
wait: {
|
|
765
|
+
flag: "--wait",
|
|
766
|
+
description: "Poll until the run reaches a terminal status"
|
|
767
|
+
},
|
|
768
|
+
follow: {
|
|
769
|
+
flag: "--follow",
|
|
770
|
+
description: "Poll logs/events while waiting; implies --wait"
|
|
771
|
+
},
|
|
772
|
+
timeout: {
|
|
773
|
+
flag: "--timeout <seconds>",
|
|
774
|
+
description: "Max seconds to wait for workflow completion (default: 120)"
|
|
775
|
+
},
|
|
776
|
+
verbose: {
|
|
777
|
+
flag: "--verbose",
|
|
778
|
+
description: "Show detailed runtime events and logs while waiting"
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
function createWorkflowsRunCommand() {
|
|
782
|
+
return createTypedCommand({
|
|
783
|
+
name: "run",
|
|
784
|
+
description: "Run a workflow from the current deployment",
|
|
785
|
+
schema: WorkflowsRunCommandOptionsSchema,
|
|
786
|
+
optionsConfig: WORKFLOWS_RUN_OPTIONS_CONFIG,
|
|
787
|
+
arguments: [{
|
|
788
|
+
name: "workflow",
|
|
789
|
+
description: "Authored workflow id",
|
|
790
|
+
key: "workflow"
|
|
791
|
+
}, {
|
|
792
|
+
name: "payload",
|
|
793
|
+
description: "Workflow input as inline JSON object",
|
|
794
|
+
key: "payload",
|
|
795
|
+
required: false
|
|
796
|
+
}],
|
|
797
|
+
loadHandler: async () => (await import("./run.handler-BxLH75WW.mjs")).handleWorkflowsRun
|
|
704
798
|
});
|
|
705
799
|
}
|
|
706
800
|
//#endregion
|
|
@@ -716,7 +810,7 @@ function createWorkflowsTryDeployCommand() {
|
|
|
716
810
|
description: "Authored workflow id (preferred) or workflow name. Multiple workflows with the same name run sequentially.",
|
|
717
811
|
key: "workflow"
|
|
718
812
|
},
|
|
719
|
-
loadHandler: async () => (await import("./try-deploy.handler-
|
|
813
|
+
loadHandler: async () => (await import("./try-deploy.handler-dA_YGWRq.mjs").then((n) => n.n)).handleWorkflowsTryDeploy
|
|
720
814
|
});
|
|
721
815
|
}
|
|
722
816
|
//#endregion
|
|
@@ -754,7 +848,7 @@ function createWorkflowsValidateCommand() {
|
|
|
754
848
|
key: "workflow",
|
|
755
849
|
required: false
|
|
756
850
|
},
|
|
757
|
-
loadHandler: async () => (await import("./validate.handler-
|
|
851
|
+
loadHandler: async () => (await import("./validate.handler-BtDSKAFY.mjs")).handleWorkflowsValidate
|
|
758
852
|
});
|
|
759
853
|
}
|
|
760
854
|
//#endregion
|
|
@@ -773,16 +867,17 @@ function createWorkflowsCommand() {
|
|
|
773
867
|
description: "Manage, run, inspect, and debug workflows",
|
|
774
868
|
schema: WorkflowsOptionsSchema,
|
|
775
869
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
776
|
-
loadHandler: async () => (await import("./list.handler-
|
|
870
|
+
loadHandler: async () => (await import("./list.handler-Dr9Ti-dt.mjs")).handleWorkflowsList,
|
|
777
871
|
subcommands: [
|
|
778
872
|
createTypedCommand({
|
|
779
873
|
name: "list",
|
|
780
874
|
description: "List all workflows in the project",
|
|
781
875
|
schema: WorkflowsOptionsSchema,
|
|
782
876
|
optionsConfig: WORKFLOWS_OPTIONS_CONFIG,
|
|
783
|
-
loadHandler: async () => (await import("./list.handler-
|
|
877
|
+
loadHandler: async () => (await import("./list.handler-Dr9Ti-dt.mjs")).handleWorkflowsList
|
|
784
878
|
}),
|
|
785
879
|
createWorkflowsBuildCommand(),
|
|
880
|
+
createWorkflowsRunCommand(),
|
|
786
881
|
createWorkflowsTryDeployCommand(),
|
|
787
882
|
createWorkflowsInspectCommand(),
|
|
788
883
|
createWorkflowsValidateCommand(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Command-line interface for creating, managing, and deploying Keystroke automations.",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"rolldown": "1.0.0-rc.17",
|
|
34
34
|
"tsx": "^4.21.0",
|
|
35
35
|
"zod": "^4.3.6",
|
|
36
|
-
"@keystrokehq/skills": "0.0.
|
|
36
|
+
"@keystrokehq/skills": "0.0.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tsdown": "0.21.10",
|
|
File without changes
|
|
File without changes
|
/package/dist/{detect-env-access-CwkOYeYM-KtEle6I3.mjs → detect-env-access-CwkOYeYM-D4o8gRZs.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|