@walkeros/cli 0.0.0-next-20251219153324
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 +175 -0
- package/README.md +531 -0
- 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 +151 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +1 -0
- package/dist/__tests__/bundle/bundler.test.d.ts +2 -0
- package/dist/__tests__/bundle/bundler.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/bundler.test.js +352 -0
- package/dist/__tests__/bundle/bundler.test.js.map +1 -0
- package/dist/__tests__/bundle/programmatic.test.d.ts +2 -0
- package/dist/__tests__/bundle/programmatic.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/programmatic.test.js +148 -0
- package/dist/__tests__/bundle/programmatic.test.js.map +1 -0
- package/dist/__tests__/cli-e2e.test.d.ts +8 -0
- package/dist/__tests__/cli-e2e.test.d.ts.map +1 -0
- package/dist/__tests__/cli-e2e.test.js +145 -0
- package/dist/__tests__/cli-e2e.test.js.map +1 -0
- package/dist/__tests__/cli.test.d.ts +2 -0
- package/dist/__tests__/cli.test.d.ts.map +1 -0
- package/dist/__tests__/cli.test.js +179 -0
- package/dist/__tests__/cli.test.js.map +1 -0
- package/dist/__tests__/config-loader.test.d.ts +7 -0
- package/dist/__tests__/config-loader.test.d.ts.map +1 -0
- package/dist/__tests__/config-loader.test.js +414 -0
- package/dist/__tests__/config-loader.test.js.map +1 -0
- package/dist/__tests__/core/asset-resolver.test.d.ts +2 -0
- package/dist/__tests__/core/asset-resolver.test.d.ts.map +1 -0
- package/dist/__tests__/core/asset-resolver.test.js +14 -0
- package/dist/__tests__/core/asset-resolver.test.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/__tests__/core/config.test.d.ts.map +1 -0
- package/dist/__tests__/core/config.test.js +79 -0
- package/dist/__tests__/core/config.test.js.map +1 -0
- package/dist/__tests__/core/logger.test.d.ts +2 -0
- package/dist/__tests__/core/logger.test.d.ts.map +1 -0
- package/dist/__tests__/core/logger.test.js +53 -0
- package/dist/__tests__/core/logger.test.js.map +1 -0
- 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 +58 -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 +32 -0
- package/dist/commands/bundle/bundler.d.ts.map +1 -0
- package/dist/commands/bundle/bundler.js +564 -0
- package/dist/commands/bundle/bundler.js.map +1 -0
- package/dist/commands/bundle/index.d.ts +59 -0
- package/dist/commands/bundle/index.d.ts.map +1 -0
- package/dist/commands/bundle/index.js +192 -0
- package/dist/commands/bundle/index.js.map +1 -0
- package/dist/commands/bundle/package-manager.d.ts +8 -0
- package/dist/commands/bundle/package-manager.d.ts.map +1 -0
- package/dist/commands/bundle/package-manager.js +208 -0
- package/dist/commands/bundle/package-manager.js.map +1 -0
- package/dist/commands/bundle/stats.d.ts +23 -0
- package/dist/commands/bundle/stats.d.ts.map +1 -0
- package/dist/commands/bundle/stats.js +52 -0
- package/dist/commands/bundle/stats.js.map +1 -0
- package/dist/commands/cache.d.ts +7 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +61 -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 +250 -0
- package/dist/commands/push/index.js.map +1 -0
- package/dist/commands/push/types.d.ts +22 -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.d.ts +7 -0
- package/dist/commands/run/__tests__/run.integration.test.d.ts.map +1 -0
- package/dist/commands/run/__tests__/run.integration.test.js +51 -0
- package/dist/commands/run/__tests__/run.integration.test.js.map +1 -0
- package/dist/commands/run/__tests__/validators.test.d.ts +2 -0
- package/dist/commands/run/__tests__/validators.test.d.ts.map +1 -0
- package/dist/commands/run/__tests__/validators.test.js +80 -0
- package/dist/commands/run/__tests__/validators.test.js.map +1 -0
- 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 +41 -0
- package/dist/commands/run/execution.js.map +1 -0
- package/dist/commands/run/index.d.ts +38 -0
- package/dist/commands/run/index.d.ts.map +1 -0
- package/dist/commands/run/index.js +165 -0
- package/dist/commands/run/index.js.map +1 -0
- package/dist/commands/run/types.d.ts +65 -0
- package/dist/commands/run/types.d.ts.map +1 -0
- package/dist/commands/run/types.js +7 -0
- package/dist/commands/run/types.js.map +1 -0
- 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 +33 -0
- package/dist/commands/run/validators.d.ts.map +1 -0
- package/dist/commands/run/validators.js +58 -0
- package/dist/commands/run/validators.js.map +1 -0
- 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 +48 -0
- package/dist/commands/simulate/index.d.ts.map +1 -0
- package/dist/commands/simulate/index.js +114 -0
- package/dist/commands/simulate/index.js.map +1 -0
- package/dist/commands/simulate/jsdom-executor.d.ts +37 -0
- package/dist/commands/simulate/jsdom-executor.d.ts.map +1 -0
- package/dist/commands/simulate/jsdom-executor.js +137 -0
- package/dist/commands/simulate/jsdom-executor.js.map +1 -0
- 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 +14 -0
- package/dist/commands/simulate/simulator.d.ts.map +1 -0
- package/dist/commands/simulate/simulator.js +163 -0
- package/dist/commands/simulate/simulator.js.map +1 -0
- package/dist/commands/simulate/tracker.d.ts +30 -0
- package/dist/commands/simulate/tracker.d.ts.map +1 -0
- package/dist/commands/simulate/tracker.js +96 -0
- package/dist/commands/simulate/tracker.js.map +1 -0
- package/dist/commands/simulate/types.d.ts +20 -0
- package/dist/commands/simulate/types.d.ts.map +1 -0
- package/dist/commands/simulate/types.js +2 -0
- package/dist/commands/simulate/types.js.map +1 -0
- 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 +68 -0
- package/dist/config/build-defaults.js.map +1 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +15 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +81 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +153 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/utils.d.ts +101 -0
- package/dist/config/utils.d.ts.map +1 -0
- package/dist/config/utils.js +235 -0
- package/dist/config/utils.js.map +1 -0
- package/dist/config/validators.d.ts +52 -0
- package/dist/config/validators.d.ts.map +1 -0
- package/dist/config/validators.js +85 -0
- package/dist/config/validators.js.map +1 -0
- package/dist/core/asset-resolver.d.ts +34 -0
- package/dist/core/asset-resolver.d.ts.map +1 -0
- package/dist/core/asset-resolver.js +70 -0
- package/dist/core/asset-resolver.js.map +1 -0
- 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 +44 -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/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +8 -0
- package/dist/core/index.js.map +1 -0
- 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 +28 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +88 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/output.d.ts +30 -0
- package/dist/core/output.d.ts.map +1 -0
- package/dist/core/output.js +46 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/timer.d.ts +14 -0
- package/dist/core/timer.d.ts.map +1 -0
- package/dist/core/timer.js +29 -0
- package/dist/core/timer.js.map +1 -0
- package/dist/core/tmp.d.ts +27 -0
- package/dist/core/tmp.d.ts.map +1 -0
- package/dist/core/tmp.js +36 -0
- package/dist/core/tmp.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/README.md +355 -0
- package/dist/examples/event.json +53 -0
- package/dist/examples/flow-order-complete.json +67 -0
- package/dist/examples/flow-simple.json +31 -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 +427 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2629 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime/index.d.ts +10 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +10 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/main.d.ts +2 -0
- package/dist/runtime/main.d.ts.map +1 -0
- package/dist/runtime/main.js +269 -0
- package/dist/runtime/main.js.map +1 -0
- package/dist/runtime/runner.d.ts +20 -0
- package/dist/runtime/runner.d.ts.map +1 -0
- package/dist/runtime/runner.js +72 -0
- package/dist/runtime/runner.js.map +1 -0
- package/dist/runtime/serve.d.ts +19 -0
- package/dist/runtime/serve.d.ts.map +1 -0
- package/dist/runtime/serve.js +97 -0
- package/dist/runtime/serve.js.map +1 -0
- 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/types/bundle.d.ts +141 -0
- package/dist/types/bundle.d.ts.map +1 -0
- package/dist/types/bundle.js +10 -0
- package/dist/types/bundle.js.map +1 -0
- package/dist/types/global.d.ts +38 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/global.js +24 -0
- package/dist/types/global.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +27 -0
- package/dist/version.js.map +1 -0
- package/dist/walker.js +1 -0
- package/examples/README.md +355 -0
- package/examples/event.json +53 -0
- package/examples/flow-order-complete.json +67 -0
- package/examples/flow-simple.json +31 -0
- package/examples/flow.json +82 -0
- package/examples/server-collect.json +60 -0
- package/examples/server-collect.mjs +13540 -0
- package/examples/test.html +43 -0
- package/examples/web-serve.js +25503 -0
- package/examples/web-serve.json +74 -0
- package/package.json +62 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# @walkeros/cli
|
|
2
|
+
|
|
3
|
+
## 0.0.0-next-20251219153324
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 42d06c8: CLI simplification - removed Docker mode for build commands, merged
|
|
8
|
+
runtime from @walkeros/docker into CLI, single walkeros/flow image for
|
|
9
|
+
production
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 71b615f: Fix URL handling in resolveAsset - URLs are now passed through
|
|
14
|
+
unchanged instead of being mangled into invalid filesystem paths
|
|
15
|
+
- Updated dependencies [5163b01]
|
|
16
|
+
- @walkeros/core@0.0.0-next-20251219153324
|
|
17
|
+
- @walkeros/server-core@0.0.0-next-20251219153324
|
|
18
|
+
|
|
19
|
+
## 0.7.0-next.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 42d06c8: Fix Docker runtime version display - versions now read reliably from
|
|
24
|
+
package.json at runtime instead of fragile build-time injection
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [42d06c8]
|
|
29
|
+
- @walkeros/docker@0.7.0-next.0
|
|
30
|
+
|
|
31
|
+
## 0.5.1-next.1
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 71b615f: Fix URL handling in resolveAsset - URLs are now passed through
|
|
36
|
+
unchanged instead of being mangled into invalid filesystem paths
|
|
37
|
+
|
|
38
|
+
## 0.5.1-next.0
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [5163b01]
|
|
43
|
+
- @walkeros/core@0.5.1-next.0
|
|
44
|
+
- @walkeros/docker@0.3.1-next.0
|
|
45
|
+
- @walkeros/server-core@0.5.1-next.0
|
|
46
|
+
|
|
47
|
+
## 0.5.0
|
|
48
|
+
|
|
49
|
+
### Minor Changes
|
|
50
|
+
|
|
51
|
+
- just flow
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies
|
|
56
|
+
- @walkeros/core@0.5.0
|
|
57
|
+
- @walkeros/docker@0.3.0
|
|
58
|
+
- @walkeros/server-core@0.5.0
|
|
59
|
+
|
|
60
|
+
## 0.4.2
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- simulate server and local packages
|
|
65
|
+
- cli cache
|
|
66
|
+
- Updated dependencies
|
|
67
|
+
- Updated dependencies
|
|
68
|
+
- Updated dependencies
|
|
69
|
+
- @walkeros/core@0.4.2
|
|
70
|
+
- @walkeros/docker@0.2.2
|
|
71
|
+
- @walkeros/server-core@0.4.2
|
|
72
|
+
|
|
73
|
+
## 0.4.1
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- dev entry
|
|
78
|
+
- Updated dependencies
|
|
79
|
+
- @walkeros/server-core@0.4.1
|
|
80
|
+
- @walkeros/docker@0.2.1
|
|
81
|
+
- @walkeros/core@0.4.1
|
|
82
|
+
|
|
83
|
+
## 0.4.0
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- Consolidate schemas and examples under `/dev` export
|
|
88
|
+
|
|
89
|
+
### Patch Changes
|
|
90
|
+
|
|
91
|
+
- Updated dependencies
|
|
92
|
+
- @walkeros/docker@0.2.0
|
|
93
|
+
- @walkeros/core@0.4.0
|
|
94
|
+
|
|
95
|
+
## 0.3.6
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- port path and name
|
|
100
|
+
- df4b2a1: Read CLI version dynamically from package.json instead of hardcoded
|
|
101
|
+
value
|
|
102
|
+
- Updated dependencies
|
|
103
|
+
- @walkeros/docker@0.1.5
|
|
104
|
+
|
|
105
|
+
## 0.3.5
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- cli usage
|
|
110
|
+
- Updated dependencies
|
|
111
|
+
- @walkeros/docker@0.1.4
|
|
112
|
+
|
|
113
|
+
## 0.3.4
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- main module exec
|
|
118
|
+
|
|
119
|
+
## 0.3.3
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- force local
|
|
124
|
+
|
|
125
|
+
## 0.3.2
|
|
126
|
+
|
|
127
|
+
### Patch Changes
|
|
128
|
+
|
|
129
|
+
- walkeros cli with docker
|
|
130
|
+
- Updated dependencies
|
|
131
|
+
- @walkeros/docker@0.1.2
|
|
132
|
+
|
|
133
|
+
## 0.3.1
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- 25f7e10: Fix bundle command template path resolution to support relative paths
|
|
138
|
+
|
|
139
|
+
**CLI Changes:**
|
|
140
|
+
- Template paths starting with `./` or `../` in config files are now resolved
|
|
141
|
+
relative to the config file's directory
|
|
142
|
+
- Maintains backward compatibility for other relative paths (resolved from
|
|
143
|
+
cwd)
|
|
144
|
+
- Enables portable flow configs that reference templates next to them
|
|
145
|
+
|
|
146
|
+
**Docker Changes:**
|
|
147
|
+
- Updated demo.json and express-console.json to include template and output
|
|
148
|
+
fields
|
|
149
|
+
- Flow files can now be bundled standalone using the CLI bundle command
|
|
150
|
+
- Templates are referenced using `../templates/base.hbs` relative to flow file
|
|
151
|
+
|
|
152
|
+
**Example:**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Now works from any directory
|
|
156
|
+
node dist/index.mjs bundle -c packages/docker/flows/demo.json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
- hello
|
|
160
|
+
- Updated dependencies [25f7e10]
|
|
161
|
+
- Updated dependencies
|
|
162
|
+
- Updated dependencies
|
|
163
|
+
- @walkeros/docker@0.1.1
|
|
164
|
+
- @walkeros/core@0.3.1
|
|
165
|
+
|
|
166
|
+
## 0.2.0
|
|
167
|
+
|
|
168
|
+
### Minor Changes
|
|
169
|
+
|
|
170
|
+
- env
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- Updated dependencies
|
|
175
|
+
- @walkeros/core@0.2.0
|
package/README.md
ADDED
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
# @walkeros/cli
|
|
2
|
+
|
|
3
|
+
Command-line tools for building, testing, and running walkerOS event collection
|
|
4
|
+
flows.
|
|
5
|
+
|
|
6
|
+
## What is this?
|
|
7
|
+
|
|
8
|
+
The walkerOS CLI is a developer tool that:
|
|
9
|
+
|
|
10
|
+
- **Bundles** flow configurations into optimized JavaScript
|
|
11
|
+
- **Simulates** event processing for testing
|
|
12
|
+
- **Runs** flows locally without Docker daemon
|
|
13
|
+
|
|
14
|
+
Think of it as your development toolchain for walkerOS - from config to running
|
|
15
|
+
production bundles.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Global (recommended for CLI usage)
|
|
21
|
+
npm install -g @walkeros/cli
|
|
22
|
+
|
|
23
|
+
# Local (for programmatic usage)
|
|
24
|
+
npm install @walkeros/cli
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Bundle a flow configuration
|
|
31
|
+
walkeros bundle flow.json
|
|
32
|
+
|
|
33
|
+
# Test with simulated events (no real API calls)
|
|
34
|
+
walkeros simulate flow.json --event '{"name":"product view"}'
|
|
35
|
+
|
|
36
|
+
# Push real events to destinations
|
|
37
|
+
walkeros push flow.json --event '{"name":"product view"}'
|
|
38
|
+
|
|
39
|
+
# Run a collection server locally
|
|
40
|
+
walkeros run collect dist/bundle.mjs --port 3000
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Commands
|
|
44
|
+
|
|
45
|
+
### bundle
|
|
46
|
+
|
|
47
|
+
Generate optimized JavaScript bundles from flow configurations.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
walkeros bundle <config-file> [options]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Config files can be local paths or HTTP(S) URLs:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
walkeros bundle ./config.json # Local file
|
|
57
|
+
walkeros bundle https://example.com/config.json # Remote URL
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Options:**
|
|
61
|
+
|
|
62
|
+
- `-f, --flow <name>` - Build specific flow (multi-flow configs)
|
|
63
|
+
- `--all` - Build all flows
|
|
64
|
+
- `-s, --stats` - Show bundle statistics
|
|
65
|
+
- `--json` - Output stats as JSON
|
|
66
|
+
- `--no-cache` - Disable package caching
|
|
67
|
+
- `-v, --verbose` - Verbose output
|
|
68
|
+
|
|
69
|
+
**Example:**
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Bundle with stats
|
|
73
|
+
walkeros bundle examples/server-collect.json --stats
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The output path uses convention-based defaults: `./dist/bundle.mjs` for server,
|
|
77
|
+
`./dist/walker.js` for web.
|
|
78
|
+
|
|
79
|
+
### simulate
|
|
80
|
+
|
|
81
|
+
Test event processing with simulated events.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
walkeros simulate <config-file> --event '{"name":"page view"}' [options]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Options:**
|
|
88
|
+
|
|
89
|
+
- `-e, --event <json>` - Event JSON string (required)
|
|
90
|
+
- `--json` - Output results as JSON
|
|
91
|
+
- `-v, --verbose` - Verbose output
|
|
92
|
+
|
|
93
|
+
**Example:**
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
# Simulate page view
|
|
97
|
+
walkeros simulate \
|
|
98
|
+
examples/web-serve.json \
|
|
99
|
+
--event '{"name":"page view","data":{"title":"Home"}}' \
|
|
100
|
+
--json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### push
|
|
104
|
+
|
|
105
|
+
Execute your flow with real API calls to configured destinations. Unlike
|
|
106
|
+
`simulate` which mocks API calls, `push` performs actual HTTP requests.
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
walkeros push <config-file> --event '<json>' [options]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Options:**
|
|
113
|
+
|
|
114
|
+
- `-e, --event <source>` - Event to push (JSON string, file path, or URL)
|
|
115
|
+
**Required**
|
|
116
|
+
- `--flow <name>` - Flow name (for multi-flow configs)
|
|
117
|
+
- `--json` - Output results as JSON
|
|
118
|
+
- `-v, --verbose` - Verbose output
|
|
119
|
+
- `-s, --silent` - Suppress output (for CI/CD)
|
|
120
|
+
|
|
121
|
+
**Event input formats:**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Inline JSON
|
|
125
|
+
walkeros push flow.json --event '{"name":"page view","data":{"title":"Home"}}'
|
|
126
|
+
|
|
127
|
+
# File path
|
|
128
|
+
walkeros push flow.json --event ./events/order.json
|
|
129
|
+
|
|
130
|
+
# URL
|
|
131
|
+
walkeros push flow.json --event https://example.com/sample-event.json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Push vs Simulate:**
|
|
135
|
+
|
|
136
|
+
| Feature | `push` | `simulate` |
|
|
137
|
+
| ------------ | ----------------------------------- | ------------------ |
|
|
138
|
+
| API Calls | Real HTTP requests | Mocked (captured) |
|
|
139
|
+
| Use Case | Integration testing | Safe local testing |
|
|
140
|
+
| Side Effects | Full (writes to DBs, sends to APIs) | None |
|
|
141
|
+
|
|
142
|
+
Use `simulate` first to validate configuration safely, then `push` to verify
|
|
143
|
+
real integrations.
|
|
144
|
+
|
|
145
|
+
### run
|
|
146
|
+
|
|
147
|
+
Run flows locally (no Docker daemon required).
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
walkeros run <mode> <config-file> [options]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Modes:**
|
|
154
|
+
|
|
155
|
+
- `collect` - HTTP event collection server
|
|
156
|
+
- `serve` - Static file server
|
|
157
|
+
|
|
158
|
+
**Options:**
|
|
159
|
+
|
|
160
|
+
- `-p, --port <number>` - Server port
|
|
161
|
+
- `-h, --host <host>` - Server host
|
|
162
|
+
- `--static-dir <dir>` - Static directory (serve mode)
|
|
163
|
+
- `--json` - JSON output
|
|
164
|
+
- `-v, --verbose` - Verbose output
|
|
165
|
+
|
|
166
|
+
**Examples:**
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Run collection server (auto-bundles JSON)
|
|
170
|
+
walkeros run collect examples/server-collect.json --port 3000
|
|
171
|
+
|
|
172
|
+
# Run with pre-built bundle
|
|
173
|
+
walkeros run collect examples/server-collect.mjs --port 3000
|
|
174
|
+
|
|
175
|
+
# Serve static files
|
|
176
|
+
walkeros run serve flow.json --port 8080 --static-dir ./dist
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**How it works:**
|
|
180
|
+
|
|
181
|
+
1. JSON configs are auto-bundled to temp `.mjs`
|
|
182
|
+
2. `.mjs` bundles are used directly
|
|
183
|
+
3. Runs in current Node.js process
|
|
184
|
+
4. Press Ctrl+C for graceful shutdown
|
|
185
|
+
|
|
186
|
+
## Caching
|
|
187
|
+
|
|
188
|
+
The CLI implements intelligent caching for faster builds:
|
|
189
|
+
|
|
190
|
+
### Package Cache
|
|
191
|
+
|
|
192
|
+
- NPM packages are cached in `.tmp/cache/packages/`
|
|
193
|
+
- Mutable versions (`latest`, `^`, `~`) are re-checked daily
|
|
194
|
+
- Exact versions (`0.4.1`) are cached indefinitely
|
|
195
|
+
|
|
196
|
+
### Build Cache
|
|
197
|
+
|
|
198
|
+
- Compiled bundles are cached in `.tmp/cache/builds/`
|
|
199
|
+
- Cache key based on flow.json content + current date
|
|
200
|
+
- Identical configs reuse cached build within the same day
|
|
201
|
+
|
|
202
|
+
### Cache Management
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# View cache info
|
|
206
|
+
walkeros cache info
|
|
207
|
+
|
|
208
|
+
# Clear all caches
|
|
209
|
+
walkeros cache clear
|
|
210
|
+
|
|
211
|
+
# Clear only package cache
|
|
212
|
+
walkeros cache clear --packages
|
|
213
|
+
|
|
214
|
+
# Clear only build cache
|
|
215
|
+
walkeros cache clear --builds
|
|
216
|
+
|
|
217
|
+
# Disable caching for a single build
|
|
218
|
+
walkeros bundle flow.json --no-cache
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Flow Configuration
|
|
222
|
+
|
|
223
|
+
Flow configs use the `Flow.Setup` format with `version` and `flows`:
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"version": 1,
|
|
228
|
+
"flows": {
|
|
229
|
+
"default": {
|
|
230
|
+
"server": {},
|
|
231
|
+
"packages": {
|
|
232
|
+
"@walkeros/collector": { "imports": ["startFlow"] },
|
|
233
|
+
"@walkeros/server-source-express": {},
|
|
234
|
+
"@walkeros/destination-demo": {}
|
|
235
|
+
},
|
|
236
|
+
"sources": {
|
|
237
|
+
"http": {
|
|
238
|
+
"package": "@walkeros/server-source-express",
|
|
239
|
+
"config": {
|
|
240
|
+
"settings": { "path": "/collect", "port": 8080 }
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"destinations": {
|
|
245
|
+
"demo": {
|
|
246
|
+
"package": "@walkeros/destination-demo",
|
|
247
|
+
"config": {
|
|
248
|
+
"settings": { "name": "Demo" }
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"collector": { "run": true }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
Platform is determined by the `web: {}` or `server: {}` key presence.
|
|
259
|
+
|
|
260
|
+
### Package Configuration Patterns
|
|
261
|
+
|
|
262
|
+
The CLI automatically resolves imports based on how you configure packages:
|
|
263
|
+
|
|
264
|
+
**1. Default exports (recommended for single-export packages):**
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"packages": {
|
|
269
|
+
"@walkeros/server-destination-api": {}
|
|
270
|
+
},
|
|
271
|
+
"destinations": {
|
|
272
|
+
"api": {
|
|
273
|
+
"package": "@walkeros/server-destination-api"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
The CLI generates:
|
|
280
|
+
`import _walkerosServerDestinationApi from '@walkeros/server-destination-api';`
|
|
281
|
+
|
|
282
|
+
**2. Named exports (for multi-export packages):**
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"packages": {
|
|
287
|
+
"@walkeros/server-destination-gcp": {}
|
|
288
|
+
},
|
|
289
|
+
"destinations": {
|
|
290
|
+
"bigquery": {
|
|
291
|
+
"package": "@walkeros/server-destination-gcp",
|
|
292
|
+
"code": "destinationBigQuery"
|
|
293
|
+
},
|
|
294
|
+
"analytics": {
|
|
295
|
+
"package": "@walkeros/server-destination-gcp",
|
|
296
|
+
"code": "destinationAnalytics"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
The CLI generates:
|
|
303
|
+
`import { destinationBigQuery, destinationAnalytics } from '@walkeros/server-destination-gcp';`
|
|
304
|
+
|
|
305
|
+
**3. Utility imports (for helper functions):**
|
|
306
|
+
|
|
307
|
+
```json
|
|
308
|
+
{
|
|
309
|
+
"packages": {
|
|
310
|
+
"lodash": { "imports": ["get", "set"] }
|
|
311
|
+
},
|
|
312
|
+
"mappings": {
|
|
313
|
+
"custom": {
|
|
314
|
+
"data": "({ data }) => get(data, 'user.email')"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
The CLI generates: `import { get, set } from 'lodash';`
|
|
321
|
+
|
|
322
|
+
**Key points:**
|
|
323
|
+
|
|
324
|
+
- Omit `packages.imports` for destinations/sources - the default export is used
|
|
325
|
+
automatically
|
|
326
|
+
- Only specify `code` when using a specific named export from a multi-export
|
|
327
|
+
package
|
|
328
|
+
- Use `packages.imports` only for utilities needed in mappings or custom code
|
|
329
|
+
|
|
330
|
+
### Local Packages
|
|
331
|
+
|
|
332
|
+
Use local packages instead of npm for development or testing unpublished
|
|
333
|
+
packages:
|
|
334
|
+
|
|
335
|
+
```json
|
|
336
|
+
{
|
|
337
|
+
"packages": {
|
|
338
|
+
"@walkeros/collector": {
|
|
339
|
+
"path": "../packages/collector",
|
|
340
|
+
"imports": ["startFlow"]
|
|
341
|
+
},
|
|
342
|
+
"@my/custom-destination": {
|
|
343
|
+
"path": "./my-destination",
|
|
344
|
+
"imports": ["myDestination"]
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Resolution rules:**
|
|
351
|
+
|
|
352
|
+
- `path` takes precedence over `version`
|
|
353
|
+
- Relative paths are resolved from the config file's directory
|
|
354
|
+
- If `dist/` folder exists, it's used; otherwise package root is used
|
|
355
|
+
|
|
356
|
+
**Dependency resolution:**
|
|
357
|
+
|
|
358
|
+
When a local package has dependencies on other packages that are also specified
|
|
359
|
+
with local paths, the CLI will use the local versions for those dependencies
|
|
360
|
+
too. This prevents npm versions from overwriting your local packages.
|
|
361
|
+
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"packages": {
|
|
365
|
+
"@walkeros/core": {
|
|
366
|
+
"path": "../packages/core",
|
|
367
|
+
"imports": []
|
|
368
|
+
},
|
|
369
|
+
"@walkeros/collector": {
|
|
370
|
+
"path": "../packages/collector",
|
|
371
|
+
"imports": ["startFlow"]
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
In this example, even though `@walkeros/collector` depends on `@walkeros/core`,
|
|
378
|
+
the local version of core will be used (not downloaded from npm).
|
|
379
|
+
|
|
380
|
+
See [examples/](./examples/) for complete working configurations.
|
|
381
|
+
|
|
382
|
+
## Programmatic API
|
|
383
|
+
|
|
384
|
+
Use commands programmatically:
|
|
385
|
+
|
|
386
|
+
```typescript
|
|
387
|
+
import { bundle, simulate, runCommand } from '@walkeros/cli';
|
|
388
|
+
|
|
389
|
+
// Bundle
|
|
390
|
+
await bundle({
|
|
391
|
+
config: './flow.json',
|
|
392
|
+
stats: true,
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
// Simulate
|
|
396
|
+
const result = await simulate(
|
|
397
|
+
'./flow.json',
|
|
398
|
+
{ name: 'page view', data: { title: 'Test' } },
|
|
399
|
+
{ json: true },
|
|
400
|
+
);
|
|
401
|
+
|
|
402
|
+
// Run
|
|
403
|
+
await runCommand('collect', {
|
|
404
|
+
config: './flow.json',
|
|
405
|
+
port: 3000,
|
|
406
|
+
verbose: true,
|
|
407
|
+
});
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
## Examples
|
|
411
|
+
|
|
412
|
+
Working example configs in [examples/](./examples/):
|
|
413
|
+
|
|
414
|
+
- **server-collect.json** - Basic server-side collection
|
|
415
|
+
- **server-collection.json** - Advanced server setup
|
|
416
|
+
- **web-serve.json** - Web demo with API destination
|
|
417
|
+
- **web-tracking.json** - General web tracking
|
|
418
|
+
|
|
419
|
+
Try them:
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
# Bundle example
|
|
423
|
+
walkeros bundle examples/server-collect.json --stats
|
|
424
|
+
|
|
425
|
+
# Simulate
|
|
426
|
+
walkeros simulate \
|
|
427
|
+
examples/web-serve.json \
|
|
428
|
+
--event '{"name":"product view","data":{"id":"P123"}}'
|
|
429
|
+
|
|
430
|
+
# Run server
|
|
431
|
+
walkeros run collect examples/server-collect.json --port 3000
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
## Development Workflow
|
|
435
|
+
|
|
436
|
+
Typical development cycle:
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
# 1. Create/edit config
|
|
440
|
+
vim my-flow.json
|
|
441
|
+
|
|
442
|
+
# 2. Test with simulation (no real API calls)
|
|
443
|
+
walkeros simulate \
|
|
444
|
+
my-flow.json \
|
|
445
|
+
--event '{"name":"product view"}' \
|
|
446
|
+
--verbose
|
|
447
|
+
|
|
448
|
+
# 3. Bundle and check stats
|
|
449
|
+
walkeros bundle my-flow.json --stats
|
|
450
|
+
|
|
451
|
+
# 4. Run locally
|
|
452
|
+
walkeros run collect dist/bundle.mjs --port 3000
|
|
453
|
+
|
|
454
|
+
# 5. In another terminal, test it
|
|
455
|
+
curl -X POST http://localhost:3000/collect \
|
|
456
|
+
-H "Content-Type: application/json" \
|
|
457
|
+
-d '{"name":"page view","data":{"title":"Home"}}'
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## Architecture
|
|
461
|
+
|
|
462
|
+
```
|
|
463
|
+
CLI (downloads packages + bundles with esbuild)
|
|
464
|
+
├─ Bundle → optimized .mjs file
|
|
465
|
+
├─ Simulate → test bundle with events
|
|
466
|
+
└─ Run → execute bundle with built-in runtime
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Key principle**: CLI handles both build-time and runtime operations.
|
|
470
|
+
|
|
471
|
+
## Production Deployment
|
|
472
|
+
|
|
473
|
+
Deploy your flows using Docker or Node.js.
|
|
474
|
+
|
|
475
|
+
### Using Docker
|
|
476
|
+
|
|
477
|
+
The `walkeros/flow` image runs pre-built bundles in production:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
# Build your flow
|
|
481
|
+
walkeros bundle flow.json
|
|
482
|
+
|
|
483
|
+
# Run with Docker
|
|
484
|
+
docker run -v ./dist:/flow -p 8080:8080 walkeros/flow
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
**Custom image:**
|
|
488
|
+
|
|
489
|
+
```dockerfile
|
|
490
|
+
FROM walkeros/flow
|
|
491
|
+
COPY dist/bundle.mjs /flow/
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
**Environment variables:**
|
|
495
|
+
|
|
496
|
+
- `MODE` - `collect` or `serve` (default: `collect`)
|
|
497
|
+
- `PORT` - Server port (default: `8080`)
|
|
498
|
+
- `FILE` - Bundle path (default: `/flow/bundle.mjs`)
|
|
499
|
+
|
|
500
|
+
### Using Node.js
|
|
501
|
+
|
|
502
|
+
Run the bundle directly with the CLI:
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
# Build your flow
|
|
506
|
+
walkeros bundle flow.json
|
|
507
|
+
|
|
508
|
+
# Run in production
|
|
509
|
+
walkeros run collect dist/bundle.mjs --port 8080
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
This runs the flow in the current Node.js process, suitable for deployment on
|
|
513
|
+
platforms like AWS Lambda, Google Cloud Run, or any Node.js hosting.
|
|
514
|
+
|
|
515
|
+
## Requirements
|
|
516
|
+
|
|
517
|
+
- **Node.js**: 18+ or 22+
|
|
518
|
+
- **Docker**: Not required for CLI (only for production deployment)
|
|
519
|
+
|
|
520
|
+
## Type Definitions
|
|
521
|
+
|
|
522
|
+
See [src/types.ts](./src/types.ts) for TypeScript interfaces.
|
|
523
|
+
|
|
524
|
+
## Related
|
|
525
|
+
|
|
526
|
+
- [Website Documentation](https://www.walkeros.io/docs/cli/)
|
|
527
|
+
- [Flow Configuration](https://www.walkeros.io/docs/getting-started/flow/)
|
|
528
|
+
|
|
529
|
+
## License
|
|
530
|
+
|
|
531
|
+
MIT © elbwalker
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler-helpers.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/bundle/bundler-helpers.test.ts"],"names":[],"mappings":""}
|