@walkeros/cli 0.4.0 → 0.4.2
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 +23 -0
- package/README.md +112 -42
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts +2 -0
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js +285 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +1 -0
- package/dist/__tests__/bundle/bundler.test.js +176 -166
- package/dist/__tests__/bundle/bundler.test.js.map +1 -1
- package/dist/__tests__/bundle/programmatic.test.js +77 -54
- package/dist/__tests__/bundle/programmatic.test.js.map +1 -1
- package/dist/__tests__/bundle/serializer.test.js +1 -1
- package/dist/__tests__/bundle/serializer.test.js.map +1 -1
- package/dist/__tests__/bundle/template-engine.test.js +1 -1
- package/dist/__tests__/bundle/template-engine.test.js.map +1 -1
- package/dist/__tests__/cli-e2e.test.js +1 -1
- package/dist/__tests__/cli-e2e.test.js.map +1 -1
- package/dist/__tests__/cli.test.js +60 -117
- package/dist/__tests__/cli.test.js.map +1 -1
- package/dist/__tests__/config-loader.test.d.ts +1 -1
- package/dist/__tests__/config-loader.test.js +234 -212
- package/dist/__tests__/config-loader.test.js.map +1 -1
- package/dist/__tests__/core/build-cache.test.d.ts +2 -0
- package/dist/__tests__/core/build-cache.test.d.ts.map +1 -0
- package/dist/__tests__/core/build-cache.test.js +55 -0
- package/dist/__tests__/core/build-cache.test.js.map +1 -0
- package/dist/__tests__/core/cache-utils.test.d.ts +2 -0
- package/dist/__tests__/core/cache-utils.test.d.ts.map +1 -0
- package/dist/__tests__/core/cache-utils.test.js +70 -0
- package/dist/__tests__/core/cache-utils.test.js.map +1 -0
- package/dist/__tests__/core/config.test.js +1 -1
- package/dist/__tests__/core/config.test.js.map +1 -1
- package/dist/__tests__/core/logger.test.js +1 -1
- package/dist/__tests__/core/logger.test.js.map +1 -1
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts +8 -0
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/bundle-run.integration.test.js +54 -0
- package/dist/__tests__/integration/bundle-run.integration.test.js.map +1 -0
- package/dist/__tests__/push/push.test.d.ts +7 -0
- package/dist/__tests__/push/push.test.d.ts.map +1 -0
- package/dist/__tests__/push/push.test.js +197 -0
- package/dist/__tests__/push/push.test.js.map +1 -0
- package/dist/__tests__/simulate/env-loader.test.d.ts +2 -0
- package/dist/__tests__/simulate/env-loader.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/env-loader.test.js +47 -0
- package/dist/__tests__/simulate/env-loader.test.js.map +1 -0
- package/dist/__tests__/simulate/node-executor.test.d.ts +5 -0
- package/dist/__tests__/simulate/node-executor.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/node-executor.test.js +25 -0
- package/dist/__tests__/simulate/node-executor.test.js.map +1 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts +5 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.js +59 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.js.map +1 -0
- package/dist/__tests__/smoke/production.smoke.test.d.ts +8 -0
- package/dist/__tests__/smoke/production.smoke.test.d.ts.map +1 -0
- package/dist/__tests__/smoke/production.smoke.test.js +65 -0
- package/dist/__tests__/smoke/production.smoke.test.js.map +1 -0
- package/dist/commands/bundle/bundler.d.ts +2 -2
- package/dist/commands/bundle/bundler.d.ts.map +1 -1
- package/dist/commands/bundle/bundler.js +156 -54
- package/dist/commands/bundle/bundler.js.map +1 -1
- package/dist/commands/bundle/index.d.ts +17 -11
- package/dist/commands/bundle/index.d.ts.map +1 -1
- package/dist/commands/bundle/index.js +53 -53
- package/dist/commands/bundle/index.js.map +1 -1
- package/dist/commands/bundle/package-manager.d.ts +3 -2
- package/dist/commands/bundle/package-manager.d.ts.map +1 -1
- package/dist/commands/bundle/package-manager.js +34 -7
- package/dist/commands/bundle/package-manager.js.map +1 -1
- package/dist/commands/bundle/serializer.d.ts +1 -1
- package/dist/commands/bundle/serializer.d.ts.map +1 -1
- package/dist/commands/bundle/serializer.js +1 -1
- package/dist/commands/bundle/serializer.js.map +1 -1
- package/dist/commands/bundle/stats.d.ts +2 -2
- package/dist/commands/bundle/stats.d.ts.map +1 -1
- package/dist/commands/bundle/stats.js +1 -1
- package/dist/commands/bundle/stats.js.map +1 -1
- package/dist/commands/bundle/template-engine.d.ts +1 -1
- package/dist/commands/bundle/template-engine.d.ts.map +1 -1
- package/dist/commands/bundle/template-engine.js +2 -2
- package/dist/commands/bundle/template-engine.js.map +1 -1
- package/dist/commands/cache.d.ts +3 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +44 -0
- package/dist/commands/cache.js.map +1 -0
- package/dist/commands/push/index.d.ts +7 -0
- package/dist/commands/push/index.d.ts.map +1 -0
- package/dist/commands/push/index.js +257 -0
- package/dist/commands/push/index.js.map +1 -0
- package/dist/commands/push/types.d.ts +21 -0
- package/dist/commands/push/types.d.ts.map +1 -0
- package/dist/commands/push/types.js +2 -0
- package/dist/commands/push/types.js.map +1 -0
- package/dist/commands/run/__tests__/run.integration.test.js +15 -16
- package/dist/commands/run/__tests__/run.integration.test.js.map +1 -1
- package/dist/commands/run/__tests__/validators.test.js +1 -1
- package/dist/commands/run/__tests__/validators.test.js.map +1 -1
- package/dist/commands/run/execution.d.ts +14 -0
- package/dist/commands/run/execution.d.ts.map +1 -0
- package/dist/commands/run/execution.js +37 -0
- package/dist/commands/run/execution.js.map +1 -0
- package/dist/commands/run/index.d.ts +1 -1
- package/dist/commands/run/index.d.ts.map +1 -1
- package/dist/commands/run/index.js +33 -107
- package/dist/commands/run/index.js.map +1 -1
- package/dist/commands/run/types.d.ts +1 -1
- package/dist/commands/run/types.d.ts.map +1 -1
- package/dist/commands/run/utils.d.ts +29 -0
- package/dist/commands/run/utils.d.ts.map +1 -0
- package/dist/commands/run/utils.js +52 -0
- package/dist/commands/run/utils.js.map +1 -0
- package/dist/commands/run/validators.d.ts +9 -5
- package/dist/commands/run/validators.d.ts.map +1 -1
- package/dist/commands/run/validators.js +15 -12
- package/dist/commands/run/validators.js.map +1 -1
- package/dist/commands/simulate/env-loader.d.ts +19 -0
- package/dist/commands/simulate/env-loader.d.ts.map +1 -0
- package/dist/commands/simulate/env-loader.js +46 -0
- package/dist/commands/simulate/env-loader.js.map +1 -0
- package/dist/commands/simulate/index.d.ts +4 -3
- package/dist/commands/simulate/index.d.ts.map +1 -1
- package/dist/commands/simulate/index.js +11 -19
- package/dist/commands/simulate/index.js.map +1 -1
- package/dist/commands/simulate/jsdom-executor.d.ts +13 -8
- package/dist/commands/simulate/jsdom-executor.d.ts.map +1 -1
- package/dist/commands/simulate/jsdom-executor.js +26 -49
- package/dist/commands/simulate/jsdom-executor.js.map +1 -1
- package/dist/commands/simulate/node-executor.d.ts +28 -0
- package/dist/commands/simulate/node-executor.d.ts.map +1 -0
- package/dist/commands/simulate/node-executor.js +94 -0
- package/dist/commands/simulate/node-executor.js.map +1 -0
- package/dist/commands/simulate/simulator.d.ts +1 -1
- package/dist/commands/simulate/simulator.d.ts.map +1 -1
- package/dist/commands/simulate/simulator.js +44 -36
- package/dist/commands/simulate/simulator.js.map +1 -1
- package/dist/commands/simulate/types.d.ts +2 -2
- package/dist/commands/simulate/types.d.ts.map +1 -1
- package/dist/config/build-defaults.d.ts +49 -0
- package/dist/config/build-defaults.d.ts.map +1 -0
- package/dist/config/build-defaults.js +72 -0
- package/dist/config/build-defaults.js.map +1 -0
- package/dist/config/index.d.ts +8 -9
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +7 -8
- package/dist/config/index.js.map +1 -1
- package/dist/config/loader.d.ts +35 -28
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +108 -89
- package/dist/config/loader.js.map +1 -1
- package/dist/config/utils.d.ts.map +1 -1
- package/dist/config/utils.js +3 -2
- package/dist/config/utils.js.map +1 -1
- package/dist/config/validators.d.ts +36 -7
- package/dist/config/validators.d.ts.map +1 -1
- package/dist/config/validators.js +61 -21
- package/dist/config/validators.js.map +1 -1
- package/dist/core/asset-resolver.d.ts +8 -15
- package/dist/core/asset-resolver.d.ts.map +1 -1
- package/dist/core/asset-resolver.js +30 -30
- package/dist/core/asset-resolver.js.map +1 -1
- package/dist/core/build-cache.d.ts +23 -0
- package/dist/core/build-cache.d.ts.map +1 -0
- package/dist/core/build-cache.js +43 -0
- package/dist/core/build-cache.js.map +1 -0
- package/dist/core/cache-utils.d.ts +27 -0
- package/dist/core/cache-utils.d.ts.map +1 -0
- package/dist/core/cache-utils.js +60 -0
- package/dist/core/cache-utils.js.map +1 -0
- package/dist/core/docker.d.ts +17 -1
- package/dist/core/docker.d.ts.map +1 -1
- package/dist/core/docker.js +30 -26
- package/dist/core/docker.js.map +1 -1
- package/dist/core/execution.d.ts +2 -2
- package/dist/core/execution.d.ts.map +1 -1
- package/dist/core/execution.js +1 -1
- package/dist/core/execution.js.map +1 -1
- package/dist/core/index.d.ts +9 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +9 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/local-packages.d.ts +19 -0
- package/dist/core/local-packages.d.ts.map +1 -0
- package/dist/core/local-packages.js +60 -0
- package/dist/core/local-packages.js.map +1 -0
- package/dist/core/logger.d.ts +11 -0
- package/dist/core/logger.d.ts.map +1 -1
- package/dist/core/logger.js +14 -0
- package/dist/core/logger.js.map +1 -1
- package/dist/core/temp-manager.d.ts +51 -0
- package/dist/core/temp-manager.d.ts.map +1 -0
- package/dist/core/temp-manager.js +73 -0
- package/dist/core/temp-manager.js.map +1 -0
- package/dist/core/utils.d.ts +10 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/core/utils.js +12 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/0d/2d/7581c288670eaf8538ddd9df145b78756ce3be0791c6e0b9cd33429b3bae894525b9bda287a3cedffbcdd2c7b3107bafc03f2b0367eea489eee1cc042abb +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/12/20/bc4f5acca143809f7e07da1fdafb38137d93243de4d5b403e6e10b92d0d3a6e51eab24fe9dbc9d3ed1cd72e8f7a406085e99c422bb2c7d1166cf9f1f564e +0 -0
- package/dist/examples/.npm-cache/content-v2/sha512/22/ee/fb2695b01871c1d36946bdcfb49f1b520a57200d0a0b221b1e7d5f047ab38a8b2ab0e5f0e25a00acde1f3f2f9d24430a18f1092d438bc1a9e9891cc45f75 +0 -0
- package/dist/examples/.npm-cache/content-v2/sha512/24/89/da1ce6a61bca6de7e132f241a675c01c83738bf6b78af25b5cce01d3030361332b3fe938571e2b721f1555da9ddf930fdcf8c02f0471556071590e68cc09 +0 -0
- package/dist/examples/.npm-cache/content-v2/sha512/47/fd/c6be997da99228c3e279b95d4a46d6913947078a178f54ac71795a159f3513b1483232f4c2d0a1f403178bf9f96bb19615de32a9e2133e949880c6bc15e2 +0 -0
- package/dist/examples/.npm-cache/content-v2/sha512/4b/1c/c1cb7f8b32102071a89fef97158daa32080ebaedfbbd596880d2213d84e305abc76d2a95a412ded55c1c3d487adcb1ceff87fc2c85d7e2856ebd9d3f16f3 +0 -0
- package/dist/examples/.npm-cache/content-v2/sha512/6e/53/ff864769671f44f39d8a3bf904cd646535b745cc4824a8bb3189193b474678049f43b5178ba15cad7f0289046105e70f1565afc84e907120b35a466690fd +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/70/4c/4c8837d446965c5551b4ea527e95fa011744fb727581d82cf35bb5599ea0b57d18baa490f7af93ef9a16e8e45e5c0802737da20575f4056a4a5c9a3cd288 +0 -0
- package/dist/examples/.npm-cache/content-v2/sha512/96/ad/05de3bbb12d7de8ea353f962bdaea7d2eb44f707f2973462a6635daf537c67b46cca7764fed7d464fe62152c3f783a07aba1ceb35e09ad446bff05a4b466 +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/b5/20/52dde94e6cef7170f6089c64a4843e57be18be450d956f4e455905aed047ae6a368451c93035e6ac3ee59576b600f03f815afba0836b3a16e10a9aaca4ba +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/c7/a9/d166a1c39f97df312c59261319ba1cf9aac178bda0a0cb697d5ddd78bd8dd38ef1bf40017bcc8633c2049896c2d70696d9bff9280851f270792ff38bb3a0 +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/e0/d0/8c14083b633e6adbd3c6a93da5fc0f6bbd456c5512ef276920bedd8d85d551052adff992de977aff326616a211aaa2d6ddcc801149e9b7f914f566359b6a +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/e7/c5/06ad3fd79ac4f1031fe0b16ea5e54e232ca397bbcd7592c679021cbfb027276099f8c848f3f7a7691f0102ad53aa64f9141e61d729b037a678bd60440d17 +1 -0
- package/dist/examples/.npm-cache/content-v2/sha512/f3/28/d5d32329604ed7d471a4949105daa2cc98858cf24f45b0b97c41d0eb0d5a9fe7bf1f69c792161cc6693e4fc1b52e886ac41875ebfb8fe47fafe417ca3e6e +0 -0
- package/dist/examples/.npm-cache/index-v5/04/5a/2b5d7a7c407d85d746baa0f5c9388a333e35a717a8a0a81943daa6cb1364 +3 -0
- package/dist/examples/.npm-cache/index-v5/12/9a/eba560cbace295d8ee04cf283015377bd77b379e70968fb6bc407c7fc410 +15 -0
- package/dist/examples/.npm-cache/index-v5/2f/a2/7b047564b0ee21ac835ec609e89153dd6549be554d098584d5bfd19fe043 +15 -0
- package/dist/examples/.npm-cache/index-v5/32/8e/322d58dd8d1e000be248ada51385bf96288e56039de9feec1a4c6a467653 +3 -0
- package/dist/examples/.npm-cache/index-v5/57/93/d1d7cd1402e3e26468db03f2870822bb2c9018a506cdfb3b405f38cd3e1c +3 -0
- package/dist/examples/.npm-cache/index-v5/5d/f8/0a1f4fa7149e4ff33e09eb6aea41ac8d1730c868a5d3ace91f762698acff +3 -0
- package/dist/examples/.npm-cache/index-v5/69/a4/a92c72d838259b051cdf8e0acfb2bc680b6d4cfc642314a7836c3f7b2c50 +15 -0
- package/dist/examples/.npm-cache/index-v5/71/31/6da3423bb203f3de5eb16c942431073f89be2cfcb40058ec91dcb5ce0abc +15 -0
- package/dist/examples/.npm-cache/index-v5/7b/94/72b6bffa050d9ef52a558dd220663695bc606f756be0dfa196ef4f3913ba +3 -0
- package/dist/examples/.npm-cache/index-v5/85/9e/99e97fdd562517e56285337db91d1a8f2f416b8d631cf4d7d754fa671299 +15 -0
- package/dist/examples/.npm-cache/index-v5/92/4c/9416ada81a9b3c679539fd1ab53f8de3d41ff268f35eba7a194389a85b06 +3 -0
- package/dist/examples/.npm-cache/index-v5/c1/5a/13df76b218deed8a6ef12961116af5183db98c53fad1b922fd9edc075247 +3 -0
- package/dist/examples/.npm-cache/index-v5/cb/11/253c55410a8ab7c4a9ea9d6e1bf8ef1450a581da64c478074dfd82c8bff6 +3 -0
- package/dist/examples/.npm-cache/index-v5/d5/ae/b57fad3a62b5ba2dbdf24b042a9e7b70820f3db00e5a630f02e1fea020dc +3 -0
- package/dist/examples/.npm-cache/index-v5/d6/32/2f620f83c7d14451de98de8298c2408e05a16cc0829bd16c891ac19d7a67 +3 -0
- package/dist/examples/.npm-cache/index-v5/dd/b5/01dc7a3cd8b6a03a69aee9af500d51ae19cb0aa12631a4aafd152148b8e5 +15 -0
- package/dist/examples/.npm-cache/index-v5/e0/cf/6b862c15d74630d3871cd813d305210ab741311deb10baf8813014e0bc30 +3 -0
- package/dist/examples/.npm-cache/index-v5/e2/be/e880ccd35950a814d3c1dded34d3938ac61b15a195321dc51357f801aad4 +15 -0
- package/dist/examples/.npm-cache/index-v5/e5/1f/f4affe0b392cd03288f23cc03abcb274ff11a2c8f8965299de681914abb2 +3 -0
- package/dist/examples/.npm-cache/index-v5/f3/5b/9ebe450958ff0d7cc44ab0a00080cb8a3ff1389744b5eab5f97b68a6a6af +3 -0
- package/dist/examples/.npm-cache/index-v5/fb/c1/0de405e902866d53e7c30cf36a97dc2578838622b261816f44dc377c9a80 +3 -0
- package/dist/examples/README.md +343 -0
- package/dist/examples/event.json +53 -0
- package/dist/examples/flow-order-complete.json +68 -0
- package/dist/examples/flow-simple.json +32 -0
- package/dist/examples/flow.json +82 -0
- package/dist/examples/server-collect.json +60 -0
- package/dist/examples/server-collect.mjs +13540 -0
- package/dist/examples/test.html +43 -0
- package/dist/examples/web-serve.js +25503 -0
- package/dist/examples/web-serve.json +74 -0
- package/dist/index.d.ts +98 -200
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2783 -120
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +9 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/primitives.d.ts +37 -0
- package/dist/schemas/primitives.d.ts.map +1 -0
- package/dist/schemas/primitives.js +43 -0
- package/dist/schemas/primitives.js.map +1 -0
- package/dist/schemas/run.d.ts +23 -0
- package/dist/schemas/run.d.ts.map +1 -0
- package/dist/schemas/run.js +20 -0
- package/dist/schemas/run.js.map +1 -0
- package/dist/templates/server.hbs +29 -0
- package/dist/templates/web.hbs +45 -0
- package/dist/types/bundle.d.ts +68 -190
- package/dist/types/bundle.d.ts.map +1 -1
- package/dist/types/bundle.js +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/walker.js +1 -0
- package/examples/README.md +42 -29
- package/examples/event.json +1 -1
- package/examples/flow-order-complete.json +57 -57
- package/examples/flow-simple.json +25 -25
- package/examples/flow.json +69 -69
- package/examples/server-collect.json +51 -44
- package/examples/server-collect.mjs +1360 -1190
- package/examples/web-serve.js +25469 -11
- package/examples/web-serve.json +62 -63
- package/package.json +3 -2
- package/dist/__tests__/bundle/bundler-integration.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler-integration.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler-integration.test.js +0 -106
- package/dist/__tests__/bundle/bundler-integration.test.js.map +0 -1
- package/dist/__tests__/simulate/programmatic.test.d.ts +0 -2
- package/dist/__tests__/simulate/programmatic.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/programmatic.test.js +0 -51
- package/dist/__tests__/simulate/programmatic.test.js.map +0 -1
- package/dist/__tests__/simulate/simulator.test.d.ts +0 -2
- package/dist/__tests__/simulate/simulator.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/simulator.test.js +0 -29
- package/dist/__tests__/simulate/simulator.test.js.map +0 -1
- package/dist/config/defaults.d.ts +0 -33
- package/dist/config/defaults.d.ts.map +0 -1
- package/dist/config/defaults.js +0 -69
- package/dist/config/defaults.js.map +0 -1
- package/dist/config/parser.d.ts +0 -64
- package/dist/config/parser.d.ts.map +0 -1
- package/dist/config/parser.js +0 -151
- package/dist/config/parser.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Primitive Schemas
|
|
3
|
+
*
|
|
4
|
+
* Basic Zod schemas for CLI parameter validation.
|
|
5
|
+
* Follows walkerOS patterns from @walkeros/core.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from '@walkeros/core/dev';
|
|
8
|
+
/**
|
|
9
|
+
* Run mode schema.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Validates CLI run mode for the `run` command.
|
|
13
|
+
* - `collect`: Run as event collector
|
|
14
|
+
* - `serve`: Run as HTTP server
|
|
15
|
+
*/
|
|
16
|
+
export declare const RunModeSchema: z.ZodEnum<{
|
|
17
|
+
collect: "collect";
|
|
18
|
+
serve: "serve";
|
|
19
|
+
}>;
|
|
20
|
+
export type RunMode = z.infer<typeof RunModeSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* Port number schema.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Validates HTTP server port number.
|
|
26
|
+
* Must be integer between 1-65535.
|
|
27
|
+
*/
|
|
28
|
+
export declare const PortSchema: z.ZodNumber;
|
|
29
|
+
/**
|
|
30
|
+
* File path schema.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Basic string validation for file paths.
|
|
34
|
+
* File existence is checked separately (Zod can't check filesystem).
|
|
35
|
+
*/
|
|
36
|
+
export declare const FilePathSchema: z.ZodString;
|
|
37
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/schemas/primitives.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;EAE+B,CAAC;AAE1D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,aAKe,CAAC;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,aAGc,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Primitive Schemas
|
|
3
|
+
*
|
|
4
|
+
* Basic Zod schemas for CLI parameter validation.
|
|
5
|
+
* Follows walkerOS patterns from @walkeros/core.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from '@walkeros/core/dev';
|
|
8
|
+
/**
|
|
9
|
+
* Run mode schema.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Validates CLI run mode for the `run` command.
|
|
13
|
+
* - `collect`: Run as event collector
|
|
14
|
+
* - `serve`: Run as HTTP server
|
|
15
|
+
*/
|
|
16
|
+
export const RunModeSchema = z
|
|
17
|
+
.enum(['collect', 'serve'])
|
|
18
|
+
.describe('CLI run mode: collect events or serve HTTP');
|
|
19
|
+
/**
|
|
20
|
+
* Port number schema.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* Validates HTTP server port number.
|
|
24
|
+
* Must be integer between 1-65535.
|
|
25
|
+
*/
|
|
26
|
+
export const PortSchema = z
|
|
27
|
+
.number()
|
|
28
|
+
.int('Port must be an integer')
|
|
29
|
+
.min(1, 'Port must be at least 1')
|
|
30
|
+
.max(65535, 'Port must be at most 65535')
|
|
31
|
+
.describe('HTTP server port number');
|
|
32
|
+
/**
|
|
33
|
+
* File path schema.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* Basic string validation for file paths.
|
|
37
|
+
* File existence is checked separately (Zod can't check filesystem).
|
|
38
|
+
*/
|
|
39
|
+
export const FilePathSchema = z
|
|
40
|
+
.string()
|
|
41
|
+
.min(1, 'File path cannot be empty')
|
|
42
|
+
.describe('Path to configuration file');
|
|
43
|
+
//# sourceMappingURL=primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/schemas/primitives.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;KAC1B,QAAQ,CAAC,4CAA4C,CAAC,CAAC;AAI1D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,yBAAyB,CAAC;KAC9B,GAAG,CAAC,CAAC,EAAE,yBAAyB,CAAC;KACjC,GAAG,CAAC,KAAK,EAAE,4BAA4B,CAAC;KACxC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,2BAA2B,CAAC;KACnC,QAAQ,CAAC,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run Command Schemas
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for run command options validation.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from '@walkeros/core/dev';
|
|
7
|
+
/**
|
|
8
|
+
* Run command options schema.
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Validates all options for the `walkeros run` command.
|
|
12
|
+
*/
|
|
13
|
+
export declare const RunOptionsSchema: z.ZodObject<{
|
|
14
|
+
mode: z.ZodEnum<{
|
|
15
|
+
collect: "collect";
|
|
16
|
+
serve: "serve";
|
|
17
|
+
}>;
|
|
18
|
+
flow: z.ZodString;
|
|
19
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
flowName: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type RunOptions = z.infer<typeof RunOptionsSchema>;
|
|
23
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/schemas/run.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAGvC;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;iBAK3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run Command Schemas
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for run command options validation.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from '@walkeros/core/dev';
|
|
7
|
+
import { RunModeSchema, PortSchema, FilePathSchema } from './primitives';
|
|
8
|
+
/**
|
|
9
|
+
* Run command options schema.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Validates all options for the `walkeros run` command.
|
|
13
|
+
*/
|
|
14
|
+
export const RunOptionsSchema = z.object({
|
|
15
|
+
mode: RunModeSchema,
|
|
16
|
+
flow: FilePathSchema,
|
|
17
|
+
port: PortSchema.default(8080),
|
|
18
|
+
flowName: z.string().optional().describe('Specific flow name to run'),
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/schemas/run.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;CACtE,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default async function(context = {}) {
|
|
2
|
+
const config = {
|
|
3
|
+
sources: {
|
|
4
|
+
{{#each sources}}
|
|
5
|
+
{{@key}}: {
|
|
6
|
+
code: {{{code}}},
|
|
7
|
+
config: {{{config}}}{{#if env}},
|
|
8
|
+
env: {{{env}}}{{/if}}
|
|
9
|
+
},
|
|
10
|
+
{{/each}}
|
|
11
|
+
},
|
|
12
|
+
destinations: {
|
|
13
|
+
{{#each destinations}}
|
|
14
|
+
{{@key}}: {
|
|
15
|
+
code: {{{code}}},
|
|
16
|
+
config: {{{config}}}{{#if env}},
|
|
17
|
+
env: {{{env}}}{{/if}}
|
|
18
|
+
},
|
|
19
|
+
{{/each}}
|
|
20
|
+
}{{#if collector}},
|
|
21
|
+
...{{{collector}}}{{/if}}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
{{{CODE}}}
|
|
25
|
+
|
|
26
|
+
const result = await startFlow(config);
|
|
27
|
+
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
(async () => {
|
|
2
|
+
// Check if we're in a browser environment
|
|
3
|
+
const window = typeof globalThis.window !== 'undefined' ? globalThis.window : undefined;
|
|
4
|
+
const document = typeof globalThis.document !== 'undefined' ? globalThis.document : undefined;
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
sources: {
|
|
8
|
+
{{#each sources}}
|
|
9
|
+
{{@key}}: {
|
|
10
|
+
code: {{{code}}},
|
|
11
|
+
config: {{{config}}}{{#unless config}}{}{{/unless}}{{#if env}},
|
|
12
|
+
env: {
|
|
13
|
+
window,
|
|
14
|
+
document,
|
|
15
|
+
...{{{env}}}
|
|
16
|
+
}{{/if}}
|
|
17
|
+
}{{#unless @last}},{{/unless}}
|
|
18
|
+
{{/each}}
|
|
19
|
+
},
|
|
20
|
+
destinations: {
|
|
21
|
+
{{#each destinations}}
|
|
22
|
+
{{@key}}: {
|
|
23
|
+
code: {{{code}}},
|
|
24
|
+
config: {{{config}}}{{#unless config}}{}{{/unless}}{{#if env}},
|
|
25
|
+
env: {
|
|
26
|
+
window,
|
|
27
|
+
document,
|
|
28
|
+
...{{{env}}}
|
|
29
|
+
}{{/if}}
|
|
30
|
+
}{{#unless @last}},{{/unless}}
|
|
31
|
+
{{/each}}
|
|
32
|
+
}{{#if collector}},
|
|
33
|
+
...{{{collector}}}{{/if}}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
{{{CODE}}}
|
|
37
|
+
|
|
38
|
+
const { collector, elb } = await startFlow(config);
|
|
39
|
+
|
|
40
|
+
if (typeof window !== 'undefined') {
|
|
41
|
+
{{#if build.windowCollector}}window['{{build.windowCollector}}'] = collector;
|
|
42
|
+
{{/if}}{{#if build.windowElb}}window['{{build.windowElb}}'] = elb;
|
|
43
|
+
{{/if}}
|
|
44
|
+
}
|
|
45
|
+
})();
|
package/dist/types/bundle.d.ts
CHANGED
|
@@ -1,154 +1,114 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Build Configuration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* CLI-specific build options for walkerOS bundle generation.
|
|
5
|
+
* Uses Flow.Setup and Flow.Config from @walkeros/core for config structure.
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
import type { Flow } from '@walkeros/core';
|
|
10
10
|
import type { BuildOptions as ESBuildOptions } from 'esbuild';
|
|
11
|
+
export type { Flow };
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* CLI-specific build options (public API).
|
|
13
14
|
*
|
|
14
15
|
* @remarks
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* - Code injection (custom user code)
|
|
18
|
-
* - Output configuration (file paths, formats)
|
|
19
|
-
* - Esbuild settings (minification, source maps, etc.)
|
|
16
|
+
* These are CLI-only options not part of the config file.
|
|
17
|
+
* The config file uses Flow.Setup from @walkeros/core.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
19
|
+
* Platform-derived defaults:
|
|
20
|
+
* - web: format=iife, target=es2020, platform=browser
|
|
21
|
+
* - server: format=esm, target=node18, platform=node
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface CLIBuildOptions extends Pick<ESBuildOptions, 'external'> {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @remarks
|
|
28
|
-
* Maps package name to version and imports configuration.
|
|
29
|
-
* Packages are downloaded from npm and bundled into the output.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```json
|
|
33
|
-
* {
|
|
34
|
-
* "@walkeros/core": {
|
|
35
|
-
* "version": "^0.2.0",
|
|
36
|
-
* "imports": ["getId", "tryCatch"]
|
|
37
|
-
* }
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
25
|
+
* Output file path (CLI argument, not in config).
|
|
26
|
+
* @default "./dist/walker.js" (web) or "./dist/bundle.mjs" (server)
|
|
40
27
|
*/
|
|
41
|
-
|
|
42
|
-
version?: string;
|
|
43
|
-
imports?: string[];
|
|
44
|
-
}>;
|
|
45
|
-
/**
|
|
46
|
-
* User code to include in bundle.
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* Optional custom JavaScript/TypeScript code that will be included in the bundle.
|
|
50
|
-
* Can reference imported packages and will be executed when bundle loads.
|
|
51
|
-
* If omitted, the template's default behavior will be used.
|
|
52
|
-
*
|
|
53
|
-
* @default ""
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```typescript
|
|
57
|
-
* "export default () => startFlow({ sources: {...}, destinations: {...} })"
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
code?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Output file path.
|
|
63
|
-
*
|
|
64
|
-
* @remarks
|
|
65
|
-
* Absolute or relative path for the generated bundle.
|
|
66
|
-
* Directory will be created if it doesn't exist.
|
|
67
|
-
*
|
|
68
|
-
* @default "./dist/walker.js" (web) or "./dist/bundle.js" (server)
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* "./dist/walker.min.js"
|
|
72
|
-
*/
|
|
73
|
-
output: string;
|
|
28
|
+
output?: string;
|
|
74
29
|
/**
|
|
75
30
|
* Temporary directory for build artifacts.
|
|
76
|
-
*
|
|
77
|
-
* @remarks
|
|
78
|
-
* Used for:
|
|
79
|
-
* - Downloaded packages
|
|
80
|
-
* - Generated entry points
|
|
81
|
-
* - Intermediate build files
|
|
82
|
-
*
|
|
83
|
-
* Cleaned up after successful build unless shared with simulator.
|
|
84
|
-
*
|
|
85
31
|
* @default ".tmp"
|
|
86
32
|
*/
|
|
87
33
|
tempDir?: string;
|
|
88
34
|
/**
|
|
89
35
|
* Custom template file path.
|
|
90
|
-
*
|
|
91
|
-
* @remarks
|
|
92
|
-
* Override the default template (base.hbs or server.hbs).
|
|
93
|
-
* Template receives variables: {{sources}}, {{destinations}}, {{collector}}, {{{CODE}}}
|
|
94
|
-
*
|
|
95
36
|
* @default undefined (uses platform-specific default)
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* "./templates/custom.hbs"
|
|
99
37
|
*/
|
|
100
38
|
template?: string;
|
|
101
39
|
/**
|
|
102
40
|
* Enable package caching.
|
|
103
|
-
*
|
|
104
|
-
* @remarks
|
|
105
|
-
* When enabled, downloaded packages are cached for faster subsequent builds.
|
|
106
|
-
*
|
|
107
41
|
* @default true
|
|
108
42
|
*/
|
|
109
43
|
cache?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* User code to include in bundle.
|
|
46
|
+
*/
|
|
47
|
+
code?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Internal build options used by the bundler.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Combines CLI options with resolved esbuild settings.
|
|
54
|
+
* This is populated after processing config and CLI arguments.
|
|
55
|
+
*/
|
|
56
|
+
export interface BuildOptions extends CLIBuildOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Output file path (required for bundler).
|
|
59
|
+
*/
|
|
60
|
+
output: string;
|
|
61
|
+
/**
|
|
62
|
+
* Packages to include in the bundle.
|
|
63
|
+
*/
|
|
64
|
+
packages: Flow.Packages;
|
|
65
|
+
/**
|
|
66
|
+
* Output format.
|
|
67
|
+
*/
|
|
68
|
+
format: 'esm' | 'iife' | 'cjs';
|
|
69
|
+
/**
|
|
70
|
+
* Target platform.
|
|
71
|
+
*/
|
|
72
|
+
platform: 'browser' | 'node';
|
|
73
|
+
/**
|
|
74
|
+
* Enable minification.
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
minify?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Enable source maps.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
sourcemap?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* ECMAScript target version.
|
|
85
|
+
*/
|
|
86
|
+
target?: string;
|
|
110
87
|
/**
|
|
111
88
|
* Minification options.
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* Fine-tune minification behavior.
|
|
115
|
-
* Only applies when minify=true.
|
|
116
89
|
*/
|
|
117
90
|
minifyOptions?: MinifyOptions;
|
|
118
91
|
/**
|
|
119
|
-
* Window property name for collector
|
|
120
|
-
*
|
|
121
|
-
* @remarks
|
|
122
|
-
* Only used when platform=browser and format=iife.
|
|
123
|
-
* The collector instance will be assigned to window[windowCollector].
|
|
124
|
-
* Ignored for server platform.
|
|
125
|
-
*
|
|
92
|
+
* Window property name for collector (web platform only).
|
|
126
93
|
* @default "collector"
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```json
|
|
130
|
-
* {
|
|
131
|
-
* "build": {
|
|
132
|
-
* "windowCollector": "tracker",
|
|
133
|
-
* "windowElb": "track"
|
|
134
|
-
* }
|
|
135
|
-
* }
|
|
136
|
-
* ```
|
|
137
|
-
*
|
|
138
|
-
* Results in: `window.tracker = collector; window.track = elb;`
|
|
139
94
|
*/
|
|
140
95
|
windowCollector?: string;
|
|
141
96
|
/**
|
|
142
97
|
* Window property name for elb function (web platform only).
|
|
143
|
-
*
|
|
144
|
-
* @remarks
|
|
145
|
-
* Only used when platform=browser and format=iife.
|
|
146
|
-
* The elb function will be assigned to window[windowElb].
|
|
147
|
-
* Ignored for server platform.
|
|
148
|
-
*
|
|
149
98
|
* @default "elb"
|
|
150
99
|
*/
|
|
151
100
|
windowElb?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Folders to include in the output directory.
|
|
103
|
+
* These folders are copied alongside the bundle for runtime access.
|
|
104
|
+
* @default ["./shared"] if folder exists
|
|
105
|
+
*/
|
|
106
|
+
include?: string[];
|
|
107
|
+
/**
|
|
108
|
+
* Base directory for resolving include paths.
|
|
109
|
+
* Typically the directory containing the config file.
|
|
110
|
+
*/
|
|
111
|
+
configDir?: string;
|
|
152
112
|
}
|
|
153
113
|
/**
|
|
154
114
|
* Minification options.
|
|
@@ -159,110 +119,28 @@ export interface BuildOptions extends Pick<ESBuildOptions, 'format' | 'target' |
|
|
|
159
119
|
export interface MinifyOptions {
|
|
160
120
|
/**
|
|
161
121
|
* Minify identifiers (variable names).
|
|
162
|
-
*
|
|
163
122
|
* @default true
|
|
164
123
|
*/
|
|
165
124
|
identifiers?: boolean;
|
|
166
125
|
/**
|
|
167
126
|
* Minify syntax (shorten code).
|
|
168
|
-
*
|
|
169
127
|
* @default true
|
|
170
128
|
*/
|
|
171
129
|
syntax?: boolean;
|
|
172
130
|
/**
|
|
173
131
|
* Minify whitespace.
|
|
174
|
-
*
|
|
175
132
|
* @default true
|
|
176
133
|
*/
|
|
177
134
|
whitespace?: boolean;
|
|
178
135
|
/**
|
|
179
136
|
* Keep original function/class names.
|
|
180
|
-
*
|
|
181
|
-
* @remarks
|
|
182
|
-
* Useful for debugging production bundles.
|
|
183
|
-
*
|
|
184
137
|
* @default false
|
|
185
138
|
*/
|
|
186
139
|
keepNames?: boolean;
|
|
187
140
|
/**
|
|
188
141
|
* How to handle legal comments.
|
|
189
|
-
*
|
|
190
142
|
* @default "none"
|
|
191
143
|
*/
|
|
192
144
|
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
|
|
193
145
|
}
|
|
194
|
-
/**
|
|
195
|
-
* Single environment configuration.
|
|
196
|
-
*
|
|
197
|
-
* @remarks
|
|
198
|
-
* Combines Flow.Config (runtime) with BuildOptions (build-time).
|
|
199
|
-
* This is the structure stored in config files for each environment.
|
|
200
|
-
*/
|
|
201
|
-
export interface EnvironmentConfig {
|
|
202
|
-
/**
|
|
203
|
-
* Runtime event processing configuration.
|
|
204
|
-
*
|
|
205
|
-
* @remarks
|
|
206
|
-
* Defines sources, destinations, collector settings.
|
|
207
|
-
* From @walkeros/core - platform-agnostic.
|
|
208
|
-
*/
|
|
209
|
-
flow: Flow.Config;
|
|
210
|
-
/**
|
|
211
|
-
* Build-time configuration.
|
|
212
|
-
*
|
|
213
|
-
* @remarks
|
|
214
|
-
* Defines how to bundle the flow configuration.
|
|
215
|
-
* CLI-specific settings.
|
|
216
|
-
*/
|
|
217
|
-
build: BuildOptions;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Multi-environment setup configuration.
|
|
221
|
-
*
|
|
222
|
-
* @remarks
|
|
223
|
-
* Top-level config file format supporting multiple deployment environments.
|
|
224
|
-
* Each environment has separate flow and build configurations.
|
|
225
|
-
*
|
|
226
|
-
* @example
|
|
227
|
-
* ```json
|
|
228
|
-
* {
|
|
229
|
-
* "version": 1,
|
|
230
|
-
* "variables": {
|
|
231
|
-
* "GA_ID": "G-XXXXXXXXXX"
|
|
232
|
-
* },
|
|
233
|
-
* "environments": {
|
|
234
|
-
* "production": {
|
|
235
|
-
* "flow": { "platform": "web", ... },
|
|
236
|
-
* "build": { "packages": {...}, "output": "./dist/prod.js" }
|
|
237
|
-
* },
|
|
238
|
-
* "staging": {
|
|
239
|
-
* "flow": { "platform": "web", ... },
|
|
240
|
-
* "build": { "packages": {...}, "output": "./dist/staging.js" }
|
|
241
|
-
* }
|
|
242
|
-
* }
|
|
243
|
-
* }
|
|
244
|
-
* ```
|
|
245
|
-
*/
|
|
246
|
-
export interface Setup {
|
|
247
|
-
/**
|
|
248
|
-
* Configuration schema version.
|
|
249
|
-
*/
|
|
250
|
-
version: 1;
|
|
251
|
-
/**
|
|
252
|
-
* JSON Schema reference for IDE validation.
|
|
253
|
-
*/
|
|
254
|
-
$schema?: string;
|
|
255
|
-
/**
|
|
256
|
-
* Shared variables for interpolation across all environments.
|
|
257
|
-
*/
|
|
258
|
-
variables?: Record<string, string | number | boolean>;
|
|
259
|
-
/**
|
|
260
|
-
* Reusable configuration definitions.
|
|
261
|
-
*/
|
|
262
|
-
definitions?: Record<string, unknown>;
|
|
263
|
-
/**
|
|
264
|
-
* Environments with flow and build configurations.
|
|
265
|
-
*/
|
|
266
|
-
environments: Record<string, EnvironmentConfig>;
|
|
267
|
-
}
|
|
268
146
|
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/types/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/types/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9D,YAAY,EAAE,IAAI,EAAE,CAAC;AAErB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CACV,cAAc,EACd,UAAU,CACX;IACD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAa,SAAQ,eAAe;IACnD;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAE/B;;OAEG;IACH,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC;IAE7B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC;CACnE"}
|
package/dist/types/bundle.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Build Configuration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* CLI-specific build options for walkerOS bundle generation.
|
|
5
|
+
* Uses Flow.Setup and Flow.Config from @walkeros/core for config structure.
|
|
6
6
|
*
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,cAAc,aAAa,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,cAAc,aAAa,CAAC"}
|
package/dist/walker.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{(async()=>{let t=typeof globalThis.window<"u"?globalThis.window:void 0,o=typeof globalThis.document<"u"?globalThis.document:void 0,e={sources:{},destinations:{}},{collector:n,elb:r}=await startFlow(e);typeof t<"u"&&(t.collector=n,t.elb=r)})();})();
|