You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/apps/cli.mdx
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,68 @@ The CLI uses types from `@walkeros/core`:
58
58
59
59
The CLI transforms `Flow.Setup` → `Flow.Config` (per flow) → bundled code that uses `Collector.InitConfig` at runtime.
60
60
61
+
## Local Packages
62
+
63
+
By default, the CLI downloads packages from npm. For development or testing unpublished packages, you can use local packages instead by specifying a `path` property.
64
+
65
+
### Configuration
66
+
67
+
Add a `path` property to any package to use a local directory instead of npm:
68
+
69
+
<CodeSnippet
70
+
code={`{
71
+
"packages": {
72
+
"@walkeros/collector": {
73
+
"version": "latest",
74
+
"imports": ["startFlow"]
75
+
},
76
+
"@my/custom-destination": {
77
+
"path": "./my-custom-destination",
78
+
"imports": ["myDestination"]
79
+
}
80
+
}
81
+
}`}
82
+
language="json"
83
+
/>
84
+
85
+
### Resolution Rules
86
+
87
+
-**`path` takes precedence** - When both `path` and `version` are specified, `path` is used
88
+
-**Relative paths** - Resolved relative to the config file's directory
89
+
-**Absolute paths** - Used as-is
90
+
-**dist folder** - If a `dist/` folder exists, it's used; otherwise the package root is used
91
+
92
+
### Use Cases
93
+
94
+
**Development of custom packages:**
95
+
<CodeSnippet
96
+
code={`{
97
+
"packages": {
98
+
"@my-org/destination-custom": {
99
+
"path": "../my-destination",
100
+
"imports": ["destinationCustom"]
101
+
}
102
+
}
103
+
}`}
104
+
language="json"
105
+
/>
106
+
107
+
**Testing local changes to walkerOS packages:**
108
+
<CodeSnippet
109
+
code={`{
110
+
"packages": {
111
+
"@walkeros/collector": {
112
+
"version": "latest",
113
+
"path": "../../packages/collector",
114
+
"imports": ["startFlow"]
115
+
}
116
+
}
117
+
}`}
118
+
language="json"
119
+
/>
120
+
121
+
When ready for production, simply remove the `path` property to use the published npm version.
122
+
61
123
## Getting Started
62
124
63
125
Before using the CLI, you need a [flow configuration file](/docs/getting-started/flow). Here's a minimal example:
0 commit comments