@ahoo-wang/fetcher-generator 3.2.9 → 3.3.1

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/index.js CHANGED
@@ -1,9 +1,8 @@
1
- import { Scope as Ae, VariableDeclarationKind as D, Project as Ce } from "ts-morph";
1
+ import { Scope as ye, VariableDeclarationKind as N, Project as xe } from "ts-morph";
2
2
  import { ContentTypeValues as I, combineURLs as E } from "@ahoo-wang/fetcher";
3
3
  import { ResourceAttributionPathSpec as L } from "@ahoo-wang/fetcher-wow";
4
- import { parse as Z } from "yaml";
5
- import { readFile as Pe } from "fs";
6
- import { posix as B } from "path";
4
+ import { parse as K } from "yaml";
5
+ import { readFile as Ae } from "fs";
7
6
  function P(n) {
8
7
  return n.$ref.split("/").pop();
9
8
  }
@@ -11,11 +10,11 @@ function S(n, e) {
11
10
  const t = P(n);
12
11
  return e.schemas?.[t];
13
12
  }
14
- function X(n, e) {
13
+ function Y(n, e) {
15
14
  const t = P(n);
16
15
  return e.requestBodies?.[t];
17
16
  }
18
- function ee(n, e) {
17
+ function Z(n, e) {
19
18
  const t = P(n);
20
19
  return e.parameters?.[t];
21
20
  }
@@ -25,14 +24,14 @@ function $(n, e) {
25
24
  schema: S(n, e)
26
25
  };
27
26
  }
28
- const $e = /[-_'\s.]+/;
27
+ const Ce = /[-_'\s.]+/;
29
28
  function O(n) {
30
- return n.split($e);
29
+ return n.split(Ce);
31
30
  }
32
- function te(n) {
33
- return Array.isArray(n) ? n.flatMap((e) => U(O(e))) : U(O(n));
31
+ function X(n) {
32
+ return Array.isArray(n) ? n.flatMap((e) => B(O(e))) : B(O(n));
34
33
  }
35
- function U(n) {
34
+ function B(n) {
36
35
  return n.flatMap((e) => {
37
36
  if (e.length === 0)
38
37
  return [];
@@ -46,7 +45,7 @@ function U(n) {
46
45
  });
47
46
  }
48
47
  function R(n) {
49
- return n === "" || n.length === 0 ? "" : te(n).filter((t) => t.length > 0).map((t) => {
48
+ return n === "" || n.length === 0 ? "" : X(n).filter((t) => t.length > 0).map((t) => {
50
49
  const o = t.charAt(0), r = t.slice(1);
51
50
  return (/[a-zA-Z]/.test(o) ? o.toUpperCase() : o) + r.toLowerCase();
52
51
  }).join("");
@@ -55,42 +54,42 @@ function f(n) {
55
54
  const e = R(n);
56
55
  return e.charAt(0).toLowerCase() + e.slice(1);
57
56
  }
58
- function ne(n) {
59
- return n === "" || Array.isArray(n) && n.length === 0 ? "" : te(n).filter((t) => t.length > 0).map((t) => t.toUpperCase()).join("_");
57
+ function ee(n) {
58
+ return n === "" || Array.isArray(n) && n.length === 0 ? "" : X(n).filter((t) => t.length > 0).map((t) => t.toUpperCase()).join("_");
60
59
  }
61
60
  function M(n) {
62
61
  return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(n) ? n : `'${n}'`;
63
62
  }
64
- function Te(n) {
65
- return /^\d+$/.test(n) ? `NUM_${n}` : M(ne(n));
63
+ function Pe(n) {
64
+ return /^\d+$/.test(n) ? `NUM_${n}` : M(ee(n));
66
65
  }
67
- function p(n) {
66
+ function g(n) {
68
67
  return !!(n && typeof n == "object" && "$ref" in n);
69
68
  }
70
69
  function G(n, e) {
71
- if (e && !p(e) && e.content)
70
+ if (e && !g(e) && e.content)
72
71
  return e.content[n]?.schema;
73
72
  }
74
- function oe(n) {
73
+ function te(n) {
75
74
  return G(I.APPLICATION_JSON, n);
76
75
  }
77
- function ve(n) {
76
+ function $e(n) {
78
77
  return G(I.TEXT_EVENT_STREAM, n);
79
78
  }
80
- function Ie(n) {
79
+ function Te(n) {
81
80
  return G("*/*", n);
82
81
  }
83
- const Ee = [
82
+ const ve = [
84
83
  "string",
85
84
  "number",
86
85
  "integer",
87
86
  "boolean",
88
87
  "null"
89
88
  ];
90
- function re(n) {
91
- return Array.isArray(n) ? !0 : Ee.includes(n);
89
+ function ne(n) {
90
+ return Array.isArray(n) ? !0 : ve.includes(n);
92
91
  }
93
- function J(n) {
92
+ function U(n) {
94
93
  return Array.isArray(n.enum) && n.enum.length > 0;
95
94
  }
96
95
  function T(n) {
@@ -99,28 +98,28 @@ function T(n) {
99
98
  function b(n) {
100
99
  return n.type === "array" && !!n.items;
101
100
  }
102
- function Se(n) {
101
+ function Ie(n) {
103
102
  return Array.isArray(n.anyOf) && n.anyOf.length > 0;
104
103
  }
105
- function Re(n) {
104
+ function Ee(n) {
106
105
  return Array.isArray(n.oneOf) && n.oneOf.length > 0;
107
106
  }
108
107
  function q(n) {
109
108
  return Array.isArray(n.allOf) && n.allOf.length > 0;
110
109
  }
111
- function Q(n) {
112
- return Se(n) || Re(n) || q(n);
110
+ function J(n) {
111
+ return Ie(n) || Ee(n) || q(n);
113
112
  }
114
- function we(n) {
113
+ function Se(n) {
115
114
  return n.includes("|") || n.includes("&") ? `(${n})[]` : `${n}[]`;
116
115
  }
117
- function Ne(n) {
116
+ function Re(n) {
118
117
  return n.type === "object" && !n.properties && n.additionalProperties !== void 0;
119
118
  }
120
- function De(n) {
119
+ function we(n) {
121
120
  return n.type !== "object" ? !1 : n.properties ? Object.keys(n.properties).length === 0 : !0;
122
121
  }
123
- function Oe(n) {
122
+ function De(n) {
124
123
  return n.readOnly === !0;
125
124
  }
126
125
  function w(n) {
@@ -140,30 +139,30 @@ function w(n) {
140
139
  return "any";
141
140
  }
142
141
  }
143
- function Me(n) {
142
+ function Ne(n) {
144
143
  if (!T(n))
145
144
  return [];
146
145
  const e = n.required || [];
147
146
  return Object.keys(n.properties).filter((t) => !e.includes(t));
148
147
  }
149
- function be(n, e) {
148
+ function Oe(n, e) {
150
149
  return n.operation.operationId && e.operation.operationId ? n.operation.operationId.localeCompare(
151
150
  e.operation.operationId
152
151
  ) : n.path && e.path ? n.path.localeCompare(e.path) : n.method && e.method ? n.method.localeCompare(e.method) : 0;
153
152
  }
154
- function ie(n) {
153
+ function oe(n) {
155
154
  const e = [];
156
155
  for (const [t, o] of Object.entries(n))
157
- se(o).forEach((r) => {
156
+ re(o).forEach((r) => {
158
157
  e.push({
159
158
  method: r.method,
160
159
  operation: r.operation,
161
160
  path: t
162
161
  });
163
162
  });
164
- return e.sort(be);
163
+ return e.sort(Oe);
165
164
  }
166
- function se(n) {
165
+ function re(n) {
167
166
  return [
168
167
  { method: "get", operation: n.get },
169
168
  { method: "put", operation: n.put },
@@ -178,53 +177,53 @@ function se(n) {
178
177
  function W(n) {
179
178
  return n.responses[200];
180
179
  }
181
- function V(n) {
180
+ function Q(n) {
182
181
  const e = W(n);
183
- return oe(e);
182
+ return te(e);
184
183
  }
185
- function qe(n, e) {
186
- return n.parameters ? n.parameters.map((t) => p(t) ? ee(t, e) : t).filter((t) => t.in === "path") : [];
184
+ function Me(n, e) {
185
+ return n.parameters ? n.parameters.map((t) => g(t) ? Z(t, e) : t).filter((t) => t.in === "path") : [];
187
186
  }
188
- const Fe = "string";
189
- function ae(n) {
190
- return !n.schema || p(n.schema) || !n.schema.type || !re(n.schema.type) ? Fe : w(n.schema.type);
187
+ const be = "string";
188
+ function ie(n) {
189
+ return !n.schema || g(n.schema) || !n.schema.type || !ne(n.schema.type) ? be : w(n.schema.type);
191
190
  }
192
- function ce(n) {
193
- return n.startsWith("http://") || n.startsWith("https://") ? je(n) : _e(n);
191
+ function se(n) {
192
+ return n.startsWith("http://") || n.startsWith("https://") ? qe(n) : Fe(n);
194
193
  }
195
- async function je(n) {
194
+ async function qe(n) {
196
195
  return await (await fetch(n)).text();
197
196
  }
198
- function _e(n) {
197
+ function Fe(n) {
199
198
  return new Promise((e, t) => {
200
- Pe(n, "utf-8", (o, r) => {
199
+ Ae(n, "utf-8", (o, r) => {
201
200
  o ? t(o) : e(r);
202
201
  });
203
202
  });
204
203
  }
205
- async function Ge(n) {
206
- const e = await ce(n);
207
- switch (pe(e)) {
204
+ async function je(n) {
205
+ const e = await se(n);
206
+ switch (ae(e)) {
208
207
  case "json":
209
208
  return JSON.parse(e);
210
209
  case "yaml":
211
- return Z(e);
210
+ return K(e);
212
211
  default:
213
212
  throw new Error(`Unsupported file format: ${n}`);
214
213
  }
215
214
  }
216
- async function We(n) {
217
- const e = await ce(n);
218
- switch (pe(e)) {
215
+ async function _e(n) {
216
+ const e = await se(n);
217
+ switch (ae(e)) {
219
218
  case "json":
220
219
  return JSON.parse(e);
221
220
  case "yaml":
222
- return Z(e);
221
+ return K(e);
223
222
  default:
224
223
  throw new Error(`Unsupported file format: ${n}`);
225
224
  }
226
225
  }
227
- function pe(n) {
226
+ function ae(n) {
228
227
  const e = n.trimStart();
229
228
  if (e.startsWith("{") || e.startsWith("["))
230
229
  return "json";
@@ -238,11 +237,11 @@ function pe(n) {
238
237
  }
239
238
  throw new Error("Unable to infer file format");
240
239
  }
241
- const ge = "types.ts", ke = "@";
242
- function ze(n) {
243
- return E(n.path, ge);
240
+ const ce = "types.ts", Ge = "@";
241
+ function We(n) {
242
+ return E(n.path, ce);
244
243
  }
245
- function ue(n, e, t) {
244
+ function ge(n, e, t) {
246
245
  const o = E(e, t), r = n.getSourceFile(o);
247
246
  return r || n.createSourceFile(o, "", {
248
247
  overwrite: !0
@@ -260,22 +259,19 @@ function A(n, e, t) {
260
259
  ) || o.addNamedImport(r);
261
260
  });
262
261
  }
263
- function H(n) {
264
- return n.split("\\").join("/");
265
- }
266
262
  function d(n, e, t) {
267
- if (t.path.startsWith(ke)) {
263
+ if (t.path.startsWith(Ge)) {
268
264
  A(n, t.path, [t.name]);
269
265
  return;
270
266
  }
271
- const o = H(n.getDirectoryPath()), r = H(e), i = B.join(r, t.path, ge);
272
- let s = B.relative(o, i);
273
- s = s.replace(/\.ts$/, ""), s.startsWith(".") || (s = "./" + s), A(n, s, [t.name]);
267
+ const o = n.getDirectoryPath(), r = (void 0)(e, t.path, ce);
268
+ let i = (void 0)(o, r);
269
+ i = i.replace(/\.ts$/, ""), i = i.split(void 0).join("/"), i.startsWith(".") || (i = "./" + i), A(n, i, [t.name]);
274
270
  }
275
- function Le(n, e, t, o) {
271
+ function ke(n, e, t, o) {
276
272
  n.path !== o.path && d(e, t, o);
277
273
  }
278
- function le(n, e = `
274
+ function pe(n, e = `
279
275
  `) {
280
276
  if (!Array.isArray(n))
281
277
  return;
@@ -285,7 +281,7 @@ function le(n, e = `
285
281
  return t.length > 0 ? t.join(e) : void 0;
286
282
  }
287
283
  function C(n, e) {
288
- const t = le(e);
284
+ const t = pe(e);
289
285
  t && n.addJsDoc(t);
290
286
  }
291
287
  function k(n, e) {
@@ -293,30 +289,30 @@ function k(n, e) {
293
289
  n.title,
294
290
  n.description
295
291
  ];
296
- return e && t.push(`- key: ${e}`), n.format && t.push(`- format: ${n.format}`), K(t, n, "default"), K(t, n, "example"), Je(t, n), Qe(t, n), Ve(t, n), t;
292
+ return e && t.push(`- key: ${e}`), n.format && t.push(`- format: ${n.format}`), V(t, n, "default"), V(t, n, "example"), Be(t, n), Ue(t, n), Je(t, n), t;
297
293
  }
298
- function Be(n, e, t) {
294
+ function ze(n, e, t) {
299
295
  const o = k(e, t);
300
296
  C(n, o);
301
297
  }
302
- function Ue(n, e, t) {
298
+ function Le(n, e, t) {
303
299
  const o = k(e, t);
304
- me(o, "schema", e), C(n, o);
300
+ ue(o, "schema", e), C(n, o);
305
301
  }
306
- function K(n, e, t) {
302
+ function V(n, e, t) {
307
303
  const o = e[t];
308
304
  if (o) {
309
305
  if (typeof o != "object") {
310
306
  n.push(`- ${t}: \`${o}\``);
311
307
  return;
312
308
  }
313
- me(n, t, o);
309
+ ue(n, t, o);
314
310
  }
315
311
  }
316
- function me(n, e, t) {
312
+ function ue(n, e, t) {
317
313
  n.push(`- ${e}: `), n.push("```json"), n.push(JSON.stringify(t, null, 2)), n.push("```");
318
314
  }
319
- function Je(n, e) {
315
+ function Be(n, e) {
320
316
  const t = ["- Numeric Constraints"];
321
317
  e.minimum !== void 0 && t.push(` - minimum: ${e.minimum}`), e.maximum !== void 0 && t.push(` - maximum: ${e.maximum}`), e.exclusiveMinimum !== void 0 && t.push(
322
318
  ` - exclusiveMinimum: ${e.exclusiveMinimum}`
@@ -324,28 +320,28 @@ function Je(n, e) {
324
320
  ` - exclusiveMaximum: ${e.exclusiveMaximum}`
325
321
  ), e.multipleOf !== void 0 && t.push(` - multipleOf: ${e.multipleOf}`), t.length !== 1 && n.push(...t);
326
322
  }
327
- function Qe(n, e) {
323
+ function Ue(n, e) {
328
324
  const t = ["- String Constraints"];
329
325
  e.minLength !== void 0 && t.push(` - minLength: ${e.minLength}`), e.maxLength !== void 0 && t.push(` - maxLength: ${e.maxLength}`), e.pattern !== void 0 && t.push(` - pattern: ${e.pattern}`), t.length !== 1 && n.push(...t);
330
326
  }
331
- function Ve(n, e) {
327
+ function Je(n, e) {
332
328
  const t = ["- Array Constraints"];
333
329
  e.minItems !== void 0 && t.push(` - minItems: ${e.minItems}`), e.maxItems !== void 0 && t.push(` - maxItems: ${e.maxItems}`), e.uniqueItems !== void 0 && t.push(` - uniqueItems: ${e.uniqueItems}`), t.length !== 1 && n.push(...t);
334
330
  }
335
- function He(n) {
331
+ function Qe(n) {
336
332
  const e = n.split(".");
337
333
  return e.length != 2 || e[0].length === 0 || e[1].length === 0 ? null : e;
338
334
  }
339
- function Ke(n) {
340
- const e = He(n.name);
335
+ function Ve(n) {
336
+ const e = Qe(n.name);
341
337
  return e ? {
342
338
  tag: n,
343
339
  contextAlias: e[0],
344
340
  aggregateName: e[1]
345
341
  } : null;
346
342
  }
347
- function Ye(n) {
348
- const e = n?.map((o) => Ke(o)).filter((o) => o !== null);
343
+ function He(n) {
344
+ const e = n?.map((o) => Ve(o)).filter((o) => o !== null);
349
345
  if (!e)
350
346
  return /* @__PURE__ */ new Map();
351
347
  const t = /* @__PURE__ */ new Map();
@@ -357,20 +353,20 @@ function Ye(n) {
357
353
  });
358
354
  }), t;
359
355
  }
360
- function Ze(n) {
356
+ function Ke(n) {
361
357
  if (!n)
362
358
  return null;
363
359
  const e = n.split(".");
364
360
  return e.length != 3 ? null : e[2];
365
361
  }
366
- const Xe = "#/components/responses/wow.CommandOk", et = "#/components/parameters/wow.id";
367
- class tt {
362
+ const Ye = "#/components/responses/wow.CommandOk", Ze = "#/components/parameters/wow.id";
363
+ class Xe {
368
364
  /**
369
365
  * Creates a new AggregateResolver instance.
370
366
  * @param openAPI - The OpenAPI specification to resolve aggregates from
371
367
  */
372
368
  constructor(e) {
373
- this.openAPI = e, this.aggregates = Ye(e.tags), this.build();
369
+ this.openAPI = e, this.aggregates = He(e.tags), this.build();
374
370
  }
375
371
  aggregates;
376
372
  /**
@@ -378,7 +374,7 @@ class tt {
378
374
  * @private
379
375
  */
380
376
  build() {
381
- const e = ie(this.openAPI.paths);
377
+ const e = oe(this.openAPI.paths);
382
378
  for (const t of e)
383
379
  this.commands(t.path, t), this.state(t.operation), this.events(t.operation), this.fields(t.operation);
384
380
  }
@@ -406,28 +402,28 @@ class tt {
406
402
  const o = t.operation;
407
403
  if (o.operationId === "wow.command.send")
408
404
  return;
409
- const r = Ze(o.operationId);
405
+ const r = Ke(o.operationId);
410
406
  if (!r)
411
407
  return;
412
408
  const i = W(o);
413
- if (!i || !p(i) || i.$ref !== Xe || !o.requestBody)
409
+ if (!i || !g(i) || i.$ref !== Ye || !o.requestBody)
414
410
  return;
415
- const s = o.parameters ?? [], a = s.filter((l) => p(l) && l.$ref === et).at(0), c = s.filter(
416
- (l) => !p(l) && l.in === "path"
411
+ const s = o.parameters ?? [], a = s.filter((l) => g(l) && l.$ref === Ze).at(0), c = s.filter(
412
+ (l) => !g(l) && l.in === "path"
417
413
  );
418
414
  if (a) {
419
- const l = ee(
415
+ const l = Z(
420
416
  a,
421
417
  this.openAPI.components
422
418
  );
423
419
  c.push(l);
424
420
  }
425
- const g = o.requestBody.content[I.APPLICATION_JSON].schema, x = $(
426
- g,
421
+ const p = o.requestBody.content[I.APPLICATION_JSON].schema, x = $(
422
+ p,
427
423
  this.openAPI.components
428
424
  );
429
425
  x.schema.title = x.schema.title || o.summary, x.schema.description = x.schema.description || o.description;
430
- const xe = {
426
+ const he = {
431
427
  name: r,
432
428
  method: t.method,
433
429
  path: e,
@@ -439,7 +435,7 @@ class tt {
439
435
  };
440
436
  o.tags?.forEach((l) => {
441
437
  const z = this.aggregates.get(l);
442
- z && z.commands.set(r, xe);
438
+ z && z.commands.set(r, he);
443
439
  });
444
440
  }
445
441
  /**
@@ -449,8 +445,8 @@ class tt {
449
445
  state(e) {
450
446
  if (!e.operationId?.endsWith(".snapshot_state.single"))
451
447
  return;
452
- const t = V(e);
453
- if (!p(t))
448
+ const t = Q(e);
449
+ if (!g(t))
454
450
  return;
455
451
  const o = $(
456
452
  t,
@@ -468,24 +464,24 @@ class tt {
468
464
  events(e) {
469
465
  if (!this.openAPI.components || !e.operationId?.endsWith(".event.list_query"))
470
466
  return;
471
- const t = V(e);
472
- if (p(t))
467
+ const t = Q(e);
468
+ if (g(t))
473
469
  return;
474
470
  const o = t?.items;
475
- if (!p(o))
471
+ if (!g(o))
476
472
  return;
477
473
  const i = S(
478
474
  o,
479
475
  this.openAPI.components
480
476
  ).properties.body.items.anyOf.map((s) => {
481
- const a = s.title, c = s.properties.name.const, u = s.properties.body, g = $(
477
+ const a = s.title, c = s.properties.name.const, u = s.properties.body, p = $(
482
478
  u,
483
479
  this.openAPI.components
484
480
  );
485
- return g.schema.title = g.schema.title || s.title, {
481
+ return p.schema.title = p.schema.title || s.title, {
486
482
  title: a,
487
483
  name: c,
488
- schema: g
484
+ schema: p
489
485
  };
490
486
  });
491
487
  e.tags?.forEach((s) => {
@@ -502,7 +498,7 @@ class tt {
502
498
  fields(e) {
503
499
  if (!this.openAPI.components || !e.operationId?.endsWith(".snapshot.count"))
504
500
  return;
505
- const o = X(
501
+ const o = Y(
506
502
  e.requestBody,
507
503
  this.openAPI.components
508
504
  ).content[I.APPLICATION_JSON].schema, i = S(
@@ -515,7 +511,7 @@ class tt {
515
511
  });
516
512
  }
517
513
  }
518
- const y = "@ahoo-wang/fetcher-wow", nt = {
514
+ const y = "@ahoo-wang/fetcher-wow", et = {
519
515
  "wow.command.CommandResult": "CommandResult",
520
516
  "wow.command.CommandResultArray": "CommandResultArray",
521
517
  "wow.MessageHeaderSqlType": "MessageHeaderSqlType",
@@ -536,6 +532,8 @@ const y = "@ahoo-wang/fetcher-wow", nt = {
536
532
  "wow.api.query.Projection": "Projection",
537
533
  "wow.api.query.Sort": "FieldSort",
538
534
  "wow.api.query.Sort.Direction": "SortDirection",
535
+ "wow.api.query.DynamicDocument": "DynamicDocument",
536
+ "wow.api.query.DynamicDocumentArray": "DynamicDocumentArray",
539
537
  "wow.command.CommandStage": "CommandStage",
540
538
  "wow.command.SimpleWaitSignal": "WaitSignal",
541
539
  "wow.configuration.Aggregate": "Aggregate",
@@ -548,7 +546,7 @@ const y = "@ahoo-wang/fetcher-wow", nt = {
548
546
  function m(n) {
549
547
  if (!n)
550
548
  return { name: "", path: "/" };
551
- const e = nt[n];
549
+ const e = et[n];
552
550
  if (e)
553
551
  return { name: e, path: y };
554
552
  const t = n.split(".");
@@ -565,24 +563,24 @@ function v(n) {
565
563
  const e = P(n);
566
564
  return m(e);
567
565
  }
568
- function N(n) {
569
- return `${ne(n)}_BOUNDED_CONTEXT_ALIAS`;
566
+ function D(n) {
567
+ return `${ee(n)}_BOUNDED_CONTEXT_ALIAS`;
570
568
  }
571
- class ot {
569
+ class tt {
572
570
  constructor(e, t, o, r) {
573
571
  this.modelInfo = e, this.sourceFile = t, this.keySchema = o, this.outputDir = r;
574
572
  }
575
573
  generate() {
576
574
  const e = this.process();
577
- e && Ue(e, this.keySchema.schema, this.keySchema.key);
575
+ e && Le(e, this.keySchema.schema, this.keySchema.key);
578
576
  }
579
577
  process() {
580
578
  const { schema: e } = this.keySchema;
581
- return J(e) ? this.processEnum(e) : T(e) ? this.processInterface(e) : b(e) ? this.processArray(e) : q(e) ? this.processIntersection(e) : Q(e) ? this.processComposition(e) : this.processTypeAlias(e);
579
+ return U(e) ? this.processEnum(e) : T(e) ? this.processInterface(e) : b(e) ? this.processArray(e) : q(e) ? this.processIntersection(e) : J(e) ? this.processComposition(e) : this.processTypeAlias(e);
582
580
  }
583
581
  resolveReference(e) {
584
582
  const t = v(e);
585
- return Le(
583
+ return ke(
586
584
  this.modelInfo,
587
585
  this.sourceFile,
588
586
  this.outputDir,
@@ -596,8 +594,8 @@ class ot {
596
594
  const { properties: t } = e;
597
595
  return Object.entries(t).map(([o, r]) => {
598
596
  const i = this.resolveType(r), s = M(o);
599
- if (!p(r)) {
600
- const a = k(r), c = le(a, `
597
+ if (!g(r)) {
598
+ const a = k(r), c = pe(a, `
601
599
  * `);
602
600
  if (c)
603
601
  return `
@@ -626,21 +624,21 @@ class ot {
626
624
  return e.additionalProperties === void 0 || e.additionalProperties === !1 || e.additionalProperties === !0 ? "any" : this.resolveType(e.additionalProperties);
627
625
  }
628
626
  resolveType(e) {
629
- if (p(e))
627
+ if (g(e))
630
628
  return this.resolveReference(e).name;
631
- if (Ne(e))
629
+ if (Re(e))
632
630
  return `Record<string,${this.resolveMapValueType(e)}>`;
633
631
  if (e.const)
634
632
  return `'${e.const}'`;
635
- if (J(e))
633
+ if (U(e))
636
634
  return e.enum.map((t) => `\`${t}\``).join(" | ");
637
- if (Q(e)) {
635
+ if (J(e)) {
638
636
  const o = (e.oneOf || e.anyOf || e.allOf || []).map((i) => this.resolveType(i)), r = q(e) ? " & " : " | ";
639
637
  return `(${o.join(r)})`;
640
638
  }
641
639
  if (b(e)) {
642
640
  const t = this.resolveType(e.items);
643
- return we(t);
641
+ return Se(t);
644
642
  }
645
643
  return e.type === "object" ? this.resolveObjectType(e) : e.type ? w(e.type) : "any";
646
644
  }
@@ -649,7 +647,7 @@ class ot {
649
647
  name: this.modelInfo.name,
650
648
  isExported: !0,
651
649
  members: e.enum.filter((t) => typeof t == "string" && t.length > 0).map((t) => ({
652
- name: Te(t),
650
+ name: Pe(t),
653
651
  initializer: `\`${t}\``
654
652
  }))
655
653
  });
@@ -660,8 +658,8 @@ class ot {
660
658
  s ? s.setType(r) : s = e.addProperty({
661
659
  name: i,
662
660
  type: r,
663
- isReadonly: Oe(o)
664
- }), Be(s, o);
661
+ isReadonly: De(o)
662
+ }), ze(s, o);
665
663
  }
666
664
  processInterface(e) {
667
665
  const t = this.sourceFile.addInterface({
@@ -699,7 +697,7 @@ class ot {
699
697
  isExported: !0
700
698
  });
701
699
  return e.allOf.forEach((o) => {
702
- if (p(o)) {
700
+ if (g(o)) {
703
701
  const r = this.resolveType(o);
704
702
  t.addExtends(r);
705
703
  return;
@@ -723,12 +721,12 @@ class ot {
723
721
  });
724
722
  }
725
723
  }
726
- class rt {
724
+ class nt {
727
725
  constructor(e) {
728
726
  this.context = e;
729
727
  }
730
728
  getOrCreateSourceFile(e) {
731
- const t = ze(e);
729
+ const t = We(e);
732
730
  return this.context.getOrCreateSourceFile(t);
733
731
  }
734
732
  /**
@@ -810,7 +808,7 @@ class rt {
810
808
  */
811
809
  generateKeyedSchema(e) {
812
810
  const t = m(e.key), o = this.getOrCreateSourceFile(t);
813
- new ot(
811
+ new tt(
814
812
  t,
815
813
  o,
816
814
  e,
@@ -820,11 +818,11 @@ class rt {
820
818
  generateBoundedContext(e) {
821
819
  const t = `${e}/boundedContext.ts`;
822
820
  this.context.logger.info(`Creating bounded context file: ${t}`);
823
- const o = this.context.getOrCreateSourceFile(t), r = N(e);
821
+ const o = this.context.getOrCreateSourceFile(t), r = D(e);
824
822
  o.addStatements(`export const ${r} = '${e}';`);
825
823
  }
826
824
  }
827
- const it = "@ahoo-wang/fetcher-decorator", st = [
825
+ const ot = "@ahoo-wang/fetcher-decorator", rt = [
828
826
  "type ApiMetadata",
829
827
  "type ApiMetadataCapable",
830
828
  "type ParameterRequest",
@@ -838,18 +836,18 @@ const it = "@ahoo-wang/fetcher-decorator", st = [
838
836
  "attribute",
839
837
  "path",
840
838
  "autoGeneratedError"
841
- ], at = {
839
+ ], it = {
842
840
  type: "Promise<Response>",
843
841
  metadata: "{resultExtractor: ResultExtractors.Response }"
844
- }, Y = {
842
+ }, H = {
845
843
  type: "Promise<string>",
846
844
  metadata: "{resultExtractor: ResultExtractors.Text }"
847
845
  }, F = `{
848
846
  headers: { Accept: ContentTypeValues.TEXT_EVENT_STREAM },
849
847
  resultExtractor: JsonEventStreamResultExtractor,
850
848
  }`;
851
- function de(n) {
852
- A(n, it, st);
849
+ function le(n) {
850
+ A(n, ot, rt);
853
851
  }
854
852
  function j(n, e, t = [], o = [], r) {
855
853
  return e.addClass({
@@ -865,36 +863,36 @@ function j(n, e, t = [], o = [], r) {
865
863
  ]
866
864
  });
867
865
  }
868
- function fe(n, e) {
866
+ function me(n, e) {
869
867
  n.addImplements("ApiMetadataCapable"), n.addConstructor({
870
868
  parameters: [
871
869
  {
872
870
  name: "apiMetadata",
873
871
  type: "ApiMetadata",
874
872
  hasQuestionToken: e === void 0,
875
- scope: Ae.Public,
873
+ scope: ye.Public,
876
874
  isReadonly: !0,
877
875
  initializer: e
878
876
  }
879
877
  ]
880
878
  });
881
879
  }
882
- const ct = "@ahoo-wang/fetcher-eventstream";
883
- function he(n) {
884
- A(n, ct, [
880
+ const st = "@ahoo-wang/fetcher-eventstream";
881
+ function de(n) {
882
+ A(n, st, [
885
883
  "JsonEventStreamResultExtractor",
886
884
  "type JsonServerSentEventStream"
887
885
  ]);
888
886
  }
889
- function pt(n) {
887
+ function at(n) {
890
888
  let e = 0, t = 0;
891
889
  return n.commands.forEach((o) => {
892
890
  o.path.startsWith(L.TENANT) && (e += 1), o.path.startsWith(L.OWNER) && (t += 1);
893
891
  }), e === 0 && t === 0 ? "ResourceAttributionPathSpec.NONE" : e > t ? "ResourceAttributionPathSpec.TENANT" : "ResourceAttributionPathSpec.OWNER";
894
892
  }
895
- function ye(n, e, t, o) {
893
+ function fe(n, e, t, o) {
896
894
  const r = `${t.contextAlias}/${t.aggregateName}/${o}.ts`;
897
- return ue(n, e, r);
895
+ return ge(n, e, r);
898
896
  }
899
897
  function h(n, e) {
900
898
  return `${R(n.aggregateName)}${e}`;
@@ -902,9 +900,9 @@ function h(n, e) {
902
900
  function _(n) {
903
901
  return n === "delete" ? "del" : n;
904
902
  }
905
- const gt = "x-fetcher-method";
906
- function ut(n, e) {
907
- const t = n[gt];
903
+ const ct = "x-fetcher-method";
904
+ function gt(n, e) {
905
+ const t = n[ct];
908
906
  if (t)
909
907
  return t;
910
908
  if (!n.operationId)
@@ -917,16 +915,16 @@ function ut(n, e) {
917
915
  }
918
916
  return f(o);
919
917
  }
920
- class lt {
918
+ class pt {
921
919
  /**
922
920
  * Creates a new ApiClientGenerator instance.
923
921
  * @param context - The generation context containing OpenAPI spec and configuration
924
922
  */
925
923
  constructor(e) {
926
- this.context = e, this.apiMetadataCtorInitializer = this.context.currentContextAlias ? `{basePath:${N(this.context.currentContextAlias)}}` : void 0;
924
+ this.context = e, this.apiMetadataCtorInitializer = this.context.currentContextAlias ? `{basePath:${D(this.context.currentContextAlias)}}` : void 0;
927
925
  }
928
926
  defaultParameterRequestType = "ParameterRequest";
929
- defaultReturnType = at;
927
+ defaultReturnType = it;
930
928
  apiMetadataCtorInitializer;
931
929
  /**
932
930
  * Generates API client classes for all valid tags in the OpenAPI specification.
@@ -983,12 +981,12 @@ class lt {
983
981
  `Generating API client class: ${o.name}ApiClient with ${t.size} operations`
984
982
  );
985
983
  const r = this.createApiClientFile(o);
986
- de(r), he(r);
984
+ le(r), de(r);
987
985
  const i = j(
988
986
  o.name + "ApiClient",
989
987
  r
990
988
  );
991
- C(i, [e.description]), fe(i, this.apiMetadataCtorInitializer), this.context.logger.info(
989
+ C(i, [e.description]), me(i, this.apiMetadataCtorInitializer), this.context.logger.info(
992
990
  `Processing ${t.size} operations for ${o.name}ApiClient`
993
991
  ), t.forEach((s) => {
994
992
  this.processOperation(e, r, i, s);
@@ -1003,7 +1001,7 @@ class lt {
1003
1001
  * @returns A unique camelCase method name
1004
1002
  */
1005
1003
  getMethodName(e, t) {
1006
- const o = ut(t, (r) => e.getMethod(r) !== void 0);
1004
+ const o = gt(t, (r) => e.getMethod(r) !== void 0);
1007
1005
  if (!o)
1008
1006
  throw new Error(
1009
1007
  `Unable to resolve method name for apiClientClass:${e.getName()}.`
@@ -1022,9 +1020,9 @@ class lt {
1022
1020
  `No request body found for operation ${t.operationId}, using default: ${this.defaultParameterRequestType}`
1023
1021
  ), this.defaultParameterRequestType;
1024
1022
  let o;
1025
- if (p(t.requestBody) ? (this.context.logger.info(
1023
+ if (g(t.requestBody) ? (this.context.logger.info(
1026
1024
  `Extracting request body from reference for operation: ${t.operationId}`
1027
- ), o = X(
1025
+ ), o = Y(
1028
1026
  t.requestBody,
1029
1027
  this.context.openAPI.components
1030
1028
  )) : o = t.requestBody, !o)
@@ -1037,7 +1035,7 @@ class lt {
1037
1035
  ), "ParameterRequest<FormData>";
1038
1036
  if (o.content["application/json"]) {
1039
1037
  const r = o.content["application/json"].schema;
1040
- if (p(r)) {
1038
+ if (g(r)) {
1041
1039
  const i = v(r);
1042
1040
  this.context.logger.info(
1043
1041
  `Adding import for request body model: ${i.name} from ${i.path}`
@@ -1060,7 +1058,7 @@ class lt {
1060
1058
  * @returns Array of parameter declarations
1061
1059
  */
1062
1060
  resolveParameters(e, t, o) {
1063
- const r = qe(
1061
+ const r = Me(
1064
1062
  o,
1065
1063
  this.context.openAPI.components
1066
1064
  ).filter((a) => !this.context.isIgnoreApiClientPathParameters(
@@ -1071,7 +1069,7 @@ class lt {
1071
1069
  `Found ${r.length} path parameters for operation ${o.operationId}`
1072
1070
  );
1073
1071
  const i = r.map((a) => {
1074
- const c = ae(a);
1072
+ const c = ie(a);
1075
1073
  return this.context.logger.info(
1076
1074
  `Adding path parameter: ${a.name} (type: ${c})`
1077
1075
  ), {
@@ -1118,7 +1116,7 @@ class lt {
1118
1116
  */
1119
1117
  resolveSchemaReturnType(e, t) {
1120
1118
  const o = "Promise<any>";
1121
- if (p(t)) {
1119
+ if (g(t)) {
1122
1120
  const r = v(t);
1123
1121
  this.context.logger.info(
1124
1122
  `Adding import for response model: ${r.name} from ${r.path}`
@@ -1130,7 +1128,7 @@ class lt {
1130
1128
  return this.context.logger.info(
1131
1129
  `Schema has no type, using default return type: ${o}`
1132
1130
  ), o;
1133
- if (re(t.type)) {
1131
+ if (ne(t.type)) {
1134
1132
  const i = `Promise<${w(t.type)}>`;
1135
1133
  return this.context.logger.info(`Resolved primitive return type: ${i}`), i;
1136
1134
  }
@@ -1150,33 +1148,33 @@ class lt {
1150
1148
  return this.context.logger.info(
1151
1149
  `No OK response found for operation ${t.operationId}, using default return type: ${this.defaultReturnType.type}`
1152
1150
  ), this.defaultReturnType;
1153
- const r = oe(o) || Ie(o);
1151
+ const r = te(o) || Te(o);
1154
1152
  if (r) {
1155
1153
  const s = this.resolveSchemaReturnType(e, r);
1156
1154
  return this.context.logger.info(
1157
1155
  `Resolved JSON/wildcard response return type for operation ${t.operationId}: ${s}`
1158
1156
  ), {
1159
1157
  type: s,
1160
- metadata: s === Y.type ? Y.metadata : void 0
1158
+ metadata: s === H.type ? H.metadata : void 0
1161
1159
  };
1162
1160
  }
1163
- const i = ve(o);
1161
+ const i = $e(o);
1164
1162
  if (i) {
1165
- if (p(i)) {
1163
+ if (g(i)) {
1166
1164
  const a = S(
1167
1165
  i,
1168
1166
  this.context.openAPI.components
1169
1167
  );
1170
- if (b(a) && p(a.items)) {
1168
+ if (b(a) && g(a.items)) {
1171
1169
  const c = v(a.items);
1172
1170
  this.context.logger.info(
1173
1171
  `Adding import for event stream model: ${c.name} from ${c.path}`
1174
1172
  ), d(e, this.context.outputDir, c);
1175
- const g = `Promise<JsonServerSentEventStream<${c.name.includes("ServerSentEvent") ? `${c.name}['data']` : c.name}>>`;
1173
+ const p = `Promise<JsonServerSentEventStream<${c.name.includes("ServerSentEvent") ? `${c.name}['data']` : c.name}>>`;
1176
1174
  return this.context.logger.info(
1177
- `Resolved event stream return type for operation ${t.operationId}: ${g}`
1175
+ `Resolved event stream return type for operation ${t.operationId}: ${p}`
1178
1176
  ), {
1179
- type: g,
1177
+ type: p,
1180
1178
  metadata: F
1181
1179
  };
1182
1180
  }
@@ -1223,7 +1221,7 @@ class lt {
1223
1221
  parameters: s,
1224
1222
  returnType: a.type,
1225
1223
  statements: [
1226
- `throw autoGeneratedError(${s.map((g) => g.name).join(",")});`
1224
+ `throw autoGeneratedError(${s.map((p) => p.name).join(",")});`
1227
1225
  ]
1228
1226
  });
1229
1227
  C(u, [
@@ -1240,7 +1238,7 @@ class lt {
1240
1238
  */
1241
1239
  groupOperations(e) {
1242
1240
  this.context.logger.info("Grouping operations by API client tags");
1243
- const t = /* @__PURE__ */ new Map(), o = ie(
1241
+ const t = /* @__PURE__ */ new Map(), o = oe(
1244
1242
  this.context.openAPI.paths
1245
1243
  ).filter((i) => {
1246
1244
  if (!i.operation.operationId)
@@ -1271,7 +1269,7 @@ class lt {
1271
1269
  );
1272
1270
  const e = /* @__PURE__ */ new Map(), t = this.context.openAPI.tags?.length || 0;
1273
1271
  for (const r of Object.values(this.context.openAPI.paths))
1274
- se(r).forEach((i) => {
1272
+ re(r).forEach((i) => {
1275
1273
  i.operation.tags?.forEach((s) => {
1276
1274
  !this.shouldIgnoreTag(s) && !e.has(s) && e.set(s, {
1277
1275
  name: s,
@@ -1296,7 +1294,7 @@ class lt {
1296
1294
  return !1;
1297
1295
  }
1298
1296
  }
1299
- class mt {
1297
+ class ut {
1300
1298
  /**
1301
1299
  * Creates a new CommandClientGenerator instance.
1302
1300
  * @param context - The generation context containing OpenAPI spec and project details
@@ -1335,7 +1333,7 @@ class mt {
1335
1333
  this.context.logger.info(
1336
1334
  `Processing command client for aggregate: ${e.aggregate.aggregateName} in context: ${e.aggregate.contextAlias}`
1337
1335
  );
1338
- const t = ye(
1336
+ const t = fe(
1339
1337
  this.context.project,
1340
1338
  this.context.outputDir,
1341
1339
  e.aggregate,
@@ -1351,13 +1349,13 @@ class mt {
1351
1349
  this.processCommandTypes(t, e), this.context.logger.info(
1352
1350
  `Creating default command client options: ${this.defaultCommandClientOptionsName}`
1353
1351
  ), t.addVariableStatement({
1354
- declarationKind: D.Const,
1352
+ declarationKind: N.Const,
1355
1353
  declarations: [
1356
1354
  {
1357
1355
  name: this.defaultCommandClientOptionsName,
1358
1356
  type: "ApiMetadata",
1359
1357
  initializer: `{
1360
- basePath: ${N(e.aggregate.contextAlias)}
1358
+ basePath: ${D(e.aggregate.contextAlias)}
1361
1359
  }`
1362
1360
  }
1363
1361
  ],
@@ -1377,11 +1375,11 @@ class mt {
1377
1375
  isTypeOnly: !0
1378
1376
  }), this.context.logger.info(
1379
1377
  "Adding import from @ahoo-wang/fetcher-eventstream: JsonEventStreamResultExtractor"
1380
- ), he(t), this.context.logger.info(
1378
+ ), de(t), this.context.logger.info(
1381
1379
  "Adding import from @ahoo-wang/fetcher: ContentTypeValues"
1382
1380
  ), A(t, "@ahoo-wang/fetcher", ["ContentTypeValues"]), this.context.logger.info(
1383
1381
  "Adding imports from @ahoo-wang/fetcher-decorator: ApiMetadata types and decorators"
1384
- ), de(t), this.context.logger.info("Generating standard command client class"), this.processCommandClient(
1382
+ ), le(t), this.context.logger.info("Generating standard command client class"), this.processCommandClient(
1385
1383
  t,
1386
1384
  e,
1387
1385
  o
@@ -1424,7 +1422,7 @@ class mt {
1424
1422
  return;
1425
1423
  d(e, this.context.outputDir, o);
1426
1424
  let i = `${o.name}`;
1427
- const s = Me(t.schema.schema).map((a) => `'${a}'`).join(" | ");
1425
+ const s = Ne(t.schema.schema).map((a) => `'${a}'`).join(" | ");
1428
1426
  s !== "" && (i = `PartialBy<${i},${s}>`), i = `CommandBody<${i}>`, e.addTypeAlias({
1429
1427
  name: r,
1430
1428
  type: `${i}`,
@@ -1449,7 +1447,7 @@ class mt {
1449
1447
  [],
1450
1448
  ["R = CommandResult"]
1451
1449
  );
1452
- fe(i, this.defaultCommandClientOptionsName), t.commands.forEach((s) => {
1450
+ me(i, this.defaultCommandClientOptionsName), t.commands.forEach((s) => {
1453
1451
  this.processCommandMethod(
1454
1452
  t,
1455
1453
  i,
@@ -1492,7 +1490,7 @@ class mt {
1492
1490
  e.name,
1493
1491
  s.name
1494
1492
  )).map((s) => {
1495
- const a = ae(s);
1493
+ const a = ie(s);
1496
1494
  return this.context.logger.info(
1497
1495
  `Adding path parameter: ${s.name} (type: ${a})`
1498
1496
  ), {
@@ -1511,7 +1509,7 @@ class mt {
1511
1509
  `Adding command request parameter: commandRequest (type: CommandRequest<${r}>)`
1512
1510
  ), i.push({
1513
1511
  name: "commandRequest",
1514
- hasQuestionToken: De(t.schema.schema),
1512
+ hasQuestionToken: we(t.schema.schema),
1515
1513
  type: `CommandRequest<${r}>`,
1516
1514
  decorators: [
1517
1515
  {
@@ -1568,7 +1566,7 @@ class mt {
1568
1566
  );
1569
1567
  }
1570
1568
  }
1571
- class dt {
1569
+ class lt {
1572
1570
  /**
1573
1571
  * Creates a new QueryClientGenerator instance.
1574
1572
  * @param context - The generation context containing OpenAPI spec and project details
@@ -1606,7 +1604,7 @@ class dt {
1606
1604
  * @returns The source file for the client
1607
1605
  */
1608
1606
  createClientFilePath(e, t) {
1609
- return ye(
1607
+ return fe(
1610
1608
  this.context.project,
1611
1609
  this.context.outputDir,
1612
1610
  e,
@@ -1638,15 +1636,15 @@ class dt {
1638
1636
  this.context.logger.info(
1639
1637
  `Creating default query client options: ${o}`
1640
1638
  ), t.addVariableStatement({
1641
- declarationKind: D.Const,
1639
+ declarationKind: N.Const,
1642
1640
  declarations: [
1643
1641
  {
1644
1642
  name: o,
1645
1643
  type: "QueryClientOptions",
1646
1644
  initializer: `{
1647
- contextAlias: ${N(e.aggregate.contextAlias)},
1645
+ contextAlias: ${D(e.aggregate.contextAlias)},
1648
1646
  aggregateName: '${e.aggregate.aggregateName}',
1649
- resourceAttribution: ${pt(e)},
1647
+ resourceAttribution: ${at(e)},
1650
1648
  }`
1651
1649
  }
1652
1650
  ],
@@ -1663,7 +1661,7 @@ class dt {
1663
1661
  ), d(t, this.context.outputDir, a), this.context.logger.info(
1664
1662
  `Creating query client factory: ${i}`
1665
1663
  ), t.addVariableStatement({
1666
- declarationKind: D.Const,
1664
+ declarationKind: N.Const,
1667
1665
  declarations: [
1668
1666
  {
1669
1667
  name: i,
@@ -1717,13 +1715,13 @@ class dt {
1717
1715
  });
1718
1716
  }
1719
1717
  }
1720
- class ft {
1718
+ class mt {
1721
1719
  /**
1722
1720
  * Creates a new ClientGenerator instance.
1723
1721
  * @param context - The generation context containing OpenAPI spec and project details
1724
1722
  */
1725
1723
  constructor(e) {
1726
- this.context = e, this.queryClientGenerator = new dt(e), this.commandClientGenerator = new mt(e), this.apiClientGenerator = new lt(e);
1724
+ this.context = e, this.queryClientGenerator = new lt(e), this.commandClientGenerator = new ut(e), this.apiClientGenerator = new pt(e);
1727
1725
  }
1728
1726
  queryClientGenerator;
1729
1727
  commandClientGenerator;
@@ -1746,7 +1744,7 @@ class ft {
1746
1744
  this.queryClientGenerator.generate(), this.commandClientGenerator.generate(), this.apiClientGenerator.generate(), this.context.logger.success("Client generation completed");
1747
1745
  }
1748
1746
  }
1749
- class ht {
1747
+ class dt {
1750
1748
  /** The ts-morph project instance used for code generation */
1751
1749
  project;
1752
1750
  /** The OpenAPI specification object */
@@ -1764,7 +1762,7 @@ class ht {
1764
1762
  this.project = e.project, this.openAPI = e.openAPI, this.outputDir = e.outputDir, this.contextAggregates = e.contextAggregates, this.logger = e.logger, this.config = e.config ?? {}, this.currentContextAlias = this.openAPI.info["x-wow-context-alias"];
1765
1763
  }
1766
1764
  getOrCreateSourceFile(e) {
1767
- return ue(this.project, this.outputDir, e);
1765
+ return ge(this.project, this.outputDir, e);
1768
1766
  }
1769
1767
  isIgnoreApiClientPathParameters(e, t) {
1770
1768
  return (this.config.apiClients?.[e]?.ignorePathParameters ?? this.defaultIgnorePathParameters).includes(t);
@@ -1773,8 +1771,8 @@ class ht {
1773
1771
  return this.defaultIgnorePathParameters.includes(t);
1774
1772
  }
1775
1773
  }
1776
- const yt = "./fetcher-generator.config.json";
1777
- class vt {
1774
+ const ft = "./fetcher-generator.config.json";
1775
+ class Pt {
1778
1776
  /**
1779
1777
  * Creates a new CodeGenerator instance with the specified options.
1780
1778
  *
@@ -1782,7 +1780,7 @@ class vt {
1782
1780
  * @throws Error if the project initialization fails due to invalid TypeScript configuration or missing files.
1783
1781
  */
1784
1782
  constructor(e) {
1785
- this.options = e, this.project = new Ce(e), this.options.logger.info(
1783
+ this.options = e, this.project = new xe(e), this.options.logger.info(
1786
1784
  `Project instance created with tsConfigFilePath: ${this.options.tsConfigFilePath}`
1787
1785
  );
1788
1786
  }
@@ -1810,20 +1808,20 @@ class vt {
1810
1808
  this.options.logger.info(
1811
1809
  "Starting code generation from OpenAPI specification"
1812
1810
  ), this.options.logger.info(`Input path: ${this.options.inputPath}`), this.options.logger.info(`Output directory: ${this.options.outputDir}`), this.options.logger.info("Parsing OpenAPI specification");
1813
- const e = await Ge(this.options.inputPath);
1811
+ const e = await je(this.options.inputPath);
1814
1812
  this.options.logger.info("OpenAPI specification parsed successfully"), this.options.logger.info("Resolving bounded context aggregates");
1815
- const o = new tt(e).resolve();
1813
+ const o = new Xe(e).resolve();
1816
1814
  this.options.logger.info(
1817
1815
  `Resolved ${o.size} bounded context aggregates`
1818
1816
  );
1819
- const r = this.options.configPath ?? yt;
1817
+ const r = this.options.configPath ?? ft;
1820
1818
  let i = {};
1821
1819
  try {
1822
- this.options.logger.info(`Parsing configuration file: ${r}`), i = await We(r);
1823
- } catch (g) {
1824
- this.options.logger.info(`Configuration file parsing failed: ${g}`);
1820
+ this.options.logger.info(`Parsing configuration file: ${r}`), i = await _e(r);
1821
+ } catch (p) {
1822
+ this.options.logger.info(`Configuration file parsing failed: ${p}`);
1825
1823
  }
1826
- const s = new ht({
1824
+ const s = new dt({
1827
1825
  openAPI: e,
1828
1826
  project: this.project,
1829
1827
  outputDir: this.options.outputDir,
@@ -1831,7 +1829,7 @@ class vt {
1831
1829
  logger: this.options.logger,
1832
1830
  config: i
1833
1831
  });
1834
- this.options.logger.info("Generating models"), new rt(s).generate(), this.options.logger.info("Models generated successfully"), this.options.logger.info("Generating clients"), new ft(s).generate(), this.options.logger.info("Clients generated successfully");
1832
+ this.options.logger.info("Generating models"), new nt(s).generate(), this.options.logger.info("Models generated successfully"), this.options.logger.info("Generating clients"), new mt(s).generate(), this.options.logger.info("Clients generated successfully");
1835
1833
  const u = this.project.getDirectory(this.options.outputDir);
1836
1834
  if (!u) {
1837
1835
  this.options.logger.info("Output directory not found.");
@@ -1928,7 +1926,7 @@ class vt {
1928
1926
  }
1929
1927
  }
1930
1928
  export {
1931
- vt as CodeGenerator,
1932
- yt as DEFAULT_CONFIG_PATH
1929
+ Pt as CodeGenerator,
1930
+ ft as DEFAULT_CONFIG_PATH
1933
1931
  };
1934
1932
  //# sourceMappingURL=index.js.map