@keystrokehq/cli 0.0.31 → 0.0.37
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/README.md +25 -4
- package/dist/{accept.handler-DNfIXPSP.mjs → accept.handler-DCsud1s5.mjs} +4 -4
- package/dist/{admin-CJp8XksD.mjs → admin-BaOtHeZ2.mjs} +10 -10
- package/dist/{agent-manifest-De5TCxZq.mjs → agent-manifest-DfWD5tvv.mjs} +17 -27
- package/dist/{agents-G37PM35Z.mjs → agents-BVAVfMR_.mjs} +9 -9
- package/dist/{api-keys-4igNHJ_W.mjs → api-keys-BhEEsHUh.mjs} +6 -6
- package/dist/{api-BK3EhPvs.mjs → api-sWkB_Wta.mjs} +1 -1
- package/dist/{auth-CIOmmV4x.mjs → auth-BnsitjzT.mjs} +6 -6
- package/dist/{auth.handler-CznN_vfz.mjs → auth.handler-W_xk14TL.mjs} +3 -3
- package/dist/authored-workflow-ref-fkHEEVnd.mjs +113 -0
- package/dist/{build-agents-DseUtzd4-CSGpNXur.mjs → build-agents-CUzBnlAG-3ePFZiJ6.mjs} +12 -11
- package/dist/{build-progress-DLM1Bt4T.mjs → build-progress-CM-b6Bby.mjs} +2 -2
- package/dist/{build-tasks-C09SdfjC-BmAVLTtQ.mjs → build-tasks-5eOvI19S-tbN6CRx9.mjs} +4 -4
- package/dist/{build-workflows-BZ_m97Pr-BiyptCrn.mjs → build-workflows-C-gQM3l5-_zcBHE3M.mjs} +14 -9
- package/dist/{build.handler-zHimoO7c.mjs → build.handler-CpAsAsBc.mjs} +12 -9
- package/dist/{clear-cache.handler-BP0K1-uN.mjs → clear-cache.handler-gJpwslkK.mjs} +2 -2
- package/dist/{clear.handler-T27GpgSu.mjs → clear.handler-CDyG6-dk.mjs} +1 -1
- package/dist/{clear.handler-PsA5QKHx.mjs → clear.handler-_sR33Hp8.mjs} +2 -2
- package/dist/{commander-BlrSdFcu.mjs → commander-C6SSTQJ2.mjs} +22 -3
- package/dist/{connect-BbLJhlIA.mjs → connect-27EgnljZ.mjs} +3 -3
- package/dist/{connect.handler-BthE-7Wg.mjs → connect.handler-COM1LnNg.mjs} +5 -5
- package/dist/{context-sgKhRc5v.mjs → context-ebZssGCY.mjs} +4 -4
- package/dist/{create.handler-BovbO_g0.mjs → create.handler-CAWJAGzQ.mjs} +3 -3
- package/dist/{credential-env-map-CRs0llf0.mjs → credential-env-map-5a41jLwM.mjs} +1 -1
- package/dist/{credential-requirements-D0mavK8j-CFMf0Xwu.mjs → credential-requirements-B5Alhu1v-DanlSKnT.mjs} +3 -3
- package/dist/{credential-schema-mismatch-ClQgEVtO.mjs → credential-schema-mismatch-c17ktoNU.mjs} +1 -1
- package/dist/{credentials-CsncZ52a.mjs → credentials-C0ssbMlp.mjs} +10 -10
- package/dist/{credentials-DKrSaaLw.mjs → credentials-DtwLbee6.mjs} +1 -1
- package/dist/current-deployment-workflow-C6x65imE.mjs +20 -0
- package/dist/current.handler-DP1L_hm3.mjs +19 -0
- package/dist/{delete.handler-DkAK396w.mjs → delete.handler-C-5XFkgN.mjs} +2 -2
- package/dist/{deploy-DvPfR9fC.mjs → deploy-BcVQJza8.mjs} +2 -2
- package/dist/{deploy-progress-BsUH7fGE.mjs → deploy-progress-Bt86Yc1r.mjs} +2 -2
- package/dist/{deploy.handler-BW3f2N2G.mjs → deploy.handler-GPS9lxGk.mjs} +16 -16
- package/dist/{diff-utils-Bs--xmoV.mjs → diff-utils-YEUYtSRs.mjs} +1 -1
- package/dist/{diff.handler-BwhsoAg0.mjs → diff.handler-DkM5dhaN.mjs} +15 -9
- package/dist/{dist-Dw7gCE7y.mjs → dist-B5jy238v.mjs} +37 -11
- package/dist/{dist-CTEtWDW4.mjs → dist-BmbFJq8U.mjs} +8 -27
- package/dist/{env.handler-Dks6ZQh-.mjs → env.handler-V_isbSi2.mjs} +52 -29
- package/dist/{error-boundary-0veZ_RDS.mjs → error-boundary-BRxUsPi7.mjs} +3 -3
- package/dist/{iam-command-utils-CSZj4XlH.mjs → iam-command-utils-DNDN0wT6.mjs} +3 -13
- package/dist/{import-module-y0glInUe-DV_3dsU0.mjs → import-module-y0glInUe-EuAWaw9g.mjs} +506 -128
- package/dist/{init-DX08T87c.mjs → init-D1OmmclX.mjs} +8 -3
- package/dist/{init.handler-CzlmkNXi.mjs → init.handler-CUbYlUgP.mjs} +57 -14
- package/dist/{inspect.handler-v9snxDLi.mjs → inspect.handler-BE6coOuW.mjs} +24 -13
- package/dist/{integration-catalog-CiZ62hb_.mjs → integration-catalog-pSmWHFLQ.mjs} +3 -3
- package/dist/{integrations-MEExmqcg.mjs → integrations-DZD5t8n2.mjs} +7 -7
- package/dist/{invites-BuatfJmN.mjs → invites-BuR1H-tA.mjs} +5 -5
- package/dist/{invites.list.handler-CK6mL10z.mjs → invites.list.handler-Dj4a6XOg.mjs} +6 -5
- package/dist/{invites.resend.handler-CKZouK1Z.mjs → invites.resend.handler-DEGF4vlB.mjs} +6 -5
- package/dist/{invites.revoke.handler-H0VI-3sp.mjs → invites.revoke.handler-Dg4ZvlFS.mjs} +6 -5
- package/dist/keystroke.mjs +122 -77
- package/dist/{list-enrichment-DP1wEyBZ.mjs → list-enrichment-dqbkXJzy.mjs} +2 -2
- package/dist/{list.handler-LxZInip2.mjs → list.handler-2g1CZAvB.mjs} +4 -4
- package/dist/{list.handler-BKfGLkFu.mjs → list.handler-7MkJfkak.mjs} +5 -5
- package/dist/list.handler-BTYVIn6z.mjs +39 -0
- package/dist/{list.handler-BiY5NFWd.mjs → list.handler-Bchcr3-e.mjs} +3 -3
- package/dist/list.handler-Choc4SZz.mjs +64 -0
- package/dist/{list.handler-Jk_vK66s.mjs → list.handler-D47C1z3m.mjs} +4 -4
- package/dist/{list.handler-DVnFrlis.mjs → list.handler-DYE48apa.mjs} +7 -7
- package/dist/{list.handler-DIMWZx78.mjs → list.handler-KcCaG3PZ.mjs} +4 -4
- package/dist/list2.handler-BIaIyrQf.mjs +99 -0
- package/dist/{listen-C_7Rgwkb.mjs → listen-CVY-_F29.mjs} +3 -3
- package/dist/{listen.handler-dJgorIzr.mjs → listen.handler-D_nEvXRn.mjs} +4 -4
- package/dist/{logs-B9YMhUGt.mjs → logs-CZ2qnsSH.mjs} +3 -3
- package/dist/{logs.handler-BfjCsAyq.mjs → logs.handler-BRUzZC9Z.mjs} +26 -29
- package/dist/{logs.handler-DGGVPMOX.mjs → logs.handler-Wk6mYyAZ.mjs} +1 -1
- package/dist/{members.add.handler-DSRCRxsI.mjs → members.add.handler-BJ0wr6rP.mjs} +6 -5
- package/dist/{members.invite.handler-BNpHn1dY.mjs → members.invite.handler-DyveDMuq.mjs} +6 -5
- package/dist/{members.list.handler-Bn9LJEPG.mjs → members.list.handler-CyQxH_zS.mjs} +6 -5
- package/dist/{members.remove.handler-Dkr2t_tX.mjs → members.remove.handler-Dtv9PooY.mjs} +6 -5
- package/dist/{members.update.handler-DBtUYuAY.mjs → members.update.handler-CeK-tCjT.mjs} +6 -5
- package/dist/{operations-AWMLs6mE.mjs → operations-CxQlt0S0.mjs} +5 -5
- package/dist/{org-DOH7YHk2.mjs → org-B8MPHJJu.mjs} +35 -28
- package/dist/org-context-BI9OSpbb.mjs +112 -0
- package/dist/org-output-DffU7DKn.mjs +64 -0
- package/dist/{orgs.create.handler-BO70zIdp.mjs → orgs.create.handler-BKvSmkU3.mjs} +4 -4
- package/dist/{orgs.get.handler-BuGg5bc9.mjs → orgs.get.handler-BA-CexIY.mjs} +4 -4
- package/dist/{orgs.list.handler--5HutMkl.mjs → orgs.list.handler-eCEg5kC1.mjs} +4 -4
- package/dist/{output-BWcVRt-T.mjs → output-DnIFEmi5.mjs} +1 -1
- package/dist/package-manager-BP3-q8hh.mjs +162 -0
- package/dist/{paused.handler-DHvxz-cC.mjs → paused.handler-4wKMTKZ-.mjs} +20 -33
- package/dist/{projects-C5GZ5Jrf.mjs → projects-Wu_2fB_x.mjs} +11 -9
- package/dist/{register.handler-CePNU3sP.mjs → register.handler-BvAkXCwE.mjs} +2 -2
- package/dist/{render-credential-Bn15FEUC.mjs → render-credential-D-H1ECDt.mjs} +1 -1
- package/dist/{render-operation-Bc7Wu1sP.mjs → render-operation-VdEPhoII.mjs} +2 -2
- package/dist/{requirements.handler-B5rqCjMu.mjs → requirements.handler-Bab4kBtw.mjs} +7 -7
- package/dist/{resolve-cli-credentials-CAOSVMJP.mjs → resolve-cli-credentials-GVOOedoQ.mjs} +1 -1
- package/dist/{resolve-project-E9mrh_el.mjs → resolve-project-DLKlAy0z.mjs} +24 -8
- package/dist/{run-polling-DawiBus-.mjs → run-polling-C5fI7xTp.mjs} +97 -14
- package/dist/{run.handler-BG7xitEK.mjs → run.handler-BKD5Xu0A.mjs} +42 -30
- package/dist/{runs-swYYBT6C.mjs → runs-CT31dczt.mjs} +4 -4
- package/dist/{schema-display-FvI8QjOQ.mjs → schema-display-sZ6ConJd.mjs} +33 -26
- package/dist/schemas-ClAIoIrX.mjs +281 -0
- package/dist/{search-BEfy2fG9.mjs → search-BeQW_pf4.mjs} +3 -3
- package/dist/{search.handler-V7ObLGjN.mjs → search.handler-BJ-ZlDL4.mjs} +6 -6
- package/dist/{show.handler-C_VDYU91.mjs → show.handler-BrIHUH28.mjs} +4 -4
- package/dist/{show.handler-CsidInW8.mjs → show.handler-Cqe_hCqU.mjs} +5 -5
- package/dist/{show.handler-Wmv0tkxx.mjs → show.handler-DB8xl5FU.mjs} +6 -6
- package/dist/{skill-installer-D6j9IA3Z.mjs → skill-installer-DuMhavmM.mjs} +3 -1
- package/dist/{skills-sync.handler-BAATdT6N.mjs → skills-sync.handler-BGs-_YD9.mjs} +13 -7
- package/dist/{skills.command-0-E8mcYE.mjs → skills.command-DUWn6FbL.mjs} +5 -5
- package/dist/skills.handler-DqLXJepA.mjs +9 -0
- package/dist/{spinner-progress-lrKDs4YF.mjs → spinner-progress-BYxlr3lY.mjs} +1 -1
- package/dist/status.handler-DAId4bVU.mjs +72 -0
- package/dist/{switch.handler-BwYndsP-.mjs → switch.handler-Cd4Yg2n8.mjs} +17 -4
- package/dist/{sync-6fZkIUtn.mjs → sync-DgC4lcxh.mjs} +2 -2
- package/dist/{sync.handler-Ctr-cN9X.mjs → sync.handler-Cm_WtGmH.mjs} +8 -8
- package/dist/{task-BWuIKWh4.mjs → task-DTvLzUkA.mjs} +2 -88
- package/dist/{task-target-build-QllcCfoN.mjs → task-target-build-CtvRyVjH.mjs} +5 -5
- package/dist/task-target-deploy-runner.mjs +6 -6
- package/dist/{test-C8VIZe9V.mjs → test-4V7nh67i.mjs} +5 -5
- package/dist/{test.handler-BCW0YBPd.mjs → test.handler-BdCYcwR4.mjs} +2 -2
- package/dist/{test.handler-DLaxrJ9V.mjs → test.handler-Bo4YTs2Z.mjs} +19 -16
- package/dist/{tool.handler-8qNmgdRe.mjs → tool.handler-CPCrSDq2.mjs} +12 -12
- package/dist/{trigger-artifacts-BcRScRSp-BiD2h6do.mjs → trigger-artifacts-BcRScRSp-BRpU-He5.mjs} +2 -2
- package/dist/{trigger-manifest-C07EM-b2.mjs → trigger-manifest-BVqjDhxU.mjs} +1 -1
- package/dist/{upgrade-DgOcc8IT.mjs → upgrade-2qUOcjxb.mjs} +4 -8
- package/dist/upgrade.handler-PqlKSuUE.mjs +99 -0
- package/dist/{upload.handler-B7xle1oX.mjs → upload.handler-CS-vLpzC.mjs} +9 -9
- package/dist/{users.get.handler-C4t1vXwi.mjs → users.get.handler-CH1c6Lnj.mjs} +4 -4
- package/dist/{users.list.handler-Dvl90grq.mjs → users.list.handler-CxbZFgjO.mjs} +4 -4
- package/dist/{users.set-role.handler-Djw1_VGf.mjs → users.set-role.handler-CBRE-Ws6.mjs} +4 -4
- package/dist/{validate.handler-Drf_lssw.mjs → validate.handler-1d-UmtXB.mjs} +171 -26
- package/dist/{workflow-build-Begvjfq8.mjs → workflow-build-Bm8JoVv4.mjs} +234 -32
- package/dist/{workflow-build-manifest-1sC52TIG.mjs → workflow-build-manifest-CV6bBmDO.mjs} +1 -1
- package/dist/{workflow-bundler-BzHk73PM-muPv1yGG.mjs → workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs} +15 -4
- package/dist/{workflows-DjMlxuBX.mjs → workflows-ny7rOdeH.mjs} +34 -37
- package/dist/{writer-byNNUjRm-B-on1n6c.mjs → writer-BLg0RuZa-Y6ExdYH9.mjs} +6 -4
- package/package.json +11 -11
- package/dist/current-deployment-workflow-B1VQCYC-.mjs +0 -94
- package/dist/current.handler-BaGaCLzB.mjs +0 -21
- package/dist/list.handler-BEMj3FyH.mjs +0 -76
- package/dist/list.handler-Cq_oQY5B.mjs +0 -52
- package/dist/list.handler-htR9TeiS.mjs +0 -24
- package/dist/package-manager-DT1EhOkS.mjs +0 -61
- package/dist/schemas-D2zfmyC-.mjs +0 -671
- package/dist/skills.handler-DYIQK0Vu.mjs +0 -9
- package/dist/status.handler-Ch_DtyBp.mjs +0 -109
- package/dist/upgrade.handler-DSZuw7-9.mjs +0 -80
- /package/dist/{build-metadata-BB_L45ZS-DSJL7dTy.mjs → build-metadata-BB_L45ZS-DRQsV6JK.mjs} +0 -0
- /package/dist/{deploy-DhCbYFc7.mjs → deploy-BiKBH25R.mjs} +0 -0
- /package/dist/{detect-env-access-CwkOYeYM-COq4U-4Y.mjs → detect-env-access-CwkOYeYM-r4aynBU0.mjs} +0 -0
- /package/dist/{read-credential-keys-77a91T8M-DGK5XTQp.mjs → read-credential-keys-77a91T8M-I07NYwfH.mjs} +0 -0
- /package/dist/{run-polling-fBouPjJ2.mjs → run-polling-1c0ckC1A.mjs} +0 -0
- /package/dist/{schemas-4Mq_bxob.mjs → schemas-8nhXlXWh.mjs} +0 -0
- /package/dist/{task-target-deploy-B_3HPSo2.mjs → task-target-deploy-m9LfE488.mjs} +0 -0
- /package/dist/{types-AlA-ifK9.mjs → types-Cb0eWmUU.mjs} +0 -0
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { i as __toESM, n as __exportAll } from "./chunk-CH6r78ws.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { r as getKeystrokeTmpDir } from "./dist-
|
|
4
|
+
import { I as logger, L as originalConsole, n as style, p as ui, t as ANSI, x as toErrorMessage } from "./keystroke.mjs";
|
|
5
|
+
import { r as getKeystrokeTmpDir } from "./dist-B5jy238v.mjs";
|
|
6
6
|
import { t as assertWorkflowProjectRoot } from "./project-config-DudGRFPO.mjs";
|
|
7
|
-
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-
|
|
8
|
-
import { t as AgentVersionManifestSchema } from "./agent-manifest-
|
|
7
|
+
import { a as FlowGraphSchema, r as WorkflowBuildManifestSchema } from "./workflow-build-manifest-CV6bBmDO.mjs";
|
|
8
|
+
import { t as AgentVersionManifestSchema } from "./agent-manifest-DfWD5tvv.mjs";
|
|
9
9
|
import { r as RelativeFilePathSchema } from "./file-metadata-DQVDjr7M.mjs";
|
|
10
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
11
|
import { t as resolveConfiguredBuildOutputDir } from "./utils-BaxDlCsW.mjs";
|
|
12
12
|
import { a as readAgentSandboxPackage, r as AGENT_VM_TOOLS_RUNTIME_RELATIVE_PATH } from "./agent-bundle-package-DWV6B_5q-B-qzc3zC.mjs";
|
|
13
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-
|
|
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-
|
|
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-BLg0RuZa-Y6ExdYH9.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-EuAWaw9g.mjs";
|
|
16
16
|
import { a as literalString, n as identifierName, o as parseSourceFile, r as isNode } from "./oxc-B3KI3rf_-B9omBIuN.mjs";
|
|
17
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
18
|
import { n as parseRelativeFilePath } from "./normalize-path-CojS-CgQ-aOM0agxS.mjs";
|
|
19
|
+
import { createRequire } from "node:module";
|
|
19
20
|
import * as path$1 from "node:path";
|
|
20
21
|
import path from "node:path";
|
|
21
22
|
import * as fs from "node:fs/promises";
|
|
22
|
-
import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
23
|
+
import { access, mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
24
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
23
25
|
import { fileURLToPath } from "node:url";
|
|
24
26
|
import { z } from "zod";
|
|
27
|
+
import { execFile } from "node:child_process";
|
|
25
28
|
import { createHash } from "node:crypto";
|
|
29
|
+
import { promisify } from "node:util";
|
|
26
30
|
import { performance } from "node:perf_hooks";
|
|
27
31
|
//#region ../../packages/workflow-builder/dist/pipeline/flow-graph-toolkit.mjs
|
|
28
32
|
function detectAgentInPathCycles(input) {
|
|
@@ -70,7 +74,7 @@ function toCycleNode(node) {
|
|
|
70
74
|
};
|
|
71
75
|
}
|
|
72
76
|
//#endregion
|
|
73
|
-
//#region ../../packages/workflow-builder/dist/build-
|
|
77
|
+
//#region ../../packages/workflow-builder/dist/build-CZTnUnzI.mjs
|
|
74
78
|
var import_out = /* @__PURE__ */ __toESM(require_out(), 1);
|
|
75
79
|
const DiscoveredWorkflowSchema = z.object({
|
|
76
80
|
exportFilePath: z.string(),
|
|
@@ -465,6 +469,25 @@ async function cleanupFailedBuildState(options) {
|
|
|
465
469
|
metadata
|
|
466
470
|
});
|
|
467
471
|
}
|
|
472
|
+
/** Resolves a CLI/build target path to a canonical absolute path for discovery matching. */
|
|
473
|
+
function resolveBuildTargetAbsolutePath(projectRoot, target) {
|
|
474
|
+
const absolutePath = path.normalize(path.isAbsolute(target) ? target : path.resolve(projectRoot, target));
|
|
475
|
+
if (!existsSync(absolutePath)) return absolutePath;
|
|
476
|
+
try {
|
|
477
|
+
return realpathSync.native(absolutePath);
|
|
478
|
+
} catch {
|
|
479
|
+
return absolutePath;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
/** Canonicalizes a discovered source file path so `/tmp` and `/private/tmp` match on macOS. */
|
|
483
|
+
function resolveDiscoveredAbsolutePath(resolvedFilePath) {
|
|
484
|
+
const normalized = path.normalize(resolvedFilePath);
|
|
485
|
+
try {
|
|
486
|
+
return realpathSync.native(normalized);
|
|
487
|
+
} catch {
|
|
488
|
+
return normalized;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
468
491
|
async function resolveCandidateFiles(projectRoot) {
|
|
469
492
|
const resolvedProjectRoot = path.resolve(projectRoot);
|
|
470
493
|
const files = await (0, import_out.default)([...DISCOVERY_GLOB], {
|
|
@@ -978,7 +1001,7 @@ async function buildDiscoveredWorkflows(options) {
|
|
|
978
1001
|
const failures = [...buildPlan.failures];
|
|
979
1002
|
const warnings = [];
|
|
980
1003
|
if (buildPlan.workflows.length > 0) {
|
|
981
|
-
const { buildWorkflowArtifacts } = await import("./build-workflows-
|
|
1004
|
+
const { buildWorkflowArtifacts } = await import("./build-workflows-C-gQM3l5-_zcBHE3M.mjs");
|
|
982
1005
|
const result = await buildWorkflowArtifacts({
|
|
983
1006
|
entries: buildPlan.workflows,
|
|
984
1007
|
workflowsByKey,
|
|
@@ -993,7 +1016,7 @@ async function buildDiscoveredWorkflows(options) {
|
|
|
993
1016
|
warnings.push(...result.warnings);
|
|
994
1017
|
}
|
|
995
1018
|
if (buildPlan.agents.length > 0) {
|
|
996
|
-
const { buildAgentArtifacts } = await import("./build-agents-
|
|
1019
|
+
const { buildAgentArtifacts } = await import("./build-agents-CUzBnlAG-3ePFZiJ6.mjs");
|
|
997
1020
|
const result = await buildAgentArtifacts({
|
|
998
1021
|
entries: buildPlan.agents,
|
|
999
1022
|
projectRoot: options.projectRoot
|
|
@@ -1002,7 +1025,7 @@ async function buildDiscoveredWorkflows(options) {
|
|
|
1002
1025
|
failures.push(...result.failures);
|
|
1003
1026
|
}
|
|
1004
1027
|
if (buildPlan.tasks.length > 0) {
|
|
1005
|
-
const { buildTaskArtifacts } = await import("./build-tasks-
|
|
1028
|
+
const { buildTaskArtifacts } = await import("./build-tasks-5eOvI19S-tbN6CRx9.mjs");
|
|
1006
1029
|
const result = await buildTaskArtifacts({
|
|
1007
1030
|
entries: buildPlan.tasks,
|
|
1008
1031
|
projectRoot: options.projectRoot,
|
|
@@ -1110,7 +1133,7 @@ async function createBuildPlan(options) {
|
|
|
1110
1133
|
const currentWorkflowIndex = workflowProgressIndex;
|
|
1111
1134
|
workflowProgressIndex += 1;
|
|
1112
1135
|
if (!loadResult?.ok) {
|
|
1113
|
-
const { createWorkflowMetadataFailure } = await import("./build-workflows-
|
|
1136
|
+
const { createWorkflowMetadataFailure } = await import("./build-workflows-C-gQM3l5-_zcBHE3M.mjs");
|
|
1114
1137
|
plan.failures.push(createWorkflowMetadataFailure(discoveredWorkflow, loadResult?.error));
|
|
1115
1138
|
continue;
|
|
1116
1139
|
}
|
|
@@ -1308,7 +1331,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
|
|
|
1308
1331
|
cacheResolvedBindingKeys,
|
|
1309
1332
|
releaseBundleMemory: config.releaseBundleMemory
|
|
1310
1333
|
};
|
|
1311
|
-
const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-
|
|
1334
|
+
const { writeBuildOutput, writeTargetedBuildOutput } = await import("./writer-BLg0RuZa-Y6ExdYH9.mjs").then((n) => n.f).then((n) => n.t);
|
|
1312
1335
|
const writeResult = targetBindingKeys ? await writeTargetedBuildOutput({
|
|
1313
1336
|
artifacts: finalizedScopedArtifacts,
|
|
1314
1337
|
agentArtifacts,
|
|
@@ -1333,7 +1356,7 @@ async function runBuild(config, initialTargetBindingKeys, metadataRebuildDecisio
|
|
|
1333
1356
|
elapsedMs: performance.now() - writeStartedAt,
|
|
1334
1357
|
...writeResult.skippedWriteCount !== void 0 && writeResult.skippedWriteCount > 0 ? { skippedWriteCount: writeResult.skippedWriteCount } : {}
|
|
1335
1358
|
});
|
|
1336
|
-
const { buildMetadataArtifacts } = await import("./build-metadata-BB_L45ZS-
|
|
1359
|
+
const { buildMetadataArtifacts } = await import("./build-metadata-BB_L45ZS-DRQsV6JK.mjs");
|
|
1337
1360
|
const metadata = await buildMetadataArtifacts({
|
|
1338
1361
|
projectRoot: config.projectRoot,
|
|
1339
1362
|
outputDir,
|
|
@@ -1526,14 +1549,21 @@ function resolveTargetedDiscovery(options) {
|
|
|
1526
1549
|
if (targetFiles.length === 0) return null;
|
|
1527
1550
|
const normalizedTargets = /* @__PURE__ */ new Map();
|
|
1528
1551
|
for (const target of targetFiles) {
|
|
1529
|
-
const absolutePath =
|
|
1552
|
+
const absolutePath = resolveBuildTargetAbsolutePath(options.projectRoot, target);
|
|
1553
|
+
if (!existsSync(absolutePath)) return { failure: {
|
|
1554
|
+
kind: "discovery",
|
|
1555
|
+
code: "unknown-discovery-error",
|
|
1556
|
+
filePath: absolutePath,
|
|
1557
|
+
exportNames: [],
|
|
1558
|
+
error: `Target file not found: "${target}"`
|
|
1559
|
+
} };
|
|
1530
1560
|
normalizedTargets.set(absolutePath, target);
|
|
1531
1561
|
}
|
|
1532
1562
|
const matchedBindingKeys = /* @__PURE__ */ new Set();
|
|
1533
1563
|
const affectedPaths = /* @__PURE__ */ new Set();
|
|
1534
1564
|
const matchedTargets = /* @__PURE__ */ new Set();
|
|
1535
1565
|
for (const discoveredWorkflow of options.discovery.workflows) {
|
|
1536
|
-
const resolvedPath =
|
|
1566
|
+
const resolvedPath = resolveDiscoveredAbsolutePath(discoveredWorkflow.resolvedFilePath);
|
|
1537
1567
|
if (!normalizedTargets.has(resolvedPath)) continue;
|
|
1538
1568
|
matchedBindingKeys.add(discoveredWorkflow.bindingKey);
|
|
1539
1569
|
affectedPaths.add(discoveredWorkflow.relativePath);
|
|
@@ -1662,6 +1692,172 @@ function formatBuildFailure(failure) {
|
|
|
1662
1692
|
}
|
|
1663
1693
|
}
|
|
1664
1694
|
//#endregion
|
|
1695
|
+
//#region ../../packages/workflow-builder/dist/index.mjs
|
|
1696
|
+
const DIAGNOSTIC_PATTERN = /^(.*)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;
|
|
1697
|
+
function parseDiagnostics(output) {
|
|
1698
|
+
const diagnostics = [];
|
|
1699
|
+
for (const rawLine of output.split(/\r?\n/)) {
|
|
1700
|
+
const line = rawLine.trimEnd();
|
|
1701
|
+
if (line.length === 0) continue;
|
|
1702
|
+
const match = DIAGNOSTIC_PATTERN.exec(line);
|
|
1703
|
+
if (match) {
|
|
1704
|
+
const file = match[1] ?? "";
|
|
1705
|
+
const lineNumber = match[2] ?? "0";
|
|
1706
|
+
const columnNumber = match[3] ?? "0";
|
|
1707
|
+
const severity = match[4] === "warning" ? "warning" : "error";
|
|
1708
|
+
const code = match[5] ?? "0";
|
|
1709
|
+
const message = match[6] ?? "";
|
|
1710
|
+
diagnostics.push({
|
|
1711
|
+
file,
|
|
1712
|
+
line: Number(lineNumber),
|
|
1713
|
+
column: Number(columnNumber),
|
|
1714
|
+
message,
|
|
1715
|
+
severity,
|
|
1716
|
+
code: Number(code)
|
|
1717
|
+
});
|
|
1718
|
+
continue;
|
|
1719
|
+
}
|
|
1720
|
+
const lastDiagnostic = diagnostics.at(-1);
|
|
1721
|
+
if (lastDiagnostic && rawLine.startsWith(" ")) lastDiagnostic.message = `${lastDiagnostic.message}\n${line.trim()}`;
|
|
1722
|
+
}
|
|
1723
|
+
return diagnostics;
|
|
1724
|
+
}
|
|
1725
|
+
const execFileAsync = promisify(execFile);
|
|
1726
|
+
const require = createRequire(import.meta.url);
|
|
1727
|
+
function resolveNativeTsgoBin(nativePreviewPackageJson) {
|
|
1728
|
+
const packageName = `@typescript/native-preview-${process.platform}-${process.arch}`;
|
|
1729
|
+
try {
|
|
1730
|
+
const nativePreviewRoot = path$1.dirname(nativePreviewPackageJson);
|
|
1731
|
+
const packageJson = createRequire(path$1.join(nativePreviewRoot, "lib", "getExePath.js")).resolve(`${packageName}/package.json`);
|
|
1732
|
+
const executable = path$1.join(path$1.dirname(packageJson), "lib", process.platform === "win32" ? "tsgo.exe" : "tsgo");
|
|
1733
|
+
return existsSync(executable) ? executable : void 0;
|
|
1734
|
+
} catch {
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
function resolveCompilers() {
|
|
1739
|
+
const compilers = [];
|
|
1740
|
+
try {
|
|
1741
|
+
const tsgoPackageJson = require.resolve("@typescript/native-preview/package.json");
|
|
1742
|
+
const nativeTsgoBin = resolveNativeTsgoBin(tsgoPackageJson);
|
|
1743
|
+
if (nativeTsgoBin) {
|
|
1744
|
+
compilers.push({
|
|
1745
|
+
name: "tsgo",
|
|
1746
|
+
binPath: nativeTsgoBin
|
|
1747
|
+
});
|
|
1748
|
+
return compilers;
|
|
1749
|
+
}
|
|
1750
|
+
compilers.push({
|
|
1751
|
+
name: "tsgo",
|
|
1752
|
+
binPath: path$1.join(path$1.dirname(tsgoPackageJson), "bin", "tsgo.js")
|
|
1753
|
+
});
|
|
1754
|
+
} catch {}
|
|
1755
|
+
return compilers;
|
|
1756
|
+
}
|
|
1757
|
+
const COMPILERS = resolveCompilers();
|
|
1758
|
+
const CORE_PRIMITIVE_GLOBAL_TYPES = [
|
|
1759
|
+
"declare const Workflow: typeof import('@keystrokehq/core').Workflow;",
|
|
1760
|
+
"declare const Agent: typeof import('@keystrokehq/core').Agent;",
|
|
1761
|
+
"declare const Operation: typeof import('@keystrokehq/core').Operation;",
|
|
1762
|
+
"declare const Step: typeof import('@keystrokehq/core').Step;",
|
|
1763
|
+
"declare const Tool: typeof import('@keystrokehq/core').Tool;",
|
|
1764
|
+
"declare const Task: typeof import('@keystrokehq/core').Task;",
|
|
1765
|
+
"declare const CredentialSet: typeof import('@keystrokehq/core').CredentialSet;",
|
|
1766
|
+
"declare const Sandbox: typeof import('@keystrokehq/core').Sandbox;",
|
|
1767
|
+
"declare const McpServer: typeof import('@keystrokehq/core').McpServer;",
|
|
1768
|
+
"declare const CronTrigger: typeof import('@keystrokehq/core').CronTrigger;",
|
|
1769
|
+
"declare const WebhookTrigger: typeof import('@keystrokehq/core').WebhookTrigger;",
|
|
1770
|
+
"declare const PollingTrigger: typeof import('@keystrokehq/core').PollingTrigger;",
|
|
1771
|
+
"declare const cronTrigger: typeof import('@keystrokehq/core').cronTrigger;",
|
|
1772
|
+
"declare const webhookTrigger: typeof import('@keystrokehq/core').webhookTrigger;",
|
|
1773
|
+
"declare const pollingTrigger: typeof import('@keystrokehq/core').pollingTrigger;"
|
|
1774
|
+
].join("\n");
|
|
1775
|
+
async function typecheckWorkflows(options) {
|
|
1776
|
+
const startedAt = performance.now();
|
|
1777
|
+
const tsConfigPath = path$1.join(options.projectRoot, "tsconfig.json");
|
|
1778
|
+
await access(tsConfigPath);
|
|
1779
|
+
const resolvedFiles = [...new Set(options.files)].map((filePath) => path$1.resolve(filePath));
|
|
1780
|
+
if (resolvedFiles.length === 0) return {
|
|
1781
|
+
diagnostics: [],
|
|
1782
|
+
errorCount: 0,
|
|
1783
|
+
warningCount: 0,
|
|
1784
|
+
elapsedMs: 0,
|
|
1785
|
+
compiler: "tsgo",
|
|
1786
|
+
toolFailure: void 0
|
|
1787
|
+
};
|
|
1788
|
+
const tempDir = getKeystrokeTmpDir({ projectRoot: options.projectRoot });
|
|
1789
|
+
await mkdir(tempDir, { recursive: true });
|
|
1790
|
+
const tempConfigPath = path$1.join(tempDir, "typecheck.json");
|
|
1791
|
+
const buildInfoPath = path$1.join(tempDir, "typecheck.tsbuildinfo");
|
|
1792
|
+
const globalsPath = path$1.join(tempDir, "core-globals.d.ts");
|
|
1793
|
+
await writeFile(globalsPath, `${CORE_PRIMITIVE_GLOBAL_TYPES}\n`, "utf-8");
|
|
1794
|
+
await writeFile(tempConfigPath, `${JSON.stringify({
|
|
1795
|
+
extends: tsConfigPath,
|
|
1796
|
+
files: [globalsPath, ...resolvedFiles],
|
|
1797
|
+
include: [path$1.join(options.projectRoot, "**/*.d.ts")],
|
|
1798
|
+
compilerOptions: {
|
|
1799
|
+
noEmit: true,
|
|
1800
|
+
incremental: true,
|
|
1801
|
+
tsBuildInfoFile: buildInfoPath
|
|
1802
|
+
}
|
|
1803
|
+
}, null, 2)}\n`, "utf-8");
|
|
1804
|
+
try {
|
|
1805
|
+
let lastToolFailureResult = null;
|
|
1806
|
+
for (const compiler of COMPILERS) try {
|
|
1807
|
+
const { stdout, stderr } = await execFileAsync(compiler.binPath, [
|
|
1808
|
+
"--noEmit",
|
|
1809
|
+
"--project",
|
|
1810
|
+
tempConfigPath,
|
|
1811
|
+
"--pretty",
|
|
1812
|
+
"false"
|
|
1813
|
+
], { cwd: options.projectRoot });
|
|
1814
|
+
return createTypecheckResult(compiler.name, `${stdout}\n${stderr}`.trim(), startedAt, options.projectRoot);
|
|
1815
|
+
} catch (error) {
|
|
1816
|
+
const failure = error;
|
|
1817
|
+
if (failure.code === "ENOENT") continue;
|
|
1818
|
+
const result = createTypecheckResult(compiler.name, `${failure.stdout ?? ""}\n${failure.stderr ?? ""}`.trim(), startedAt, options.projectRoot, resolveToolFailure(failure));
|
|
1819
|
+
if (result.toolFailure) {
|
|
1820
|
+
lastToolFailureResult = result;
|
|
1821
|
+
continue;
|
|
1822
|
+
}
|
|
1823
|
+
return result;
|
|
1824
|
+
}
|
|
1825
|
+
if (lastToolFailureResult) return lastToolFailureResult;
|
|
1826
|
+
} finally {
|
|
1827
|
+
await rm(tempConfigPath, { force: true });
|
|
1828
|
+
}
|
|
1829
|
+
throw new Error("Unable to run typecheck: no compiler available");
|
|
1830
|
+
}
|
|
1831
|
+
function createTypecheckResult(compiler, output, startedAt, projectRoot, toolFailure) {
|
|
1832
|
+
const diagnostics = filterProjectDiagnostics(parseDiagnostics(output), projectRoot);
|
|
1833
|
+
const reportedDiagnostics = diagnostics.length > 0 ? diagnostics : [];
|
|
1834
|
+
return {
|
|
1835
|
+
diagnostics: reportedDiagnostics,
|
|
1836
|
+
errorCount: reportedDiagnostics.filter((diagnostic) => diagnostic.severity === "error").length,
|
|
1837
|
+
warningCount: reportedDiagnostics.filter((diagnostic) => diagnostic.severity === "warning").length,
|
|
1838
|
+
elapsedMs: performance.now() - startedAt,
|
|
1839
|
+
compiler,
|
|
1840
|
+
toolFailure
|
|
1841
|
+
};
|
|
1842
|
+
}
|
|
1843
|
+
function filterProjectDiagnostics(diagnostics, projectRoot) {
|
|
1844
|
+
const root = path$1.resolve(projectRoot);
|
|
1845
|
+
return diagnostics.filter((diagnostic) => {
|
|
1846
|
+
if (!diagnostic.file) return true;
|
|
1847
|
+
const filePath = path$1.resolve(projectRoot, diagnostic.file);
|
|
1848
|
+
return filePath === root || filePath.startsWith(`${root}${path$1.sep}`);
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
function resolveToolFailure(failure) {
|
|
1852
|
+
const combinedOutput = `${failure.stdout ?? ""}\n${failure.stderr ?? ""}`.trim();
|
|
1853
|
+
if (parseDiagnostics(combinedOutput).length > 0) return;
|
|
1854
|
+
return {
|
|
1855
|
+
kind: "process",
|
|
1856
|
+
message: combinedOutput.length > 0 ? combinedOutput : `Typecheck process failed with exit code ${String(failure.code ?? "unknown")}`,
|
|
1857
|
+
exitCode: failure.code
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
//#endregion
|
|
1665
1861
|
//#region src/lib/workflow-build.ts
|
|
1666
1862
|
var workflow_build_exports = /* @__PURE__ */ __exportAll({
|
|
1667
1863
|
WorkflowBuildExecutionError: () => WorkflowBuildExecutionError,
|
|
@@ -1678,13 +1874,13 @@ const workflowBuildDependencies = {
|
|
|
1678
1874
|
build
|
|
1679
1875
|
};
|
|
1680
1876
|
var WorkflowNotFoundError = class extends Error {
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
constructor(
|
|
1684
|
-
super(`Workflow "${
|
|
1877
|
+
workflowRef;
|
|
1878
|
+
availableIds;
|
|
1879
|
+
constructor(workflowRef, availableIds) {
|
|
1880
|
+
super(`Workflow "${workflowRef}" not found.`);
|
|
1685
1881
|
this.name = "WorkflowNotFoundError";
|
|
1686
|
-
this.
|
|
1687
|
-
this.
|
|
1882
|
+
this.workflowRef = workflowRef;
|
|
1883
|
+
this.availableIds = availableIds;
|
|
1688
1884
|
}
|
|
1689
1885
|
};
|
|
1690
1886
|
var WorkflowBuildExecutionError = class extends Error {
|
|
@@ -1723,7 +1919,6 @@ async function runWorkflowBuild(options) {
|
|
|
1723
1919
|
throw new WorkflowBuildExecutionError(error);
|
|
1724
1920
|
}
|
|
1725
1921
|
if (!result.success) throw new WorkflowBuildFailedError(result.failures);
|
|
1726
|
-
if (options.name) assertWorkflowRefExists(result, options.name);
|
|
1727
1922
|
if (options.workflowRef) assertWorkflowRefExists(result, options.workflowRef);
|
|
1728
1923
|
return {
|
|
1729
1924
|
result,
|
|
@@ -1732,7 +1927,7 @@ async function runWorkflowBuild(options) {
|
|
|
1732
1927
|
}
|
|
1733
1928
|
function renderBuildHeader(workflowName) {
|
|
1734
1929
|
if (workflowName) {
|
|
1735
|
-
ui.header(`Building workflow "${workflowName}"...`);
|
|
1930
|
+
ui.header(`Building project (validating workflow id "${workflowName}")...`);
|
|
1736
1931
|
return;
|
|
1737
1932
|
}
|
|
1738
1933
|
ui.header("Building workflows and agents...");
|
|
@@ -1754,12 +1949,21 @@ function renderBuildSummary(result, outDir) {
|
|
|
1754
1949
|
const totalLine = `Total: ${formatTotalTime(result.totalMs)}`;
|
|
1755
1950
|
originalConsole.info(` ${check} ${totalLine}`);
|
|
1756
1951
|
logger.info(` ✓ ${totalLine}`);
|
|
1952
|
+
const workflowIds = collectBuiltWorkflowIds(result);
|
|
1953
|
+
if (workflowIds.length > 0) {
|
|
1954
|
+
const idsLine = `Workflow ids: ${workflowIds.join(", ")}`;
|
|
1955
|
+
originalConsole.info(` ${check} ${idsLine}`);
|
|
1956
|
+
logger.info(` ✓ ${idsLine}`);
|
|
1957
|
+
}
|
|
1757
1958
|
if (result.warnings.length > 0) {
|
|
1758
1959
|
ui.warn(`Build produced ${result.warnings.length} warning(s):`);
|
|
1759
1960
|
for (const warning of result.warnings) ui.hint(`- ${warning}`);
|
|
1760
1961
|
}
|
|
1761
1962
|
ui.hint(`Output: ${outDir}`);
|
|
1762
1963
|
}
|
|
1964
|
+
function collectBuiltWorkflowIds(result) {
|
|
1965
|
+
return result.artifacts.map((artifact) => artifact.manifest.id).filter((id) => typeof id === "string" && id.length > 0).sort((left, right) => left.localeCompare(right));
|
|
1966
|
+
}
|
|
1763
1967
|
function formatTotalTime(ms) {
|
|
1764
1968
|
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
1765
1969
|
const seconds = ms / 1e3;
|
|
@@ -1767,12 +1971,12 @@ function formatTotalTime(ms) {
|
|
|
1767
1971
|
}
|
|
1768
1972
|
function renderBuildFailure(error) {
|
|
1769
1973
|
if (error instanceof WorkflowNotFoundError) {
|
|
1770
|
-
ui.error(`Workflow "${error.
|
|
1771
|
-
if (error.
|
|
1974
|
+
ui.error(`Workflow "${error.workflowRef}" not found.`);
|
|
1975
|
+
if (error.availableIds.length === 0) {
|
|
1772
1976
|
ui.hint("No workflows were discovered in this project.");
|
|
1773
1977
|
return;
|
|
1774
1978
|
}
|
|
1775
|
-
ui.hint(`Available
|
|
1979
|
+
ui.hint(`Available workflow ids: ${error.availableIds.join(", ")}`);
|
|
1776
1980
|
return;
|
|
1777
1981
|
}
|
|
1778
1982
|
if (error instanceof WorkflowBuildExecutionError) {
|
|
@@ -1787,10 +1991,8 @@ function renderBuildFailure(error) {
|
|
|
1787
1991
|
ui.error(`Build error: ${toErrorMessage(error)}`);
|
|
1788
1992
|
}
|
|
1789
1993
|
function assertWorkflowRefExists(result, workflowRef) {
|
|
1790
|
-
if (result.artifacts.find((artifact) => artifact.manifest.id === workflowRef
|
|
1791
|
-
|
|
1792
|
-
const availableIds = result.artifacts.map((artifact) => artifact.manifest.id).sort((left, right) => left.localeCompare(right));
|
|
1793
|
-
throw new WorkflowNotFoundError(workflowRef, availableNames.length > 0 ? availableNames : availableIds);
|
|
1994
|
+
if (result.artifacts.find((artifact) => artifact.manifest.id === workflowRef)) return;
|
|
1995
|
+
throw new WorkflowNotFoundError(workflowRef, result.artifacts.map((artifact) => artifact.manifest.id).filter((id) => typeof id === "string" && id.length > 0).sort((left, right) => left.localeCompare(right)));
|
|
1794
1996
|
}
|
|
1795
1997
|
//#endregion
|
|
1796
|
-
export { runWorkflowBuild as a, renderBuildSummary as i, renderBuildFailure as n, workflow_build_exports as o, renderBuildHeader as r,
|
|
1998
|
+
export { runWorkflowBuild as a, build as c, renderBuildSummary as i, renderBuildFailure as n, workflow_build_exports as o, renderBuildHeader as r, typecheckWorkflows as s, WorkflowNotFoundError as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
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-
|
|
4
|
+
import { a as IntegrationScopeSchema, d as WorkflowStepEntrySchema, o as ResolvedCredentialSetSchema, t as CredentialRequirementsSchema, u as TriggerUploadDataSchema } from "./credential-requirements-B5Alhu1v-DanlSKnT.mjs";
|
|
5
5
|
import { a as SourceLocationSchema, i as ImportSourceSchema, n as CallsiteFingerprintSchema, t as CallKindSchema } from "./source-analysis-z2RSZw6X.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region ../../packages/workflow-build-contracts/src/flow-graph-schema.ts
|
package/dist/{workflow-bundler-BzHk73PM-muPv1yGG.mjs → workflow-bundler-Bs3zQNQv-Dy7lXxy3.mjs}
RENAMED
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
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-
|
|
4
|
+
import { r as formatEnvAccessError, t as createEnvAccessPlugin } from "./detect-env-access-CwkOYeYM-r4aynBU0.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";
|
|
8
8
|
import { rolldown } from "rolldown";
|
|
9
|
-
//#region ../../packages/workflow-builder/dist/workflow-bundler-
|
|
9
|
+
//#region ../../packages/workflow-builder/dist/workflow-bundler-Bs3zQNQv.mjs
|
|
10
10
|
function getDefaultExternal() {
|
|
11
11
|
return [
|
|
12
12
|
/^node:/,
|
|
13
13
|
"@swc/core",
|
|
14
14
|
/^@swc\/core-/,
|
|
15
15
|
/^@swc\/wasm/,
|
|
16
|
-
"playwright-core"
|
|
16
|
+
"playwright-core",
|
|
17
|
+
"@keystrokehq/core/flow-graph",
|
|
18
|
+
"oxc-parser",
|
|
19
|
+
/^@oxc-parser\//
|
|
17
20
|
];
|
|
18
21
|
}
|
|
22
|
+
/** Flow-graph AST parsing is build-time only; keep it out of deployed workflow bundles. */
|
|
23
|
+
function isBuildOnlyModule(source) {
|
|
24
|
+
return source === "@keystrokehq/core/flow-graph" || source === "oxc-parser" || source.startsWith("@oxc-parser/") || source.includes("graph-builder") || source.includes("oxc-parser");
|
|
25
|
+
}
|
|
26
|
+
function isExternalModule(id, patterns) {
|
|
27
|
+
if (isBuildOnlyModule(id)) return true;
|
|
28
|
+
return patterns.some((pattern) => typeof pattern === "string" ? pattern === id : pattern.test(id));
|
|
29
|
+
}
|
|
19
30
|
function createVirtualEntry(filePath, localExportName) {
|
|
20
31
|
return `${localExportName === "default" ? `export { default } from ${JSON.stringify(filePath)};` : `export { ${localExportName} as default } from ${JSON.stringify(filePath)};`}\nexport * from ${JSON.stringify(filePath)};`;
|
|
21
32
|
}
|
|
@@ -99,7 +110,7 @@ async function bundleTarget(options) {
|
|
|
99
110
|
const bundle = await rolldown({
|
|
100
111
|
input: entryId,
|
|
101
112
|
platform: "node",
|
|
102
|
-
external: options.external ?? getDefaultExternal(),
|
|
113
|
+
external: (id) => isExternalModule(id, options.external ?? getDefaultExternal()),
|
|
103
114
|
treeshake: true,
|
|
104
115
|
plugins: [createEnvAccessPlugin(envViolations, options.projectRoot), {
|
|
105
116
|
name: "workflow-entry",
|