@walkeros/cli 0.7.0-next.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -151
- package/README.md +123 -37
- package/dist/examples/flow-order-complete.json +0 -1
- package/dist/examples/flow-simple.json +0 -3
- package/dist/examples/flow.json +0 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +882 -846
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.d.ts +2 -0
- package/dist/runtime/main.js +271 -0
- package/dist/runtime/main.js.map +1 -0
- package/examples/flow-order-complete.json +0 -1
- package/examples/flow-simple.json +0 -3
- package/examples/flow.json +0 -1
- package/package.json +10 -7
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler-helpers.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler-helpers.test.js +0 -151
- package/dist/__tests__/bundle/bundler-helpers.test.js.map +0 -1
- package/dist/__tests__/bundle/bundler.test.d.ts +0 -2
- package/dist/__tests__/bundle/bundler.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/bundler.test.js +0 -353
- package/dist/__tests__/bundle/bundler.test.js.map +0 -1
- package/dist/__tests__/bundle/programmatic.test.d.ts +0 -2
- package/dist/__tests__/bundle/programmatic.test.d.ts.map +0 -1
- package/dist/__tests__/bundle/programmatic.test.js +0 -148
- package/dist/__tests__/bundle/programmatic.test.js.map +0 -1
- package/dist/__tests__/cli-e2e.test.d.ts +0 -8
- package/dist/__tests__/cli-e2e.test.d.ts.map +0 -1
- package/dist/__tests__/cli-e2e.test.js +0 -130
- package/dist/__tests__/cli-e2e.test.js.map +0 -1
- package/dist/__tests__/cli.test.d.ts +0 -2
- package/dist/__tests__/cli.test.d.ts.map +0 -1
- package/dist/__tests__/cli.test.js +0 -180
- package/dist/__tests__/cli.test.js.map +0 -1
- package/dist/__tests__/config-loader.test.d.ts +0 -7
- package/dist/__tests__/config-loader.test.d.ts.map +0 -1
- package/dist/__tests__/config-loader.test.js +0 -414
- package/dist/__tests__/config-loader.test.js.map +0 -1
- package/dist/__tests__/core/asset-resolver.test.d.ts +0 -2
- package/dist/__tests__/core/asset-resolver.test.d.ts.map +0 -1
- package/dist/__tests__/core/asset-resolver.test.js +0 -14
- package/dist/__tests__/core/asset-resolver.test.js.map +0 -1
- package/dist/__tests__/core/build-cache.test.d.ts +0 -2
- package/dist/__tests__/core/build-cache.test.d.ts.map +0 -1
- package/dist/__tests__/core/build-cache.test.js +0 -55
- package/dist/__tests__/core/build-cache.test.js.map +0 -1
- package/dist/__tests__/core/cache-utils.test.d.ts +0 -2
- package/dist/__tests__/core/cache-utils.test.d.ts.map +0 -1
- package/dist/__tests__/core/cache-utils.test.js +0 -70
- package/dist/__tests__/core/cache-utils.test.js.map +0 -1
- package/dist/__tests__/core/config.test.d.ts +0 -2
- package/dist/__tests__/core/config.test.d.ts.map +0 -1
- package/dist/__tests__/core/config.test.js +0 -72
- package/dist/__tests__/core/config.test.js.map +0 -1
- package/dist/__tests__/core/docker-url.test.d.ts +0 -2
- package/dist/__tests__/core/docker-url.test.d.ts.map +0 -1
- package/dist/__tests__/core/docker-url.test.js +0 -54
- package/dist/__tests__/core/docker-url.test.js.map +0 -1
- package/dist/__tests__/core/logger.test.d.ts +0 -2
- package/dist/__tests__/core/logger.test.d.ts.map +0 -1
- package/dist/__tests__/core/logger.test.js +0 -53
- package/dist/__tests__/core/logger.test.js.map +0 -1
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts +0 -8
- package/dist/__tests__/integration/bundle-run.integration.test.d.ts.map +0 -1
- package/dist/__tests__/integration/bundle-run.integration.test.js +0 -54
- package/dist/__tests__/integration/bundle-run.integration.test.js.map +0 -1
- package/dist/__tests__/push/push.test.d.ts +0 -7
- package/dist/__tests__/push/push.test.d.ts.map +0 -1
- package/dist/__tests__/push/push.test.js +0 -197
- package/dist/__tests__/push/push.test.js.map +0 -1
- package/dist/__tests__/simulate/env-loader.test.d.ts +0 -2
- package/dist/__tests__/simulate/env-loader.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/env-loader.test.js +0 -47
- package/dist/__tests__/simulate/env-loader.test.js.map +0 -1
- package/dist/__tests__/simulate/node-executor.test.d.ts +0 -5
- package/dist/__tests__/simulate/node-executor.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/node-executor.test.js +0 -25
- package/dist/__tests__/simulate/node-executor.test.js.map +0 -1
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts +0 -5
- package/dist/__tests__/simulate/server-simulate.integration.test.d.ts.map +0 -1
- package/dist/__tests__/simulate/server-simulate.integration.test.js +0 -58
- package/dist/__tests__/simulate/server-simulate.integration.test.js.map +0 -1
- package/dist/__tests__/smoke/production.smoke.test.d.ts +0 -8
- package/dist/__tests__/smoke/production.smoke.test.d.ts.map +0 -1
- package/dist/__tests__/smoke/production.smoke.test.js +0 -65
- package/dist/__tests__/smoke/production.smoke.test.js.map +0 -1
- package/dist/commands/bundle/bundler.d.ts +0 -32
- package/dist/commands/bundle/bundler.d.ts.map +0 -1
- package/dist/commands/bundle/bundler.js +0 -583
- package/dist/commands/bundle/bundler.js.map +0 -1
- package/dist/commands/bundle/index.d.ts +0 -57
- package/dist/commands/bundle/index.d.ts.map +0 -1
- package/dist/commands/bundle/index.js +0 -200
- package/dist/commands/bundle/index.js.map +0 -1
- package/dist/commands/bundle/package-manager.d.ts +0 -8
- package/dist/commands/bundle/package-manager.d.ts.map +0 -1
- package/dist/commands/bundle/package-manager.js +0 -197
- package/dist/commands/bundle/package-manager.js.map +0 -1
- package/dist/commands/bundle/stats.d.ts +0 -23
- package/dist/commands/bundle/stats.d.ts.map +0 -1
- package/dist/commands/bundle/stats.js +0 -52
- package/dist/commands/bundle/stats.js.map +0 -1
- package/dist/commands/cache.d.ts +0 -3
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/cache.js +0 -44
- package/dist/commands/cache.js.map +0 -1
- package/dist/commands/push/index.d.ts +0 -7
- package/dist/commands/push/index.d.ts.map +0 -1
- package/dist/commands/push/index.js +0 -257
- package/dist/commands/push/index.js.map +0 -1
- package/dist/commands/push/types.d.ts +0 -21
- package/dist/commands/push/types.d.ts.map +0 -1
- package/dist/commands/push/types.js +0 -2
- package/dist/commands/push/types.js.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.d.ts +0 -8
- package/dist/commands/run/__tests__/run.integration.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/run.integration.test.js +0 -52
- package/dist/commands/run/__tests__/run.integration.test.js.map +0 -1
- package/dist/commands/run/__tests__/validators.test.d.ts +0 -2
- package/dist/commands/run/__tests__/validators.test.d.ts.map +0 -1
- package/dist/commands/run/__tests__/validators.test.js +0 -80
- package/dist/commands/run/__tests__/validators.test.js.map +0 -1
- package/dist/commands/run/execution.d.ts +0 -14
- package/dist/commands/run/execution.d.ts.map +0 -1
- package/dist/commands/run/execution.js +0 -41
- package/dist/commands/run/execution.js.map +0 -1
- package/dist/commands/run/index.d.ts +0 -39
- package/dist/commands/run/index.d.ts.map +0 -1
- package/dist/commands/run/index.js +0 -191
- package/dist/commands/run/index.js.map +0 -1
- package/dist/commands/run/types.d.ts +0 -60
- package/dist/commands/run/types.d.ts.map +0 -1
- package/dist/commands/run/types.js +0 -7
- package/dist/commands/run/types.js.map +0 -1
- package/dist/commands/run/utils.d.ts +0 -29
- package/dist/commands/run/utils.d.ts.map +0 -1
- package/dist/commands/run/utils.js +0 -52
- package/dist/commands/run/utils.js.map +0 -1
- package/dist/commands/run/validators.d.ts +0 -33
- package/dist/commands/run/validators.d.ts.map +0 -1
- package/dist/commands/run/validators.js +0 -58
- package/dist/commands/run/validators.js.map +0 -1
- package/dist/commands/simulate/env-loader.d.ts +0 -19
- package/dist/commands/simulate/env-loader.d.ts.map +0 -1
- package/dist/commands/simulate/env-loader.js +0 -46
- package/dist/commands/simulate/env-loader.js.map +0 -1
- package/dist/commands/simulate/index.d.ts +0 -48
- package/dist/commands/simulate/index.d.ts.map +0 -1
- package/dist/commands/simulate/index.js +0 -116
- package/dist/commands/simulate/index.js.map +0 -1
- package/dist/commands/simulate/jsdom-executor.d.ts +0 -37
- package/dist/commands/simulate/jsdom-executor.d.ts.map +0 -1
- package/dist/commands/simulate/jsdom-executor.js +0 -137
- package/dist/commands/simulate/jsdom-executor.js.map +0 -1
- package/dist/commands/simulate/node-executor.d.ts +0 -28
- package/dist/commands/simulate/node-executor.d.ts.map +0 -1
- package/dist/commands/simulate/node-executor.js +0 -94
- package/dist/commands/simulate/node-executor.js.map +0 -1
- package/dist/commands/simulate/simulator.d.ts +0 -14
- package/dist/commands/simulate/simulator.d.ts.map +0 -1
- package/dist/commands/simulate/simulator.js +0 -162
- package/dist/commands/simulate/simulator.js.map +0 -1
- package/dist/commands/simulate/tracker.d.ts +0 -30
- package/dist/commands/simulate/tracker.d.ts.map +0 -1
- package/dist/commands/simulate/tracker.js +0 -96
- package/dist/commands/simulate/tracker.js.map +0 -1
- package/dist/commands/simulate/types.d.ts +0 -18
- package/dist/commands/simulate/types.d.ts.map +0 -1
- package/dist/commands/simulate/types.js +0 -2
- package/dist/commands/simulate/types.js.map +0 -1
- package/dist/config/build-defaults.d.ts +0 -49
- package/dist/config/build-defaults.d.ts.map +0 -1
- package/dist/config/build-defaults.js +0 -70
- package/dist/config/build-defaults.js.map +0 -1
- package/dist/config/index.d.ts +0 -13
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -15
- package/dist/config/index.js.map +0 -1
- package/dist/config/loader.d.ts +0 -81
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js +0 -155
- package/dist/config/loader.js.map +0 -1
- package/dist/config/utils.d.ts +0 -114
- package/dist/config/utils.d.ts.map +0 -1
- package/dist/config/utils.js +0 -257
- package/dist/config/utils.js.map +0 -1
- package/dist/config/validators.d.ts +0 -52
- package/dist/config/validators.d.ts.map +0 -1
- package/dist/config/validators.js +0 -85
- package/dist/config/validators.js.map +0 -1
- package/dist/core/asset-resolver.d.ts +0 -34
- package/dist/core/asset-resolver.d.ts.map +0 -1
- package/dist/core/asset-resolver.js +0 -70
- package/dist/core/asset-resolver.js.map +0 -1
- package/dist/core/build-cache.d.ts +0 -23
- package/dist/core/build-cache.d.ts.map +0 -1
- package/dist/core/build-cache.js +0 -43
- package/dist/core/build-cache.js.map +0 -1
- package/dist/core/cache-utils.d.ts +0 -27
- package/dist/core/cache-utils.d.ts.map +0 -1
- package/dist/core/cache-utils.js +0 -60
- package/dist/core/cache-utils.js.map +0 -1
- package/dist/core/docker.d.ts +0 -102
- package/dist/core/docker.d.ts.map +0 -1
- package/dist/core/docker.js +0 -278
- package/dist/core/docker.js.map +0 -1
- package/dist/core/execution.d.ts +0 -34
- package/dist/core/execution.d.ts.map +0 -1
- package/dist/core/execution.js +0 -64
- package/dist/core/execution.js.map +0 -1
- package/dist/core/index.d.ts +0 -10
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -10
- package/dist/core/index.js.map +0 -1
- package/dist/core/local-packages.d.ts +0 -19
- package/dist/core/local-packages.d.ts.map +0 -1
- package/dist/core/local-packages.js +0 -60
- package/dist/core/local-packages.js.map +0 -1
- package/dist/core/logger.d.ts +0 -28
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -88
- package/dist/core/logger.js.map +0 -1
- package/dist/core/output.d.ts +0 -30
- package/dist/core/output.d.ts.map +0 -1
- package/dist/core/output.js +0 -46
- package/dist/core/output.js.map +0 -1
- package/dist/core/temp-manager.d.ts +0 -51
- package/dist/core/temp-manager.d.ts.map +0 -1
- package/dist/core/temp-manager.js +0 -73
- package/dist/core/temp-manager.js.map +0 -1
- package/dist/core/timer.d.ts +0 -14
- package/dist/core/timer.d.ts.map +0 -1
- package/dist/core/timer.js +0 -29
- package/dist/core/timer.js.map +0 -1
- package/dist/core/utils.d.ts +0 -10
- package/dist/core/utils.d.ts.map +0 -1
- package/dist/core/utils.js +0 -12
- package/dist/core/utils.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/schemas/index.d.ts +0 -9
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/index.js +0 -9
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/primitives.d.ts +0 -37
- package/dist/schemas/primitives.d.ts.map +0 -1
- package/dist/schemas/primitives.js +0 -43
- package/dist/schemas/primitives.js.map +0 -1
- package/dist/schemas/run.d.ts +0 -23
- package/dist/schemas/run.d.ts.map +0 -1
- package/dist/schemas/run.js +0 -20
- package/dist/schemas/run.js.map +0 -1
- package/dist/types/bundle.d.ts +0 -141
- package/dist/types/bundle.d.ts.map +0 -1
- package/dist/types/bundle.js +0 -10
- package/dist/types/bundle.js.map +0 -1
- package/dist/types/global.d.ts +0 -51
- package/dist/types/global.d.ts.map +0 -1
- package/dist/types/global.js +0 -30
- package/dist/types/global.js.map +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
- package/dist/version.d.ts +0 -3
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -27
- package/dist/version.js.map +0 -1
- package/dist/walker.js +0 -1
|
@@ -1,353 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAe,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAa,MAAM,gBAAgB,CAAC;AAGlD,2DAA2D;AAE3D;;GAEG;AACH,SAAS,eAAe,CACtB,QAA0B,EAC1B,QAAuB;IAEvB,OAAO;QACL,OAAO,EAAE,CAAC;QACV,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,GAAG,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,C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BACD,YAAY,EAAE;oBACZ,IAAI,EAAE;wBACJ,OAAO,EAAE,4BAA4B;wBACrC,IAAI,EAAE,iBAAiB;wBACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;qBACvC;iBACF;aACF,CAAC;YAEF,MAAM,YAAY,GAAG;gBACnB,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE;oBACR,qBAAqB,EAAE,EAAE,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE;oBACjD,iCAAiC,EAAE,EAAE;oBACrC,4BAA4B,EAAE,EAAE;iBACjC;gBACD,MAAM,EAAE,mBAAmB;gBAC3B,IAAI,EAAE,EAAE;aACT,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,gBAAgB,CACnC,UAAU,EACV,YAA4B,EAC5B,IAAI,GAAG,EAAE,CACV,CAAC;YAEF,4BAA4B;YAC5B,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CACtB,iDAAiD,CAClD,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CACtB,iEAAiE,CAClE,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CACtB,8DAA8D,CAC/D,CAAC;YAEF,qCAAqC;YACrC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"programmatic.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/bundle/programmatic.test.ts"],"names":[],"mappings":""}
|
|
@@ -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,EAAE;IACvC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAC7B,MAAM,EACN,gBAAgB,IAAI,CAAC,GAAG,EAAE,IAAI,KAAK,EAAE,EAAE,CACxC,CAAC;IAEF,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAClC,mDAAmD;QACnD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAExD,gCAAgC;QAChC,MAAM,QAAQ,GAAG;YACf,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;YAClB,WAAW,EAAE,GAAG,EAAE,CAAC,KAAK;SACG,CAAC;QAC9B,IAAI;aACD,KAAK,CAAC,EAAE,EAAE,MAAM,CAAC;aACjB,kBAAkB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAoB,CAAC,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa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