@objectstack/cli 3.0.6 → 3.0.8
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/.turbo/turbo-build.log +2 -26
- package/CHANGELOG.md +27 -0
- package/README.md +98 -54
- package/bin/run-dev.js +5 -0
- package/bin/run.js +5 -0
- package/dist/bin.d.ts +11 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +12 -3767
- package/dist/bin.js.map +1 -0
- package/dist/commands/codemod/v2-to-v3.d.ts +10 -0
- package/dist/commands/codemod/v2-to-v3.d.ts.map +1 -0
- package/dist/commands/codemod/v2-to-v3.js +145 -0
- package/dist/commands/codemod/v2-to-v3.js.map +1 -0
- package/dist/commands/compile.d.ts +13 -0
- package/dist/commands/compile.d.ts.map +1 -0
- package/dist/commands/compile.js +91 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/create.d.ts +91 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +259 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/dev.d.ts +14 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +67 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/diff.d.ts +16 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +239 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.d.ts +10 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +532 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/explain.d.ts +12 -0
- package/dist/commands/explain.d.ts.map +1 -0
- package/dist/commands/explain.js +368 -0
- package/dist/commands/explain.js.map +1 -0
- package/dist/commands/generate.d.ts +17 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +833 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/info.d.ts +12 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +100 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +22 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +295 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/lint.d.ts +13 -0
- package/dist/commands/lint.d.ts.map +1 -0
- package/dist/commands/lint.js +255 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/commands/plugin/add.d.ts +22 -0
- package/dist/commands/plugin/add.d.ts.map +1 -0
- package/dist/commands/plugin/add.js +93 -0
- package/dist/commands/plugin/add.js.map +1 -0
- package/dist/commands/plugin/info.d.ts +10 -0
- package/dist/commands/plugin/info.d.ts.map +1 -0
- package/dist/commands/plugin/info.js +65 -0
- package/dist/commands/plugin/info.js.map +1 -0
- package/dist/commands/plugin/list.d.ts +13 -0
- package/dist/commands/plugin/list.d.ts.map +1 -0
- package/dist/commands/plugin/list.js +78 -0
- package/dist/commands/plugin/list.js.map +1 -0
- package/dist/commands/plugin/remove.d.ts +20 -0
- package/dist/commands/plugin/remove.d.ts.map +1 -0
- package/dist/commands/plugin/remove.js +79 -0
- package/dist/commands/plugin/remove.js.map +1 -0
- package/dist/commands/serve.d.ts +15 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +286 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/studio.d.ts +19 -0
- package/dist/commands/studio.d.ts.map +1 -0
- package/dist/commands/studio.js +43 -0
- package/dist/commands/studio.js.map +1 -0
- package/dist/commands/test.d.ts +13 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +120 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/validate.d.ts +13 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +115 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +15 -114
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -2805
- package/dist/index.js.map +1 -0
- package/dist/utils/config.d.ts +21 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +66 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/format.d.ts +52 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +202 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/plugin-helpers.d.ts +14 -0
- package/dist/utils/plugin-helpers.d.ts.map +1 -0
- package/dist/utils/plugin-helpers.js +40 -0
- package/dist/utils/plugin-helpers.js.map +1 -0
- package/dist/utils/studio.d.ts +58 -0
- package/dist/utils/studio.d.ts.map +1 -0
- package/dist/utils/studio.js +288 -0
- package/dist/utils/studio.js.map +1 -0
- package/package.json +33 -15
- package/src/bin.ts +11 -104
- package/src/commands/{codemod.ts → codemod/v2-to-v3.ts} +21 -28
- package/src/commands/compile.ts +31 -22
- package/src/commands/create.ts +29 -19
- package/src/commands/dev.ts +21 -10
- package/src/commands/diff.ts +28 -19
- package/src/commands/doctor.ts +17 -10
- package/src/commands/explain.ts +20 -10
- package/src/commands/generate.ts +81 -90
- package/src/commands/info.ts +20 -11
- package/src/commands/init.ts +32 -20
- package/src/commands/lint.ts +24 -14
- package/src/commands/plugin/add.ts +112 -0
- package/src/commands/plugin/info.ts +79 -0
- package/src/commands/plugin/list.ts +93 -0
- package/src/commands/plugin/remove.ts +97 -0
- package/src/commands/serve.ts +30 -20
- package/src/commands/studio.ts +21 -11
- package/src/commands/test.ts +21 -10
- package/src/commands/validate.ts +32 -22
- package/src/index.ts +20 -12
- package/src/utils/plugin-helpers.ts +37 -0
- package/src/utils/studio.ts +0 -1
- package/test/commands.test.ts +76 -37
- package/test/plugin-commands.test.ts +42 -160
- package/test/plugin.test.ts +19 -23
- package/tsconfig.build.json +18 -0
- package/bin/objectstack.js +0 -2
- package/dist/chunk-T2YN4AB7.js +0 -249
- package/dist/chunk-XNACYTC5.js +0 -251
- package/dist/config-FOXDQ5F7.js +0 -10
- package/dist/config-GBR54FKL.js +0 -11
- package/src/commands/plugin.ts +0 -372
- package/src/utils/plugin-commands.ts +0 -163
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Validate extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
config: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
strict: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAiBnD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAgB,WAAW,SAAoE;IAE/F,OAAgB,IAAI;;MAElB;IAEF,OAAgB,KAAK;;;MAGnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+G3B"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
|
|
2
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { ObjectStackDefinitionSchema, normalizeStackInput } from '@objectstack/spec';
|
|
5
|
+
import { loadConfig } from '../utils/config.js';
|
|
6
|
+
import { printHeader, printKV, printSuccess, printError, printStep, createTimer, formatZodErrors, collectMetadataStats, printMetadataStats, } from '../utils/format.js';
|
|
7
|
+
export default class Validate extends Command {
|
|
8
|
+
static description = 'Validate ObjectStack configuration against the protocol schema';
|
|
9
|
+
static args = {
|
|
10
|
+
config: Args.string({ description: 'Configuration file path', required: false }),
|
|
11
|
+
};
|
|
12
|
+
static flags = {
|
|
13
|
+
strict: Flags.boolean({ description: 'Treat warnings as errors' }),
|
|
14
|
+
json: Flags.boolean({ description: 'Output results as JSON' }),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { args, flags } = await this.parse(Validate);
|
|
18
|
+
const timer = createTimer();
|
|
19
|
+
if (!flags.json) {
|
|
20
|
+
printHeader('Validate');
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
// 1. Load configuration
|
|
24
|
+
if (!flags.json)
|
|
25
|
+
printStep('Loading configuration...');
|
|
26
|
+
const { config, absolutePath, duration } = await loadConfig(args.config);
|
|
27
|
+
if (!flags.json) {
|
|
28
|
+
printKV('Config', absolutePath);
|
|
29
|
+
printKV('Load time', `${duration}ms`);
|
|
30
|
+
}
|
|
31
|
+
// 2. Normalize map-formatted stack definition and validate against schema
|
|
32
|
+
if (!flags.json)
|
|
33
|
+
printStep('Validating against ObjectStack Protocol...');
|
|
34
|
+
const normalized = normalizeStackInput(config);
|
|
35
|
+
const result = ObjectStackDefinitionSchema.safeParse(normalized);
|
|
36
|
+
if (!result.success) {
|
|
37
|
+
if (flags.json) {
|
|
38
|
+
console.log(JSON.stringify({
|
|
39
|
+
valid: false,
|
|
40
|
+
errors: result.error.issues,
|
|
41
|
+
duration: timer.elapsed(),
|
|
42
|
+
}, null, 2));
|
|
43
|
+
this.exit(1);
|
|
44
|
+
}
|
|
45
|
+
console.log('');
|
|
46
|
+
printError('Validation failed');
|
|
47
|
+
formatZodErrors(result.error);
|
|
48
|
+
this.exit(1);
|
|
49
|
+
}
|
|
50
|
+
// 3. Collect and display stats
|
|
51
|
+
const stats = collectMetadataStats(config);
|
|
52
|
+
if (flags.json) {
|
|
53
|
+
console.log(JSON.stringify({
|
|
54
|
+
valid: true,
|
|
55
|
+
manifest: config.manifest,
|
|
56
|
+
stats,
|
|
57
|
+
duration: timer.elapsed(),
|
|
58
|
+
}, null, 2));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// 4. Warnings (non-blocking)
|
|
62
|
+
const warnings = [];
|
|
63
|
+
if (stats.objects === 0) {
|
|
64
|
+
warnings.push('No objects defined — this stack has no data model');
|
|
65
|
+
}
|
|
66
|
+
if (stats.apps === 0 && stats.plugins === 0) {
|
|
67
|
+
warnings.push('No apps or plugins defined — this stack may not do much');
|
|
68
|
+
}
|
|
69
|
+
if (!config.manifest?.id) {
|
|
70
|
+
warnings.push('Missing manifest.id — required for deployment');
|
|
71
|
+
}
|
|
72
|
+
if (!config.manifest?.namespace) {
|
|
73
|
+
warnings.push('Missing manifest.namespace — required for multi-app hosting');
|
|
74
|
+
}
|
|
75
|
+
// 5. Display results
|
|
76
|
+
console.log('');
|
|
77
|
+
printSuccess(`Validation passed ${chalk.dim(`(${timer.display()})`)}`);
|
|
78
|
+
console.log('');
|
|
79
|
+
if (config.manifest) {
|
|
80
|
+
console.log(` ${chalk.bold(config.manifest.name || config.manifest.id || 'Unnamed')} ${chalk.dim(`v${config.manifest.version || '0.0.0'}`)}`);
|
|
81
|
+
if (config.manifest.description) {
|
|
82
|
+
console.log(chalk.dim(` ${config.manifest.description}`));
|
|
83
|
+
}
|
|
84
|
+
console.log('');
|
|
85
|
+
}
|
|
86
|
+
printMetadataStats(stats);
|
|
87
|
+
if (warnings.length > 0) {
|
|
88
|
+
console.log('');
|
|
89
|
+
for (const w of warnings) {
|
|
90
|
+
console.log(chalk.yellow(` ⚠ ${w}`));
|
|
91
|
+
}
|
|
92
|
+
if (flags.strict) {
|
|
93
|
+
console.log('');
|
|
94
|
+
printError('Strict mode: warnings treated as errors');
|
|
95
|
+
this.exit(1);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
console.log('');
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
if (flags.json) {
|
|
102
|
+
console.log(JSON.stringify({
|
|
103
|
+
valid: false,
|
|
104
|
+
error: error.message,
|
|
105
|
+
duration: timer.elapsed(),
|
|
106
|
+
}, null, 2));
|
|
107
|
+
this.exit(1);
|
|
108
|
+
}
|
|
109
|
+
console.log('');
|
|
110
|
+
printError(error.message || String(error));
|
|
111
|
+
this.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,WAAW,EACX,OAAO,EACP,YAAY,EACZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,MAAM,CAAU,WAAW,GAAG,gEAAgE,CAAC;IAE/F,MAAM,CAAU,IAAI,GAAG;QACrB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;KACjF,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;QAClE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;KAC/D,CAAC;IAEF,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,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,CAAC;gBACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;oBACzB,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,KAAK,CAAC,OAAO;oBACpB,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE;iBAC1B,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;gBACb,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,UAAU,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACf,CAAC;IACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,114 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
files: {
|
|
17
|
-
'package.json': (name: string) => {
|
|
18
|
-
name: string;
|
|
19
|
-
version: string;
|
|
20
|
-
description: string;
|
|
21
|
-
main: string;
|
|
22
|
-
types: string;
|
|
23
|
-
scripts: {
|
|
24
|
-
build: string;
|
|
25
|
-
dev: string;
|
|
26
|
-
test: string;
|
|
27
|
-
};
|
|
28
|
-
keywords: string[];
|
|
29
|
-
author: string;
|
|
30
|
-
license: string;
|
|
31
|
-
dependencies: {
|
|
32
|
-
'@objectstack/spec': string;
|
|
33
|
-
zod: string;
|
|
34
|
-
};
|
|
35
|
-
devDependencies: {
|
|
36
|
-
'@types/node': string;
|
|
37
|
-
typescript: string;
|
|
38
|
-
vitest: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
'tsconfig.json': () => {
|
|
42
|
-
extends: string;
|
|
43
|
-
compilerOptions: {
|
|
44
|
-
outDir: string;
|
|
45
|
-
rootDir: string;
|
|
46
|
-
};
|
|
47
|
-
include: string[];
|
|
48
|
-
};
|
|
49
|
-
'src/index.ts': (name: string) => string;
|
|
50
|
-
'README.md': (name: string) => string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
example: {
|
|
54
|
-
description: string;
|
|
55
|
-
files: {
|
|
56
|
-
'package.json': (name: string) => {
|
|
57
|
-
name: string;
|
|
58
|
-
version: string;
|
|
59
|
-
private: boolean;
|
|
60
|
-
description: string;
|
|
61
|
-
scripts: {
|
|
62
|
-
build: string;
|
|
63
|
-
dev: string;
|
|
64
|
-
test: string;
|
|
65
|
-
};
|
|
66
|
-
dependencies: {
|
|
67
|
-
'@objectstack/spec': string;
|
|
68
|
-
'@objectstack/cli': string;
|
|
69
|
-
zod: string;
|
|
70
|
-
};
|
|
71
|
-
devDependencies: {
|
|
72
|
-
'@types/node': string;
|
|
73
|
-
tsx: string;
|
|
74
|
-
typescript: string;
|
|
75
|
-
vitest: string;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
'objectstack.config.ts': (name: string) => string;
|
|
79
|
-
'README.md': (name: string) => string;
|
|
80
|
-
'tsconfig.json': () => {
|
|
81
|
-
extends: string;
|
|
82
|
-
compilerOptions: {
|
|
83
|
-
outDir: string;
|
|
84
|
-
rootDir: string;
|
|
85
|
-
};
|
|
86
|
-
include: string[];
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
declare const createCommand: Command;
|
|
92
|
-
|
|
93
|
-
declare const pluginCommand: Command;
|
|
94
|
-
|
|
95
|
-
declare const devCommand: Command;
|
|
96
|
-
|
|
97
|
-
declare const serveCommand: Command;
|
|
98
|
-
|
|
99
|
-
declare const testCommand: Command;
|
|
100
|
-
|
|
101
|
-
declare const doctorCommand: Command;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Discover CLI command contributions from installed plugins.
|
|
105
|
-
*
|
|
106
|
-
* Scans the project's `objectstack.config.ts` for plugins that declare
|
|
107
|
-
* `contributes.commands` in their manifest, then dynamically imports
|
|
108
|
-
* those plugin modules to register Commander.js commands.
|
|
109
|
-
*
|
|
110
|
-
* @param program - The root Commander.js program to register commands on
|
|
111
|
-
*/
|
|
112
|
-
declare function loadPluginCommands(program: Command): Promise<void>;
|
|
113
|
-
|
|
114
|
-
export { compileCommand, createCommand, devCommand, doctorCommand, generateCommand, infoCommand, initCommand, loadPluginCommands, pluginCommand, serveCommand, templates, testCommand, validateCommand };
|
|
1
|
+
export { default as CompileCommand } from './commands/compile.js';
|
|
2
|
+
export { default as ValidateCommand } from './commands/validate.js';
|
|
3
|
+
export { default as InfoCommand } from './commands/info.js';
|
|
4
|
+
export { default as InitCommand } from './commands/init.js';
|
|
5
|
+
export { default as GenerateCommand } from './commands/generate.js';
|
|
6
|
+
export { default as CreateCommand } from './commands/create.js';
|
|
7
|
+
export { default as DevCommand } from './commands/dev.js';
|
|
8
|
+
export { default as ServeCommand } from './commands/serve.js';
|
|
9
|
+
export { default as TestCommand } from './commands/test.js';
|
|
10
|
+
export { default as DoctorCommand } from './commands/doctor.js';
|
|
11
|
+
export { default as PluginListCommand } from './commands/plugin/list.js';
|
|
12
|
+
export { default as PluginInfoCommand } from './commands/plugin/info.js';
|
|
13
|
+
export { default as PluginAddCommand } from './commands/plugin/add.js';
|
|
14
|
+
export { default as PluginRemoveCommand } from './commands/plugin/remove.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGhE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
|