swagger-typescript-api 13.6.6 → 13.6.7
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 +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-B-lBUhqS.mjs → src--O_oZouc.mjs} +8 -14
- package/dist/src--O_oZouc.mjs.map +1 -0
- package/dist/{src-BROE-dEG.cjs → src-CUhSthD5.cjs} +8 -14
- package/dist/src-CUhSthD5.cjs.map +1 -0
- package/package.json +3 -3
- package/dist/src-B-lBUhqS.mjs.map +0 -1
- package/dist/src-BROE-dEG.cjs.map +0 -1
package/dist/cli.cjs
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as version, l as description, n as generateTemplates, o as CodeGenConfig, r as TemplatesGenConfig, s as HTTP_CLIENT, t as generateApi, u as name } from "./src
|
|
2
|
+
import { d as version, l as description, n as generateTemplates, o as CodeGenConfig, r as TemplatesGenConfig, s as HTTP_CLIENT, t as generateApi, u as name } from "./src--O_oZouc.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import { loadConfig } from "c12";
|
|
5
5
|
import { defineCommand, runMain } from "citty";
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-CUhSthD5.cjs");
|
|
3
3
|
exports.RequestContentKind = require_src.RequestContentKind;
|
|
4
4
|
exports.SCHEMA_TYPES = require_src.SCHEMA_TYPES;
|
|
5
5
|
Object.defineProperty(exports, "constants", {
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SCHEMA_TYPES, c as constants_exports, i as RequestContentKind, n as generateTemplates, t as generateApi } from "./src
|
|
1
|
+
import { a as SCHEMA_TYPES, c as constants_exports, i as RequestContentKind, n as generateTemplates, t as generateApi } from "./src--O_oZouc.mjs";
|
|
2
2
|
export { RequestContentKind, SCHEMA_TYPES, constants_exports as constants, generateApi, generateTemplates };
|
|
@@ -143,12 +143,6 @@ var NameResolver = class {
|
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
145
|
//#endregion
|
|
146
|
-
//#region src/util/random.ts
|
|
147
|
-
const getRandomInt = (min = 0, max = 1) => {
|
|
148
|
-
if (min === max) return min;
|
|
149
|
-
return Math.round(Math.random() * (max - min) + min);
|
|
150
|
-
};
|
|
151
|
-
//#endregion
|
|
152
146
|
//#region src/component-type-name-resolver.ts
|
|
153
147
|
var ComponentTypeNameResolver = class extends NameResolver {
|
|
154
148
|
counter = 1;
|
|
@@ -156,12 +150,12 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
156
150
|
countersByVariant = /* @__PURE__ */ new Map();
|
|
157
151
|
constructor(config, reservedNames) {
|
|
158
152
|
super(config, reservedNames, (variants) => {
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
if (!this.countersByVariant.has(
|
|
162
|
-
const variantCounter = this.countersByVariant.get(
|
|
163
|
-
this.countersByVariant.set(
|
|
164
|
-
const dirtyResolvedName = `${
|
|
153
|
+
const baseVariant = uniq(compact(variants)).sort((a, b) => a.localeCompare(b))[0];
|
|
154
|
+
if (baseVariant) {
|
|
155
|
+
if (!this.countersByVariant.has(baseVariant)) this.countersByVariant.set(baseVariant, 0);
|
|
156
|
+
const variantCounter = this.countersByVariant.get(baseVariant) + 1;
|
|
157
|
+
this.countersByVariant.set(baseVariant, variantCounter);
|
|
158
|
+
const dirtyResolvedName = `${baseVariant}${variantCounter}`;
|
|
165
159
|
consola$1.debug("generated dirty resolved type name for component - ", dirtyResolvedName);
|
|
166
160
|
return dirtyResolvedName;
|
|
167
161
|
}
|
|
@@ -174,7 +168,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
174
168
|
//#endregion
|
|
175
169
|
//#region package.json
|
|
176
170
|
var name = "swagger-typescript-api";
|
|
177
|
-
var version = "13.6.
|
|
171
|
+
var version = "13.6.7";
|
|
178
172
|
var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
|
|
179
173
|
//#endregion
|
|
180
174
|
//#region src/constants.ts
|
|
@@ -3596,4 +3590,4 @@ async function generateApi(config) {
|
|
|
3596
3590
|
//#endregion
|
|
3597
3591
|
export { SCHEMA_TYPES as a, constants_exports as c, version as d, RequestContentKind as i, description as l, generateTemplates as n, CodeGenConfig as o, TemplatesGenConfig as r, HTTP_CLIENT as s, generateApi as t, name as u };
|
|
3598
3592
|
|
|
3599
|
-
//# sourceMappingURL=src
|
|
3593
|
+
//# sourceMappingURL=src--O_oZouc.mjs.map
|