@walkeros/cli 0.7.0-next.0 → 0.8.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/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/dist/walker.js +1 -1
- 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/CHANGELOG.md +0 -159
- 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
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { bundle } from '../../commands/bundle/index.js';
|
|
4
|
-
import { getId } from '@walkeros/core';
|
|
5
|
-
import { getBuildDefaults, getDefaultOutput, } from '../../config/index.js';
|
|
6
|
-
describe('Programmatic Bundle API', () => {
|
|
7
|
-
const testOutputDir = path.join('.tmp', `programmatic-${Date.now()}-${getId()}`);
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await fs.ensureDir(testOutputDir);
|
|
10
|
-
// Mock console.log to suppress output during tests
|
|
11
|
-
jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
12
|
-
// Mock fs.stat for bundle stats
|
|
13
|
-
const mockStat = {
|
|
14
|
-
size: 2048,
|
|
15
|
-
isFile: () => true,
|
|
16
|
-
isDirectory: () => false,
|
|
17
|
-
};
|
|
18
|
-
jest
|
|
19
|
-
.spyOn(fs, 'stat')
|
|
20
|
-
.mockImplementation(() => Promise.resolve(mockStat));
|
|
21
|
-
});
|
|
22
|
-
afterEach(async () => {
|
|
23
|
-
await fs.remove(testOutputDir);
|
|
24
|
-
jest.restoreAllMocks();
|
|
25
|
-
});
|
|
26
|
-
it('should bundle with Flow.Setup config object', async () => {
|
|
27
|
-
const config = {
|
|
28
|
-
version: 1,
|
|
29
|
-
flows: {
|
|
30
|
-
default: {
|
|
31
|
-
web: {},
|
|
32
|
-
packages: {
|
|
33
|
-
'@walkeros/core': {
|
|
34
|
-
imports: ['getId', 'trim'],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
// Bundle will use convention-based output path
|
|
41
|
-
await expect(bundle(config, { silent: true })).resolves.not.toThrow();
|
|
42
|
-
});
|
|
43
|
-
it('should bundle with config file path', async () => {
|
|
44
|
-
const configPath = path.resolve(__dirname, '../../../examples/web-serve.json');
|
|
45
|
-
await expect(bundle(configPath, { silent: true })).resolves.not.toThrow();
|
|
46
|
-
});
|
|
47
|
-
it('should return stats when requested', async () => {
|
|
48
|
-
const config = {
|
|
49
|
-
version: 1,
|
|
50
|
-
flows: {
|
|
51
|
-
default: {
|
|
52
|
-
web: {},
|
|
53
|
-
packages: {
|
|
54
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
const stats = await bundle(config, { silent: true, stats: true });
|
|
60
|
-
expect(stats).toBeDefined();
|
|
61
|
-
expect(stats.totalSize).toBe(2048); // From mocked fs.stat
|
|
62
|
-
expect(stats.buildTime).toBeGreaterThanOrEqual(0);
|
|
63
|
-
expect(stats.packages).toHaveLength(1);
|
|
64
|
-
});
|
|
65
|
-
it('should return undefined when stats not requested', async () => {
|
|
66
|
-
const config = {
|
|
67
|
-
version: 1,
|
|
68
|
-
flows: {
|
|
69
|
-
default: {
|
|
70
|
-
web: {},
|
|
71
|
-
packages: {
|
|
72
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
const result = await bundle(config, { silent: true, stats: false });
|
|
78
|
-
expect(result).toBeUndefined();
|
|
79
|
-
});
|
|
80
|
-
it('should handle cache option', async () => {
|
|
81
|
-
const config = {
|
|
82
|
-
version: 1,
|
|
83
|
-
flows: {
|
|
84
|
-
default: {
|
|
85
|
-
web: {},
|
|
86
|
-
packages: {
|
|
87
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
await expect(bundle(config, { silent: true, cache: false })).resolves.not.toThrow();
|
|
93
|
-
});
|
|
94
|
-
it('should handle verbose option', async () => {
|
|
95
|
-
const config = {
|
|
96
|
-
version: 1,
|
|
97
|
-
flows: {
|
|
98
|
-
default: {
|
|
99
|
-
web: {},
|
|
100
|
-
packages: {
|
|
101
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
await expect(bundle(config, { silent: false, verbose: true })).resolves.not.toThrow();
|
|
107
|
-
});
|
|
108
|
-
it('should handle errors gracefully', async () => {
|
|
109
|
-
const invalidConfigPath = path.join(testOutputDir, 'nonexistent.json');
|
|
110
|
-
await expect(bundle(invalidConfigPath, { silent: true })).rejects.toThrow('Configuration file not found');
|
|
111
|
-
});
|
|
112
|
-
it('should select flow from multi-flow config', async () => {
|
|
113
|
-
const config = {
|
|
114
|
-
version: 1,
|
|
115
|
-
flows: {
|
|
116
|
-
production: {
|
|
117
|
-
web: {},
|
|
118
|
-
packages: {
|
|
119
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
staging: {
|
|
123
|
-
web: {},
|
|
124
|
-
packages: {
|
|
125
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
await expect(bundle(config, { silent: true, flowName: 'production' })).resolves.not.toThrow();
|
|
131
|
-
});
|
|
132
|
-
it('should apply platform-specific build defaults', () => {
|
|
133
|
-
// Verify build defaults are correctly applied
|
|
134
|
-
const webDefaults = getBuildDefaults('web');
|
|
135
|
-
expect(webDefaults.format).toBe('iife');
|
|
136
|
-
expect(webDefaults.platform).toBe('browser');
|
|
137
|
-
expect(webDefaults.target).toBe('es2020');
|
|
138
|
-
const serverDefaults = getBuildDefaults('server');
|
|
139
|
-
expect(serverDefaults.format).toBe('esm');
|
|
140
|
-
expect(serverDefaults.platform).toBe('node');
|
|
141
|
-
expect(serverDefaults.target).toBe('node20');
|
|
142
|
-
});
|
|
143
|
-
it('should use convention-based output paths', () => {
|
|
144
|
-
expect(getDefaultOutput('web')).toBe('./dist/walker.js');
|
|
145
|
-
expect(getDefaultOutput('server')).toBe('./dist/bundle.mjs');
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
//# sourceMappingURL=programmatic.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"programmatic.test.js","sourceRoot":"","sources":["../../../src/__tests__/bundle/programmatic.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,KAAK,EAAa,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAEL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,QAAQ,CAAC,yBAAyB,EAAE,GAAG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AAQ,CAAC,CAAC;QAE1C,MAAM,cAAc,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACzD,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-e2e.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/cli-e2e.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI End-to-End Tests
|
|
3
|
-
*
|
|
4
|
-
* Tests the actual CLI commands as users would invoke them
|
|
5
|
-
* Spawns real processes to test complete workflows
|
|
6
|
-
*/
|
|
7
|
-
import { spawn } from 'child_process';
|
|
8
|
-
import { join } from 'path';
|
|
9
|
-
import { existsSync } from 'fs';
|
|
10
|
-
import fs from 'fs-extra';
|
|
11
|
-
const projectRoot = process.cwd();
|
|
12
|
-
describe('CLI E2E Tests', () => {
|
|
13
|
-
const cliPath = join(projectRoot, 'dist/index.js');
|
|
14
|
-
const tmpDir = join(projectRoot, '.tmp/e2e-tests');
|
|
15
|
-
beforeAll(async () => {
|
|
16
|
-
// Ensure CLI is built
|
|
17
|
-
if (!existsSync(cliPath)) {
|
|
18
|
-
throw new Error('CLI not built. Run `npm run build` first');
|
|
19
|
-
}
|
|
20
|
-
// Create temp directory for test outputs
|
|
21
|
-
await fs.ensureDir(tmpDir);
|
|
22
|
-
});
|
|
23
|
-
afterAll(async () => {
|
|
24
|
-
// Cleanup temp directory
|
|
25
|
-
await fs.remove(tmpDir).catch(() => { });
|
|
26
|
-
});
|
|
27
|
-
describe('bundle command', () => {
|
|
28
|
-
it('should bundle a simple server config', async () => {
|
|
29
|
-
const configPath = join(projectRoot, 'examples/server-collect.json');
|
|
30
|
-
const result = await runCLI(['bundle', configPath]);
|
|
31
|
-
expect(result.code).toBe(0);
|
|
32
|
-
// Verify the output file was created (as specified in the config)
|
|
33
|
-
const outputPath = join(projectRoot, 'examples/server-collect.mjs');
|
|
34
|
-
expect(existsSync(outputPath)).toBe(true);
|
|
35
|
-
}, 30000);
|
|
36
|
-
it('should show error for invalid config', async () => {
|
|
37
|
-
const result = await runCLI(['bundle', '/nonexistent/config.json']);
|
|
38
|
-
expect(result.code).not.toBe(0);
|
|
39
|
-
expect(result.stderr || result.stdout).toContain('not found');
|
|
40
|
-
}, 10000);
|
|
41
|
-
it('should handle --stats flag', async () => {
|
|
42
|
-
const configPath = join(projectRoot, 'examples/server-collect.json');
|
|
43
|
-
const result = await runCLI(['bundle', configPath, '--stats']);
|
|
44
|
-
expect(result.code).toBe(0);
|
|
45
|
-
expect(result.stdout).toContain('Bundle Statistics');
|
|
46
|
-
}, 30000);
|
|
47
|
-
});
|
|
48
|
-
describe('simulate command', () => {
|
|
49
|
-
it('should simulate with --json output', async () => {
|
|
50
|
-
const configPath = join(projectRoot, 'examples/web-serve.json');
|
|
51
|
-
const result = await runCLI([
|
|
52
|
-
'simulate',
|
|
53
|
-
configPath,
|
|
54
|
-
'--event',
|
|
55
|
-
'{"name":"page view","data":{"title":"Test"}}',
|
|
56
|
-
'--json',
|
|
57
|
-
]);
|
|
58
|
-
// Simulation may fail due to missing packages (mocked in unit tests)
|
|
59
|
-
// but should produce valid JSON output
|
|
60
|
-
if (result.code === 0) {
|
|
61
|
-
const output = JSON.parse(result.stdout);
|
|
62
|
-
expect(output).toHaveProperty('result');
|
|
63
|
-
expect(output).toHaveProperty('usage');
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
// Acceptable failure - simulation requires real packages
|
|
67
|
-
expect(result.stderr || result.stdout).toBeTruthy();
|
|
68
|
-
}
|
|
69
|
-
}, 30000);
|
|
70
|
-
it('should handle invalid config gracefully', async () => {
|
|
71
|
-
const result = await runCLI(['simulate', '/invalid/path.json']);
|
|
72
|
-
expect(result.code).not.toBe(0);
|
|
73
|
-
expect(result.stderr || result.stdout).toContain('not found');
|
|
74
|
-
}, 10000);
|
|
75
|
-
});
|
|
76
|
-
describe('help and version', () => {
|
|
77
|
-
it('should show help with --help', async () => {
|
|
78
|
-
const result = await runCLI(['--help']);
|
|
79
|
-
expect(result.code).toBe(0);
|
|
80
|
-
expect(result.stdout).toContain('Usage');
|
|
81
|
-
expect(result.stdout).toContain('bundle');
|
|
82
|
-
expect(result.stdout).toContain('simulate');
|
|
83
|
-
expect(result.stdout).toContain('run');
|
|
84
|
-
}, 5000);
|
|
85
|
-
it('should show version with --version', async () => {
|
|
86
|
-
const result = await runCLI(['--version']);
|
|
87
|
-
expect(result.code).toBe(0);
|
|
88
|
-
expect(result.stdout).toMatch(/\d+\.\d+\.\d+/);
|
|
89
|
-
}, 5000);
|
|
90
|
-
});
|
|
91
|
-
describe('error handling', () => {
|
|
92
|
-
it('should show error for unknown command', async () => {
|
|
93
|
-
const result = await runCLI(['unknown-command']);
|
|
94
|
-
expect(result.code).not.toBe(0);
|
|
95
|
-
expect(result.stderr || result.stdout).toContain('unknown');
|
|
96
|
-
}, 5000);
|
|
97
|
-
it('should show error for missing arguments', async () => {
|
|
98
|
-
const result = await runCLI(['bundle']);
|
|
99
|
-
expect(result.code).not.toBe(0);
|
|
100
|
-
}, 5000);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
/**
|
|
104
|
-
* Helper to run CLI commands
|
|
105
|
-
*/
|
|
106
|
-
function runCLI(args) {
|
|
107
|
-
return new Promise((resolve) => {
|
|
108
|
-
// Add --local flag to run tests without Docker
|
|
109
|
-
const child = spawn('node', [join(projectRoot, 'dist/index.js'), ...args, '--local'], {
|
|
110
|
-
cwd: projectRoot,
|
|
111
|
-
env: { ...process.env, FORCE_COLOR: '0' },
|
|
112
|
-
});
|
|
113
|
-
let stdout = '';
|
|
114
|
-
let stderr = '';
|
|
115
|
-
child.stdout?.on('data', (data) => {
|
|
116
|
-
stdout += data.toString();
|
|
117
|
-
});
|
|
118
|
-
child.stderr?.on('data', (data) => {
|
|
119
|
-
stderr += data.toString();
|
|
120
|
-
});
|
|
121
|
-
child.on('close', (code) => {
|
|
122
|
-
resolve({
|
|
123
|
-
code: code || 0,
|
|
124
|
-
stdout: stdout.trim(),
|
|
125
|
-
stderr: stderr.trim(),
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=cli-e2e.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-e2e.test.js","sourceRoot":"","sources":["../../src/__tests__/cli-e2e.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1B,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAElC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW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EAAE,WAAW,EAAE,GAAG,EAAE;SAC1C,CACF,CAAC;QAEF,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAChC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAChC,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,OAAO,CAAC;gBACN,IAAI,EAAE,IAAI,IAAI,CAAC;gBACf,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE;gBACrB,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE;aACtB,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { spawn } from 'child_process';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { getId } from '@walkeros/core';
|
|
5
|
-
describe('CLI Bundle Command', () => {
|
|
6
|
-
const testOutputDir = path.join('.tmp', `cli-${Date.now()}-${getId()}`);
|
|
7
|
-
const testConfigPath = path.join(testOutputDir, 'test.config.json');
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await fs.ensureDir(testOutputDir);
|
|
10
|
-
// Mock console.log and console.error to suppress output during tests
|
|
11
|
-
jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
12
|
-
jest.spyOn(console, 'error').mockImplementation(() => { });
|
|
13
|
-
});
|
|
14
|
-
afterEach(async () => {
|
|
15
|
-
await fs.remove(testOutputDir);
|
|
16
|
-
// Restore console methods
|
|
17
|
-
jest.restoreAllMocks();
|
|
18
|
-
});
|
|
19
|
-
const runCLI = (args) => {
|
|
20
|
-
return new Promise((resolve) => {
|
|
21
|
-
// Add --local flag to run tests without Docker
|
|
22
|
-
const child = spawn('node', ['dist/index.js', ...args, '--local'], {
|
|
23
|
-
stdio: 'pipe',
|
|
24
|
-
shell: false,
|
|
25
|
-
});
|
|
26
|
-
let stdout = '';
|
|
27
|
-
let stderr = '';
|
|
28
|
-
child.stdout.on('data', (data) => {
|
|
29
|
-
stdout += data.toString();
|
|
30
|
-
});
|
|
31
|
-
child.stderr.on('data', (data) => {
|
|
32
|
-
stderr += data.toString();
|
|
33
|
-
});
|
|
34
|
-
child.on('close', (exitCode) => {
|
|
35
|
-
resolve({ stdout, stderr, exitCode: exitCode || 0 });
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
it('should output JSON format for successful bundle', async () => {
|
|
40
|
-
// Flow.Setup format
|
|
41
|
-
const testConfig = {
|
|
42
|
-
version: 1,
|
|
43
|
-
flows: {
|
|
44
|
-
default: {
|
|
45
|
-
web: {},
|
|
46
|
-
packages: {
|
|
47
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
await fs.writeJson(testConfigPath, testConfig);
|
|
53
|
-
const result = await runCLI(['bundle', testConfigPath, '--json']);
|
|
54
|
-
expect(result.exitCode).toBe(0);
|
|
55
|
-
const output = JSON.parse(result.stdout);
|
|
56
|
-
expect(output).toMatchObject({
|
|
57
|
-
success: true,
|
|
58
|
-
data: {
|
|
59
|
-
flows: expect.arrayContaining([
|
|
60
|
-
{
|
|
61
|
-
flowName: 'default',
|
|
62
|
-
success: true,
|
|
63
|
-
stats: {
|
|
64
|
-
totalSize: expect.any(Number),
|
|
65
|
-
packages: expect.any(Array),
|
|
66
|
-
buildTime: expect.any(Number),
|
|
67
|
-
treeshakingEffective: expect.any(Boolean),
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
]),
|
|
71
|
-
summary: {
|
|
72
|
-
total: 1,
|
|
73
|
-
success: 1,
|
|
74
|
-
failed: 0,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
duration: expect.any(Number),
|
|
78
|
-
});
|
|
79
|
-
expect(output.data.flows[0].stats.packages).toHaveLength(1);
|
|
80
|
-
expect(output.data.flows[0].stats.packages[0].name).toBe('@walkeros/core@latest');
|
|
81
|
-
});
|
|
82
|
-
it('should output JSON format for failed bundle (invalid syntax)', async () => {
|
|
83
|
-
// Flow.Setup format - but bundler will fail on invalid destination code
|
|
84
|
-
const testConfig = {
|
|
85
|
-
version: 1,
|
|
86
|
-
flows: {
|
|
87
|
-
default: {
|
|
88
|
-
web: {},
|
|
89
|
-
packages: {
|
|
90
|
-
'@walkeros/nonexistent-package-xyz': { imports: ['nonexistent'] },
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
await fs.writeJson(testConfigPath, testConfig);
|
|
96
|
-
const result = await runCLI(['bundle', testConfigPath, '--json']);
|
|
97
|
-
expect(result.exitCode).toBe(1);
|
|
98
|
-
const output = JSON.parse(result.stdout);
|
|
99
|
-
expect(output).toMatchObject({
|
|
100
|
-
success: false,
|
|
101
|
-
error: expect.any(String),
|
|
102
|
-
duration: expect.any(Number),
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
it('should output JSON format when config file not found', async () => {
|
|
106
|
-
const result = await runCLI(['bundle', 'nonexistent.json', '--json']);
|
|
107
|
-
expect(result.exitCode).toBe(1);
|
|
108
|
-
const output = JSON.parse(result.stdout);
|
|
109
|
-
expect(output).toMatchObject({
|
|
110
|
-
success: false,
|
|
111
|
-
error: expect.stringContaining('Configuration file not found'),
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
it('should collect stats when --json flag is used (implies --stats)', async () => {
|
|
115
|
-
// Flow.Setup format
|
|
116
|
-
const testConfig = {
|
|
117
|
-
version: 1,
|
|
118
|
-
flows: {
|
|
119
|
-
default: {
|
|
120
|
-
web: {},
|
|
121
|
-
packages: {
|
|
122
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
};
|
|
127
|
-
await fs.writeJson(testConfigPath, testConfig);
|
|
128
|
-
const result = await runCLI(['bundle', testConfigPath, '--json']);
|
|
129
|
-
expect(result.exitCode).toBe(0);
|
|
130
|
-
const output = JSON.parse(result.stdout);
|
|
131
|
-
expect(output.success).toBe(true);
|
|
132
|
-
expect(output.data.flows[0].stats.treeshakingEffective).toBe(true);
|
|
133
|
-
});
|
|
134
|
-
it('should suppress decorative output in JSON mode', async () => {
|
|
135
|
-
// Flow.Setup format
|
|
136
|
-
const testConfig = {
|
|
137
|
-
version: 1,
|
|
138
|
-
flows: {
|
|
139
|
-
default: {
|
|
140
|
-
web: {},
|
|
141
|
-
packages: {
|
|
142
|
-
'@walkeros/core': { imports: ['getId'] },
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
await fs.writeJson(testConfigPath, testConfig);
|
|
148
|
-
const result = await runCLI(['bundle', testConfigPath, '--json']);
|
|
149
|
-
expect(result.exitCode).toBe(0);
|
|
150
|
-
// Should not contain decorative messages
|
|
151
|
-
expect(result.stdout).not.toContain('📦 Reading configuration');
|
|
152
|
-
expect(result.stdout).not.toContain('🔧 Starting bundle process');
|
|
153
|
-
expect(result.stdout).not.toContain('✅ Bundle created successfully');
|
|
154
|
-
// Should be valid JSON
|
|
155
|
-
const output = JSON.parse(result.stdout);
|
|
156
|
-
expect(output.success).toBe(true);
|
|
157
|
-
});
|
|
158
|
-
it('should reject invalid config format', async () => {
|
|
159
|
-
// Old format - no longer supported
|
|
160
|
-
const testConfig = {
|
|
161
|
-
flow: {
|
|
162
|
-
platform: 'web',
|
|
163
|
-
},
|
|
164
|
-
build: {
|
|
165
|
-
packages: {},
|
|
166
|
-
},
|
|
167
|
-
};
|
|
168
|
-
await fs.writeJson(testConfigPath, testConfig);
|
|
169
|
-
const result = await runCLI(['bundle', testConfigPath, '--json']);
|
|
170
|
-
expect(result.exitCode).toBe(1);
|
|
171
|
-
const output = JSON.parse(result.stdout);
|
|
172
|
-
expect(output.success).toBe(false);
|
|
173
|
-
expect(output.error).toContain('Invalid configuration');
|
|
174
|
-
});
|
|
175
|
-
});
|
|
176
|
-
describe('CLI Simulate Command', () => {
|
|
177
|
-
// Placeholder for future simulate command tests
|
|
178
|
-
// Current simulate functionality is tested in cli-e2e.test.ts
|
|
179
|
-
});
|
|
180
|
-
//# sourceMappingURL=cli.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.test.js","sourceRoot":"","sources":["../../src/__tests__/cli.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,KAAK,EAAE,EAAE,CAAC,CAAC;IACxE,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;IAEpE,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAClC,qEAAqE;QACrE,IAAI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