@walkeros/cli 0.6.0 → 0.6.1-next-1766186076625
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 +12 -0
- package/README.md +53 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +364 -194
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.js +3 -2
- package/dist/runtime/main.js.map +1 -1
- package/package.json +2 -2
- 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 -352
- 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 -145
- 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 -179
- 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 -79
- package/dist/__tests__/core/config.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 -569
- package/dist/commands/bundle/bundler.js.map +0 -1
- package/dist/commands/bundle/index.d.ts +0 -59
- package/dist/commands/bundle/index.d.ts.map +0 -1
- package/dist/commands/bundle/index.js +0 -184
- 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 -220
- 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 -7
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/cache.js +0 -68
- 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 -247
- package/dist/commands/push/index.js.map +0 -1
- package/dist/commands/push/types.d.ts +0 -22
- 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 -7
- package/dist/commands/run/__tests__/run.integration.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.js +0 -51
- 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 -38
- package/dist/commands/run/index.d.ts.map +0 -1
- package/dist/commands/run/index.js +0 -154
- package/dist/commands/run/index.js.map +0 -1
- package/dist/commands/run/types.d.ts +0 -65
- 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 -44
- 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 -113
- 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 -163
- 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 -20
- 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 -68
- 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 -153
- package/dist/config/loader.js.map +0 -1
- package/dist/config/utils.d.ts +0 -101
- package/dist/config/utils.d.ts.map +0 -1
- package/dist/config/utils.js +0 -235
- 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 -44
- 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/index.d.ts +0 -8
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -8
- 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 -30
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -85
- 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/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/tmp.d.ts +0 -27
- package/dist/core/tmp.d.ts.map +0 -1
- package/dist/core/tmp.js +0 -36
- package/dist/core/tmp.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/runtime/index.d.ts +0 -10
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -10
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/main.d.ts.map +0 -1
- package/dist/runtime/runner.d.ts +0 -20
- package/dist/runtime/runner.d.ts.map +0 -1
- package/dist/runtime/runner.js +0 -72
- package/dist/runtime/runner.js.map +0 -1
- package/dist/runtime/serve.d.ts +0 -19
- package/dist/runtime/serve.d.ts.map +0 -1
- package/dist/runtime/serve.js +0 -97
- package/dist/runtime/serve.js.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 -38
- package/dist/types/global.d.ts.map +0 -1
- package/dist/types/global.js +0 -24
- 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/runtime/runner.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runtime executor for pre-built walkerOS flows
|
|
3
|
-
*
|
|
4
|
-
* This module runs pre-built .mjs flow bundles without any build-time operations.
|
|
5
|
-
* All bundling, package downloading, and code generation happens BEFORE this runs.
|
|
6
|
-
*/
|
|
7
|
-
import { pathToFileURL } from 'url';
|
|
8
|
-
import { resolve, dirname } from 'path';
|
|
9
|
-
/**
|
|
10
|
-
* Run a pre-built flow bundle
|
|
11
|
-
*
|
|
12
|
-
* @param file - Absolute path to pre-built .mjs flow file
|
|
13
|
-
* @param config - Optional runtime configuration
|
|
14
|
-
* @param logger - Logger instance for output
|
|
15
|
-
*/
|
|
16
|
-
export async function runFlow(file, config, logger) {
|
|
17
|
-
logger.info(`Loading flow from ${file}`);
|
|
18
|
-
try {
|
|
19
|
-
const absolutePath = resolve(file);
|
|
20
|
-
const flowDir = dirname(absolutePath);
|
|
21
|
-
// Change working directory to flow's directory
|
|
22
|
-
// This ensures relative paths (e.g., ./shared/credentials.json) work
|
|
23
|
-
// consistently in both local and Docker execution modes
|
|
24
|
-
process.chdir(flowDir);
|
|
25
|
-
const fileUrl = pathToFileURL(absolutePath).href;
|
|
26
|
-
const module = await import(fileUrl);
|
|
27
|
-
if (!module.default || typeof module.default !== 'function') {
|
|
28
|
-
logger.throw(`Invalid flow bundle: ${file} must export a default function`);
|
|
29
|
-
}
|
|
30
|
-
// Execute the flow's factory function
|
|
31
|
-
const result = await module.default(config);
|
|
32
|
-
if (!result || !result.collector) {
|
|
33
|
-
logger.throw(`Invalid flow bundle: ${file} must return { collector }`);
|
|
34
|
-
}
|
|
35
|
-
const { collector } = result;
|
|
36
|
-
logger.info('Flow running');
|
|
37
|
-
if (config?.port) {
|
|
38
|
-
logger.info(`Port: ${config.port}`);
|
|
39
|
-
}
|
|
40
|
-
// Graceful shutdown handler
|
|
41
|
-
const shutdown = async (signal) => {
|
|
42
|
-
logger.info(`Received ${signal}, shutting down gracefully...`);
|
|
43
|
-
try {
|
|
44
|
-
// Use collector's shutdown command if available
|
|
45
|
-
if (collector.command) {
|
|
46
|
-
await collector.command('shutdown');
|
|
47
|
-
}
|
|
48
|
-
logger.info('Shutdown complete');
|
|
49
|
-
process.exit(0);
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
53
|
-
logger.error(`Error during shutdown: ${message}`);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
// Register shutdown handlers
|
|
58
|
-
process.on('SIGTERM', () => shutdown('SIGTERM'));
|
|
59
|
-
process.on('SIGINT', () => shutdown('SIGINT'));
|
|
60
|
-
// Keep process alive
|
|
61
|
-
await new Promise(() => { });
|
|
62
|
-
}
|
|
63
|
-
catch (error) {
|
|
64
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
65
|
-
logger.error(`Failed to run flow: ${message}`);
|
|
66
|
-
if (error instanceof Error && error.stack) {
|
|
67
|
-
logger.debug('Stack trace:', { stack: error.stack });
|
|
68
|
-
}
|
|
69
|
-
throw error;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/runtime/runner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAQxC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAY,EACZ,MAAiC,EACjC,MAAuB;IAEvB,MAAM,CAAC,IAAI,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;IAEzC,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;QAEtC,+CAA+C;QAC/C,qEAAqE;QACrE,wDAAwD;QACxD,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEvB,MAAM,OAAO,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC;QACjD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;YAC5D,MAAM,CAAC,KAAK,CACV,wBAAwB,IAAI,iCAAiC,CAC9D,CAAC;QACJ,CAAC;QAED,sCAAsC;QACtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE5C,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACjC,MAAM,CAAC,KAAK,CAAC,wBAAwB,IAAI,4BAA4B,C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C9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,CAAC,KAAK,CAAC,uBAAuB,OAAO,EAAE,CAAC,CAAC;QAC/C,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC1C,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QACvD,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/runtime/serve.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Serve mode - serve single file (typically generated bundle)
|
|
3
|
-
*/
|
|
4
|
-
import type { Logger } from '@walkeros/core';
|
|
5
|
-
export interface ServeConfig {
|
|
6
|
-
port?: number;
|
|
7
|
-
host?: string;
|
|
8
|
-
servePath?: string;
|
|
9
|
-
serveName?: string;
|
|
10
|
-
file?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Run serve mode - serve single file (typically generated bundle)
|
|
14
|
-
*
|
|
15
|
-
* @param config - Server configuration
|
|
16
|
-
* @param logger - Logger instance for output
|
|
17
|
-
*/
|
|
18
|
-
export declare function runServeMode(config: ServeConfig | undefined, logger: Logger.Instance): Promise<void>;
|
|
19
|
-
//# sourceMappingURL=serve.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/runtime/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,CAAC,QAAQ,GACtB,OAAO,CAAC,IAAI,CAAC,CAsGf"}
|
package/dist/runtime/serve.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Serve mode - serve single file (typically generated bundle)
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express';
|
|
5
|
-
import { resolve } from 'path';
|
|
6
|
-
import { VERSION } from '../version';
|
|
7
|
-
/**
|
|
8
|
-
* Run serve mode - serve single file (typically generated bundle)
|
|
9
|
-
*
|
|
10
|
-
* @param config - Server configuration
|
|
11
|
-
* @param logger - Logger instance for output
|
|
12
|
-
*/
|
|
13
|
-
export async function runServeMode(config, logger) {
|
|
14
|
-
// Port priority: ENV variable > config > default
|
|
15
|
-
const port = process.env.PORT
|
|
16
|
-
? parseInt(process.env.PORT, 10)
|
|
17
|
-
: config?.port || 8080;
|
|
18
|
-
// Host priority: ENV variable > config > default
|
|
19
|
-
const host = process.env.HOST || config?.host || '0.0.0.0';
|
|
20
|
-
// File path: ENV variable > config > default (resolve to absolute)
|
|
21
|
-
const file = resolve(process.env.FILE || config?.file || './dist/walker.js');
|
|
22
|
-
// Serve name (filename in URL): ENV variable > config > default
|
|
23
|
-
const serveName = process.env.SERVE_NAME || config?.serveName || 'walker.js';
|
|
24
|
-
// Serve path (URL directory): ENV variable > config > default (empty = root)
|
|
25
|
-
const servePath = process.env.SERVE_PATH || config?.servePath || '';
|
|
26
|
-
// Build full URL path
|
|
27
|
-
const urlPath = servePath ? `/${servePath}/${serveName}` : `/${serveName}`;
|
|
28
|
-
logger.info('Starting single-file server...');
|
|
29
|
-
logger.info(`File: ${file}`);
|
|
30
|
-
logger.info(`URL: http://${host}:${port}${urlPath}`);
|
|
31
|
-
try {
|
|
32
|
-
const app = express();
|
|
33
|
-
// Health check
|
|
34
|
-
app.get('/health', (req, res) => {
|
|
35
|
-
res.json({
|
|
36
|
-
status: 'ok',
|
|
37
|
-
version: VERSION,
|
|
38
|
-
timestamp: Date.now(),
|
|
39
|
-
mode: 'serve',
|
|
40
|
-
file: file,
|
|
41
|
-
url: urlPath,
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
// Serve single file at custom URL path
|
|
45
|
-
app.get(urlPath, (req, res) => {
|
|
46
|
-
// Set content type before streaming
|
|
47
|
-
res.type('application/javascript');
|
|
48
|
-
// Allow dotfiles since file paths may include dotfile directories
|
|
49
|
-
res.sendFile(file, { dotfiles: 'allow' }, (err) => {
|
|
50
|
-
if (err && !res.headersSent) {
|
|
51
|
-
const errCode = err.code;
|
|
52
|
-
// Express 5 uses HTTP-style errors with status/statusCode
|
|
53
|
-
const errStatus = err.status ||
|
|
54
|
-
err.statusCode;
|
|
55
|
-
// Log errors (except client disconnections)
|
|
56
|
-
if (errCode !== 'ECONNABORTED') {
|
|
57
|
-
logger.error(`sendFile error for ${file}: ${err.message} (code: ${errCode}, status: ${errStatus})`);
|
|
58
|
-
}
|
|
59
|
-
// Send appropriate error response (check both Node.js codes and HTTP status)
|
|
60
|
-
if (errStatus === 404 ||
|
|
61
|
-
errCode === 'ENOENT' ||
|
|
62
|
-
errCode === 'EISDIR' ||
|
|
63
|
-
errCode === 'ENOTDIR') {
|
|
64
|
-
res.status(404).send('File not found');
|
|
65
|
-
}
|
|
66
|
-
else if (errCode !== 'ECONNABORTED') {
|
|
67
|
-
res.status(500).send('Internal server error');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
// Start server
|
|
73
|
-
const server = app.listen(port, host, () => {
|
|
74
|
-
logger.info(`Server listening on http://${host}:${port}`);
|
|
75
|
-
logger.info(`GET ${urlPath} - Bundle file`);
|
|
76
|
-
logger.info(`GET /health - Health check`);
|
|
77
|
-
});
|
|
78
|
-
// Graceful shutdown
|
|
79
|
-
const shutdownHandler = (signal) => {
|
|
80
|
-
logger.info(`Received ${signal}, shutting down...`);
|
|
81
|
-
server.close(() => {
|
|
82
|
-
logger.info('Server closed');
|
|
83
|
-
process.exit(0);
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
process.on('SIGTERM', () => shutdownHandler('SIGTERM'));
|
|
87
|
-
process.on('SIGINT', () => shutdownHandler('SIGINT'));
|
|
88
|
-
// Keep process alive
|
|
89
|
-
await new Promise(() => { });
|
|
90
|
-
}
|
|
91
|
-
catch (error) {
|
|
92
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
93
|
-
logger.error(`Server failed: ${message}`);
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=serve.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/runtime/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAUrC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAA+B,EAC/B,MAAuB;IAEvB,iDAAiD;IACjD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI;QAC3B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,CAAC,CAAC,MAAM,EAAE,IAAI,IAAI,IAAI,CAAC;IAEzB,iDAAiD;IACjD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAAE,IAAI,IAA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CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,oBAAoB;QACpB,MAAM,eAAe,GAAG,CAAC,MAAc,EAAE,EAAE;YACzC,MAAM,CAAC,IAAI,CAAC,YAAY,MAAM,oBAAoB,CAAC,CAAC;YACpD,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;gBAChB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;gBAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEtD,qBAAqB;QACrB,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,CAAC,KAAK,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/schemas/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI Schemas
|
|
3
|
-
*
|
|
4
|
-
* Zod schemas for CLI parameter validation.
|
|
5
|
-
* Follows walkerOS patterns from @walkeros/core.
|
|
6
|
-
*/
|
|
7
|
-
export { RunModeSchema, PortSchema, FilePathSchema, type RunMode, } from './primitives';
|
|
8
|
-
export { RunOptionsSchema, type RunOptions } from './run';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,aAAa,EACb,UAAU,EACV,cAAc,EACd,KAAK,OAAO,GACb,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/schemas/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI Schemas
|
|
3
|
-
*
|
|
4
|
-
* Zod schemas for CLI parameter validation.
|
|
5
|
-
* Follows walkerOS patterns from @walkeros/core.
|
|
6
|
-
*/
|
|
7
|
-
export { RunModeSchema, PortSchema, FilePathSchema, } from './primitives';
|
|
8
|
-
export { RunOptionsSchema } from './run';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,aAAa,EACb,UAAU,EACV,cAAc,GAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAmB,MAAM,OAAO,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/schemas/run.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/schemas/run.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
package/dist/schemas/run.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/types/bundle.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI Build Configuration
|
|
3
|
-
*
|
|
4
|
-
* CLI-specific build options for walkerOS bundle generation.
|
|
5
|
-
* Uses Flow.Setup and Flow.Config from @walkeros/core for config structure.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
import type { Flow } from '@walkeros/core';
|
|
10
|
-
import type { BuildOptions as ESBuildOptions } from 'esbuild';
|
|
11
|
-
export type { Flow };
|
|
12
|
-
/**
|
|
13
|
-
* CLI-specific build options (public API).
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* These are CLI-only options not part of the config file.
|
|
17
|
-
* The config file uses Flow.Setup from @walkeros/core.
|
|
18
|
-
*
|
|
19
|
-
* Platform-derived defaults:
|
|
20
|
-
* - web: format=iife, target=es2020, platform=browser
|
|
21
|
-
* - server: format=esm, target=node18, platform=node
|
|
22
|
-
*/
|
|
23
|
-
export interface CLIBuildOptions extends Pick<ESBuildOptions, 'external'> {
|
|
24
|
-
/**
|
|
25
|
-
* Output file path (CLI argument, not in config).
|
|
26
|
-
* @default "./dist/walker.js" (web) or "./dist/bundle.mjs" (server)
|
|
27
|
-
*/
|
|
28
|
-
output?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Temporary directory for build artifacts.
|
|
31
|
-
* @default ".tmp"
|
|
32
|
-
*/
|
|
33
|
-
tempDir?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Enable package caching.
|
|
36
|
-
* @default true
|
|
37
|
-
*/
|
|
38
|
-
cache?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* User code to include in bundle.
|
|
41
|
-
*/
|
|
42
|
-
code?: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Internal build options used by the bundler.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* Combines CLI options with resolved esbuild settings.
|
|
49
|
-
* This is populated after processing config and CLI arguments.
|
|
50
|
-
*/
|
|
51
|
-
export interface BuildOptions extends CLIBuildOptions {
|
|
52
|
-
/**
|
|
53
|
-
* Output file path (required for bundler).
|
|
54
|
-
*/
|
|
55
|
-
output: string;
|
|
56
|
-
/**
|
|
57
|
-
* Packages to include in the bundle.
|
|
58
|
-
*/
|
|
59
|
-
packages: Flow.Packages;
|
|
60
|
-
/**
|
|
61
|
-
* Output format.
|
|
62
|
-
*/
|
|
63
|
-
format: 'esm' | 'iife' | 'cjs';
|
|
64
|
-
/**
|
|
65
|
-
* Target platform.
|
|
66
|
-
*/
|
|
67
|
-
platform: 'browser' | 'node';
|
|
68
|
-
/**
|
|
69
|
-
* Enable minification.
|
|
70
|
-
* @default true
|
|
71
|
-
*/
|
|
72
|
-
minify?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Enable source maps.
|
|
75
|
-
* @default false
|
|
76
|
-
*/
|
|
77
|
-
sourcemap?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* ECMAScript target version.
|
|
80
|
-
*/
|
|
81
|
-
target?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Minification options.
|
|
84
|
-
*/
|
|
85
|
-
minifyOptions?: MinifyOptions;
|
|
86
|
-
/**
|
|
87
|
-
* Window property name for collector (web platform only).
|
|
88
|
-
* @default "collector"
|
|
89
|
-
*/
|
|
90
|
-
windowCollector?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Window property name for elb function (web platform only).
|
|
93
|
-
* @default "elb"
|
|
94
|
-
*/
|
|
95
|
-
windowElb?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Folders to include in the output directory.
|
|
98
|
-
* These folders are copied alongside the bundle for runtime access.
|
|
99
|
-
* @default ["./shared"] if folder exists
|
|
100
|
-
*/
|
|
101
|
-
include?: string[];
|
|
102
|
-
/**
|
|
103
|
-
* Base directory for resolving include paths.
|
|
104
|
-
* Typically the directory containing the config file.
|
|
105
|
-
*/
|
|
106
|
-
configDir?: string;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Minification options.
|
|
110
|
-
*
|
|
111
|
-
* @remarks
|
|
112
|
-
* Controls esbuild's minification behavior.
|
|
113
|
-
*/
|
|
114
|
-
export interface MinifyOptions {
|
|
115
|
-
/**
|
|
116
|
-
* Minify identifiers (variable names).
|
|
117
|
-
* @default true
|
|
118
|
-
*/
|
|
119
|
-
identifiers?: boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Minify syntax (shorten code).
|
|
122
|
-
* @default true
|
|
123
|
-
*/
|
|
124
|
-
syntax?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Minify whitespace.
|
|
127
|
-
* @default true
|
|
128
|
-
*/
|
|
129
|
-
whitespace?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Keep original function/class names.
|
|
132
|
-
* @default false
|
|
133
|
-
*/
|
|
134
|
-
keepNames?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* How to handle legal comments.
|
|
137
|
-
* @default "none"
|
|
138
|
-
*/
|
|
139
|
-
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,I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flow.Setup and Flow.Config from @walkeros/core for config structure.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=bundle.js.map
|
package/dist/types/bundle.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/types/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/dist/types/global.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Global CLI Options
|
|
3
|
-
*
|
|
4
|
-
* Options that apply to all commands.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Global options available across all CLI commands
|
|
8
|
-
*/
|
|
9
|
-
export interface GlobalOptions {
|
|
10
|
-
/**
|
|
11
|
-
* Show detailed execution logs
|
|
12
|
-
* @default false
|
|
13
|
-
*/
|
|
14
|
-
verbose?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Suppress all output except errors
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
silent?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Preview command without executing
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
dryRun?: boolean;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Check if output should be shown based on global options
|
|
28
|
-
*/
|
|
29
|
-
export declare function shouldShowOutput(options: GlobalOptions): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Check if verbose output should be shown
|
|
32
|
-
*/
|
|
33
|
-
export declare function isVerbose(options: GlobalOptions): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Check if this is a dry run
|
|
36
|
-
*/
|
|
37
|
-
export declare function isDryRun(options: GlobalOptions): boolean;
|
|
38
|
-
//# sourceMappingURL=global.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/types/global.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAEhE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAExD"}
|
package/dist/types/global.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Global CLI Options
|
|
3
|
-
*
|
|
4
|
-
* Options that apply to all commands.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Check if output should be shown based on global options
|
|
8
|
-
*/
|
|
9
|
-
export function shouldShowOutput(options) {
|
|
10
|
-
return !options.silent;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Check if verbose output should be shown
|
|
14
|
-
*/
|
|
15
|
-
export function isVerbose(options) {
|
|
16
|
-
return options.verbose === true;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Check if this is a dry run
|
|
20
|
-
*/
|
|
21
|
-
export function isDryRun(options) {
|
|
22
|
-
return options.dryRun === true;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=global.js.map
|
package/dist/types/global.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/types/global.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAsB;IACrD,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAsB;IAC9C,OAAO,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAsB;IAC7C,OAAO,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC;AACjC,CAAC"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/version.d.ts
DELETED
package/dist/version.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AA0BA,0BAA0B;AAC1B,eAAO,MAAM,OAAO,EAAE,MAA8C,CAAC"}
|