@walkeros/cli 0.7.0-next.0 → 1.0.0
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 +8 -151
- package/README.md +123 -37
- package/dist/examples/flow-order-complete.json +0 -1
- package/dist/examples/flow-simple.json +0 -3
- package/dist/examples/flow.json +0 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +882 -846
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.d.ts +2 -0
- package/dist/runtime/main.js +271 -0
- package/dist/runtime/main.js.map +1 -0
- package/examples/flow-order-complete.json +0 -1
- package/examples/flow-simple.json +0 -3
- package/examples/flow.json +0 -1
- package/package.json +10 -7
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler-helpers.test.js +0 -151
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +0 -1
- package/dist/__tests__/bundle/bundler.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler.test.js +0 -353
- package/dist/__tests__/bundle/bundler.test.js.map +0 -1
- package/dist/__tests__/bundle/programmatic.test.d.ts +0 -2
- package/dist/__tests__/bundle/programmatic.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/programmatic.test.js +0 -148
- package/dist/__tests__/bundle/programmatic.test.js.map +0 -1
- package/dist/__tests__/cli-e2e.test.d.ts +0 -8
- package/dist/__tests__/cli-e2e.test.d.ts.map +0 -1
- package/dist/__tests__/cli-e2e.test.js +0 -130
- package/dist/__tests__/cli-e2e.test.js.map +0 -1
- package/dist/__tests__/cli.test.d.ts +0 -2
- package/dist/__tests__/cli.test.d.ts.map +0 -1
- package/dist/__tests__/cli.test.js +0 -180
- package/dist/__tests__/cli.test.js.map +0 -1
- package/dist/__tests__/config-loader.test.d.ts +0 -7
- package/dist/__tests__/config-loader.test.d.ts.map +0 -1
- package/dist/__tests__/config-loader.test.js +0 -414
- package/dist/__tests__/config-loader.test.js.map +0 -1
- package/dist/__tests__/core/asset-resolver.test.d.ts +0 -2
- package/dist/__tests__/core/asset-resolver.test.d.ts.map +0 -1
- package/dist/__tests__/core/asset-resolver.test.js +0 -14
- package/dist/__tests__/core/asset-resolver.test.js.map +0 -1
- package/dist/__tests__/core/build-cache.test.d.ts +0 -2
- package/dist/__tests__/core/build-cache.test.d.ts.map +0 -1
- package/dist/__tests__/core/build-cache.test.js +0 -55
- package/dist/__tests__/core/build-cache.test.js.map +0 -1
- package/dist/__tests__/core/cache-utils.test.d.ts +0 -2
- package/dist/__tests__/core/cache-utils.test.d.ts.map +0 -1
- package/dist/__tests__/core/cache-utils.test.js +0 -70
- package/dist/__tests__/core/cache-utils.test.js.map +0 -1
- package/dist/__tests__/core/config.test.d.ts +0 -2
- package/dist/__tests__/core/config.test.d.ts.map +0 -1
- package/dist/__tests__/core/config.test.js +0 -72
- package/dist/__tests__/core/config.test.js.map +0 -1
- package/dist/__tests__/core/docker-url.test.d.ts +0 -2
- package/dist/__tests__/core/docker-url.test.d.ts.map +0 -1
- package/dist/__tests__/core/docker-url.test.js +0 -54
- package/dist/__tests__/core/docker-url.test.js.map +0 -1
- package/dist/__tests__/core/logger.test.d.ts +0 -2
- package/dist/__tests__/core/logger.test.d.ts.map +0 -1
- package/dist/__tests__/core/logger.test.js +0 -53
- package/dist/__tests__/core/logger.test.js.map +0 -1
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts +0 -8
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/bundle-run.integration.test.js +0 -54
- package/dist/__tests__/integration/bundle-run.integration.test.js.map +0 -1
- package/dist/__tests__/push/push.test.d.ts +0 -7
- package/dist/__tests__/push/push.test.d.ts.map +0 -1
- package/dist/__tests__/push/push.test.js +0 -197
- package/dist/__tests__/push/push.test.js.map +0 -1
- package/dist/__tests__/simulate/env-loader.test.d.ts +0 -2
- package/dist/__tests__/simulate/env-loader.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/env-loader.test.js +0 -47
- package/dist/__tests__/simulate/env-loader.test.js.map +0 -1
- package/dist/__tests__/simulate/node-executor.test.d.ts +0 -5
- package/dist/__tests__/simulate/node-executor.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/node-executor.test.js +0 -25
- package/dist/__tests__/simulate/node-executor.test.js.map +0 -1
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts +0 -5
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/server-simulate.integration.test.js +0 -58
- package/dist/__tests__/simulate/server-simulate.integration.test.js.map +0 -1
- package/dist/__tests__/smoke/production.smoke.test.d.ts +0 -8
- package/dist/__tests__/smoke/production.smoke.test.d.ts.map +0 -1
- package/dist/__tests__/smoke/production.smoke.test.js +0 -65
- package/dist/__tests__/smoke/production.smoke.test.js.map +0 -1
- package/dist/commands/bundle/bundler.d.ts +0 -32
- package/dist/commands/bundle/bundler.d.ts.map +0 -1
- package/dist/commands/bundle/bundler.js +0 -583
- package/dist/commands/bundle/bundler.js.map +0 -1
- package/dist/commands/bundle/index.d.ts +0 -57
- package/dist/commands/bundle/index.d.ts.map +0 -1
- package/dist/commands/bundle/index.js +0 -200
- package/dist/commands/bundle/index.js.map +0 -1
- package/dist/commands/bundle/package-manager.d.ts +0 -8
- package/dist/commands/bundle/package-manager.d.ts.map +0 -1
- package/dist/commands/bundle/package-manager.js +0 -197
- package/dist/commands/bundle/package-manager.js.map +0 -1
- package/dist/commands/bundle/stats.d.ts +0 -23
- package/dist/commands/bundle/stats.d.ts.map +0 -1
- package/dist/commands/bundle/stats.js +0 -52
- package/dist/commands/bundle/stats.js.map +0 -1
- package/dist/commands/cache.d.ts +0 -3
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/cache.js +0 -44
- package/dist/commands/cache.js.map +0 -1
- package/dist/commands/push/index.d.ts +0 -7
- package/dist/commands/push/index.d.ts.map +0 -1
- package/dist/commands/push/index.js +0 -257
- package/dist/commands/push/index.js.map +0 -1
- package/dist/commands/push/types.d.ts +0 -21
- package/dist/commands/push/types.d.ts.map +0 -1
- package/dist/commands/push/types.js +0 -2
- package/dist/commands/push/types.js.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.d.ts +0 -8
- package/dist/commands/run/__tests__/run.integration.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.js +0 -52
- package/dist/commands/run/__tests__/run.integration.test.js.map +0 -1
- package/dist/commands/run/__tests__/validators.test.d.ts +0 -2
- package/dist/commands/run/__tests__/validators.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/validators.test.js +0 -80
- package/dist/commands/run/__tests__/validators.test.js.map +0 -1
- package/dist/commands/run/execution.d.ts +0 -14
- package/dist/commands/run/execution.d.ts.map +0 -1
- package/dist/commands/run/execution.js +0 -41
- package/dist/commands/run/execution.js.map +0 -1
- package/dist/commands/run/index.d.ts +0 -39
- package/dist/commands/run/index.d.ts.map +0 -1
- package/dist/commands/run/index.js +0 -191
- package/dist/commands/run/index.js.map +0 -1
- package/dist/commands/run/types.d.ts +0 -60
- package/dist/commands/run/types.d.ts.map +0 -1
- package/dist/commands/run/types.js +0 -7
- package/dist/commands/run/types.js.map +0 -1
- package/dist/commands/run/utils.d.ts +0 -29
- package/dist/commands/run/utils.d.ts.map +0 -1
- package/dist/commands/run/utils.js +0 -52
- package/dist/commands/run/utils.js.map +0 -1
- package/dist/commands/run/validators.d.ts +0 -33
- package/dist/commands/run/validators.d.ts.map +0 -1
- package/dist/commands/run/validators.js +0 -58
- package/dist/commands/run/validators.js.map +0 -1
- package/dist/commands/simulate/env-loader.d.ts +0 -19
- package/dist/commands/simulate/env-loader.d.ts.map +0 -1
- package/dist/commands/simulate/env-loader.js +0 -46
- package/dist/commands/simulate/env-loader.js.map +0 -1
- package/dist/commands/simulate/index.d.ts +0 -48
- package/dist/commands/simulate/index.d.ts.map +0 -1
- package/dist/commands/simulate/index.js +0 -116
- package/dist/commands/simulate/index.js.map +0 -1
- package/dist/commands/simulate/jsdom-executor.d.ts +0 -37
- package/dist/commands/simulate/jsdom-executor.d.ts.map +0 -1
- package/dist/commands/simulate/jsdom-executor.js +0 -137
- package/dist/commands/simulate/jsdom-executor.js.map +0 -1
- package/dist/commands/simulate/node-executor.d.ts +0 -28
- package/dist/commands/simulate/node-executor.d.ts.map +0 -1
- package/dist/commands/simulate/node-executor.js +0 -94
- package/dist/commands/simulate/node-executor.js.map +0 -1
- package/dist/commands/simulate/simulator.d.ts +0 -14
- package/dist/commands/simulate/simulator.d.ts.map +0 -1
- package/dist/commands/simulate/simulator.js +0 -162
- package/dist/commands/simulate/simulator.js.map +0 -1
- package/dist/commands/simulate/tracker.d.ts +0 -30
- package/dist/commands/simulate/tracker.d.ts.map +0 -1
- package/dist/commands/simulate/tracker.js +0 -96
- package/dist/commands/simulate/tracker.js.map +0 -1
- package/dist/commands/simulate/types.d.ts +0 -18
- package/dist/commands/simulate/types.d.ts.map +0 -1
- package/dist/commands/simulate/types.js +0 -2
- package/dist/commands/simulate/types.js.map +0 -1
- package/dist/config/build-defaults.d.ts +0 -49
- package/dist/config/build-defaults.d.ts.map +0 -1
- package/dist/config/build-defaults.js +0 -70
- package/dist/config/build-defaults.js.map +0 -1
- package/dist/config/index.d.ts +0 -13
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -15
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts +0 -81
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js +0 -155
- package/dist/config/loader.js.map +0 -1
- package/dist/config/utils.d.ts +0 -114
- package/dist/config/utils.d.ts.map +0 -1
- package/dist/config/utils.js +0 -257
- package/dist/config/utils.js.map +0 -1
- package/dist/config/validators.d.ts +0 -52
- package/dist/config/validators.d.ts.map +0 -1
- package/dist/config/validators.js +0 -85
- package/dist/config/validators.js.map +0 -1
- package/dist/core/asset-resolver.d.ts +0 -34
- package/dist/core/asset-resolver.d.ts.map +0 -1
- package/dist/core/asset-resolver.js +0 -70
- package/dist/core/asset-resolver.js.map +0 -1
- package/dist/core/build-cache.d.ts +0 -23
- package/dist/core/build-cache.d.ts.map +0 -1
- package/dist/core/build-cache.js +0 -43
- package/dist/core/build-cache.js.map +0 -1
- package/dist/core/cache-utils.d.ts +0 -27
- package/dist/core/cache-utils.d.ts.map +0 -1
- package/dist/core/cache-utils.js +0 -60
- package/dist/core/cache-utils.js.map +0 -1
- package/dist/core/docker.d.ts +0 -102
- package/dist/core/docker.d.ts.map +0 -1
- package/dist/core/docker.js +0 -278
- package/dist/core/docker.js.map +0 -1
- package/dist/core/execution.d.ts +0 -34
- package/dist/core/execution.d.ts.map +0 -1
- package/dist/core/execution.js +0 -64
- package/dist/core/execution.js.map +0 -1
- package/dist/core/index.d.ts +0 -10
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -10
- package/dist/core/index.js.map +0 -1
- package/dist/core/local-packages.d.ts +0 -19
- package/dist/core/local-packages.d.ts.map +0 -1
- package/dist/core/local-packages.js +0 -60
- package/dist/core/local-packages.js.map +0 -1
- package/dist/core/logger.d.ts +0 -28
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -88
- package/dist/core/logger.js.map +0 -1
- package/dist/core/output.d.ts +0 -30
- package/dist/core/output.d.ts.map +0 -1
- package/dist/core/output.js +0 -46
- package/dist/core/output.js.map +0 -1
- package/dist/core/temp-manager.d.ts +0 -51
- package/dist/core/temp-manager.d.ts.map +0 -1
- package/dist/core/temp-manager.js +0 -73
- package/dist/core/temp-manager.js.map +0 -1
- package/dist/core/timer.d.ts +0 -14
- package/dist/core/timer.d.ts.map +0 -1
- package/dist/core/timer.js +0 -29
- package/dist/core/timer.js.map +0 -1
- package/dist/core/utils.d.ts +0 -10
- package/dist/core/utils.d.ts.map +0 -1
- package/dist/core/utils.js +0 -12
- package/dist/core/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/schemas/index.d.ts +0 -9
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/index.js +0 -9
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/primitives.d.ts +0 -37
- package/dist/schemas/primitives.d.ts.map +0 -1
- package/dist/schemas/primitives.js +0 -43
- package/dist/schemas/primitives.js.map +0 -1
- package/dist/schemas/run.d.ts +0 -23
- package/dist/schemas/run.d.ts.map +0 -1
- package/dist/schemas/run.js +0 -20
- package/dist/schemas/run.js.map +0 -1
- package/dist/types/bundle.d.ts +0 -141
- package/dist/types/bundle.d.ts.map +0 -1
- package/dist/types/bundle.js +0 -10
- package/dist/types/bundle.js.map +0 -1
- package/dist/types/global.d.ts +0 -51
- package/dist/types/global.d.ts.map +0 -1
- package/dist/types/global.js +0 -30
- package/dist/types/global.js.map +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
- package/dist/version.d.ts +0 -3
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -27
- package/dist/version.js.map +0 -1
- package/dist/walker.js +0 -1
package/dist/config/utils.d.ts
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration Utility Functions
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Check if a string is a valid URL
|
|
6
|
-
*
|
|
7
|
-
* @param str - String to check
|
|
8
|
-
* @returns True if string is a valid HTTP/HTTPS URL
|
|
9
|
-
*/
|
|
10
|
-
export declare function isUrl(str: string): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Download a file from a URL to a temporary location
|
|
13
|
-
*
|
|
14
|
-
* @param url - HTTP/HTTPS URL to download
|
|
15
|
-
* @returns Path to downloaded temporary file
|
|
16
|
-
* @throws Error if download fails or response is not OK
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* const tempPath = await downloadFromUrl('https://example.com/config.json')
|
|
21
|
-
* // Returns: "/tmp/walkeros-download-1647261462000-abc123.json"
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare function downloadFromUrl(url: string): Promise<string>;
|
|
25
|
-
/**
|
|
26
|
-
* Substitute environment variables in a string.
|
|
27
|
-
*
|
|
28
|
-
* @param value - String with ${VAR} placeholders
|
|
29
|
-
* @returns String with environment variables substituted
|
|
30
|
-
* @throws Error if environment variable is not found
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* substituteEnvVariables('${HOME}/config') // "/Users/name/config"
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare function substituteEnvVariables(value: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Load and parse JSON configuration file from local path or URL.
|
|
40
|
-
*
|
|
41
|
-
* @param configPath - Path to JSON file or HTTP/HTTPS URL
|
|
42
|
-
* @returns Parsed configuration object and cleanup function
|
|
43
|
-
* @throws Error if file not found, download fails, or invalid JSON
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```typescript
|
|
47
|
-
* // Local file
|
|
48
|
-
* const config = await loadJsonConfig('./config.json')
|
|
49
|
-
*
|
|
50
|
-
* // Remote URL
|
|
51
|
-
* const config = await loadJsonConfig('https://example.com/config.json')
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
export declare function loadJsonConfig<T>(configPath: string): Promise<T>;
|
|
55
|
-
/**
|
|
56
|
-
* Generate a unique temporary directory path.
|
|
57
|
-
*
|
|
58
|
-
* @param tempDir - Base temporary directory (default: ".tmp")
|
|
59
|
-
* @returns Absolute path to unique temp directory
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```typescript
|
|
63
|
-
* getTempDir() // "/workspaces/project/.tmp/cli-1647261462000-abc123"
|
|
64
|
-
* getTempDir('/tmp') // "/tmp/cli-1647261462000-abc123"
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
export declare function getTempDir(tempDir?: string): string;
|
|
68
|
-
/**
|
|
69
|
-
* Load JSON from inline string, file path, or URL.
|
|
70
|
-
*
|
|
71
|
-
* Supports three input formats:
|
|
72
|
-
* 1. Inline JSON string - parsed directly
|
|
73
|
-
* 2. Local file path - read and parsed
|
|
74
|
-
* 3. HTTP/HTTPS URL - downloaded and parsed
|
|
75
|
-
*
|
|
76
|
-
* Detection priority:
|
|
77
|
-
* 1. URL (http://, https://) → download and parse
|
|
78
|
-
* 2. Existing file path → read and parse
|
|
79
|
-
* 3. Valid JSON string → parse directly
|
|
80
|
-
* 4. Simple string → treat as {name: string} for backward compatibility
|
|
81
|
-
*
|
|
82
|
-
* @param source - JSON string, file path, or URL
|
|
83
|
-
* @param options - Optional configuration
|
|
84
|
-
* @param options.name - Parameter name for error messages (e.g., "event", "config")
|
|
85
|
-
* @param options.required - Throw error if source is empty (default: false)
|
|
86
|
-
* @param options.fallback - Default value if source is empty
|
|
87
|
-
* @returns Parsed JSON object
|
|
88
|
-
* @throws Error if source is required but empty, or if loading/parsing fails
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* // Inline JSON
|
|
93
|
-
* await loadJsonFromSource('{"name":"order complete","data":{}}')
|
|
94
|
-
*
|
|
95
|
-
* // File path
|
|
96
|
-
* await loadJsonFromSource('./examples/event.json')
|
|
97
|
-
*
|
|
98
|
-
* // URL
|
|
99
|
-
* await loadJsonFromSource('https://example.com/event.json')
|
|
100
|
-
*
|
|
101
|
-
* // With options
|
|
102
|
-
* await loadJsonFromSource(input, {
|
|
103
|
-
* name: 'event',
|
|
104
|
-
* required: true,
|
|
105
|
-
* fallback: { name: 'default' }
|
|
106
|
-
* })
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
export declare function loadJsonFromSource<T = unknown>(source: string | undefined, options?: {
|
|
110
|
-
name?: string;
|
|
111
|
-
required?: boolean;
|
|
112
|
-
fallback?: T;
|
|
113
|
-
}): Promise<T>;
|
|
114
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/config/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkClE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ5D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAmCtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,GAAG,MAAM,CAMnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,GAAG,OAAO,EAClD,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,CAAC,EAAE;IACR,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC;CACd,GACA,OAAO,CAAC,CAAC,CAAC,CAmEZ"}
|
package/dist/config/utils.js
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration Utility Functions
|
|
3
|
-
*/
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import os from 'os';
|
|
7
|
-
import { getErrorMessage } from '../core/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* Check if a string is a valid URL
|
|
10
|
-
*
|
|
11
|
-
* @param str - String to check
|
|
12
|
-
* @returns True if string is a valid HTTP/HTTPS URL
|
|
13
|
-
*/
|
|
14
|
-
export function isUrl(str) {
|
|
15
|
-
try {
|
|
16
|
-
const url = new URL(str);
|
|
17
|
-
return url.protocol === 'http:' || url.protocol === 'https:';
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Download a file from a URL to a temporary location
|
|
25
|
-
*
|
|
26
|
-
* @param url - HTTP/HTTPS URL to download
|
|
27
|
-
* @returns Path to downloaded temporary file
|
|
28
|
-
* @throws Error if download fails or response is not OK
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* const tempPath = await downloadFromUrl('https://example.com/config.json')
|
|
33
|
-
* // Returns: "/tmp/walkeros-download-1647261462000-abc123.json"
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
export async function downloadFromUrl(url) {
|
|
37
|
-
if (!isUrl(url)) {
|
|
38
|
-
throw new Error(`Invalid URL: ${url}`);
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
const response = await fetch(url);
|
|
42
|
-
if (!response.ok) {
|
|
43
|
-
throw new Error(`Failed to download ${url}: ${response.status} ${response.statusText}`);
|
|
44
|
-
}
|
|
45
|
-
const content = await response.text();
|
|
46
|
-
// Extract filename from URL or generate one
|
|
47
|
-
const urlObj = new URL(url);
|
|
48
|
-
const urlFilename = path.basename(urlObj.pathname);
|
|
49
|
-
const extension = path.extname(urlFilename) || '.json';
|
|
50
|
-
const randomId = Math.random().toString(36).substring(2, 11);
|
|
51
|
-
const filename = `walkeros-download-${Date.now()}-${randomId}${extension}`;
|
|
52
|
-
// Write to system temp directory
|
|
53
|
-
const tempPath = path.join(os.tmpdir(), filename);
|
|
54
|
-
await fs.writeFile(tempPath, content, 'utf-8');
|
|
55
|
-
return tempPath;
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
if (error instanceof Error) {
|
|
59
|
-
throw new Error(`Failed to download from URL: ${error.message}`);
|
|
60
|
-
}
|
|
61
|
-
throw error;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Substitute environment variables in a string.
|
|
66
|
-
*
|
|
67
|
-
* @param value - String with ${VAR} placeholders
|
|
68
|
-
* @returns String with environment variables substituted
|
|
69
|
-
* @throws Error if environment variable is not found
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```typescript
|
|
73
|
-
* substituteEnvVariables('${HOME}/config') // "/Users/name/config"
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
export function substituteEnvVariables(value) {
|
|
77
|
-
return value.replace(/\${([^}]+)}/g, (_, envVar) => {
|
|
78
|
-
const envValue = process.env[envVar];
|
|
79
|
-
if (!envValue) {
|
|
80
|
-
throw new Error(`Environment variable ${envVar} not found`);
|
|
81
|
-
}
|
|
82
|
-
return envValue;
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Load and parse JSON configuration file from local path or URL.
|
|
87
|
-
*
|
|
88
|
-
* @param configPath - Path to JSON file or HTTP/HTTPS URL
|
|
89
|
-
* @returns Parsed configuration object and cleanup function
|
|
90
|
-
* @throws Error if file not found, download fails, or invalid JSON
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* ```typescript
|
|
94
|
-
* // Local file
|
|
95
|
-
* const config = await loadJsonConfig('./config.json')
|
|
96
|
-
*
|
|
97
|
-
* // Remote URL
|
|
98
|
-
* const config = await loadJsonConfig('https://example.com/config.json')
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export async function loadJsonConfig(configPath) {
|
|
102
|
-
let absolutePath;
|
|
103
|
-
let isTemporary = false;
|
|
104
|
-
// Check if input is a URL
|
|
105
|
-
if (isUrl(configPath)) {
|
|
106
|
-
// Download from URL to temp location
|
|
107
|
-
absolutePath = await downloadFromUrl(configPath);
|
|
108
|
-
isTemporary = true;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
// Local file path
|
|
112
|
-
absolutePath = path.resolve(configPath);
|
|
113
|
-
if (!(await fs.pathExists(absolutePath))) {
|
|
114
|
-
throw new Error(`Configuration file not found: ${absolutePath}`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
try {
|
|
118
|
-
const rawConfig = await fs.readJson(absolutePath);
|
|
119
|
-
return rawConfig;
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
throw new Error(`Invalid JSON in config file: ${configPath}. ${error instanceof Error ? error.message : error}`);
|
|
123
|
-
}
|
|
124
|
-
finally {
|
|
125
|
-
// Clean up temporary downloaded file
|
|
126
|
-
if (isTemporary) {
|
|
127
|
-
try {
|
|
128
|
-
await fs.remove(absolutePath);
|
|
129
|
-
}
|
|
130
|
-
catch {
|
|
131
|
-
// Ignore cleanup errors
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Generate a unique temporary directory path.
|
|
138
|
-
*
|
|
139
|
-
* @param tempDir - Base temporary directory (default: ".tmp")
|
|
140
|
-
* @returns Absolute path to unique temp directory
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```typescript
|
|
144
|
-
* getTempDir() // "/workspaces/project/.tmp/cli-1647261462000-abc123"
|
|
145
|
-
* getTempDir('/tmp') // "/tmp/cli-1647261462000-abc123"
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
export function getTempDir(tempDir = '.tmp') {
|
|
149
|
-
const randomId = Math.random().toString(36).substring(2, 11);
|
|
150
|
-
const basePath = path.isAbsolute(tempDir)
|
|
151
|
-
? tempDir
|
|
152
|
-
: path.join(process.cwd(), tempDir);
|
|
153
|
-
return path.join(basePath, `cli-${Date.now()}-${randomId}`);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Load JSON from inline string, file path, or URL.
|
|
157
|
-
*
|
|
158
|
-
* Supports three input formats:
|
|
159
|
-
* 1. Inline JSON string - parsed directly
|
|
160
|
-
* 2. Local file path - read and parsed
|
|
161
|
-
* 3. HTTP/HTTPS URL - downloaded and parsed
|
|
162
|
-
*
|
|
163
|
-
* Detection priority:
|
|
164
|
-
* 1. URL (http://, https://) → download and parse
|
|
165
|
-
* 2. Existing file path → read and parse
|
|
166
|
-
* 3. Valid JSON string → parse directly
|
|
167
|
-
* 4. Simple string → treat as {name: string} for backward compatibility
|
|
168
|
-
*
|
|
169
|
-
* @param source - JSON string, file path, or URL
|
|
170
|
-
* @param options - Optional configuration
|
|
171
|
-
* @param options.name - Parameter name for error messages (e.g., "event", "config")
|
|
172
|
-
* @param options.required - Throw error if source is empty (default: false)
|
|
173
|
-
* @param options.fallback - Default value if source is empty
|
|
174
|
-
* @returns Parsed JSON object
|
|
175
|
-
* @throws Error if source is required but empty, or if loading/parsing fails
|
|
176
|
-
*
|
|
177
|
-
* @example
|
|
178
|
-
* ```typescript
|
|
179
|
-
* // Inline JSON
|
|
180
|
-
* await loadJsonFromSource('{"name":"order complete","data":{}}')
|
|
181
|
-
*
|
|
182
|
-
* // File path
|
|
183
|
-
* await loadJsonFromSource('./examples/event.json')
|
|
184
|
-
*
|
|
185
|
-
* // URL
|
|
186
|
-
* await loadJsonFromSource('https://example.com/event.json')
|
|
187
|
-
*
|
|
188
|
-
* // With options
|
|
189
|
-
* await loadJsonFromSource(input, {
|
|
190
|
-
* name: 'event',
|
|
191
|
-
* required: true,
|
|
192
|
-
* fallback: { name: 'default' }
|
|
193
|
-
* })
|
|
194
|
-
* ```
|
|
195
|
-
*/
|
|
196
|
-
export async function loadJsonFromSource(source, options) {
|
|
197
|
-
const paramName = options?.name || 'input';
|
|
198
|
-
// Handle empty/undefined input
|
|
199
|
-
if (!source || source.trim() === '') {
|
|
200
|
-
if (options?.required) {
|
|
201
|
-
throw new Error(`${paramName} is required`);
|
|
202
|
-
}
|
|
203
|
-
if (options?.fallback !== undefined) {
|
|
204
|
-
return options.fallback;
|
|
205
|
-
}
|
|
206
|
-
return {};
|
|
207
|
-
}
|
|
208
|
-
const trimmedSource = source.trim();
|
|
209
|
-
// 1. Check if URL
|
|
210
|
-
if (isUrl(trimmedSource)) {
|
|
211
|
-
try {
|
|
212
|
-
const tempPath = await downloadFromUrl(trimmedSource);
|
|
213
|
-
try {
|
|
214
|
-
const data = await fs.readJson(tempPath);
|
|
215
|
-
return data;
|
|
216
|
-
}
|
|
217
|
-
finally {
|
|
218
|
-
// Clean up temp file
|
|
219
|
-
try {
|
|
220
|
-
await fs.remove(tempPath);
|
|
221
|
-
}
|
|
222
|
-
catch {
|
|
223
|
-
// Ignore cleanup errors
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
catch (error) {
|
|
228
|
-
throw new Error(`Failed to load ${paramName} from URL ${trimmedSource}: ${getErrorMessage(error)}`);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
// 2. Check if file path exists
|
|
232
|
-
const resolvedPath = path.resolve(trimmedSource);
|
|
233
|
-
if (await fs.pathExists(resolvedPath)) {
|
|
234
|
-
try {
|
|
235
|
-
const data = await fs.readJson(resolvedPath);
|
|
236
|
-
return data;
|
|
237
|
-
}
|
|
238
|
-
catch (error) {
|
|
239
|
-
throw new Error(`Failed to parse ${paramName} from file ${trimmedSource}: ${getErrorMessage(error)}`);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
// 3. Try to parse as inline JSON
|
|
243
|
-
try {
|
|
244
|
-
const parsed = JSON.parse(trimmedSource);
|
|
245
|
-
return parsed;
|
|
246
|
-
}
|
|
247
|
-
catch (jsonError) {
|
|
248
|
-
// 4. Fallback: treat as event name string for backward compatibility
|
|
249
|
-
// This allows simple strings like "page view" to work
|
|
250
|
-
if (!trimmedSource.startsWith('{') && !trimmedSource.startsWith('[')) {
|
|
251
|
-
return { name: trimmedSource };
|
|
252
|
-
}
|
|
253
|
-
// If it looks like JSON but failed to parse, throw helpful error
|
|
254
|
-
throw new Error(`Failed to parse ${paramName}. Input appears to be JSON but contains errors: ${jsonError instanceof Error ? jsonError.message : String(jsonError)}`);
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/config/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/config/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACzB,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,sBAAsB,G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C,GAAG,CAAC,EAAE,CAAC;YACrE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAO,CAAC;QACtC,CAAC;QAED,iEAAiE;QACjE,MAAM,IAAI,KAAK,CACb,mBAAmB,SAAS,mDAAmD,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CACpJ,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration Type Guards and Validators
|
|
3
|
-
*
|
|
4
|
-
* Type checking utilities for configuration validation.
|
|
5
|
-
* Uses Zod schemas from @walkeros/core for Flow.Setup validation.
|
|
6
|
-
*/
|
|
7
|
-
import type { Flow } from '@walkeros/core';
|
|
8
|
-
/**
|
|
9
|
-
* Type guard: Check if value is a plain object.
|
|
10
|
-
*/
|
|
11
|
-
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
12
|
-
/**
|
|
13
|
-
* Detect platform from flow config.
|
|
14
|
-
*
|
|
15
|
-
* Platform is determined by the presence of `web` or `server` key.
|
|
16
|
-
*/
|
|
17
|
-
export declare function detectPlatform(flowConfig: Record<string, unknown>): 'web' | 'server' | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Type guard: Check if config is a valid Flow.Setup structure.
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
* Uses Zod validation from @walkeros/core.
|
|
23
|
-
* Returns false instead of throwing on invalid input.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```typescript
|
|
27
|
-
* if (isFlowSetup(config)) {
|
|
28
|
-
* const flowConfig = getFlowConfig(config, 'production');
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare function isFlowSetup(data: unknown): data is Flow.Setup;
|
|
33
|
-
/**
|
|
34
|
-
* Validate Flow.Setup and throw descriptive error if invalid.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* Uses Zod validation from @walkeros/core.
|
|
38
|
-
* Provides detailed error messages from Zod.
|
|
39
|
-
*
|
|
40
|
-
* @param data - Raw configuration data
|
|
41
|
-
* @returns Validated Flow.Setup
|
|
42
|
-
* @throws Error with descriptive message if validation fails
|
|
43
|
-
*/
|
|
44
|
-
export declare function validateFlowSetup(data: unknown): Flow.Setup;
|
|
45
|
-
/**
|
|
46
|
-
* Get available flow names from a Flow.Setup.
|
|
47
|
-
*
|
|
48
|
-
* @param setup - Flow.Setup configuration
|
|
49
|
-
* @returns Array of flow names
|
|
50
|
-
*/
|
|
51
|
-
export declare function getAvailableFlows(setup: Flow.Setup): string[];
|
|
52
|
-
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/config/validators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAK3C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,KAAK,GAAG,QAAQ,GAAG,SAAS,CAQ9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,CAG7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAkB3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,MAAM,EAAE,CAE7D"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration Type Guards and Validators
|
|
3
|
-
*
|
|
4
|
-
* Type checking utilities for configuration validation.
|
|
5
|
-
* Uses Zod schemas from @walkeros/core for Flow.Setup validation.
|
|
6
|
-
*/
|
|
7
|
-
import { schemas } from '@walkeros/core/dev';
|
|
8
|
-
const { safeParseSetup } = schemas;
|
|
9
|
-
/**
|
|
10
|
-
* Type guard: Check if value is a plain object.
|
|
11
|
-
*/
|
|
12
|
-
export function isObject(value) {
|
|
13
|
-
return (typeof value === 'object' &&
|
|
14
|
-
value !== null &&
|
|
15
|
-
!Array.isArray(value) &&
|
|
16
|
-
Object.prototype.toString.call(value) === '[object Object]');
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Detect platform from flow config.
|
|
20
|
-
*
|
|
21
|
-
* Platform is determined by the presence of `web` or `server` key.
|
|
22
|
-
*/
|
|
23
|
-
export function detectPlatform(flowConfig) {
|
|
24
|
-
if ('web' in flowConfig && flowConfig.web !== undefined) {
|
|
25
|
-
return 'web';
|
|
26
|
-
}
|
|
27
|
-
if ('server' in flowConfig && flowConfig.server !== undefined) {
|
|
28
|
-
return 'server';
|
|
29
|
-
}
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Type guard: Check if config is a valid Flow.Setup structure.
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
* Uses Zod validation from @walkeros/core.
|
|
37
|
-
* Returns false instead of throwing on invalid input.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* if (isFlowSetup(config)) {
|
|
42
|
-
* const flowConfig = getFlowConfig(config, 'production');
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
export function isFlowSetup(data) {
|
|
47
|
-
const result = safeParseSetup(data);
|
|
48
|
-
return result.success;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Validate Flow.Setup and throw descriptive error if invalid.
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Uses Zod validation from @walkeros/core.
|
|
55
|
-
* Provides detailed error messages from Zod.
|
|
56
|
-
*
|
|
57
|
-
* @param data - Raw configuration data
|
|
58
|
-
* @returns Validated Flow.Setup
|
|
59
|
-
* @throws Error with descriptive message if validation fails
|
|
60
|
-
*/
|
|
61
|
-
export function validateFlowSetup(data) {
|
|
62
|
-
const result = safeParseSetup(data);
|
|
63
|
-
if (!result.success) {
|
|
64
|
-
// Format Zod errors for CLI display
|
|
65
|
-
const errors = result.error.issues
|
|
66
|
-
.map((issue) => {
|
|
67
|
-
const path = issue.path.length > 0 ? issue.path.map(String).join('.') : 'root';
|
|
68
|
-
return ` - ${path}: ${issue.message}`;
|
|
69
|
-
})
|
|
70
|
-
.join('\n');
|
|
71
|
-
throw new Error(`Invalid configuration:\n${errors}`);
|
|
72
|
-
}
|
|
73
|
-
// Cast to Flow.Setup since Zod's inferred type is compatible but not identical
|
|
74
|
-
return result.data;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Get available flow names from a Flow.Setup.
|
|
78
|
-
*
|
|
79
|
-
* @param setup - Flow.Setup configuration
|
|
80
|
-
* @returns Array of flow names
|
|
81
|
-
*/
|
|
82
|
-
export function getAvailableFlows(setup) {
|
|
83
|
-
return Object.keys(setup.flows);
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=validators.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/config/validators.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;AAEnC;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ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,CAAC;QAEd,MAAM,IAAI,KAAK,CAAC,2BAA2B,MAAM,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,+EAA+E;IAC/E,OAAO,MAAM,CAAC,IAAkB,CAAC;AACnC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAiB;IACjD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Asset Resolver
|
|
3
|
-
*
|
|
4
|
-
* Unified path resolution for package assets (examples) and user assets.
|
|
5
|
-
* Assets are always siblings to the CLI entry point (in dist/ for production).
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Get the directory containing CLI assets (examples).
|
|
9
|
-
*
|
|
10
|
-
* In production: assets are in dist/ alongside the bundled CLI
|
|
11
|
-
* In development: assets are at package root
|
|
12
|
-
*
|
|
13
|
-
* @returns Absolute path to assets directory
|
|
14
|
-
*/
|
|
15
|
-
export declare function getAssetDir(): string;
|
|
16
|
-
/**
|
|
17
|
-
* Asset type for resolution strategy
|
|
18
|
-
*/
|
|
19
|
-
export type AssetType = 'config' | 'bundle';
|
|
20
|
-
/**
|
|
21
|
-
* Resolve asset path using unified strategy
|
|
22
|
-
*
|
|
23
|
-
* Resolution rules:
|
|
24
|
-
* 1. Bare names (no / or \) → Package asset (examples)
|
|
25
|
-
* 2. Relative paths (./ or ../) → User asset relative to base directory
|
|
26
|
-
* 3. Absolute paths → Use as-is
|
|
27
|
-
*
|
|
28
|
-
* @param assetPath - Path to resolve
|
|
29
|
-
* @param assetType - Type of asset (determines package subdirectory)
|
|
30
|
-
* @param baseDir - Base directory for relative paths (defaults to cwd)
|
|
31
|
-
* @returns Absolute path to asset
|
|
32
|
-
*/
|
|
33
|
-
export declare function resolveAsset(assetPath: string, assetType: AssetType, baseDir?: string): string;
|
|
34
|
-
//# sourceMappingURL=asset-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset-resolver.d.ts","sourceRoot":"","sources":["../../src/core/asset-resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAkBpC;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAmBR"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Asset Resolver
|
|
3
|
-
*
|
|
4
|
-
* Unified path resolution for package assets (examples) and user assets.
|
|
5
|
-
* Assets are always siblings to the CLI entry point (in dist/ for production).
|
|
6
|
-
*/
|
|
7
|
-
import { fileURLToPath } from 'url';
|
|
8
|
-
import { existsSync } from 'fs';
|
|
9
|
-
import path from 'path';
|
|
10
|
-
import { isUrl } from '../config/utils.js';
|
|
11
|
-
/**
|
|
12
|
-
* Cached asset directory to avoid repeated filesystem checks
|
|
13
|
-
*/
|
|
14
|
-
let cachedAssetDir;
|
|
15
|
-
/**
|
|
16
|
-
* Get the directory containing CLI assets (examples).
|
|
17
|
-
*
|
|
18
|
-
* In production: assets are in dist/ alongside the bundled CLI
|
|
19
|
-
* In development: assets are at package root
|
|
20
|
-
*
|
|
21
|
-
* @returns Absolute path to assets directory
|
|
22
|
-
*/
|
|
23
|
-
export function getAssetDir() {
|
|
24
|
-
if (cachedAssetDir)
|
|
25
|
-
return cachedAssetDir;
|
|
26
|
-
const currentFile = fileURLToPath(import.meta.url);
|
|
27
|
-
let dir = path.dirname(currentFile);
|
|
28
|
-
// Walk up until we find a directory with examples/ sibling
|
|
29
|
-
while (dir !== path.dirname(dir)) {
|
|
30
|
-
if (existsSync(path.join(dir, 'examples'))) {
|
|
31
|
-
cachedAssetDir = dir;
|
|
32
|
-
return dir;
|
|
33
|
-
}
|
|
34
|
-
dir = path.dirname(dir);
|
|
35
|
-
}
|
|
36
|
-
// Fallback to current file's directory (shouldn't happen if build is correct)
|
|
37
|
-
cachedAssetDir = path.dirname(currentFile);
|
|
38
|
-
return cachedAssetDir;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Resolve asset path using unified strategy
|
|
42
|
-
*
|
|
43
|
-
* Resolution rules:
|
|
44
|
-
* 1. Bare names (no / or \) → Package asset (examples)
|
|
45
|
-
* 2. Relative paths (./ or ../) → User asset relative to base directory
|
|
46
|
-
* 3. Absolute paths → Use as-is
|
|
47
|
-
*
|
|
48
|
-
* @param assetPath - Path to resolve
|
|
49
|
-
* @param assetType - Type of asset (determines package subdirectory)
|
|
50
|
-
* @param baseDir - Base directory for relative paths (defaults to cwd)
|
|
51
|
-
* @returns Absolute path to asset
|
|
52
|
-
*/
|
|
53
|
-
export function resolveAsset(assetPath, assetType, baseDir) {
|
|
54
|
-
// URL → pass through unchanged
|
|
55
|
-
if (isUrl(assetPath)) {
|
|
56
|
-
return assetPath;
|
|
57
|
-
}
|
|
58
|
-
// Bare name → package asset (examples directory)
|
|
59
|
-
if (!assetPath.includes('/') && !assetPath.includes('\\')) {
|
|
60
|
-
const assetDir = getAssetDir();
|
|
61
|
-
return path.join(assetDir, 'examples', assetPath);
|
|
62
|
-
}
|
|
63
|
-
// Absolute path → use as-is
|
|
64
|
-
if (path.isAbsolute(assetPath)) {
|
|
65
|
-
return assetPath;
|
|
66
|
-
}
|
|
67
|
-
// Relative path → resolve from base directory
|
|
68
|
-
return path.resolve(baseDir || process.cwd(), assetPath);
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=asset-resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset-resolver.js","sourceRoot":"","sources":["../../src/core/asset-resolver.ts"],"names":[],"mappings":"A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AAQ,GAAG,WAAW,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;IAED,4BAA4B;IAC5B,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,8CAA8C;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build artifact cache for flow.json configurations
|
|
3
|
-
*
|
|
4
|
-
* Caches compiled bundles based on configuration content + date.
|
|
5
|
-
* Enables intelligent cache reuse with daily rebuild guarantee.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Get the cache file path for a flow.json configuration
|
|
9
|
-
*/
|
|
10
|
-
export declare function getBuildCachePath(configContent: string, cacheDir?: string): Promise<string>;
|
|
11
|
-
/**
|
|
12
|
-
* Check if a cached build exists for the given configuration
|
|
13
|
-
*/
|
|
14
|
-
export declare function isBuildCached(configContent: string, cacheDir?: string): Promise<boolean>;
|
|
15
|
-
/**
|
|
16
|
-
* Store a build artifact in the cache
|
|
17
|
-
*/
|
|
18
|
-
export declare function cacheBuild(configContent: string, buildOutput: string, cacheDir?: string): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Retrieve a cached build artifact
|
|
21
|
-
*/
|
|
22
|
-
export declare function getCachedBuild(configContent: string, cacheDir?: string): Promise<string | null>;
|
|
23
|
-
//# sourceMappingURL=build-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-cache.d.ts","sourceRoot":"","sources":["../../src/core/build-cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,aAAa,EAAE,MAAM,EACrB,QAAQ,GAAE,MAAwB,GACjC,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,aAAa,EAAE,MAAM,EACrB,QAAQ,GAAE,MAAwB,GACjC,OAAO,CAAC,OAAO,CAAC,CAGlB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,MAAwB,GACjC,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,aAAa,EAAE,MAAM,EACrB,QAAQ,GAAE,MAAwB,GACjC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB"}
|