fern-api 0.39.1 → 0.39.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.
Files changed (2) hide show
  1. package/bundle.cjs +539 -522
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -471535,10 +471535,10 @@ var require_HttpMethod4 = __commonJS({
471535
471535
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
471536
471536
  var HttpMethod_exports = {};
471537
471537
  __export2(HttpMethod_exports, {
471538
- HttpMethod: () => HttpMethod7
471538
+ HttpMethod: () => HttpMethod6
471539
471539
  });
471540
471540
  module2.exports = __toCommonJS(HttpMethod_exports);
471541
- var HttpMethod7 = {
471541
+ var HttpMethod6 = {
471542
471542
  Get: "GET",
471543
471543
  Post: "POST",
471544
471544
  Put: "PUT",
@@ -471546,21 +471546,21 @@ var require_HttpMethod4 = __commonJS({
471546
471546
  Delete: "DELETE",
471547
471547
  _visit: (value, visitor) => {
471548
471548
  switch (value) {
471549
- case HttpMethod7.Get:
471549
+ case HttpMethod6.Get:
471550
471550
  return visitor.get();
471551
- case HttpMethod7.Post:
471551
+ case HttpMethod6.Post:
471552
471552
  return visitor.post();
471553
- case HttpMethod7.Put:
471553
+ case HttpMethod6.Put:
471554
471554
  return visitor.put();
471555
- case HttpMethod7.Patch:
471555
+ case HttpMethod6.Patch:
471556
471556
  return visitor.patch();
471557
- case HttpMethod7.Delete:
471557
+ case HttpMethod6.Delete:
471558
471558
  return visitor.delete();
471559
471559
  default:
471560
471560
  return visitor._unknown();
471561
471561
  }
471562
471562
  },
471563
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
471563
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
471564
471564
  };
471565
471565
  }
471566
471566
  });
@@ -474509,10 +474509,10 @@ var require_HttpMethod5 = __commonJS({
474509
474509
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
474510
474510
  var HttpMethod_exports = {};
474511
474511
  __export2(HttpMethod_exports, {
474512
- HttpMethod: () => HttpMethod7
474512
+ HttpMethod: () => HttpMethod6
474513
474513
  });
474514
474514
  module2.exports = __toCommonJS(HttpMethod_exports);
474515
- var HttpMethod7 = {
474515
+ var HttpMethod6 = {
474516
474516
  Get: "GET",
474517
474517
  Post: "POST",
474518
474518
  Put: "PUT",
@@ -474520,21 +474520,21 @@ var require_HttpMethod5 = __commonJS({
474520
474520
  Delete: "DELETE",
474521
474521
  _visit: (value, visitor) => {
474522
474522
  switch (value) {
474523
- case HttpMethod7.Get:
474523
+ case HttpMethod6.Get:
474524
474524
  return visitor.get();
474525
- case HttpMethod7.Post:
474525
+ case HttpMethod6.Post:
474526
474526
  return visitor.post();
474527
- case HttpMethod7.Put:
474527
+ case HttpMethod6.Put:
474528
474528
  return visitor.put();
474529
- case HttpMethod7.Patch:
474529
+ case HttpMethod6.Patch:
474530
474530
  return visitor.patch();
474531
- case HttpMethod7.Delete:
474531
+ case HttpMethod6.Delete:
474532
474532
  return visitor.delete();
474533
474533
  default:
474534
474534
  return visitor._unknown();
474535
474535
  }
474536
474536
  },
474537
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
474537
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
474538
474538
  };
474539
474539
  }
474540
474540
  });
@@ -478056,10 +478056,10 @@ var require_HttpMethod6 = __commonJS({
478056
478056
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
478057
478057
  var HttpMethod_exports = {};
478058
478058
  __export2(HttpMethod_exports, {
478059
- HttpMethod: () => HttpMethod7
478059
+ HttpMethod: () => HttpMethod6
478060
478060
  });
478061
478061
  module2.exports = __toCommonJS(HttpMethod_exports);
478062
- var HttpMethod7 = {
478062
+ var HttpMethod6 = {
478063
478063
  Get: "GET",
478064
478064
  Post: "POST",
478065
478065
  Put: "PUT",
@@ -478067,21 +478067,21 @@ var require_HttpMethod6 = __commonJS({
478067
478067
  Delete: "DELETE",
478068
478068
  _visit: (value, visitor) => {
478069
478069
  switch (value) {
478070
- case HttpMethod7.Get:
478070
+ case HttpMethod6.Get:
478071
478071
  return visitor.get();
478072
- case HttpMethod7.Post:
478072
+ case HttpMethod6.Post:
478073
478073
  return visitor.post();
478074
- case HttpMethod7.Put:
478074
+ case HttpMethod6.Put:
478075
478075
  return visitor.put();
478076
- case HttpMethod7.Patch:
478076
+ case HttpMethod6.Patch:
478077
478077
  return visitor.patch();
478078
- case HttpMethod7.Delete:
478078
+ case HttpMethod6.Delete:
478079
478079
  return visitor.delete();
478080
478080
  default:
478081
478081
  return visitor._unknown();
478082
478082
  }
478083
478083
  },
478084
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
478084
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
478085
478085
  };
478086
478086
  }
478087
478087
  });
@@ -481603,10 +481603,10 @@ var require_HttpMethod7 = __commonJS({
481603
481603
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
481604
481604
  var HttpMethod_exports = {};
481605
481605
  __export2(HttpMethod_exports, {
481606
- HttpMethod: () => HttpMethod7
481606
+ HttpMethod: () => HttpMethod6
481607
481607
  });
481608
481608
  module2.exports = __toCommonJS(HttpMethod_exports);
481609
- var HttpMethod7 = {
481609
+ var HttpMethod6 = {
481610
481610
  Get: "GET",
481611
481611
  Post: "POST",
481612
481612
  Put: "PUT",
@@ -481614,21 +481614,21 @@ var require_HttpMethod7 = __commonJS({
481614
481614
  Delete: "DELETE",
481615
481615
  _visit: (value, visitor) => {
481616
481616
  switch (value) {
481617
- case HttpMethod7.Get:
481617
+ case HttpMethod6.Get:
481618
481618
  return visitor.get();
481619
- case HttpMethod7.Post:
481619
+ case HttpMethod6.Post:
481620
481620
  return visitor.post();
481621
- case HttpMethod7.Put:
481621
+ case HttpMethod6.Put:
481622
481622
  return visitor.put();
481623
- case HttpMethod7.Patch:
481623
+ case HttpMethod6.Patch:
481624
481624
  return visitor.patch();
481625
- case HttpMethod7.Delete:
481625
+ case HttpMethod6.Delete:
481626
481626
  return visitor.delete();
481627
481627
  default:
481628
481628
  return visitor._unknown();
481629
481629
  }
481630
481630
  },
481631
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
481631
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
481632
481632
  };
481633
481633
  }
481634
481634
  });
@@ -485462,10 +485462,10 @@ var require_HttpMethod8 = __commonJS({
485462
485462
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
485463
485463
  var HttpMethod_exports = {};
485464
485464
  __export2(HttpMethod_exports, {
485465
- HttpMethod: () => HttpMethod7
485465
+ HttpMethod: () => HttpMethod6
485466
485466
  });
485467
485467
  module2.exports = __toCommonJS(HttpMethod_exports);
485468
- var HttpMethod7 = {
485468
+ var HttpMethod6 = {
485469
485469
  Get: "GET",
485470
485470
  Post: "POST",
485471
485471
  Put: "PUT",
@@ -485473,21 +485473,21 @@ var require_HttpMethod8 = __commonJS({
485473
485473
  Delete: "DELETE",
485474
485474
  _visit: (value, visitor) => {
485475
485475
  switch (value) {
485476
- case HttpMethod7.Get:
485476
+ case HttpMethod6.Get:
485477
485477
  return visitor.get();
485478
- case HttpMethod7.Post:
485478
+ case HttpMethod6.Post:
485479
485479
  return visitor.post();
485480
- case HttpMethod7.Put:
485480
+ case HttpMethod6.Put:
485481
485481
  return visitor.put();
485482
- case HttpMethod7.Patch:
485482
+ case HttpMethod6.Patch:
485483
485483
  return visitor.patch();
485484
- case HttpMethod7.Delete:
485484
+ case HttpMethod6.Delete:
485485
485485
  return visitor.delete();
485486
485486
  default:
485487
485487
  return visitor._unknown();
485488
485488
  }
485489
485489
  },
485490
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
485490
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
485491
485491
  };
485492
485492
  }
485493
485493
  });
@@ -489321,10 +489321,10 @@ var require_HttpMethod9 = __commonJS({
489321
489321
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
489322
489322
  var HttpMethod_exports = {};
489323
489323
  __export2(HttpMethod_exports, {
489324
- HttpMethod: () => HttpMethod7
489324
+ HttpMethod: () => HttpMethod6
489325
489325
  });
489326
489326
  module2.exports = __toCommonJS(HttpMethod_exports);
489327
- var HttpMethod7 = {
489327
+ var HttpMethod6 = {
489328
489328
  Get: "GET",
489329
489329
  Post: "POST",
489330
489330
  Put: "PUT",
@@ -489332,21 +489332,21 @@ var require_HttpMethod9 = __commonJS({
489332
489332
  Delete: "DELETE",
489333
489333
  _visit: (value, visitor) => {
489334
489334
  switch (value) {
489335
- case HttpMethod7.Get:
489335
+ case HttpMethod6.Get:
489336
489336
  return visitor.get();
489337
- case HttpMethod7.Post:
489337
+ case HttpMethod6.Post:
489338
489338
  return visitor.post();
489339
- case HttpMethod7.Put:
489339
+ case HttpMethod6.Put:
489340
489340
  return visitor.put();
489341
- case HttpMethod7.Patch:
489341
+ case HttpMethod6.Patch:
489342
489342
  return visitor.patch();
489343
- case HttpMethod7.Delete:
489343
+ case HttpMethod6.Delete:
489344
489344
  return visitor.delete();
489345
489345
  default:
489346
489346
  return visitor._unknown();
489347
489347
  }
489348
489348
  },
489349
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
489349
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
489350
489350
  };
489351
489351
  }
489352
489352
  });
@@ -493183,10 +493183,10 @@ var require_HttpMethod10 = __commonJS({
493183
493183
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
493184
493184
  var HttpMethod_exports = {};
493185
493185
  __export2(HttpMethod_exports, {
493186
- HttpMethod: () => HttpMethod7
493186
+ HttpMethod: () => HttpMethod6
493187
493187
  });
493188
493188
  module2.exports = __toCommonJS(HttpMethod_exports);
493189
- var HttpMethod7 = {
493189
+ var HttpMethod6 = {
493190
493190
  Get: "GET",
493191
493191
  Post: "POST",
493192
493192
  Put: "PUT",
@@ -493194,21 +493194,21 @@ var require_HttpMethod10 = __commonJS({
493194
493194
  Delete: "DELETE",
493195
493195
  _visit: (value, visitor) => {
493196
493196
  switch (value) {
493197
- case HttpMethod7.Get:
493197
+ case HttpMethod6.Get:
493198
493198
  return visitor.get();
493199
- case HttpMethod7.Post:
493199
+ case HttpMethod6.Post:
493200
493200
  return visitor.post();
493201
- case HttpMethod7.Put:
493201
+ case HttpMethod6.Put:
493202
493202
  return visitor.put();
493203
- case HttpMethod7.Patch:
493203
+ case HttpMethod6.Patch:
493204
493204
  return visitor.patch();
493205
- case HttpMethod7.Delete:
493205
+ case HttpMethod6.Delete:
493206
493206
  return visitor.delete();
493207
493207
  default:
493208
493208
  return visitor._unknown();
493209
493209
  }
493210
493210
  },
493211
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
493211
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
493212
493212
  };
493213
493213
  }
493214
493214
  });
@@ -497048,10 +497048,10 @@ var require_HttpMethod11 = __commonJS({
497048
497048
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
497049
497049
  var HttpMethod_exports = {};
497050
497050
  __export2(HttpMethod_exports, {
497051
- HttpMethod: () => HttpMethod7
497051
+ HttpMethod: () => HttpMethod6
497052
497052
  });
497053
497053
  module2.exports = __toCommonJS(HttpMethod_exports);
497054
- var HttpMethod7 = {
497054
+ var HttpMethod6 = {
497055
497055
  Get: "GET",
497056
497056
  Post: "POST",
497057
497057
  Put: "PUT",
@@ -497059,21 +497059,21 @@ var require_HttpMethod11 = __commonJS({
497059
497059
  Delete: "DELETE",
497060
497060
  _visit: (value, visitor) => {
497061
497061
  switch (value) {
497062
- case HttpMethod7.Get:
497062
+ case HttpMethod6.Get:
497063
497063
  return visitor.get();
497064
- case HttpMethod7.Post:
497064
+ case HttpMethod6.Post:
497065
497065
  return visitor.post();
497066
- case HttpMethod7.Put:
497066
+ case HttpMethod6.Put:
497067
497067
  return visitor.put();
497068
- case HttpMethod7.Patch:
497068
+ case HttpMethod6.Patch:
497069
497069
  return visitor.patch();
497070
- case HttpMethod7.Delete:
497070
+ case HttpMethod6.Delete:
497071
497071
  return visitor.delete();
497072
497072
  default:
497073
497073
  return visitor._unknown();
497074
497074
  }
497075
497075
  },
497076
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
497076
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
497077
497077
  };
497078
497078
  }
497079
497079
  });
@@ -501056,10 +501056,10 @@ var require_HttpMethod12 = __commonJS({
501056
501056
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
501057
501057
  var HttpMethod_exports = {};
501058
501058
  __export2(HttpMethod_exports, {
501059
- HttpMethod: () => HttpMethod7
501059
+ HttpMethod: () => HttpMethod6
501060
501060
  });
501061
501061
  module2.exports = __toCommonJS(HttpMethod_exports);
501062
- var HttpMethod7 = {
501062
+ var HttpMethod6 = {
501063
501063
  Get: "GET",
501064
501064
  Post: "POST",
501065
501065
  Put: "PUT",
@@ -501067,21 +501067,21 @@ var require_HttpMethod12 = __commonJS({
501067
501067
  Delete: "DELETE",
501068
501068
  _visit: (value, visitor) => {
501069
501069
  switch (value) {
501070
- case HttpMethod7.Get:
501070
+ case HttpMethod6.Get:
501071
501071
  return visitor.get();
501072
- case HttpMethod7.Post:
501072
+ case HttpMethod6.Post:
501073
501073
  return visitor.post();
501074
- case HttpMethod7.Put:
501074
+ case HttpMethod6.Put:
501075
501075
  return visitor.put();
501076
- case HttpMethod7.Patch:
501076
+ case HttpMethod6.Patch:
501077
501077
  return visitor.patch();
501078
- case HttpMethod7.Delete:
501078
+ case HttpMethod6.Delete:
501079
501079
  return visitor.delete();
501080
501080
  default:
501081
501081
  return visitor._unknown();
501082
501082
  }
501083
501083
  },
501084
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
501084
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
501085
501085
  };
501086
501086
  }
501087
501087
  });
@@ -505064,10 +505064,10 @@ var require_HttpMethod13 = __commonJS({
505064
505064
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
505065
505065
  var HttpMethod_exports = {};
505066
505066
  __export2(HttpMethod_exports, {
505067
- HttpMethod: () => HttpMethod7
505067
+ HttpMethod: () => HttpMethod6
505068
505068
  });
505069
505069
  module2.exports = __toCommonJS(HttpMethod_exports);
505070
- var HttpMethod7 = {
505070
+ var HttpMethod6 = {
505071
505071
  Get: "GET",
505072
505072
  Post: "POST",
505073
505073
  Put: "PUT",
@@ -505075,21 +505075,21 @@ var require_HttpMethod13 = __commonJS({
505075
505075
  Delete: "DELETE",
505076
505076
  _visit: (value, visitor) => {
505077
505077
  switch (value) {
505078
- case HttpMethod7.Get:
505078
+ case HttpMethod6.Get:
505079
505079
  return visitor.get();
505080
- case HttpMethod7.Post:
505080
+ case HttpMethod6.Post:
505081
505081
  return visitor.post();
505082
- case HttpMethod7.Put:
505082
+ case HttpMethod6.Put:
505083
505083
  return visitor.put();
505084
- case HttpMethod7.Patch:
505084
+ case HttpMethod6.Patch:
505085
505085
  return visitor.patch();
505086
- case HttpMethod7.Delete:
505086
+ case HttpMethod6.Delete:
505087
505087
  return visitor.delete();
505088
505088
  default:
505089
505089
  return visitor._unknown();
505090
505090
  }
505091
505091
  },
505092
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
505092
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
505093
505093
  };
505094
505094
  }
505095
505095
  });
@@ -509072,10 +509072,10 @@ var require_HttpMethod14 = __commonJS({
509072
509072
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
509073
509073
  var HttpMethod_exports = {};
509074
509074
  __export2(HttpMethod_exports, {
509075
- HttpMethod: () => HttpMethod7
509075
+ HttpMethod: () => HttpMethod6
509076
509076
  });
509077
509077
  module2.exports = __toCommonJS(HttpMethod_exports);
509078
- var HttpMethod7 = {
509078
+ var HttpMethod6 = {
509079
509079
  Get: "GET",
509080
509080
  Post: "POST",
509081
509081
  Put: "PUT",
@@ -509083,21 +509083,21 @@ var require_HttpMethod14 = __commonJS({
509083
509083
  Delete: "DELETE",
509084
509084
  _visit: (value, visitor) => {
509085
509085
  switch (value) {
509086
- case HttpMethod7.Get:
509086
+ case HttpMethod6.Get:
509087
509087
  return visitor.get();
509088
- case HttpMethod7.Post:
509088
+ case HttpMethod6.Post:
509089
509089
  return visitor.post();
509090
- case HttpMethod7.Put:
509090
+ case HttpMethod6.Put:
509091
509091
  return visitor.put();
509092
- case HttpMethod7.Patch:
509092
+ case HttpMethod6.Patch:
509093
509093
  return visitor.patch();
509094
- case HttpMethod7.Delete:
509094
+ case HttpMethod6.Delete:
509095
509095
  return visitor.delete();
509096
509096
  default:
509097
509097
  return visitor._unknown();
509098
509098
  }
509099
509099
  },
509100
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
509100
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
509101
509101
  };
509102
509102
  }
509103
509103
  });
@@ -513368,10 +513368,10 @@ var require_HttpMethod15 = __commonJS({
513368
513368
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
513369
513369
  var HttpMethod_exports = {};
513370
513370
  __export2(HttpMethod_exports, {
513371
- HttpMethod: () => HttpMethod7
513371
+ HttpMethod: () => HttpMethod6
513372
513372
  });
513373
513373
  module2.exports = __toCommonJS(HttpMethod_exports);
513374
- var HttpMethod7 = {
513374
+ var HttpMethod6 = {
513375
513375
  Get: "GET",
513376
513376
  Post: "POST",
513377
513377
  Put: "PUT",
@@ -513379,21 +513379,21 @@ var require_HttpMethod15 = __commonJS({
513379
513379
  Delete: "DELETE",
513380
513380
  _visit: (value, visitor) => {
513381
513381
  switch (value) {
513382
- case HttpMethod7.Get:
513382
+ case HttpMethod6.Get:
513383
513383
  return visitor.get();
513384
- case HttpMethod7.Post:
513384
+ case HttpMethod6.Post:
513385
513385
  return visitor.post();
513386
- case HttpMethod7.Put:
513386
+ case HttpMethod6.Put:
513387
513387
  return visitor.put();
513388
- case HttpMethod7.Patch:
513388
+ case HttpMethod6.Patch:
513389
513389
  return visitor.patch();
513390
- case HttpMethod7.Delete:
513390
+ case HttpMethod6.Delete:
513391
513391
  return visitor.delete();
513392
513392
  default:
513393
513393
  return visitor._unknown();
513394
513394
  }
513395
513395
  },
513396
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
513396
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
513397
513397
  };
513398
513398
  }
513399
513399
  });
@@ -516411,10 +516411,10 @@ var require_HttpMethod16 = __commonJS({
516411
516411
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
516412
516412
  var HttpMethod_exports = {};
516413
516413
  __export2(HttpMethod_exports, {
516414
- HttpMethod: () => HttpMethod7
516414
+ HttpMethod: () => HttpMethod6
516415
516415
  });
516416
516416
  module2.exports = __toCommonJS(HttpMethod_exports);
516417
- var HttpMethod7 = {
516417
+ var HttpMethod6 = {
516418
516418
  Get: "GET",
516419
516419
  Post: "POST",
516420
516420
  Put: "PUT",
@@ -516422,21 +516422,21 @@ var require_HttpMethod16 = __commonJS({
516422
516422
  Delete: "DELETE",
516423
516423
  _visit: (value, visitor) => {
516424
516424
  switch (value) {
516425
- case HttpMethod7.Get:
516425
+ case HttpMethod6.Get:
516426
516426
  return visitor.get();
516427
- case HttpMethod7.Post:
516427
+ case HttpMethod6.Post:
516428
516428
  return visitor.post();
516429
- case HttpMethod7.Put:
516429
+ case HttpMethod6.Put:
516430
516430
  return visitor.put();
516431
- case HttpMethod7.Patch:
516431
+ case HttpMethod6.Patch:
516432
516432
  return visitor.patch();
516433
- case HttpMethod7.Delete:
516433
+ case HttpMethod6.Delete:
516434
516434
  return visitor.delete();
516435
516435
  default:
516436
516436
  return visitor._unknown();
516437
516437
  }
516438
516438
  },
516439
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
516439
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
516440
516440
  };
516441
516441
  }
516442
516442
  });
@@ -520597,10 +520597,10 @@ var require_HttpMethod17 = __commonJS({
520597
520597
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
520598
520598
  var HttpMethod_exports = {};
520599
520599
  __export2(HttpMethod_exports, {
520600
- HttpMethod: () => HttpMethod7
520600
+ HttpMethod: () => HttpMethod6
520601
520601
  });
520602
520602
  module2.exports = __toCommonJS(HttpMethod_exports);
520603
- var HttpMethod7 = {
520603
+ var HttpMethod6 = {
520604
520604
  Get: "GET",
520605
520605
  Post: "POST",
520606
520606
  Put: "PUT",
@@ -520608,21 +520608,21 @@ var require_HttpMethod17 = __commonJS({
520608
520608
  Delete: "DELETE",
520609
520609
  _visit: (value, visitor) => {
520610
520610
  switch (value) {
520611
- case HttpMethod7.Get:
520611
+ case HttpMethod6.Get:
520612
520612
  return visitor.get();
520613
- case HttpMethod7.Post:
520613
+ case HttpMethod6.Post:
520614
520614
  return visitor.post();
520615
- case HttpMethod7.Put:
520615
+ case HttpMethod6.Put:
520616
520616
  return visitor.put();
520617
- case HttpMethod7.Patch:
520617
+ case HttpMethod6.Patch:
520618
520618
  return visitor.patch();
520619
- case HttpMethod7.Delete:
520619
+ case HttpMethod6.Delete:
520620
520620
  return visitor.delete();
520621
520621
  default:
520622
520622
  return visitor._unknown();
520623
520623
  }
520624
520624
  },
520625
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
520625
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
520626
520626
  };
520627
520627
  }
520628
520628
  });
@@ -524833,10 +524833,10 @@ var require_HttpMethod18 = __commonJS({
524833
524833
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
524834
524834
  var HttpMethod_exports = {};
524835
524835
  __export2(HttpMethod_exports, {
524836
- HttpMethod: () => HttpMethod7
524836
+ HttpMethod: () => HttpMethod6
524837
524837
  });
524838
524838
  module2.exports = __toCommonJS(HttpMethod_exports);
524839
- var HttpMethod7 = {
524839
+ var HttpMethod6 = {
524840
524840
  Get: "GET",
524841
524841
  Post: "POST",
524842
524842
  Put: "PUT",
@@ -524844,21 +524844,21 @@ var require_HttpMethod18 = __commonJS({
524844
524844
  Delete: "DELETE",
524845
524845
  _visit: (value, visitor) => {
524846
524846
  switch (value) {
524847
- case HttpMethod7.Get:
524847
+ case HttpMethod6.Get:
524848
524848
  return visitor.get();
524849
- case HttpMethod7.Post:
524849
+ case HttpMethod6.Post:
524850
524850
  return visitor.post();
524851
- case HttpMethod7.Put:
524851
+ case HttpMethod6.Put:
524852
524852
  return visitor.put();
524853
- case HttpMethod7.Patch:
524853
+ case HttpMethod6.Patch:
524854
524854
  return visitor.patch();
524855
- case HttpMethod7.Delete:
524855
+ case HttpMethod6.Delete:
524856
524856
  return visitor.delete();
524857
524857
  default:
524858
524858
  return visitor._unknown();
524859
524859
  }
524860
524860
  },
524861
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
524861
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
524862
524862
  };
524863
524863
  }
524864
524864
  });
@@ -555564,10 +555564,10 @@ var require_HttpMethod26 = __commonJS({
555564
555564
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
555565
555565
  var HttpMethod_exports = {};
555566
555566
  __export2(HttpMethod_exports, {
555567
- HttpMethod: () => HttpMethod7
555567
+ HttpMethod: () => HttpMethod6
555568
555568
  });
555569
555569
  module2.exports = __toCommonJS(HttpMethod_exports);
555570
- var HttpMethod7 = {
555570
+ var HttpMethod6 = {
555571
555571
  Get: "GET",
555572
555572
  Post: "POST",
555573
555573
  Put: "PUT",
@@ -555575,21 +555575,21 @@ var require_HttpMethod26 = __commonJS({
555575
555575
  Delete: "DELETE",
555576
555576
  _visit: (value, visitor) => {
555577
555577
  switch (value) {
555578
- case HttpMethod7.Get:
555578
+ case HttpMethod6.Get:
555579
555579
  return visitor.get();
555580
- case HttpMethod7.Post:
555580
+ case HttpMethod6.Post:
555581
555581
  return visitor.post();
555582
- case HttpMethod7.Put:
555582
+ case HttpMethod6.Put:
555583
555583
  return visitor.put();
555584
- case HttpMethod7.Patch:
555584
+ case HttpMethod6.Patch:
555585
555585
  return visitor.patch();
555586
- case HttpMethod7.Delete:
555586
+ case HttpMethod6.Delete:
555587
555587
  return visitor.delete();
555588
555588
  default:
555589
555589
  return visitor._unknown();
555590
555590
  }
555591
555591
  },
555592
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
555592
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
555593
555593
  };
555594
555594
  }
555595
555595
  });
@@ -602942,10 +602942,10 @@ var require_HttpMethod37 = __commonJS({
602942
602942
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
602943
602943
  var HttpMethod_exports = {};
602944
602944
  __export2(HttpMethod_exports, {
602945
- HttpMethod: () => HttpMethod7
602945
+ HttpMethod: () => HttpMethod6
602946
602946
  });
602947
602947
  module2.exports = __toCommonJS(HttpMethod_exports);
602948
- var HttpMethod7 = {
602948
+ var HttpMethod6 = {
602949
602949
  Get: "GET",
602950
602950
  Post: "POST",
602951
602951
  Put: "PUT",
@@ -602953,21 +602953,21 @@ var require_HttpMethod37 = __commonJS({
602953
602953
  Delete: "DELETE",
602954
602954
  _visit: (value, visitor) => {
602955
602955
  switch (value) {
602956
- case HttpMethod7.Get:
602956
+ case HttpMethod6.Get:
602957
602957
  return visitor.get();
602958
- case HttpMethod7.Post:
602958
+ case HttpMethod6.Post:
602959
602959
  return visitor.post();
602960
- case HttpMethod7.Put:
602960
+ case HttpMethod6.Put:
602961
602961
  return visitor.put();
602962
- case HttpMethod7.Patch:
602962
+ case HttpMethod6.Patch:
602963
602963
  return visitor.patch();
602964
- case HttpMethod7.Delete:
602964
+ case HttpMethod6.Delete:
602965
602965
  return visitor.delete();
602966
602966
  default:
602967
602967
  return visitor._unknown();
602968
602968
  }
602969
602969
  },
602970
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
602970
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
602971
602971
  };
602972
602972
  }
602973
602973
  });
@@ -655771,10 +655771,10 @@ var require_HttpMethod48 = __commonJS({
655771
655771
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
655772
655772
  var HttpMethod_exports = {};
655773
655773
  __export2(HttpMethod_exports, {
655774
- HttpMethod: () => HttpMethod7
655774
+ HttpMethod: () => HttpMethod6
655775
655775
  });
655776
655776
  module2.exports = __toCommonJS(HttpMethod_exports);
655777
- var HttpMethod7 = {
655777
+ var HttpMethod6 = {
655778
655778
  Get: "GET",
655779
655779
  Post: "POST",
655780
655780
  Put: "PUT",
@@ -655782,21 +655782,21 @@ var require_HttpMethod48 = __commonJS({
655782
655782
  Delete: "DELETE",
655783
655783
  _visit: (value, visitor) => {
655784
655784
  switch (value) {
655785
- case HttpMethod7.Get:
655785
+ case HttpMethod6.Get:
655786
655786
  return visitor.get();
655787
- case HttpMethod7.Post:
655787
+ case HttpMethod6.Post:
655788
655788
  return visitor.post();
655789
- case HttpMethod7.Put:
655789
+ case HttpMethod6.Put:
655790
655790
  return visitor.put();
655791
- case HttpMethod7.Patch:
655791
+ case HttpMethod6.Patch:
655792
655792
  return visitor.patch();
655793
- case HttpMethod7.Delete:
655793
+ case HttpMethod6.Delete:
655794
655794
  return visitor.delete();
655795
655795
  default:
655796
655796
  return visitor._unknown();
655797
655797
  }
655798
655798
  },
655799
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
655799
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
655800
655800
  };
655801
655801
  }
655802
655802
  });
@@ -675172,10 +675172,10 @@ var require_HttpMethod52 = __commonJS({
675172
675172
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
675173
675173
  var HttpMethod_exports = {};
675174
675174
  __export2(HttpMethod_exports, {
675175
- HttpMethod: () => HttpMethod7
675175
+ HttpMethod: () => HttpMethod6
675176
675176
  });
675177
675177
  module2.exports = __toCommonJS(HttpMethod_exports);
675178
- var HttpMethod7 = {
675178
+ var HttpMethod6 = {
675179
675179
  Get: "GET",
675180
675180
  Post: "POST",
675181
675181
  Put: "PUT",
@@ -675183,21 +675183,21 @@ var require_HttpMethod52 = __commonJS({
675183
675183
  Delete: "DELETE",
675184
675184
  _visit: (value, visitor) => {
675185
675185
  switch (value) {
675186
- case HttpMethod7.Get:
675186
+ case HttpMethod6.Get:
675187
675187
  return visitor.get();
675188
- case HttpMethod7.Post:
675188
+ case HttpMethod6.Post:
675189
675189
  return visitor.post();
675190
- case HttpMethod7.Put:
675190
+ case HttpMethod6.Put:
675191
675191
  return visitor.put();
675192
- case HttpMethod7.Patch:
675192
+ case HttpMethod6.Patch:
675193
675193
  return visitor.patch();
675194
- case HttpMethod7.Delete:
675194
+ case HttpMethod6.Delete:
675195
675195
  return visitor.delete();
675196
675196
  default:
675197
675197
  return visitor._unknown();
675198
675198
  }
675199
675199
  },
675200
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
675200
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
675201
675201
  };
675202
675202
  }
675203
675203
  });
@@ -678607,10 +678607,10 @@ var require_HttpMethod53 = __commonJS({
678607
678607
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
678608
678608
  var HttpMethod_exports = {};
678609
678609
  __export2(HttpMethod_exports, {
678610
- HttpMethod: () => HttpMethod7
678610
+ HttpMethod: () => HttpMethod6
678611
678611
  });
678612
678612
  module2.exports = __toCommonJS(HttpMethod_exports);
678613
- var HttpMethod7 = {
678613
+ var HttpMethod6 = {
678614
678614
  Get: "GET",
678615
678615
  Post: "POST",
678616
678616
  Put: "PUT",
@@ -678618,21 +678618,21 @@ var require_HttpMethod53 = __commonJS({
678618
678618
  Delete: "DELETE",
678619
678619
  _visit: (value, visitor) => {
678620
678620
  switch (value) {
678621
- case HttpMethod7.Get:
678621
+ case HttpMethod6.Get:
678622
678622
  return visitor.get();
678623
- case HttpMethod7.Post:
678623
+ case HttpMethod6.Post:
678624
678624
  return visitor.post();
678625
- case HttpMethod7.Put:
678625
+ case HttpMethod6.Put:
678626
678626
  return visitor.put();
678627
- case HttpMethod7.Patch:
678627
+ case HttpMethod6.Patch:
678628
678628
  return visitor.patch();
678629
- case HttpMethod7.Delete:
678629
+ case HttpMethod6.Delete:
678630
678630
  return visitor.delete();
678631
678631
  default:
678632
678632
  return visitor._unknown();
678633
678633
  }
678634
678634
  },
678635
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
678635
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
678636
678636
  };
678637
678637
  }
678638
678638
  });
@@ -682042,10 +682042,10 @@ var require_HttpMethod54 = __commonJS({
682042
682042
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
682043
682043
  var HttpMethod_exports = {};
682044
682044
  __export2(HttpMethod_exports, {
682045
- HttpMethod: () => HttpMethod7
682045
+ HttpMethod: () => HttpMethod6
682046
682046
  });
682047
682047
  module2.exports = __toCommonJS(HttpMethod_exports);
682048
- var HttpMethod7 = {
682048
+ var HttpMethod6 = {
682049
682049
  Get: "GET",
682050
682050
  Post: "POST",
682051
682051
  Put: "PUT",
@@ -682053,21 +682053,21 @@ var require_HttpMethod54 = __commonJS({
682053
682053
  Delete: "DELETE",
682054
682054
  _visit: (value, visitor) => {
682055
682055
  switch (value) {
682056
- case HttpMethod7.Get:
682056
+ case HttpMethod6.Get:
682057
682057
  return visitor.get();
682058
- case HttpMethod7.Post:
682058
+ case HttpMethod6.Post:
682059
682059
  return visitor.post();
682060
- case HttpMethod7.Put:
682060
+ case HttpMethod6.Put:
682061
682061
  return visitor.put();
682062
- case HttpMethod7.Patch:
682062
+ case HttpMethod6.Patch:
682063
682063
  return visitor.patch();
682064
- case HttpMethod7.Delete:
682064
+ case HttpMethod6.Delete:
682065
682065
  return visitor.delete();
682066
682066
  default:
682067
682067
  return visitor._unknown();
682068
682068
  }
682069
682069
  },
682070
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
682070
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
682071
682071
  };
682072
682072
  }
682073
682073
  });
@@ -685569,10 +685569,10 @@ var require_HttpMethod55 = __commonJS({
685569
685569
  var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
685570
685570
  var HttpMethod_exports = {};
685571
685571
  __export2(HttpMethod_exports, {
685572
- HttpMethod: () => HttpMethod7
685572
+ HttpMethod: () => HttpMethod6
685573
685573
  });
685574
685574
  module2.exports = __toCommonJS(HttpMethod_exports);
685575
- var HttpMethod7 = {
685575
+ var HttpMethod6 = {
685576
685576
  Get: "GET",
685577
685577
  Post: "POST",
685578
685578
  Put: "PUT",
@@ -685580,21 +685580,21 @@ var require_HttpMethod55 = __commonJS({
685580
685580
  Delete: "DELETE",
685581
685581
  _visit: (value, visitor) => {
685582
685582
  switch (value) {
685583
- case HttpMethod7.Get:
685583
+ case HttpMethod6.Get:
685584
685584
  return visitor.get();
685585
- case HttpMethod7.Post:
685585
+ case HttpMethod6.Post:
685586
685586
  return visitor.post();
685587
- case HttpMethod7.Put:
685587
+ case HttpMethod6.Put:
685588
685588
  return visitor.put();
685589
- case HttpMethod7.Patch:
685589
+ case HttpMethod6.Patch:
685590
685590
  return visitor.patch();
685591
- case HttpMethod7.Delete:
685591
+ case HttpMethod6.Delete:
685592
685592
  return visitor.delete();
685593
685593
  default:
685594
685594
  return visitor._unknown();
685595
685595
  }
685596
685596
  },
685597
- _values: () => [HttpMethod7.Get, HttpMethod7.Post, HttpMethod7.Put, HttpMethod7.Patch, HttpMethod7.Delete]
685597
+ _values: () => [HttpMethod6.Get, HttpMethod6.Post, HttpMethod6.Put, HttpMethod6.Patch, HttpMethod6.Delete]
685598
685598
  };
685599
685599
  }
685600
685600
  });
@@ -1176309,6 +1176309,39 @@ function isObjectLike(value) {
1176309
1176309
  return typeof value === "object" && value != null;
1176310
1176310
  }
1176311
1176311
 
1176312
+ // ../../commons/core-utils/lib/objects/mapValues.js
1176313
+ function mapValues(object4, iteratee) {
1176314
+ object4 = Object(object4);
1176315
+ const result = {};
1176316
+ Object.keys(object4).forEach((key) => {
1176317
+ result[key] = iteratee(object4[key], key, object4);
1176318
+ });
1176319
+ return result;
1176320
+ }
1176321
+
1176322
+ // ../../commons/core-utils/lib/replaceEnvVars.js
1176323
+ var ENV_VAR_REGEX = /\$\{(\w+)\}/g;
1176324
+ function replaceEnvVariables(content3, context, options2 = {}) {
1176325
+ if (typeof content3 === "string") {
1176326
+ const transformed2 = content3.replace(ENV_VAR_REGEX, (_substring, envVarName) => {
1176327
+ if (options2.substituteAsEmpty) {
1176328
+ return "";
1176329
+ }
1176330
+ const envVarValue = process.env[envVarName];
1176331
+ if (envVarValue == null) {
1176332
+ context.onError(`Environment variable ${envVarName} is not defined.`);
1176333
+ }
1176334
+ return envVarValue ?? "";
1176335
+ });
1176336
+ return transformed2;
1176337
+ }
1176338
+ if (!isPlainObject(content3)) {
1176339
+ return content3;
1176340
+ }
1176341
+ const transformed = mapValues(content3, (value) => replaceEnvVariables(value, context, options2));
1176342
+ return transformed;
1176343
+ }
1176344
+
1176312
1176345
  // ../../commons/core-utils/lib/visitDiscriminatedUnion.js
1176313
1176346
  function visitDiscriminatedUnion(item, discriminant4) {
1176314
1176347
  return {
@@ -1187829,7 +1187862,7 @@ function mapKeys(object4, iteratee) {
1187829
1187862
  var mapKeys_default = mapKeys;
1187830
1187863
 
1187831
1187864
  // ../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mapValues.js
1187832
- function mapValues(object4, iteratee) {
1187865
+ function mapValues2(object4, iteratee) {
1187833
1187866
  var result = {};
1187834
1187867
  iteratee = baseIteratee_default(iteratee, 3);
1187835
1187868
  baseForOwn_default(object4, function(value, key, object5) {
@@ -1187837,7 +1187870,7 @@ function mapValues(object4, iteratee) {
1187837
1187870
  });
1187838
1187871
  return result;
1187839
1187872
  }
1187840
- var mapValues_default = mapValues;
1187873
+ var mapValues_default = mapValues2;
1187841
1187874
 
1187842
1187875
  // ../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseExtremum.js
1187843
1187876
  function baseExtremum(array, iteratee, comparator) {
@@ -1189307,12 +1189340,16 @@ var ProtobufAPIDefinitionSchema = z.strictObject({
1189307
1189340
  proto: ProtobufDefinitionSchema
1189308
1189341
  });
1189309
1189342
  var APIDefinitionList = z.array(z.union([APIDefinitionPathSchema, APIDefintionWithOverridesSchema, ProtobufAPIDefinitionSchema]));
1189310
- var APIConfigurationSchema = z.union([
1189343
+ var APIConfigurationSchemaInternal = z.union([
1189311
1189344
  APIDefinitionPathSchema,
1189312
1189345
  APIDefintionWithOverridesSchema,
1189313
1189346
  APIDefinitionList,
1189314
1189347
  ProtobufAPIDefinitionSchema
1189315
1189348
  ]);
1189349
+ var APIConfigurationSchema = z.union([
1189350
+ APIConfigurationSchemaInternal,
1189351
+ z.strictObject({ namespaces: z.record(APIConfigurationSchemaInternal) })
1189352
+ ]);
1189316
1189353
 
1189317
1189354
  // ../configuration/lib/generators-yml/schemas/LocalFileSystemOutputLocationSchema.js
1189318
1189355
  var LocalFileSystemOutputLocationSchema = z.strictObject({
@@ -1189586,9 +1189623,8 @@ async function convertGeneratorsConfiguration({ absolutePathToGeneratorsConfigur
1189586
1189623
  } : void 0
1189587
1189624
  };
1189588
1189625
  }
1189589
- async function parseAPIConfiguration(rawGeneratorsConfiguration) {
1189626
+ async function parseAPIConfigurationToApiLocations(apiConfiguration, rawConfiguration) {
1189590
1189627
  var _a6, _b4, _c4, _d2, _e, _f, _g, _h;
1189591
- const apiConfiguration = rawGeneratorsConfiguration.api;
1189592
1189628
  const apiDefinitions = [];
1189593
1189629
  if (apiConfiguration != null) {
1189594
1189630
  if (typeof apiConfiguration === "string") {
@@ -1189691,11 +1189727,11 @@ async function parseAPIConfiguration(rawGeneratorsConfiguration) {
1189691
1189727
  });
1189692
1189728
  }
1189693
1189729
  } else {
1189694
- const openapi = rawGeneratorsConfiguration[OPENAPI_LOCATION_KEY];
1189695
- const apiOrigin = rawGeneratorsConfiguration[API_ORIGIN_LOCATION_KEY];
1189696
- const openapiOverrides = rawGeneratorsConfiguration[OPENAPI_OVERRIDES_LOCATION_KEY];
1189697
- const asyncapi = rawGeneratorsConfiguration[ASYNC_API_LOCATION_KEY];
1189698
- const settings = rawGeneratorsConfiguration[API_SETTINGS_KEY];
1189730
+ const openapi = rawConfiguration[OPENAPI_LOCATION_KEY];
1189731
+ const apiOrigin = rawConfiguration[API_ORIGIN_LOCATION_KEY];
1189732
+ const openapiOverrides = rawConfiguration[OPENAPI_OVERRIDES_LOCATION_KEY];
1189733
+ const asyncapi = rawConfiguration[ASYNC_API_LOCATION_KEY];
1189734
+ const settings = rawConfiguration[API_SETTINGS_KEY];
1189699
1189735
  if (openapi != null && typeof openapi === "string") {
1189700
1189736
  apiDefinitions.push({
1189701
1189737
  schema: {
@@ -1189744,9 +1189780,23 @@ async function parseAPIConfiguration(rawGeneratorsConfiguration) {
1189744
1189780
  });
1189745
1189781
  }
1189746
1189782
  }
1189783
+ return apiDefinitions;
1189784
+ }
1189785
+ async function parseAPIConfiguration(rawGeneratorsConfiguration) {
1189786
+ const apiConfiguration = rawGeneratorsConfiguration.api;
1189787
+ if (isPlainObject(apiConfiguration) && "namespaces" in apiConfiguration) {
1189788
+ const namespacedDefinitions = {};
1189789
+ for (const [namespace, configuration] of Object.entries(apiConfiguration.namespaces)) {
1189790
+ namespacedDefinitions[namespace] = await parseAPIConfigurationToApiLocations(configuration, rawGeneratorsConfiguration);
1189791
+ }
1189792
+ return {
1189793
+ type: "multiNamespace",
1189794
+ definitions: namespacedDefinitions
1189795
+ };
1189796
+ }
1189747
1189797
  return {
1189748
1189798
  type: "singleNamespace",
1189749
- definitions: apiDefinitions
1189799
+ definitions: await parseAPIConfigurationToApiLocations(apiConfiguration, rawGeneratorsConfiguration)
1189750
1189800
  };
1189751
1189801
  }
1189752
1189802
  async function convertGroup({ absolutePathToGeneratorsConfiguration, groupName, group, maybeTopLevelMetadata, maybeTopLevelReviewers, readme }) {
@@ -1192340,7 +1192390,7 @@ var BottomBar = class extends UI {
1192340
1192390
  };
1192341
1192391
 
1192342
1192392
  // ../../../node_modules/.pnpm/inquirer@9.2.23/node_modules/inquirer/lib/ui/prompt.js
1192343
- var import_isPlainObject8 = __toESM(require_isPlainObject3(), 1);
1192393
+ var import_isPlainObject9 = __toESM(require_isPlainObject3(), 1);
1192344
1192394
  var import_get2 = __toESM(require_get7(), 1);
1192345
1192395
  var import_set2 = __toESM(require_set5(), 1);
1192346
1192396
  var import_rxjs12 = __toESM(require_cjs2(), 1);
@@ -1192363,7 +1192413,7 @@ var fetchAsyncQuestionProperty = function(question, prop, answers) {
1192363
1192413
 
1192364
1192414
  // ../../../node_modules/.pnpm/inquirer@9.2.23/node_modules/inquirer/lib/ui/prompt.js
1192365
1192415
  var _2 = {
1192366
- isPlainObject: import_isPlainObject8.default,
1192416
+ isPlainObject: import_isPlainObject9.default,
1192367
1192417
  set: import_set2.default,
1192368
1192418
  get: import_get2.default
1192369
1192419
  };
@@ -1192525,7 +1192575,7 @@ var AccessTokenPosthogManager = class {
1192525
1192575
  properties: {
1192526
1192576
  ...event,
1192527
1192577
  ...event.properties,
1192528
- version: "0.39.1",
1192578
+ version: "0.39.2",
1192529
1192579
  usingAccessToken: true
1192530
1192580
  }
1192531
1192581
  });
@@ -1192587,7 +1192637,7 @@ var UserPosthogManager = class {
1192587
1192637
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1192588
1192638
  event: "CLI",
1192589
1192639
  properties: {
1192590
- version: "0.39.1",
1192640
+ version: "0.39.2",
1192591
1192641
  ...event,
1192592
1192642
  ...event.properties
1192593
1192643
  }
@@ -1209567,7 +1209617,7 @@ function getValueIfBoolean(value) {
1209567
1209617
  }
1209568
1209618
 
1209569
1209619
  // ../openapi-parser/lib/schema/convertAdditionalProperties.js
1209570
- function convertAdditionalProperties({ nameOverride, generatedName, breadcrumbs, additionalProperties, description, availability, wrapAsNullable, context, groupName, example, encoding, source }) {
1209620
+ function convertAdditionalProperties({ nameOverride, generatedName, breadcrumbs, additionalProperties, description, availability, wrapAsNullable, context, groupName, example, encoding, source, namespace }) {
1209571
1209621
  if (typeof additionalProperties === "boolean" || isAdditionalPropertiesAny(additionalProperties)) {
1209572
1209622
  return wrapMap({
1209573
1209623
  nameOverride,
@@ -1209624,7 +1209674,7 @@ function convertAdditionalProperties({ nameOverride, generatedName, breadcrumbs,
1209624
1209674
  }),
1209625
1209675
  groupName: void 0
1209626
1209676
  },
1209627
- valueSchema: convertSchema(additionalProperties, wrapAsNullable, context, [...breadcrumbs, "Value"], source),
1209677
+ valueSchema: convertSchema(additionalProperties, wrapAsNullable, context, [...breadcrumbs, "Value"], source, namespace),
1209628
1209678
  groupName,
1209629
1209679
  example,
1209630
1209680
  encoding
@@ -1209674,7 +1209724,7 @@ function isAdditionalPropertiesAny(additionalProperties) {
1209674
1209724
  }
1209675
1209725
 
1209676
1209726
  // ../openapi-parser/lib/schema/convertArray.js
1209677
- function convertArray({ nameOverride, generatedName, breadcrumbs, item, description, availability, wrapAsNullable, context, groupName, example, source }) {
1209727
+ function convertArray({ nameOverride, generatedName, breadcrumbs, item, description, availability, wrapAsNullable, context, groupName, example, source, namespace }) {
1209678
1209728
  const itemSchema = item == null ? SchemaWithExample.unknown({
1209679
1209729
  nameOverride,
1209680
1209730
  generatedName,
@@ -1209682,7 +1209732,7 @@ function convertArray({ nameOverride, generatedName, breadcrumbs, item, descript
1209682
1209732
  availability: void 0,
1209683
1209733
  example: void 0,
1209684
1209734
  groupName
1209685
- }) : convertSchema(item, false, context, [...breadcrumbs, "Item"], source);
1209735
+ }) : convertSchema(item, false, context, [...breadcrumbs, "Item"], source, namespace);
1209686
1209736
  return wrapArray({
1209687
1209737
  nameOverride,
1209688
1209738
  generatedName,
@@ -1209725,12 +1209775,12 @@ function wrapArray({ nameOverride, generatedName, itemSchema, wrapAsNullable, de
1209725
1209775
  }
1209726
1209776
 
1209727
1209777
  // ../openapi-parser/lib/schema/convertDiscriminatedOneOf.js
1209728
- function convertDiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, properties, description, availability, required, wrapAsNullable, discriminator, context, groupName, encoding, source }) {
1209778
+ function convertDiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, properties, description, availability, required, wrapAsNullable, discriminator, context, groupName, encoding, source, namespace }) {
1209729
1209779
  const discriminant4 = discriminator.propertyName;
1209730
1209780
  const unionSubTypes = Object.fromEntries(Object.entries(discriminator.mapping ?? {}).map(([discriminantValue, schema2]) => {
1209731
1209781
  const subtypeReference = convertReferenceObject({
1209732
1209782
  $ref: schema2
1209733
- }, false, context, [schema2], encoding, source);
1209783
+ }, false, context, [schema2], encoding, source, namespace);
1209734
1209784
  context.markReferencedByDiscriminatedUnion({
1209735
1209785
  $ref: schema2
1209736
1209786
  }, discriminant4, 1);
@@ -1209740,7 +1209790,7 @@ function convertDiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, p
1209740
1209790
  return propertyName !== discriminant4;
1209741
1209791
  }).map(([propertyName, propertySchema]) => {
1209742
1209792
  const isRequired = required != null && required.includes(propertyName);
1209743
- const schema2 = convertSchema(propertySchema, !isRequired, context, [...breadcrumbs, propertyName], source);
1209793
+ const schema2 = convertSchema(propertySchema, !isRequired, context, [...breadcrumbs, propertyName], source, namespace);
1209744
1209794
  return {
1209745
1209795
  key: propertyName,
1209746
1209796
  schema: schema2
@@ -1209759,14 +1209809,14 @@ function convertDiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, p
1209759
1209809
  source
1209760
1209810
  });
1209761
1209811
  }
1209762
- function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, breadcrumbs, properties, description, availability, required, wrapAsNullable, discriminant: discriminant4, variants, context, groupName, encoding, source }) {
1209812
+ function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, breadcrumbs, properties, description, availability, required, wrapAsNullable, discriminant: discriminant4, variants, context, groupName, encoding, source, namespace }) {
1209763
1209813
  const unionSubTypes = Object.fromEntries(Object.entries(variants).map(([discriminantValue, schema2]) => {
1209764
1209814
  if (isReferenceObject(schema2)) {
1209765
- const subtypeReference = convertReferenceObject(schema2, false, context, [schema2.$ref], encoding, source);
1209815
+ const subtypeReference = convertReferenceObject(schema2, false, context, [schema2.$ref], encoding, source, namespace);
1209766
1209816
  context.markReferencedByDiscriminatedUnion(schema2, discriminant4, 1);
1209767
1209817
  return [discriminantValue, subtypeReference];
1209768
1209818
  } else {
1209769
- const variantSchema = convertSchemaObject(schema2, false, context, [...breadcrumbs, discriminantValue], encoding, source, /* @__PURE__ */ new Set([discriminant4]));
1209819
+ const variantSchema = convertSchemaObject(schema2, false, context, [...breadcrumbs, discriminantValue], encoding, source, namespace, /* @__PURE__ */ new Set([discriminant4]));
1209770
1209820
  return [discriminantValue, variantSchema];
1209771
1209821
  }
1209772
1209822
  }));
@@ -1209774,7 +1209824,7 @@ function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, br
1209774
1209824
  return propertyName !== discriminant4;
1209775
1209825
  }).map(([propertyName, propertySchema]) => {
1209776
1209826
  const isRequired = required != null && required.includes(propertyName);
1209777
- const schema2 = convertSchema(propertySchema, !isRequired, context, [...breadcrumbs, propertyName], source);
1209827
+ const schema2 = convertSchema(propertySchema, !isRequired, context, [...breadcrumbs, propertyName], source, namespace);
1209778
1209828
  return {
1209779
1209829
  key: propertyName,
1209780
1209830
  schema: schema2
@@ -1210619,7 +1210669,7 @@ function isObjectEqual(a2, b2) {
1210619
1210669
  }
1210620
1210670
 
1210621
1210671
  // ../openapi-parser/lib/schema/convertObject.js
1210622
- function convertObject({ nameOverride, generatedName, breadcrumbs, properties, description, required, wrapAsNullable, allOf, context, propertiesToExclude, groupName, fullExamples, additionalProperties, availability, encoding, source }) {
1210672
+ function convertObject({ nameOverride, generatedName, breadcrumbs, properties, description, required, wrapAsNullable, allOf, context, propertiesToExclude, groupName, fullExamples, additionalProperties, availability, encoding, source, namespace }) {
1210623
1210673
  const allRequired = [...required ?? []];
1210624
1210674
  const propertiesToConvert = { ...properties };
1210625
1210675
  const inlinedParentProperties = [];
@@ -1210633,7 +1210683,7 @@ function convertObject({ nameOverride, generatedName, breadcrumbs, properties, d
1210633
1210683
  if (resolvedReference.oneOf != null) {
1210634
1210684
  for (const oneOfSchema of resolvedReference.oneOf) {
1210635
1210685
  const resolvedOneOfSchema = isReferenceObject(oneOfSchema) ? context.resolveSchemaReference(oneOfSchema) : oneOfSchema;
1210636
- const convertedOneOfSchema = convertSchema(resolvedOneOfSchema, false, context.DUMMY, breadcrumbs, source);
1210686
+ const convertedOneOfSchema = convertSchema(resolvedOneOfSchema, false, context.DUMMY, breadcrumbs, source, namespace);
1210637
1210687
  if (convertedOneOfSchema.type === "object") {
1210638
1210688
  inlinedParentProperties.push(...convertedOneOfSchema.properties.map((property5) => {
1210639
1210689
  if (property5.schema.type !== "optional" && property5.schema.type !== "nullable") {
@@ -1210662,11 +1210712,11 @@ function convertObject({ nameOverride, generatedName, breadcrumbs, properties, d
1210662
1210712
  parents.push({
1210663
1210713
  schemaId,
1210664
1210714
  convertedSchema: convertToReferencedSchema(allOfElement, [schemaId], source),
1210665
- properties: getAllProperties({ schema: allOfElement, context, breadcrumbs, source })
1210715
+ properties: getAllProperties({ schema: allOfElement, context, breadcrumbs, source, namespace })
1210666
1210716
  });
1210667
1210717
  context.markSchemaAsReferencedByNonRequest(schemaId);
1210668
1210718
  } else {
1210669
- const allOfSchema = convertSchema(allOfElement, false, context, breadcrumbs, source);
1210719
+ const allOfSchema = convertSchema(allOfElement, false, context, breadcrumbs, source, namespace);
1210670
1210720
  if (allOfSchema.type === "object") {
1210671
1210721
  inlinedParentProperties.push(...allOfSchema.properties);
1210672
1210722
  }
@@ -1210706,12 +1210756,12 @@ function convertObject({ nameOverride, generatedName, breadcrumbs, properties, d
1210706
1210756
  const propertyNameOverride = getExtension(propertySchema, FernOpenAPIExtension.FERN_PROPERTY_NAME);
1210707
1210757
  const propertyBreadcrumbs = [...breadcrumbs, propertyName];
1210708
1210758
  const generatedName2 = getGeneratedPropertyName(propertyBreadcrumbs);
1210709
- const schema2 = isRequired ? convertSchema(propertySchema, false, context, propertyBreadcrumbs, source) : SchemaWithExample.optional({
1210759
+ const schema2 = isRequired ? convertSchema(propertySchema, false, context, propertyBreadcrumbs, source, namespace) : SchemaWithExample.optional({
1210710
1210760
  nameOverride,
1210711
1210761
  generatedName: generatedName2,
1210712
1210762
  description: void 0,
1210713
1210763
  availability: availability2,
1210714
- value: convertSchema(propertySchema, false, context, propertyBreadcrumbs, source),
1210764
+ value: convertSchema(propertySchema, false, context, propertyBreadcrumbs, source, namespace),
1210715
1210765
  groupName
1210716
1210766
  });
1210717
1210767
  const conflicts = {};
@@ -1210802,24 +1210852,24 @@ function wrapObject({ nameOverride, generatedName, wrapAsNullable, properties, d
1210802
1210852
  source
1210803
1210853
  });
1210804
1210854
  }
1210805
- function getAllProperties({ schema: schema2, context, breadcrumbs, source }) {
1210855
+ function getAllProperties({ schema: schema2, context, breadcrumbs, source, namespace }) {
1210806
1210856
  let properties = {};
1210807
1210857
  const [resolvedSchema, resolvedBreadCrumbs] = isReferenceObject(schema2) ? [context.resolveSchemaReference(schema2), getBreadcrumbsFromReference(schema2.$ref)] : [schema2, breadcrumbs];
1210808
1210858
  for (const allOfElement of resolvedSchema.allOf ?? []) {
1210809
1210859
  properties = {
1210810
1210860
  ...properties,
1210811
- ...getAllProperties({ schema: allOfElement, context, breadcrumbs: resolvedBreadCrumbs, source })
1210861
+ ...getAllProperties({ schema: allOfElement, context, breadcrumbs: resolvedBreadCrumbs, source, namespace })
1210812
1210862
  };
1210813
1210863
  }
1210814
1210864
  for (const [propertyName, propertySchema] of Object.entries(resolvedSchema.properties ?? {})) {
1210815
- const convertedPropertySchema = convertSchema(propertySchema, false, context, [...resolvedBreadCrumbs, propertyName], source);
1210865
+ const convertedPropertySchema = convertSchema(propertySchema, false, context, [...resolvedBreadCrumbs, propertyName], source, namespace);
1210816
1210866
  properties[propertyName] = convertedPropertySchema;
1210817
1210867
  }
1210818
1210868
  return properties;
1210819
1210869
  }
1210820
1210870
 
1210821
1210871
  // ../openapi-parser/lib/schema/convertUndiscriminatedOneOf.js
1210822
- function convertUndiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, description, availability, wrapAsNullable, context, subtypes, groupName, encoding, source, subtypePrefixOverrides }) {
1210872
+ function convertUndiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, description, availability, wrapAsNullable, context, subtypes, groupName, encoding, source, subtypePrefixOverrides, namespace }) {
1210823
1210873
  const derivedSubtypePrefixes = getUniqueSubTypeNames({ schemas: subtypes });
1210824
1210874
  const convertedSubtypes = subtypes.flatMap((schema2, index2) => {
1210825
1210875
  if (!isReferenceObject(schema2) && schema2.enum != null) {
@@ -1210841,7 +1210891,9 @@ function convertUndiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs,
1210841
1210891
  subtypePrefix = override.name;
1210842
1210892
  }
1210843
1210893
  }
1210844
- return [convertSchema(schema2, false, context, [...breadcrumbs, subtypePrefix ?? `${index2}`], source)];
1210894
+ return [
1210895
+ convertSchema(schema2, false, context, [...breadcrumbs, subtypePrefix ?? `${index2}`], source, namespace)
1210896
+ ];
1210845
1210897
  });
1210846
1210898
  const uniqueSubtypes = [];
1210847
1210899
  for (let i2 = 0; i2 < convertedSubtypes.length; ++i2) {
@@ -1210904,12 +1210956,12 @@ function convertUndiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs,
1210904
1210956
  source
1210905
1210957
  });
1210906
1210958
  }
1210907
- function convertUndiscriminatedOneOfWithDiscriminant({ nameOverride, generatedName, description, availability, wrapAsNullable, context, groupName, discriminator, encoding, source }) {
1210959
+ function convertUndiscriminatedOneOfWithDiscriminant({ nameOverride, generatedName, description, availability, wrapAsNullable, context, groupName, discriminator, encoding, source, namespace }) {
1210908
1210960
  const convertedSubtypes = Object.entries(discriminator.mapping ?? {}).map(([discriminantValue, schema2], index2) => {
1210909
1210961
  const subtypeReferenceSchema = {
1210910
1210962
  $ref: schema2
1210911
1210963
  };
1210912
- const subtypeReference = convertReferenceObject(subtypeReferenceSchema, false, context, [schema2], encoding, source);
1210964
+ const subtypeReference = convertReferenceObject(subtypeReferenceSchema, false, context, [schema2], encoding, source, namespace);
1210913
1210965
  context.markSchemaWithDiscriminantValue(subtypeReferenceSchema, discriminator.propertyName, discriminantValue);
1210914
1210966
  if (subtypeReference.type === "object") {
1210915
1210967
  subtypeReference.properties = {
@@ -1211119,7 +1211171,7 @@ function getExampleAsArray({ schema: schema2, logger, fallback: fallback2 }) {
1211119
1211171
 
1211120
1211172
  // ../openapi-parser/lib/schema/convertSchemas.js
1211121
1211173
  var SCHEMA_REFERENCE_PREFIX = "#/components/schemas/";
1211122
- function convertSchema(schema2, wrapAsNullable, context, breadcrumbs, source, referencedAsRequest = false, propertiesToExclude = /* @__PURE__ */ new Set(), fallback2) {
1211174
+ function convertSchema(schema2, wrapAsNullable, context, breadcrumbs, source, namespace, referencedAsRequest = false, propertiesToExclude = /* @__PURE__ */ new Set(), fallback2) {
1211123
1211175
  const encoding = getEncoding({ schema: schema2, logger: context.logger });
1211124
1211176
  if (isReferenceObject(schema2)) {
1211125
1211177
  const schemaId = getSchemaIdFromReference(schema2);
@@ -1211129,14 +1211181,14 @@ function convertSchema(schema2, wrapAsNullable, context, breadcrumbs, source, re
1211129
1211181
  } else {
1211130
1211182
  context.markSchemaAsReferencedByRequest(schemaId);
1211131
1211183
  }
1211132
- return convertReferenceObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source);
1211184
+ return convertReferenceObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source, namespace);
1211133
1211185
  }
1211134
- return convertSchemaObject(context.resolveSchemaReference(schema2), wrapAsNullable, context, getBreadcrumbsFromReference(schema2.$ref), encoding, source, propertiesToExclude, referencedAsRequest, fallback2);
1211186
+ return convertSchemaObject(context.resolveSchemaReference(schema2), wrapAsNullable, context, getBreadcrumbsFromReference(schema2.$ref), encoding, source, namespace, propertiesToExclude, referencedAsRequest, fallback2);
1211135
1211187
  }
1211136
- return convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source, propertiesToExclude, referencedAsRequest, fallback2);
1211188
+ return convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source, namespace, propertiesToExclude, referencedAsRequest, fallback2);
1211137
1211189
  }
1211138
- function convertReferenceObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source) {
1211139
- const referenceSchema = schema2.$ref.includes("properties") ? convertSchemaObject(context.resolveSchemaReference(schema2), wrapAsNullable, context, breadcrumbs, encoding, source, /* @__PURE__ */ new Set()) : SchemaWithExample.reference(convertToReferencedSchema(schema2, breadcrumbs, source));
1211190
+ function convertReferenceObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source, namespace) {
1211191
+ const referenceSchema = schema2.$ref.includes("properties") ? convertSchemaObject(context.resolveSchemaReference(schema2), wrapAsNullable, context, breadcrumbs, encoding, source, namespace, /* @__PURE__ */ new Set()) : SchemaWithExample.reference(convertToReferencedSchema(schema2, breadcrumbs, source));
1211140
1211192
  if (wrapAsNullable) {
1211141
1211193
  return SchemaWithExample.nullable({
1211142
1211194
  nameOverride: void 0,
@@ -1211162,11 +1211214,14 @@ function getTitleAsName(title2) {
1211162
1211214
  }
1211163
1211215
  return title2;
1211164
1211216
  }
1211165
- function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source, propertiesToExclude = /* @__PURE__ */ new Set(), referencedAsRequest = false, fallback2) {
1211217
+ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, encoding, source, namespace, propertiesToExclude = /* @__PURE__ */ new Set(), referencedAsRequest = false, fallback2) {
1211166
1211218
  var _a6;
1211167
1211219
  const nameOverride = getExtension(schema2, FernOpenAPIExtension.TYPE_NAME) ?? (context.options.useTitlesAsName ? getTitleAsName(schema2.title) : void 0);
1211168
1211220
  const mixedGroupName = getExtension(schema2, FernOpenAPIExtension.SDK_GROUP_NAME) ?? ((_a6 = getExtension(schema2, OpenAPIExtension.TAGS)) == null ? void 0 : _a6[0]);
1211169
- const groupName = typeof mixedGroupName === "string" ? [mixedGroupName] : mixedGroupName;
1211221
+ let groupName = (typeof mixedGroupName === "string" ? [mixedGroupName] : mixedGroupName) ?? [];
1211222
+ if (namespace != null) {
1211223
+ groupName = [namespace, ...groupName];
1211224
+ }
1211170
1211225
  const generatedName = getGeneratedTypeName(breadcrumbs);
1211171
1211226
  const description = schema2.description;
1211172
1211227
  const availability = convertAvailability2(schema2);
@@ -1211185,7 +1211240,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211185
1211240
  return fernSchema;
1211186
1211241
  }
1211187
1211242
  if (!wrapAsNullable && schema2.nullable === true) {
1211188
- return convertSchemaObject(schema2, true, context, breadcrumbs, encoding, source, propertiesToExclude, referencedAsRequest, fallback2);
1211243
+ return convertSchemaObject(schema2, true, context, breadcrumbs, encoding, source, namespace, propertiesToExclude, referencedAsRequest, fallback2);
1211189
1211244
  }
1211190
1211245
  if (schema2.enum != null && (schema2.type === "string" || schema2.type == null)) {
1211191
1211246
  if (!isListOfStrings(schema2.enum)) {
@@ -1211243,7 +1211298,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211243
1211298
  value: convertSchemaObject({
1211244
1211299
  ...schema2,
1211245
1211300
  type: secondElement
1211246
- }, wrapAsNullable, context, breadcrumbs, encoding, source, propertiesToExclude, referencedAsRequest, fallback2),
1211301
+ }, wrapAsNullable, context, breadcrumbs, encoding, source, namespace, propertiesToExclude, referencedAsRequest, fallback2),
1211247
1211302
  groupName,
1211248
1211303
  description: schema2.description,
1211249
1211304
  availability
@@ -1211255,7 +1211310,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211255
1211310
  value: convertSchemaObject({
1211256
1211311
  ...schema2,
1211257
1211312
  type: firstElement
1211258
- }, wrapAsNullable, context, breadcrumbs, encoding, source, propertiesToExclude, referencedAsRequest, fallback2),
1211313
+ }, wrapAsNullable, context, breadcrumbs, encoding, source, namespace, propertiesToExclude, referencedAsRequest, fallback2),
1211259
1211314
  groupName,
1211260
1211315
  description: schema2.description,
1211261
1211316
  availability
@@ -1211281,7 +1211336,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211281
1211336
  subtypes,
1211282
1211337
  groupName,
1211283
1211338
  encoding,
1211284
- source
1211339
+ source,
1211340
+ namespace
1211285
1211341
  });
1211286
1211342
  }
1211287
1211343
  if (schema2 === "boolean" || schema2.type === "boolean") {
@@ -1211428,7 +1211484,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211428
1211484
  context,
1211429
1211485
  groupName,
1211430
1211486
  example: getExampleAsArray({ schema: schema2, logger: context.logger, fallback: fallback2 }),
1211431
- source
1211487
+ source,
1211488
+ namespace
1211432
1211489
  });
1211433
1211490
  }
1211434
1211491
  if (schema2.additionalProperties != null && schema2.additionalProperties !== false && hasNoProperties(schema2)) {
@@ -1211444,7 +1211501,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211444
1211501
  groupName,
1211445
1211502
  encoding,
1211446
1211503
  example: schema2.example,
1211447
- source
1211504
+ source,
1211505
+ namespace
1211448
1211506
  });
1211449
1211507
  }
1211450
1211508
  if (schema2.type === "object" && schema2.discriminator != null && schema2.discriminator.mapping != null) {
@@ -1211462,7 +1211520,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211462
1211520
  context,
1211463
1211521
  groupName,
1211464
1211522
  encoding,
1211465
- source
1211523
+ source,
1211524
+ namespace
1211466
1211525
  });
1211467
1211526
  } else {
1211468
1211527
  return convertUndiscriminatedOneOfWithDiscriminant({
@@ -1211475,7 +1211534,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211475
1211534
  groupName,
1211476
1211535
  discriminator: schema2.discriminator,
1211477
1211536
  encoding,
1211478
- source
1211537
+ source,
1211538
+ namespace
1211479
1211539
  });
1211480
1211540
  }
1211481
1211541
  }
@@ -1211493,7 +1211553,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211493
1211553
  groupName,
1211494
1211554
  discriminator: schema2.discriminator,
1211495
1211555
  encoding,
1211496
- source
1211556
+ source,
1211557
+ namespace
1211497
1211558
  });
1211498
1211559
  } else {
1211499
1211560
  return convertDiscriminatedOneOf({
@@ -1211509,20 +1211570,21 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211509
1211570
  context,
1211510
1211571
  groupName,
1211511
1211572
  encoding,
1211512
- source
1211573
+ source,
1211574
+ namespace
1211513
1211575
  });
1211514
1211576
  }
1211515
1211577
  } else if (schema2.oneOf.length === 1 && schema2.oneOf[0] != null) {
1211516
- const convertedSchema = convertSchema(schema2.oneOf[0], wrapAsNullable, context, breadcrumbs, source, referencedAsRequest);
1211578
+ const convertedSchema = convertSchema(schema2.oneOf[0], wrapAsNullable, context, breadcrumbs, source, namespace, referencedAsRequest);
1211517
1211579
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, groupName);
1211518
1211580
  } else if (schema2.oneOf.length > 1) {
1211519
1211581
  if (schema2.oneOf.length === 2 && schema2.oneOf[0] != null && schema2.oneOf[1] != null) {
1211520
1211582
  const firstSchema = schema2.oneOf[0];
1211521
1211583
  const secondSchema = schema2.oneOf[1];
1211522
1211584
  if (!isReferenceObject(firstSchema) && firstSchema.type === "null") {
1211523
- return convertSchema(secondSchema, true, context, breadcrumbs, source);
1211585
+ return convertSchema(secondSchema, true, context, breadcrumbs, source, namespace);
1211524
1211586
  } else if (!isReferenceObject(secondSchema) && secondSchema.type === "null") {
1211525
- return convertSchema(firstSchema, true, context, breadcrumbs, source);
1211587
+ return convertSchema(firstSchema, true, context, breadcrumbs, source, namespace);
1211526
1211588
  }
1211527
1211589
  }
1211528
1211590
  const maybeAllEnumValues = getMaybeAllEnumValues({ schemas: schema2.oneOf });
@@ -1211558,7 +1211620,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211558
1211620
  context,
1211559
1211621
  groupName,
1211560
1211622
  encoding,
1211561
- source
1211623
+ source,
1211624
+ namespace
1211562
1211625
  });
1211563
1211626
  }
1211564
1211627
  const hasNullValue = schema2.oneOf.filter((schema3) => {
@@ -1211577,23 +1211640,24 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211577
1211640
  }),
1211578
1211641
  encoding,
1211579
1211642
  groupName,
1211580
- source
1211643
+ source,
1211644
+ namespace
1211581
1211645
  });
1211582
1211646
  }
1211583
1211647
  }
1211584
1211648
  if (schema2.anyOf != null && schema2.anyOf.length > 0) {
1211585
1211649
  if (schema2.anyOf.length === 1 && schema2.anyOf[0] != null) {
1211586
- const convertedSchema = convertSchema(schema2.anyOf[0], wrapAsNullable, context, breadcrumbs, source, referencedAsRequest);
1211650
+ const convertedSchema = convertSchema(schema2.anyOf[0], wrapAsNullable, context, breadcrumbs, source, namespace, referencedAsRequest);
1211587
1211651
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, groupName);
1211588
1211652
  }
1211589
1211653
  if (schema2.anyOf.length === 2) {
1211590
1211654
  const [firstSchema, secondSchema] = schema2.anyOf;
1211591
1211655
  if (firstSchema != null && secondSchema != null) {
1211592
1211656
  if (!isReferenceObject(firstSchema) && firstSchema.type === "null") {
1211593
- const convertedSchema = convertSchema(secondSchema, true, context, breadcrumbs, source);
1211657
+ const convertedSchema = convertSchema(secondSchema, true, context, breadcrumbs, source, namespace);
1211594
1211658
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, groupName);
1211595
1211659
  } else if (!isReferenceObject(secondSchema) && secondSchema.type === "null") {
1211596
- const convertedSchema = convertSchema(firstSchema, true, context, breadcrumbs, source);
1211660
+ const convertedSchema = convertSchema(firstSchema, true, context, breadcrumbs, source, namespace);
1211597
1211661
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, groupName);
1211598
1211662
  }
1211599
1211663
  }
@@ -1211617,7 +1211681,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211617
1211681
  context,
1211618
1211682
  groupName,
1211619
1211683
  encoding,
1211620
- source
1211684
+ source,
1211685
+ namespace
1211621
1211686
  });
1211622
1211687
  }
1211623
1211688
  const hasNullValue = schema2.anyOf.filter((schema3) => {
@@ -1211636,7 +1211701,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211636
1211701
  }),
1211637
1211702
  encoding,
1211638
1211703
  groupName,
1211639
- source
1211704
+ source,
1211705
+ namespace
1211640
1211706
  });
1211641
1211707
  }
1211642
1211708
  if (schema2.allOf != null || schema2.properties != null) {
@@ -1211647,7 +1211713,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211647
1211713
  }
1211648
1211714
  }
1211649
1211715
  if ((schema2.properties == null || schema2.properties.length === 0) && filteredAllOfs.length === 1 && filteredAllOfs[0] != null) {
1211650
- const convertedSchema = convertSchema(filteredAllOfs[0], wrapAsNullable, context, breadcrumbs, source, referencedAsRequest);
1211716
+ const convertedSchema = convertSchema(filteredAllOfs[0], wrapAsNullable, context, breadcrumbs, source, namespace, referencedAsRequest);
1211651
1211717
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, groupName);
1211652
1211718
  }
1211653
1211719
  const filteredAllOfObjects = filteredAllOfs.filter((allOf) => {
@@ -1211658,7 +1211724,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211658
1211724
  return valid2;
1211659
1211725
  });
1211660
1211726
  if ((schema2.properties == null || schema2.properties.length === 0) && filteredAllOfObjects.length === 1 && filteredAllOfObjects[0] != null) {
1211661
- const convertedSchema = convertSchema(filteredAllOfObjects[0], wrapAsNullable, context, breadcrumbs, source, referencedAsRequest);
1211727
+ const convertedSchema = convertSchema(filteredAllOfObjects[0], wrapAsNullable, context, breadcrumbs, source, namespace, referencedAsRequest);
1211662
1211728
  return maybeInjectDescriptionOrGroupName(convertedSchema, description, groupName);
1211663
1211729
  }
1211664
1211730
  return convertObject({
@@ -1211677,7 +1211743,8 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, enco
1211677
1211743
  additionalProperties: schema2.additionalProperties,
1211678
1211744
  availability,
1211679
1211745
  encoding,
1211680
- source
1211746
+ source,
1211747
+ namespace
1211681
1211748
  });
1211682
1211749
  }
1211683
1211750
  if (schema2.type === "object" && hasNoOneOf(schema2) && hasNoAllOf(schema2) && hasNoProperties(schema2)) {
@@ -1211972,12 +1212039,14 @@ var AbstractAsyncAPIV2ParserContext = class {
1211972
1212039
  taskContext;
1211973
1212040
  DUMMY;
1211974
1212041
  options;
1211975
- constructor({ document: document4, taskContext, options: options2 }) {
1212042
+ namespace;
1212043
+ constructor({ document: document4, taskContext, options: options2, namespace }) {
1211976
1212044
  this.document = document4;
1211977
1212045
  this.taskContext = taskContext;
1211978
1212046
  this.logger = taskContext.logger;
1211979
1212047
  this.DUMMY = this;
1211980
1212048
  this.options = options2;
1212049
+ this.namespace = namespace;
1211981
1212050
  }
1211982
1212051
  resolveSchemaReference(schema2) {
1211983
1212052
  var _a6;
@@ -1212032,11 +1212101,12 @@ var AbstractAsyncAPIV2ParserContext = class {
1212032
1212101
  }
1212033
1212102
  };
1212034
1212103
  var AsyncAPIV2ParserContext = class extends AbstractAsyncAPIV2ParserContext {
1212035
- constructor({ document: document4, taskContext, options: options2 }) {
1212104
+ constructor({ document: document4, taskContext, options: options2, namespace }) {
1212036
1212105
  super({
1212037
1212106
  document: document4,
1212038
1212107
  taskContext,
1212039
- options: options2
1212108
+ options: options2,
1212109
+ namespace
1212040
1212110
  });
1212041
1212111
  }
1212042
1212112
  markSchemaAsReferencedByNonRequest(schemaId) {
@@ -1213441,7 +1213511,7 @@ var ExampleWebsocketSessionFactory = class {
1213441
1213511
  this.exampleTypeFactory = new ExampleTypeFactory(schemas);
1213442
1213512
  this.schemas = schemas;
1213443
1213513
  }
1213444
- buildWebsocketSessionExamplesForExtension({ context, extensionExamples, publish: publish2, subscribe, handshake, source }) {
1213514
+ buildWebsocketSessionExamplesForExtension({ context, extensionExamples, publish: publish2, subscribe, handshake, source, namespace }) {
1213445
1213515
  var _a6, _b4;
1213446
1213516
  const result = [];
1213447
1213517
  for (const extensionExample of extensionExamples) {
@@ -1213502,7 +1213572,7 @@ var ExampleWebsocketSessionFactory = class {
1213502
1213572
  });
1213503
1213573
  const resolvedSchema = isReferenceObject(messageSchema.payload) ? context.resolveSchemaReference(messageSchema.payload) : messageSchema.payload;
1213504
1213574
  const example = this.exampleTypeFactory.buildExample({
1213505
- schema: convertSchema(resolvedSchema, false, context, [messageExample.messageId], source),
1213575
+ schema: convertSchema(resolvedSchema, false, context, [messageExample.messageId], source, namespace),
1213506
1213576
  exampleId: void 0,
1213507
1213577
  example: messageExample.value,
1213508
1213578
  options: {
@@ -1213652,9 +1213722,12 @@ function getFernExamples(channel) {
1213652
1213722
  }
1213653
1213723
 
1213654
1213724
  // ../openapi-parser/lib/asyncapi/parse.js
1213655
- function parseAsyncAPI({ document: document4, taskContext, options: options2, source, asyncApiOptions }) {
1213725
+ function parseAsyncAPI({ document: document4, taskContext, options: options2, source, asyncApiOptions, namespace }) {
1213656
1213726
  var _a6, _b4, _c4, _d2;
1213657
1213727
  const breadcrumbs = [];
1213728
+ if (namespace != null) {
1213729
+ breadcrumbs.push(namespace);
1213730
+ }
1213658
1213731
  if (((_a6 = document4.tags) == null ? void 0 : _a6[0]) != null) {
1213659
1213732
  breadcrumbs.push(document4.tags[0].name);
1213660
1213733
  } else if (asyncApiOptions.naming !== "v2") {
@@ -1213663,12 +1213736,13 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213663
1213736
  const context = new AsyncAPIV2ParserContext({
1213664
1213737
  document: document4,
1213665
1213738
  taskContext,
1213666
- options: options2
1213739
+ options: options2,
1213740
+ namespace
1213667
1213741
  });
1213668
1213742
  const schemas = {};
1213669
1213743
  let parsedChannel = void 0;
1213670
1213744
  for (const [schemaId, schema2] of Object.entries(((_b4 = document4.components) == null ? void 0 : _b4.schemas) ?? {})) {
1213671
- const convertedSchema = convertSchema(schema2, false, context, [schemaId], source);
1213745
+ const convertedSchema = convertSchema(schema2, false, context, [schemaId], source, namespace);
1213672
1213746
  schemas[schemaId] = convertedSchema;
1213673
1213747
  }
1213674
1213748
  const exampleFactory = new ExampleWebsocketSessionFactory(schemas, taskContext.logger);
@@ -1213683,7 +1213757,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213683
1213757
  pathParameters.push({
1213684
1213758
  name: name2,
1213685
1213759
  description: parameter.description,
1213686
- schema: parameter.schema != null ? convertSchema(parameter.schema, false, context, breadcrumbs, source) : SchemaWithExample.primitive({
1213760
+ schema: parameter.schema != null ? convertSchema(parameter.schema, false, context, breadcrumbs, source, namespace) : SchemaWithExample.primitive({
1213687
1213761
  schema: PrimitiveSchemaValueWithExample.string({
1213688
1213762
  default: void 0,
1213689
1213763
  pattern: void 0,
@@ -1213711,7 +1213785,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213711
1213785
  const resolvedHeader = isReferenceObject(schema2) ? context.resolveSchemaReference(schema2) : schema2;
1213712
1213786
  headers.push({
1213713
1213787
  name: name2,
1213714
- schema: convertSchema(resolvedHeader, !required.includes(name2), context, breadcrumbs, source),
1213788
+ schema: convertSchema(resolvedHeader, !required.includes(name2), context, breadcrumbs, source, namespace),
1213715
1213789
  description: resolvedHeader.description,
1213716
1213790
  parameterNameOverride: void 0,
1213717
1213791
  env: void 0,
@@ -1213727,7 +1213801,7 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213727
1213801
  const resolvedQueryParameter = isReferenceObject(schema2) ? context.resolveSchemaReference(schema2) : schema2;
1213728
1213802
  queryParameters.push({
1213729
1213803
  name: name2,
1213730
- schema: convertSchema(resolvedQueryParameter, !required.includes(name2), context, breadcrumbs, source),
1213804
+ schema: convertSchema(resolvedQueryParameter, !required.includes(name2), context, breadcrumbs, source, namespace),
1213731
1213805
  description: resolvedQueryParameter.description,
1213732
1213806
  parameterNameOverride: void 0,
1213733
1213807
  availability: convertAvailability2(resolvedQueryParameter),
@@ -1213772,7 +1213846,8 @@ function parseAsyncAPI({ document: document4, taskContext, options: options2, so
1213772
1213846
  },
1213773
1213847
  publish: publishSchema,
1213774
1213848
  subscribe: subscribeSchema,
1213775
- source
1213849
+ source,
1213850
+ namespace
1213776
1213851
  });
1213777
1213852
  } else {
1213778
1213853
  const autogenExample = exampleFactory.buildWebsocketSessionExample({
@@ -1213865,6 +1213940,7 @@ function convertMessageToSchema({ generatedName, event, context, breadcrumbs, so
1213865
1213940
  context,
1213866
1213941
  encoding: void 0,
1213867
1213942
  source,
1213943
+ namespace: context.namespace,
1213868
1213944
  subtypePrefixOverrides: asyncApiOptions.naming === "v2" ? prefixes : []
1213869
1213945
  });
1213870
1213946
  }
@@ -1214172,7 +1214248,8 @@ var AbstractOpenAPIV3ParserContext = class {
1214172
1214248
  DUMMY;
1214173
1214249
  options;
1214174
1214250
  source;
1214175
- constructor({ document: document4, taskContext, authHeaders, options: options2, source }) {
1214251
+ namespace;
1214252
+ constructor({ document: document4, taskContext, authHeaders, options: options2, source, namespace }) {
1214176
1214253
  this.document = document4;
1214177
1214254
  this.logger = taskContext.logger;
1214178
1214255
  this.taskContext = taskContext;
@@ -1214181,10 +1214258,15 @@ var AbstractOpenAPIV3ParserContext = class {
1214181
1214258
  this.options = options2;
1214182
1214259
  this.source = source;
1214183
1214260
  this.DUMMY = this.getDummy();
1214261
+ this.namespace = namespace;
1214184
1214262
  }
1214185
1214263
  getNumberOfOccurrencesForRef(schema2) {
1214186
1214264
  return this.refOccurrences[schema2.$ref] ?? 0;
1214187
1214265
  }
1214266
+ resolveTags(operationTags) {
1214267
+ const tags = this.namespace ? [this.namespace] : [];
1214268
+ return tags.concat(operationTags ?? []);
1214269
+ }
1214188
1214270
  resolveSchemaReference(schema2) {
1214189
1214271
  const keys7 = schema2.$ref.substring(2).split("/").map((key) => key.replace(/~1/g, "/"));
1214190
1214272
  let resolvedSchema = this.document;
@@ -1214279,13 +1214361,14 @@ var AbstractOpenAPIV3ParserContext = class {
1214279
1214361
 
1214280
1214362
  // ../openapi-parser/lib/openapi/v3/DummyOpenAPIV3ParserContext.js
1214281
1214363
  var DummyOpenAPIV3ParserContext = class extends AbstractOpenAPIV3ParserContext {
1214282
- constructor({ document: document4, taskContext, options: options2, source }) {
1214364
+ constructor({ document: document4, taskContext, options: options2, source, namespace }) {
1214283
1214365
  super({
1214284
1214366
  document: document4,
1214285
1214367
  taskContext,
1214286
1214368
  authHeaders: /* @__PURE__ */ new Set(),
1214287
1214369
  options: options2,
1214288
- source
1214370
+ source,
1214371
+ namespace
1214289
1214372
  });
1214290
1214373
  }
1214291
1214374
  getDummy() {
@@ -1214476,7 +1214559,7 @@ function convertParameters({ path: path45, httpMethod, parameters, context, requ
1214476
1214559
  if ((_a6 = getExamplesString({ schema: resolvedParameter, logger: context.logger })) == null ? void 0 : _a6.includes(" ")) {
1214477
1214560
  context.logger.warn("Parameter example contains a space, which is ambiguous. Consider using enums for multiple examples, or use an encoding if a space is part of the parameter.");
1214478
1214561
  }
1214479
- let schema2 = resolvedParameter.schema != null ? convertSchema(resolvedParameter.schema, !isRequired, context, parameterBreadcrumbs, source, false, /* @__PURE__ */ new Set(), getExamplesString({
1214562
+ let schema2 = resolvedParameter.schema != null ? convertSchema(resolvedParameter.schema, !isRequired, context, parameterBreadcrumbs, source, context.namespace, false, /* @__PURE__ */ new Set(), getExamplesString({
1214480
1214563
  schema: resolvedParameter,
1214481
1214564
  logger: context.logger
1214482
1214565
  })) : isRequired ? SchemaWithExample.primitive({
@@ -1214655,7 +1214738,7 @@ function multipartRequestHasFile(multipartSchema, document4) {
1214655
1214738
  return !isReferenceObject(definition3) && definition3.type === "string" && definition3.format === "binary";
1214656
1214739
  }) != null;
1214657
1214740
  }
1214658
- function convertRequest({ requestBody, document: document4, context, requestBreadcrumbs, source }) {
1214741
+ function convertRequest({ requestBody, document: document4, context, requestBreadcrumbs, source, namespace }) {
1214659
1214742
  const resolvedRequestBody = isReferenceObject(requestBody) ? context.resolveRequestBodyReference(requestBody) : requestBody;
1214660
1214743
  const multipartSchema = getMultipartFormDataRequest(resolvedRequestBody);
1214661
1214744
  const jsonMediaObject = getApplicationJsonSchemaMediaObject(resolvedRequestBody.content, context);
@@ -1214670,7 +1214753,7 @@ function convertRequest({ requestBody, document: document4, context, requestBrea
1214670
1214753
  id: void 0,
1214671
1214754
  schema: multipartSchema
1214672
1214755
  };
1214673
- const convertedMultipartSchema = convertSchema(resolvedMultipartSchema.schema, false, context, requestBreadcrumbs, source);
1214756
+ const convertedMultipartSchema = convertSchema(resolvedMultipartSchema.schema, false, context, requestBreadcrumbs, source, namespace);
1214674
1214757
  const properties = [];
1214675
1214758
  if (convertedMultipartSchema.type === "object") {
1214676
1214759
  for (const property5 of convertedMultipartSchema.properties) {
@@ -1214723,7 +1214806,7 @@ function convertRequest({ requestBody, document: document4, context, requestBrea
1214723
1214806
  if (jsonMediaObject == null) {
1214724
1214807
  return void 0;
1214725
1214808
  }
1214726
- const requestSchema = convertSchema(jsonMediaObject.schema, false, context, requestBreadcrumbs, source, true);
1214809
+ const requestSchema = convertSchema(jsonMediaObject.schema, false, context, requestBreadcrumbs, source, namespace, true);
1214727
1214810
  return RequestWithExample.json({
1214728
1214811
  description: void 0,
1214729
1214812
  schema: requestSchema,
@@ -1214814,7 +1214897,7 @@ function convertResponse({ operationContext, responses, context, responseBreadcr
1214814
1214897
  if (responses == null) {
1214815
1214898
  return { value: void 0, errors: {} };
1214816
1214899
  }
1214817
- const errors2 = markErrorSchemas({ responses, context, source });
1214900
+ const errors2 = markErrorSchemas({ responses, context, source, namespace: context.namespace });
1214818
1214901
  let successStatusCodePresent = false;
1214819
1214902
  let convertedResponse = void 0;
1214820
1214903
  for (const statusCode of responseStatusCode != null ? [responseStatusCode] : SUCCESSFUL_STATUS_CODES) {
@@ -1214830,7 +1214913,8 @@ function convertResponse({ operationContext, responses, context, responseBreadcr
1214830
1214913
  context,
1214831
1214914
  responseBreadcrumbs,
1214832
1214915
  streamFormat,
1214833
- source
1214916
+ source,
1214917
+ namespace: context.namespace
1214834
1214918
  });
1214835
1214919
  }
1214836
1214920
  }
@@ -1214841,7 +1214925,8 @@ function convertResponse({ operationContext, responses, context, responseBreadcr
1214841
1214925
  context,
1214842
1214926
  responseBreadcrumbs,
1214843
1214927
  streamFormat,
1214844
- source
1214928
+ source,
1214929
+ namespace: context.namespace
1214845
1214930
  });
1214846
1214931
  }
1214847
1214932
  if (convertedResponse != null) {
@@ -1214873,7 +1214958,7 @@ function convertResponse({ operationContext, responses, context, responseBreadcr
1214873
1214958
  errors: errors2
1214874
1214959
  };
1214875
1214960
  }
1214876
- function convertResolvedResponse({ operationContext, streamFormat, response, context, responseBreadcrumbs, source }) {
1214961
+ function convertResolvedResponse({ operationContext, streamFormat, response, context, responseBreadcrumbs, source, namespace }) {
1214877
1214962
  const resolvedResponse = isReferenceObject(response) ? context.resolveResponseReference(response) : response;
1214878
1214963
  if (resolvedResponse.content != null) {
1214879
1214964
  const isdownloadFile = Object.entries(resolvedResponse.content).find(([_4, mediaObject]) => {
@@ -1214895,21 +1214980,21 @@ function convertResolvedResponse({ operationContext, streamFormat, response, con
1214895
1214980
  return ResponseWithExample.streamingJson({
1214896
1214981
  description: resolvedResponse.description,
1214897
1214982
  responseProperty: void 0,
1214898
- schema: convertSchemaWithExampleToSchema(convertSchema(jsonMediaObject.schema, false, context, responseBreadcrumbs, source)),
1214983
+ schema: convertSchemaWithExampleToSchema(convertSchema(jsonMediaObject.schema, false, context, responseBreadcrumbs, source, namespace)),
1214899
1214984
  source
1214900
1214985
  });
1214901
1214986
  case "sse":
1214902
1214987
  return ResponseWithExample.streamingSse({
1214903
1214988
  description: resolvedResponse.description,
1214904
1214989
  responseProperty: void 0,
1214905
- schema: convertSchemaWithExampleToSchema(convertSchema(jsonMediaObject.schema, false, context, responseBreadcrumbs, source)),
1214990
+ schema: convertSchemaWithExampleToSchema(convertSchema(jsonMediaObject.schema, false, context, responseBreadcrumbs, source, namespace)),
1214906
1214991
  source
1214907
1214992
  });
1214908
1214993
  }
1214909
1214994
  }
1214910
1214995
  return ResponseWithExample.json({
1214911
1214996
  description: resolvedResponse.description,
1214912
- schema: convertSchema(jsonMediaObject.schema, false, context, responseBreadcrumbs, source),
1214997
+ schema: convertSchema(jsonMediaObject.schema, false, context, responseBreadcrumbs, source, namespace),
1214913
1214998
  responseProperty: getExtension(operationContext.operation, FernOpenAPIExtension.RESPONSE_PROPERTY),
1214914
1214999
  fullExamples: jsonMediaObject.examples,
1214915
1215000
  source
@@ -1214937,7 +1215022,7 @@ function convertResolvedResponse({ operationContext, streamFormat, response, con
1214937
1215022
  }
1214938
1215023
  return void 0;
1214939
1215024
  }
1214940
- function markErrorSchemas({ responses, context, source }) {
1215025
+ function markErrorSchemas({ responses, context, source, namespace }) {
1214941
1215026
  const errors2 = {};
1214942
1215027
  for (const [statusCode, response] of Object.entries(responses)) {
1214943
1215028
  if (statusCode === "default") {
@@ -1214959,7 +1215044,7 @@ function markErrorSchemas({ responses, context, source }) {
1214959
1215044
  nameOverride: void 0,
1214960
1215045
  generatedName: errorName,
1214961
1215046
  description: resolvedResponse.description,
1214962
- schema: convertSchema((mediaObject == null ? void 0 : mediaObject.schema) ?? {}, false, context, [errorName, "Body"], source),
1215047
+ schema: convertSchema((mediaObject == null ? void 0 : mediaObject.schema) ?? {}, false, context, [errorName, "Body"], source, namespace),
1214963
1215048
  fullExamples: mediaObject == null ? void 0 : mediaObject.examples,
1214964
1215049
  source
1214965
1215050
  };
@@ -1214991,10 +1215076,12 @@ function convertHttpOperation({ operationContext, context, responseStatusCode, s
1214991
1215076
  document: context.document,
1214992
1215077
  taskContext: context.taskContext,
1214993
1215078
  options: context.options,
1214994
- source: context.source
1215079
+ source: context.source,
1215080
+ namespace: context.namespace
1214995
1215081
  }),
1214996
1215082
  requestBreadcrumbs,
1214997
- source
1215083
+ source,
1215084
+ namespace: context.namespace
1214998
1215085
  }) : void 0;
1214999
1215086
  if ((convertedParameters.queryParameters.length > 0 || convertedParameters.headers.length > 0) && convertedRequest != null && convertedRequest.type === "json" && convertedRequest.schema.type !== "object" && operation.requestBody != null) {
1215000
1215087
  convertedRequest = convertRequest({
@@ -1215002,7 +1215089,8 @@ function convertHttpOperation({ operationContext, context, responseStatusCode, s
1215002
1215089
  document: document4,
1215003
1215090
  context,
1215004
1215091
  requestBreadcrumbs: [...requestBreadcrumbs, "Body"],
1215005
- source
1215092
+ source,
1215093
+ namespace: context.namespace
1215006
1215094
  });
1215007
1215095
  } else if (operation.requestBody != null) {
1215008
1215096
  convertedRequest = convertRequest({
@@ -1215010,7 +1215098,8 @@ function convertHttpOperation({ operationContext, context, responseStatusCode, s
1215010
1215098
  document: document4,
1215011
1215099
  context,
1215012
1215100
  requestBreadcrumbs: [...requestBreadcrumbs],
1215013
- source
1215101
+ source,
1215102
+ namespace: context.namespace
1215014
1215103
  });
1215015
1215104
  }
1215016
1215105
  const responseBreadcrumbs = [...baseBreadcrumbs, "Response"];
@@ -1215031,7 +1215120,7 @@ function convertHttpOperation({ operationContext, context, responseStatusCode, s
1215031
1215120
  idempotent,
1215032
1215121
  audiences: getExtension(operation, FernOpenAPIExtension.AUDIENCES) ?? [],
1215033
1215122
  operationId: operation.operationId != null && suffix != null ? operation.operationId + "_" + suffix : operation.operationId,
1215034
- tags: operation.tags ?? [],
1215123
+ tags: context.resolveTags(operation.tags),
1215035
1215124
  sdkName: sdkMethodName,
1215036
1215125
  pathParameters: convertedParameters.pathParameters,
1215037
1215126
  queryParameters: convertedParameters.queryParameters,
@@ -1215314,7 +1215403,8 @@ function convertWebhookOperation({ context, operationContext, source }) {
1215314
1215403
  document: document4,
1215315
1215404
  context,
1215316
1215405
  requestBreadcrumbs: [...baseBreadcrumbs, "Payload"],
1215317
- source
1215406
+ source,
1215407
+ namespace: context.namespace
1215318
1215408
  });
1215319
1215409
  if (convertedPayload == null || convertedPayload.type !== "json") {
1215320
1215410
  context.logger.error(`Skipping webhook ${path45} because non-json request body`);
@@ -1215329,7 +1215419,7 @@ function convertWebhookOperation({ context, operationContext, source }) {
1215329
1215419
  sdkName: sdkMethodName,
1215330
1215420
  method,
1215331
1215421
  operationId: operation.operationId,
1215332
- tags: operation.tags ?? [],
1215422
+ tags: context.resolveTags(operation.tags),
1215333
1215423
  headers: convertedParameters.headers,
1215334
1215424
  generatedPayloadName: getGeneratedTypeName(payloadBreadcrumbs),
1215335
1215425
  payload: convertedPayload.schema,
@@ -1215364,7 +1215454,7 @@ function convertOperation({ context, pathItemContext, operation, convertToWebhoo
1215364
1215454
  context.logger.info(`${pathItemContext.method.toUpperCase()} ${pathItemContext.path} is marked with x-fern-ignore. Skipping.`);
1215365
1215455
  return void 0;
1215366
1215456
  }
1215367
- const sdkMethodName = getSdkGroupAndMethod(operation);
1215457
+ const sdkMethodName = getSdkGroupAndMethod(operation, context.namespace);
1215368
1215458
  const pagination = getFernPaginationExtension(context.document, operation);
1215369
1215459
  const operationContext = {
1215370
1215460
  ...pathItemContext,
@@ -1215422,12 +1215512,16 @@ function convertOperation({ context, pathItemContext, operation, convertToWebhoo
1215422
1215512
  });
1215423
1215513
  return { type: "http", value: convertedHttpOperation };
1215424
1215514
  }
1215425
- function getSdkGroupAndMethod(operation) {
1215515
+ function getSdkGroupAndMethod(operation, namespace) {
1215426
1215516
  const sdkMethodName = getExtension(operation, FernOpenAPIExtension.SDK_METHOD_NAME);
1215427
1215517
  const sdkGroupName = getExtension(operation, FernOpenAPIExtension.SDK_GROUP_NAME) ?? [];
1215428
1215518
  if (sdkMethodName != null) {
1215519
+ let groupName = typeof sdkGroupName === "string" ? [sdkGroupName] : sdkGroupName;
1215520
+ if (namespace != null) {
1215521
+ groupName = [namespace, ...groupName];
1215522
+ }
1215429
1215523
  return {
1215430
- groupName: typeof sdkGroupName === "string" ? [sdkGroupName] : sdkGroupName,
1215524
+ groupName,
1215431
1215525
  methodName: sdkMethodName
1215432
1215526
  };
1215433
1215527
  }
@@ -1215738,13 +1215832,14 @@ var OpenAPIV3ParserContext = class extends AbstractOpenAPIV3ParserContext {
1215738
1215832
  discrminatedUnionReferences = {};
1215739
1215833
  discrminatedUnionMetadata = {};
1215740
1215834
  schemasToExclude = /* @__PURE__ */ new Set();
1215741
- constructor({ document: document4, taskContext, authHeaders, options: options2, source }) {
1215835
+ constructor({ document: document4, taskContext, authHeaders, options: options2, source, namespace }) {
1215742
1215836
  super({
1215743
1215837
  document: document4,
1215744
1215838
  taskContext,
1215745
1215839
  authHeaders,
1215746
1215840
  options: options2,
1215747
- source
1215841
+ source,
1215842
+ namespace
1215748
1215843
  });
1215749
1215844
  }
1215750
1215845
  getDummy() {
@@ -1215752,7 +1215847,8 @@ var OpenAPIV3ParserContext = class extends AbstractOpenAPIV3ParserContext {
1215752
1215847
  document: this.document,
1215753
1215848
  taskContext: this.taskContext,
1215754
1215849
  options: this.options,
1215755
- source: this.source
1215850
+ source: this.source,
1215851
+ namespace: this.namespace
1215756
1215852
  });
1215757
1215853
  }
1215758
1215854
  markSchemaAsReferencedByNonRequest(schemaId) {
@@ -1215887,7 +1215983,7 @@ function replaceWithSchemaReference({ openapi, replaceReference, schemaReference
1215887
1215983
  }
1215888
1215984
 
1215889
1215985
  // ../openapi-parser/lib/openapi/v3/generateIr.js
1215890
- function generateIr({ openApi, taskContext, options: options2, source }) {
1215986
+ function generateIr({ openApi, taskContext, options: options2, source, namespace }) {
1215891
1215987
  var _a6, _b4, _c4;
1215892
1215988
  openApi = runResolutions({ openapi: openApi });
1215893
1215989
  const securitySchemes = Object.fromEntries(Object.entries(((_a6 = openApi.components) == null ? void 0 : _a6.securitySchemes) ?? {}).map(([key, securityScheme]) => {
@@ -1215910,7 +1216006,8 @@ function generateIr({ openApi, taskContext, options: options2, source }) {
1215910
1216006
  taskContext,
1215911
1216007
  authHeaders,
1215912
1216008
  options: options2,
1215913
- source
1216009
+ source,
1216010
+ namespace
1215914
1216011
  });
1215915
1216012
  const variables = getVariableDefinitions(openApi);
1215916
1216013
  const globalHeaders = getGlobalHeaders(openApi);
@@ -1215979,12 +1216076,13 @@ function generateIr({ openApi, taskContext, options: options2, source }) {
1215979
1216076
  false,
1215980
1216077
  context,
1215981
1216078
  [key],
1215982
- source
1216079
+ source,
1216080
+ namespace
1215983
1216081
  )
1215984
1216082
  ];
1215985
1216083
  }
1215986
1216084
  }
1215987
- return [key, convertSchema(schema2, false, context, [key], source)];
1216085
+ return [key, convertSchema(schema2, false, context, [key], source, namespace)];
1215988
1216086
  }).filter((entry) => entry.length > 0));
1215989
1216087
  const schemasWithoutDiscriminants = maybeRemoveDiscriminantsFromSchemas(schemasWithExample, context, source);
1215990
1216088
  const schemasWithDiscriminants = maybeAddBackDiscriminantsFromSchemas(schemasWithoutDiscriminants, context);
@@ -1216233,13 +1216331,14 @@ function getAudiences({ operation }) {
1216233
1216331
  }
1216234
1216332
 
1216235
1216333
  // ../openapi-parser/lib/openapi/v2/generateIr.js
1216236
- async function generateIr2({ openApi, taskContext, options: options2, source }) {
1216334
+ async function generateIr2({ openApi, taskContext, options: options2, source, namespace }) {
1216237
1216335
  const conversionResult = await (0, import_swagger2openapi.convertObj)(openApi, {});
1216238
1216336
  return generateIr({
1216239
1216337
  openApi: conversionResult.openapi,
1216240
1216338
  taskContext,
1216241
1216339
  options: options2,
1216242
- source
1216340
+ source,
1216341
+ namespace
1216243
1216342
  });
1216244
1216343
  }
1216245
1216344
 
@@ -1216290,7 +1216389,8 @@ async function parse3({ absoluteFilePathToWorkspace, specs, taskContext, optionO
1216290
1216389
  openApi: openApiDocument,
1216291
1216390
  taskContext,
1216292
1216391
  options: getParseOptions({ specSettings: spec.settings, overrides: optionOverrides }),
1216293
- source
1216392
+ source,
1216393
+ namespace: spec.namespace
1216294
1216394
  });
1216295
1216395
  ir = merge2(ir, openapiIr);
1216296
1216396
  } else if (isOpenApiV2(openApiDocument)) {
@@ -1216298,7 +1216398,8 @@ async function parse3({ absoluteFilePathToWorkspace, specs, taskContext, optionO
1216298
1216398
  openApi: openApiDocument,
1216299
1216399
  taskContext,
1216300
1216400
  options: getParseOptions({ specSettings: spec.settings }),
1216301
- source
1216401
+ source,
1216402
+ namespace: spec.namespace
1216302
1216403
  });
1216303
1216404
  ir = merge2(ir, openapiIr);
1216304
1216405
  }
@@ -1216313,7 +1216414,8 @@ async function parse3({ absoluteFilePathToWorkspace, specs, taskContext, optionO
1216313
1216414
  taskContext,
1216314
1216415
  options: getParseOptions({ specSettings: spec.settings }),
1216315
1216416
  source,
1216316
- asyncApiOptions: getParseAsyncOptions({ specSettings: spec.settings })
1216417
+ asyncApiOptions: getParseAsyncOptions({ specSettings: spec.settings }),
1216418
+ namespace: spec.namespace
1216317
1216419
  });
1216318
1216420
  if (parsedAsyncAPI.channel != null) {
1216319
1216421
  ir.channel.push(parsedAsyncAPI.channel);
@@ -1218694,7 +1218796,7 @@ var OSSWorkspace = class extends AbstractAPIWorkspace {
1218694
1218796
  rawContents: js_yaml_default.dump(definition3.rootApiFile)
1218695
1218797
  },
1218696
1218798
  namedDefinitionFiles: {
1218697
- ...mapValues2(definition3.definitionFiles, (definitionFile) => ({
1218799
+ ...mapValues3(definition3.definitionFiles, (definitionFile) => ({
1218698
1218800
  absoluteFilepath: AbsoluteFilePath.of("/DUMMY_PATH"),
1218699
1218801
  rawContents: js_yaml_default.dump(definitionFile),
1218700
1218802
  contents: definitionFile
@@ -1218802,99 +1218904,127 @@ function getOptionsOverridesFromSettings(settings) {
1218802
1218904
  }
1218803
1218905
  return result;
1218804
1218906
  }
1218805
- function mapValues2(items, mapper) {
1218907
+ function mapValues3(items, mapper) {
1218806
1218908
  return mapValues_default(items, mapper);
1218807
1218909
  }
1218808
1218910
 
1218809
1218911
  // ../workspace-loader/lib/loadAPIWorkspace.js
1218810
- async function loadAPIWorkspace({ absolutePathToWorkspace, context, cliVersion, workspaceName }) {
1218912
+ async function loadSingleNamespaceAPIWorkspace({ absolutePathToWorkspace, namespace, definitions }) {
1218811
1218913
  var _a6, _b4, _c4, _d2, _e;
1218812
- const generatorsConfiguration = await generators_yml_exports.loadGeneratorsConfiguration({
1218813
- absolutePathToWorkspace,
1218814
- context
1218815
- });
1218816
- const changelog = void 0;
1218817
- const absolutePathToOpenAPIFolder = join(absolutePathToWorkspace, RelativeFilePath.of(OPENAPI_DIRECTORY));
1218818
- const openApiDirectoryExists = await doesPathExist(absolutePathToOpenAPIFolder);
1218819
- const absolutePathToAsyncAPIFolder = join(absolutePathToWorkspace, RelativeFilePath.of(ASYNCAPI_DIRECTORY));
1218820
- const asyncApiDirectoryExists = await doesPathExist(absolutePathToAsyncAPIFolder);
1218821
- if ((generatorsConfiguration == null ? void 0 : generatorsConfiguration.api) != null && generatorsConfiguration.api.definitions.length > 0) {
1218822
- const specs = [];
1218823
- for (const definition3 of generatorsConfiguration.api.definitions) {
1218824
- const absoluteFilepathToOverrides = definition3.overrides != null ? join(absolutePathToWorkspace, RelativeFilePath.of(definition3.overrides)) : void 0;
1218825
- if (definition3.schema.type === "protobuf") {
1218826
- const absoluteFilepathToProtobufRoot = join(absolutePathToWorkspace, RelativeFilePath.of(definition3.schema.root));
1218827
- if (!await doesPathExist(absoluteFilepathToProtobufRoot)) {
1218828
- return {
1218829
- didSucceed: false,
1218830
- failures: {
1218831
- [RelativeFilePath.of(definition3.schema.root)]: {
1218832
- type: WorkspaceLoaderFailureType.FILE_MISSING
1218833
- }
1218834
- }
1218835
- };
1218836
- }
1218837
- const absoluteFilepathToProtobufTarget = join(absolutePathToWorkspace, RelativeFilePath.of(definition3.schema.target));
1218838
- if (!await doesPathExist(absoluteFilepathToProtobufTarget)) {
1218839
- return {
1218840
- didSucceed: false,
1218841
- failures: {
1218842
- [RelativeFilePath.of(definition3.schema.target)]: {
1218843
- type: WorkspaceLoaderFailureType.FILE_MISSING
1218844
- }
1218845
- }
1218846
- };
1218847
- }
1218848
- specs.push({
1218849
- type: "protobuf",
1218850
- absoluteFilepathToProtobufRoot,
1218851
- absoluteFilepathToProtobufTarget,
1218852
- absoluteFilepathToOverrides,
1218853
- generateLocally: definition3.schema.localGeneration,
1218854
- settings: {
1218855
- audiences: definition3.audiences ?? [],
1218856
- shouldUseTitleAsName: ((_a6 = definition3.settings) == null ? void 0 : _a6.shouldUseTitleAsName) ?? true,
1218857
- shouldUseUndiscriminatedUnionsWithLiterals: ((_b4 = definition3.settings) == null ? void 0 : _b4.shouldUseUndiscriminatedUnionsWithLiterals) ?? false
1218858
- }
1218859
- });
1218860
- continue;
1218861
- }
1218862
- const absoluteFilepath = join(absolutePathToWorkspace, RelativeFilePath.of(definition3.schema.path));
1218863
- if (!await doesPathExist(absoluteFilepath)) {
1218914
+ const specs = [];
1218915
+ for (const definition3 of definitions) {
1218916
+ const absoluteFilepathToOverrides = definition3.overrides != null ? join(absolutePathToWorkspace, RelativeFilePath.of(definition3.overrides)) : void 0;
1218917
+ if (definition3.schema.type === "protobuf") {
1218918
+ const absoluteFilepathToProtobufRoot = join(absolutePathToWorkspace, RelativeFilePath.of(definition3.schema.root));
1218919
+ if (!await doesPathExist(absoluteFilepathToProtobufRoot)) {
1218864
1218920
  return {
1218865
1218921
  didSucceed: false,
1218866
1218922
  failures: {
1218867
- [RelativeFilePath.of(definition3.schema.path)]: {
1218923
+ [RelativeFilePath.of(definition3.schema.root)]: {
1218868
1218924
  type: WorkspaceLoaderFailureType.FILE_MISSING
1218869
1218925
  }
1218870
1218926
  }
1218871
1218927
  };
1218872
1218928
  }
1218873
- if (definition3.overrides != null && absoluteFilepathToOverrides != null && !await doesPathExist(absoluteFilepathToOverrides)) {
1218929
+ const absoluteFilepathToProtobufTarget = join(absolutePathToWorkspace, RelativeFilePath.of(definition3.schema.target));
1218930
+ if (!await doesPathExist(absoluteFilepathToProtobufTarget)) {
1218874
1218931
  return {
1218875
1218932
  didSucceed: false,
1218876
1218933
  failures: {
1218877
- [RelativeFilePath.of(definition3.overrides)]: {
1218934
+ [RelativeFilePath.of(definition3.schema.target)]: {
1218878
1218935
  type: WorkspaceLoaderFailureType.FILE_MISSING
1218879
1218936
  }
1218880
1218937
  }
1218881
1218938
  };
1218882
1218939
  }
1218883
1218940
  specs.push({
1218884
- type: "openapi",
1218885
- absoluteFilepath,
1218941
+ type: "protobuf",
1218942
+ absoluteFilepathToProtobufRoot,
1218943
+ absoluteFilepathToProtobufTarget,
1218886
1218944
  absoluteFilepathToOverrides,
1218945
+ generateLocally: definition3.schema.localGeneration,
1218887
1218946
  settings: {
1218888
1218947
  audiences: definition3.audiences ?? [],
1218889
- shouldUseTitleAsName: ((_c4 = definition3.settings) == null ? void 0 : _c4.shouldUseTitleAsName) ?? true,
1218890
- shouldUseUndiscriminatedUnionsWithLiterals: ((_d2 = definition3.settings) == null ? void 0 : _d2.shouldUseUndiscriminatedUnionsWithLiterals) ?? false,
1218891
- asyncApiNaming: (_e = definition3.settings) == null ? void 0 : _e.asyncApiMessageNaming
1218892
- },
1218893
- source: {
1218894
- type: "openapi",
1218895
- file: absoluteFilepath
1218948
+ shouldUseTitleAsName: ((_a6 = definition3.settings) == null ? void 0 : _a6.shouldUseTitleAsName) ?? true,
1218949
+ shouldUseUndiscriminatedUnionsWithLiterals: ((_b4 = definition3.settings) == null ? void 0 : _b4.shouldUseUndiscriminatedUnionsWithLiterals) ?? false
1218950
+ }
1218951
+ });
1218952
+ continue;
1218953
+ }
1218954
+ const absoluteFilepath = join(absolutePathToWorkspace, RelativeFilePath.of(definition3.schema.path));
1218955
+ if (!await doesPathExist(absoluteFilepath)) {
1218956
+ return {
1218957
+ didSucceed: false,
1218958
+ failures: {
1218959
+ [RelativeFilePath.of(definition3.schema.path)]: {
1218960
+ type: WorkspaceLoaderFailureType.FILE_MISSING
1218961
+ }
1218896
1218962
  }
1218963
+ };
1218964
+ }
1218965
+ if (definition3.overrides != null && absoluteFilepathToOverrides != null && !await doesPathExist(absoluteFilepathToOverrides)) {
1218966
+ return {
1218967
+ didSucceed: false,
1218968
+ failures: {
1218969
+ [RelativeFilePath.of(definition3.overrides)]: {
1218970
+ type: WorkspaceLoaderFailureType.FILE_MISSING
1218971
+ }
1218972
+ }
1218973
+ };
1218974
+ }
1218975
+ specs.push({
1218976
+ type: "openapi",
1218977
+ absoluteFilepath,
1218978
+ absoluteFilepathToOverrides,
1218979
+ settings: {
1218980
+ audiences: definition3.audiences ?? [],
1218981
+ shouldUseTitleAsName: ((_c4 = definition3.settings) == null ? void 0 : _c4.shouldUseTitleAsName) ?? true,
1218982
+ shouldUseUndiscriminatedUnionsWithLiterals: ((_d2 = definition3.settings) == null ? void 0 : _d2.shouldUseUndiscriminatedUnionsWithLiterals) ?? false,
1218983
+ asyncApiNaming: (_e = definition3.settings) == null ? void 0 : _e.asyncApiMessageNaming
1218984
+ },
1218985
+ source: {
1218986
+ type: "openapi",
1218987
+ file: absoluteFilepath
1218988
+ },
1218989
+ namespace
1218990
+ });
1218991
+ }
1218992
+ return specs;
1218993
+ }
1218994
+ async function loadAPIWorkspace({ absolutePathToWorkspace, context, cliVersion, workspaceName }) {
1218995
+ const generatorsConfiguration = await generators_yml_exports.loadGeneratorsConfiguration({
1218996
+ absolutePathToWorkspace,
1218997
+ context
1218998
+ });
1218999
+ const changelog = void 0;
1219000
+ const absolutePathToOpenAPIFolder = join(absolutePathToWorkspace, RelativeFilePath.of(OPENAPI_DIRECTORY));
1219001
+ const openApiDirectoryExists = await doesPathExist(absolutePathToOpenAPIFolder);
1219002
+ const absolutePathToAsyncAPIFolder = join(absolutePathToWorkspace, RelativeFilePath.of(ASYNCAPI_DIRECTORY));
1219003
+ const asyncApiDirectoryExists = await doesPathExist(absolutePathToAsyncAPIFolder);
1219004
+ if ((generatorsConfiguration == null ? void 0 : generatorsConfiguration.api) != null && (generatorsConfiguration.api.type === "singleNamespace" && generatorsConfiguration.api.definitions.length > 0 || generatorsConfiguration.api.type === "multiNamespace")) {
1219005
+ const specs = [];
1219006
+ if (generatorsConfiguration.api.type === "singleNamespace") {
1219007
+ const maybeSpecs = await loadSingleNamespaceAPIWorkspace({
1219008
+ absolutePathToWorkspace,
1219009
+ namespace: void 0,
1219010
+ definitions: generatorsConfiguration.api.definitions
1218897
1219011
  });
1219012
+ if (!Array.isArray(maybeSpecs)) {
1219013
+ return maybeSpecs;
1219014
+ }
1219015
+ specs.push(...maybeSpecs);
1219016
+ } else {
1219017
+ for (const [namespace, definitions] of Object.entries(generatorsConfiguration.api.definitions)) {
1219018
+ const maybeSpecs = await loadSingleNamespaceAPIWorkspace({
1219019
+ absolutePathToWorkspace,
1219020
+ namespace,
1219021
+ definitions
1219022
+ });
1219023
+ if (!Array.isArray(maybeSpecs)) {
1219024
+ return maybeSpecs;
1219025
+ }
1219026
+ specs.push(...maybeSpecs);
1219027
+ }
1218898
1219028
  }
1218899
1219029
  return {
1218900
1219030
  didSucceed: true,
@@ -1222611,10 +1222741,10 @@ var CliContext = class {
1222611
1222741
  return "fern-api";
1222612
1222742
  }
1222613
1222743
  getPackageVersion() {
1222614
- if ("0.39.1" == null) {
1222744
+ if ("0.39.2" == null) {
1222615
1222745
  this.logger.error("CLI_VERSION is not defined");
1222616
1222746
  }
1222617
- return "0.39.1";
1222747
+ return "0.39.2";
1222618
1222748
  }
1222619
1222749
  getCliName() {
1222620
1222750
  if ("fern" == null) {
@@ -1232325,112 +1232455,6 @@ ${replacement}
1232325
1232455
  return newMarkdown;
1232326
1232456
  }
1232327
1232457
 
1232328
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/index.js
1232329
- var register_exports3 = {};
1232330
- __export(register_exports3, {
1232331
- Availability: () => Availability4,
1232332
- HttpMethod: () => HttpMethod5,
1232333
- WebSocketMessageOrigin: () => WebSocketMessageOrigin3,
1232334
- WebhookHttpMethod: () => WebhookHttpMethod4,
1232335
- commons: () => commons_exports10,
1232336
- endpoint: () => endpoint_exports6,
1232337
- registerApiDefinition: () => registerApiDefinition_exports2,
1232338
- type_: () => type_exports4,
1232339
- webhook: () => webhook_exports4,
1232340
- websocket: () => websocket_exports6
1232341
- });
1232342
-
1232343
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/commons/index.js
1232344
- var commons_exports10 = {};
1232345
- __export(commons_exports10, {
1232346
- Availability: () => Availability4
1232347
- });
1232348
-
1232349
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/commons/types/Availability.js
1232350
- var Availability4 = {
1232351
- GenerallyAvailable: "GenerallyAvailable",
1232352
- Deprecated: "Deprecated",
1232353
- Beta: "Beta"
1232354
- };
1232355
-
1232356
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/endpoint/index.js
1232357
- var endpoint_exports6 = {};
1232358
- __export(endpoint_exports6, {
1232359
- HttpMethod: () => HttpMethod5
1232360
- });
1232361
-
1232362
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/endpoint/types/HttpMethod.js
1232363
- var HttpMethod5 = {
1232364
- Get: "GET",
1232365
- Post: "POST",
1232366
- Put: "PUT",
1232367
- Patch: "PATCH",
1232368
- Delete: "DELETE"
1232369
- };
1232370
-
1232371
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/type/index.js
1232372
- var type_exports4 = {};
1232373
-
1232374
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/webhook/index.js
1232375
- var webhook_exports4 = {};
1232376
- __export(webhook_exports4, {
1232377
- WebhookHttpMethod: () => WebhookHttpMethod4
1232378
- });
1232379
-
1232380
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/webhook/types/WebhookHttpMethod.js
1232381
- var WebhookHttpMethod4 = {
1232382
- Get: "GET",
1232383
- Post: "POST"
1232384
- };
1232385
-
1232386
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/websocket/index.js
1232387
- var websocket_exports6 = {};
1232388
- __export(websocket_exports6, {
1232389
- WebSocketMessageOrigin: () => WebSocketMessageOrigin3
1232390
- });
1232391
-
1232392
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/resources/websocket/types/WebSocketMessageOrigin.js
1232393
- var WebSocketMessageOrigin3 = {
1232394
- Client: "client",
1232395
- Server: "server"
1232396
- };
1232397
-
1232398
- // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/api/resources/v1/resources/register/client/registerApiDefinition.js
1232399
- var registerApiDefinition_exports2 = {};
1232400
- __export(registerApiDefinition_exports2, {
1232401
- Error: () => Error2
1232402
- });
1232403
- var Error2 = {
1232404
- unauthorizedError: (value) => {
1232405
- return {
1232406
- content: value,
1232407
- error: "UnauthorizedError"
1232408
- };
1232409
- },
1232410
- userNotInOrgError: (value) => {
1232411
- return {
1232412
- content: value,
1232413
- error: "UserNotInOrgError"
1232414
- };
1232415
- },
1232416
- _unknown: (fetcherError) => {
1232417
- return {
1232418
- error: void 0,
1232419
- content: fetcherError
1232420
- };
1232421
- },
1232422
- _visit: (value, visitor) => {
1232423
- switch (value.error) {
1232424
- case "UnauthorizedError":
1232425
- return visitor.unauthorizedError(value.content);
1232426
- case "UserNotInOrgError":
1232427
- return visitor.userNotInOrgError(value.content);
1232428
- default:
1232429
- return visitor._other(value);
1232430
- }
1232431
- }
1232432
- };
1232433
-
1232434
1232458
  // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/docs/resources/v1/resources/write/types/VersionAvailability.js
1232435
1232459
  var VersionAvailability3 = {
1232436
1232460
  Stable: "Stable",
@@ -1232442,9 +1232466,9 @@ var VersionAvailability3 = {
1232442
1232466
  // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/docs/resources/v1/resources/write/client/startDocsRegister.js
1232443
1232467
  var startDocsRegister_exports3 = {};
1232444
1232468
  __export(startDocsRegister_exports3, {
1232445
- Error: () => Error3
1232469
+ Error: () => Error2
1232446
1232470
  });
1232447
- var Error3 = {
1232471
+ var Error2 = {
1232448
1232472
  _unknown: (fetcherError) => {
1232449
1232473
  return {
1232450
1232474
  error: void 0,
@@ -1232462,9 +1232486,9 @@ var Error3 = {
1232462
1232486
  // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/client/generated/api/resources/docs/resources/v1/resources/write/client/finishDocsRegister.js
1232463
1232487
  var finishDocsRegister_exports3 = {};
1232464
1232488
  __export(finishDocsRegister_exports3, {
1232465
- Error: () => Error4
1232489
+ Error: () => Error3
1232466
1232490
  });
1232467
- var Error4 = {
1232491
+ var Error3 = {
1232468
1232492
  unauthorizedError: (value) => {
1232469
1232493
  return {
1232470
1232494
  content: value,
@@ -1235167,11 +1235191,11 @@ __export(navigation_exports2, {
1235167
1235191
  ApiDefinitionHolder: () => ApiDefinitionHolder,
1235168
1235192
  ApiDefinitionId: () => ApiDefinitionId,
1235169
1235193
  ApiReferenceNavigationConverter: () => ApiReferenceNavigationConverter,
1235170
- Availability: () => Availability5,
1235194
+ Availability: () => Availability4,
1235171
1235195
  ChangelogNavigationConverter: () => ChangelogNavigationConverter,
1235172
1235196
  EndpointId: () => EndpointId2,
1235173
1235197
  EnvironmentId: () => EnvironmentId2,
1235174
- HttpMethod: () => HttpMethod6,
1235198
+ HttpMethod: () => HttpMethod5,
1235175
1235199
  NavigationConfigConverter: () => NavigationConfigConverter,
1235176
1235200
  NodeCollector: () => NodeCollector,
1235177
1235201
  NodeId: () => NodeId,
@@ -1235203,10 +1235227,10 @@ var ROOT_PACKAGE_ID = "__package__";
1235203
1235227
  var api_exports8 = {};
1235204
1235228
  __export(api_exports8, {
1235205
1235229
  ApiDefinitionId: () => ApiDefinitionId,
1235206
- Availability: () => Availability5,
1235230
+ Availability: () => Availability4,
1235207
1235231
  EndpointId: () => EndpointId2,
1235208
1235232
  EnvironmentId: () => EnvironmentId2,
1235209
- HttpMethod: () => HttpMethod6,
1235233
+ HttpMethod: () => HttpMethod5,
1235210
1235234
  NodeId: () => NodeId,
1235211
1235235
  PageId: () => PageId,
1235212
1235236
  Slug: () => Slug,
@@ -1235273,7 +1235297,7 @@ function WebhookId2(value) {
1235273
1235297
  }
1235274
1235298
 
1235275
1235299
  // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/navigation/generated/api/types/HttpMethod.js
1235276
- var HttpMethod6 = {
1235300
+ var HttpMethod5 = {
1235277
1235301
  Get: "GET",
1235278
1235302
  Post: "POST",
1235279
1235303
  Put: "PUT",
@@ -1235282,7 +1235306,7 @@ var HttpMethod6 = {
1235282
1235306
  };
1235283
1235307
 
1235284
1235308
  // ../../../node_modules/.pnpm/@fern-api+fdr-sdk@0.98.20-86eba53a1_typescript@4.6.4/node_modules/@fern-api/fdr-sdk/dist/navigation/generated/api/types/Availability.js
1235285
- var Availability5 = {
1235309
+ var Availability4 = {
1235286
1235310
  Stable: "stable",
1235287
1235311
  GenerallyAvailable: "generally-available",
1235288
1235312
  InDevelopment: "in-development",
@@ -1245845,6 +1245869,9 @@ function convertDocsSnippetsConfigToFdr(snippetsConfiguration) {
1245845
1245869
  };
1245846
1245870
  }
1245847
1245871
 
1245872
+ // ../register/lib/ir-to-fdr-converter/convertPackage.js
1245873
+ var import_fdr_cjs_sdk3 = __toESM(require_fdr_cjs_sdk(), 1);
1245874
+
1245848
1245875
  // ../register/lib/ir-to-fdr-converter/convertTypeShape.js
1245849
1245876
  function convertTypeShape(irType) {
1245850
1245877
  return irType._visit({
@@ -1246162,7 +1246189,7 @@ function convertService(irService, ir) {
1246162
1246189
  originalEndpointId: irEndpoint.id,
1246163
1246190
  name: irEndpoint.displayName ?? startCase_default(irEndpoint.name.originalName),
1246164
1246191
  path: {
1246165
- pathParameters: [...irService.pathParameters, ...irEndpoint.pathParameters].map((pathParameter) => ({
1246192
+ pathParameters: [...ir.pathParameters, ...irService.pathParameters, ...irEndpoint.pathParameters].map((pathParameter) => ({
1246166
1246193
  description: pathParameter.docs ?? void 0,
1246167
1246194
  key: pathParameter.name.originalName,
1246168
1246195
  type: convertTypeReference(pathParameter.valueType)
@@ -1246262,13 +1246289,13 @@ function convertIrAvailability(availability) {
1246262
1246289
  }
1246263
1246290
  switch (availability.status) {
1246264
1246291
  case "DEPRECATED":
1246265
- return register_exports3.Availability.Deprecated;
1246292
+ return import_fdr_cjs_sdk3.FernRegistry.api.v1.register.Availability.Deprecated;
1246266
1246293
  case "PRE_RELEASE":
1246267
- return register_exports3.Availability.Beta;
1246294
+ return import_fdr_cjs_sdk3.FernRegistry.api.v1.register.Availability.Beta;
1246268
1246295
  case "GENERAL_AVAILABILITY":
1246269
- return register_exports3.Availability.GenerallyAvailable;
1246296
+ return import_fdr_cjs_sdk3.FernRegistry.api.v1.register.Availability.GenerallyAvailable;
1246270
1246297
  case "IN_DEVELOPMENT":
1246271
- return register_exports3.Availability.Beta;
1246298
+ return import_fdr_cjs_sdk3.FernRegistry.api.v1.register.Availability.Beta;
1246272
1246299
  default:
1246273
1246300
  assertNever(availability.status);
1246274
1246301
  }
@@ -1246323,11 +1246350,11 @@ function replaceProtocol(url, protocol) {
1246323
1246350
  }
1246324
1246351
  function convertHttpMethod2(method) {
1246325
1246352
  return api_exports4.http.HttpMethod._visit(method, {
1246326
- get: () => register_exports3.HttpMethod.Get,
1246327
- post: () => register_exports3.HttpMethod.Post,
1246328
- put: () => register_exports3.HttpMethod.Put,
1246329
- patch: () => register_exports3.HttpMethod.Patch,
1246330
- delete: () => register_exports3.HttpMethod.Delete,
1246353
+ get: () => import_fdr_cjs_sdk3.FernRegistry.api.v1.register.HttpMethod.Get,
1246354
+ post: () => import_fdr_cjs_sdk3.FernRegistry.api.v1.register.HttpMethod.Post,
1246355
+ put: () => import_fdr_cjs_sdk3.FernRegistry.api.v1.register.HttpMethod.Put,
1246356
+ patch: () => import_fdr_cjs_sdk3.FernRegistry.api.v1.register.HttpMethod.Patch,
1246357
+ delete: () => import_fdr_cjs_sdk3.FernRegistry.api.v1.register.HttpMethod.Delete,
1246331
1246358
  _other: () => {
1246332
1246359
  throw new Error("Unknown http method: " + method);
1246333
1246360
  }
@@ -1300719,7 +1300746,7 @@ function convertExampleTypeReference5(v46ETR) {
1300719
1300746
  shape: container._visit({
1300720
1300747
  list: (listValues) => IrVersions_exports.V45.ExampleTypeReferenceShape.container(IrVersions_exports.V45.ExampleContainer.list(listValues.map((lv) => convertExampleTypeReference5(lv)))),
1300721
1300748
  set: (setValues) => IrVersions_exports.V45.ExampleTypeReferenceShape.container(IrVersions_exports.V45.ExampleContainer.set(setValues.map((sv) => convertExampleTypeReference5(sv)))),
1300722
- map: (mapValues3) => IrVersions_exports.V45.ExampleTypeReferenceShape.container(IrVersions_exports.V45.ExampleContainer.map(mapValues3.map((mv) => ({
1300749
+ map: (mapValues4) => IrVersions_exports.V45.ExampleTypeReferenceShape.container(IrVersions_exports.V45.ExampleContainer.map(mapValues4.map((mv) => ({
1300723
1300750
  key: convertExampleTypeReference5(mv.key),
1300724
1300751
  value: convertExampleTypeReference5(mv.value)
1300725
1300752
  })))),
@@ -1306144,31 +1306171,6 @@ var import_form_data2 = __toESM(require_form_data(), 1);
1306144
1306171
  var import_promises48 = require("fs/promises");
1306145
1306172
  var import_tar2 = __toESM(require_tar(), 1);
1306146
1306173
  var import_tmp_promise10 = __toESM(require_tmp_promise(), 1);
1306147
-
1306148
- // ../generation/remote-generation/remote-workspace-runner/lib/substituteEnvVariables.js
1306149
- var ENV_VAR_REGEX = /\$\{(\w+)\}/g;
1306150
- function substituteEnvVariables(content3, context, options2 = {}) {
1306151
- if (typeof content3 === "string") {
1306152
- const transformed2 = content3.replace(ENV_VAR_REGEX, (_substring, envVarName) => {
1306153
- if (options2.substituteAsEmpty) {
1306154
- return "";
1306155
- }
1306156
- const envVarValue = process.env[envVarName];
1306157
- if (envVarValue == null) {
1306158
- context.failAndThrow(`Environment variable ${envVarName} is not defined.`);
1306159
- }
1306160
- return envVarValue;
1306161
- });
1306162
- return transformed2;
1306163
- }
1306164
- if (!isPlainObject_default(content3)) {
1306165
- return content3;
1306166
- }
1306167
- const transformed = mapValues_default(content3, (value) => substituteEnvVariables(value, context, options2));
1306168
- return transformed;
1306169
- }
1306170
-
1306171
- // ../generation/remote-generation/remote-workspace-runner/lib/createAndStartJob.js
1306172
1306174
  async function createAndStartJob({ projectConfig, workspace, organization, intermediateRepresentation, generatorInvocation, version: version3, context, shouldLogS3Url, token, whitelabel, irVersionOverride, absolutePathToPreview }) {
1306173
1306175
  const job = await createJob({
1306174
1306176
  projectConfig,
@@ -1306194,10 +1306196,9 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
1306194
1306196
  customConfig: generatorInvocation.config,
1306195
1306197
  publishMetadata: generatorInvocation.publishMetadata
1306196
1306198
  };
1306197
- const generatorConfigsWithEnvVarSubstitutions = substituteEnvVariables(generatorConfig, context, {
1306198
- substituteAsEmpty: isPreview
1306199
- });
1306200
- const whitelabelWithEnvVarSubstiutions = whitelabel != null ? substituteEnvVariables(whitelabel, context, { substituteAsEmpty: isPreview }) : void 0;
1306199
+ const substituteEnvVars = (stringOrObject) => replaceEnvVariables(stringOrObject, { onError: (e) => context.failAndThrow(e) }, { substituteAsEmpty: isPreview });
1306200
+ const generatorConfigsWithEnvVarSubstitutions = substituteEnvVars(generatorConfig);
1306201
+ const whitelabelWithEnvVarSubstiutions = whitelabel != null ? substituteEnvVars(whitelabel) : void 0;
1306201
1306202
  const remoteGenerationService = createFiddleService({ token: token.value });
1306202
1306203
  let fernDefinitionMetadata;
1306203
1306204
  if (generatorInvocation.outputMode.type.startsWith("github")) {
@@ -1307063,6 +1307064,11 @@ function parseBasePath(domain2) {
1307063
1307064
  async function runRemoteGenerationForDocsWorkspace({ organization, fernWorkspaces, docsWorkspace, context, token, instanceUrl, preview }) {
1307064
1307065
  var _a6;
1307065
1307066
  const instances = docsWorkspace.config.instances;
1307067
+ docsWorkspace.config = replaceEnvVariables(
1307068
+ docsWorkspace.config,
1307069
+ { onError: (e) => context.failAndThrow(e) },
1307070
+ { substituteAsEmpty: preview }
1307071
+ );
1307066
1307072
  if (instances.length === 0) {
1307067
1307073
  context.failAndThrow("No instances specified in docs.yml! Cannot register docs.");
1307068
1307074
  return;
@@ -1307836,13 +1307842,24 @@ async function updateApiSpec({
1307836
1307842
  if (generators_yml_exports.isRawProtobufAPIDefinitionSchema(api)) {
1307837
1307843
  continue;
1307838
1307844
  }
1307839
- if (typeof api !== "string" && api.origin != null) {
1307845
+ if (isPlainObject(api) && "origin" in api && api.origin != null) {
1307840
1307846
  cliContext.logger.info(`Origin found, fetching spec from ${api.origin}`);
1307841
1307847
  await fetchAndWriteFile(
1307842
1307848
  api.origin,
1307843
1307849
  join(workspace.absoluteFilepath, RelativeFilePath.of(api.path)),
1307844
1307850
  cliContext.logger
1307845
1307851
  );
1307852
+ } else if (isPlainObject(api)) {
1307853
+ for (const [_4, value] of Object.entries(api)) {
1307854
+ if (isPlainObject(value) && "origin" in value && typeof value.origin === "string" && "path" in value && typeof value.path === "string") {
1307855
+ cliContext.logger.info(`Origin found, fetching spec from ${value.origin}`);
1307856
+ await fetchAndWriteFile(
1307857
+ value.origin,
1307858
+ join(workspace.absoluteFilepath, RelativeFilePath.of(value.path)),
1307859
+ cliContext.logger
1307860
+ );
1307861
+ }
1307862
+ }
1307846
1307863
  }
1307847
1307864
  }
1307848
1307865
  } else if (generatorConfig[generators_yml_exports.ASYNC_API_LOCATION_KEY] != null) {