@keystrokehq/cli 0.0.20 → 0.0.22
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-CiqqUxKN.mjs → accept.handler-C6KBLKmW.mjs} +1 -1
- package/dist/{admin-B0U2Aghv.mjs → admin-D2CQoZAN.mjs} +9 -9
- package/dist/{agent-bundle-package-DWV6B_5q-BsbCEeMw.mjs → agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs} +1 -1
- package/dist/{agents-DBebUEwk.mjs → agents-Bn0g5o0o.mjs} +7 -7
- package/dist/{api-BjBpWWlm.mjs → api-O5tdGdzc.mjs} +30 -4
- package/dist/{api-keys-BHAgmC4E.mjs → api-keys-BixCnZJW.mjs} +5 -5
- package/dist/{auth-D-PZAjdd.mjs → auth-yCNMT8sJ.mjs} +14 -7
- package/dist/{auth.handler-CxTDSO6O.mjs → auth.handler-BedGpKh1.mjs} +7 -12
- package/dist/{build-agents-DseUtzd4-BNtZrqoY.mjs → build-agents-DseUtzd4-DFh2e5Cn.mjs} +5 -5
- package/dist/{build-metadata-BB_L45ZS-d5-QLDZ5.mjs → build-metadata-BB_L45ZS-BtGGjHIV.mjs} +7 -7
- package/dist/{build-progress-BVwDg6lC.mjs → build-progress-nYa14iBP.mjs} +1 -1
- package/dist/{build-tasks-C09SdfjC-DxKcmENc.mjs → build-tasks-C09SdfjC-B0F7BZZG.mjs} +3 -3
- package/dist/{build-workflows-BZ_m97Pr-DwcnRlyh.mjs → build-workflows-BZ_m97Pr-DKANy85L.mjs} +9 -8
- package/dist/{build.handler-CTX80S1K.mjs → build.handler-CyDc8jiZ.mjs} +5 -5
- package/dist/{chunk-DYxdGL9S.mjs → chunk-CH6r78ws.mjs} +1 -2
- package/dist/{clear-cache.handler-8RFmjHoo.mjs → clear-cache.handler-FmJPHdWG.mjs} +1 -1
- package/dist/{clear.handler-Bksm2HI4.mjs → clear.handler-Cvb9chs4.mjs} +27 -13
- package/dist/{commander-DQLrBSIW.mjs → commander-9Kro0Dl3.mjs} +4 -7
- package/dist/common-AK0q0Oz0.mjs +20 -0
- package/dist/{connect-DV_EztVs.mjs → connect-_l7Lkfxi.mjs} +26 -2
- package/dist/{connect.handler-DbuGt3Xb.mjs → connect.handler-tqk-DOv8.mjs} +39 -4
- package/dist/{context-BUzxM3QI.mjs → context-B2cQ-Nt3.mjs} +30 -4
- package/dist/{create.handler-CQCRk-Na.mjs → create.handler-v9B0Z9Yf.mjs} +1 -1
- package/dist/{credential-env-map-qLCR_QbO.mjs → credential-env-map-Dvp00a4M.mjs} +1 -1
- package/dist/credential-requirements-D0mavK8j-CFMf0Xwu.mjs +619 -0
- package/dist/{credentials-xPtLFTjW.mjs → credentials-DQW8xxof.mjs} +2 -2
- package/dist/{credentials-m18a1_hw.mjs → credentials-Dr5lD7Hm.mjs} +6 -6
- package/dist/{current-deployment-workflow-pyBoobIm.mjs → current-deployment-workflow-qMfOrRIu.mjs} +4 -4
- package/dist/{current.handler-BJGJgdGP.mjs → current.handler-Cm_-JLyZ.mjs} +1 -1
- package/dist/declared-credential-requirements-B6h4WRv4.mjs +103 -0
- package/dist/{delete.handler-DNoehdOH.mjs → delete.handler-DtP_zUaq.mjs} +1 -1
- package/dist/{deploy-BKjcO_sm.mjs → deploy-BURTx92e.mjs} +1 -1
- package/dist/{deploy-3tHCBGky.mjs → deploy-CB6pfCuB.mjs} +2 -2
- package/dist/{deploy-progress-CyolzjRB.mjs → deploy-progress-Dlp9aBDW.mjs} +1 -1
- package/dist/{deploy.handler-TnPNBYXZ.mjs → deploy.handler-Bg0dpSTj.mjs} +16 -16
- package/dist/{detect-env-access-CwkOYeYM-D8-hxij0.mjs → detect-env-access-CwkOYeYM-D4aTZv4R.mjs} +2 -2
- package/dist/{diff.handler-DO2WzdGB.mjs → diff.handler-CJPrszL1.mjs} +4 -4
- package/dist/{dist-BGrWr5fp.mjs → dist-Br4m3sFZ.mjs} +14 -12
- package/dist/{dist-CIInPRGh.mjs → dist-DuJjDZIf.mjs} +25 -2
- package/dist/{env.handler-C5GNyiJt.mjs → env.handler-6TrLd3fo.mjs} +7 -7
- package/dist/{error-boundary-GtRvP2oP.mjs → error-boundary-DVZipk-A.mjs} +1 -1
- package/dist/{file-metadata-B8c7Y5yg.mjs → file-metadata-DQVDjr7M.mjs} +1 -1
- package/dist/{import-module-y0glInUe-CfNsQNia.mjs → import-module-y0glInUe-DxX0-BRO.mjs} +274 -28
- package/dist/{init-D9RIT2CY.mjs → init-DBMtY3eO.mjs} +3 -3
- package/dist/{init.handler-0TJY1YNy.mjs → init.handler-BoYbE-6H.mjs} +3 -3
- package/dist/{inspect.handler-BrYFfN4H.mjs → inspect.handler-Juu2vGbB.mjs} +4 -4
- package/dist/{integration-catalog-BrJsBkfx.mjs → integration-catalog-cYlTmOSb.mjs} +1 -1
- package/dist/{integrations-vSyAQ6HA.mjs → integrations-Cdq7iSLj.mjs} +5 -5
- package/dist/{invites-BASM4PJr.mjs → invites-DHyHZOY_.mjs} +4 -4
- package/dist/{invites.list.handler-c-aw6g5o.mjs → invites.list.handler-C-QpsG2J.mjs} +1 -1
- package/dist/{invites.resend.handler-MnMEjP_Z.mjs → invites.resend.handler-KFKbSPzR.mjs} +1 -1
- package/dist/{invites.revoke.handler-CHX6Z8kj.mjs → invites.revoke.handler-Cuz7jrGC.mjs} +1 -1
- package/dist/keystroke.mjs +21 -21
- package/dist/{list-enrichment-DcplcioC.mjs → list-enrichment-CCRHYslm.mjs} +1 -1
- package/dist/{list.handler-DJNtXw7C.mjs → list.handler-6x3GVumu.mjs} +1 -1
- package/dist/{list2.handler-BdE1k2kl.mjs → list.handler-BWsl4iYw.mjs} +4 -4
- package/dist/{list.handler-BsgCd1oF.mjs → list.handler-CLGQDuo5.mjs} +5 -5
- package/dist/{list.handler-CynN-ezD.mjs → list.handler-Cc-V1TNz.mjs} +1 -1
- package/dist/{list.handler-DXwKdfIv.mjs → list.handler-DRe38pAj.mjs} +2 -2
- package/dist/{list.handler-CDtjm-6d.mjs → list.handler-Do2tVOnu.mjs} +1 -1
- package/dist/{list.handler-BBzB1_1l.mjs → list.handler-RtHhrTZ3.mjs} +1 -1
- package/dist/{listen-Ca9KdiB2.mjs → listen-DZdSevsB.mjs} +2 -2
- package/dist/{listen.handler-KWPN03S8.mjs → listen.handler-BccHe1jh.mjs} +2 -2
- package/dist/{logs-BEDf7hZ0.mjs → logs-Bh_PBnu6.mjs} +3 -3
- package/dist/{logs.handler-mk1lcZbU.mjs → logs.handler-DItDS1zw.mjs} +2 -2
- package/dist/{members.add.handler-CTvlxBZU.mjs → members.add.handler-D3nQ_Ln6.mjs} +1 -1
- package/dist/{members.invite.handler-wFO0r7Pi.mjs → members.invite.handler-rKhg5n_C.mjs} +1 -1
- package/dist/{members.list.handler-PPdqs4nI.mjs → members.list.handler-C9Yh469k.mjs} +1 -1
- package/dist/{members.remove.handler-a5WI6zE4.mjs → members.remove.handler-Dnrck-E6.mjs} +1 -1
- package/dist/{members.update.handler-3xblTzmz.mjs → members.update.handler-qo5r6arJ.mjs} +1 -1
- package/dist/{metadata-layout-Bv-B0nHj-DtMWZ7Cc.mjs → metadata-layout-Bv-B0nHj-CO8mjjSl.mjs} +1 -1
- package/dist/{normalize-path-CojS-CgQ-CRqBc6D6.mjs → normalize-path-CojS-CgQ-aOM0agxS.mjs} +1 -1
- package/dist/{org-CzLw3neZ.mjs → org-DnES84sS.mjs} +15 -15
- package/dist/{orgs.create.handler-CcPpDweZ.mjs → orgs.create.handler-DF4eEL-2.mjs} +1 -1
- package/dist/{orgs.get.handler-BACPg7vR.mjs → orgs.get.handler-BmJnseQa.mjs} +1 -1
- package/dist/{orgs.list.handler-DEF8OyvM.mjs → orgs.list.handler-DDVvSbsT.mjs} +1 -1
- package/dist/{paused.handler-D4j8_Za4.mjs → paused.handler-BLUchSMD.mjs} +1 -1
- package/dist/{projects-CJCKxG2u.mjs → projects-Cv14bBGy.mjs} +4 -4
- package/dist/{projects-s5ehKLil.mjs → projects-ZNcKwds2.mjs} +2 -2
- package/dist/{requirements.handler-Bk-sAE9C.mjs → requirements.handler-BKFocUof.mjs} +5 -5
- package/dist/{resolve-cli-credentials-DytxgMwn.mjs → resolve-cli-credentials-DaMDaamj.mjs} +1 -1
- package/dist/{resolve-project-CWP2fji3.mjs → resolve-project-Cj3MFnU0.mjs} +1 -1
- package/dist/{run-polling-DKclfet-.mjs → run-polling-3XOGl4hh.mjs} +3 -3
- package/dist/{run.handler-x0B-CjNF.mjs → run.handler-DZuUx0fi.mjs} +5 -5
- package/dist/{runs-DoMVOCNj.mjs → runs-BOo3j297.mjs} +2 -2
- package/dist/schemas-D2zfmyC-.mjs +671 -0
- package/dist/{skills-sync.handler-CYkCeuQn.mjs → skills-sync.handler-09mDbx5q.mjs} +1 -1
- package/dist/{skills.command-DeAgMGGw.mjs → skills.command-B-MhRN3J.mjs} +4 -4
- package/dist/{source-analysis-BBg2E_6G-BJTRqWrQ.mjs → source-analysis-BBg2E_6G-wPP9mjQx.mjs} +3 -3
- package/dist/{source-analysis-BMMPIHN9.mjs → source-analysis-z2RSZw6X.mjs} +1 -1
- package/dist/{src-BYQwp8Ig.mjs → src-DNhUmpSl.mjs} +1 -1
- package/dist/{switch.handler-CV4ZBXAu.mjs → switch.handler-BFGvj5c6.mjs} +2 -2
- package/dist/{sync-KCVM02IY.mjs → sync-CZ3iUPTA.mjs} +2 -2
- package/dist/{sync.handler-Cuw89341.mjs → sync.handler-B1L8I9lF.mjs} +7 -7
- package/dist/{task-BSCN9cU4.mjs → task-BWuIKWh4.mjs} +2 -392
- package/dist/{task-target-build-B0HF2_At.mjs → task-target-build-CTgl4L42.mjs} +5 -5
- package/dist/{task-target-deploy-ClbwKJ8K.mjs → task-target-deploy-DeUyfi9H.mjs} +1 -1
- package/dist/{task-target-deploy-dQYnMO8n-CeTmRcDw.mjs → task-target-deploy-dQYnMO8n-d2vdeqXH.mjs} +1 -1
- package/dist/task-target-deploy-runner.mjs +6 -6
- package/dist/{test-Rm3thni3.mjs → test-Byq4hG3C.mjs} +2 -2
- package/dist/{test.handler-CTd-heRS.mjs → test.handler-BsrMMj5O.mjs} +9 -9
- package/dist/{test.handler-DhhcsvHN.mjs → test.handler-CAsVgOpT.mjs} +1 -1
- package/dist/{tool.handler-C3LNyQbc.mjs → tool.handler-BHS5Z4J_.mjs} +63 -9
- package/dist/{trigger-artifacts-BcRScRSp-DqFgzl_B.mjs → trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs} +4 -4
- package/dist/{trigger-manifest-DTni4NaZ.mjs → trigger-manifest-C07EM-b2.mjs} +6 -5
- package/dist/{upgrade-Cf7y38xR.mjs → upgrade-bZVjVXnu.mjs} +2 -2
- package/dist/{upload-CJWApEgz.mjs → upload-CE4H5R1h.mjs} +1 -1
- package/dist/{upload.handler-BHIWYPph.mjs → upload.handler-DXVx2u3A.mjs} +7 -7
- package/dist/{users.get.handler-spWaHG8h.mjs → users.get.handler-DqD2ELK2.mjs} +1 -1
- package/dist/{users.list.handler-DLuU7cd_.mjs → users.list.handler-DZSPvpGF.mjs} +1 -1
- package/dist/{users.set-role.handler-CojFmpcD.mjs → users.set-role.handler-73smNUVF.mjs} +1 -1
- package/dist/{utils-Ddltm1sR.mjs → utils-BaxDlCsW.mjs} +1 -1
- package/dist/{validate.handler-DIJBuX1P.mjs → validate.handler-CmfcMX0t.mjs} +4 -4
- package/dist/{workflow-build-IGYhEC8Y.mjs → workflow-build-Bi1Aacc5.mjs} +20 -20
- package/dist/workflow-build-manifest-1sC52TIG.mjs +259 -0
- package/dist/{workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs → workflow-bundler-BzHk73PM-xQwAF08W.mjs} +2 -2
- package/dist/{workflows-MANdvLft.mjs → workflows-C_C13Zr0.mjs} +16 -14
- package/dist/{writer-byNNUjRm-w5O7-VT_.mjs → writer-byNNUjRm-B-on1n6c.mjs} +6 -6
- package/package.json +6 -6
- package/dist/schemas-U2OzP9gP.mjs +0 -281
- package/dist/src-BHTjsZ9V.mjs +0 -456
- /package/dist/{agent-manifest-CZ7BeUSG.mjs → agent-manifest-Pg0aURo7.mjs} +0 -0
- /package/dist/{browser-Cu4k-wT_.mjs → browser-Dvv5OQrt.mjs} +0 -0
- /package/dist/{clear.handler-mfNmIUYP.mjs → clear.handler-BdR56Cok.mjs} +0 -0
- /package/dist/{concurrency-gXn9Rw8x-BSBbRfVp.mjs → concurrency-gXn9Rw8x-CnBnF2cg.mjs} +0 -0
- /package/dist/{credential-schema-mismatch-BHI_B-U-.mjs → credential-schema-mismatch-kfGeiSB1.mjs} +0 -0
- /package/dist/{diff-utils-x5pi8SrL.mjs → diff-utils-CXKNQUXO.mjs} +0 -0
- /package/dist/{layout-DRf9qUf8.mjs → layout-B95Tku8F.mjs} +0 -0
- /package/dist/{logs.handler-CcA1UzJm.mjs → logs.handler-Bs1DVMaO.mjs} +0 -0
- /package/dist/{oxc-B3KI3rf_-Cnk0L10M.mjs → oxc-B3KI3rf_-B9omBIuN.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-CzXPGxdU.mjs → read-credential-keys-77a91T8M-aLuQvlIq.mjs} +0 -0
- /package/dist/{register.handler-CSvlOMF6.mjs → register.handler-C_NqMLir.mjs} +0 -0
- /package/dist/{rolldown-runtime-twds-ZHy-BoF7MLzP.mjs → rolldown-runtime-twds-ZHy-RuJszab7.mjs} +0 -0
- /package/dist/{run-polling-CzyVv7Ba.mjs → run-polling-DKWPGLyF.mjs} +0 -0
- /package/dist/{schema-CvSZqa3t.mjs → schema-DFJiNWyd.mjs} +0 -0
- /package/dist/{schema-display-DxLA3j5H.mjs → schema-display-XrRCdFL0.mjs} +0 -0
- /package/dist/{skill-installer-CYFshTBy.mjs → skill-installer-Cm9hF6OB.mjs} +0 -0
- /package/dist/{skills.handler-Bma-MJX-.mjs → skills.handler-KEUkV5NH.mjs} +0 -0
- /package/dist/{spinner-progress-DV28G4tP.mjs → spinner-progress-BtEIJRX4.mjs} +0 -0
- /package/dist/{status.handler-BOV0eX3J.mjs → status.handler-CW-EFhy3.mjs} +0 -0
- /package/dist/{types-DamInJD6.mjs → types-D1cVpE7_.mjs} +0 -0
- /package/dist/{upgrade.handler-Bz_oQcAw.mjs → upgrade.handler-C7KvNL0x.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { a as ui } from "./keystroke.mjs";
|
|
4
|
-
import { a as validateApiKey, i as requireClient } from "./context-
|
|
4
|
+
import { a as validateApiKey, i as requireClient } from "./context-B2cQ-Nt3.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));
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { D as CliExitError, a as ui, c as getProcessEnv, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
-
import { t as Credentials } from "./dist-
|
|
4
|
+
import { t as Credentials } from "./dist-DuJjDZIf.mjs";
|
|
5
5
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
6
6
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
7
|
-
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-
|
|
8
|
-
import { a as readManifestsFromOutDir } from "./dist-
|
|
9
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
10
|
-
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-
|
|
11
|
-
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-
|
|
12
|
-
import { n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-
|
|
7
|
+
import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-B2cQ-Nt3.mjs";
|
|
8
|
+
import { a as readManifestsFromOutDir } from "./dist-Br4m3sFZ.mjs";
|
|
9
|
+
import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
|
|
10
|
+
import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-Bi1Aacc5.mjs";
|
|
11
|
+
import { t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-qMfOrRIu.mjs";
|
|
12
|
+
import { n as resolveInput, o as validateInputOrExit, t as pollForCompletion } from "./run-polling-3XOGl4hh.mjs";
|
|
13
13
|
import * as os from "node:os";
|
|
14
14
|
import { tmpdir } from "node:os";
|
|
15
15
|
import * as path$1 from "node:path";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
18
18
|
import { pathToFileURL } from "node:url";
|
|
19
|
-
import { clearOperationContext, clearOperationCredentialResolver, registerOperationContext, registerOperationCredentialResolver } from "@keystrokehq/core/operation/runtime";
|
|
20
|
-
import { clearRuntime, registerRuntime } from "@keystrokehq/core/workflow/runtime";
|
|
21
19
|
//#region ../../packages/testing/src/shared/create-mock-hook.ts
|
|
22
20
|
/** Creates a Hook that resolves immediately when awaited. */
|
|
23
21
|
function createMockHook() {
|
|
@@ -43,6 +41,62 @@ function createTestWorkflowContext(options = {}) {
|
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
//#endregion
|
|
44
|
+
//#region ../../packages/core/dist/chunks/execution-scope-BCDb3CU7.mjs
|
|
45
|
+
const SCOPE_STACK_KEY = "__ks_execution_scope_stack__";
|
|
46
|
+
function getScopeStack() {
|
|
47
|
+
const g = globalThis;
|
|
48
|
+
if (!g[SCOPE_STACK_KEY]) g[SCOPE_STACK_KEY] = [];
|
|
49
|
+
return g[SCOPE_STACK_KEY];
|
|
50
|
+
}
|
|
51
|
+
function getCurrentScope() {
|
|
52
|
+
const stack = getScopeStack();
|
|
53
|
+
return stack[stack.length - 1] ?? getDefaultScope();
|
|
54
|
+
}
|
|
55
|
+
const DEFAULT_SCOPE_KEY = "__ks_execution_scope_default__";
|
|
56
|
+
function getDefaultScope() {
|
|
57
|
+
const g = globalThis;
|
|
58
|
+
if (!g[DEFAULT_SCOPE_KEY]) g[DEFAULT_SCOPE_KEY] = { stepContextProviders: [] };
|
|
59
|
+
return g[DEFAULT_SCOPE_KEY];
|
|
60
|
+
}
|
|
61
|
+
function setExecutionScopeWorkflowRuntime(provider) {
|
|
62
|
+
const scope = getCurrentScope();
|
|
63
|
+
scope.workflowRuntimeProvider = provider;
|
|
64
|
+
}
|
|
65
|
+
function pushExecutionScopeStepContext(provider) {
|
|
66
|
+
const scope = getCurrentScope();
|
|
67
|
+
scope.stepContextProviders = [...scope.stepContextProviders, provider];
|
|
68
|
+
}
|
|
69
|
+
function clearExecutionScopeStepContexts() {
|
|
70
|
+
const scope = getCurrentScope();
|
|
71
|
+
scope.stepContextProviders = [];
|
|
72
|
+
}
|
|
73
|
+
function setExecutionScopeStepCredentialResolver(resolver) {
|
|
74
|
+
const scope = getCurrentScope();
|
|
75
|
+
scope.stepCredentialResolver = resolver;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region ../../packages/core/dist/chunks/credential-resolver-registry-BRH30wCz.mjs
|
|
79
|
+
function registerOperationContext(registry) {
|
|
80
|
+
pushExecutionScopeStepContext(registry.getOperationContext);
|
|
81
|
+
}
|
|
82
|
+
function clearOperationContext() {
|
|
83
|
+
clearExecutionScopeStepContexts();
|
|
84
|
+
}
|
|
85
|
+
function registerOperationCredentialResolver(resolver) {
|
|
86
|
+
setExecutionScopeStepCredentialResolver(resolver.resolveOperationCredentials);
|
|
87
|
+
}
|
|
88
|
+
function clearOperationCredentialResolver() {
|
|
89
|
+
setExecutionScopeStepCredentialResolver(void 0);
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region ../../packages/core/dist/chunks/context-registry-DqNWcTgK.mjs
|
|
93
|
+
function registerRuntime(registry) {
|
|
94
|
+
setExecutionScopeWorkflowRuntime(registry.getRuntime);
|
|
95
|
+
}
|
|
96
|
+
function clearRuntime() {
|
|
97
|
+
setExecutionScopeWorkflowRuntime(void 0);
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
46
100
|
//#region ../../packages/testing/src/test-runtime/credentials/env-resolver.ts
|
|
47
101
|
/**
|
|
48
102
|
* Computes the env var name for a credential key.
|
package/dist/{trigger-artifacts-BcRScRSp-DqFgzl_B.mjs → trigger-artifacts-BcRScRSp-C-JBJ6y8.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-
|
|
5
|
-
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-
|
|
6
|
-
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-
|
|
3
|
+
import { n as readOptionalJsonSchemaKeys } from "./declared-credential-requirements-B6h4WRv4.mjs";
|
|
4
|
+
import { t as __exportAll } from "./rolldown-runtime-twds-ZHy-RuJszab7.mjs";
|
|
5
|
+
import { t as readCredentialKeysFromSchemaObject } from "./read-credential-keys-77a91T8M-aLuQvlIq.mjs";
|
|
6
|
+
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-D4aTZv4R.mjs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { rolldown } from "rolldown";
|
|
9
9
|
//#region ../../packages/workflow-builder/dist/trigger-artifacts-BcRScRSp.mjs
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
|
|
4
|
+
import { c as TriggerSourceSchema, i as IdempotencyKeyConfigSchema, l as TriggerTypeSchema, s as TriggerCredentialRequirementsSchema } from "./credential-requirements-D0mavK8j-CFMf0Xwu.mjs";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region ../../packages/shared-types/src/workflows/build-output/trigger-manifest.ts
|
|
6
7
|
const TriggerBuildFunctionSchema = z.object({
|
|
@@ -15,12 +16,12 @@ const TriggerBuildManifestSchema = z.object({
|
|
|
15
16
|
* `logicalTriggerKey` (`id`) back to the human-authored name.
|
|
16
17
|
*/
|
|
17
18
|
authoredTriggerId: z.string().min(1),
|
|
18
|
-
type:
|
|
19
|
+
type: TriggerTypeSchema,
|
|
19
20
|
/**
|
|
20
21
|
* Webhook source discriminator (`'custom' | 'app'`). Undefined for
|
|
21
22
|
* non-webhook triggers.
|
|
22
23
|
*/
|
|
23
|
-
triggerSource:
|
|
24
|
+
triggerSource: TriggerSourceSchema.optional(),
|
|
24
25
|
/**
|
|
25
26
|
* Root-trigger lineage key for `.narrow()` lineage. Narrowed custom-webhook
|
|
26
27
|
* siblings share the same `webhookSecretHash`/`webhookPublicId` via this key.
|
|
@@ -31,11 +32,11 @@ const TriggerBuildManifestSchema = z.object({
|
|
|
31
32
|
schedule: z.string().optional(),
|
|
32
33
|
timezone: z.string().optional(),
|
|
33
34
|
config: z.record(z.string(), z.unknown()).optional(),
|
|
34
|
-
requiredCredentials:
|
|
35
|
+
requiredCredentials: TriggerCredentialRequirementsSchema.optional(),
|
|
35
36
|
/** Server-side JSON Schema filter; replaces the legacy filter callback. */
|
|
36
37
|
filterSchema: JsonSchemaSchema.optional(),
|
|
37
38
|
/** Declarative idempotency-key resolver; replaces the legacy callback. */
|
|
38
|
-
idempotencyConfig:
|
|
39
|
+
idempotencyConfig: IdempotencyKeyConfigSchema.optional(),
|
|
39
40
|
functions: z.record(z.string(), TriggerBuildFunctionSchema).optional()
|
|
40
41
|
});
|
|
41
42
|
//#endregion
|
|
@@ -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-9Kro0Dl3.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-C7KvNL0x.mjs")).handleUpgrade
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as __exportAll } from "./chunk-
|
|
3
|
+
import { n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createReadStream, promises } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { a as ui, c as getProcessEnv, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
4
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
5
5
|
import { a as writeJsonError, i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
6
|
-
import { i as requireClient } from "./context-
|
|
7
|
-
import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-
|
|
8
|
-
import { t as requireWorkflowsDir } from "./resolve-project-
|
|
9
|
-
import { t as getIntegrationCatalog } from "./integration-catalog-
|
|
10
|
-
import { t as readCredentialEnvMap } from "./credential-env-map-
|
|
11
|
-
import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-
|
|
12
|
-
import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-
|
|
6
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
7
|
+
import { a as readManifestsFromOutDir, t as collectCredentialFingerprintMapFromProjectDist } from "./dist-Br4m3sFZ.mjs";
|
|
8
|
+
import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
|
|
9
|
+
import { t as getIntegrationCatalog } from "./integration-catalog-cYlTmOSb.mjs";
|
|
10
|
+
import { t as readCredentialEnvMap } from "./credential-env-map-Dvp00a4M.mjs";
|
|
11
|
+
import { a as verifyCredentialResolvable, i as validateManualCredentialWithHook, n as resolveCredentialValuesFromEnv, r as uploadCredential, t as groupCredentialRequirements } from "./credentials-DQW8xxof.mjs";
|
|
12
|
+
import { n as renderCredentialSchemaMismatchText, r as writeCredentialSchemaMismatchJson, t as isCredentialSchemaMismatchErrorLike } from "./credential-schema-mismatch-kfGeiSB1.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
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { a as ui } from "./keystroke.mjs";
|
|
4
4
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
5
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
6
6
|
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
|
|
7
7
|
//#region src/commands/admin/users.get.handler.ts
|
|
8
8
|
async function handleAdminUsersGet(options, ctx) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { a as ui } from "./keystroke.mjs";
|
|
4
4
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
5
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
6
6
|
import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
|
|
7
7
|
import Table from "cli-table3";
|
|
8
8
|
//#region src/commands/admin/users.list.handler.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { a as ui } from "./keystroke.mjs";
|
|
4
4
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
5
|
-
import { i as requireClient } from "./context-
|
|
5
|
+
import { i as requireClient } from "./context-B2cQ-Nt3.mjs";
|
|
6
6
|
import { n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CSZj4XlH.mjs";
|
|
7
7
|
//#region src/commands/admin/users.set-role.handler.ts
|
|
8
8
|
async function handleAdminUsersSetRole(options, ctx) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { i as readProjectConfig } from "./project-config-DudGRFPO.mjs";
|
|
4
|
-
import { h as resolveBuildOutputDir } from "./layout-
|
|
4
|
+
import { h as resolveBuildOutputDir } from "./layout-B95Tku8F.mjs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
//#region ../../packages/project-config/src/utils.ts
|
|
7
7
|
function resolveConfiguredBuildOutputDir(projectRoot, buildConfig) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { a as ui, j as throwReportedCliExit, y as toErrorMessage } from "./keystroke.mjs";
|
|
4
|
-
import { i as projects } from "./dist-
|
|
4
|
+
import { i as projects } from "./dist-DuJjDZIf.mjs";
|
|
5
5
|
import { i as writeJson } from "./output-BWcVRt-T.mjs";
|
|
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-
|
|
6
|
+
import { t as requireWorkflowsDir } from "./resolve-project-Cj3MFnU0.mjs";
|
|
7
|
+
import { s as build, t as WorkflowNotFoundError } from "./workflow-build-Bi1Aacc5.mjs";
|
|
8
|
+
import { t as createBuildProgress } from "./build-progress-nYa14iBP.mjs";
|
|
9
9
|
import * as os from "node:os";
|
|
10
10
|
import * as path$1 from "node:path";
|
|
11
11
|
import { mkdtemp, rm } from "node:fs/promises";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { i as __toESM, n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
4
|
import { F as originalConsole, P as logger, a as ui, n as style, t as ANSI, y as toErrorMessage } from "./keystroke.mjs";
|
|
5
|
-
import { r as getKeystrokeTmpDir } from "./dist-
|
|
5
|
+
import { r as getKeystrokeTmpDir } from "./dist-DuJjDZIf.mjs";
|
|
6
6
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { t as AgentVersionManifestSchema } from "./agent-manifest-
|
|
9
|
-
import { r as RelativeFilePathSchema } from "./file-metadata-
|
|
10
|
-
import { c as createArtifactOutputFiles, l as createMetadataOutputFile, o as METADATA_ROOT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-
|
|
11
|
-
import { t as resolveConfiguredBuildOutputDir } from "./utils-
|
|
12
|
-
import { a as readAgentSandboxPackage, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-
|
|
13
|
-
import { a as prewarmFileContentCache, c as typedEntries, i as createFileContentCache, l as require_out, n as computeBuilderFingerprint, o as resetFileContentCache, r as computeWorkflowFingerprint, s as sha256String } from "./metadata-layout-Bv-B0nHj-
|
|
14
|
-
import { a as getAgentArtifactPaths, c as hashWorkflowManifestForDisk, d as resolveOutputDir, i as createAgentOutputFiles, l as removeAgentArtifacts, n as BUILD_CACHE_FILE_NAME, o as hashAgentManifestForDisk, r as allOutputFilesExist, s as hashWorkflowFlowForDisk, t as AGENT_ARTIFACT_DIR_PREFIX, u as removeWorkflowArtifacts } from "./writer-byNNUjRm-
|
|
15
|
-
import { a as createDiscoveryFailure, c as createNamespaceStarExportDiscoveryError, d as isWorkflowLoadResult, f as loadWorkflowMetadataBatch, i as createAmbiguousExportDiscoveryError, l as isAgentLoadResult, o as createDuplicateWorkflowIdFailure, t as DuplicateWorkflowIdError, u as isTaskLoadResult } from "./import-module-y0glInUe-
|
|
16
|
-
import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-
|
|
17
|
-
import { a as getLocalModuleSpecifier, c as removeAllMetadataArtifacts, d as resolveDefaultExportAssignment, f as resolveLocalModulePath, i as collectWorkflowImportNames, n as DISCOVERY_IGNORE, o as getVariableDeclarators, r as collectLocalWorkflowBindings, s as isExportedVariableStatement, t as DISCOVERY_GLOB, u as removeMetadataArtifacts } from "./source-analysis-BBg2E_6G-
|
|
18
|
-
import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-
|
|
7
|
+
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-1sC52TIG.mjs";
|
|
8
|
+
import { t as AgentVersionManifestSchema } from "./agent-manifest-Pg0aURo7.mjs";
|
|
9
|
+
import { r as RelativeFilePathSchema } from "./file-metadata-DQVDjr7M.mjs";
|
|
10
|
+
import { c as createArtifactOutputFiles, l as createMetadataOutputFile, o as METADATA_ROOT_DIR_NAME, p as getWorkflowArtifactPaths, t as BUILD_DIR_NAME } from "./layout-B95Tku8F.mjs";
|
|
11
|
+
import { t as resolveConfiguredBuildOutputDir } from "./utils-BaxDlCsW.mjs";
|
|
12
|
+
import { a as readAgentSandboxPackage, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs";
|
|
13
|
+
import { a as prewarmFileContentCache, c as typedEntries, i as createFileContentCache, l as require_out, n as computeBuilderFingerprint, o as resetFileContentCache, r as computeWorkflowFingerprint, s as sha256String } from "./metadata-layout-Bv-B0nHj-CO8mjjSl.mjs";
|
|
14
|
+
import { a as getAgentArtifactPaths, c as hashWorkflowManifestForDisk, d as resolveOutputDir, i as createAgentOutputFiles, l as removeAgentArtifacts, n as BUILD_CACHE_FILE_NAME, o as hashAgentManifestForDisk, r as allOutputFilesExist, s as hashWorkflowFlowForDisk, t as AGENT_ARTIFACT_DIR_PREFIX, u as removeWorkflowArtifacts } from "./writer-byNNUjRm-B-on1n6c.mjs";
|
|
15
|
+
import { a as createDiscoveryFailure, c as createNamespaceStarExportDiscoveryError, d as isWorkflowLoadResult, f as loadWorkflowMetadataBatch, i as createAmbiguousExportDiscoveryError, l as isAgentLoadResult, o as createDuplicateWorkflowIdFailure, t as DuplicateWorkflowIdError, u as isTaskLoadResult } from "./import-module-y0glInUe-DxX0-BRO.mjs";
|
|
16
|
+
import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-B9omBIuN.mjs";
|
|
17
|
+
import { a as getLocalModuleSpecifier, c as removeAllMetadataArtifacts, d as resolveDefaultExportAssignment, f as resolveLocalModulePath, i as collectWorkflowImportNames, n as DISCOVERY_IGNORE, o as getVariableDeclarators, r as collectLocalWorkflowBindings, s as isExportedVariableStatement, t as DISCOVERY_GLOB, u as removeMetadataArtifacts } from "./source-analysis-BBg2E_6G-wPP9mjQx.mjs";
|
|
18
|
+
import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-aOM0agxS.mjs";
|
|
19
19
|
import * as path$1 from "node:path";
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import * as fs from "node:fs/promises";
|
|
@@ -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-BZ_m97Pr-
|
|
981
|
+
const { buildWorkflowArtifacts } = await import("./build-workflows-BZ_m97Pr-DKANy85L.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-DseUtzd4-
|
|
996
|
+
const { buildAgentArtifacts } = await import("./build-agents-DseUtzd4-DFh2e5Cn.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-C09SdfjC-
|
|
1005
|
+
const { buildTaskArtifacts } = await import("./build-tasks-C09SdfjC-B0F7BZZG.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-BZ_m97Pr-
|
|
1113
|
+
const { createWorkflowMetadataFailure } = await import("./build-workflows-BZ_m97Pr-DKANy85L.mjs");
|
|
1114
1114
|
plan.failures.push(createWorkflowMetadataFailure(discoveredWorkflow, loadResult?.error));
|
|
1115
1115
|
continue;
|
|
1116
1116
|
}
|
|
@@ -1308,7 +1308,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
|
|
|
1308
1308
|
cacheResolvedBindingKeys,
|
|
1309
1309
|
releaseBundleMemory: config.releaseBundleMemory
|
|
1310
1310
|
};
|
|
1311
|
-
const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-byNNUjRm-
|
|
1311
|
+
const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-byNNUjRm-B-on1n6c.mjs").then((n) => n.f).then((n) => n.t);
|
|
1312
1312
|
const writeResult = targetBindingKeys ? await writeTargetedBuildOutput({
|
|
1313
1313
|
artifacts: finalizedScopedArtifacts,
|
|
1314
1314
|
agentArtifacts,
|
|
@@ -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-BB_L45ZS-
|
|
1336
|
+
const { buildMetadataArtifacts } = await import("./build-metadata-BB_L45ZS-BtGGjHIV.mjs");
|
|
1337
1337
|
const metadata = await buildMetadataArtifacts({
|
|
1338
1338
|
projectRoot: config.projectRoot,
|
|
1339
1339
|
outputDir,
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { n as SHA256HashSchema, t as JsonSchemaSchema } from "./common-AK0q0Oz0.mjs";
|
|
4
|
+
import { a as IntegrationScopeSchema, d as WorkflowStepEntrySchema, o as ResolvedCredentialSetSchema, t as CredentialRequirementsSchema, u as TriggerUploadDataSchema } from "./credential-requirements-D0mavK8j-CFMf0Xwu.mjs";
|
|
5
|
+
import { a as SourceLocationSchema, i as ImportSourceSchema, n as CallsiteFingerprintSchema, t as CallKindSchema } from "./source-analysis-z2RSZw6X.mjs";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
//#region ../../packages/workflow-build-contracts/src/flow-graph-schema.ts
|
|
8
|
+
const DecisionKindSchema = z.enum([
|
|
9
|
+
"if",
|
|
10
|
+
"switch",
|
|
11
|
+
"ternary"
|
|
12
|
+
]);
|
|
13
|
+
const ParallelKindSchema = z.enum([
|
|
14
|
+
"all",
|
|
15
|
+
"race",
|
|
16
|
+
"allSettled",
|
|
17
|
+
"any"
|
|
18
|
+
]);
|
|
19
|
+
const LoopKindSchema = z.enum([
|
|
20
|
+
"for",
|
|
21
|
+
"for-of",
|
|
22
|
+
"for-in",
|
|
23
|
+
"while",
|
|
24
|
+
"do-while"
|
|
25
|
+
]);
|
|
26
|
+
const ExitKindSchema = z.enum(["return", "throw"]);
|
|
27
|
+
const FlowBranchKindSchema = z.enum([
|
|
28
|
+
"then",
|
|
29
|
+
"else",
|
|
30
|
+
"parallel-branch"
|
|
31
|
+
]);
|
|
32
|
+
const FlowNodeTypeSchema = z.enum([
|
|
33
|
+
"entry",
|
|
34
|
+
"step",
|
|
35
|
+
"code-block",
|
|
36
|
+
"decision",
|
|
37
|
+
"merge",
|
|
38
|
+
"fork",
|
|
39
|
+
"join",
|
|
40
|
+
"parallel-map",
|
|
41
|
+
"loop",
|
|
42
|
+
"exit"
|
|
43
|
+
]);
|
|
44
|
+
const FlowEdgeTypeSchema = z.enum([
|
|
45
|
+
"default",
|
|
46
|
+
"true-branch",
|
|
47
|
+
"false-branch",
|
|
48
|
+
"merge",
|
|
49
|
+
"loop-entry",
|
|
50
|
+
"loop-back",
|
|
51
|
+
"parallel",
|
|
52
|
+
"return"
|
|
53
|
+
]);
|
|
54
|
+
const FlowStatementSchema = z.object({
|
|
55
|
+
kind: z.string().min(1),
|
|
56
|
+
label: z.string().min(1),
|
|
57
|
+
sourceText: z.string().min(1)
|
|
58
|
+
});
|
|
59
|
+
const EntryNodeDataSchema = z.object({ kind: z.literal("entry") });
|
|
60
|
+
const StepNodeDataSchema = z.object({
|
|
61
|
+
kind: z.literal("call"),
|
|
62
|
+
callKind: CallKindSchema,
|
|
63
|
+
stepName: z.string().min(1),
|
|
64
|
+
callsiteFingerprint: CallsiteFingerprintSchema.optional(),
|
|
65
|
+
exportName: z.string().min(1).optional(),
|
|
66
|
+
stepId: z.string().min(1).optional(),
|
|
67
|
+
awaited: z.boolean().optional(),
|
|
68
|
+
dynamic: z.boolean().optional(),
|
|
69
|
+
recursive: z.boolean().optional(),
|
|
70
|
+
importSource: ImportSourceSchema.optional(),
|
|
71
|
+
outputBinding: z.string().min(1).optional(),
|
|
72
|
+
description: z.string().optional(),
|
|
73
|
+
inputSchema: JsonSchemaSchema.optional(),
|
|
74
|
+
outputSchema: JsonSchemaSchema.optional(),
|
|
75
|
+
source: SourceLocationSchema.optional(),
|
|
76
|
+
astKind: z.string().min(1).optional(),
|
|
77
|
+
scopeOverride: IntegrationScopeSchema.optional(),
|
|
78
|
+
credentialSets: z.array(ResolvedCredentialSetSchema).optional(),
|
|
79
|
+
requiredOAuthScopes: z.array(z.string()).optional()
|
|
80
|
+
});
|
|
81
|
+
const CodeBlockNodeDataSchema = z.object({
|
|
82
|
+
kind: z.literal("code-block"),
|
|
83
|
+
statements: z.array(FlowStatementSchema)
|
|
84
|
+
});
|
|
85
|
+
const DecisionNodeDataSchema = z.object({
|
|
86
|
+
kind: z.literal("decision"),
|
|
87
|
+
decisionKind: DecisionKindSchema.optional(),
|
|
88
|
+
source: SourceLocationSchema.optional(),
|
|
89
|
+
astKind: z.string().min(1).optional(),
|
|
90
|
+
conditionText: z.string().optional()
|
|
91
|
+
});
|
|
92
|
+
const MergeNodeDataSchema = z.object({
|
|
93
|
+
kind: z.literal("merge"),
|
|
94
|
+
source: SourceLocationSchema.optional()
|
|
95
|
+
});
|
|
96
|
+
const ForkNodeDataSchema = z.object({
|
|
97
|
+
kind: z.literal("fork"),
|
|
98
|
+
parallelKind: ParallelKindSchema.optional(),
|
|
99
|
+
preStatements: z.array(FlowStatementSchema).optional(),
|
|
100
|
+
source: SourceLocationSchema.optional(),
|
|
101
|
+
astKind: z.string().min(1).optional()
|
|
102
|
+
});
|
|
103
|
+
const JoinNodeDataSchema = z.object({
|
|
104
|
+
kind: z.literal("join"),
|
|
105
|
+
outputBinding: z.string().min(1).optional(),
|
|
106
|
+
source: SourceLocationSchema.optional()
|
|
107
|
+
});
|
|
108
|
+
const ParallelMapNodeDataSchema = z.object({
|
|
109
|
+
kind: z.literal("parallel-map"),
|
|
110
|
+
parallelKind: ParallelKindSchema.optional(),
|
|
111
|
+
iterationExpression: z.string().optional(),
|
|
112
|
+
stepNames: z.array(z.string()).optional(),
|
|
113
|
+
outputBinding: z.string().min(1).optional(),
|
|
114
|
+
preStatements: z.array(FlowStatementSchema).optional(),
|
|
115
|
+
source: SourceLocationSchema.optional(),
|
|
116
|
+
astKind: z.string().min(1).optional()
|
|
117
|
+
});
|
|
118
|
+
const LoopNodeDataSchema = z.object({
|
|
119
|
+
kind: z.literal("loop"),
|
|
120
|
+
loopKind: LoopKindSchema.optional(),
|
|
121
|
+
source: SourceLocationSchema.optional(),
|
|
122
|
+
astKind: z.string().min(1).optional(),
|
|
123
|
+
conditionText: z.string().optional()
|
|
124
|
+
});
|
|
125
|
+
const ExitNodeDataSchema = z.object({
|
|
126
|
+
kind: z.literal("exit"),
|
|
127
|
+
exitKind: ExitKindSchema,
|
|
128
|
+
sourceText: z.string().optional(),
|
|
129
|
+
source: SourceLocationSchema.optional(),
|
|
130
|
+
astKind: z.string().min(1).optional()
|
|
131
|
+
});
|
|
132
|
+
const FlowNodeDataSchema = z.discriminatedUnion("kind", [
|
|
133
|
+
EntryNodeDataSchema,
|
|
134
|
+
StepNodeDataSchema,
|
|
135
|
+
CodeBlockNodeDataSchema,
|
|
136
|
+
DecisionNodeDataSchema,
|
|
137
|
+
MergeNodeDataSchema,
|
|
138
|
+
ForkNodeDataSchema,
|
|
139
|
+
JoinNodeDataSchema,
|
|
140
|
+
ParallelMapNodeDataSchema,
|
|
141
|
+
LoopNodeDataSchema,
|
|
142
|
+
ExitNodeDataSchema
|
|
143
|
+
]);
|
|
144
|
+
const FlowEdgeDataSchema = z.object({ branchKind: FlowBranchKindSchema.optional() }).catchall(z.unknown());
|
|
145
|
+
const FlowPositionSchema = z.object({
|
|
146
|
+
x: z.number().finite(),
|
|
147
|
+
y: z.number().finite()
|
|
148
|
+
});
|
|
149
|
+
const FlowNodeSchema = z.object({
|
|
150
|
+
id: z.string().min(1),
|
|
151
|
+
type: FlowNodeTypeSchema,
|
|
152
|
+
label: z.string(),
|
|
153
|
+
position: FlowPositionSchema,
|
|
154
|
+
data: FlowNodeDataSchema
|
|
155
|
+
});
|
|
156
|
+
const FlowEdgeSchema = z.object({
|
|
157
|
+
id: z.string().min(1),
|
|
158
|
+
source: z.string().min(1),
|
|
159
|
+
target: z.string().min(1),
|
|
160
|
+
type: FlowEdgeTypeSchema,
|
|
161
|
+
label: z.string().optional(),
|
|
162
|
+
data: FlowEdgeDataSchema.optional()
|
|
163
|
+
});
|
|
164
|
+
const FlowGraphSchema = z.object({
|
|
165
|
+
nodes: z.array(FlowNodeSchema),
|
|
166
|
+
edges: z.array(FlowEdgeSchema),
|
|
167
|
+
entryPoint: z.string().min(1),
|
|
168
|
+
exitPoints: z.array(z.string().min(1)),
|
|
169
|
+
generatedAt: z.iso.datetime(),
|
|
170
|
+
diagnostics: z.array(z.string())
|
|
171
|
+
});
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region ../../packages/workflow-build-contracts/src/workflow-build-manifest.ts
|
|
174
|
+
const WORKFLOW_MANIFEST_GENERATOR = "local-build";
|
|
175
|
+
const WORKFLOW_MANIFEST_SCHEMA_VERSION = "1.0.0";
|
|
176
|
+
z.object({
|
|
177
|
+
name: z.string().trim().min(1).max(255),
|
|
178
|
+
description: z.string().trim().min(1).optional(),
|
|
179
|
+
tags: z.array(z.string()).optional()
|
|
180
|
+
});
|
|
181
|
+
z.object({
|
|
182
|
+
name: z.string().trim().min(1).max(255),
|
|
183
|
+
description: z.string().trim().min(1).optional(),
|
|
184
|
+
tags: z.array(z.string()).optional()
|
|
185
|
+
});
|
|
186
|
+
const WorkflowIOSchema = z.object({
|
|
187
|
+
input: JsonSchemaSchema.nullable(),
|
|
188
|
+
output: JsonSchemaSchema.nullable()
|
|
189
|
+
});
|
|
190
|
+
const BuildInfoSchema = z.object({
|
|
191
|
+
timestamp: z.iso.datetime(),
|
|
192
|
+
builderVersion: z.string().min(1),
|
|
193
|
+
generatedBy: z.literal(WORKFLOW_MANIFEST_GENERATOR),
|
|
194
|
+
gitCommit: z.string().optional(),
|
|
195
|
+
gitBranch: z.string().optional(),
|
|
196
|
+
gitIsDirty: z.boolean().optional(),
|
|
197
|
+
nodeVersion: z.string().min(1),
|
|
198
|
+
platform: z.string().min(1),
|
|
199
|
+
sourceChecksumAlgorithm: z.enum(["sha256"]),
|
|
200
|
+
sourceChecksum: z.string().length(64),
|
|
201
|
+
generatedFiles: z.array(z.string().min(1))
|
|
202
|
+
});
|
|
203
|
+
const ManifestDependenciesSchema = z.object({
|
|
204
|
+
localFiles: z.record(z.string(), z.string()),
|
|
205
|
+
packages: z.record(z.string(), z.string()),
|
|
206
|
+
workspacePackages: z.record(z.string(), z.string()),
|
|
207
|
+
builtins: z.array(z.string())
|
|
208
|
+
});
|
|
209
|
+
const DurationSchema = z.union([z.number().int().positive().finite(), z.string().regex(/^[1-9]\d*[smhdwy]$/)]);
|
|
210
|
+
const WorkflowTriggerBindingSchema = z.object({
|
|
211
|
+
/** Authored trigger name (from `xxxTrigger({ name: ... })`). */
|
|
212
|
+
authoredTriggerId: z.string().min(1),
|
|
213
|
+
triggerType: z.enum([
|
|
214
|
+
"webhook",
|
|
215
|
+
"cron",
|
|
216
|
+
"polling"
|
|
217
|
+
]),
|
|
218
|
+
hasTransform: z.boolean(),
|
|
219
|
+
narrowedFrom: z.string().optional(),
|
|
220
|
+
lineage: z.array(z.string()).optional()
|
|
221
|
+
});
|
|
222
|
+
const WorkflowCoreManifestSchema = z.object({
|
|
223
|
+
schemaVersion: z.literal(WORKFLOW_MANIFEST_SCHEMA_VERSION),
|
|
224
|
+
id: z.string().min(1),
|
|
225
|
+
name: z.string().trim().min(1).max(255),
|
|
226
|
+
description: z.string().trim().min(1).optional(),
|
|
227
|
+
tags: z.array(z.string()).optional(),
|
|
228
|
+
exportName: z.string().min(1),
|
|
229
|
+
workflowSchemas: WorkflowIOSchema,
|
|
230
|
+
workflowGlobals: JsonSchemaSchema.optional(),
|
|
231
|
+
timeout: DurationSchema.optional(),
|
|
232
|
+
triggers: z.array(WorkflowTriggerBindingSchema).optional()
|
|
233
|
+
});
|
|
234
|
+
const WorkflowBuildManifestSchema = WorkflowCoreManifestSchema.extend({
|
|
235
|
+
workflowSource: SourceLocationSchema.optional(),
|
|
236
|
+
buildInfo: BuildInfoSchema,
|
|
237
|
+
dependencies: ManifestDependenciesSchema,
|
|
238
|
+
hasCycles: z.boolean().optional(),
|
|
239
|
+
credentials: CredentialRequirementsSchema.optional(),
|
|
240
|
+
sandboxes: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
241
|
+
steps: z.record(z.string(), WorkflowStepEntrySchema)
|
|
242
|
+
});
|
|
243
|
+
z.object({
|
|
244
|
+
organizationId: z.string(),
|
|
245
|
+
workflowId: z.string(),
|
|
246
|
+
bundle: z.instanceof(Uint8Array).optional(),
|
|
247
|
+
manifest: WorkflowBuildManifestSchema,
|
|
248
|
+
sourcePath: z.string().optional(),
|
|
249
|
+
triggers: z.array(TriggerUploadDataSchema).optional(),
|
|
250
|
+
bundleSize: z.number().optional(),
|
|
251
|
+
bundleHash: SHA256HashSchema.optional(),
|
|
252
|
+
skipVersionBump: z.boolean().optional(),
|
|
253
|
+
projectRoot: z.string().optional(),
|
|
254
|
+
projectId: z.uuid(),
|
|
255
|
+
flowJson: FlowGraphSchema.optional(),
|
|
256
|
+
deploymentSnapshotOnly: z.boolean().optional()
|
|
257
|
+
});
|
|
258
|
+
//#endregion
|
|
259
|
+
export { FlowGraphSchema as a, WorkflowCoreManifestSchema as i, WORKFLOW_MANIFEST_SCHEMA_VERSION as n, WorkflowBuildManifestSchema as r, WORKFLOW_MANIFEST_GENERATOR as t };
|
package/dist/{workflow-bundler-BzHk73PM-Cs-4Ml-p.mjs → workflow-bundler-BzHk73PM-xQwAF08W.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-
|
|
4
|
-
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-
|
|
3
|
+
import { n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-B9omBIuN.mjs";
|
|
4
|
+
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-D4aTZv4R.mjs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
7
7
|
import { createHash } from "node:crypto";
|