@walkeros/cli 4.7.2 → 4.8.0-next-1791441510508
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/CHANGELOG.md +22 -0
- package/dist/cli.js +536 -532
- package/dist/examples/flow-complete.json +34 -30
- package/dist/examples/flow-complete.md +0 -3
- package/dist/examples/flow-selfhost-test.json +0 -1
- package/dist/examples/index.d.ts +0 -8
- package/dist/examples/index.js +34 -38
- package/dist/examples/index.js.map +1 -1
- package/dist/examples/server-collect.json +0 -1
- package/dist/index.d.ts +19 -8
- package/dist/index.js +24 -14
- package/dist/index.js.map +1 -1
- package/examples/flow-complete.json +34 -30
- package/examples/flow-complete.md +0 -3
- package/examples/flow-selfhost-test.json +0 -1
- package/examples/server-collect.json +0 -1
- package/openapi/client-operations.json +8 -8
- package/openapi/spec.json +51 -5
- package/package.json +29 -29
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ var __export = (target, all) => {
|
|
|
13
13
|
var define_CLIENT_OPERATION_DIGESTS_default;
|
|
14
14
|
var init_define_CLIENT_OPERATION_DIGESTS = __esm({
|
|
15
15
|
"<define:__CLIENT_OPERATION_DIGESTS__>"() {
|
|
16
|
-
define_CLIENT_OPERATION_DIGESTS_default = [{ op: "GET /api/auth/whoami", usedBy: ["mcp auth", "walkeros auth login", "walkeros auth whoami"], digest: "f8287550f3ac65aa5b290875220f06dd3f48d607ed489b9f0a8f704d3f8f5cfd" }, { op: "POST /api/feedback", usedBy: ["mcp feedback", "walkeros feedback"], digest: "7417108c6ea8d60904b715dfedc1d8b9b597834f7d427df6b9226b36e5eef963" }, { op: "GET /api/health", usedBy: ["mcp diagnostics", "walkeros diagnostics"], digest: "2b3c0883edf4048aca77f4222247929b9045db33d06729502cb5021929d04156" }, { op: "POST /api/oauth/device_authorization", usedBy: ["mcp auth", "walkeros auth login"], digest: "a3e744775b93e7f50ea4021f8a027e656bb90e6f2358c65a35e4c45e16ac3fdd" }, { op: "POST /api/oauth/revoke", usedBy: ["mcp auth", "walkeros auth logout"], digest: "dbc453faaaa748d1129473ccda7b26a4e3267d67c25a8a9fc1da0068837fe154" }, { op: "POST /api/oauth/token", usedBy: ["@walkeros/cli resolveAccessToken", "mcp auth", "walkeros auth login"], digest: "16f5a3146c0a3fff703122a5ff25446bad07a6c37069a9e9a6db6925daa036a0" }, { op: "GET /api/openapi.json", usedBy: ["mcp diagnostics", "mcp resource walkeros://reference/openapi", "walkeros diagnostics"], digest: "dbf34e575af8f757d9a0f967c4565968d1a2d64b57a717fc65c8f81692099f0a" }, { op: "GET /api/packages", usedBy: ["mcp package_search", "mcp resource walkeros://reference/packages", "mcp resource walkeros://schema/{packageName}"], digest: "d9c713eea791e8bae3c606bcd1f0209db2c7050a39b18e96f7d913b7d0752e19" }, { op: "GET /api/projects", usedBy: ["mcp flow_manage", "mcp project_manage", "walkeros projects list"], digest: "1e65fca4cb31ccfc10b9835595ac4ee1f69bd6da14127bcc31d62616dfba7281" }, { op: "POST /api/projects", usedBy: ["mcp project_manage", "walkeros projects create"], digest: "3ab6d76c78d4433f0e0ab85a0a23753c7065bc232bfb30b7cee616a3aef8bec5" }, { op: "DELETE /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects delete"], digest: "9f725b18812327c57cfbf8d8ed0139353c60ed2eb34024618e1760c2765889ca" }, { op: "GET /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects get"], digest: "535d11026c7b7ff3b59512c0f68ddeb4e73104d4adab143351c7f9fa1ece6e78" }, { op: "PATCH /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects update"], digest: "d15d7756dae06372328b43891a89dc839e6eb8587896d19999ff49ec8aa1d19b" }, { op: "GET /api/projects/{projectId}/deployments", usedBy: ["mcp deploy_manage", "walkeros deploy list"], digest: "2b3cc07e4cf1f739f7321b5bf157b91ac300205286a48c4f29dd11269d00f2c0" }, { op: "POST /api/projects/{projectId}/deployments", usedBy: ["walkeros deploy create"], digest: "fa0bcad018a21213f473bd058ef90975b50fd3f978340e36c61acf1d609bab95" }, { op: "DELETE /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy delete"], digest: "ce119e1743ecfdda590f7fae6bfc5a094c387efcbdaac6eaf9b2b7b0fffac58e" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy status"], digest: "089bd54697005003c9fb256f853dad2e4431d62cbaa2805d311c6837e498ba2b" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}/stream", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "cf27b0c148cfeb3b772f150a9de0359540643b3eeaff8dc373cb865557e24a82" }, { op: "GET /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows list"], digest: "ecb58ddbde3808a161bee04d333d4e976e86f46505bacc6d571050a45c6c9ee8" }, { op: "POST /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows create"], digest: "bcae723b986165cab63933eda1814a9da984cdfada8fe1a0c9cc01d4554d8372" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows delete"], digest: "1f164466f6b6058b79e787b0234b42d61274431dd6e29cb8acc23c2706218278" }, { op: "GET /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp deploy_manage", "mcp flow_bundle", "mcp flow_load", "mcp flow_manage", "mcp flow_simulate", "mcp observe_session", "walkeros deploy create", "walkeros deploy start", "walkeros flows get", "walkeros observe start", "walkeros previews create"], digest: "a8fc246e9b179a7becce56221be27aae649f471aebb639eda34b215c926f21dd" }, { op: "PATCH /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows update"], digest: "f9e59060ab31184a3b5906c3346479616101f7793c7a00c35649f08d2f5d6a32" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "8d9229fc0d884a75b1faf06877494e4dd5fa8c77affc7a7bb58d559fbd0c8646" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "ea6922423f14dde427cf37f13f07e3f5f783358ff23fd7464925da068838068e" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/duplicate", usedBy: ["mcp flow_manage", "walkeros flows duplicate"], digest: "b9111138d427419eea46ed590a301373a4c641b19d90ab1566891f5aaaadc231" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/journeys", usedBy: ["mcp flow_manage", "mcp observe_journeys", "mcp observe_session"], digest: "78377e4a5b4b1e4dce9f94813bd3484e78b9520e57c712f963ef98c42516b01c" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "5620b4826736b3aff1c80412d9861d5286304957df59d241e9adff6d101bb032" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session"], digest: "9bdc90811f98a22030ee33bb24e2f270b64733b81e3e4dd3d16cd00620dafb44" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "ab5e8a2b908391c701c9e0b73813f1eb3bfa5b2a82e82b7009b2559467352491" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/heartbeat", usedBy: ["walkeros observe start"], digest: "2b0b74a466c643aac87226c8154a530ce55deb5409a4fb65a4ef9b8aa182cbc7" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews list"], digest: "ef72ef8b90676c59c626763f120d6a81910b29e4384f0ac8174f7e12420007c2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "7239dc554d11983386108825087aa45eb4d0bd38eae87dbac376e68e724c6a8f" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews delete"], digest: "de9be2358920517321c4e2c59c9ce59f174be0382596037ce36f987233689e51" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews get"], digest: "4dbaa7000600aa12d45388511192dabdcd910fad9acedd802fdc68efea4e7bc7" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews/{previewId}/grant", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "4cf5c7ea9363935bd978f858e4bb058c6dd64bb2763cefac9ce07da248605e7f" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases", usedBy: ["mcp hub_manage"], digest: "c6ac90c93e07429b53c506292ceda03bfb8873686db76e422f5eed4638f4bee7" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/releases/annotations", usedBy: ["mcp hub_manage"], digest: "084f638f024a578ab2f401839f10f9554e6d2100ba7d67f1ab2be560616bd044" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/step-history", usedBy: ["mcp hub_manage"], digest: "a0d051814f7e8cc39e00592c16bc92a1afae0b58cd71b9b98ab6c85da4dd04e4" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/{versionId}", usedBy: ["mcp hub_manage"], digest: "d429b1564ca64148c5844e799c5dafc5d864fcf94df62f51174c3825db6a3463" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "19629983472c4e46b6c97fc8700b35549f38725fd4d7a5f59ddacd6a7bcfc8f2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "b9407ce8584d147f84acf2562f1eb7c63c35e7ed93bd275d8c3c2ba3c4a1a8e3" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets/values", usedBy: ["runner"], digest: "0c02c86b0576047e8d986c2829212fef4e7eea5791250188619244bfbcdfb4aa" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "b744bcdb73b204d9aa4e4d3f846552a4154601df27c4fe18045bdb8a09624b84" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "5b94004e066746ee7a83b90477db9d2a343361705c2e158df85d74e47085a46a" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "0ad85a2494f22e9863362a7137d721d970b87ff60fdb41727a76cb4f590c83bc" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "b6506c543c7e755592b5a6671016c4bae3b3e41cd76c28852297413e1a412e46" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "ae0b8185fa74ba12d99eedacedb53e5801d7485cdf7b1c382334371454f8c323" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "0ee52914274f52641a08b4c2d9da774c971d214929b43abee85d5e657b209144" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads/{threadId}/messages", usedBy: ["mcp hub_manage"], digest: "28d8e964962b03c016c909111be0ce570df9bf43f89f0ab1c74b6dd65503eec1" }, { op: "GET /api/projects/{projectId}/frames", usedBy: ["mcp frame_manage"], digest: "c1cecd6354a7071418e709ecbf925a6ae14bb0099459bac786f35877108e29fd" }, { op: "GET /api/projects/{projectId}/frames/{frameId}", usedBy: ["mcp frame_manage"], digest: "98e3373cb23c9851280c505239ff960088d89bea9d922787da812bd7a59d104e" }, { op: "GET /api/projects/{projectId}/knowledge", usedBy: ["mcp hub_manage"], digest: "ca52e4593757c4fede25c41c3bb95e9a3b7476106549752b756860fc35abd1f1" }, { op: "POST /api/projects/{projectId}/runners/heartbeat", usedBy: ["runner"], digest: "96546fffffb32b66db7c5238daa2ba8f549d976f5ffcab2befa639e2eb1df0e1" }, { op: "POST /api/telemetry", usedBy: ["@walkeros/cli telemetry"], digest: "d119e16315ff9df09160d8b36ebc78dec089cb2a726f4a8fd77ff5b693999667" }];
|
|
16
|
+
define_CLIENT_OPERATION_DIGESTS_default = [{ op: "GET /api/auth/whoami", usedBy: ["mcp auth", "walkeros auth login", "walkeros auth whoami"], digest: "f8287550f3ac65aa5b290875220f06dd3f48d607ed489b9f0a8f704d3f8f5cfd" }, { op: "POST /api/feedback", usedBy: ["mcp feedback", "walkeros feedback"], digest: "7417108c6ea8d60904b715dfedc1d8b9b597834f7d427df6b9226b36e5eef963" }, { op: "GET /api/health", usedBy: ["mcp diagnostics", "walkeros diagnostics"], digest: "2b3c0883edf4048aca77f4222247929b9045db33d06729502cb5021929d04156" }, { op: "POST /api/oauth/device_authorization", usedBy: ["mcp auth", "walkeros auth login"], digest: "a3e744775b93e7f50ea4021f8a027e656bb90e6f2358c65a35e4c45e16ac3fdd" }, { op: "POST /api/oauth/revoke", usedBy: ["mcp auth", "walkeros auth logout"], digest: "dbc453faaaa748d1129473ccda7b26a4e3267d67c25a8a9fc1da0068837fe154" }, { op: "POST /api/oauth/token", usedBy: ["@walkeros/cli resolveAccessToken", "mcp auth", "walkeros auth login"], digest: "16f5a3146c0a3fff703122a5ff25446bad07a6c37069a9e9a6db6925daa036a0" }, { op: "GET /api/openapi.json", usedBy: ["mcp diagnostics", "mcp resource walkeros://reference/openapi", "walkeros diagnostics"], digest: "dbf34e575af8f757d9a0f967c4565968d1a2d64b57a717fc65c8f81692099f0a" }, { op: "GET /api/packages", usedBy: ["mcp package_search", "mcp resource walkeros://reference/packages", "mcp resource walkeros://schema/{packageName}"], digest: "d9c713eea791e8bae3c606bcd1f0209db2c7050a39b18e96f7d913b7d0752e19" }, { op: "GET /api/projects", usedBy: ["mcp flow_manage", "mcp project_manage", "walkeros projects list"], digest: "1e65fca4cb31ccfc10b9835595ac4ee1f69bd6da14127bcc31d62616dfba7281" }, { op: "POST /api/projects", usedBy: ["mcp project_manage", "walkeros projects create"], digest: "3ab6d76c78d4433f0e0ab85a0a23753c7065bc232bfb30b7cee616a3aef8bec5" }, { op: "DELETE /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects delete"], digest: "9f725b18812327c57cfbf8d8ed0139353c60ed2eb34024618e1760c2765889ca" }, { op: "GET /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects get"], digest: "535d11026c7b7ff3b59512c0f68ddeb4e73104d4adab143351c7f9fa1ece6e78" }, { op: "PATCH /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects update"], digest: "d15d7756dae06372328b43891a89dc839e6eb8587896d19999ff49ec8aa1d19b" }, { op: "GET /api/projects/{projectId}/deployments", usedBy: ["mcp deploy_manage", "walkeros deploy list"], digest: "2b3cc07e4cf1f739f7321b5bf157b91ac300205286a48c4f29dd11269d00f2c0" }, { op: "POST /api/projects/{projectId}/deployments", usedBy: ["walkeros deploy create"], digest: "fa0bcad018a21213f473bd058ef90975b50fd3f978340e36c61acf1d609bab95" }, { op: "DELETE /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy delete"], digest: "ce119e1743ecfdda590f7fae6bfc5a094c387efcbdaac6eaf9b2b7b0fffac58e" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy status"], digest: "089bd54697005003c9fb256f853dad2e4431d62cbaa2805d311c6837e498ba2b" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}/stream", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "cf27b0c148cfeb3b772f150a9de0359540643b3eeaff8dc373cb865557e24a82" }, { op: "GET /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows list"], digest: "ecb58ddbde3808a161bee04d333d4e976e86f46505bacc6d571050a45c6c9ee8" }, { op: "POST /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows create"], digest: "bcae723b986165cab63933eda1814a9da984cdfada8fe1a0c9cc01d4554d8372" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows delete"], digest: "1f164466f6b6058b79e787b0234b42d61274431dd6e29cb8acc23c2706218278" }, { op: "GET /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp deploy_manage", "mcp flow_bundle", "mcp flow_load", "mcp flow_manage", "mcp flow_simulate", "mcp observe_session", "walkeros deploy create", "walkeros deploy start", "walkeros flows get", "walkeros observe start", "walkeros previews create"], digest: "a8fc246e9b179a7becce56221be27aae649f471aebb639eda34b215c926f21dd" }, { op: "PATCH /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows update"], digest: "f9e59060ab31184a3b5906c3346479616101f7793c7a00c35649f08d2f5d6a32" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "8d9229fc0d884a75b1faf06877494e4dd5fa8c77affc7a7bb58d559fbd0c8646" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "ea6922423f14dde427cf37f13f07e3f5f783358ff23fd7464925da068838068e" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/duplicate", usedBy: ["mcp flow_manage", "walkeros flows duplicate"], digest: "b9111138d427419eea46ed590a301373a4c641b19d90ab1566891f5aaaadc231" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/frames", usedBy: ["mcp frame_manage"], digest: "b8027522be3c0cf725ce3b02b7029102846b4a6a7ada10c0d8edac31f59c2a0a" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/frames/{frameId}", usedBy: ["mcp frame_manage"], digest: "5439af00498b5bc23363b11dbe362ea058ff0b9ef04b00c4a96be03208787cfd" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/journeys", usedBy: ["mcp flow_manage", "mcp observe_journeys", "mcp observe_session"], digest: "78377e4a5b4b1e4dce9f94813bd3484e78b9520e57c712f963ef98c42516b01c" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "5620b4826736b3aff1c80412d9861d5286304957df59d241e9adff6d101bb032" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session"], digest: "9bdc90811f98a22030ee33bb24e2f270b64733b81e3e4dd3d16cd00620dafb44" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "ab5e8a2b908391c701c9e0b73813f1eb3bfa5b2a82e82b7009b2559467352491" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/heartbeat", usedBy: ["walkeros observe start"], digest: "2b0b74a466c643aac87226c8154a530ce55deb5409a4fb65a4ef9b8aa182cbc7" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews list"], digest: "ef72ef8b90676c59c626763f120d6a81910b29e4384f0ac8174f7e12420007c2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "7239dc554d11983386108825087aa45eb4d0bd38eae87dbac376e68e724c6a8f" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews delete"], digest: "de9be2358920517321c4e2c59c9ce59f174be0382596037ce36f987233689e51" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews get"], digest: "4dbaa7000600aa12d45388511192dabdcd910fad9acedd802fdc68efea4e7bc7" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews/{previewId}/grant", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "4cf5c7ea9363935bd978f858e4bb058c6dd64bb2763cefac9ce07da248605e7f" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases", usedBy: ["mcp hub_manage"], digest: "c6ac90c93e07429b53c506292ceda03bfb8873686db76e422f5eed4638f4bee7" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/releases/annotations", usedBy: ["mcp hub_manage"], digest: "084f638f024a578ab2f401839f10f9554e6d2100ba7d67f1ab2be560616bd044" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/step-history", usedBy: ["mcp hub_manage"], digest: "a0d051814f7e8cc39e00592c16bc92a1afae0b58cd71b9b98ab6c85da4dd04e4" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/{versionId}", usedBy: ["mcp hub_manage"], digest: "d429b1564ca64148c5844e799c5dafc5d864fcf94df62f51174c3825db6a3463" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "19629983472c4e46b6c97fc8700b35549f38725fd4d7a5f59ddacd6a7bcfc8f2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "b9407ce8584d147f84acf2562f1eb7c63c35e7ed93bd275d8c3c2ba3c4a1a8e3" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets/values", usedBy: ["runner"], digest: "0c02c86b0576047e8d986c2829212fef4e7eea5791250188619244bfbcdfb4aa" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "b744bcdb73b204d9aa4e4d3f846552a4154601df27c4fe18045bdb8a09624b84" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "5b94004e066746ee7a83b90477db9d2a343361705c2e158df85d74e47085a46a" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "0ad85a2494f22e9863362a7137d721d970b87ff60fdb41727a76cb4f590c83bc" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "b6506c543c7e755592b5a6671016c4bae3b3e41cd76c28852297413e1a412e46" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "ae0b8185fa74ba12d99eedacedb53e5801d7485cdf7b1c382334371454f8c323" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "0ee52914274f52641a08b4c2d9da774c971d214929b43abee85d5e657b209144" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads/{threadId}/messages", usedBy: ["mcp hub_manage"], digest: "28d8e964962b03c016c909111be0ce570df9bf43f89f0ab1c74b6dd65503eec1" }, { op: "GET /api/projects/{projectId}/knowledge", usedBy: ["mcp hub_manage"], digest: "ca52e4593757c4fede25c41c3bb95e9a3b7476106549752b756860fc35abd1f1" }, { op: "POST /api/projects/{projectId}/runners/heartbeat", usedBy: ["runner"], digest: "96546fffffb32b66db7c5238daa2ba8f549d976f5ffcab2befa639e2eb1df0e1" }, { op: "POST /api/telemetry", usedBy: ["@walkeros/cli telemetry"], digest: "d119e16315ff9df09160d8b36ebc78dec089cb2a726f4a8fd77ff5b693999667" }];
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -306,26 +306,26 @@ function pe(e6) {
|
|
|
306
306
|
function de(e6) {
|
|
307
307
|
const t5 = pe(e6);
|
|
308
308
|
if (void 0 === t5) return [];
|
|
309
|
-
const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping";
|
|
309
|
+
const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping", r6 = "config.mapping" === n6 && void 0 !== e6.mapping;
|
|
310
310
|
if (void 0 !== e6.code || void 0 !== e6.package) {
|
|
311
|
-
return [`\`${n6}\` is ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs it; a mapping applies only to a transformer without code.`];
|
|
311
|
+
return [`${r6 ? "`config.mapping` and `mapping` are" : `\`${n6}\` is`} ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs ${r6 ? "them" : "it"}; a mapping applies only to a transformer without code.`];
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
const
|
|
313
|
+
const o5 = [];
|
|
314
|
+
r6 && o5.push("`mapping` is overridden: `config.mapping` wins; remove one.");
|
|
315
|
+
const s6 = (function(e7, t6) {
|
|
316
316
|
if (!ae(e7)) return [];
|
|
317
317
|
const n7 = [];
|
|
318
318
|
for (const r8 of fe) void 0 !== e7[r8] && n7.push(`${t6}.${r8}`);
|
|
319
319
|
const r7 = e7.mapping;
|
|
320
320
|
if (!ae(r7)) return n7;
|
|
321
|
-
for (const [e8, o6] of Object.entries(r7)) if (ae(o6)) for (const [r8,
|
|
321
|
+
for (const [e8, o6] of Object.entries(r7)) if (ae(o6)) for (const [r8, s7] of Object.entries(o6)) (Q(s7) ? s7 : [s7]).forEach((o7, i6) => {
|
|
322
322
|
if (!ae(o7)) return;
|
|
323
|
-
const a5 = `${t6}.mapping.${e8}.${r8}${Q(
|
|
323
|
+
const a5 = `${t6}.mapping.${e8}.${r8}${Q(s7) ? `[${i6}]` : ""}`;
|
|
324
324
|
for (const e9 of le) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
|
|
325
325
|
});
|
|
326
326
|
return n7;
|
|
327
327
|
})(t5, n6);
|
|
328
|
-
return
|
|
328
|
+
return s6.length > 0 && o5.push(`${s6.map((e7) => `\`${e7}\``).join(", ")} ${1 === s6.length ? "does" : "do"} nothing at the transformer position; only \`policy\` and a rule's \`condition\`, \`policy\`, \`name\` and \`ignore\` apply.`), o5;
|
|
329
329
|
}
|
|
330
330
|
function ge(e6, t5) {
|
|
331
331
|
const n6 = me[e6];
|
|
@@ -862,7 +862,7 @@ async function jt(e6, t5, n6) {
|
|
|
862
862
|
const e7 = l4(`${a5} ${c3}`, d3[c3]);
|
|
863
863
|
s6 = se(e7) ? await e7 : e7;
|
|
864
864
|
}
|
|
865
|
-
if (!s6) {
|
|
865
|
+
if (!(s6 || d3 && "*" === a5 && "*" === c3)) {
|
|
866
866
|
a5 = "*", c3 = "*";
|
|
867
867
|
const e7 = l4("* *", t5[a5]?.[c3]);
|
|
868
868
|
s6 = se(e7) ? await e7 : e7;
|
|
@@ -1537,7 +1537,7 @@ async function po(e6, t5, n6, r6) {
|
|
|
1537
1537
|
function mo(e6, t5, n6, r6) {
|
|
1538
1538
|
if (!ao(n6)) return;
|
|
1539
1539
|
const o5 = 1e3 * r6, s6 = e6.set(t5, Qr(n6, o5), o5);
|
|
1540
|
-
s6
|
|
1540
|
+
se(s6) && Promise.resolve(s6).catch(() => {
|
|
1541
1541
|
});
|
|
1542
1542
|
}
|
|
1543
1543
|
async function go(e6, t5, n6, r6) {
|
|
@@ -3075,7 +3075,7 @@ var init_stdin = __esm({
|
|
|
3075
3075
|
|
|
3076
3076
|
// ../core/dist/dev.mjs
|
|
3077
3077
|
import { z as i4 } from "zod";
|
|
3078
|
-
import { z as
|
|
3078
|
+
import { z as di } from "zod";
|
|
3079
3079
|
function o3(e6, t5, n6 = "draft-7") {
|
|
3080
3080
|
return i4.toJSONSchema(e6, { target: n6 });
|
|
3081
3081
|
}
|
|
@@ -3088,61 +3088,61 @@ function T4(e6) {
|
|
|
3088
3088
|
function R3(e6) {
|
|
3089
3089
|
return i4.object({ policy: e6.optional().describe("Pre-processing policy rules") }).partial();
|
|
3090
3090
|
}
|
|
3091
|
-
function
|
|
3091
|
+
function M3(e6) {
|
|
3092
3092
|
return i4.object({ consent: e6.optional().describe("Required consent states") }).partial();
|
|
3093
3093
|
}
|
|
3094
|
-
function
|
|
3095
|
-
return "string" == typeof e6 ? [e6] : Array.isArray(e6) ? e6.flatMap(
|
|
3094
|
+
function ot3(e6) {
|
|
3095
|
+
return "string" == typeof e6 ? [e6] : Array.isArray(e6) ? e6.flatMap(ot3) : "object" == typeof e6 && null !== e6 && "key" in e6 && "string" == typeof e6.key ? [e6.key] : [];
|
|
3096
3096
|
}
|
|
3097
|
-
function
|
|
3098
|
-
for (const o5 of
|
|
3097
|
+
function rt3(e6, t5, n6, i6) {
|
|
3098
|
+
for (const o5 of ot3(e6)) i6.test(o5) || n6.addIssue({ code: "custom", message: `State paths resolve against { event, ingest }: "${o5}" needs an "event." or "ingest." prefix.`, path: [t5] });
|
|
3099
3099
|
}
|
|
3100
|
-
function
|
|
3100
|
+
function Jn2(e6, t5) {
|
|
3101
3101
|
void 0 !== e6.import && (void 0 !== e6.code && t5.addIssue({ code: "custom", message: "`import` cannot be combined with inline `code`", path: ["import"] }), void 0 === e6.package && t5.addIssue({ code: "custom", message: "`import` requires `package`", path: ["import"] }));
|
|
3102
3102
|
}
|
|
3103
|
-
function
|
|
3104
|
-
return
|
|
3103
|
+
function Kn2(e6) {
|
|
3104
|
+
return Gn3.parse(e6);
|
|
3105
3105
|
}
|
|
3106
|
-
function
|
|
3107
|
-
return
|
|
3106
|
+
function Qn3(e6) {
|
|
3107
|
+
return Gn3.safeParse(e6);
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3110
|
-
return
|
|
3109
|
+
function Yn2(e6) {
|
|
3110
|
+
return Zn.parse(e6);
|
|
3111
3111
|
}
|
|
3112
|
-
function
|
|
3113
|
-
return
|
|
3112
|
+
function Xn2(e6) {
|
|
3113
|
+
return Zn.safeParse(e6);
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3115
|
+
function vi(e6) {
|
|
3116
3116
|
return Array.isArray(e6);
|
|
3117
3117
|
}
|
|
3118
|
-
function
|
|
3119
|
-
return "object" == typeof e6 && null !== e6 && !
|
|
3118
|
+
function yi(e6) {
|
|
3119
|
+
return "object" == typeof e6 && null !== e6 && !vi(e6) && "[object Object]" === Object.prototype.toString.call(e6);
|
|
3120
3120
|
}
|
|
3121
|
-
function
|
|
3121
|
+
function Si(e6, t5 = "", n6) {
|
|
3122
3122
|
const i6 = t5.split(".");
|
|
3123
3123
|
let o5 = e6;
|
|
3124
3124
|
for (let e7 = 0; e7 < i6.length; e7++) {
|
|
3125
3125
|
const t6 = i6[e7];
|
|
3126
|
-
if ("*" === t6 &&
|
|
3126
|
+
if ("*" === t6 && vi(o5)) {
|
|
3127
3127
|
const t7 = i6.slice(e7 + 1).join("."), r6 = [];
|
|
3128
3128
|
for (const e8 of o5) {
|
|
3129
|
-
const i7 =
|
|
3129
|
+
const i7 = Si(e8, t7, n6);
|
|
3130
3130
|
r6.push(i7);
|
|
3131
3131
|
}
|
|
3132
3132
|
return r6;
|
|
3133
3133
|
}
|
|
3134
|
-
if (o5 =
|
|
3134
|
+
if (o5 = yi(o5) || vi(o5) ? o5[t6] : void 0, void 0 === o5) break;
|
|
3135
3135
|
}
|
|
3136
3136
|
return void 0 !== o5 ? o5 : n6;
|
|
3137
3137
|
}
|
|
3138
|
-
function
|
|
3138
|
+
function wi(e6) {
|
|
3139
3139
|
if (void 0 === e6 || "*" === e6) return () => true;
|
|
3140
3140
|
if ("and" in e6) {
|
|
3141
|
-
const t5 = e6.and.map(
|
|
3141
|
+
const t5 = e6.and.map(wi);
|
|
3142
3142
|
return (e7) => t5.every((t6) => t6(e7));
|
|
3143
3143
|
}
|
|
3144
3144
|
if ("or" in e6) {
|
|
3145
|
-
const t5 = e6.or.map(
|
|
3145
|
+
const t5 = e6.or.map(wi);
|
|
3146
3146
|
return (e7) => t5.some((t6) => t6(e7));
|
|
3147
3147
|
}
|
|
3148
3148
|
return (function(e7) {
|
|
@@ -3173,82 +3173,82 @@ function bi(e6) {
|
|
|
3173
3173
|
}
|
|
3174
3174
|
})(n6, i6);
|
|
3175
3175
|
return (e8) => {
|
|
3176
|
-
const n7 =
|
|
3176
|
+
const n7 = Si(e8, t5), i7 = r6(n7);
|
|
3177
3177
|
return o5 ? !i7 : i7;
|
|
3178
3178
|
};
|
|
3179
3179
|
})(e6);
|
|
3180
3180
|
}
|
|
3181
|
-
function
|
|
3181
|
+
function ki(e6) {
|
|
3182
3182
|
return Array.isArray(e6) && e6.length > 0 && e6.every((e7) => (function(e8) {
|
|
3183
3183
|
return "object" == typeof e8 && null !== e8 && !Array.isArray(e8) && ("match" in e8 || "next" in e8 || "one" in e8 || "many" in e8 || "stop" in e8);
|
|
3184
3184
|
})(e7));
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function xi(e6, t5) {
|
|
3187
3187
|
return { kind: t5 ? "sequence" : "next", path: e6 };
|
|
3188
3188
|
}
|
|
3189
|
-
function
|
|
3189
|
+
function ji(e6, t5) {
|
|
3190
3190
|
return t5 ? { ...e6, outer: t5 } : e6;
|
|
3191
3191
|
}
|
|
3192
|
-
function
|
|
3193
|
-
return
|
|
3192
|
+
function $i(e6, t5, n6, i6) {
|
|
3193
|
+
return ji(n6 ? { kind: e6, path: t5, match: n6 } : { kind: e6, path: t5, catchAll: true }, i6);
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3196
|
-
return 0 === e6.length ? { type: "chain", value: [], label:
|
|
3195
|
+
function Oi(e6, t5, n6, i6) {
|
|
3196
|
+
return 0 === e6.length ? { type: "chain", value: [], label: ji({ kind: n6, path: t5 }, i6) } : { type: n6, routes: Ei(e6, t5, n6, i6) };
|
|
3197
3197
|
}
|
|
3198
|
-
function
|
|
3198
|
+
function Ei(e6, t5, n6, i6) {
|
|
3199
3199
|
return e6.map((e7, o5) => {
|
|
3200
3200
|
const r6 = [...t5, o5];
|
|
3201
3201
|
if ("string" == typeof e7 || Array.isArray(e7)) {
|
|
3202
|
-
const t6 =
|
|
3203
|
-
return { match:
|
|
3202
|
+
const t6 = $i(n6, r6, void 0, i6);
|
|
3203
|
+
return { match: Ci, next: Di(e7, r6, t6) ?? { type: "chain", value: [], label: t6 } };
|
|
3204
3204
|
}
|
|
3205
|
-
const s6 =
|
|
3206
|
-
return { match: e7.match ?
|
|
3205
|
+
const s6 = $i(n6, r6, e7.match, i6);
|
|
3206
|
+
return { match: e7.match ? wi(e7.match) : Ci, source: e7.match, next: Pi(e7, r6, s6, false, true) ?? { type: "chain", value: [], label: s6 } };
|
|
3207
3207
|
});
|
|
3208
3208
|
}
|
|
3209
|
-
function
|
|
3210
|
-
const r6 = o5 ? void 0 : e6.match, s6 = r6 ?
|
|
3209
|
+
function Pi(e6, t5, n6, i6, o5) {
|
|
3210
|
+
const r6 = o5 ? void 0 : e6.match, s6 = r6 ? ji({ kind: "next", path: t5, match: r6 }, n6) : n6 ?? xi(t5, i6), a5 = r6 ? s6 : n6;
|
|
3211
3211
|
let c3;
|
|
3212
|
-
return true === e6.stop ? c3 = { type: "stop", label: s6 } : void 0 !== e6.one ? c3 =
|
|
3212
|
+
return true === e6.stop ? c3 = { type: "stop", label: s6 } : void 0 !== e6.one ? c3 = Oi(e6.one, [...t5, "one"], "one", a5) : void 0 !== e6.many ? c3 = Oi(e6.many, [...t5, "many"], "many", a5) : void 0 !== e6.next && (c3 = Di(e6.next, [...t5, "next"], a5)), r6 ? { type: "gate", match: wi(r6), source: r6, next: c3 ?? { type: "chain", value: [], label: s6 } } : void 0 === c3 && e6.match ? { type: "chain", value: [], label: s6 } : c3;
|
|
3213
3213
|
}
|
|
3214
|
-
function
|
|
3214
|
+
function Di(e6, t5 = [], n6, i6 = false) {
|
|
3215
3215
|
if (null != e6) {
|
|
3216
|
-
if ("string" == typeof e6) return { type: "static", value: e6, label: n6 ??
|
|
3216
|
+
if ("string" == typeof e6) return { type: "static", value: e6, label: n6 ?? xi(t5, i6) };
|
|
3217
3217
|
if (Array.isArray(e6)) {
|
|
3218
3218
|
if (0 === e6.length) return;
|
|
3219
|
-
if (
|
|
3219
|
+
if (ki(e6)) return { type: "one", routes: Ei(e6, t5, "one", n6) };
|
|
3220
3220
|
const o5 = [];
|
|
3221
3221
|
for (const t6 of e6) "string" == typeof t6 && o5.push(t6);
|
|
3222
|
-
if (o5.length === e6.length) return { type: "chain", value: o5, label: n6 ??
|
|
3222
|
+
if (o5.length === e6.length) return { type: "chain", value: o5, label: n6 ?? xi(t5, i6) };
|
|
3223
3223
|
const r6 = [];
|
|
3224
3224
|
if (e6.forEach((e7, i7) => {
|
|
3225
|
-
const o6 =
|
|
3225
|
+
const o6 = Di(e7, [...t5, i7], n6, true);
|
|
3226
3226
|
void 0 !== o6 && r6.push(o6);
|
|
3227
3227
|
}), 0 === r6.length) return;
|
|
3228
3228
|
return { type: "sequence", value: r6 };
|
|
3229
3229
|
}
|
|
3230
|
-
return
|
|
3230
|
+
return Pi(e6, t5, n6, i6, false);
|
|
3231
3231
|
}
|
|
3232
3232
|
}
|
|
3233
|
-
function
|
|
3233
|
+
function Ai(e6, t5, n6) {
|
|
3234
3234
|
return n6 ? { type: "continuation", segments: e6, at: t5, tail: n6 } : { type: "continuation", segments: e6, at: t5 };
|
|
3235
3235
|
}
|
|
3236
|
-
function
|
|
3236
|
+
function Ti(e6) {
|
|
3237
3237
|
if (null == e6) return;
|
|
3238
3238
|
if ((function(e7) {
|
|
3239
3239
|
return "object" == typeof e7 && !Array.isArray(e7) && "type" in e7 && "continuation" === e7.type;
|
|
3240
3240
|
})(e6)) return e6;
|
|
3241
3241
|
const t5 = (function(e7) {
|
|
3242
3242
|
if (null == e7) return;
|
|
3243
|
-
if ("object" != typeof e7) return
|
|
3244
|
-
const t6 =
|
|
3243
|
+
if ("object" != typeof e7) return Di(e7);
|
|
3244
|
+
const t6 = Ii.get(e7);
|
|
3245
3245
|
if (t6) return t6;
|
|
3246
|
-
const n6 =
|
|
3247
|
-
return n6 &&
|
|
3246
|
+
const n6 = Di(e7);
|
|
3247
|
+
return n6 && Ii.set(e7, n6), n6;
|
|
3248
3248
|
})(e6);
|
|
3249
|
-
return t5 ?
|
|
3249
|
+
return t5 ? Ai([t5], 0, void 0) : void 0;
|
|
3250
3250
|
}
|
|
3251
|
-
function
|
|
3251
|
+
function Ri(e6, t5, n6) {
|
|
3252
3252
|
const i6 = [];
|
|
3253
3253
|
let o5 = e6;
|
|
3254
3254
|
for (; o5; ) {
|
|
@@ -3256,7 +3256,7 @@ function Di(e6, t5, n6) {
|
|
|
3256
3256
|
o5 = o5.tail;
|
|
3257
3257
|
continue;
|
|
3258
3258
|
}
|
|
3259
|
-
const e7 = o5.segments[o5.at], r6 =
|
|
3259
|
+
const e7 = o5.segments[o5.at], r6 = Ai(o5.segments, o5.at + 1, o5.tail);
|
|
3260
3260
|
if ("static" === e7.type) {
|
|
3261
3261
|
i6.push(e7.value), n6 && n6(e7), o5 = r6;
|
|
3262
3262
|
continue;
|
|
@@ -3266,30 +3266,30 @@ function Di(e6, t5, n6) {
|
|
|
3266
3266
|
continue;
|
|
3267
3267
|
}
|
|
3268
3268
|
if ("sequence" === e7.type) {
|
|
3269
|
-
o5 =
|
|
3269
|
+
o5 = Ai(e7.value, 0, r6);
|
|
3270
3270
|
continue;
|
|
3271
3271
|
}
|
|
3272
3272
|
if (i6.length > 0) return { ids: i6, then: o5 };
|
|
3273
3273
|
if ("stop" === e7.type) return n6 && n6(e7), { ids: [], stop: true };
|
|
3274
3274
|
if ("gate" === e7.type) {
|
|
3275
|
-
o5 = t5.gate(e7) ?
|
|
3275
|
+
o5 = t5.gate(e7) ? Ai([e7.next], 0, r6) : r6;
|
|
3276
3276
|
continue;
|
|
3277
3277
|
}
|
|
3278
3278
|
if ("one" === e7.type) {
|
|
3279
3279
|
const n7 = e7.routes.length > 0 ? t5.one(e7.routes) : -1;
|
|
3280
|
-
o5 = n7 >= 0 ?
|
|
3280
|
+
o5 = n7 >= 0 ? Ai([e7.routes[n7].next], 0, r6) : r6;
|
|
3281
3281
|
continue;
|
|
3282
3282
|
}
|
|
3283
3283
|
const s6 = e7.routes.length > 0 ? t5.many(e7.routes) : [];
|
|
3284
3284
|
if (0 !== s6.length) {
|
|
3285
|
-
if (1 !== s6.length) return { ids: [], forks: s6.map((t6) =>
|
|
3286
|
-
o5 =
|
|
3285
|
+
if (1 !== s6.length) return { ids: [], forks: s6.map((t6) => Ai([e7.routes[t6].next], 0, r6)) };
|
|
3286
|
+
o5 = Ai([e7.routes[s6[0]].next], 0, r6);
|
|
3287
3287
|
} else o5 = r6;
|
|
3288
3288
|
}
|
|
3289
3289
|
return { ids: i6 };
|
|
3290
3290
|
}
|
|
3291
|
-
function
|
|
3292
|
-
return
|
|
3291
|
+
function Mi(e6, t5) {
|
|
3292
|
+
return Ri(Ti(e6), /* @__PURE__ */ (function(e7) {
|
|
3293
3293
|
return { gate: (t6) => t6.match(e7), one: (t6) => t6.findIndex((t7) => t7.match(e7)), many: (t6) => {
|
|
3294
3294
|
const n6 = [];
|
|
3295
3295
|
return t6.forEach((t7, i6) => {
|
|
@@ -3298,39 +3298,39 @@ function Ii(e6, t5) {
|
|
|
3298
3298
|
} };
|
|
3299
3299
|
})(t5));
|
|
3300
3300
|
}
|
|
3301
|
-
function
|
|
3301
|
+
function Ji(e6) {
|
|
3302
3302
|
return null == e6 ? [] : [{ route: e6, ancestry: [] }];
|
|
3303
3303
|
}
|
|
3304
|
-
function
|
|
3304
|
+
function Fi(e6, t5, n6) {
|
|
3305
3305
|
if (e6.at >= e6.ids.length) return { rest: t5 };
|
|
3306
3306
|
const i6 = e6.ids[e6.at], o5 = e6.at + 1 < e6.ids.length ? [{ ids: e6.ids, at: e6.at + 1, ancestry: e6.ancestry }, ...t5] : t5;
|
|
3307
3307
|
if (e6.ancestry.includes(i6)) return { rest: o5 };
|
|
3308
3308
|
const r6 = [...e6.ancestry, i6], s6 = n6[i6], a5 = s6 ? s6.config.next : void 0;
|
|
3309
3309
|
return { id: i6, ancestry: r6, rest: void 0 === a5 ? o5 : [{ route: a5, ancestry: r6 }, ...o5] };
|
|
3310
3310
|
}
|
|
3311
|
-
function
|
|
3311
|
+
function Ni(e6, t5, n6) {
|
|
3312
3312
|
if (e6.stop) return t5.length > 0 ? { kind: "stop", owner: t5[t5.length - 1] } : { kind: "stop" };
|
|
3313
3313
|
if (e6.forks) return { kind: "fork", branches: e6.forks.map((e7) => [{ route: e7, ancestry: t5 }, ...n6]) };
|
|
3314
3314
|
const i6 = [];
|
|
3315
3315
|
return e6.ids.length > 0 && i6.push({ ids: e6.ids, at: 0, ancestry: t5 }), e6.then && i6.push({ route: e6.then, ancestry: t5 }), { kind: "stack", stack: [...i6, ...n6] };
|
|
3316
3316
|
}
|
|
3317
|
-
function
|
|
3317
|
+
function zi(e6, t5, n6) {
|
|
3318
3318
|
let i6 = e6;
|
|
3319
3319
|
for (; i6.length > 0; ) {
|
|
3320
3320
|
const [e7, ...o5] = i6;
|
|
3321
3321
|
if ("ids" in e7) {
|
|
3322
|
-
const t6 =
|
|
3322
|
+
const t6 = Fi(e7, o5, n6);
|
|
3323
3323
|
if (void 0 !== t6.id) return { kind: "run", id: t6.id, rest: t6.rest, ancestry: t6.ancestry };
|
|
3324
3324
|
i6 = t6.rest;
|
|
3325
3325
|
continue;
|
|
3326
3326
|
}
|
|
3327
|
-
const r6 =
|
|
3327
|
+
const r6 = Ni(Mi(e7.route, t5), e7.ancestry, o5);
|
|
3328
3328
|
if ("stack" !== r6.kind) return r6;
|
|
3329
3329
|
i6 = r6.stack;
|
|
3330
3330
|
}
|
|
3331
3331
|
return { kind: "done" };
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3333
|
+
function _i(e6, t5 = {}) {
|
|
3334
3334
|
const n6 = [], i6 = /* @__PURE__ */ new Map(), o5 = /* @__PURE__ */ new Set(), r6 = /* @__PURE__ */ new WeakMap(), s6 = /* @__PURE__ */ new WeakMap();
|
|
3335
3335
|
let a5 = 0;
|
|
3336
3336
|
const c3 = (e7) => {
|
|
@@ -3356,7 +3356,7 @@ function Mi(e6, t5 = {}) {
|
|
|
3356
3356
|
}
|
|
3357
3357
|
const n7 = e7.route;
|
|
3358
3358
|
if ("string" == typeof n7) return `s${n7}/${t6}`;
|
|
3359
|
-
let i7 = "", o6 =
|
|
3359
|
+
let i7 = "", o6 = Ti(n7);
|
|
3360
3360
|
for (; o6; ) i7 += `${c3(o6.segments)}@${o6.at};`, o6 = o6.tail;
|
|
3361
3361
|
return `r${i7}/${t6}`;
|
|
3362
3362
|
}, u4 = (e7, n7, i7) => {
|
|
@@ -3365,7 +3365,7 @@ function Mi(e6, t5 = {}) {
|
|
|
3365
3365
|
if (o5.add(s7), 0 === e7.length) return;
|
|
3366
3366
|
const [a6, ...f4] = e7;
|
|
3367
3367
|
if ("ids" in a6) {
|
|
3368
|
-
const e8 =
|
|
3368
|
+
const e8 = Fi(a6, f4, t5);
|
|
3369
3369
|
if (void 0 === e8.id) return void u4(e8.rest, n7, i7);
|
|
3370
3370
|
const o6 = (r6.get(a6.ids) ?? [])[a6.at];
|
|
3371
3371
|
if (!o6) return;
|
|
@@ -3386,7 +3386,7 @@ function Mi(e6, t5 = {}) {
|
|
|
3386
3386
|
const r7 = [], s8 = (e10) => {
|
|
3387
3387
|
let t7 = 0;
|
|
3388
3388
|
return o6 < i8.length ? t7 = i8[o6] : r7.push(e10), o6++, t7;
|
|
3389
|
-
}, a7 = (e10) => e10.some((e11) => void 0 === e11.source), c4 = [], l5 =
|
|
3389
|
+
}, a7 = (e10) => e10.some((e11) => void 0 === e11.source), c4 = [], l5 = Ri(e9, { gate: () => 0 === s8(2), one: (e10) => {
|
|
3390
3390
|
const t7 = e10.map((e11, t8) => t8);
|
|
3391
3391
|
return a7(e10) || t7.push(-1), t7[s8(t7.length)];
|
|
3392
3392
|
}, many: (e10) => {
|
|
@@ -3401,7 +3401,7 @@ function Mi(e6, t5 = {}) {
|
|
|
3401
3401
|
}
|
|
3402
3402
|
};
|
|
3403
3403
|
return n8([]), t6;
|
|
3404
|
-
})(
|
|
3404
|
+
})(Ti(a6.route))) {
|
|
3405
3405
|
const { steps: t6 } = e8, i8 = [];
|
|
3406
3406
|
let o6 = n7;
|
|
3407
3407
|
for (const t7 of e8.visited) if ("stop" !== t7.type) if ("static" === t7.type) i8.push(t7), o6 = t7.value;
|
|
@@ -3412,30 +3412,30 @@ function Mi(e6, t5 = {}) {
|
|
|
3412
3412
|
}
|
|
3413
3413
|
else d3(n7, t7.label, c3(t7), m4, void 0);
|
|
3414
3414
|
t6.ids.length > 0 && r6.set(t6.ids, i8);
|
|
3415
|
-
const s8 =
|
|
3415
|
+
const s8 = Ni(t6, a6.ancestry, f4);
|
|
3416
3416
|
if ("stop" !== s8.kind) if ("fork" !== s8.kind) u4(s8.stack, n7, void 0);
|
|
3417
3417
|
else for (const e9 of s8.branches) u4(e9, n7, void 0);
|
|
3418
3418
|
}
|
|
3419
3419
|
};
|
|
3420
|
-
return u4(
|
|
3420
|
+
return u4(Ji(e6), void 0, void 0), n6;
|
|
3421
3421
|
}
|
|
3422
|
-
function
|
|
3422
|
+
function Li(e6) {
|
|
3423
3423
|
throw new Error(String(e6));
|
|
3424
3424
|
}
|
|
3425
|
-
function
|
|
3425
|
+
function Vi(e6, t5) {
|
|
3426
3426
|
const n6 = false !== t5?.stripAnnotations, i6 = {}, o5 = /* @__PURE__ */ new Set();
|
|
3427
3427
|
function r6(t6) {
|
|
3428
3428
|
if (i6[t6]) return i6[t6];
|
|
3429
|
-
o5.has(t6) &&
|
|
3429
|
+
o5.has(t6) && Li(`Circular extend chain detected: ${[...o5, t6].join(" \u2192 ")}`);
|
|
3430
3430
|
const s6 = e6[t6];
|
|
3431
|
-
s6 ||
|
|
3431
|
+
s6 || Li(`Contract "${t6}" not found`), o5.add(t6);
|
|
3432
3432
|
let a5 = {};
|
|
3433
3433
|
if (s6.extend) {
|
|
3434
3434
|
a5 = (function(e7, t7) {
|
|
3435
3435
|
const n7 = {};
|
|
3436
3436
|
void 0 === e7.tagging && void 0 === t7.tagging || (n7.tagging = t7.tagging ?? e7.tagging);
|
|
3437
3437
|
void 0 === e7.description && void 0 === t7.description || (n7.description = t7.description ?? e7.description);
|
|
3438
|
-
e7.schema && t7.schema ? n7.schema =
|
|
3438
|
+
e7.schema && t7.schema ? n7.schema = Hi(e7.schema, t7.schema) : (e7.schema || t7.schema) && (n7.schema = { ...e7.schema || t7.schema });
|
|
3439
3439
|
if (e7.events || t7.events) {
|
|
3440
3440
|
const i7 = {}, o6 = /* @__PURE__ */ new Set([...Object.keys(e7.events || {}), ...Object.keys(t7.events || {})]);
|
|
3441
3441
|
for (const n8 of o6) {
|
|
@@ -3443,7 +3443,7 @@ function qi(e6, t5) {
|
|
|
3443
3443
|
i7[n8] = {};
|
|
3444
3444
|
for (const e8 of s7) {
|
|
3445
3445
|
const t8 = o7[e8], s8 = r7[e8];
|
|
3446
|
-
i7[n8][e8] = t8 && s8 ?
|
|
3446
|
+
i7[n8][e8] = t8 && s8 ? Hi(t8, s8) : { ...t8 || s8 };
|
|
3447
3447
|
}
|
|
3448
3448
|
}
|
|
3449
3449
|
n7.events = i7;
|
|
@@ -3458,13 +3458,13 @@ function qi(e6, t5) {
|
|
|
3458
3458
|
for (const i7 of Object.keys(e7[n7] || {})) {
|
|
3459
3459
|
let o6 = {};
|
|
3460
3460
|
const r7 = e7["*"]?.["*"];
|
|
3461
|
-
r7 && (o6 =
|
|
3461
|
+
r7 && (o6 = Hi(o6, r7));
|
|
3462
3462
|
const s7 = e7["*"]?.[i7];
|
|
3463
|
-
s7 && "*" !== i7 && (o6 =
|
|
3463
|
+
s7 && "*" !== i7 && (o6 = Hi(o6, s7));
|
|
3464
3464
|
const a6 = e7[n7]?.["*"];
|
|
3465
|
-
a6 && "*" !== i7 && (o6 =
|
|
3465
|
+
a6 && "*" !== i7 && (o6 = Hi(o6, a6));
|
|
3466
3466
|
const c3 = e7[n7]?.[i7];
|
|
3467
|
-
c3 && (o6 =
|
|
3467
|
+
c3 && (o6 = Hi(o6, c3)), t7[n7][i7] = o6;
|
|
3468
3468
|
}
|
|
3469
3469
|
}
|
|
3470
3470
|
e7["*"] && (t7["*"] = { ...e7["*"] });
|
|
@@ -3473,7 +3473,7 @@ function qi(e6, t5) {
|
|
|
3473
3473
|
const e7 = {};
|
|
3474
3474
|
for (const [t7, n7] of Object.entries(a5.events)) {
|
|
3475
3475
|
e7[t7] = {};
|
|
3476
|
-
for (const [i7, o6] of Object.entries(n7)) e7[t7][i7] =
|
|
3476
|
+
for (const [i7, o6] of Object.entries(n7)) e7[t7][i7] = Zi(o6);
|
|
3477
3477
|
}
|
|
3478
3478
|
a5.events = e7;
|
|
3479
3479
|
}
|
|
@@ -3482,28 +3482,28 @@ function qi(e6, t5) {
|
|
|
3482
3482
|
for (const t6 of Object.keys(e6)) r6(t6);
|
|
3483
3483
|
return i6;
|
|
3484
3484
|
}
|
|
3485
|
-
function
|
|
3485
|
+
function Hi(e6, t5) {
|
|
3486
3486
|
const n6 = { ...e6 };
|
|
3487
3487
|
for (const i6 of Object.keys(t5)) {
|
|
3488
3488
|
const o5 = e6[i6], r6 = t5[i6];
|
|
3489
|
-
"required" === i6 && Array.isArray(o5) && Array.isArray(r6) ? n6[i6] = [.../* @__PURE__ */ new Set([...o5, ...r6])] :
|
|
3489
|
+
"required" === i6 && Array.isArray(o5) && Array.isArray(r6) ? n6[i6] = [.../* @__PURE__ */ new Set([...o5, ...r6])] : Ki(o5) && Ki(r6) ? n6[i6] = Hi(o5, r6) : n6[i6] = r6;
|
|
3490
3490
|
}
|
|
3491
3491
|
return n6;
|
|
3492
3492
|
}
|
|
3493
|
-
function
|
|
3493
|
+
function Zi(e6) {
|
|
3494
3494
|
const t5 = {};
|
|
3495
|
-
for (const [n6, i6] of Object.entries(e6))
|
|
3495
|
+
for (const [n6, i6] of Object.entries(e6)) qi.has(n6) || (Bi.has(n6) && Ki(i6) ? t5[n6] = Gi(i6) : Ui.has(n6) && Array.isArray(i6) ? t5[n6] = i6.map((e7) => Ki(e7) ? Zi(e7) : e7) : Wi.has(n6) && Ki(i6) ? t5[n6] = Zi(i6) : t5[n6] = i6);
|
|
3496
3496
|
return t5;
|
|
3497
3497
|
}
|
|
3498
|
-
function
|
|
3498
|
+
function Gi(e6) {
|
|
3499
3499
|
const t5 = {};
|
|
3500
|
-
for (const [n6, i6] of Object.entries(e6)) t5[n6] =
|
|
3500
|
+
for (const [n6, i6] of Object.entries(e6)) t5[n6] = Ki(i6) ? Zi(i6) : i6;
|
|
3501
3501
|
return t5;
|
|
3502
3502
|
}
|
|
3503
|
-
function
|
|
3503
|
+
function Ki(e6) {
|
|
3504
3504
|
return "object" == typeof e6 && null !== e6 && !Array.isArray(e6);
|
|
3505
3505
|
}
|
|
3506
|
-
function
|
|
3506
|
+
function Yi(e6, t5) {
|
|
3507
3507
|
let n6;
|
|
3508
3508
|
try {
|
|
3509
3509
|
n6 = JSON.parse(e6);
|
|
@@ -3512,7 +3512,7 @@ function Vi(e6, t5) {
|
|
|
3512
3512
|
if (e7 instanceof SyntaxError) {
|
|
3513
3513
|
const n8 = e7.message.match(/position\s+(\d+)/);
|
|
3514
3514
|
if (n8) {
|
|
3515
|
-
return
|
|
3515
|
+
return So2(t7, parseInt(n8[1], 10));
|
|
3516
3516
|
}
|
|
3517
3517
|
const i8 = e7.message.match(/line\s+(\d+)\s+column\s+(\d+)/);
|
|
3518
3518
|
if (i8) return { line: parseInt(i8[1], 10), column: parseInt(i8[2], 10) };
|
|
@@ -3521,45 +3521,45 @@ function Vi(e6, t5) {
|
|
|
3521
3521
|
})(t6, e6);
|
|
3522
3522
|
return { valid: false, errors: [{ message: t6 instanceof Error ? t6.message : "Invalid JSON", severity: "error", line: n7, column: i7 }], warnings: [] };
|
|
3523
3523
|
}
|
|
3524
|
-
const i6 = [], o5 = [], r6 =
|
|
3524
|
+
const i6 = [], o5 = [], r6 = Gn3.safeParse(n6);
|
|
3525
3525
|
if (!r6.success) for (const t6 of r6.error.issues) {
|
|
3526
|
-
const n7 = t6.path.join("."), o6 =
|
|
3526
|
+
const n7 = t6.path.join("."), o6 = ko(e6, t6.path);
|
|
3527
3527
|
i6.push({ message: t6.message, severity: "error", path: n7 || "root", ...o6 });
|
|
3528
3528
|
}
|
|
3529
3529
|
const s6 = (function(e7) {
|
|
3530
|
-
if (!(
|
|
3530
|
+
if (!(Ao(e7) && "version" in e7 && "flows" in e7 && Ao(e7.flows))) return;
|
|
3531
3531
|
const t6 = {}, n7 = [], i7 = [], o6 = [], r7 = [], s7 = [], a5 = [];
|
|
3532
3532
|
let c3;
|
|
3533
3533
|
const l4 = Object.keys(e7.flows);
|
|
3534
|
-
|
|
3535
|
-
if (!
|
|
3534
|
+
To(t6, e7.variables), (function(e8, t7) {
|
|
3535
|
+
if (!Ao(t7)) return;
|
|
3536
3536
|
let n8;
|
|
3537
3537
|
try {
|
|
3538
|
-
n8 =
|
|
3538
|
+
n8 = Vi(t7, { stripAnnotations: false });
|
|
3539
3539
|
} catch {
|
|
3540
3540
|
return;
|
|
3541
3541
|
}
|
|
3542
3542
|
for (const t8 of Object.values(n8)) {
|
|
3543
3543
|
const n9 = t8.events;
|
|
3544
|
-
if (
|
|
3545
|
-
if (!
|
|
3544
|
+
if (Ao(n9)) for (const [t9, i8] of Object.entries(n9)) {
|
|
3545
|
+
if (!Ao(i8)) continue;
|
|
3546
3546
|
let n10 = e8.find((e9) => e9.entity === t9);
|
|
3547
3547
|
n10 || (n10 = { entity: t9, actions: [], properties: {} }, e8.push(n10)), n10.properties || (n10.properties = {});
|
|
3548
|
-
for (const [e9, t10] of Object.entries(i8)) n10.actions.includes(e9) || n10.actions.push(e9), n10.properties[e9] =
|
|
3548
|
+
for (const [e9, t10] of Object.entries(i8)) n10.actions.includes(e9) || n10.actions.push(e9), n10.properties[e9] = Ro(t10);
|
|
3549
3549
|
}
|
|
3550
3550
|
}
|
|
3551
3551
|
})(a5, e7.contract);
|
|
3552
|
-
for (const a6 of Object.values(e7.flows)) if (
|
|
3552
|
+
for (const a6 of Object.values(e7.flows)) if (Ao(a6)) {
|
|
3553
3553
|
if (!c3) {
|
|
3554
3554
|
const e8 = a6.config;
|
|
3555
|
-
!
|
|
3555
|
+
!Ao(e8) || "web" !== e8.platform && "server" !== e8.platform || (c3 = e8.platform);
|
|
3556
3556
|
}
|
|
3557
|
-
|
|
3557
|
+
To(t6, a6.variables);
|
|
3558
3558
|
for (const e8 of ["sources", "destinations", "transformers"]) {
|
|
3559
3559
|
const r8 = "sources" === e8 ? "source" : "destinations" === e8 ? "destination" : "transformer", l5 = "sources" === e8 ? n7 : "destinations" === e8 ? i7 : o6;
|
|
3560
|
-
if (
|
|
3560
|
+
if (Ao(a6[e8])) for (const [n8, i8] of Object.entries(a6[e8])) l5.push(n8), Ao(i8) && (To(t6, i8.variables), "string" == typeof i8.package && s7.push({ package: i8.package, shortName: n8, type: r8, platform: c3 || "web" }));
|
|
3561
3561
|
}
|
|
3562
|
-
if (
|
|
3562
|
+
if (Ao(a6.stores)) for (const [e8, n8] of Object.entries(a6.stores)) r7.push(e8), Ao(n8) && To(t6, n8.variables);
|
|
3563
3563
|
}
|
|
3564
3564
|
const d3 = { variables: t6, stepNames: { sources: n7, destinations: i7, transformers: o6, stores: r7 }, flowNames: l4 };
|
|
3565
3565
|
c3 && (d3.platform = c3);
|
|
@@ -3584,79 +3584,79 @@ function Vi(e6, t5) {
|
|
|
3584
3584
|
if (o7++, "object" === s7?.kind && s7.expectKey) {
|
|
3585
3585
|
const t9 = JSON.parse(e9.slice(n10, o7));
|
|
3586
3586
|
s7.key = "string" == typeof t9 ? t9 : "";
|
|
3587
|
-
} else t8.set(
|
|
3587
|
+
} else t8.set(so(i9()), { start: n10, end: o7 });
|
|
3588
3588
|
} else o7++;
|
|
3589
3589
|
}
|
|
3590
3590
|
return t8;
|
|
3591
3591
|
})(e8), i8 = [];
|
|
3592
|
-
return
|
|
3593
|
-
if (
|
|
3594
|
-
const r8 = n8.get(
|
|
3592
|
+
return uo(t7, [], (t8, o7) => {
|
|
3593
|
+
if (po2(o7)) return;
|
|
3594
|
+
const r8 = n8.get(so(o7));
|
|
3595
3595
|
r8 && i8.push({ path: o7, raw: e8.slice(r8.start + 1, r8.end - 1), offset: r8.start + 1 });
|
|
3596
3596
|
}), i8;
|
|
3597
3597
|
})(e7, t6);
|
|
3598
3598
|
(function(e8, t7, n8) {
|
|
3599
|
-
|
|
3599
|
+
ro2(t7, no, (t8, i8, o7) => {
|
|
3600
3600
|
const r8 = t8[0], s7 = t8[1], a5 = t8[2];
|
|
3601
|
-
n8.push({ message: `Malformed reference "${r8}", use a dot, not a colon: "$${s7}.${a5}".`, severity: "warning", path: i8.path.join("."), ...
|
|
3601
|
+
n8.push({ message: `Malformed reference "${r8}", use a dot, not a colon: "$${s7}.${a5}".`, severity: "warning", path: i8.path.join("."), ...wo3(e8, o7, r8.length) });
|
|
3602
3602
|
});
|
|
3603
3603
|
})(e7, r7, o6), (function(e8, t7, n8, i8, o7) {
|
|
3604
|
-
|
|
3604
|
+
ro2(n8, oo, (n9, r8, s7) => {
|
|
3605
3605
|
const a5 = (function(e9, t8, n10) {
|
|
3606
|
-
if ("flows" !== t8[0] || !
|
|
3606
|
+
if ("flows" !== t8[0] || !Ao(e9) || !Ao(e9.flows)) return n10.variables ?? {};
|
|
3607
3607
|
const i9 = {};
|
|
3608
|
-
|
|
3608
|
+
To(i9, e9.variables);
|
|
3609
3609
|
const o8 = e9.flows[t8[1]];
|
|
3610
|
-
if (!
|
|
3611
|
-
|
|
3610
|
+
if (!Ao(o8)) return i9;
|
|
3611
|
+
To(i9, o8.variables);
|
|
3612
3612
|
const r9 = o8[t8[2]];
|
|
3613
|
-
if (
|
|
3613
|
+
if (lo3.includes(t8[2]) && Ao(r9)) {
|
|
3614
3614
|
const e10 = r9[t8[3]];
|
|
3615
|
-
|
|
3615
|
+
Ao(e10) && To(i9, e10.variables);
|
|
3616
3616
|
}
|
|
3617
3617
|
return i9;
|
|
3618
3618
|
})(t7, r8.path, i8);
|
|
3619
|
-
n9[1] in a5 || o7.push({ message: `Unknown variable "$var.${n9[1]}". Defined: ${Object.keys(a5).join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...
|
|
3619
|
+
n9[1] in a5 || o7.push({ message: `Unknown variable "$var.${n9[1]}". Defined: ${Object.keys(a5).join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...wo3(e8, s7, n9[0].length) });
|
|
3620
3620
|
});
|
|
3621
3621
|
})(e7, t6, r7, n7, o6), (function(e8, t7, n8, i8, o7) {
|
|
3622
|
-
|
|
3622
|
+
ro2(n8, Xi, (n9, r8, s7) => {
|
|
3623
3623
|
const a5 = (function(e9, t8, n10) {
|
|
3624
|
-
if ("flows" !== t8[0] || !
|
|
3624
|
+
if ("flows" !== t8[0] || !Ao(e9) || !Ao(e9.flows)) return n10.stepNames?.stores ?? [];
|
|
3625
3625
|
const i9 = e9.flows[t8[1]];
|
|
3626
|
-
return
|
|
3626
|
+
return Ao(i9) && Ao(i9.stores) ? Object.keys(i9.stores) : [];
|
|
3627
3627
|
})(t7, r8.path, i8);
|
|
3628
|
-
a5.includes(n9[1]) || o7.push({ message: `Unknown store "$store.${n9[1]}". Defined: ${a5.join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...
|
|
3628
|
+
a5.includes(n9[1]) || o7.push({ message: `Unknown store "$store.${n9[1]}". Defined: ${a5.join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...wo3(e8, s7, n9[0].length) });
|
|
3629
3629
|
});
|
|
3630
3630
|
})(e7, t6, r7, n7, o6), (function(e8, t7, n8) {
|
|
3631
|
-
|
|
3632
|
-
const r8 = t8[0], s7 = t8[1], a5 = t8[2], c3 =
|
|
3631
|
+
ro2(t7, eo2, (t8, i8, o7) => {
|
|
3632
|
+
const r8 = t8[0], s7 = t8[1], a5 = t8[2], c3 = wo3(e8, o7, r8.length), l4 = i8.path.join(".");
|
|
3633
3633
|
a5 ? n8.push({ message: `Malformed $env reference "${r8}". Use ":" for default values, not "=" (e.g., "$env.${s7}:fallback").`, severity: "warning", path: l4, ...c3 }) : /^[A-Z][A-Z0-9_]*$/.test(s7) || n8.push({ message: `$env.${s7} should use UPPER_SNAKE_CASE by convention (e.g., $env.${s7.toUpperCase()}).`, severity: "warning", path: l4, ...c3 });
|
|
3634
3634
|
});
|
|
3635
3635
|
})(e7, r7, o6), (function(e8, t7, n8, i8) {
|
|
3636
3636
|
const o7 = n8.flowNames ?? [];
|
|
3637
3637
|
if (0 === o7.length) return;
|
|
3638
|
-
|
|
3638
|
+
ro2(t7, to, (t8, n9, r8) => {
|
|
3639
3639
|
const s7 = t8[0], a5 = t8[1];
|
|
3640
|
-
o7.includes(a5) || i8.push({ message: `Unknown flow "$flow.${a5}". Defined: ${o7.join(", ")}`, severity: "warning", path: n9.path.join("."), ...
|
|
3640
|
+
o7.includes(a5) || i8.push({ message: `Unknown flow "$flow.${a5}". Defined: ${o7.join(", ")}`, severity: "warning", path: n9.path.join("."), ...wo3(e8, r8, s7.length) });
|
|
3641
3641
|
});
|
|
3642
3642
|
})(e7, r7, n7, o6), (function(e8, t7, n8, i8, o7) {
|
|
3643
3643
|
const r8 = n8.secrets;
|
|
3644
|
-
if (!
|
|
3644
|
+
if (!Ao(t7) || !Ao(t7.flows)) return;
|
|
3645
3645
|
for (const [n9, s7] of Object.entries(t7.flows)) {
|
|
3646
|
-
if (!
|
|
3647
|
-
const t8 = s7.config, a5 = !
|
|
3648
|
-
|
|
3649
|
-
if (
|
|
3646
|
+
if (!Ao(s7)) continue;
|
|
3647
|
+
const t8 = s7.config, a5 = !Ao(t8) || "web" !== t8.platform && "server" !== t8.platform ? void 0 : t8.platform;
|
|
3648
|
+
uo(s7, ["flows", n9], (t9, n10) => {
|
|
3649
|
+
if (po2(n10)) return;
|
|
3650
3650
|
let s8;
|
|
3651
|
-
for (
|
|
3652
|
-
const t10 = s8[0], n11 = s8[1], c3 = e8.indexOf(t10), l4 = -1 === c3 ? { line: 1, column: 1 } :
|
|
3651
|
+
for (io.lastIndex = 0; null !== (s8 = io.exec(t9)); ) {
|
|
3652
|
+
const t10 = s8[0], n11 = s8[1], c3 = e8.indexOf(t10), l4 = -1 === c3 ? { line: 1, column: 1 } : wo3(e8, c3, t10.length);
|
|
3653
3653
|
"web" !== a5 ? r8 && !r8.includes(n11) && o7.push({ message: `Unknown secret "$secret.${n11}"; not in the project's registered secrets.`, severity: "warning", path: t10, ...l4 }) : i8.push({ message: `Secret "$secret.${n11}" cannot be used in a web flow: secrets are never sent to the browser; use a server flow.`, severity: "error", path: t10, ...l4 });
|
|
3654
3654
|
}
|
|
3655
3655
|
});
|
|
3656
3656
|
}
|
|
3657
3657
|
})(e7, t6, n7, i7, o6), (function(e8, t7, n8) {
|
|
3658
|
-
|
|
3659
|
-
if (!t8.startsWith(
|
|
3658
|
+
uo(t7, [], (t8, i8) => {
|
|
3659
|
+
if (!t8.startsWith(Qi) && !po2(i8)) for (const { prefix: o7, regex: r8, grammar: s7 } of ao2) {
|
|
3660
3660
|
if (!t8.includes(o7)) continue;
|
|
3661
3661
|
const a5 = o7.slice(0, -1);
|
|
3662
3662
|
let c3;
|
|
@@ -3665,247 +3665,247 @@ function Vi(e6, t5) {
|
|
|
3665
3665
|
c3 = `"${t8}" does not match the ${a5}.NAME grammar (${s7}); it would not resolve. To build a longer string, compose with $var or $env.`;
|
|
3666
3666
|
} else c3 = `"${t8}" uses ${o7} inline. ${o7} references resolve only as the whole value; it would ship as literal text. Use the reference as the entire value, or compose strings with $var or $env.`;
|
|
3667
3667
|
const l4 = JSON.stringify(t8), d3 = e8.indexOf(l4);
|
|
3668
|
-
n8.push({ message: c3, severity: "warning", path: i8.join("."), ...-1 === d3 ? { line: 1, column: 1 } :
|
|
3668
|
+
n8.push({ message: c3, severity: "warning", path: i8.join("."), ...-1 === d3 ? { line: 1, column: 1 } : wo3(e8, d3, l4.length) });
|
|
3669
3669
|
}
|
|
3670
3670
|
});
|
|
3671
3671
|
})(e7, t6, o6);
|
|
3672
3672
|
})(e6, n6, s6, i6, o5)), (function(e7, t6, n7) {
|
|
3673
|
-
if (!
|
|
3674
|
-
const i7 =
|
|
3673
|
+
if (!Ao(t6)) return;
|
|
3674
|
+
const i7 = Bn3.safeParse(t6.contract);
|
|
3675
3675
|
if (void 0 === t6.contract || !i7.success) return;
|
|
3676
3676
|
try {
|
|
3677
|
-
|
|
3677
|
+
Vi(i7.data);
|
|
3678
3678
|
} catch (t7) {
|
|
3679
|
-
n7.push({ message: `Contract does not resolve: ${t7 instanceof Error ? t7.message : String(t7)}`, severity: "error", path: "contract", ...
|
|
3679
|
+
n7.push({ message: `Contract does not resolve: ${t7 instanceof Error ? t7.message : String(t7)}`, severity: "error", path: "contract", ...yo2(e7, "contract") });
|
|
3680
3680
|
}
|
|
3681
3681
|
})(e6, n6, i6), (function(e7, t6, n7) {
|
|
3682
|
-
if (!
|
|
3682
|
+
if (!Ao(t6) || !Ao(t6.flows)) return;
|
|
3683
3683
|
for (const i7 of Object.values(t6.flows)) {
|
|
3684
|
-
if (!
|
|
3685
|
-
const t7 =
|
|
3686
|
-
t7 &&
|
|
3684
|
+
if (!Ao(i7)) continue;
|
|
3685
|
+
const t7 = Ao(i7.stores) ? i7.stores : void 0;
|
|
3686
|
+
t7 && bo2(e7, t7, n7), t7 && Ao(i7.transformers) && vo2(e7, i7.transformers, t7, n7);
|
|
3687
3687
|
}
|
|
3688
3688
|
})(e6, n6, o5), (function(e7, t6, n7) {
|
|
3689
|
-
if (!
|
|
3689
|
+
if (!Ao(t6) || !Ao(t6.flows)) return;
|
|
3690
3690
|
const i7 = (t7, i8, o7) => {
|
|
3691
|
-
n7.push({ message: o7, severity: "error", path: i8.join("."), ...
|
|
3691
|
+
n7.push({ message: o7, severity: "error", path: i8.join("."), ...yo2(e7, t7) });
|
|
3692
3692
|
}, o6 = (e8, t7) => {
|
|
3693
3693
|
e8.startsWith("ingest.") && i7(e8, t7, `Mapping values resolve against the event, so "${e8}" never resolves here. Copy it onto the event in an earlier step, then map the event path.`);
|
|
3694
3694
|
}, r7 = (e8, t7) => (n8, o7) => {
|
|
3695
3695
|
e8.test(n8) || i7(n8, o7, `Cache keys and route matchers resolve against { event, ingest }: "${n8}" needs an ${t7} prefix.`);
|
|
3696
|
-
}, s7 = r7(
|
|
3697
|
-
for (const [e8, n8] of Object.entries(t6.flows)) if (
|
|
3698
|
-
for (const t7 of
|
|
3696
|
+
}, s7 = r7(Co2, '"event." or "ingest."'), a5 = r7(xo2, '"event.", "ingest." or "cache."');
|
|
3697
|
+
for (const [e8, n8] of Object.entries(t6.flows)) if (Ao(n8)) {
|
|
3698
|
+
for (const t7 of jo2) {
|
|
3699
3699
|
const i8 = n8[t7];
|
|
3700
|
-
if (
|
|
3701
|
-
if (!
|
|
3700
|
+
if (Ao(i8)) for (const [n9, r8] of Object.entries(i8)) {
|
|
3701
|
+
if (!Ao(r8)) continue;
|
|
3702
3702
|
const i9 = ["flows", e8, t7, n9];
|
|
3703
|
-
|
|
3703
|
+
Do(r8.before, [...i9, "before"], s7), Do(r8.next, [...i9, "next"], s7), Po(r8.cache, [...i9, "cache"], s7, a5), "transformers" !== t7 && Ao(r8.config) && Eo2(r8.config, [...i9, "config"], o6);
|
|
3704
3704
|
}
|
|
3705
3705
|
}
|
|
3706
|
-
|
|
3706
|
+
Ao(n8.collector) && Do(n8.collector.next, ["flows", e8, "collector", "next"], s7);
|
|
3707
3707
|
}
|
|
3708
3708
|
})(e6, n6, i6), { valid: 0 === i6.length, errors: i6, warnings: o5, context: s6 };
|
|
3709
3709
|
}
|
|
3710
|
-
function
|
|
3710
|
+
function ro2(e6, t5, n6) {
|
|
3711
3711
|
for (const i6 of e6) {
|
|
3712
3712
|
let e7;
|
|
3713
3713
|
for (t5.lastIndex = 0; null !== (e7 = t5.exec(i6.raw)); ) n6(e7, i6, i6.offset + e7.index);
|
|
3714
3714
|
}
|
|
3715
3715
|
}
|
|
3716
|
-
function
|
|
3716
|
+
function so(e6) {
|
|
3717
3717
|
return JSON.stringify(e6);
|
|
3718
3718
|
}
|
|
3719
|
-
function
|
|
3719
|
+
function po2(e6) {
|
|
3720
3720
|
const t5 = e6[e6.length - 1];
|
|
3721
|
-
return "$comment" === t5 || ("contract" === e6[0] || (!("flows" !== e6[0] || !
|
|
3721
|
+
return "$comment" === t5 || ("contract" === e6[0] || (!("flows" !== e6[0] || !lo3.includes(e6[2]) || "config" !== e6[4] || "settings" !== e6[5] || "contract" !== e6[6]) || !!co.includes(t5) && (1 === e6.length || "flows" === e6[0] && (3 === e6.length || !!lo3.includes(e6[2]) && (5 === e6.length || 7 === e6.length && "examples" === e6[4])))));
|
|
3722
3722
|
}
|
|
3723
|
-
function
|
|
3723
|
+
function uo(e6, t5, n6) {
|
|
3724
3724
|
if ("string" != typeof e6) {
|
|
3725
|
-
if (Array.isArray(e6)) e6.forEach((e7, i6) =>
|
|
3726
|
-
else if (
|
|
3725
|
+
if (Array.isArray(e6)) e6.forEach((e7, i6) => uo(e7, [...t5, String(i6)], n6));
|
|
3726
|
+
else if (Ao(e6)) for (const [i6, o5] of Object.entries(e6)) uo(o5, [...t5, i6], n6);
|
|
3727
3727
|
} else n6(e6, t5);
|
|
3728
3728
|
}
|
|
3729
|
-
function
|
|
3730
|
-
return
|
|
3729
|
+
function ho2(e6) {
|
|
3730
|
+
return Ao(e6.config) && true === e6.config.file;
|
|
3731
3731
|
}
|
|
3732
|
-
function
|
|
3733
|
-
for (const [i6, o5] of Object.entries(t5))
|
|
3732
|
+
function bo2(e6, t5, n6) {
|
|
3733
|
+
for (const [i6, o5] of Object.entries(t5)) Ao(o5) && ho2(o5) && void 0 !== o5.cache && n6.push({ message: `Store "${i6}" sets file: true and cache. The cache holds structured values; caching a byte-serving store offers no benefit. Remove cache or unset file.`, severity: "warning", path: `stores.${i6}`, ...yo2(e6, i6) });
|
|
3734
3734
|
}
|
|
3735
|
-
function
|
|
3735
|
+
function vo2(e6, t5, n6, i6) {
|
|
3736
3736
|
for (const o5 of Object.values(t5)) {
|
|
3737
|
-
if (!
|
|
3738
|
-
if (o5.package !==
|
|
3739
|
-
if (!
|
|
3737
|
+
if (!Ao(o5)) continue;
|
|
3738
|
+
if (o5.package !== mo2) continue;
|
|
3739
|
+
if (!Ao(o5.env)) continue;
|
|
3740
3740
|
const t6 = o5.env.store;
|
|
3741
3741
|
if ("string" != typeof t6) continue;
|
|
3742
|
-
const r6 =
|
|
3742
|
+
const r6 = go2.exec(t6);
|
|
3743
3743
|
if (!r6) continue;
|
|
3744
3744
|
const s6 = r6[1], a5 = n6[s6];
|
|
3745
|
-
if (!
|
|
3745
|
+
if (!Ao(a5)) continue;
|
|
3746
3746
|
const c3 = a5.package;
|
|
3747
|
-
"string" == typeof c3 &&
|
|
3747
|
+
"string" == typeof c3 && fo2.includes(c3) && (ho2(a5) || i6.push({ message: `transformer-file serves byte-exact assets; set config.file: true on store "${s6}".`, severity: "warning", path: `stores.${s6}`, ...yo2(e6, s6) }));
|
|
3748
3748
|
}
|
|
3749
3749
|
}
|
|
3750
|
-
function
|
|
3750
|
+
function yo2(e6, t5) {
|
|
3751
3751
|
const n6 = e6.indexOf(`"${t5}"`);
|
|
3752
|
-
return -1 === n6 ? { line: 1, column: 1 } :
|
|
3752
|
+
return -1 === n6 ? { line: 1, column: 1 } : So2(e6, n6);
|
|
3753
3753
|
}
|
|
3754
|
-
function
|
|
3754
|
+
function So2(e6, t5) {
|
|
3755
3755
|
let n6 = 1, i6 = 1;
|
|
3756
3756
|
for (let o5 = 0; o5 < t5 && o5 < e6.length; o5++) "\n" === e6[o5] ? (n6++, i6 = 1) : i6++;
|
|
3757
3757
|
return { line: n6, column: i6 };
|
|
3758
3758
|
}
|
|
3759
|
-
function
|
|
3760
|
-
const i6 =
|
|
3759
|
+
function wo3(e6, t5, n6) {
|
|
3760
|
+
const i6 = So2(e6, t5), o5 = So2(e6, t5 + n6);
|
|
3761
3761
|
return { line: i6.line, column: i6.column, endLine: o5.line, endColumn: o5.column };
|
|
3762
3762
|
}
|
|
3763
|
-
function
|
|
3763
|
+
function ko(e6, t5) {
|
|
3764
3764
|
if (0 === t5.length) return { line: 1, column: 1 };
|
|
3765
3765
|
const n6 = t5[t5.length - 1];
|
|
3766
3766
|
if ("string" == typeof n6) {
|
|
3767
3767
|
const t6 = `"${n6}"`, i6 = e6.lastIndexOf(t6);
|
|
3768
|
-
if (-1 !== i6) return
|
|
3768
|
+
if (-1 !== i6) return So2(e6, i6);
|
|
3769
3769
|
}
|
|
3770
3770
|
return { line: 1, column: 1 };
|
|
3771
3771
|
}
|
|
3772
|
-
function
|
|
3772
|
+
function $o(e6, t5, n6) {
|
|
3773
3773
|
if ("string" != typeof e6) {
|
|
3774
|
-
if (Array.isArray(e6)) e6.forEach((e7, i6) =>
|
|
3775
|
-
else if (
|
|
3776
|
-
if ("string" == typeof e6.key &&
|
|
3777
|
-
Array.isArray(e6.set) && e6.set.forEach((e7, i6) =>
|
|
3774
|
+
if (Array.isArray(e6)) e6.forEach((e7, i6) => $o(e7, [...t5, i6], n6));
|
|
3775
|
+
else if (Ao(e6)) {
|
|
3776
|
+
if ("string" == typeof e6.key && $o(e6.key, [...t5, "key"], n6), Ao(e6.map)) for (const [i6, o5] of Object.entries(e6.map)) $o(o5, [...t5, "map", i6], n6);
|
|
3777
|
+
Array.isArray(e6.set) && e6.set.forEach((e7, i6) => $o(e7, [...t5, "set", i6], n6)), Array.isArray(e6.loop) && "this" !== e6.loop[0] && $o(e6.loop[0], [...t5, "loop", 0], n6);
|
|
3778
3778
|
}
|
|
3779
3779
|
} else e6.startsWith("$") || n6(e6, t5);
|
|
3780
3780
|
}
|
|
3781
|
-
function
|
|
3782
|
-
if (
|
|
3781
|
+
function Oo2(e6, t5, n6) {
|
|
3782
|
+
if (Ao(e6)) for (const [i6, o5] of Object.entries(e6)) $o(o5, [...t5, i6], n6);
|
|
3783
3783
|
}
|
|
3784
|
-
function
|
|
3785
|
-
if (
|
|
3786
|
-
for (const [i6, o5] of Object.entries(e6.mapping)) if (
|
|
3784
|
+
function Eo2(e6, t5, n6) {
|
|
3785
|
+
if ($o(e6.data, [...t5, "data"], n6), Oo2(e6.policy, [...t5, "policy"], n6), Ao(e6.mapping)) {
|
|
3786
|
+
for (const [i6, o5] of Object.entries(e6.mapping)) if (Ao(o5)) for (const [e7, r6] of Object.entries(o5)) {
|
|
3787
3787
|
const o6 = [...t5, "mapping", i6, e7];
|
|
3788
3788
|
(Array.isArray(r6) ? r6 : [r6]).forEach((e8, t6) => {
|
|
3789
|
-
if (!
|
|
3789
|
+
if (!Ao(e8)) return;
|
|
3790
3790
|
const i7 = Array.isArray(r6) ? [...o6, t6] : o6;
|
|
3791
|
-
|
|
3791
|
+
$o(e8.data, [...i7, "data"], n6), Oo2(e8.policy, [...i7, "policy"], n6), Ao(e8.extend) && ($o(e8.extend.data, [...i7, "extend", "data"], n6), Oo2(e8.extend.policy, [...i7, "extend", "policy"], n6));
|
|
3792
3792
|
});
|
|
3793
3793
|
}
|
|
3794
3794
|
}
|
|
3795
3795
|
}
|
|
3796
|
-
function
|
|
3797
|
-
|
|
3798
|
-
if (!
|
|
3796
|
+
function Po(e6, t5, n6, i6) {
|
|
3797
|
+
Ao(e6) && Array.isArray(e6.rules) && e6.rules.forEach((e7, o5) => {
|
|
3798
|
+
if (!Ao(e7)) return;
|
|
3799
3799
|
const r6 = [...t5, "rules", o5];
|
|
3800
|
-
if (
|
|
3800
|
+
if ($o(e7.key, [...r6, "key"], n6), Io2(e7.match, [...r6, "match"], n6), Ao(e7.update)) for (const [t6, n7] of Object.entries(e7.update)) $o(n7, [...r6, "update", t6], i6);
|
|
3801
3801
|
});
|
|
3802
3802
|
}
|
|
3803
|
-
function
|
|
3804
|
-
if (void 0 === e6 || (i6 = e6, !
|
|
3803
|
+
function Do(e6, t5, n6) {
|
|
3804
|
+
if (void 0 === e6 || (i6 = e6, !Ze3.safeParse(i6).success)) return;
|
|
3805
3805
|
var i6;
|
|
3806
3806
|
const o5 = /* @__PURE__ */ new Set();
|
|
3807
|
-
for (const i7 of
|
|
3807
|
+
for (const i7 of _i(e6)) for (const e7 of [...i7.via ?? [], i7]) {
|
|
3808
3808
|
if (!e7.match) continue;
|
|
3809
3809
|
const i8 = e7.path.join(".");
|
|
3810
|
-
o5.has(i8) || (o5.add(i8),
|
|
3810
|
+
o5.has(i8) || (o5.add(i8), Io2(e7.match, [...t5, ...e7.path, "match"], n6));
|
|
3811
3811
|
}
|
|
3812
3812
|
}
|
|
3813
|
-
function
|
|
3814
|
-
|
|
3813
|
+
function Io2(e6, t5, n6) {
|
|
3814
|
+
Ao(e6) && (Array.isArray(e6.and) && e6.and.forEach((e7, i6) => Io2(e7, [...t5, "and", i6], n6)), Array.isArray(e6.or) && e6.or.forEach((e7, i6) => Io2(e7, [...t5, "or", i6], n6)), "string" == typeof e6.key && $o(e6.key, [...t5, "key"], n6));
|
|
3815
3815
|
}
|
|
3816
|
-
function
|
|
3816
|
+
function Ao(e6) {
|
|
3817
3817
|
return "object" == typeof e6 && null !== e6 && !Array.isArray(e6);
|
|
3818
3818
|
}
|
|
3819
|
-
function
|
|
3820
|
-
if (
|
|
3819
|
+
function To(e6, t5) {
|
|
3820
|
+
if (Ao(t5)) for (const [n6, i6] of Object.entries(t5)) e6[n6] = i6;
|
|
3821
3821
|
}
|
|
3822
|
-
function
|
|
3822
|
+
function Ro(e6) {
|
|
3823
3823
|
const t5 = {};
|
|
3824
|
-
if (!
|
|
3825
|
-
const n6 =
|
|
3826
|
-
if (!
|
|
3824
|
+
if (!Ao(e6)) return t5;
|
|
3825
|
+
const n6 = Ao(e6.properties) ? e6.properties.data : void 0;
|
|
3826
|
+
if (!Ao(n6)) return t5;
|
|
3827
3827
|
const i6 = Array.isArray(n6.required) ? n6.required.filter((e7) => "string" == typeof e7) : [], o5 = n6.properties;
|
|
3828
|
-
if (!
|
|
3828
|
+
if (!Ao(o5)) return t5;
|
|
3829
3829
|
for (const [e7, n7] of Object.entries(o5)) {
|
|
3830
3830
|
const o6 = {};
|
|
3831
|
-
|
|
3831
|
+
Ao(n7) && ("string" == typeof n7.type && (o6.type = n7.type), "string" == typeof n7.description && (o6.description = n7.description)), i6.includes(e7) && (o6.required = true), t5[e7] = o6;
|
|
3832
3832
|
}
|
|
3833
3833
|
return t5;
|
|
3834
3834
|
}
|
|
3835
|
-
function
|
|
3835
|
+
function Mo(e6, t5) {
|
|
3836
3836
|
const n6 = [], i6 = {};
|
|
3837
3837
|
for (const [t6, o6] of Object.entries(e6)) {
|
|
3838
3838
|
o6.required && n6.push(t6);
|
|
3839
3839
|
const e7 = { type: o6.type };
|
|
3840
3840
|
if (o6.description && (e7.description = o6.description), o6.pattern && (e7.pattern = o6.pattern), void 0 !== o6.minLength && (e7.minLength = o6.minLength), void 0 !== o6.maxLength && (e7.maxLength = o6.maxLength), void 0 !== o6.minimum && (e7.minimum = o6.minimum), void 0 !== o6.maximum && (e7.maximum = o6.maximum), o6.enum && (e7.enum = [...o6.enum]), void 0 !== o6.default && (e7.default = o6.default), "object" === o6.type && o6.properties) {
|
|
3841
3841
|
const t7 = {};
|
|
3842
|
-
for (const [e8, n7] of Object.entries(o6.properties)) t7[e8] =
|
|
3842
|
+
for (const [e8, n7] of Object.entries(o6.properties)) t7[e8] = Jo(n7);
|
|
3843
3843
|
e7.properties = t7;
|
|
3844
3844
|
}
|
|
3845
|
-
"array" === o6.type && o6.items && (e7.items =
|
|
3845
|
+
"array" === o6.type && o6.items && (e7.items = Jo(o6.items)), i6[t6] = e7;
|
|
3846
3846
|
}
|
|
3847
3847
|
const o5 = { type: "object", properties: i6 };
|
|
3848
3848
|
return t5 && (o5.title = t5), n6.length > 0 && (o5.required = n6), o5;
|
|
3849
3849
|
}
|
|
3850
|
-
function
|
|
3850
|
+
function Jo(e6) {
|
|
3851
3851
|
const t5 = { type: e6.type };
|
|
3852
3852
|
if (e6.description && (t5.description = e6.description), e6.pattern && (t5.pattern = e6.pattern), void 0 !== e6.minLength && (t5.minLength = e6.minLength), void 0 !== e6.maxLength && (t5.maxLength = e6.maxLength), void 0 !== e6.minimum && (t5.minimum = e6.minimum), void 0 !== e6.maximum && (t5.maximum = e6.maximum), e6.enum && (t5.enum = [...e6.enum]), void 0 !== e6.default && (t5.default = e6.default), "object" === e6.type && e6.properties) {
|
|
3853
3853
|
const n6 = {};
|
|
3854
|
-
for (const [t6, i6] of Object.entries(e6.properties)) n6[t6] =
|
|
3854
|
+
for (const [t6, i6] of Object.entries(e6.properties)) n6[t6] = Jo(i6);
|
|
3855
3855
|
t5.properties = n6;
|
|
3856
3856
|
}
|
|
3857
|
-
return "array" === e6.type && e6.items && (t5.items =
|
|
3857
|
+
return "array" === e6.type && e6.items && (t5.items = Jo(e6.items)), t5;
|
|
3858
3858
|
}
|
|
3859
|
-
function
|
|
3860
|
-
const n6 = { type: "array", items:
|
|
3859
|
+
function Fo(e6, t5) {
|
|
3860
|
+
const n6 = { type: "array", items: Jo(e6) };
|
|
3861
3861
|
return void 0 !== t5?.minItems && (n6.minItems = t5.minItems), void 0 !== t5?.maxItems && (n6.maxItems = t5.maxItems), t5?.description && (n6.description = t5.description), t5?.title && (n6.title = t5.title), n6;
|
|
3862
3862
|
}
|
|
3863
|
-
function
|
|
3863
|
+
function No(e6, t5 = "string", n6) {
|
|
3864
3864
|
const i6 = { type: t5, enum: [...e6] };
|
|
3865
3865
|
return n6?.description && (i6.description = n6.description), n6?.title && (i6.title = n6.title), i6;
|
|
3866
3866
|
}
|
|
3867
|
-
function
|
|
3868
|
-
return
|
|
3867
|
+
function zo(e6, t5, n6) {
|
|
3868
|
+
return Fo({ type: "object" }, { minItems: 2, maxItems: 2, description: n6 || "Tuple with exactly 2 elements [source, transform]" });
|
|
3869
3869
|
}
|
|
3870
|
-
function
|
|
3870
|
+
function _o2(e6) {
|
|
3871
3871
|
const t5 = i4.toJSONSchema(e6, { target: "draft-7" });
|
|
3872
|
-
return
|
|
3872
|
+
return Lo(t5), t5;
|
|
3873
3873
|
}
|
|
3874
|
-
function
|
|
3874
|
+
function Lo(e6) {
|
|
3875
3875
|
const t5 = e6.properties;
|
|
3876
3876
|
if (t5 && "object" == typeof t5) {
|
|
3877
3877
|
Array.isArray(e6.required) && (e6.required = e6.required.filter((e7) => {
|
|
3878
3878
|
const n6 = t5[e7];
|
|
3879
3879
|
return !(n6 && "object" == typeof n6 && "default" in n6);
|
|
3880
3880
|
}));
|
|
3881
|
-
for (const [e7, n6] of Object.entries(t5)) n6 && "object" == typeof n6 && ("object" === n6.type && n6.properties && "string" != typeof n6.title && (n6.title = e7),
|
|
3881
|
+
for (const [e7, n6] of Object.entries(t5)) n6 && "object" == typeof n6 && ("object" === n6.type && n6.properties && "string" != typeof n6.title && (n6.title = e7), Lo(n6));
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
3884
|
-
function
|
|
3884
|
+
function or2(e6, t5) {
|
|
3885
3885
|
return { key: e6, operator: "eq", value: t5 };
|
|
3886
3886
|
}
|
|
3887
|
-
function
|
|
3887
|
+
function rr(e6 = {}) {
|
|
3888
3888
|
const t5 = {};
|
|
3889
3889
|
for (const [n6, i6] of Object.entries(e6)) t5[n6] = { type: n6, config: { next: i6 }, push: () => {
|
|
3890
3890
|
} };
|
|
3891
3891
|
return t5;
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3893
|
+
function ar2(e6) {
|
|
3894
3894
|
return { ...e6, ingest: { ...e6.ingest } };
|
|
3895
3895
|
}
|
|
3896
|
-
function
|
|
3897
|
-
const i6 =
|
|
3896
|
+
function cr2(e6, t5, n6) {
|
|
3897
|
+
const i6 = rr(e6.nexts), o5 = [], r6 = (t6, s6, a5) => {
|
|
3898
3898
|
let c3 = t6;
|
|
3899
3899
|
const l4 = { ids: [...a5.ids], stopped: false, edges: [...a5.edges] };
|
|
3900
3900
|
for (let t7 = 0; t7 < 256; t7++) {
|
|
3901
|
-
const t8 =
|
|
3901
|
+
const t8 = zi(c3, s6, i6);
|
|
3902
3902
|
if ("done" === t8.kind) break;
|
|
3903
3903
|
if ("stop" === t8.kind) {
|
|
3904
3904
|
l4.stopped = true;
|
|
3905
3905
|
break;
|
|
3906
3906
|
}
|
|
3907
3907
|
if ("fork" === t8.kind) {
|
|
3908
|
-
for (const e7 of t8.branches) r6(e7,
|
|
3908
|
+
for (const e7 of t8.branches) r6(e7, ar2(s6), l4);
|
|
3909
3909
|
return;
|
|
3910
3910
|
}
|
|
3911
3911
|
n6 && n6(t8.id);
|
|
@@ -3916,64 +3916,64 @@ function or2(e6, t5, n6) {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
o5.push(l4);
|
|
3918
3918
|
};
|
|
3919
|
-
return r6(
|
|
3919
|
+
return r6(Ji(e6.spec), ar2(t5), { ids: [], stopped: false, edges: [] }), o5;
|
|
3920
3920
|
}
|
|
3921
|
-
function
|
|
3922
|
-
return e6.map((e7) => e7.stopped ? [...e7.ids,
|
|
3921
|
+
function lr2(e6) {
|
|
3922
|
+
return e6.map((e7) => e7.stopped ? [...e7.ids, ir2] : e7.ids);
|
|
3923
3923
|
}
|
|
3924
|
-
function
|
|
3924
|
+
function ur2(e6) {
|
|
3925
3925
|
const t5 = (function(e7) {
|
|
3926
3926
|
return e7.config?.mapping ?? e7.mapping;
|
|
3927
3927
|
})(e6);
|
|
3928
3928
|
if (void 0 === t5) return [];
|
|
3929
|
-
const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping";
|
|
3929
|
+
const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping", i6 = "config.mapping" === n6 && void 0 !== e6.mapping;
|
|
3930
3930
|
if (void 0 !== e6.code || void 0 !== e6.package) {
|
|
3931
|
-
return [`\`${n6}\` is ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs it; a mapping applies only to a transformer without code.`];
|
|
3931
|
+
return [`${i6 ? "`config.mapping` and `mapping` are" : `\`${n6}\` is`} ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs ${i6 ? "them" : "it"}; a mapping applies only to a transformer without code.`];
|
|
3932
3932
|
}
|
|
3933
|
-
const
|
|
3934
|
-
|
|
3935
|
-
const
|
|
3936
|
-
if (!
|
|
3933
|
+
const o5 = [];
|
|
3934
|
+
i6 && o5.push("`mapping` is overridden: `config.mapping` wins; remove one.");
|
|
3935
|
+
const r6 = (function(e7, t6) {
|
|
3936
|
+
if (!yi(e7)) return [];
|
|
3937
3937
|
const n7 = [];
|
|
3938
|
-
for (const i8 of
|
|
3938
|
+
for (const i8 of dr2) void 0 !== e7[i8] && n7.push(`${t6}.${i8}`);
|
|
3939
3939
|
const i7 = e7.mapping;
|
|
3940
|
-
if (!
|
|
3941
|
-
for (const [e8, o6] of Object.entries(i7)) if (
|
|
3942
|
-
if (!
|
|
3943
|
-
const a5 = `${t6}.mapping.${e8}.${i8}${
|
|
3944
|
-
for (const e9 of
|
|
3940
|
+
if (!yi(i7)) return n7;
|
|
3941
|
+
for (const [e8, o6] of Object.entries(i7)) if (yi(o6)) for (const [i8, r7] of Object.entries(o6)) (vi(r7) ? r7 : [r7]).forEach((o7, s6) => {
|
|
3942
|
+
if (!yi(o7)) return;
|
|
3943
|
+
const a5 = `${t6}.mapping.${e8}.${i8}${vi(r7) ? `[${s6}]` : ""}`;
|
|
3944
|
+
for (const e9 of pr2) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
|
|
3945
3945
|
});
|
|
3946
3946
|
return n7;
|
|
3947
3947
|
})(t5, n6);
|
|
3948
|
-
return
|
|
3948
|
+
return r6.length > 0 && o5.push(`${r6.map((e7) => `\`${e7}\``).join(", ")} ${1 === r6.length ? "does" : "do"} nothing at the transformer position; only \`policy\` and a rule's \`condition\`, \`policy\`, \`name\` and \`ignore\` apply.`), o5;
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function hr(e6, t5) {
|
|
3951
3951
|
const n6 = (function(e7) {
|
|
3952
|
-
return /* @__PURE__ */ new Set([...Object.keys(
|
|
3952
|
+
return /* @__PURE__ */ new Set([...Object.keys(fr2[e7]), ...mr2]);
|
|
3953
3953
|
})(t5);
|
|
3954
3954
|
for (const i7 of Object.keys(e6)) if (!n6.has(i7)) return { ok: false, code: "UNKNOWN_KEY", key: i7, reason: `Unknown key "${i7}" on ${t5}. Allowed: ${[...n6].sort().join(", ")}.` };
|
|
3955
3955
|
const i6 = void 0 !== e6.package, o5 = void 0 !== e6.import, r6 = void 0 !== e6.code;
|
|
3956
|
-
return r6 && "string" == typeof e6.code ? { ok: false, code: "OBSOLETE_CODE_STRING", key: "code", reason: `code: "<name>" is no longer supported. Use import: "${e6.code}" with the package field instead.` } : r6 && ("object" != typeof e6.code && "function" != typeof e6.code || null === e6.code || Array.isArray(e6.code)) ? { ok: false, code: "INVALID_CODE_SHAPE", key: "code", reason: "code must be an object ({ push, type?, init? }) or a resolved function value." } : r6 && i6 ? { ok: false, code: "CONFLICT", key: "package", reason: "Cannot specify both `code` and `package`. Use one or the other." } : r6 && o5 ? { ok: false, code: "CONFLICT", key: "import", reason: "Cannot specify both `code` and `import`." } : o5 && !i6 ? { ok: false, code: "MISSING_PACKAGE", key: "import", reason: "`import` requires `package` to be set." } : !o5 || "string" == typeof e6.import &&
|
|
3956
|
+
return r6 && "string" == typeof e6.code ? { ok: false, code: "OBSOLETE_CODE_STRING", key: "code", reason: `code: "<name>" is no longer supported. Use import: "${e6.code}" with the package field instead.` } : r6 && ("object" != typeof e6.code && "function" != typeof e6.code || null === e6.code || Array.isArray(e6.code)) ? { ok: false, code: "INVALID_CODE_SHAPE", key: "code", reason: "code must be an object ({ push, type?, init? }) or a resolved function value." } : r6 && i6 ? { ok: false, code: "CONFLICT", key: "package", reason: "Cannot specify both `code` and `package`. Use one or the other." } : r6 && o5 ? { ok: false, code: "CONFLICT", key: "import", reason: "Cannot specify both `code` and `import`." } : o5 && !i6 ? { ok: false, code: "MISSING_PACKAGE", key: "import", reason: "`import` requires `package` to be set." } : !o5 || "string" == typeof e6.import && gr.test(e6.import) ? { ok: true } : { ok: false, code: "INVALID_IMPORT", key: "import", reason: `import must match ${gr.source}. Got: ${JSON.stringify(e6.import)}.` };
|
|
3957
3957
|
}
|
|
3958
|
-
function
|
|
3958
|
+
function br(e6) {
|
|
3959
3959
|
return (function(e7) {
|
|
3960
|
-
return
|
|
3960
|
+
return yi(e7) && "push" in e7;
|
|
3961
3961
|
})(e6) || "string" == typeof e6;
|
|
3962
3962
|
}
|
|
3963
|
-
function
|
|
3963
|
+
function vr(e6, t5, n6) {
|
|
3964
3964
|
if ("Transformer" === e6) {
|
|
3965
|
-
const e7 =
|
|
3965
|
+
const e7 = hr({ ...n6 }, "Transformer");
|
|
3966
3966
|
if (!e7.ok) throw new Error(`Transformer "${t5}": ${e7.reason ?? "invalid entry."}`);
|
|
3967
3967
|
return;
|
|
3968
3968
|
}
|
|
3969
|
-
const i6 = !!n6.package, o5 =
|
|
3969
|
+
const i6 = !!n6.package, o5 = br(n6.code);
|
|
3970
3970
|
if (i6 && o5) throw new Error(`${e6} "${t5}": Cannot specify both package and code. Use one or the other.`);
|
|
3971
3971
|
if (!i6 && !o5) throw new Error(`${e6} "${t5}": Must specify either package or code.`);
|
|
3972
3972
|
}
|
|
3973
|
-
function
|
|
3974
|
-
for (const n6 of Object.keys(e6)) if (!
|
|
3973
|
+
function Sr(e6, t5) {
|
|
3974
|
+
for (const n6 of Object.keys(e6)) if (!yr.test(n6)) throw new Error(`Invalid ${t5} name "${n6}": must be a valid JavaScript identifier (use camelCase, e.g., "${n6.replace(/-([a-z])/g, (e7, t6) => t6.toUpperCase())}")`);
|
|
3975
3975
|
}
|
|
3976
|
-
function
|
|
3976
|
+
function wr(e6, t5) {
|
|
3977
3977
|
const n6 = [];
|
|
3978
3978
|
function i6(e7, t6) {
|
|
3979
3979
|
if ("string" == typeof e7 && e7.startsWith("$store.")) n6.push({ ref: e7.slice(7), location: t6 });
|
|
@@ -3987,7 +3987,7 @@ function br(e6, t5) {
|
|
|
3987
3987
|
throw new Error(`Invalid store references: ${n7}. ${e7}`);
|
|
3988
3988
|
}
|
|
3989
3989
|
}
|
|
3990
|
-
function
|
|
3990
|
+
function xr(e6, t5) {
|
|
3991
3991
|
switch (t5) {
|
|
3992
3992
|
case "sources":
|
|
3993
3993
|
return e6.sources;
|
|
@@ -3999,73 +3999,73 @@ function Sr(e6, t5) {
|
|
|
3999
3999
|
return e6.stores;
|
|
4000
4000
|
}
|
|
4001
4001
|
}
|
|
4002
|
-
function
|
|
4003
|
-
return "string" == typeof e6 ||
|
|
4002
|
+
function jr(e6) {
|
|
4003
|
+
return "string" == typeof e6 || yi(e6) && "push" in e6;
|
|
4004
4004
|
}
|
|
4005
|
-
function
|
|
4005
|
+
function $r2(e6) {
|
|
4006
4006
|
return e6 instanceof Error ? e6.message : String(e6);
|
|
4007
4007
|
}
|
|
4008
|
-
function
|
|
4008
|
+
function Er2(e6, t5) {
|
|
4009
4009
|
const n6 = [], i6 = e6.stores || {}, o5 = (e7, t6) => {
|
|
4010
|
-
if (!
|
|
4010
|
+
if (!yi(e7) || "string" != typeof e7.store) return;
|
|
4011
4011
|
const o6 = e7.store;
|
|
4012
4012
|
if (o6.startsWith("$") || "__cache" === o6) return;
|
|
4013
4013
|
const r7 = i6[o6];
|
|
4014
|
-
r7 ?
|
|
4014
|
+
r7 ? yi(r7.config) && true === r7.config.file && n6.push({ path: t6, message: `State cannot use store "${o6}": it sets file: true. Handle byte stores in a transformer.`, code: "STATE_STORE_FILE" }) : n6.push({ path: t6, message: `State store "${o6}" is not declared in flow.stores.`, code: "STATE_STORE_UNKNOWN" });
|
|
4015
4015
|
}, r6 = (e7, t6) => {
|
|
4016
4016
|
Array.isArray(e7) ? e7.forEach((e8, n7) => o5(e8, `${t6}.${n7}`)) : o5(e7, t6);
|
|
4017
4017
|
};
|
|
4018
|
-
for (const n7 of
|
|
4019
|
-
const i7 =
|
|
4018
|
+
for (const n7 of Or) {
|
|
4019
|
+
const i7 = xr(e6, n7);
|
|
4020
4020
|
if (i7) for (const [e7, o6] of Object.entries(i7)) {
|
|
4021
4021
|
const i8 = `flows.${t5}.${n7}.${e7}`;
|
|
4022
|
-
"state" in o6 && r6(o6.state, `${i8}.state`),
|
|
4022
|
+
"state" in o6 && r6(o6.state, `${i8}.state`), yi(o6.config) && r6(o6.config.state, `${i8}.config.state`);
|
|
4023
4023
|
}
|
|
4024
4024
|
}
|
|
4025
4025
|
return n6;
|
|
4026
4026
|
}
|
|
4027
|
-
function
|
|
4028
|
-
const t5 = [], n6 = [], i6 = {}, o5 = e6.flows, r6 =
|
|
4029
|
-
if (i6.flowNames = r6, i6.flowCount = r6.length, !
|
|
4027
|
+
function Pr2(e6) {
|
|
4028
|
+
const t5 = [], n6 = [], i6 = {}, o5 = e6.flows, r6 = yi(o5) ? Object.keys(o5) : [];
|
|
4029
|
+
if (i6.flowNames = r6, i6.flowCount = r6.length, !yi(o5) || 0 === r6.length) return t5.push({ path: "flows", message: "At least one flow is required", code: "EMPTY_FLOWS" }), { valid: false, type: "flow", errors: t5, warnings: [], details: i6 };
|
|
4030
4030
|
for (const [e7, i7] of Object.entries(o5)) {
|
|
4031
|
-
for (const n7 of
|
|
4032
|
-
const o7 =
|
|
4031
|
+
for (const n7 of kr) {
|
|
4032
|
+
const o7 = xr(i7, n7);
|
|
4033
4033
|
if (o7) try {
|
|
4034
|
-
|
|
4034
|
+
Sr(o7, n7);
|
|
4035
4035
|
} catch (i8) {
|
|
4036
|
-
t5.push({ path: `flows.${e7}.${n7}`, message:
|
|
4036
|
+
t5.push({ path: `flows.${e7}.${n7}`, message: $r2(i8), code: "INVALID_COMPONENT_NAME" });
|
|
4037
4037
|
}
|
|
4038
4038
|
}
|
|
4039
|
-
for (const n7 of
|
|
4040
|
-
const o7 =
|
|
4039
|
+
for (const n7 of kr) {
|
|
4040
|
+
const o7 = xr(i7, n7);
|
|
4041
4041
|
if (!o7) continue;
|
|
4042
|
-
const r8 =
|
|
4042
|
+
const r8 = Cr2[n7];
|
|
4043
4043
|
if ("Transformer" !== r8) {
|
|
4044
|
-
for (const [i8, s6] of Object.entries(o7)) if ("Store" !== r8 || s6.package ||
|
|
4045
|
-
|
|
4044
|
+
for (const [i8, s6] of Object.entries(o7)) if ("Store" !== r8 || s6.package || jr(s6.code)) try {
|
|
4045
|
+
vr(r8, i8, s6);
|
|
4046
4046
|
} catch (o8) {
|
|
4047
|
-
t5.push({ path: `flows.${e7}.${n7}.${i8}`, message:
|
|
4047
|
+
t5.push({ path: `flows.${e7}.${n7}.${i8}`, message: $r2(o8), code: "INVALID_REFERENCE" });
|
|
4048
4048
|
}
|
|
4049
4049
|
}
|
|
4050
4050
|
}
|
|
4051
4051
|
const o6 = i7.transformers;
|
|
4052
4052
|
if (o6) for (const [i8, r8] of Object.entries(o6)) {
|
|
4053
|
-
const o7 = `flows.${e7}.transformers.${i8}`, s6 =
|
|
4053
|
+
const o7 = `flows.${e7}.transformers.${i8}`, s6 = hr({ ...r8 }, "Transformer");
|
|
4054
4054
|
s6.ok || t5.push({ path: o7, message: s6.reason || "Invalid transformer entry.", code: s6.code });
|
|
4055
4055
|
const { config: a5 } = r8;
|
|
4056
|
-
for (const e8 of
|
|
4056
|
+
for (const e8 of ur2({ ...r8, config: yi(a5) ? a5 : void 0 })) n6.push({ path: o7, message: e8, code: "TRANSFORMER_MAPPING_NO_OP" });
|
|
4057
4057
|
}
|
|
4058
4058
|
const r7 = new Set(Object.keys(i7.stores || {}));
|
|
4059
4059
|
try {
|
|
4060
|
-
|
|
4060
|
+
wr(i7, r7);
|
|
4061
4061
|
} catch (n7) {
|
|
4062
|
-
t5.push({ path: `flows.${e7}`, message:
|
|
4062
|
+
t5.push({ path: `flows.${e7}`, message: $r2(n7), code: "STORE_REFERENCE_NOT_FOUND" });
|
|
4063
4063
|
}
|
|
4064
|
-
t5.push(...
|
|
4064
|
+
t5.push(...Er2(i7, e7));
|
|
4065
4065
|
}
|
|
4066
4066
|
return { valid: 0 === t5.length, type: "flow", errors: t5, warnings: n6, details: i6 };
|
|
4067
4067
|
}
|
|
4068
|
-
var e5, t4, n4, r4, s4, a4, c2, l3, d2, p2, u3, f3, m3, g3, h2, b3, v3, y3, S2, w3, k3, C4, x3, j3, $3, O3, E2, P4, D3, I3,
|
|
4068
|
+
var e5, t4, n4, r4, s4, a4, c2, l3, d2, p2, u3, f3, m3, g3, h2, b3, v3, y3, S2, w3, k3, C4, x3, j3, $3, O3, E2, P4, D3, I3, J3, F3, N4, z4, _2, L4, q3, W4, U3, B3, V3, H3, Z4, G3, K4, Q3, Y3, X2, ee3, te2, ne3, ie3, oe2, re2, se3, ae3, ce3, le2, de2, pe2, ue2, fe2, me2, ge2, he2, be2, ve2, ye2, Se2, we2, ke2, Ce2, xe2, je2, $e2, Oe2, Ee2, Pe2, De2, Ie2, Ae2, Te2, Re2, Me2, Je3, Fe3, Ne3, ze3, _e2, Le2, qe, We2, Ue3, Be2, Ve2, He3, Ze3, Ge3, Ke2, Qe2, Ye3, Xe2, et3, tt3, nt3, it2, st2, at3, ct3, lt3, dt3, pt3, ut2, ft3, mt3, gt3, ht2, bt3, vt3, yt3, St3, wt3, kt3, Ct2, xt2, jt3, $t3, Ot2, Et2, Pt2, Dt3, It2, At3, Tt3, Rt3, Mt2, Jt2, Ft3, Nt2, zt2, _t2, Lt3, qt2, Wt2, Ut3, Bt2, Vt2, Ht2, Zt2, Gt2, Kt2, Qt2, Yt2, Xt2, en2, tn2, nn2, on, rn2, sn2, an2, cn2, ln2, dn2, pn2, un2, fn2, mn2, gn2, hn2, bn2, vn2, yn2, Sn2, wn2, kn2, Cn2, xn, jn, $n, On2, En2, Pn3, Dn, In, An, Tn2, Rn2, Mn, Fn3, Nn2, zn2, _n2, Ln2, qn2, Wn3, Un2, Bn3, Vn2, Hn3, Zn, Gn3, ei, ti, ni, ii, oi, ri, si, ai, ci, li, pi, ui, fi, mi, gi, hi, bi, Ci, Ii, qi, Wi, Ui, Bi, Qi, Xi, eo2, to, no, io, oo, ao2, co, lo3, fo2, mo2, go2, Co2, xo2, jo2, Wo, nr2, ir2, sr2, dr2, pr2, fr2, mr2, gr, yr, kr, Cr2, Or;
|
|
4069
4069
|
var init_dev = __esm({
|
|
4070
4070
|
"../core/dist/dev.mjs"() {
|
|
4071
4071
|
"use strict";
|
|
@@ -4075,7 +4075,7 @@ var init_dev = __esm({
|
|
|
4075
4075
|
for (var i6 in n6) e5(t5, i6, { get: n6[i6], enumerable: true });
|
|
4076
4076
|
};
|
|
4077
4077
|
n4 = {};
|
|
4078
|
-
t4(n4, { BaseContextConfig: () => F3, CacheRuleSchema: () =>
|
|
4078
|
+
t4(n4, { BaseContextConfig: () => F3, CacheRuleSchema: () => et3, CacheSchema: () => tt3, CacheSchemas: () => Ge3, ClickIdEntrySchema: () => mi, CodeSchema: () => pi, CollectorSchemas: () => Rt3, ConsentSchema: () => Z4, ContractActionsSchema: () => qn2, ContractRuleSchema: () => Un2, ContractSchema: () => Bn3, ContractSchemaEntry: () => Ln2, Counter: () => d2, CredentialsSchema: () => hi, DeepPartialEventSchema: () => ne3, DestinationSchemas: () => Fe3, DestinationsMapConfig: () => _2, EntitiesSchema: () => X2, EntitySchema: () => Y3, EventCacheRuleSchema: () => Ke2, EventCacheSchema: () => Qe2, EventSchema: () => ee3, FlowBundlePackageSchema: () => En2, FlowBundleSchema: () => Pn3, FlowCodeSchema: () => Dn, FlowConfigSchema: () => Hn3, FlowDestinationSchema: () => zn2, FlowJsonSchema: () => Gn3, FlowSchema: () => Zn, FlowSchemas: () => Sn2, FlowSourceSchema: () => Fn3, FlowStoreSchema: () => _n2, FlowTransformerSchema: () => Nn2, GenericEnvConfig: () => I3, GenericSettingsConfig: () => D3, HandlersConfig: () => x3, HintSchema: () => ui, HintsSchema: () => fi, IdConfig: () => O3, Identifier: () => c2, InitConfig: () => E2, LoggerConfigSchema: () => ct3, LoggerHandlerSchema: () => at3, LoopSchema: () => ge2, MapSchema: () => be2, MappingResultSchema: () => Oe2, MappingSchemas: () => pe2, MatchExpressionSchema: () => Le2, MatcherSchemas: () => Ne3, OptionalPrimitiveValue: () => u3, OrderedPropertiesSchema: () => V3, PartialEventSchema: () => te2, PolicySchema: () => ye2, PrimaryConfig: () => P4, PrimitiveValue: () => p2, ProcessingControlConfig: () => N4, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, QueueConfig: () => $3, RequiredBoolean: () => a4, RequiredNumber: () => s4, RequiredString: () => r4, RouteSchema: () => Ze3, RuleSchema: () => xe2, RulesSchema: () => je2, RuntimeInstanceConfig: () => J3, ServiceAccountSchema: () => gi, SetSchema: () => he2, SourceSchema: () => Q3, SourceSchemas: () => Gt2, SourceTypeSchema: () => H3, SourcesMapConfig: () => z4, StateSchema: () => st2, StoreCacheRuleSchema: () => Ye3, StoreCacheSchema: () => Xe2, StoreSchemas: () => gn2, Timestamp: () => l3, TransformerSchemas: () => dn2, UserSchema: () => G3, UtilitySchemas: () => f3, ValidateEventsSchema: () => Mn, ValueConfigSchema: () => ve2, ValueSchema: () => fe2, ValuesSchema: () => me2, VerboseConfig: () => j3, WalkerOSSchemas: () => L4, configJsonSchema: () => ei, consentJsonSchema: () => de2, contractJsonSchema: () => ci, contractRuleJsonSchema: () => ai, createArraySchema: () => Fo, createConsentConfig: () => M3, createDataTransformationConfig: () => A3, createEnumSchema: () => No, createMappingRulesConfig: () => T4, createObjectSchema: () => Mo, createPolicyConfig: () => R3, createTupleSchema: () => zo, credentialsJsonSchema: () => bi, destinationJsonSchema: () => oi, entityJsonSchema: () => ce3, eventJsonSchema: () => ie3, flowConfigJsonSchema: () => ni, flowJsonSchema: () => ti, loopJsonSchema: () => De2, mapJsonSchema: () => Ae2, orderedPropertiesJsonSchema: () => ae3, parseConfig: () => Kn2, parseFlow: () => Yn2, partialEventJsonSchema: () => oe2, policyJsonSchema: () => Te2, propertiesJsonSchema: () => se3, ruleJsonSchema: () => Re2, rulesJsonSchema: () => Me2, safeParseConfig: () => Qn3, safeParseFlow: () => Xn2, setJsonSchema: () => Ie2, sourceJsonSchema: () => ii, sourceTypeJsonSchema: () => le2, storeJsonSchema: () => si, transformerJsonSchema: () => ri, userJsonSchema: () => re2, validateEventsJsonSchema: () => li, validateFlowConfig: () => Yi, valueConfigJsonSchema: () => Pe2, valueJsonSchema: () => Ee2, z: () => i4, zodToSchema: () => _o2 });
|
|
4079
4079
|
r4 = i4.string();
|
|
4080
4080
|
s4 = i4.number();
|
|
4081
4081
|
a4 = i4.boolean();
|
|
@@ -4104,85 +4104,89 @@ var init_dev = __esm({
|
|
|
4104
4104
|
P4 = i4.object({ primary: i4.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial();
|
|
4105
4105
|
D3 = i4.object({ settings: i4.any().optional().describe("Implementation-specific configuration") }).partial();
|
|
4106
4106
|
I3 = i4.object({ env: i4.any().optional().describe("Environment dependencies (platform-specific)") }).partial();
|
|
4107
|
-
|
|
4107
|
+
J3 = i4.object({ type: i4.string().optional().describe("Instance type identifier"), config: i4.unknown().describe("Instance configuration") }).partial();
|
|
4108
4108
|
F3 = i4.object({ collector: i4.unknown().describe("Collector instance (runtime object)"), config: i4.unknown().describe("Configuration"), env: i4.unknown().describe("Environment dependencies") }).partial();
|
|
4109
4109
|
N4 = i4.object({ ignore: i4.boolean().describe("Set to true to skip processing").optional(), condition: i4.string().optional().describe("Condition function: return true to process") }).partial();
|
|
4110
4110
|
z4 = i4.object({ sources: i4.record(i4.string(), i4.unknown()).describe("Map of source instances") }).partial();
|
|
4111
4111
|
_2 = i4.object({ destinations: i4.record(i4.string(), i4.unknown()).describe("Map of destination instances") }).partial();
|
|
4112
4112
|
L4 = {};
|
|
4113
|
-
t4(L4, { ConsentSchema: () =>
|
|
4113
|
+
t4(L4, { ConsentSchema: () => Z4, DeepPartialEventSchema: () => ne3, EntitiesSchema: () => X2, EntitySchema: () => Y3, EventSchema: () => ee3, OrderedPropertiesSchema: () => V3, PartialEventSchema: () => te2, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, SourceFieldsSchema: () => K4, SourceSchema: () => Q3, SourceTypeSchema: () => H3, UserSchema: () => G3, consentJsonSchema: () => de2, entityJsonSchema: () => ce3, eventJsonSchema: () => ie3, orderedPropertiesJsonSchema: () => ae3, partialEventJsonSchema: () => oe2, propertiesJsonSchema: () => se3, sourceTypeJsonSchema: () => le2, userJsonSchema: () => re2 });
|
|
4114
4114
|
W4 = i4.lazy(() => i4.union([i4.boolean(), i4.string(), i4.number(), i4.record(i4.string(), U3)])).meta({ id: "WalkerOSPropertyType", title: "WalkerOS.PropertyType", description: "Base property value types (boolean, string, number, or nested Property record)." });
|
|
4115
4115
|
U3 = i4.lazy(() => i4.union([W4, i4.array(W4)])).meta({ id: "WalkerOSProperty", title: "WalkerOS.Property", description: "PropertyType or an array of PropertyType. Recursive structure for nested objects and arrays." });
|
|
4116
4116
|
B3 = i4.record(i4.string(), U3.optional()).meta({ id: "WalkerOSProperties", title: "WalkerOS.Properties", description: "Flexible property collection with optional values." }).describe("Flexible property collection with optional values");
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4117
|
+
V3 = i4.record(i4.string(), i4.tuple([U3, i4.number()]).optional()).meta({ id: "WalkerOSOrderedProperties", title: "WalkerOS.OrderedProperties", description: "Ordered properties with [value, order] tuples for priority control." }).describe("Ordered properties with [value, order] tuples for priority control");
|
|
4118
|
+
H3 = i4.union([i4.enum(["web", "server", "app", "other"]), i4.string()]).meta({ id: "WalkerOSSourceType", title: "WalkerOS.SourceType", description: "Source type identifier. Standard: web, server, app, other. Extensible to custom strings." }).describe("Source type: web, server, app, other, or custom");
|
|
4119
|
+
Z4 = i4.record(i4.string(), i4.boolean()).meta({ id: "WalkerOSConsent", title: "WalkerOS.Consent", description: "Consent state mapping. Keys are consent groups (e.g. marketing, functional), values are booleans for granted/denied." }).describe("Consent requirement mapping (group name to state)");
|
|
4120
4120
|
G3 = B3.and(i4.object({ id: i4.string().optional().describe("User identifier"), device: i4.string().optional().describe("Device identifier"), session: i4.string().optional().describe("Session identifier"), hash: i4.string().optional().describe("Hashed identifier"), address: i4.string().optional().describe("User address"), email: i4.string().email().optional().describe("User email address"), phone: i4.string().optional().describe("User phone number"), userAgent: i4.string().optional().describe("Browser user agent string"), browser: i4.string().optional().describe("Browser name"), browserVersion: i4.string().optional().describe("Browser version"), deviceType: i4.string().optional().describe("Device type (mobile, desktop, tablet)"), os: i4.string().optional().describe("Operating system"), osVersion: i4.string().optional().describe("Operating system version"), screenSize: i4.string().optional().describe("Screen dimensions"), language: i4.string().optional().describe("User language"), country: i4.string().optional().describe("User country"), region: i4.string().optional().describe("User region/state"), city: i4.string().optional().describe("User city"), zip: i4.string().optional().describe("User postal code"), timezone: i4.string().optional().describe("User timezone"), ip: i4.string().optional().describe("User IP address"), internal: i4.boolean().optional().describe("Internal user flag (employee, test user)") })).meta({ id: "WalkerOSUser", title: "WalkerOS.User", description: "User identification and attributes." }).describe("User identification and properties");
|
|
4121
4121
|
K4 = i4.object({ type: i4.string().describe("Source kind (browser, dataLayer, gtag, ...)"), platform: i4.string().optional().describe("Runtime platform (web, server, app, ios, android, terminal, ...)"), version: i4.string().optional().describe("Deployment version of the source emitter"), schema: i4.string().optional().describe('Event model spec version (collector defaults to "4")'), count: i4.number().int().nonnegative().optional().describe("Emission sequence per run"), trace: i4.string().optional().describe("Trace id shared by every event of a run (W3C trace-id shape)"), release: i4.record(i4.string(), i4.string()).optional().describe("Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings"), url: i4.string().optional(), referrer: i4.string().optional(), tool: i4.string().optional(), command: i4.string().optional() });
|
|
4122
4122
|
Q3 = B3.and(K4).meta({ id: "WalkerOSSource", title: "WalkerOS.Source", description: "Event source information (origin of the event)." }).describe("Event source information");
|
|
4123
|
-
Y3 = i4.lazy(() => i4.object({ entity: i4.string().describe("Entity name"), data: B3.describe("Entity-specific properties"), nested: i4.array(Y3).optional().describe("Nested child entities"), context:
|
|
4123
|
+
Y3 = i4.lazy(() => i4.object({ entity: i4.string().describe("Entity name"), data: B3.describe("Entity-specific properties"), nested: i4.array(Y3).optional().describe("Nested child entities"), context: V3.optional().describe("Entity context data") })).meta({ id: "WalkerOSEntity", title: "WalkerOS.Entity", description: "Nested entity structure with recursive nesting support." }).describe("Nested entity structure with recursive nesting support");
|
|
4124
4124
|
X2 = i4.array(Y3).meta({ id: "WalkerOSEntities", title: "WalkerOS.Entities", description: "Array of nested entities." }).describe("Array of nested entities");
|
|
4125
|
-
ee3 = i4.object({ name: i4.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: B3.describe("Event-specific properties"), context:
|
|
4125
|
+
ee3 = i4.object({ name: i4.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: B3.describe("Event-specific properties"), context: V3.describe("Ordered context properties with priorities"), globals: B3.describe("Global properties shared across events"), custom: B3.describe("Custom implementation-specific properties"), user: G3.describe("User identification and attributes"), nested: X2.describe("Related nested entities"), consent: Z4.describe("Consent states at event time"), id: c2.describe("W3C span_id, 16 lowercase hex characters"), trigger: r4.describe("Event trigger identifier"), entity: r4.describe("Parsed entity from event name"), action: r4.describe("Parsed action from event name"), timestamp: l3.describe("Unix timestamp in milliseconds since epoch"), timing: s4.describe("Event processing timing information"), source: Q3.describe("Event source information") }).meta({ id: "WalkerOSEvent", title: "WalkerOS.Event", description: "Complete walkerOS event structure." }).describe("Complete walkerOS event structure");
|
|
4126
4126
|
te2 = ee3.partial().meta({ id: "WalkerOSPartialEvent", title: "WalkerOS.PartialEvent", description: "Partial event structure with all fields optional." }).describe("Partial event structure with all fields optional");
|
|
4127
4127
|
ne3 = ee3.partial().meta({ id: "WalkerOSDeepPartialEvent", title: "WalkerOS.DeepPartialEvent", description: "Partial event structure with all top-level fields optional." }).describe("Partial event structure with all top-level fields optional");
|
|
4128
4128
|
ie3 = o3(ee3);
|
|
4129
4129
|
oe2 = o3(te2);
|
|
4130
4130
|
re2 = o3(G3);
|
|
4131
4131
|
se3 = o3(B3);
|
|
4132
|
-
ae3 = o3(
|
|
4132
|
+
ae3 = o3(V3);
|
|
4133
4133
|
ce3 = o3(Y3);
|
|
4134
|
-
le2 = o3(
|
|
4135
|
-
de2 = o3(
|
|
4134
|
+
le2 = o3(H3);
|
|
4135
|
+
de2 = o3(Z4);
|
|
4136
4136
|
pe2 = {};
|
|
4137
|
-
t4(pe2, { ConfigSchema: () =>
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
Ce2 = i4.object({
|
|
4150
|
-
xe2 =
|
|
4151
|
-
je2 =
|
|
4152
|
-
$e2 =
|
|
4153
|
-
Oe2 =
|
|
4154
|
-
Ee2 = o3(
|
|
4137
|
+
t4(pe2, { ConfigSchema: () => $e2, LoopSchema: () => ge2, MapSchema: () => be2, PolicySchema: () => ye2, ResultSchema: () => Oe2, RulePatchSchema: () => Ce2, RuleSchema: () => xe2, RulesSchema: () => je2, SetSchema: () => he2, ValueConfigSchema: () => ve2, ValueSchema: () => fe2, ValuesSchema: () => me2, configJsonSchema: () => Je3, loopJsonSchema: () => De2, mapJsonSchema: () => Ae2, policyJsonSchema: () => Te2, ruleJsonSchema: () => Re2, rulesJsonSchema: () => Me2, setJsonSchema: () => Ie2, valueConfigJsonSchema: () => Pe2, valueJsonSchema: () => Ee2 });
|
|
4138
|
+
fe2 = i4.lazy(() => i4.union([i4.string().describe('String value or property path (e.g., "data.id")'), i4.number().describe("Numeric value"), i4.boolean().describe("Boolean value"), i4.lazy(() => q3), i4.array(fe2).describe("Array of values")])).meta({ id: "MappingValue", title: "Mapping.Value", description: "Polymorphic transform primitive used in every mapping field. A string path, constant, operator object (map/loop/set/condition/consent), or array of values." });
|
|
4139
|
+
me2 = i4.array(fe2).meta({ id: "MappingValues", title: "Mapping.Values", description: "Array of transformation values." }).describe("Array of transformation values");
|
|
4140
|
+
ge2 = i4.lazy(() => i4.tuple([fe2, fe2]).describe("Loop transformation: [source, transform] tuple for array processing")).meta({ id: "MappingLoop", title: "Mapping.Loop", description: "Loop tuple [source, transform] for iterating and transforming arrays.", minItems: 2, maxItems: 2 });
|
|
4141
|
+
he2 = i4.lazy(() => i4.array(fe2).describe("Set: Array of values for selection or combination")).meta({ id: "MappingSet", title: "Mapping.Set", description: "Set: array of values for selection or combination." });
|
|
4142
|
+
be2 = i4.lazy(() => i4.record(i4.string(), fe2).describe("Map: Object mapping keys to transformation values")).meta({ id: "MappingMap", title: "Mapping.Map", description: "Map: object mapping keys to transformation values." });
|
|
4143
|
+
ve2 = q3 = i4.object({ key: i4.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: i4.union([i4.string(), i4.number(), i4.boolean()]).optional().describe("Static primitive value"), fn: i4.string().optional().describe("Custom transformation function as string (serialized)"), map: be2.optional().describe("Object mapping: transform event data to structured output"), loop: ge2.optional().describe("Loop transformation: [source, transform] for array processing"), set: he2.optional().describe("Set of values: combine or select from multiple values"), consent: Z4.optional().describe("Required consent states to include this value"), condition: i4.string().optional().describe("Condition function as string: return true to include value"), validate: i4.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e6) => Object.keys(e6).length > 0, { message: "ValueConfig must have at least one property" }).meta({ id: "MappingValueConfig", title: "Mapping.ValueConfig", description: "Object-form value transformation with map/loop/set/condition/consent etc." }).describe("Value transformation configuration with multiple strategies");
|
|
4144
|
+
ye2 = i4.record(i4.string(), fe2).meta({ id: "MappingPolicy", title: "Mapping.Policy", description: "Policy rules for event pre-processing (key \u2192 value transformation)." }).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
|
|
4145
|
+
Se2 = i4.record(i4.string(), i4.boolean().nullable());
|
|
4146
|
+
we2 = i4.lazy(() => i4.union([i4.string(), i4.number(), i4.boolean(), i4.lazy(() => ue2), i4.array(fe2)])).meta({ id: "MappingValuePatch", title: "Mapping.ValuePatch", description: "A Mapping.Value inside `extend`; a null at an object key clears the inherited key." });
|
|
4147
|
+
ke2 = i4.record(i4.string(), we2.nullable());
|
|
4148
|
+
ue2 = i4.object({ key: i4.string().nullable().optional(), value: i4.union([i4.string(), i4.number(), i4.boolean()]).nullable().optional(), fn: i4.string().nullable().optional(), map: ke2.nullable().optional(), loop: ge2.nullable().optional(), set: he2.nullable().optional(), consent: Se2.nullable().optional(), condition: i4.string().nullable().optional(), validate: i4.string().nullable().optional() }).meta({ id: "MappingValueConfigPatch", title: "Mapping.ValueConfigPatch", description: "A Mapping.ValueConfig inside `extend`; a null value clears the inherited field." });
|
|
4149
|
+
Ce2 = i4.object({ name: i4.string().nullable().optional(), data: i4.union([we2, me2]).nullable().optional(), settings: i4.unknown().nullable().optional(), condition: i4.string().nullable().optional(), consent: Se2.nullable().optional(), policy: ke2.nullable().optional(), batch: i4.union([i4.number(), i4.object({ wait: i4.number().nullable().optional(), size: i4.number().nullable().optional(), age: i4.number().nullable().optional() })]).nullable().optional(), include: i4.array(i4.string()).nullable().optional(), ignore: i4.boolean().nullable().optional(), silent: i4.boolean().nullable().optional() }).meta({ id: "MappingRulePatch", title: "Mapping.RulePatch", description: "Partial rule deep-merged onto a package-shipped default; a null value clears the inherited field." }).describe("Partial rule for `extend`; null clears an inherited field");
|
|
4150
|
+
xe2 = i4.object({ name: i4.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), data: i4.union([fe2, me2]).optional().describe("Data transformation rules for event"), settings: i4.unknown().optional().describe("Destination-specific settings for this event mapping"), condition: i4.string().optional().describe("Condition function as string: return true to process event"), consent: Z4.optional().describe("Not enforced yet. To require consent for a destination, set consent in its config."), policy: ye2.optional().describe("Event-level policy overrides (applied after config-level policy)"), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).optional().describe("Batch scheduling: bare number is the debounce wait window (legacy); object form supports wait/size/age."), include: i4.array(i4.string()).optional().describe('Event sections (e.g. ["context", "globals"]) flattened into context.data'), ignore: i4.boolean().optional().describe("Skip the event entirely. No push, no side effects. Use for suppression."), silent: i4.boolean().optional().describe("Run side effects (settings.identify, ...) but suppress the destination default push call."), extend: Ce2.optional().describe("Merge mode: a partial rule deep-merged onto the package-shipped default at this key (instead of replacing it). A null value clears an inherited field."), remove: i4.array(i4.string()).optional().describe("Dotted paths stripped from the produced data payload after evaluation (applied last).") }).meta({ id: "MappingRule", title: "Mapping.Rule", description: "Configuration for transforming a single event at one stage of the flow (source or destination)." }).describe("Mapping rule for specific entity-action combination");
|
|
4151
|
+
je2 = i4.record(i4.string(), i4.record(i4.string(), i4.union([xe2, i4.array(xe2)])).optional()).meta({ id: "MappingRules", title: "Mapping.Rules", description: 'Event mapping rules tree: entity \u2192 action \u2192 Rule (or Rule[]). Use "*" as wildcard for entity or action.' }).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
|
|
4152
|
+
$e2 = i4.object({ consent: Z4.optional().describe("Required consent states to process any events"), data: i4.union([fe2, me2]).optional().describe("Global data transformation applied to all events"), include: i4.array(i4.string()).optional().describe("Event sections to flatten into context.data"), mapping: je2.optional().describe("Entity-action specific mapping rules"), policy: ye2.optional().describe("Pre-processing policy rules applied before mapping") }).meta({ id: "MappingConfig", title: "Mapping.Config", description: "Shared mapping configuration (consent, data, include, mapping, policy)." }).describe("Shared mapping configuration for sources and destinations");
|
|
4153
|
+
Oe2 = i4.object({ eventMapping: xe2.optional().describe("Resolved mapping rule for event"), mappingKey: i4.string().optional().describe('Mapping key used (e.g., "product.view")') }).meta({ id: "MappingResult", title: "Mapping.Result", description: "Mapping resolution result (matched rule + key)." }).describe("Mapping resolution result");
|
|
4154
|
+
Ee2 = o3(fe2);
|
|
4155
4155
|
Pe2 = o3(ve2);
|
|
4156
|
-
De2 = o3(
|
|
4157
|
-
Ie2 = o3(
|
|
4158
|
-
Ae2 = o3(
|
|
4159
|
-
Te2 =
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
Ne3
|
|
4167
|
-
ze3 = i4.
|
|
4168
|
-
_e2 = i4.
|
|
4169
|
-
Le2 = i4.
|
|
4170
|
-
qe = i4.strictObject({ match:
|
|
4171
|
-
We2 = i4.
|
|
4172
|
-
Ue3 = i4.
|
|
4173
|
-
Be2 = {};
|
|
4174
|
-
|
|
4175
|
-
He3 = i4.
|
|
4176
|
-
Ze3 = i4.
|
|
4177
|
-
|
|
4178
|
-
Ge3
|
|
4179
|
-
Ke2 =
|
|
4180
|
-
Qe2 =
|
|
4181
|
-
Ye3 =
|
|
4182
|
-
Xe2 =
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4156
|
+
De2 = o3(ge2);
|
|
4157
|
+
Ie2 = o3(he2);
|
|
4158
|
+
Ae2 = o3(be2);
|
|
4159
|
+
Te2 = o3(ye2);
|
|
4160
|
+
Re2 = o3(xe2);
|
|
4161
|
+
Me2 = o3(je2);
|
|
4162
|
+
Je3 = o3($e2);
|
|
4163
|
+
Fe3 = {};
|
|
4164
|
+
t4(Fe3, { BatchSchema: () => bt3, ConfigSchema: () => lt3, ContextSchema: () => ut2, DLQSchema: () => $t3, DataSchema: () => vt3, DestinationPolicySchema: () => pt3, DestinationsSchema: () => kt3, InitDestinationsSchema: () => wt3, InitSchema: () => St3, InstanceSchema: () => yt3, PartialConfigSchema: () => dt3, PushBatchContextSchema: () => mt3, PushContextSchema: () => ft3, PushEventSchema: () => gt3, PushEventsSchema: () => ht2, PushResultSchema: () => xt2, RefSchema: () => Ct2, ResultSchema: () => jt3, batchJsonSchema: () => It2, configJsonSchema: () => Ot2, contextJsonSchema: () => Pt2, instanceJsonSchema: () => At3, partialConfigJsonSchema: () => Et2, pushContextJsonSchema: () => Dt3, resultJsonSchema: () => Tt3 });
|
|
4165
|
+
Ne3 = {};
|
|
4166
|
+
t4(Ne3, { MatchExpressionSchema: () => Le2, RouteSchema: () => Ze3 });
|
|
4167
|
+
ze3 = i4.enum(["eq", "contains", "prefix", "suffix", "regex", "gt", "lt", "exists"]).meta({ id: "MatcherOperator", title: "Matcher.Operator", description: "Supported operators for a match condition." });
|
|
4168
|
+
_e2 = i4.object({ key: i4.string(), operator: ze3, value: i4.string(), not: i4.boolean().optional() }).meta({ id: "MatcherCondition", title: "Matcher.Condition", description: "Single match condition (key, operator, value, optional not)." });
|
|
4169
|
+
Le2 = i4.union([_e2, i4.object({ and: i4.array(i4.lazy(() => Le2)) }), i4.object({ or: i4.array(i4.lazy(() => Le2)) })]).meta({ id: "MatcherExpression", title: "Matcher.Expression", description: "Boolean expression tree of match conditions (leaf, and, or)." });
|
|
4170
|
+
qe = i4.strictObject({ match: Le2.optional(), next: i4.lazy(() => Ze3) });
|
|
4171
|
+
We2 = i4.strictObject({ match: Le2.optional(), one: i4.array(i4.lazy(() => Ze3)) });
|
|
4172
|
+
Ue3 = i4.strictObject({ match: Le2.optional(), many: i4.array(i4.lazy(() => Ze3)) });
|
|
4173
|
+
Be2 = i4.strictObject({ match: Le2.optional(), stop: i4.literal(true) });
|
|
4174
|
+
Ve2 = i4.strictObject({ match: Le2 });
|
|
4175
|
+
He3 = i4.union([qe, We2, Ue3, Be2, Ve2]);
|
|
4176
|
+
Ze3 = i4.union([i4.string(), i4.array(i4.lazy(() => Ze3)), He3]).meta({ id: "Route", title: "Route", description: "Recursive route: string ID, sequence of routes, or a RouteConfig (next/one/many/stop/gate). Valid in every chain field." });
|
|
4177
|
+
Ge3 = {};
|
|
4178
|
+
t4(Ge3, { CacheRuleSchema: () => et3, CacheSchema: () => tt3, EventCacheRuleSchema: () => Ke2, EventCacheSchema: () => Qe2, StoreCacheRuleSchema: () => Ye3, StoreCacheSchema: () => Xe2 });
|
|
4179
|
+
Ke2 = i4.object({ match: Le2.optional().describe("Optional match expression \u2014 omit for always-match."), key: i4.array(i4.string()).min(1).describe("Dot-path fields used to build the cache key"), ttl: i4.number().positive().describe("Time-to-live in seconds"), update: i4.record(i4.string(), fe2).optional().describe("Response mutations applied on cache hit (key \u2192 Value mapping)") }).meta({ id: "EventCacheRule", title: "EventCache.Rule", description: "Single event-cache rule: when it applies (match), what event fields it keys off, TTL, and optional response mutations on hit." });
|
|
4180
|
+
Qe2 = i4.object({ stop: i4.boolean().optional().describe("Stop the chain on cache HIT (default: false). When true, skip remaining steps and return cached value."), store: i4.string().optional().describe("Store ID for persistent caching (references a configured store)"), namespace: i4.string().optional().describe("Optional key prefix. Omit to write keys directly to the store. Same store + same key + same namespace = same cache entry."), rules: i4.array(Ke2).min(1).describe("Cache rules \u2014 at least one required") }).meta({ id: "EventCacheConfig", title: "EventCache.Config", description: "Top-level cache configuration for an event-context pipeline step (source / transformer / destination)." });
|
|
4181
|
+
Ye3 = i4.strictObject({ match: Le2.optional().describe("Optional match expression evaluated against `{ key, value? }`. Omit for always-match."), ttl: i4.number().positive().describe("Time-to-live in seconds") }).meta({ id: "StoreCacheRule", title: "StoreCache.Rule", description: "Single store-cache rule: optional match against `{ key, value? }` and a TTL. No `key` (caller provides it) and no `update` (no event to mutate)." });
|
|
4182
|
+
Xe2 = i4.strictObject({ store: i4.string().optional().describe("Store ID for persistent caching (references a configured store)"), namespace: i4.string().min(1).optional().describe("Optional key prefix. Omit to default to the host store id. Empty string is rejected."), rules: i4.array(Ye3).min(1).describe("Cache rules \u2014 at least one required") }).meta({ id: "StoreCacheConfig", title: "StoreCache.Config", description: "Top-level cache configuration for a store wrapper. No `stop` (always falls through on miss); namespace defaults to the host store id." });
|
|
4183
|
+
et3 = Ke2;
|
|
4184
|
+
tt3 = Qe2;
|
|
4185
|
+
nt3 = /^(event|ingest)(\..+)?$/;
|
|
4186
|
+
it2 = /^(event|ingest)\..+$/;
|
|
4187
|
+
st2 = i4.object({ mode: i4.enum(["get", "set"]).describe("Direction: 'get' reads from the store, 'set' writes to it"), store: i4.string().optional().describe("Store id; defaults to the in-memory __cache store when omitted"), key: fe2.describe("Resolves against { event, ingest } to the store key. Paths need an event. or ingest. prefix"), value: fe2.optional().describe("set: resolves against { event, ingest } to the payload to store. get: its path is the write target, event. onto the event or ingest. into the ingest."), mapping: fe2.optional().describe("Shapes the value read (get) or the payload (set). Paths are relative to that value. The result merges into the target.") }).superRefine((e6, t5) => {
|
|
4188
|
+
if (rt3(e6.key, "key", t5, it2), void 0 !== e6.value) {
|
|
4189
|
+
if (rt3(e6.value, "value", t5, "get" === e6.mode ? it2 : nt3), "get" === e6.mode) {
|
|
4186
4190
|
const n6 = e6.value;
|
|
4187
4191
|
let i6;
|
|
4188
4192
|
if ("string" == typeof n6) i6 = n6;
|
|
@@ -4195,165 +4199,165 @@ var init_dev = __esm({
|
|
|
4195
4199
|
}
|
|
4196
4200
|
} else t5.addIssue({ code: "custom", message: `\`value\` is required for mode "${e6.mode}".`, path: ["value"] });
|
|
4197
4201
|
}).meta({ id: "StateConfig", title: "State.Config", description: "Declarative store operation: stash (set) or fetch (get) a value against a store. key names the store slot, value the event or ingest side, mode the direction. Paths resolve against { event, ingest }." });
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
t4(
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
t4(
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
t4(
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
dn2 = o3(cn2);
|
|
4262
|
-
pn2 = {};
|
|
4263
|
-
t4(pn2, { ConfigSchema: () => un2, PartialConfigSchema: () => fn2, configJsonSchema: () => mn2, partialConfigJsonSchema: () => gn2 });
|
|
4264
|
-
un2 = i4.object({ settings: i4.unknown().meta({ id: "StoreSettings", title: "Store.Settings", description: "Implementation-specific configuration (store-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.unknown().meta({ id: "StoreCredentials", title: "Store.Credentials", description: "Optional credentials slot (store-defined shape); back it with a managed secret via $secret.NAME (credentials use $secret, not $env). The per-package shape is supplied via mergeConfigSchema." }).describe("Optional credentials (store-defined shape)").optional(), env: i4.unknown().meta({ id: "StoreEnv", title: "Store.Env", description: "Environment dependencies (store-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Store instance identifier (defaults to store key)").optional(), logger: ot3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during store registration (boolean enables defaults, object configures specifics)"), file: i4.boolean().optional().describe("Persist values as raw bytes (byte-exact), bypassing the structured codec. Default false (structured). Set true only on byte-native stores for asset serving; sheets rejects it.") }).meta({ id: "StoreConfig", title: "Store.Config", description: "Store configuration (settings, env, logger): key-value infrastructure component." }).describe("Store configuration");
|
|
4265
|
-
fn2 = un2.partial().meta({ id: "StorePartialConfig", title: "Store.PartialConfig", description: "Partial store configuration with all fields optional." }).describe("Partial store configuration with all fields optional");
|
|
4202
|
+
at3 = i4.any().meta({ id: "LoggerHandler", title: "Logger.Handler", description: "Custom log handler function (level, ...args) => void" });
|
|
4203
|
+
ct3 = i4.object({ level: i4.union([i4.number(), i4.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: at3.optional().describe("Custom log handler function") }).meta({ id: "LoggerConfig", title: "Logger.Config", description: "Logger configuration (level, handler) to override the collector defaults" });
|
|
4204
|
+
lt3 = i4.object({ consent: Z4.optional().describe("Required consent states to send events to this destination"), settings: i4.any().meta({ id: "DestinationSettings", title: "Destination.Settings", description: "Implementation-specific configuration (destination-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.any().meta({ id: "DestinationCredentials", title: "Destination.Credentials", description: "Optional credentials slot (destination-defined shape); back it with a managed secret via $secret.NAME (credentials use $secret, not $env). The per-package shape is supplied via mergeConfigSchema." }).describe("Optional credentials (destination-defined shape)").optional(), data: i4.union([fe2, me2]).optional().describe("Global data transformation applied to all events for this destination"), include: i4.array(i4.string()).optional().describe("Event sections to flatten into context.data"), env: i4.any().meta({ id: "DestinationEnv", title: "Destination.Env", description: "Environment dependencies (destination-defined shape) \u2014 platform, SDK, or mock hook." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Destination instance identifier (defaults to destination key)").optional(), init: i4.boolean().describe("Whether to initialize immediately").optional(), loadScript: i4.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: je2.optional().describe("Entity-action specific mapping rules for this destination"), policy: ye2.optional().describe("Pre-processing policy rules applied before event mapping"), queue: i4.boolean().describe("Whether a destination added later receives events pushed earlier in the current run (default true). Consent-denied events are queued regardless.").optional(), require: i4.array(i4.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'), logger: ct3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during destination registration (boolean enables defaults, object configures specifics)"), before: Ze3.optional().describe("Transformer chain run for this destination only, before it receives the event."), next: Ze3.optional().describe("Post-push transformer chain. Runs after destination push completes; push response is available at ingest._response."), cache: Qe2.optional().describe("Cache configuration for deduplication; skip push on cache HIT"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set operations applied around this destination"), disabled: i4.boolean().describe("Completely skip this destination (no init, no push, no queue)").optional(), mock: i4.unknown().meta({ id: "DestinationMock", title: "Destination.Mock", description: "Return this value instead of calling push(). Dev/testing only." }).optional().describe("Return this value instead of calling push(). Dev/testing only."), queueMax: i4.number().optional().describe("Maximum consent-denied events retained in queuePush for this destination. FIFO drop on overflow. Default 1000."), dlqMax: i4.number().optional().describe("Maximum failed-push entries retained in dlq for this destination. FIFO drop on overflow. Default 100."), timeout: i4.number().optional().describe("Per-destination delivery timeout in ms (default 10000); a delivery that does not settle in this window is routed to the DLQ like a thrown push."), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).optional().describe("Enables batching for all of this destination's events into one shared default buffer; a mapping rule's own batch splits that entity-action into its own buffer and overrides per field. Bare number is the debounce wait window; object form supports wait (debounce ms), size (count cap, default 1000), age (max ms since first entry, default 30000)."), breaker: i4.union([i4.number(), i4.object({ threshold: i4.number().optional(), cooldown: i4.number().optional() })]).optional().describe("Per-destination circuit breaker (presence-gated). After threshold consecutive transport failures the breaker opens and events are skipped until cooldown ms elapse, then one probe is admitted; success closes it, failure re-opens it. Partial-batch row failures are breaker-neutral. Bare number is the threshold; object form supports threshold (default 5) and cooldown (default 30000ms).") }).meta({ id: "DestinationConfig", title: "Destination.Config", description: "Destination configuration: consent, settings, data, env, mapping rules, policy, queue, logger, before/next chains, cache." }).describe("Destination configuration");
|
|
4205
|
+
dt3 = lt3.partial().meta({ id: "DestinationPartialConfig", title: "Destination.PartialConfig", description: "Partial destination configuration with all fields optional." }).describe("Partial destination configuration with all fields optional");
|
|
4206
|
+
pt3 = ye2.describe("Destination policy rules for event pre-processing");
|
|
4207
|
+
ut2 = i4.object({ collector: i4.unknown().meta({ id: "DestinationContextCollector", title: "Collector.Instance", description: "Collector instance handed to the destination (runtime object)." }).describe("Collector instance (runtime object)"), config: lt3.describe("Destination configuration"), data: i4.union([i4.unknown(), i4.array(i4.unknown())]).optional().describe("Transformed event data"), env: i4.unknown().meta({ id: "DestinationContextEnv", title: "Destination.Env", description: "Environment dependencies (destination-defined shape)." }).describe("Environment dependencies") }).meta({ id: "DestinationContext", title: "Destination.Context", description: "Destination context passed to init and push functions." }).describe("Destination context for init and push functions");
|
|
4208
|
+
ft3 = ut2.extend({ mapping: xe2.optional().describe("Resolved mapping rule for this specific event") }).meta({ id: "DestinationPushContext", title: "Destination.PushContext", description: "Destination context for push() with the resolved event mapping rule." }).describe("Push context with event-specific mapping");
|
|
4209
|
+
mt3 = ft3.describe("Batch push context with event-specific mapping");
|
|
4210
|
+
gt3 = i4.object({ event: ee3.describe("The event to process"), mapping: xe2.optional().describe("Mapping rule for this event") }).meta({ id: "DestinationPushEvent", title: "Destination.PushEvent", description: "Single event paired with its resolved mapping rule (batch element)." }).describe("Event with optional mapping for batch processing");
|
|
4211
|
+
ht2 = i4.array(gt3).meta({ id: "DestinationPushEvents", title: "Destination.PushEvents", description: "Array of events with mappings (batch input)." }).describe("Array of events with mappings");
|
|
4212
|
+
bt3 = i4.object({ key: i4.string().describe('Batch key (usually mapping key like "product.view")'), events: i4.array(ee3).describe("Array of events in batch"), data: i4.array(i4.union([i4.unknown(), i4.array(i4.unknown())]).optional()).describe("Transformed data for each event"), mapping: xe2.optional().describe("Shared mapping rule for batch") }).meta({ id: "DestinationBatch", title: "Destination.Batch", description: "Batch of events grouped by mapping key for batch delivery." }).describe("Batch of events grouped by mapping key");
|
|
4213
|
+
vt3 = i4.union([i4.unknown(), i4.array(i4.unknown())]).meta({ id: "DestinationData", title: "Destination.Data", description: "Transformed event data delivered to the destination (Property, undefined, or array)." }).optional().describe("Transformed event data (Property, undefined, or array)");
|
|
4214
|
+
yt3 = i4.object({ config: lt3.describe("Destination configuration"), queue: i4.array(ee3).optional().describe("Queued events awaiting consent"), dlq: i4.array(i4.tuple([ee3, i4.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: i4.string().optional().describe("Destination type identifier"), env: i4.unknown().optional().describe("Environment dependencies"), init: i4.unknown().optional().describe("Initialization function"), push: i4.unknown().describe("Push function for single events"), pushBatch: i4.unknown().optional().describe("Batch push function"), on: i4.unknown().optional().describe("Event lifecycle hook function") }).meta({ id: "DestinationInstance", title: "Destination.Instance", description: "Destination instance (runtime object with init/push/pushBatch/on)." }).describe("Destination instance (runtime object with functions)");
|
|
4215
|
+
St3 = i4.object({ code: yt3.describe("Destination instance with implementation"), config: dt3.optional().describe("Partial configuration overrides"), env: i4.unknown().optional().describe("Partial environment overrides") }).meta({ id: "DestinationInit", title: "Destination.Init", description: "Destination initialization bundle (instance code + config + env)." }).describe("Destination initialization configuration");
|
|
4216
|
+
wt3 = i4.record(i4.string(), St3).meta({ id: "DestinationInitDestinations", title: "Destination.InitDestinations", description: "Map of destination IDs to initialization configurations." }).describe("Map of destination IDs to initialization configurations");
|
|
4217
|
+
kt3 = i4.record(i4.string(), yt3).meta({ id: "DestinationDestinations", title: "Destination.Destinations", description: "Map of destination IDs to runtime destination instances." }).describe("Map of destination IDs to runtime instances");
|
|
4218
|
+
Ct2 = i4.object({ type: i4.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: i4.unknown().optional().describe("Response from push()"), error: i4.unknown().optional().describe("Error if failed") }).meta({ id: "DestinationRef", title: "Destination.Ref", description: "Reference to a destination outcome (type + response data or error)." }).describe("Destination reference with type and response data");
|
|
4219
|
+
xt2 = i4.object({ queue: i4.array(ee3).optional().describe("Events queued (awaiting consent)"), error: i4.unknown().optional().describe("Error if push failed") }).meta({ id: "DestinationPushResult", title: "Destination.PushResult", description: "Result of a single destination push (queued events, optional error)." }).describe("Push operation result");
|
|
4220
|
+
jt3 = i4.object({ ok: i4.boolean().describe("True if nothing failed"), event: i4.unknown().optional().describe("The processed event"), done: i4.record(i4.string(), Ct2).optional().describe("Destinations that processed successfully"), queued: i4.record(i4.string(), Ct2).optional().describe("Destinations that queued events"), failed: i4.record(i4.string(), Ct2).optional().describe("Destinations that failed to process") }).meta({ id: "DestinationResult", title: "Destination.Result", description: "Overall push result aggregated across all destinations (done/queued/failed maps)." }).describe("Push result with destination outcomes");
|
|
4221
|
+
$t3 = i4.array(i4.tuple([ee3, i4.unknown()])).meta({ id: "DestinationDLQ", title: "Destination.DLQ", description: "Dead-letter queue: list of [event, error] tuples." }).describe("Dead letter queue: [(event, error), ...]");
|
|
4222
|
+
Ot2 = o3(lt3);
|
|
4223
|
+
Et2 = o3(dt3);
|
|
4224
|
+
Pt2 = o3(ut2);
|
|
4225
|
+
Dt3 = o3(ft3);
|
|
4226
|
+
It2 = o3(bt3);
|
|
4227
|
+
At3 = o3(yt3);
|
|
4228
|
+
Tt3 = o3(jt3);
|
|
4229
|
+
Rt3 = {};
|
|
4230
|
+
t4(Rt3, { CommandTypeSchema: () => Mt2, ConfigSchema: () => Jt2, DestinationsSchema: () => Lt3, InitConfigSchema: () => Nt2, InstanceSchema: () => qt2, PushContextSchema: () => zt2, SessionDataSchema: () => Ft3, SourcesSchema: () => _t2, commandTypeJsonSchema: () => Wt2, configJsonSchema: () => Ut3, initConfigJsonSchema: () => Vt2, instanceJsonSchema: () => Zt2, pushContextJsonSchema: () => Ht2, sessionDataJsonSchema: () => Bt2 });
|
|
4231
|
+
Mt2 = i4.union([i4.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), i4.string()]).meta({ id: "CollectorCommandType", title: "Collector.CommandType", description: "Collector command type identifier (standard or extension string)." }).describe("Collector command type: standard commands or custom string for extensions");
|
|
4232
|
+
Jt2 = i4.object({ run: i4.boolean().describe("Whether to run collector automatically on initialization").optional(), globalsStatic: B3.describe("Static global properties that persist across collector runs"), sessionStatic: i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorSessionStatic", title: "Collector.SessionStatic", description: "Static session data that persists across collector runs." }).describe("Static session data that persists across collector runs"), logger: ct3.optional().describe("Logger configuration (level, handler)"), queueMax: i4.number().optional().describe("Maximum events retained in collector.queue (late-registration replay). FIFO drop on overflow. Default 1000."), name: i4.string().optional().describe("Flow name; keys this flow's entry in event.source.release and the observer flowId."), release: i4.string().optional().describe("Config release id stamped into event.source.release for this flow."), next: Ze3.optional().describe("Collector chain: runs once per completed event before the destination fan-out. A stop drops the event for every destination.") }).meta({ id: "CollectorConfig", title: "Collector.Config", description: "Core collector configuration (globals/session statics, logger, buffer bounds)." }).describe("Core collector configuration");
|
|
4233
|
+
Ft3 = B3.and(i4.object({ isStart: i4.boolean().describe("Whether this is a new session start"), storage: i4.boolean().describe("Whether storage is available"), id: c2.describe("Session identifier").optional(), start: l3.describe("Session start timestamp").optional(), marketing: i4.literal(true).optional().describe("Marketing attribution flag"), updated: l3.describe("Last update timestamp").optional(), isNew: i4.boolean().describe("Whether this is a new session").optional(), device: c2.describe("Device identifier").optional(), count: d2.describe("Event count in session").optional(), runs: d2.describe("Number of runs").optional() })).meta({ id: "CollectorSessionData", title: "Collector.SessionData", description: "Session state and tracking data." }).describe("Session state and tracking data");
|
|
4234
|
+
Nt2 = Jt2.partial().extend({ consent: Z4.optional().describe("Initial consent state"), user: G3.optional().describe("Initial user data"), globals: B3.optional().describe("Initial global properties"), sources: i4.unknown().meta({ id: "CollectorInitSources", title: "Source.InitSources", description: "Source configurations map (id \u2192 InitSource)." }).optional().describe("Source configurations"), destinations: i4.unknown().meta({ id: "CollectorInitDestinations", title: "Destination.InitDestinations", description: "Destination configurations map (id \u2192 Init)." }).optional().describe("Destination configurations"), transformers: i4.unknown().meta({ id: "CollectorInitTransformers", title: "Transformer.Configs", description: "Transformer configurations map (id \u2192 Config)." }).optional().describe("Transformer configurations"), stores: i4.unknown().meta({ id: "CollectorInitStores", title: "Store.Configs", description: "Store configurations map (id \u2192 Config)." }).optional().describe("Store configurations"), custom: B3.optional().describe("Initial custom implementation-specific properties"), hooks: i4.unknown().meta({ id: "CollectorHooks", title: "Collector.Hooks", description: "Pipeline observation hooks." }).optional().describe("Pipeline observation hooks"), observe: i4.union([i4.object({ url: i4.string().describe("Observer base URL"), binding: i4.string().describe("Public project binding the web credential must match") }), i4.object({ url: i4.string().describe("Observer base URL"), sessionId: i4.string().describe("Session id the runtime posts under"), token: i4.string().describe("Ingest bearer token"), level: i4.enum(["off", "standard", "trace"]).optional().describe("Telemetry level"), sample: i4.number().optional().describe("Deterministic sample fraction in [0, 1]") })]).meta({ id: "CollectorObserve", title: "Observe", description: "Observation session connect config: web arm (url + binding) or server arm (url + sessionId + token)." }).optional().describe("Observation session connect config"), observers: i4.unknown().meta({ id: "CollectorObservers", title: "Collector.Observers", description: "Caller-supplied advisory observer functions (runtime objects)." }).optional().describe("Caller-supplied advisory observer functions") }).meta({ id: "CollectorInitConfig", title: "Collector.InitConfig", description: "Collector initialization configuration with initial state (consent, user, globals, components, hooks)." }).describe("Collector initialization configuration with initial state");
|
|
4235
|
+
zt2 = i4.object({ mapping: $e2.optional().describe("Source-level mapping configuration") }).meta({ id: "CollectorPushContext", title: "Collector.PushContext", description: "Push context with optional source-level mapping." }).describe("Push context with optional source mapping");
|
|
4236
|
+
_t2 = i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorSources", title: "Collector.Sources", description: "Map of source IDs to runtime source instances." }).describe("Map of source IDs to source instances");
|
|
4237
|
+
Lt3 = i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorDestinations", title: "Collector.Destinations", description: "Map of destination IDs to runtime destination instances." }).describe("Map of destination IDs to destination instances");
|
|
4238
|
+
qt2 = i4.object({ push: i4.unknown().describe("Push function for processing events"), command: i4.unknown().describe("Command function for walker commands"), allowed: i4.boolean().describe("Whether event processing is allowed"), config: Jt2.describe("Current collector configuration"), consent: Z4.describe("Current consent state"), custom: B3.describe("Custom implementation-specific properties"), sources: _t2.describe("Registered source instances"), destinations: Lt3.describe("Registered destination instances"), globals: B3.describe("Current global properties"), hooks: i4.unknown().describe("Lifecycle hook functions"), on: i4.unknown().describe("Event lifecycle configuration"), queue: i4.array(ee3).describe("Queued events awaiting processing"), round: i4.number().describe("Collector run count (increments with each run)"), session: i4.union([Ft3]).describe("Current session state"), timing: i4.number().describe("Event processing timing information"), user: G3.describe("Current user data") }).meta({ id: "CollectorInstance", title: "Collector.Instance", description: "Collector instance (runtime object with push/command + full state and component maps)." }).describe("Collector instance with state and methods");
|
|
4239
|
+
Wt2 = o3(Mt2);
|
|
4240
|
+
Ut3 = o3(Jt2);
|
|
4241
|
+
Bt2 = o3(Ft3);
|
|
4242
|
+
Vt2 = o3(Nt2);
|
|
4243
|
+
Ht2 = o3(zt2);
|
|
4244
|
+
Zt2 = o3(qt2);
|
|
4245
|
+
Gt2 = {};
|
|
4246
|
+
t4(Gt2, { BaseEnvSchema: () => Kt2, ConfigSchema: () => Qt2, InitSchema: () => en2, InitSourceSchema: () => tn2, InitSourcesSchema: () => nn2, InstanceSchema: () => Xt2, PartialConfigSchema: () => Yt2, baseEnvJsonSchema: () => on, configJsonSchema: () => rn2, initSourceJsonSchema: () => cn2, initSourcesJsonSchema: () => ln2, instanceJsonSchema: () => an2, partialConfigJsonSchema: () => sn2 });
|
|
4247
|
+
Kt2 = i4.object({ push: i4.unknown().meta({ id: "SourcePushFn", title: "Source.PushFn", description: "Collector push function passed to the source via dependency injection." }).describe("Collector push function"), command: i4.unknown().meta({ id: "SourceCommandFn", title: "Source.CommandFn", description: "Collector command function passed to the source." }).describe("Collector command function"), sources: i4.unknown().optional().describe("Map of registered source instances"), elb: i4.unknown().meta({ id: "ElbFn", title: "Elb.Fn", description: "Public `elb(...)` API function alias for collector.push." }).describe("Public API function (alias for collector.push)") }).catchall(i4.unknown()).meta({ id: "SourceBaseEnv", title: "Source.BaseEnv", description: "Base environment for source dependency injection; platform-specific sources extend this." }).describe("Base environment for dependency injection - platform-specific sources extend this");
|
|
4248
|
+
Qt2 = $e2.extend({ settings: i4.any().meta({ id: "SourceSettings", title: "Source.Settings", description: "Implementation-specific configuration (source-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.any().meta({ id: "SourceCredentials", title: "Source.Credentials", description: "Optional credentials slot (source-defined shape); back it with a managed secret via $secret.NAME (credentials use $secret, not $env). The per-package shape is supplied via mergeConfigSchema." }).describe("Optional credentials (source-defined shape)").optional(), env: Kt2.optional().describe("Environment dependencies (platform-specific)"), id: c2.describe("Source identifier (defaults to source key)").optional(), primary: i4.boolean().describe("Mark as primary (only one can be primary)").optional(), require: i4.array(i4.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'), logger: ct3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), async: i4.union([i4.boolean(), i4.record(i4.string(), i4.boolean())]).optional().describe('Respond-first acknowledgement for response-producing server sources. When true the source responds 2xx ("accepted") before the event is delivered; when false it waits for delivery to settle and the response reflects the outcome. A record configures this per source-defined key: the express source keys it by HTTP method (GET/POST) and defaults to { GET: false, POST: true }. Browser/dataLayer sources have no HTTP response to defer and ignore it. A 2xx means accepted, not delivered. Defaults are per source type.'), setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during source registration (boolean enables defaults, object configures specifics)"), ingest: i4.union([fe2, me2]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax."), disabled: i4.boolean().describe("Completely skip this source (no init, no event capture)").optional(), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set operations applied around this source"), init: i4.boolean().optional().describe("Init lifecycle flag set by collector to true after Instance.init() runs") }).meta({ id: "SourceConfig", title: "Source.Config", description: "Source configuration with mapping, environment, and lifecycle hooks." }).describe("Source configuration with mapping and environment");
|
|
4249
|
+
Yt2 = Qt2.partial().meta({ id: "SourcePartialConfig", title: "Source.PartialConfig", description: "Partial source configuration with all fields optional." }).describe("Partial source configuration with all fields optional");
|
|
4250
|
+
Xt2 = i4.object({ type: i4.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Qt2.describe("Current source configuration"), push: i4.any().meta({ id: "SourceInstancePushFn", title: "Source.PushFn", description: "Push function \u2014 THE HANDLER (flexible signature for platform compatibility)." }).describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: i4.any().meta({ id: "SourceDestroyFn", title: "Source.DestroyFn", description: "Cleanup function called when the source is removed." }).optional().describe("Cleanup function called when source is removed"), on: i4.unknown().optional().describe("Lifecycle hook function for event types") }).meta({ id: "SourceInstance", title: "Source.Instance", description: "Source instance (runtime object with push handler and lifecycle methods)." }).describe("Source instance with push handler and lifecycle methods");
|
|
4251
|
+
en2 = i4.any().meta({ id: "SourceInit", title: "Source.Init", description: "Source initialization function: (config, env) => Instance | Promise<Instance>." }).describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
|
|
4252
|
+
tn2 = i4.object({ code: en2.describe("Source initialization function"), config: Yt2.optional().describe("Partial configuration overrides"), env: Kt2.partial().optional().describe("Partial environment overrides"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set operations applied around this source"), primary: i4.boolean().optional().describe("Mark as primary source (only one can be primary)") }).meta({ id: "SourceInitSource", title: "Source.InitSource", description: "Source initialization bundle (init function + config + env + primary flag)." }).describe("Source initialization configuration");
|
|
4253
|
+
nn2 = i4.record(i4.string(), tn2).meta({ id: "SourceInitSources", title: "Source.InitSources", description: "Map of source IDs to initialization configurations." }).describe("Map of source IDs to initialization configurations");
|
|
4254
|
+
on = o3(Kt2);
|
|
4255
|
+
rn2 = o3(Qt2);
|
|
4256
|
+
sn2 = o3(Yt2);
|
|
4257
|
+
an2 = o3(Xt2);
|
|
4258
|
+
cn2 = o3(tn2);
|
|
4259
|
+
ln2 = o3(nn2);
|
|
4260
|
+
dn2 = {};
|
|
4261
|
+
t4(dn2, { ConfigSchema: () => pn2, PartialConfigSchema: () => un2, configJsonSchema: () => fn2, partialConfigJsonSchema: () => mn2 });
|
|
4262
|
+
pn2 = i4.object({ settings: i4.any().meta({ id: "TransformerSettings", title: "Transformer.Settings", description: "Implementation-specific configuration (transformer-defined shape)." }).describe("Implementation-specific configuration").optional(), env: i4.any().meta({ id: "TransformerEnv", title: "Transformer.Env", description: "Environment dependencies (transformer-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Transformer instance identifier (defaults to transformer key)").optional(), logger: ct3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), before: Ze3.optional().describe("Pre-transformer chain that runs before this transformer pushes"), next: Ze3.optional().describe("Graph wiring to the next transformer in the chain"), cache: Qe2.optional().describe("Step-level cache configuration for this transformer"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set operations applied around this transformer"), init: i4.boolean().describe("Whether to initialize immediately").optional(), disabled: i4.boolean().describe("Completely skip this transformer in chains").optional(), mock: i4.unknown().meta({ id: "TransformerMock", title: "Transformer.Mock", description: "Return this value instead of calling push(). Dev/testing only." }).optional().describe("Return this value instead of calling push(). Global mock for all chains. Dev/testing only."), chainMocks: i4.record(i4.string(), i4.unknown().meta({ id: "TransformerChainMock", title: "Transformer.ChainMock", description: "Chain-path-specific mock value. Dev/testing only." })).optional().describe("Path-specific mock values keyed by chain path. Takes precedence over global mock. Dev/testing only."), mapping: $e2.optional().describe("Declarative event-to-event mapping applied when this transformer step has no code; wins over the step-level mapping. At this position, only event-mutating fields apply (policy, and per rule condition, policy, name, ignore); consent, include, data, remove, batch, settings, extend and silent do nothing and are warned about at init.") }).strict().meta({ id: "TransformerConfig", title: "Transformer.Config", description: "Transformer configuration (settings, env, chain wiring, cache, mocks)." }).describe("Transformer configuration");
|
|
4263
|
+
un2 = pn2.partial().meta({ id: "TransformerPartialConfig", title: "Transformer.PartialConfig", description: "Partial transformer configuration with all fields optional." }).describe("Partial transformer configuration with all fields optional");
|
|
4264
|
+
fn2 = o3(pn2);
|
|
4266
4265
|
mn2 = o3(un2);
|
|
4267
|
-
gn2 =
|
|
4268
|
-
hn2
|
|
4269
|
-
|
|
4270
|
-
bn2 =
|
|
4271
|
-
vn2 =
|
|
4272
|
-
yn2 =
|
|
4273
|
-
Sn2 =
|
|
4274
|
-
|
|
4275
|
-
|
|
4266
|
+
gn2 = {};
|
|
4267
|
+
t4(gn2, { ConfigSchema: () => hn2, PartialConfigSchema: () => bn2, configJsonSchema: () => vn2, partialConfigJsonSchema: () => yn2 });
|
|
4268
|
+
hn2 = i4.object({ settings: i4.unknown().meta({ id: "StoreSettings", title: "Store.Settings", description: "Implementation-specific configuration (store-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.unknown().meta({ id: "StoreCredentials", title: "Store.Credentials", description: "Optional credentials slot (store-defined shape); back it with a managed secret via $secret.NAME (credentials use $secret, not $env). The per-package shape is supplied via mergeConfigSchema." }).describe("Optional credentials (store-defined shape)").optional(), env: i4.unknown().meta({ id: "StoreEnv", title: "Store.Env", description: "Environment dependencies (store-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Store instance identifier (defaults to store key)").optional(), logger: ct3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during store registration (boolean enables defaults, object configures specifics)"), file: i4.boolean().optional().describe("Persist values as raw bytes (byte-exact), bypassing the structured codec. Default false (structured). Set true only on byte-native stores for asset serving; sheets rejects it.") }).meta({ id: "StoreConfig", title: "Store.Config", description: "Store configuration (settings, env, logger): key-value infrastructure component." }).describe("Store configuration");
|
|
4269
|
+
bn2 = hn2.partial().meta({ id: "StorePartialConfig", title: "Store.PartialConfig", description: "Partial store configuration with all fields optional." }).describe("Partial store configuration with all fields optional");
|
|
4270
|
+
vn2 = o3(hn2);
|
|
4271
|
+
yn2 = o3(bn2);
|
|
4272
|
+
Sn2 = {};
|
|
4273
|
+
t4(Sn2, { BundlePackageSchema: () => En2, BundleSchema: () => Pn3, CodeSchema: () => Dn, ConfigSchema: () => Hn3, ContractActionsSchema: () => qn2, ContractEventsSchema: () => Wn3, ContractRuleSchema: () => Un2, ContractSchema: () => Bn3, ContractSchemaEntry: () => Ln2, DestinationSchema: () => zn2, FlowSchema: () => Zn, JsonSchema: () => Gn3, JsonSchemaSchema: () => Rn2, ObserveSchema: () => Vn2, SettingsSchema: () => $n, SourceSchema: () => Fn3, StepExampleSchema: () => An, StepExamplesSchema: () => Tn2, StoreSchema: () => _n2, TransformerSchema: () => Nn2, TriggerDescriptorSchema: () => In, ValidateEventsSchema: () => Mn, VariablesSchema: () => Cn2, configJsonSchema: () => ei, contractJsonSchema: () => ci, contractRuleJsonSchema: () => ai, destinationJsonSchema: () => oi, flowConfigJsonSchema: () => ni, flowJsonSchema: () => ti, parseConfig: () => Kn2, parseFlow: () => Yn2, safeParseConfig: () => Qn3, safeParseFlow: () => Xn2, sourceJsonSchema: () => ii, storeJsonSchema: () => si, transformerJsonSchema: () => ri, validateEventsJsonSchema: () => li });
|
|
4274
|
+
wn2 = ["elb", "elbLayer", "window", "document", "location", "self", "top", "parent", "frames", "globalThis", "__proto__", "constructor", "prototype"];
|
|
4275
|
+
kn2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
4276
|
+
Cn2 = i4.record(i4.string(), i4.unknown()).meta({ id: "FlowVariables", title: "Flow.Variables", description: "Reusable values referenced via $var.name (with optional deep paths). Whole-string refs preserve native type; inline interpolation requires scalars." });
|
|
4277
|
+
xn = /\$(?:var|env)\./;
|
|
4278
|
+
jn = i4.string().superRefine((e6, t5) => {
|
|
4279
|
+
if (xn.test(e6)) return;
|
|
4276
4280
|
const n6 = (function(e7) {
|
|
4277
|
-
return "string" != typeof e7 ? { ok: false, reason: "is not a string" } :
|
|
4281
|
+
return "string" != typeof e7 ? { ok: false, reason: "is not a string" } : kn2.test(e7) ? wn2.includes(e7) ? { ok: false, reason: `is reserved (${wn2.join(", ")})` } : { ok: true, name: e7 } : { ok: false, reason: "is not a JavaScript identifier (letters, digits, _ or $, not starting with a digit)" };
|
|
4278
4282
|
})(e6);
|
|
4279
4283
|
n6.ok || t5.addIssue({ code: "custom", message: `windowCollector ${JSON.stringify(e6)} ${n6.reason}` });
|
|
4280
4284
|
});
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
t4(
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4285
|
+
$n = i4.looseObject({ windowCollector: jn.optional().describe('Web: global variable name of the collector instance (default: "walkerOS").') }).meta({ id: "FlowSettings", title: "Flow.Settings", description: "Free-form key-value settings consumed by the platform runtime." }).describe("Free-form platform settings bag");
|
|
4286
|
+
On2 = /^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/;
|
|
4287
|
+
En2 = i4.object({ version: i4.string().optional(), imports: i4.array(i4.string()).optional(), path: i4.string().optional() }).meta({ id: "FlowBundlePackage", title: "Flow.BundlePackage", description: "Per-package bundle spec (version / imports / local path)." });
|
|
4288
|
+
Pn3 = i4.object({ packages: i4.record(i4.string().regex(On2, "Invalid npm package name"), En2).optional().describe("NPM packages to bundle, keyed by package name"), overrides: i4.record(i4.string().regex(On2, "Invalid npm package name"), i4.string().min(1, "Override version cannot be empty")).optional().describe("Transitive dependency version pins"), traceInclude: i4.array(i4.string()).optional().describe("Extra paths or globs the bundler must include in the trace output (server flows only)"), env: i4.record(i4.string(), i4.string()).optional().describe("Declared build-time values for web $env references (inlined into public bundles, never secrets)") }).strict().meta({ id: "FlowBundle", title: "Flow.Bundle", description: "Bundle configuration (packages + overrides + traceInclude + env)." }).describe("Bundle configuration (packages + overrides + traceInclude + env)");
|
|
4289
|
+
Dn = i4.object({ push: i4.string().min(1, "Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix.'), type: i4.string().optional().describe("Optional type identifier for the inline instance"), init: i4.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.") }).meta({ id: "FlowCode", title: "Flow.Code", description: "Inline code block (object form) for custom sources / transformers / destinations / stores. Use `import` on the step to select a named export from a package." }).describe("Inline code for custom components (object form)");
|
|
4290
|
+
In = i4.object({ type: i4.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"), options: i4.unknown().optional().describe("Mechanism-specific options") }).meta({ id: "TriggerDescriptor", title: "Trigger.Descriptor", description: "Source trigger metadata (mechanism + options) used by step examples." });
|
|
4291
|
+
An = i4.object({ title: i4.string().optional().describe("Human-readable title (overrides default heading)"), description: i4.string().optional().describe("Human-readable description"), public: i4.boolean().optional().describe("Whether this example is shown in docs/UI/MCP default output (default: true). Set false for test-only fixtures."), in: i4.unknown().optional().describe("Input to the step"), trigger: In.optional().describe("Source trigger metadata"), mapping: i4.unknown().optional().describe("Mapping configuration"), out: i4.unknown().optional().describe("Expected output from the step"), command: i4.enum(["config", "consent", "user", "run"]).optional().describe("Invoke elb('walker <command>', in) instead of pushing in as an event") }).meta({ id: "FlowStepExample", title: "Flow.StepExample", description: "Named example with input/output pair used for step testing." }).describe("Named example with input/output pair");
|
|
4292
|
+
Tn2 = i4.record(i4.string(), An).meta({ id: "FlowStepExamples", title: "Flow.StepExamples", description: "Named step examples keyed by scenario name." }).describe("Named step examples for testing and documentation");
|
|
4293
|
+
Rn2 = i4.record(i4.string(), i4.unknown()).meta({ id: "JsonSchema", title: "JsonSchema", description: "Structural JSON Schema fragment (Record<string, unknown>)" });
|
|
4294
|
+
Mn = i4.record(i4.string(), i4.record(i4.string(), Rn2)).meta({ id: "ValidateEvents", title: "ValidateEvents", description: "Entity-action keyed JSON Schemas" }).describe("Entity-action keyed JSON Schemas");
|
|
4295
|
+
Fn3 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'), code: Dn.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during source registration (boolean enables defaults, object configures specifics)"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set, run before the collector receives the event. Takes precedence over a step-level state.") }).meta({ id: "FlowSourceConfig", title: "Source.Config", description: "Source-specific configuration object (Source.Config)." }).optional().describe("Source-specific configuration object"), env: i4.unknown().meta({ id: "FlowSourceEnv", title: "Source.BaseEnv", description: "Source environment configuration (Source.BaseEnv overrides)." }).optional().describe("Source environment configuration"), primary: i4.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: Cn2.optional().describe("Source-level variables (highest priority in cascade)"), next: Ze3.optional().describe("Pre-collector transformer chain. String, string[], or Route[] for conditional routing on ingest and event data."), before: Ze3.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: Tn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Qe2.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set for this source. Paths resolve against { event, ingest }.") }).strict().meta({ id: "FlowSource", title: "Flow.Source", description: "Source package reference with configuration, env, chains, and examples." }).describe("Source package reference with configuration").superRefine(Jn2);
|
|
4296
|
+
Nn2 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: Dn.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.unknown().meta({ id: "FlowTransformerConfig", title: "Transformer.Config", description: "Transformer-specific configuration object." }).optional().describe("Transformer-specific configuration object"), env: i4.unknown().meta({ id: "FlowTransformerEnv", title: "Transformer.Env", description: "Transformer environment configuration." }).optional().describe("Transformer environment configuration"), before: Ze3.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Ze3.optional().describe("Next transformer in chain. String, string[], or Route[] for conditional routing."), variables: Cn2.optional().describe("Transformer-level variables (highest priority in cascade)"), examples: Tn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Qe2.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set for this transformer. Paths resolve against { event, ingest }."), mapping: i4.unknown().optional().describe("Event mapping for a code-free transformer. The collector applies it to the event; a rule with ignore: true drops it.") }).meta({ id: "FlowTransformer", title: "Flow.Transformer", description: "Transformer package reference with configuration, env, chains, and cache." }).describe("Transformer package reference with configuration").superRefine(Jn2);
|
|
4297
|
+
zn2 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'), code: Dn.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during destination registration (boolean enables defaults, object configures specifics)") }).meta({ id: "FlowDestinationConfig", title: "Destination.Config", description: "Destination-specific configuration object." }).optional().describe("Destination-specific configuration object"), env: i4.unknown().meta({ id: "FlowDestinationEnv", title: "Destination.Env", description: "Destination environment configuration." }).optional().describe("Destination environment configuration"), variables: Cn2.optional().describe("Destination-level variables (highest priority in cascade)"), before: Ze3.optional().describe("Transformer chain run for this destination only, before it receives the event. String, string[], or a Route for conditional routing."), next: Ze3.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: Tn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Qe2.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)"), state: i4.union([st2, i4.array(st2)]).optional().describe("Declarative store get/set for this destination. Paths resolve against { event, ingest }.") }).meta({ id: "FlowDestination", title: "Flow.Destination", description: "Destination package reference with configuration, env, chains, and cache." }).describe("Destination package reference with configuration").superRefine(Jn2);
|
|
4298
|
+
_n2 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: Dn.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during store registration (boolean enables defaults, object configures specifics)") }).meta({ id: "FlowStoreConfig", title: "Store.Config", description: "Store-specific configuration object." }).optional().describe("Store-specific configuration object"), env: i4.unknown().meta({ id: "FlowStoreEnv", title: "Store.Env", description: "Store environment configuration." }).optional().describe("Store environment configuration"), cache: Xe2.optional().describe("Cache configuration for this store (TTL-only rules, optional recursive `cache.store`)"), variables: Cn2.optional().describe("Store-level variables (highest priority in cascade)"), examples: Tn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).meta({ id: "FlowStore", title: "Flow.Store", description: "Store package reference with configuration, env, cache, and examples." }).describe("Store package reference with configuration").superRefine(Jn2);
|
|
4299
|
+
Ln2 = i4.record(i4.string(), i4.unknown()).meta({ id: "FlowContractSchemaEntry", title: "Flow.ContractSchemaEntry", description: "JSON Schema object for event validation with description/examples annotations." }).describe("JSON Schema object for event validation with description/examples annotations");
|
|
4300
|
+
qn2 = i4.record(i4.string(), Ln2).meta({ id: "FlowContractActions", title: "Flow.ContractActions", description: "Action-level contract entries keyed by action name." }).describe("Action-level contract entries");
|
|
4301
|
+
Wn3 = i4.record(i4.string(), qn2).meta({ id: "FlowContractEvents", title: "Flow.ContractEvents", description: "Entity-action event schemas (entity \u2192 action \u2192 schema)." }).describe("Entity-action event schemas");
|
|
4302
|
+
Un2 = i4.object({ extend: i4.string().optional(), tagging: i4.number().optional(), description: i4.string().optional(), events: Mn.optional(), schema: Rn2.optional() }).meta({ id: "ContractRule", title: "Flow.ContractRule", description: "Named contract entry" });
|
|
4303
|
+
Bn3 = i4.record(i4.string(), Un2).meta({ id: "FlowContract", title: "Flow.Contract", description: "Named contracts map with optional extend inheritance." }).describe("Named contracts with optional extend inheritance");
|
|
4304
|
+
Vn2 = i4.object({ level: i4.enum(["off", "standard", "trace"]).optional().describe("Managed-telemetry verbosity. 'off' disables telemetry entirely, 'standard' emits structural records, 'trace' emits full payloads."), sample: i4.number().min(0).max(1).optional().describe("Deterministic sample fraction in [0, 1]. Defaults to 1."), url: i4.string().min(1).optional().describe("Observer base URL for the web connect form. Public, safe to commit. Paired with binding."), binding: i4.string().min(1).optional().describe("Public project binding a web observe credential must match. Paired with url; public, safe to commit.") }).meta({ id: "FlowObserve", title: "Flow.Observe", description: "Observability configuration: public web connect pair (url + binding) and managed-telemetry knobs (level + sample)." }).describe("Observability configuration block");
|
|
4305
|
+
Hn3 = i4.object({ platform: i4.enum(["web", "server"]).describe("Platform identity for this flow. Drives bundle target/format."), url: i4.string().min(1).optional().describe("Public URL where this flow is reachable (for cross-flow $flow.X.url references)."), settings: $n.optional().describe("Free-form key-value settings consumed by the platform runtime."), bundle: Pn3.optional().describe("Bundle configuration: NPM packages, transitive dependency overrides."), observe: Vn2.optional().describe("Observability configuration: public web connect pair, managed-telemetry level and sample.") }).meta({ id: "FlowConfig", title: "Flow.Config", description: "Per-flow configuration block: platform identity, optional public URL, settings, bundle, observe." }).describe("Per-flow configuration block");
|
|
4306
|
+
Zn = i4.object({ config: Hn3.optional().describe("Per-flow configuration: platform, url, settings, bundle."), sources: i4.record(i4.string(), Fn3).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: i4.record(i4.string(), zn2).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: i4.record(i4.string(), Nn2).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: i4.record(i4.string(), _n2).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: i4.looseObject({ next: Ze3.optional().describe("Collector chain: runs once per completed event before the destination fan-out. A stop drops the event for every destination.") }).meta({ id: "FlowCollector", title: "Collector.InitConfig", description: "Collector configuration for event processing (Collector.InitConfig)." }).optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), variables: Cn2.optional().describe("Flow-level variables (override root variables, overridden by source/destination variables)") }).meta({ id: "Flow", title: "Flow", description: "Single flow definition (one deployment target): config, sources, destinations, transformers, stores, collector." }).describe("Single flow definition for one deployment target");
|
|
4307
|
+
Gn3 = i4.object({ version: i4.literal(4).describe("Configuration schema version (v4, current)."), $schema: i4.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v4.json")'), include: i4.array(i4.string()).optional().describe("Folders to include in the bundle output"), variables: Cn2.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax, deep paths supported)"), contract: Bn3.optional().describe("Named contracts with extend inheritance and dot-path references"), flows: i4.record(i4.string(), Zn).refine((e6) => Object.keys(e6).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).meta({ id: "FlowJson", title: "Flow.Json", description: "walkerOS root configuration (walkeros.config.json) v4: version, variables, contract, named flows." }).describe("walkerOS root configuration (walkeros.config.json)");
|
|
4308
|
+
ei = i4.toJSONSchema(Gn3, { target: "draft-7" });
|
|
4309
|
+
ti = o3(Zn);
|
|
4310
|
+
ni = o3(Hn3);
|
|
4311
|
+
ii = o3(Fn3);
|
|
4312
|
+
oi = o3(zn2);
|
|
4313
|
+
ri = o3(Nn2);
|
|
4314
|
+
si = o3(_n2);
|
|
4315
|
+
ai = o3(Un2);
|
|
4316
|
+
ci = o3(Bn3);
|
|
4317
|
+
li = o3(Mn);
|
|
4318
|
+
pi = di.object({ lang: di.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: di.string().describe("Code snippet") });
|
|
4319
|
+
ui = di.object({ text: di.string().describe("Short actionable hint text focused on walkerOS usage"), code: di.array(pi).optional().describe("Optional code snippets") });
|
|
4320
|
+
fi = di.record(di.string(), ui).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples");
|
|
4321
|
+
mi = i4.object({ param: i4.string().describe("Lowercase URL parameter name. Match is case-insensitive on lookup."), platform: i4.string().describe("Canonical platform identifier (lowercase, kebab-case).") });
|
|
4322
|
+
gi = i4.object({ client_email: i4.string().describe("Service account client email"), private_key: i4.string().describe("Service account private key (PEM)"), project_id: i4.string().optional().describe("GCP project id (derived from environment when omitted)") }).meta({ id: "ServiceAccount", title: "ServiceAccount", description: "Google-style service account credentials (client_email, private_key, optional project_id)." }).describe("Google-style service account credentials");
|
|
4323
|
+
hi = i4.union([i4.string(), gi]).meta({ id: "Credentials", title: "Credentials", description: "Service account credentials: a JSON string (back it with a managed secret via $secret.NAME) or a parsed service account object." }).describe("Service account credentials: a JSON string (back it with a managed secret via $secret.NAME) or a parsed object");
|
|
4324
|
+
bi = o3(hi);
|
|
4325
|
+
Ci = () => true;
|
|
4326
|
+
Ii = /* @__PURE__ */ new WeakMap();
|
|
4327
|
+
qi = /* @__PURE__ */ new Set(["description", "examples", "title", "$comment"]);
|
|
4328
|
+
Wi = /* @__PURE__ */ new Set(["additionalItems", "additionalProperties", "contains", "contentSchema", "else", "if", "items", "not", "propertyNames", "then", "unevaluatedItems", "unevaluatedProperties"]);
|
|
4329
|
+
Ui = /* @__PURE__ */ new Set(["allOf", "anyOf", "items", "oneOf", "prefixItems"]);
|
|
4330
|
+
Bi = /* @__PURE__ */ new Set(["properties", "patternProperties", "dependentSchemas", "dependentRequired", "dependencies", "$defs", "definitions"]);
|
|
4331
|
+
Qi = "$code:";
|
|
4332
|
+
Xi = /\$store\.([a-zA-Z_][a-zA-Z0-9_]*)/g;
|
|
4333
|
+
eo2 = /\$env\.([A-Za-z_]\w*)(=[^"}\s]*)?/g;
|
|
4334
|
+
to = /\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?/g;
|
|
4335
|
+
no = /\$(var|store|flow|secret):([a-zA-Z_][a-zA-Z0-9_]*)/g;
|
|
4336
|
+
io = /\$secret\.([A-Za-z0-9_]+)/g;
|
|
4337
|
+
oo = /\$var\.(\w+)/g;
|
|
4338
|
+
ao2 = [{ prefix: "$flow.", regex: /^\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?$/, grammar: "a flow name, then an optional dot path of letters, digits and _" }, { prefix: "$store.", regex: /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/, grammar: "one store id of letters, digits and _, no path" }, { prefix: "$secret.", regex: /^\$secret\.([A-Z0-9_]+)$/, grammar: "uppercase letters, digits and _" }, { prefix: "$contract.", regex: /^\$contract\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.(.+))?$/, grammar: "a contract name, then an optional dot path" }];
|
|
4339
|
+
co = ["title", "description"];
|
|
4340
|
+
lo3 = ["sources", "transformers", "destinations", "stores"];
|
|
4341
|
+
fo2 = ["@walkeros/server-store-fs", "@walkeros/server-store-s3", "@walkeros/server-store-gcs"];
|
|
4342
|
+
mo2 = "@walkeros/server-transformer-file";
|
|
4343
|
+
go2 = /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/;
|
|
4344
|
+
Co2 = /^(event|ingest)(\..+)?$/;
|
|
4345
|
+
xo2 = /^(event|ingest|cache)(\..+)?$/;
|
|
4346
|
+
jo2 = ["sources", "transformers", "destinations"];
|
|
4347
|
+
Wo = { source: Gt2.configJsonSchema, destination: Fe3.configJsonSchema, store: gn2.configJsonSchema };
|
|
4348
|
+
nr2 = {};
|
|
4349
|
+
t4(nr2, { STOP: () => ir2, eq: () => or2, interpret: () => cr2, makeTransformers: () => rr, routeCases: () => sr2, visits: () => lr2 });
|
|
4350
|
+
ir2 = "(stop)";
|
|
4351
|
+
sr2 = [{ name: "static member next is inserted after the member", spec: ["bot", "validate", "session"], nexts: { bot: "foo" }, roots: [{ ingest: {} }], expected: [[["bot", "foo", "validate", "session"]]] }, { name: "member next insertion is recursive and depth first", spec: ["bot", "validate", "session"], nexts: { bot: "foo", foo: "bar" }, roots: [{ ingest: {} }], expected: [[["bot", "foo", "bar", "validate", "session"]]] }, { name: "conditional member next inserts only on match", spec: ["bot", "validate"], nexts: { bot: { match: or2("ingest.bot", "yes"), next: "flag" } }, roots: [{ ingest: { bot: "yes" } }, { ingest: { bot: "no" } }], expected: [[["bot", "flag", "validate"]], [["bot", "validate"]]] }, { name: "conditional member next sees what the member wrote", spec: ["enrich", "out"], nexts: { enrich: { match: or2("ingest.tier", "gold"), next: "vip" } }, sets: { enrich: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["enrich", "vip", "out"]]] }, { name: "many forks and each fork finishes the rest of the array", spec: ["a", { many: ["x", "y"] }, "z"], roots: [{ ingest: {} }], expected: [[["a", "x", "z"], ["a", "y", "z"]]] }, { name: "stop in one fork ends only that copy", spec: ["a", { many: [["x", { stop: true }], "y"] }, "z"], roots: [{ ingest: {} }], expected: [[["a", "x", ir2], ["a", "y", "z"]]] }, { name: "fork at depth 2 carries every enclosing continuation", spec: ["a", { one: [{ match: or2("ingest.k", "1"), next: ["b", { many: ["c", "d"] }, "e"] }] }, "f"], roots: [{ ingest: { k: "1" } }, { ingest: { k: "2" } }], expected: [[["a", "b", "c", "e", "f"], ["a", "b", "d", "e", "f"]], [["a", "f"]]] }, { name: "fork inside a member next continues the enclosing arrays", spec: ["a", ["b", "c"], "d"], nexts: { b: { many: ["m1", "m2"] } }, roots: [{ ingest: {} }], expected: [[["a", "b", "m1", "c", "d"], ["a", "b", "m2", "c", "d"]]] }, { name: "a step listed twice runs twice", spec: ["a", "b", "a"], roots: [{ ingest: {} }], expected: [[["a", "b", "a"]]] }, { name: "member next cycle stops at the guard", spec: ["a", "x"], nexts: { a: "b", b: "a" }, roots: [{ ingest: {} }], expected: [[["a", "b", "x"]]] }, { name: "gated stop after a write ends the copy", spec: ["a", { match: or2("ingest.tier", "gold"), stop: true }, "b"], sets: { a: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["a", ir2]]] }, { name: "gated stop that fails falls through", spec: ["a", { match: or2("ingest.tier", "gold"), stop: true }, "b"], roots: [{ ingest: { tier: "gold" } }, { ingest: { tier: "silver" } }], expected: [[["a", ir2]], [["a", "b"]]] }, { name: "unconditional stop", spec: ["a", { stop: true }, "b"], roots: [{ ingest: {} }], expected: [[["a", ir2]]] }, { name: "one with a stop entry", spec: { one: [{ match: or2("ingest.x", "1"), stop: true }, { next: "b" }] }, roots: [{ ingest: { x: "1" } }, { ingest: { x: "2" } }], expected: [[[ir2]], [["b"]]] }, { name: "state get into ingest.tier \u2192 next one on ingest.tier", spec: ["state", { one: [{ match: or2("ingest.tier", "gold"), next: "vip" }, { next: "std" }] }], sets: { state: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["state", "vip"]]] }];
|
|
4352
|
+
dr2 = ["consent", "include", "data"];
|
|
4353
|
+
pr2 = ["consent", "include", "remove", "batch", "settings", "extend", "data", "silent"];
|
|
4354
|
+
fr2 = { Source: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", primary: "runtime", before: "runtime", next: "runtime", cache: "runtime", state: "runtime", variables: "resolve", examples: "docs" }, Transformer: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", before: "runtime", next: "runtime", cache: "runtime", state: "runtime", mapping: "runtime", variables: "resolve", examples: "docs" }, Destination: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", before: "runtime", next: "runtime", cache: "runtime", state: "runtime", variables: "resolve", examples: "docs" }, Store: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", cache: "runtime", variables: "resolve", examples: "docs" } };
|
|
4355
|
+
mr2 = ["disabled", "id", "logger", "mock", "chainMocks"];
|
|
4356
|
+
gr = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
4357
|
+
yr = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
|
|
4358
|
+
kr = ["sources", "destinations", "transformers", "stores"];
|
|
4359
|
+
Cr2 = { sources: "Source", destinations: "Destination", transformers: "Transformer", stores: "Store" };
|
|
4360
|
+
Or = ["sources", "transformers", "destinations"];
|
|
4357
4361
|
}
|
|
4358
4362
|
});
|
|
4359
4363
|
|
|
@@ -6859,7 +6863,7 @@ function Fn2(e6, t5, n6, o5) {
|
|
|
6859
6863
|
if (!r6 || !i6) throw new Lt("Event name is invalid");
|
|
6860
6864
|
const { timestamp: a5 = Date.now(), name: c3 = `${r6} ${i6}`, data: u4 = {}, context: d3 = {}, globals: l4 = {}, custom: f4 = {}, user: p4 = o5.user, nested: g4 = [], consent: h3 = o5.consent, id: m4 = Ye(), trigger: w4 = "", entity: v4 = r6, action: y4 = i6, timing: b4 = 0, source: k4 = { type: "collector", schema: "4" } } = t5, S3 = k4 ?? { type: "collector", schema: "4" }, _3 = S3.count ?? (e6.count += 1), E3 = S3.trace ?? n6?._meta.trace ?? e6.trace, q4 = { ...S3, count: _3 };
|
|
6861
6865
|
void 0 !== E3 && (q4.trace = E3);
|
|
6862
|
-
const O4 = e6.name ?? S3.platform ?? "default", C5 = e6.release ?? "4.
|
|
6866
|
+
const O4 = e6.name ?? S3.platform ?? "default", C5 = e6.release ?? "4.8.0-next-1791441510508";
|
|
6863
6867
|
q4.release = { ...S3.release, [O4]: C5 };
|
|
6864
6868
|
return { name: c3, data: u4, context: d3, globals: Re(o5.globals, l4), custom: f4, user: p4, nested: g4, consent: h3, id: m4, trigger: w4, entity: v4, action: y4, timestamp: a5, timing: b4, source: q4 };
|
|
6865
6869
|
}
|
|
@@ -9961,15 +9965,15 @@ async function createEntryPoint(flowSettings, buildOptions, packagePaths, logger
|
|
|
9961
9965
|
const storePackages = detectStepPackages(flowSettings, "stores");
|
|
9962
9966
|
const namedImports = detectNamedImports(flowSettings);
|
|
9963
9967
|
const storeIds = new Set(Object.keys(flowSettings.stores || {}));
|
|
9964
|
-
|
|
9968
|
+
wr(flowSettings, storeIds);
|
|
9965
9969
|
if (flowSettings.sources)
|
|
9966
|
-
|
|
9970
|
+
Sr(flowSettings.sources, "sources");
|
|
9967
9971
|
if (flowSettings.destinations)
|
|
9968
|
-
|
|
9972
|
+
Sr(flowSettings.destinations, "destinations");
|
|
9969
9973
|
if (flowSettings.transformers)
|
|
9970
|
-
|
|
9974
|
+
Sr(flowSettings.transformers, "transformers");
|
|
9971
9975
|
if (flowSettings.stores)
|
|
9972
|
-
|
|
9976
|
+
Sr(flowSettings.stores, "stores");
|
|
9973
9977
|
const withDev = buildOptions.withDev !== void 0 ? buildOptions.withDev === true : buildOptions.skipWrapper === true;
|
|
9974
9978
|
const {
|
|
9975
9979
|
importStatements,
|
|
@@ -10091,13 +10095,13 @@ function buildSplitConfigObject(flowSettings, namedImports) {
|
|
|
10091
10095
|
return buildSplitStepEntry(section, stepId, codeVar, runtimeProps);
|
|
10092
10096
|
}
|
|
10093
10097
|
Object.entries(sources).forEach(([name, source]) => {
|
|
10094
|
-
|
|
10098
|
+
vr("Source", name, source);
|
|
10095
10099
|
});
|
|
10096
10100
|
Object.entries(destinations).forEach(([name, dest]) => {
|
|
10097
|
-
|
|
10101
|
+
vr("Destination", name, dest);
|
|
10098
10102
|
});
|
|
10099
10103
|
Object.entries(transformers).forEach(([name, transformer]) => {
|
|
10100
|
-
|
|
10104
|
+
vr("Transformer", name, transformer);
|
|
10101
10105
|
});
|
|
10102
10106
|
const sourcesEntries = Object.entries(sources).filter(([, source]) => source.package || hasCodeReference(source.code)).map(([key, source]) => buildStepEntry("Source", "sources", key, source));
|
|
10103
10107
|
const destinationsEntries = Object.entries(destinations).filter(([, dest]) => dest.package || hasCodeReference(dest.code)).map(
|
|
@@ -10110,7 +10114,7 @@ function buildSplitConfigObject(flowSettings, namedImports) {
|
|
|
10110
10114
|
);
|
|
10111
10115
|
Object.entries(stores).forEach(([name, store]) => {
|
|
10112
10116
|
if (store.package || hasCodeReference(store.code)) {
|
|
10113
|
-
|
|
10117
|
+
vr("Store", name, store);
|
|
10114
10118
|
}
|
|
10115
10119
|
});
|
|
10116
10120
|
const storesEntries = Object.entries(stores).filter(([, store]) => store.package || hasCodeReference(store.code)).map(([key, store]) => buildStepEntry("Store", "stores", key, store));
|
|
@@ -15631,7 +15635,7 @@ init_dist();
|
|
|
15631
15635
|
import * as fs23 from "fs";
|
|
15632
15636
|
import * as path22 from "path";
|
|
15633
15637
|
import Ajv from "ajv";
|
|
15634
|
-
var CLIENT_HEADER = "walkeros-cli/4.
|
|
15638
|
+
var CLIENT_HEADER = "walkeros-cli/4.8.0-next-1791441510508";
|
|
15635
15639
|
function createSettingsContext(configDir) {
|
|
15636
15640
|
return { configDir, cache: /* @__PURE__ */ new Map(), compiled: /* @__PURE__ */ new Map() };
|
|
15637
15641
|
}
|
|
@@ -16183,7 +16187,7 @@ function runFlowChecks(input, options) {
|
|
|
16183
16187
|
}
|
|
16184
16188
|
};
|
|
16185
16189
|
perFlow(["flow:structure"], (name, flow, file) => {
|
|
16186
|
-
const structure =
|
|
16190
|
+
const structure = Pr2({
|
|
16187
16191
|
...file,
|
|
16188
16192
|
flows: { [name]: flow }
|
|
16189
16193
|
});
|
|
@@ -17822,7 +17826,7 @@ import semver4 from "semver";
|
|
|
17822
17826
|
init_api_request();
|
|
17823
17827
|
init_client_context();
|
|
17824
17828
|
init_openapi_subset();
|
|
17825
|
-
var bakedContractVersion = true ? "4.7.0+
|
|
17829
|
+
var bakedContractVersion = true ? "4.7.0+338d4329" : PLACEHOLDER;
|
|
17826
17830
|
var bakedClientOperations = typeof define_CLIENT_OPERATION_DIGESTS_default === "object" ? define_CLIENT_OPERATION_DIGESTS_default : [];
|
|
17827
17831
|
function isRecord5(value) {
|
|
17828
17832
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -18322,7 +18326,7 @@ flowsCmd.command("update <flowId>").description("Update a flow").option("--proje
|
|
|
18322
18326
|
).option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
|
|
18323
18327
|
await updateFlowCommand(flowId, options);
|
|
18324
18328
|
});
|
|
18325
|
-
flowsCmd.command("delete <flowId>").description("Delete a flow").option("--project <id>", "project ID (defaults to WALKEROS_PROJECT_ID)").option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
|
|
18329
|
+
flowsCmd.command("delete <flowId>").description("Delete a flow and its frames").option("--project <id>", "project ID (defaults to WALKEROS_PROJECT_ID)").option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
|
|
18326
18330
|
await deleteFlowCommand(flowId, options);
|
|
18327
18331
|
});
|
|
18328
18332
|
flowsCmd.command("duplicate <flowId>").description("Duplicate a flow").option("--project <id>", "project ID (defaults to WALKEROS_PROJECT_ID)").option("--name <name>", "name for the copy").option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
|