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.cjs
CHANGED
|
@@ -2868,7 +2868,7 @@ function partitionSchemas(schemas, graph, schemaGraph, config = {}) {
|
|
|
2868
2868
|
complexity: totalComplexity,
|
|
2869
2869
|
dependencies: []
|
|
2870
2870
|
}];
|
|
2871
|
-
recommendation = recommendation || "Single file mode (--
|
|
2871
|
+
recommendation = recommendation || "Single file mode (--split not specified)";
|
|
2872
2872
|
} else if (strategy === "controller") {
|
|
2873
2873
|
groups = partitionByController(schemas, graph, finalConfig);
|
|
2874
2874
|
} else if (strategy === "dependency") {
|
|
@@ -3523,7 +3523,7 @@ async function buildCommand(args) {
|
|
|
3523
3523
|
const validationMode = validationModeIndex !== -1 ? args[validationModeIndex + 1] : "ajv-runtime";
|
|
3524
3524
|
const verbose = args.includes("--verbose");
|
|
3525
3525
|
const quiet = args.includes("--quiet");
|
|
3526
|
-
const
|
|
3526
|
+
const split = args.includes("--split");
|
|
3527
3527
|
const splitStrategyIndex = args.indexOf("--split-strategy");
|
|
3528
3528
|
const splitStrategy = splitStrategyIndex !== -1 ? args[splitStrategyIndex + 1] : void 0;
|
|
3529
3529
|
const splitThresholdIndex = args.indexOf("--split-threshold");
|
|
@@ -3601,7 +3601,7 @@ async function buildCommand(args) {
|
|
|
3601
3601
|
if (!quiet) openapiSpinner.stop();
|
|
3602
3602
|
const schemaCount = Object.keys(openapi.components?.schemas || {}).length;
|
|
3603
3603
|
let splitEnabled = false;
|
|
3604
|
-
if (
|
|
3604
|
+
if (split && schemaCount >= splitThreshold) {
|
|
3605
3605
|
progress.verboseLog(`Schema count (${schemaCount}) >= threshold (${splitThreshold}), analyzing for auto-split...`);
|
|
3606
3606
|
const graph = buildControllerGraph(controllers);
|
|
3607
3607
|
const schemaGraph = new SchemaGraph(graph);
|
|
@@ -3641,9 +3641,9 @@ async function buildCommand(args) {
|
|
|
3641
3641
|
log(` Auto-split not needed: ${partitioning.recommendation}`);
|
|
3642
3642
|
}
|
|
3643
3643
|
}
|
|
3644
|
-
} else if (
|
|
3644
|
+
} else if (!split) {
|
|
3645
3645
|
if (!quiet) {
|
|
3646
|
-
log(` Splitting disabled (--
|
|
3646
|
+
log(` Splitting disabled (--split not specified)`);
|
|
3647
3647
|
}
|
|
3648
3648
|
} else {
|
|
3649
3649
|
if (!quiet) {
|
|
@@ -3764,12 +3764,12 @@ Commands:
|
|
|
3764
3764
|
build Generate OpenAPI and manifest from TypeScript source
|
|
3765
3765
|
clean Remove generated artifacts
|
|
3766
3766
|
|
|
3767
|
-
Options:
|
|
3767
|
+
Options:
|
|
3768
3768
|
-p <path> Path to tsconfig.json (default: ./tsconfig.json)
|
|
3769
3769
|
--output <dir> Output directory (default: .adorn)
|
|
3770
3770
|
--if-stale Only rebuild if artifacts are stale
|
|
3771
3771
|
--validation-mode <mode> Validation mode: none, ajv-runtime, precompiled (default: ajv-runtime)
|
|
3772
|
-
--
|
|
3772
|
+
--split Enable automatic schema splitting (default: disabled)
|
|
3773
3773
|
--split-strategy <mode> Override splitting strategy: controller, dependency, size, auto (default: auto)
|
|
3774
3774
|
--split-threshold <num> Schema count threshold for auto-split (default: 50)
|
|
3775
3775
|
--verbose Show detailed progress information
|
|
@@ -3780,7 +3780,7 @@ Examples:
|
|
|
3780
3780
|
adorn-api build --if-stale
|
|
3781
3781
|
adorn-api build --validation-mode precompiled
|
|
3782
3782
|
adorn-api build --verbose
|
|
3783
|
-
adorn-api build --
|
|
3783
|
+
adorn-api build --split # Enable split mode
|
|
3784
3784
|
adorn-api build --split-strategy controller # Force controller-based splitting
|
|
3785
3785
|
adorn-api build --split-threshold 100 # Increase threshold to 100
|
|
3786
3786
|
adorn-api clean
|