mulink 1.2.0 → 1.2.2
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/.tsbuildinfo +1 -1
- package/dist/lib/{chunk-IAS3P4RF.cjs → chunk-H3NAQ2H4.cjs} +28 -17
- package/dist/lib/chunk-H3NAQ2H4.cjs.map +1 -0
- package/dist/lib/{chunk-BMHPB646.js → chunk-NXP26AJR.js} +28 -17
- package/dist/lib/chunk-NXP26AJR.js.map +1 -0
- package/dist/lib/cli.cjs +16 -16
- package/dist/lib/cli.js +1 -1
- package/dist/lib/client.cjs +18 -18
- package/dist/lib/client.js +2 -2
- package/dist/lib/index.cjs +32 -32
- package/dist/lib/index.js +2 -2
- package/package.json +1 -1
- package/dist/lib/chunk-BMHPB646.js.map +0 -1
- package/dist/lib/chunk-IAS3P4RF.cjs.map +0 -1
|
@@ -2639,17 +2639,21 @@ var SchemaGenerator = class {
|
|
|
2639
2639
|
otherSchemas.push(schema);
|
|
2640
2640
|
}
|
|
2641
2641
|
}
|
|
2642
|
+
const schemaNameToPascalCase = /* @__PURE__ */ new Map();
|
|
2642
2643
|
for (const schema of [...enumSchemas, ...otherSchemas]) {
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2644
|
+
const pascalName = toPascalCase(schema.name);
|
|
2645
|
+
if (!schemaMap.has(pascalName)) {
|
|
2646
|
+
schemaMap.set(pascalName, schema);
|
|
2647
|
+
dependencyGraph.set(pascalName, /* @__PURE__ */ new Set());
|
|
2648
|
+
schemaNameToPascalCase.set(schema.name, pascalName);
|
|
2646
2649
|
}
|
|
2647
2650
|
}
|
|
2648
2651
|
for (const schema of [...enumSchemas, ...otherSchemas]) {
|
|
2652
|
+
const schemaPascalName = toPascalCase(schema.name);
|
|
2649
2653
|
const dependencies = this.findSchemaDependencies(schema);
|
|
2650
2654
|
for (const dep of dependencies) {
|
|
2651
2655
|
if (schemaMap.has(dep)) {
|
|
2652
|
-
dependencyGraph.get(
|
|
2656
|
+
dependencyGraph.get(schemaPascalName).add(dep);
|
|
2653
2657
|
}
|
|
2654
2658
|
}
|
|
2655
2659
|
}
|
|
@@ -2676,13 +2680,15 @@ var SchemaGenerator = class {
|
|
|
2676
2680
|
visited.add(schemaName);
|
|
2677
2681
|
}, "visit");
|
|
2678
2682
|
for (const schema of enumSchemas) {
|
|
2679
|
-
|
|
2680
|
-
|
|
2683
|
+
const schemaPascalName = toPascalCase(schema.name);
|
|
2684
|
+
if (!visited.has(schemaPascalName)) {
|
|
2685
|
+
visit(schemaPascalName);
|
|
2681
2686
|
}
|
|
2682
2687
|
}
|
|
2683
2688
|
for (const schema of otherSchemas) {
|
|
2684
|
-
|
|
2685
|
-
|
|
2689
|
+
const schemaPascalName = toPascalCase(schema.name);
|
|
2690
|
+
if (!visited.has(schemaPascalName)) {
|
|
2691
|
+
visit(schemaPascalName);
|
|
2686
2692
|
}
|
|
2687
2693
|
}
|
|
2688
2694
|
return result;
|
|
@@ -2702,14 +2708,16 @@ var SchemaGenerator = class {
|
|
|
2702
2708
|
}
|
|
2703
2709
|
return dependencies;
|
|
2704
2710
|
}
|
|
2705
|
-
extractDependenciesFromDefinition(definition) {
|
|
2711
|
+
extractDependenciesFromDefinition(definition, exportName) {
|
|
2706
2712
|
const dependencies = [];
|
|
2707
2713
|
const schemaRefRegex = /([A-Z][a-zA-Z0-9]*Schema)\b/g;
|
|
2708
2714
|
const matches = definition.matchAll(schemaRefRegex);
|
|
2715
|
+
const selfBaseName = exportName.replace(/Schema$/, "");
|
|
2709
2716
|
for (const match of matches) {
|
|
2710
2717
|
const schemaName = match[1];
|
|
2711
2718
|
if (!schemaName) continue;
|
|
2712
2719
|
const baseName = schemaName.replace(/Schema$/, "");
|
|
2720
|
+
if (baseName === selfBaseName) continue;
|
|
2713
2721
|
if (!dependencies.includes(baseName)) {
|
|
2714
2722
|
dependencies.push(baseName);
|
|
2715
2723
|
}
|
|
@@ -2761,9 +2769,10 @@ var SchemaGenerator = class {
|
|
|
2761
2769
|
if (def._schemaRef) {
|
|
2762
2770
|
const refName = def._schemaRef;
|
|
2763
2771
|
const baseName = refName.replace(/Schema$/, "");
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2772
|
+
const normalizedName = toPascalCase(baseName);
|
|
2773
|
+
if (!dependencies.includes(normalizedName) && !visited.has(normalizedName)) {
|
|
2774
|
+
dependencies.push(normalizedName);
|
|
2775
|
+
visited.add(normalizedName);
|
|
2767
2776
|
}
|
|
2768
2777
|
return;
|
|
2769
2778
|
}
|
|
@@ -2819,8 +2828,10 @@ var SchemaGenerator = class {
|
|
|
2819
2828
|
const orderedSchemas = this.orderSchemasByDependencies(schemas);
|
|
2820
2829
|
for (const schema of orderedSchemas) {
|
|
2821
2830
|
const { definition, exportName } = this.generateSchemaDefinition(schema);
|
|
2822
|
-
const
|
|
2823
|
-
|
|
2831
|
+
const zodDependencies = this.findSchemaDependencies(schema);
|
|
2832
|
+
const stringDependencies = this.extractDependenciesFromDefinition(definition, exportName);
|
|
2833
|
+
const allDependencies = [.../* @__PURE__ */ new Set([...zodDependencies, ...stringDependencies])];
|
|
2834
|
+
allSchemaDefinitions.push({ definition, exportName, dependencies: allDependencies });
|
|
2824
2835
|
schemaExports.push(exportName);
|
|
2825
2836
|
}
|
|
2826
2837
|
for (const endpoint of endpoints) {
|
|
@@ -2829,7 +2840,7 @@ var SchemaGenerator = class {
|
|
|
2829
2840
|
const definition = endpointSchemas.definitions[i];
|
|
2830
2841
|
const exportName = endpointSchemas.exports[i];
|
|
2831
2842
|
if (!definition || !exportName) continue;
|
|
2832
|
-
const dependencies = this.extractDependenciesFromDefinition(definition);
|
|
2843
|
+
const dependencies = this.extractDependenciesFromDefinition(definition, exportName);
|
|
2833
2844
|
allSchemaDefinitions.push({ definition, exportName, dependencies });
|
|
2834
2845
|
schemaExports.push(exportName);
|
|
2835
2846
|
}
|
|
@@ -10049,5 +10060,5 @@ ${errorMessages}`,
|
|
|
10049
10060
|
};
|
|
10050
10061
|
|
|
10051
10062
|
export { BridgeCore, BridgeError, BridgeLogger, ConfigurationLoader, FileSystemManager, GenerationError, LogLevel, NextJsCodeGenerator, OpenApiSchemaParser, SchemaParseError, ValidationError, VersionChecker, __name, checkAndNotifyUpdates, createBridgeVersionChecker };
|
|
10052
|
-
//# sourceMappingURL=chunk-
|
|
10053
|
-
//# sourceMappingURL=chunk-
|
|
10063
|
+
//# sourceMappingURL=chunk-NXP26AJR.js.map
|
|
10064
|
+
//# sourceMappingURL=chunk-NXP26AJR.js.map
|