adorn-api 1.0.19 → 1.0.20
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/dist/cli.cjs +8 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +8 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2850,7 +2850,7 @@ function partitionSchemas(schemas, graph, schemaGraph, config = {}) {
|
|
|
2850
2850
|
complexity: totalComplexity,
|
|
2851
2851
|
dependencies: []
|
|
2852
2852
|
}];
|
|
2853
|
-
recommendation = recommendation || "Single file mode (--
|
|
2853
|
+
recommendation = recommendation || "Single file mode (--split not specified)";
|
|
2854
2854
|
} else if (strategy === "controller") {
|
|
2855
2855
|
groups = partitionByController(schemas, graph, finalConfig);
|
|
2856
2856
|
} else if (strategy === "dependency") {
|
|
@@ -3504,7 +3504,7 @@ async function buildCommand(args) {
|
|
|
3504
3504
|
const validationMode = validationModeIndex !== -1 ? args[validationModeIndex + 1] : "ajv-runtime";
|
|
3505
3505
|
const verbose = args.includes("--verbose");
|
|
3506
3506
|
const quiet = args.includes("--quiet");
|
|
3507
|
-
const
|
|
3507
|
+
const split = args.includes("--split");
|
|
3508
3508
|
const splitStrategyIndex = args.indexOf("--split-strategy");
|
|
3509
3509
|
const splitStrategy = splitStrategyIndex !== -1 ? args[splitStrategyIndex + 1] : void 0;
|
|
3510
3510
|
const splitThresholdIndex = args.indexOf("--split-threshold");
|
|
@@ -3582,7 +3582,7 @@ async function buildCommand(args) {
|
|
|
3582
3582
|
if (!quiet) openapiSpinner.stop();
|
|
3583
3583
|
const schemaCount = Object.keys(openapi.components?.schemas || {}).length;
|
|
3584
3584
|
let splitEnabled = false;
|
|
3585
|
-
if (
|
|
3585
|
+
if (split && schemaCount >= splitThreshold) {
|
|
3586
3586
|
progress.verboseLog(`Schema count (${schemaCount}) >= threshold (${splitThreshold}), analyzing for auto-split...`);
|
|
3587
3587
|
const graph = buildControllerGraph(controllers);
|
|
3588
3588
|
const schemaGraph = new SchemaGraph(graph);
|
|
@@ -3622,9 +3622,9 @@ async function buildCommand(args) {
|
|
|
3622
3622
|
log(` Auto-split not needed: ${partitioning.recommendation}`);
|
|
3623
3623
|
}
|
|
3624
3624
|
}
|
|
3625
|
-
} else if (
|
|
3625
|
+
} else if (!split) {
|
|
3626
3626
|
if (!quiet) {
|
|
3627
|
-
log(` Splitting disabled (--
|
|
3627
|
+
log(` Splitting disabled (--split not specified)`);
|
|
3628
3628
|
}
|
|
3629
3629
|
} else {
|
|
3630
3630
|
if (!quiet) {
|
|
@@ -3745,12 +3745,12 @@ Commands:
|
|
|
3745
3745
|
build Generate OpenAPI and manifest from TypeScript source
|
|
3746
3746
|
clean Remove generated artifacts
|
|
3747
3747
|
|
|
3748
|
-
Options:
|
|
3748
|
+
Options:
|
|
3749
3749
|
-p <path> Path to tsconfig.json (default: ./tsconfig.json)
|
|
3750
3750
|
--output <dir> Output directory (default: .adorn)
|
|
3751
3751
|
--if-stale Only rebuild if artifacts are stale
|
|
3752
3752
|
--validation-mode <mode> Validation mode: none, ajv-runtime, precompiled (default: ajv-runtime)
|
|
3753
|
-
--
|
|
3753
|
+
--split Enable automatic schema splitting (default: disabled)
|
|
3754
3754
|
--split-strategy <mode> Override splitting strategy: controller, dependency, size, auto (default: auto)
|
|
3755
3755
|
--split-threshold <num> Schema count threshold for auto-split (default: 50)
|
|
3756
3756
|
--verbose Show detailed progress information
|
|
@@ -3761,7 +3761,7 @@ Examples:
|
|
|
3761
3761
|
adorn-api build --if-stale
|
|
3762
3762
|
adorn-api build --validation-mode precompiled
|
|
3763
3763
|
adorn-api build --verbose
|
|
3764
|
-
adorn-api build --
|
|
3764
|
+
adorn-api build --split # Enable split mode
|
|
3765
3765
|
adorn-api build --split-strategy controller # Force controller-based splitting
|
|
3766
3766
|
adorn-api build --split-threshold 100 # Increase threshold to 100
|
|
3767
3767
|
adorn-api clean
|