@walkeros/cli 0.5.1-next.0 → 0.5.1-next.1
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 +7 -0
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts +2 -0
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js +151 -0
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +1 -0
- package/dist/__tests__/bundle/bundler.test.d.ts +2 -0
- package/dist/__tests__/bundle/bundler.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/bundler.test.js +353 -0
- package/dist/__tests__/bundle/bundler.test.js.map +1 -0
- package/dist/__tests__/bundle/programmatic.test.d.ts +2 -0
- package/dist/__tests__/bundle/programmatic.test.d.ts.map +1 -0
- package/dist/__tests__/bundle/programmatic.test.js +148 -0
- package/dist/__tests__/bundle/programmatic.test.js.map +1 -0
- package/dist/__tests__/cli-e2e.test.d.ts +8 -0
- package/dist/__tests__/cli-e2e.test.d.ts.map +1 -0
- package/dist/__tests__/cli-e2e.test.js +130 -0
- package/dist/__tests__/cli-e2e.test.js.map +1 -0
- package/dist/__tests__/cli.test.d.ts +2 -0
- package/dist/__tests__/cli.test.d.ts.map +1 -0
- package/dist/__tests__/cli.test.js +180 -0
- package/dist/__tests__/cli.test.js.map +1 -0
- package/dist/__tests__/config-loader.test.d.ts +7 -0
- package/dist/__tests__/config-loader.test.d.ts.map +1 -0
- package/dist/__tests__/config-loader.test.js +414 -0
- package/dist/__tests__/config-loader.test.js.map +1 -0
- package/dist/__tests__/core/asset-resolver.test.d.ts +2 -0
- package/dist/__tests__/core/asset-resolver.test.d.ts.map +1 -0
- package/dist/__tests__/core/asset-resolver.test.js +14 -0
- package/dist/__tests__/core/asset-resolver.test.js.map +1 -0
- package/dist/__tests__/core/build-cache.test.d.ts +2 -0
- package/dist/__tests__/core/build-cache.test.d.ts.map +1 -0
- package/dist/__tests__/core/build-cache.test.js +55 -0
- package/dist/__tests__/core/build-cache.test.js.map +1 -0
- package/dist/__tests__/core/cache-utils.test.d.ts +2 -0
- package/dist/__tests__/core/cache-utils.test.d.ts.map +1 -0
- package/dist/__tests__/core/cache-utils.test.js +70 -0
- package/dist/__tests__/core/cache-utils.test.js.map +1 -0
- package/dist/__tests__/core/config.test.d.ts +2 -0
- package/dist/__tests__/core/config.test.d.ts.map +1 -0
- package/dist/__tests__/core/config.test.js +72 -0
- package/dist/__tests__/core/config.test.js.map +1 -0
- package/dist/__tests__/core/logger.test.d.ts +2 -0
- package/dist/__tests__/core/logger.test.d.ts.map +1 -0
- package/dist/__tests__/core/logger.test.js +53 -0
- package/dist/__tests__/core/logger.test.js.map +1 -0
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts +8 -0
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/bundle-run.integration.test.js +54 -0
- package/dist/__tests__/integration/bundle-run.integration.test.js.map +1 -0
- package/dist/__tests__/push/push.test.d.ts +7 -0
- package/dist/__tests__/push/push.test.d.ts.map +1 -0
- package/dist/__tests__/push/push.test.js +197 -0
- package/dist/__tests__/push/push.test.js.map +1 -0
- package/dist/__tests__/simulate/env-loader.test.d.ts +2 -0
- package/dist/__tests__/simulate/env-loader.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/env-loader.test.js +47 -0
- package/dist/__tests__/simulate/env-loader.test.js.map +1 -0
- package/dist/__tests__/simulate/node-executor.test.d.ts +5 -0
- package/dist/__tests__/simulate/node-executor.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/node-executor.test.js +25 -0
- package/dist/__tests__/simulate/node-executor.test.js.map +1 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts +5 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts.map +1 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.js +58 -0
- package/dist/__tests__/simulate/server-simulate.integration.test.js.map +1 -0
- package/dist/__tests__/smoke/production.smoke.test.d.ts +8 -0
- package/dist/__tests__/smoke/production.smoke.test.d.ts.map +1 -0
- package/dist/__tests__/smoke/production.smoke.test.js +65 -0
- package/dist/__tests__/smoke/production.smoke.test.js.map +1 -0
- package/dist/commands/bundle/bundler.d.ts +32 -0
- package/dist/commands/bundle/bundler.d.ts.map +1 -0
- package/dist/commands/bundle/bundler.js +583 -0
- package/dist/commands/bundle/bundler.js.map +1 -0
- package/dist/commands/bundle/index.d.ts +57 -0
- package/dist/commands/bundle/index.d.ts.map +1 -0
- package/dist/commands/bundle/index.js +200 -0
- package/dist/commands/bundle/index.js.map +1 -0
- package/dist/commands/bundle/package-manager.d.ts +8 -0
- package/dist/commands/bundle/package-manager.d.ts.map +1 -0
- package/dist/commands/bundle/package-manager.js +197 -0
- package/dist/commands/bundle/package-manager.js.map +1 -0
- package/dist/commands/bundle/stats.d.ts +23 -0
- package/dist/commands/bundle/stats.d.ts.map +1 -0
- package/dist/commands/bundle/stats.js +52 -0
- package/dist/commands/bundle/stats.js.map +1 -0
- package/dist/commands/cache.d.ts +3 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +44 -0
- package/dist/commands/cache.js.map +1 -0
- package/dist/commands/push/index.d.ts +7 -0
- package/dist/commands/push/index.d.ts.map +1 -0
- package/dist/commands/push/index.js +257 -0
- package/dist/commands/push/index.js.map +1 -0
- package/dist/commands/push/types.d.ts +21 -0
- package/dist/commands/push/types.d.ts.map +1 -0
- package/dist/commands/push/types.js +2 -0
- package/dist/commands/push/types.js.map +1 -0
- package/dist/commands/run/__tests__/run.integration.test.d.ts +8 -0
- package/dist/commands/run/__tests__/run.integration.test.d.ts.map +1 -0
- package/dist/commands/run/__tests__/run.integration.test.js +52 -0
- package/dist/commands/run/__tests__/run.integration.test.js.map +1 -0
- package/dist/commands/run/__tests__/validators.test.d.ts +2 -0
- package/dist/commands/run/__tests__/validators.test.d.ts.map +1 -0
- package/dist/commands/run/__tests__/validators.test.js +80 -0
- package/dist/commands/run/__tests__/validators.test.js.map +1 -0
- package/dist/commands/run/execution.d.ts +14 -0
- package/dist/commands/run/execution.d.ts.map +1 -0
- package/dist/commands/run/execution.js +41 -0
- package/dist/commands/run/execution.js.map +1 -0
- package/dist/commands/run/index.d.ts +39 -0
- package/dist/commands/run/index.d.ts.map +1 -0
- package/dist/commands/run/index.js +191 -0
- package/dist/commands/run/index.js.map +1 -0
- package/dist/commands/run/types.d.ts +60 -0
- package/dist/commands/run/types.d.ts.map +1 -0
- package/dist/commands/run/types.js +7 -0
- package/dist/commands/run/types.js.map +1 -0
- package/dist/commands/run/utils.d.ts +29 -0
- package/dist/commands/run/utils.d.ts.map +1 -0
- package/dist/commands/run/utils.js +52 -0
- package/dist/commands/run/utils.js.map +1 -0
- package/dist/commands/run/validators.d.ts +33 -0
- package/dist/commands/run/validators.d.ts.map +1 -0
- package/dist/commands/run/validators.js +58 -0
- package/dist/commands/run/validators.js.map +1 -0
- package/dist/commands/simulate/env-loader.d.ts +19 -0
- package/dist/commands/simulate/env-loader.d.ts.map +1 -0
- package/dist/commands/simulate/env-loader.js +46 -0
- package/dist/commands/simulate/env-loader.js.map +1 -0
- package/dist/commands/simulate/index.d.ts +48 -0
- package/dist/commands/simulate/index.d.ts.map +1 -0
- package/dist/commands/simulate/index.js +116 -0
- package/dist/commands/simulate/index.js.map +1 -0
- package/dist/commands/simulate/jsdom-executor.d.ts +37 -0
- package/dist/commands/simulate/jsdom-executor.d.ts.map +1 -0
- package/dist/commands/simulate/jsdom-executor.js +137 -0
- package/dist/commands/simulate/jsdom-executor.js.map +1 -0
- package/dist/commands/simulate/node-executor.d.ts +28 -0
- package/dist/commands/simulate/node-executor.d.ts.map +1 -0
- package/dist/commands/simulate/node-executor.js +94 -0
- package/dist/commands/simulate/node-executor.js.map +1 -0
- package/dist/commands/simulate/simulator.d.ts +14 -0
- package/dist/commands/simulate/simulator.d.ts.map +1 -0
- package/dist/commands/simulate/simulator.js +162 -0
- package/dist/commands/simulate/simulator.js.map +1 -0
- package/dist/commands/simulate/tracker.d.ts +30 -0
- package/dist/commands/simulate/tracker.d.ts.map +1 -0
- package/dist/commands/simulate/tracker.js +96 -0
- package/dist/commands/simulate/tracker.js.map +1 -0
- package/dist/commands/simulate/types.d.ts +18 -0
- package/dist/commands/simulate/types.d.ts.map +1 -0
- package/dist/commands/simulate/types.js +2 -0
- package/dist/commands/simulate/types.js.map +1 -0
- package/dist/config/build-defaults.d.ts +49 -0
- package/dist/config/build-defaults.d.ts.map +1 -0
- package/dist/config/build-defaults.js +70 -0
- package/dist/config/build-defaults.js.map +1 -0
- package/dist/config/index.d.ts +13 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +15 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +81 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +155 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/utils.d.ts +114 -0
- package/dist/config/utils.d.ts.map +1 -0
- package/dist/config/utils.js +257 -0
- package/dist/config/utils.js.map +1 -0
- package/dist/config/validators.d.ts +52 -0
- package/dist/config/validators.d.ts.map +1 -0
- package/dist/config/validators.js +85 -0
- package/dist/config/validators.js.map +1 -0
- package/dist/core/asset-resolver.d.ts +34 -0
- package/dist/core/asset-resolver.d.ts.map +1 -0
- package/dist/core/asset-resolver.js +70 -0
- package/dist/core/asset-resolver.js.map +1 -0
- package/dist/core/build-cache.d.ts +23 -0
- package/dist/core/build-cache.d.ts.map +1 -0
- package/dist/core/build-cache.js +43 -0
- package/dist/core/build-cache.js.map +1 -0
- package/dist/core/cache-utils.d.ts +27 -0
- package/dist/core/cache-utils.d.ts.map +1 -0
- package/dist/core/cache-utils.js +60 -0
- package/dist/core/cache-utils.js.map +1 -0
- package/dist/core/docker.d.ts +99 -0
- package/dist/core/docker.d.ts.map +1 -0
- package/dist/core/docker.js +253 -0
- package/dist/core/docker.js.map +1 -0
- package/dist/core/execution.d.ts +34 -0
- package/dist/core/execution.d.ts.map +1 -0
- package/dist/core/execution.js +64 -0
- package/dist/core/execution.js.map +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +10 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/local-packages.d.ts +19 -0
- package/dist/core/local-packages.d.ts.map +1 -0
- package/dist/core/local-packages.js +60 -0
- package/dist/core/local-packages.js.map +1 -0
- package/dist/core/logger.d.ts +28 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +88 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/output.d.ts +30 -0
- package/dist/core/output.d.ts.map +1 -0
- package/dist/core/output.js +46 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/temp-manager.d.ts +51 -0
- package/dist/core/temp-manager.d.ts.map +1 -0
- package/dist/core/temp-manager.js +73 -0
- package/dist/core/temp-manager.js.map +1 -0
- package/dist/core/timer.d.ts +14 -0
- package/dist/core/timer.d.ts.map +1 -0
- package/dist/core/timer.js +29 -0
- package/dist/core/timer.js.map +1 -0
- package/dist/core/utils.d.ts +10 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/core/utils.js +12 -0
- package/dist/core/utils.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +9 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/primitives.d.ts +37 -0
- package/dist/schemas/primitives.d.ts.map +1 -0
- package/dist/schemas/primitives.js +43 -0
- package/dist/schemas/primitives.js.map +1 -0
- package/dist/schemas/run.d.ts +23 -0
- package/dist/schemas/run.d.ts.map +1 -0
- package/dist/schemas/run.js +20 -0
- package/dist/schemas/run.js.map +1 -0
- package/dist/types/bundle.d.ts +141 -0
- package/dist/types/bundle.d.ts.map +1 -0
- package/dist/types/bundle.js +10 -0
- package/dist/types/bundle.js.map +1 -0
- package/dist/types/global.d.ts +51 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/global.js +30 -0
- package/dist/types/global.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/walker.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler-helpers.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/bundle/bundler-helpers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Import helper functions - we need to access them for testing
|
|
2
|
+
// Since they're not exported, we'll test through createEntryPoint's behavior
|
|
3
|
+
// Or we can temporarily export them for testing
|
|
4
|
+
// For now, let's create focused unit tests for each logical section
|
|
5
|
+
describe('Bundler Helper Functions', () => {
|
|
6
|
+
describe('detectDestinationPackages', () => {
|
|
7
|
+
it('should detect destination packages with explicit package field', () => {
|
|
8
|
+
const flowConfig = {
|
|
9
|
+
destinations: {
|
|
10
|
+
gtag: {
|
|
11
|
+
package: '@walkeros/web-destination-gtag',
|
|
12
|
+
config: {},
|
|
13
|
+
},
|
|
14
|
+
api: {
|
|
15
|
+
package: '@walkeros/web-destination-api',
|
|
16
|
+
config: {},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
// We'll need to export the helper or test indirectly
|
|
21
|
+
// For this test file, we're documenting expected behavior
|
|
22
|
+
expect(flowConfig.destinations).toBeDefined();
|
|
23
|
+
});
|
|
24
|
+
it('should skip destinations without package field', () => {
|
|
25
|
+
const flowConfig = {
|
|
26
|
+
destinations: {
|
|
27
|
+
custom: {
|
|
28
|
+
// No package field
|
|
29
|
+
config: {},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
expect(flowConfig.destinations).toBeDefined();
|
|
34
|
+
});
|
|
35
|
+
it('should handle empty destinations', () => {
|
|
36
|
+
const flowConfig = {};
|
|
37
|
+
expect(flowConfig.destinations).toBeUndefined();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
describe('generateImportStatements', () => {
|
|
41
|
+
it('should generate default imports', () => {
|
|
42
|
+
const packages = {
|
|
43
|
+
'@walkeros/core': {
|
|
44
|
+
imports: ['default as walkerCore'],
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
// Expected output:
|
|
48
|
+
// import walkerCore from '@walkeros/core';
|
|
49
|
+
expect(packages).toBeDefined();
|
|
50
|
+
});
|
|
51
|
+
it('should generate named imports', () => {
|
|
52
|
+
const packages = {
|
|
53
|
+
'@walkeros/core': {
|
|
54
|
+
imports: ['getId', 'trim'],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
// Expected output:
|
|
58
|
+
// import { getId, trim } from '@walkeros/core';
|
|
59
|
+
expect(packages).toBeDefined();
|
|
60
|
+
});
|
|
61
|
+
it('should generate namespace import when no imports specified', () => {
|
|
62
|
+
const packages = {
|
|
63
|
+
'@walkeros/core': {},
|
|
64
|
+
};
|
|
65
|
+
// Expected output:
|
|
66
|
+
// import * as _walkerosCore from '@walkeros/core'; // Consider specifying explicit imports
|
|
67
|
+
expect(packages).toBeDefined();
|
|
68
|
+
});
|
|
69
|
+
it('should handle examples imports', () => {
|
|
70
|
+
const packages = {
|
|
71
|
+
'@walkeros/web-destination-gtag': {
|
|
72
|
+
imports: ['examples as gtagExamples', 'destinationGtag'],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
// Expected output:
|
|
76
|
+
// import { destinationGtag } from '@walkeros/web-destination-gtag';
|
|
77
|
+
// Example mapping: gtag: typeof gtagExamples !== 'undefined' ? gtagExamples : undefined
|
|
78
|
+
expect(packages).toBeDefined();
|
|
79
|
+
});
|
|
80
|
+
it('should auto-import examples for destination packages', () => {
|
|
81
|
+
const packages = {
|
|
82
|
+
'@walkeros/web-destination-gtag': {
|
|
83
|
+
imports: ['destinationGtag'],
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
const destinationPackages = new Set(['@walkeros/web-destination-gtag']);
|
|
87
|
+
// Expected output:
|
|
88
|
+
// import { examples as gtag_examples } from '@walkeros/web-destination-gtag/dev';
|
|
89
|
+
// Example mapping: gtag: gtag_examples
|
|
90
|
+
expect(destinationPackages.has('@walkeros/web-destination-gtag')).toBe(true);
|
|
91
|
+
});
|
|
92
|
+
it('should handle demo packages differently for examples', () => {
|
|
93
|
+
const packages = {
|
|
94
|
+
'@walkeros/web-destination-gtag-demo': {
|
|
95
|
+
imports: [],
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
// Expected output for demo packages:
|
|
99
|
+
// import { examples as gtag_demo_examples } from '@walkeros/web-destination-gtag-demo';
|
|
100
|
+
// (not from /dev subpath)
|
|
101
|
+
expect(packages).toBeDefined();
|
|
102
|
+
});
|
|
103
|
+
it('should remove duplicate imports', () => {
|
|
104
|
+
const packages = {
|
|
105
|
+
'@walkeros/core': {
|
|
106
|
+
imports: ['getId', 'getId', 'trim'],
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
// Should deduplicate to: import { getId, trim } from '@walkeros/core';
|
|
110
|
+
expect(packages).toBeDefined();
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
describe('Integration: createEntryPoint refactored behavior', () => {
|
|
114
|
+
it('should maintain backward compatibility with original implementation', () => {
|
|
115
|
+
// This test documents that the refactored version should produce
|
|
116
|
+
// identical output to the original 189-line implementation
|
|
117
|
+
// The helper extraction is purely for maintainability and testability
|
|
118
|
+
const flowConfig = {
|
|
119
|
+
destinations: {
|
|
120
|
+
gtag: {
|
|
121
|
+
package: '@walkeros/web-destination-gtag',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const buildOptions = {
|
|
126
|
+
packages: {
|
|
127
|
+
'@walkeros/core': {
|
|
128
|
+
imports: ['getId'],
|
|
129
|
+
},
|
|
130
|
+
'@walkeros/web-destination-gtag': {
|
|
131
|
+
imports: ['destinationGtag', 'examples as gtagExamples'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
code: 'export const flow = startFlow();',
|
|
135
|
+
format: 'esm',
|
|
136
|
+
platform: 'browser',
|
|
137
|
+
};
|
|
138
|
+
// The refactored createEntryPoint should:
|
|
139
|
+
// 1. Detect @walkeros/web-destination-gtag as a destination package
|
|
140
|
+
// 2. Generate imports for @walkeros/core and gtag destination
|
|
141
|
+
// 3. Create examples object with gtag mapping
|
|
142
|
+
// 4. Process code (no template, so return as-is)
|
|
143
|
+
// 5. Wrap code (ESM, already has export, so no wrapping)
|
|
144
|
+
// 6. Assemble: imports + examples + code + export { examples }
|
|
145
|
+
expect(buildOptions.format).toBe('esm');
|
|
146
|
+
expect(flowConfig.destinations).toBeDefined();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
export {};
|
|
151
|
+
//# sourceMappingURL=bundler-helpers.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler-helpers.test.js","sourceRoot":"","sources":["../../../src/__tests__/bundle/bundler-helpers.test.ts"],"names":[],"mappings":"AAGA,+DAA+D;AAC/D,6EAA6E;AAC7E,gDAAgD;AAChD,oEAAoE;AAEpE,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACzC,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;YACxE,MAAM,UAAU,GAAgB;gBAC9B,YAAY,EAAE;oBACZ,IAAI,EAAE;wBACJ,OAAO,EAAE,gCAAgC;wBACzC,MAAM,EAAE,EAAE;qBACX;oBACD,GAAG,EAAE;wBACH,OAAO,EAAE,+BAA+B;wBACxC,MAAM,EAAE,EAAE;qBACX;iBACF;aACwB,CAAC;YAE5B,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CAAC;iBACpC;aACF,CAAC;YAEF,uEAAuE;YACvE,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mDAAmD,EAAE,GAAG,EAAE;QACjE,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;YAC7E,iEAAiE;YACjE,2DAA2D;YAC3D,sEAAsE;YAEtE,MAAM,UAAU,GAAgB;gBAC9B,YAAY,EAAE;oBACZ,IAAI,EAAE;wBACJ,OAAO,EAAE,gCAAgC;qBAC1C;iBACF;aACwB,CAAC;YAE5B,MAAM,YAAY,GAAG;gBACnB,QAAQ,EAAE;oBACR,gBAAgB,EAAE;wBAChB,OAAO,EAAE,CAAC,OAAO,CAAC;qBACnB;oBACD,gCAAgC,EAAE;wBAChC,OAAO,EAAE,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;qBACzD;iBACF;gBACD,IAAI,EAAE,kCAAkC;gBACxC,MAAM,EAAE,KAAc;gBACtB,QAAQ,EAAE,SAAkB;aACF,CAAC;YAE7B,0CAA0C;YAC1C,oEAAoE;YACpE,8DAA8D;YAC9D,8CAA8C;YAC9C,iDAAiD;YACjD,yDAAyD;YACzD,+DAA+D;YAE/D,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/bundle/bundler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import fs from 'fs-extra';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { bundleCore as bundle, buildConfigObject, generatePlatformWrapper, createEntryPoint, } from '../../commands/bundle/bundler.js';
|
|
4
|
+
import { loadBundleConfig } from '../../config/index.js';
|
|
5
|
+
import { createLogger } from '../../core/index.js';
|
|
6
|
+
import { getId } from '@walkeros/core';
|
|
7
|
+
// No mocks - test with real package downloads and bundling
|
|
8
|
+
/**
|
|
9
|
+
* Helper to create a Flow.Setup config for testing.
|
|
10
|
+
*/
|
|
11
|
+
function createFlowSetup(platform, packages) {
|
|
12
|
+
return {
|
|
13
|
+
version: 1,
|
|
14
|
+
flows: {
|
|
15
|
+
default: {
|
|
16
|
+
...(platform === 'web' ? { web: {} } : { server: {} }),
|
|
17
|
+
packages,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Helper to create build options for testing.
|
|
24
|
+
* Uses minimal defaults with test-specific overrides.
|
|
25
|
+
*/
|
|
26
|
+
function createBuildOptions(overrides) {
|
|
27
|
+
return {
|
|
28
|
+
format: 'esm',
|
|
29
|
+
platform: 'browser',
|
|
30
|
+
target: 'es2020',
|
|
31
|
+
minify: false,
|
|
32
|
+
sourcemap: false,
|
|
33
|
+
cache: true,
|
|
34
|
+
tempDir: '.tmp',
|
|
35
|
+
packages: {},
|
|
36
|
+
code: '',
|
|
37
|
+
...overrides,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
describe('Bundler', () => {
|
|
41
|
+
const testOutputDir = path.resolve('.tmp', `bundler-${Date.now()}-${getId()}`);
|
|
42
|
+
let logger;
|
|
43
|
+
beforeEach(async () => {
|
|
44
|
+
// Ensure test output directory exists
|
|
45
|
+
await fs.ensureDir(testOutputDir);
|
|
46
|
+
// Clean build cache to ensure each test starts fresh
|
|
47
|
+
await fs.remove(path.join('.tmp', 'cache', 'builds'));
|
|
48
|
+
// Create a silent logger for tests
|
|
49
|
+
logger = createLogger({ silent: true });
|
|
50
|
+
// Mock console.log to suppress output during tests
|
|
51
|
+
jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
52
|
+
// Mock fs.stat for bundle stats
|
|
53
|
+
const mockStat = {
|
|
54
|
+
size: 1024,
|
|
55
|
+
isFile: () => true,
|
|
56
|
+
isDirectory: () => false,
|
|
57
|
+
};
|
|
58
|
+
jest
|
|
59
|
+
.spyOn(fs, 'stat')
|
|
60
|
+
.mockImplementation(() => Promise.resolve(mockStat));
|
|
61
|
+
});
|
|
62
|
+
afterEach(async () => {
|
|
63
|
+
// Clean up test output
|
|
64
|
+
await fs.remove(testOutputDir);
|
|
65
|
+
// Restore console.log
|
|
66
|
+
jest.restoreAllMocks();
|
|
67
|
+
});
|
|
68
|
+
it('should bundle minimal config successfully', async () => {
|
|
69
|
+
const flowConfig = {
|
|
70
|
+
web: {},
|
|
71
|
+
packages: {
|
|
72
|
+
'@walkeros/core': {
|
|
73
|
+
imports: ['getId'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
const buildOptions = createBuildOptions({
|
|
78
|
+
packages: flowConfig.packages || {},
|
|
79
|
+
code: 'export const test = getId(8);',
|
|
80
|
+
platform: 'browser',
|
|
81
|
+
format: 'esm',
|
|
82
|
+
output: path.join(testOutputDir, 'minimal.js'),
|
|
83
|
+
});
|
|
84
|
+
await expect(bundle(flowConfig, buildOptions, logger)).resolves.not.toThrow();
|
|
85
|
+
});
|
|
86
|
+
it('should bundle server config with ESM format', async () => {
|
|
87
|
+
const flowConfig = {
|
|
88
|
+
server: {},
|
|
89
|
+
packages: {
|
|
90
|
+
'@walkeros/core': {
|
|
91
|
+
imports: ['trim', 'isString'],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
const buildOptions = createBuildOptions({
|
|
96
|
+
packages: flowConfig.packages || {},
|
|
97
|
+
code: 'export default { processText: (text) => trim(text) };',
|
|
98
|
+
platform: 'node',
|
|
99
|
+
format: 'esm',
|
|
100
|
+
output: path.join(testOutputDir, 'server-bundle.mjs'),
|
|
101
|
+
});
|
|
102
|
+
await expect(bundle(flowConfig, buildOptions, logger)).resolves.not.toThrow();
|
|
103
|
+
});
|
|
104
|
+
it('should bundle advanced config with minification', async () => {
|
|
105
|
+
const flowConfig = {
|
|
106
|
+
web: {},
|
|
107
|
+
packages: {
|
|
108
|
+
'@walkeros/core': {
|
|
109
|
+
imports: ['getId', 'getByPath', 'clone', 'trim', 'isObject'],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
const buildOptions = createBuildOptions({
|
|
114
|
+
packages: flowConfig.packages || {},
|
|
115
|
+
code: "export function processData(data) {\n return data.map(item => ({\n ...item,\n id: getId(8),\n timestamp: new Date().toISOString().split('T')[0],\n processed: true\n }));\n}\n\nexport function extractNestedValues(data, path) {\n return data.map(item => getByPath(item, path, null)).filter(val => val !== null);\n}\n\nexport function deepCloneData(data) {\n return clone(data);\n}\n\nexport function cleanStringData(data) {\n return data.map(item => ({\n ...item,\n name: typeof item.name === 'string' ? trim(item.name) : item.name\n }));\n}\n\n// Re-export walkerOS utilities\nexport { getId, getByPath, clone, trim, isObject };",
|
|
116
|
+
platform: 'browser',
|
|
117
|
+
format: 'esm',
|
|
118
|
+
target: 'es2020',
|
|
119
|
+
minify: true,
|
|
120
|
+
sourcemap: true,
|
|
121
|
+
output: path.join(testOutputDir, 'advanced-bundle.js'),
|
|
122
|
+
});
|
|
123
|
+
await expect(bundle(flowConfig, buildOptions, logger)).resolves.not.toThrow();
|
|
124
|
+
});
|
|
125
|
+
describe('Stats Collection', () => {
|
|
126
|
+
it('should collect bundle stats when requested', async () => {
|
|
127
|
+
const flowConfig = {
|
|
128
|
+
web: {},
|
|
129
|
+
packages: {
|
|
130
|
+
'@walkeros/core': {
|
|
131
|
+
imports: ['getId'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
const buildOptions = createBuildOptions({
|
|
136
|
+
packages: flowConfig.packages || {},
|
|
137
|
+
code: 'export const test = getId(8);',
|
|
138
|
+
format: 'esm',
|
|
139
|
+
output: path.join(testOutputDir, 'stats-test.js'),
|
|
140
|
+
});
|
|
141
|
+
const stats = await bundle(flowConfig, buildOptions, logger, true);
|
|
142
|
+
expect(stats).toBeDefined();
|
|
143
|
+
expect(stats.totalSize).toBe(1024); // From mocked fs.stat
|
|
144
|
+
expect(stats.buildTime).toBeGreaterThanOrEqual(0);
|
|
145
|
+
expect(stats.treeshakingEffective).toBe(true);
|
|
146
|
+
expect(stats.packages).toHaveLength(1);
|
|
147
|
+
expect(stats.packages[0].name).toBe('@walkeros/core@latest');
|
|
148
|
+
});
|
|
149
|
+
it('should detect ineffective tree-shaking with wildcard imports', async () => {
|
|
150
|
+
const flowConfig = {
|
|
151
|
+
web: {},
|
|
152
|
+
packages: { '@walkeros/core': {} },
|
|
153
|
+
};
|
|
154
|
+
const buildOptions = createBuildOptions({
|
|
155
|
+
packages: flowConfig.packages || {},
|
|
156
|
+
code: 'import * as walkerCore from "@walkeros/core";\nexport const test = walkerCore.getId;',
|
|
157
|
+
format: 'esm',
|
|
158
|
+
output: path.join(testOutputDir, 'test.js'),
|
|
159
|
+
});
|
|
160
|
+
const stats = await bundle(flowConfig, buildOptions, logger, true);
|
|
161
|
+
expect(stats.treeshakingEffective).toBe(false);
|
|
162
|
+
});
|
|
163
|
+
it('should return undefined when stats not requested', async () => {
|
|
164
|
+
const flowConfig = {
|
|
165
|
+
web: {},
|
|
166
|
+
packages: {
|
|
167
|
+
'@walkeros/core': {
|
|
168
|
+
imports: ['getId'],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
const buildOptions = createBuildOptions({
|
|
173
|
+
packages: flowConfig.packages || {},
|
|
174
|
+
code: 'export const test = getId(8);',
|
|
175
|
+
format: 'esm',
|
|
176
|
+
output: path.join(testOutputDir, 'no-stats.js'),
|
|
177
|
+
});
|
|
178
|
+
const result = await bundle(flowConfig, buildOptions, logger, false);
|
|
179
|
+
expect(result).toBeUndefined();
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
describe('Configuration Scenarios', () => {
|
|
183
|
+
it('should handle custom temp directory configuration', async () => {
|
|
184
|
+
const flowConfig = {
|
|
185
|
+
web: {},
|
|
186
|
+
packages: {
|
|
187
|
+
'@walkeros/core': { imports: ['getId'] },
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
const buildOptions = createBuildOptions({
|
|
191
|
+
packages: flowConfig.packages || {},
|
|
192
|
+
code: 'export const test = getId();',
|
|
193
|
+
format: 'esm',
|
|
194
|
+
tempDir: '/tmp/my-custom-bundler-temp',
|
|
195
|
+
output: path.join(testOutputDir, 'custom-temp-example.js'),
|
|
196
|
+
});
|
|
197
|
+
await expect(bundle(flowConfig, buildOptions, logger)).resolves.not.toThrow();
|
|
198
|
+
});
|
|
199
|
+
it('should handle version pinning correctly', async () => {
|
|
200
|
+
const flowConfig = {
|
|
201
|
+
web: {},
|
|
202
|
+
packages: {
|
|
203
|
+
'@walkeros/core': { version: '0.0.7', imports: ['getId'] },
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
const buildOptions = createBuildOptions({
|
|
207
|
+
packages: flowConfig.packages || {},
|
|
208
|
+
code: '// Test version pinning\nexport const test = getId();',
|
|
209
|
+
platform: 'browser',
|
|
210
|
+
format: 'esm',
|
|
211
|
+
target: 'es2020',
|
|
212
|
+
output: path.join(testOutputDir, 'version-test.js'),
|
|
213
|
+
});
|
|
214
|
+
await expect(bundle(flowConfig, buildOptions, logger)).resolves.not.toThrow();
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
describe('Error Handling', () => {
|
|
218
|
+
it('should reject invalid config structure', async () => {
|
|
219
|
+
// Test that loader rejects invalid config structure
|
|
220
|
+
expect(() => {
|
|
221
|
+
loadBundleConfig({
|
|
222
|
+
flow: {
|
|
223
|
+
platform: 'web',
|
|
224
|
+
},
|
|
225
|
+
build: {
|
|
226
|
+
packages: {},
|
|
227
|
+
},
|
|
228
|
+
}, { configPath: '/test/config.json' });
|
|
229
|
+
}).toThrow(/Invalid configuration/);
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
describe('buildConfigObject', () => {
|
|
233
|
+
it('uses explicit code for named imports', () => {
|
|
234
|
+
const flowConfig = {
|
|
235
|
+
server: {},
|
|
236
|
+
sources: {
|
|
237
|
+
http: {
|
|
238
|
+
package: '@walkeros/server-source-express',
|
|
239
|
+
code: 'sourceExpress',
|
|
240
|
+
config: { settings: { port: 8080 } },
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
destinations: {
|
|
244
|
+
demo: {
|
|
245
|
+
package: '@walkeros/destination-demo',
|
|
246
|
+
code: 'destinationDemo',
|
|
247
|
+
config: { settings: { name: 'Test' } },
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
const explicitCodeImports = new Map([
|
|
252
|
+
['@walkeros/server-source-express', new Set(['sourceExpress'])],
|
|
253
|
+
['@walkeros/destination-demo', new Set(['destinationDemo'])],
|
|
254
|
+
]);
|
|
255
|
+
const result = buildConfigObject(flowConfig, explicitCodeImports);
|
|
256
|
+
expect(result).toContain('code: sourceExpress');
|
|
257
|
+
expect(result).toContain('code: destinationDemo');
|
|
258
|
+
expect(result).toContain('"port": 8080');
|
|
259
|
+
expect(result).toContain('"name": "Test"');
|
|
260
|
+
});
|
|
261
|
+
it('uses default import variable when no explicit code', () => {
|
|
262
|
+
const flowConfig = {
|
|
263
|
+
server: {},
|
|
264
|
+
sources: {
|
|
265
|
+
http: {
|
|
266
|
+
package: '@walkeros/server-source-express',
|
|
267
|
+
config: { settings: { port: 8080 } },
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
destinations: {},
|
|
271
|
+
};
|
|
272
|
+
const explicitCodeImports = new Map(); // No explicit imports
|
|
273
|
+
const result = buildConfigObject(flowConfig, explicitCodeImports);
|
|
274
|
+
expect(result).toContain('code: _walkerosServerSourceExpress');
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
describe('generatePlatformWrapper', () => {
|
|
278
|
+
it('generates web IIFE wrapper', () => {
|
|
279
|
+
const config = '{ sources: {}, destinations: {} }';
|
|
280
|
+
const userCode = 'console.log("custom code");';
|
|
281
|
+
const buildOptions = {
|
|
282
|
+
platform: 'browser',
|
|
283
|
+
windowCollector: 'collector',
|
|
284
|
+
windowElb: 'elb',
|
|
285
|
+
};
|
|
286
|
+
const result = generatePlatformWrapper(config, userCode, buildOptions);
|
|
287
|
+
expect(result).toContain('(async () => {');
|
|
288
|
+
expect(result).toContain('const config = { sources: {}, destinations: {} };');
|
|
289
|
+
expect(result).toContain('console.log("custom code");');
|
|
290
|
+
expect(result).toContain('await startFlow(config)');
|
|
291
|
+
expect(result).toContain("window['collector'] = collector");
|
|
292
|
+
expect(result).toContain("window['elb'] = elb");
|
|
293
|
+
});
|
|
294
|
+
it('generates server export default wrapper', () => {
|
|
295
|
+
const config = '{ sources: {}, destinations: {} }';
|
|
296
|
+
const userCode = '';
|
|
297
|
+
const buildOptions = { platform: 'node' };
|
|
298
|
+
const result = generatePlatformWrapper(config, userCode, buildOptions);
|
|
299
|
+
expect(result).toContain('export default async function');
|
|
300
|
+
expect(result).toContain('const config = { sources: {}, destinations: {} };');
|
|
301
|
+
expect(result).toContain('return await startFlow(config)');
|
|
302
|
+
expect(result).not.toContain('window');
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
describe('createEntryPoint integration', () => {
|
|
306
|
+
it('generates complete entry point with explicit code', async () => {
|
|
307
|
+
const flowConfig = {
|
|
308
|
+
server: {},
|
|
309
|
+
packages: {
|
|
310
|
+
'@walkeros/collector': { imports: ['startFlow'] },
|
|
311
|
+
'@walkeros/server-source-express': {},
|
|
312
|
+
'@walkeros/destination-demo': {},
|
|
313
|
+
},
|
|
314
|
+
sources: {
|
|
315
|
+
http: {
|
|
316
|
+
package: '@walkeros/server-source-express',
|
|
317
|
+
code: 'sourceExpress',
|
|
318
|
+
config: { settings: { port: 8080 } },
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
destinations: {
|
|
322
|
+
demo: {
|
|
323
|
+
package: '@walkeros/destination-demo',
|
|
324
|
+
code: 'destinationDemo',
|
|
325
|
+
config: { settings: { name: 'Test' } },
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
const buildOptions = {
|
|
330
|
+
platform: 'node',
|
|
331
|
+
format: 'esm',
|
|
332
|
+
packages: {
|
|
333
|
+
'@walkeros/collector': { imports: ['startFlow'] },
|
|
334
|
+
'@walkeros/server-source-express': {},
|
|
335
|
+
'@walkeros/destination-demo': {},
|
|
336
|
+
},
|
|
337
|
+
output: './dist/bundle.mjs',
|
|
338
|
+
code: '',
|
|
339
|
+
};
|
|
340
|
+
const result = await createEntryPoint(flowConfig, buildOptions, new Map());
|
|
341
|
+
// Should have named imports
|
|
342
|
+
expect(result).toContain("import { startFlow } from '@walkeros/collector'");
|
|
343
|
+
expect(result).toContain("import { sourceExpress } from '@walkeros/server-source-express'");
|
|
344
|
+
expect(result).toContain("import { destinationDemo } from '@walkeros/destination-demo'");
|
|
345
|
+
// Should use those imports in config
|
|
346
|
+
expect(result).toContain('code: sourceExpress');
|
|
347
|
+
expect(result).toContain('code: destinationDemo');
|
|
348
|
+
// Should have server wrapper
|
|
349
|
+
expect(result).toContain('export default async function');
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
//# sourceMappingURL=bundler.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.test.js","sourceRoot":"","sources":["../../../src/__tests__/bundle/bundler.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,UAAU,IAAI,MAAM,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO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AS,CAAC,qBAAqB,CAAC,CAAC;YAChD,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;YAElD,6BAA6B;YAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programmatic.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/bundle/programmatic.test.ts"],"names":[],"mappings":""}
|