@goast/core 0.3.8 → 0.4.0-beta2

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 (310) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -4
  3. package/esm/_dnt.shims.d.ts +11 -0
  4. package/esm/_dnt.shims.d.ts.map +1 -0
  5. package/esm/_dnt.shims.js +66 -0
  6. package/esm/index.d.ts +6 -0
  7. package/esm/index.d.ts.map +1 -0
  8. package/esm/lib/ast/index.d.ts +2 -0
  9. package/esm/lib/ast/index.d.ts.map +1 -0
  10. package/{types → esm}/lib/ast/node.d.ts +2 -1
  11. package/esm/lib/ast/node.d.ts.map +1 -0
  12. package/esm/lib/ast/node.js +6 -0
  13. package/{types → esm}/lib/codegen/config.d.ts +3 -2
  14. package/esm/lib/codegen/config.d.ts.map +1 -0
  15. package/{types → esm}/lib/codegen/endpoints-generator.d.ts +9 -6
  16. package/esm/lib/codegen/endpoints-generator.d.ts.map +1 -0
  17. package/esm/lib/codegen/endpoints-generator.js +9 -4
  18. package/{types → esm}/lib/codegen/generator.d.ts +11 -11
  19. package/esm/lib/codegen/generator.d.ts.map +1 -0
  20. package/esm/lib/codegen/generator.js +24 -10
  21. package/esm/lib/codegen/index.d.ts +7 -0
  22. package/esm/lib/codegen/index.d.ts.map +1 -0
  23. package/{types → esm}/lib/codegen/internal-utils.d.ts +1 -0
  24. package/esm/lib/codegen/internal-utils.d.ts.map +1 -0
  25. package/{types → esm}/lib/codegen/schemas-generator.d.ts +9 -6
  26. package/esm/lib/codegen/schemas-generator.d.ts.map +1 -0
  27. package/esm/lib/codegen/schemas-generator.js +11 -5
  28. package/{types → esm}/lib/codegen/services-generator.d.ts +9 -6
  29. package/esm/lib/codegen/services-generator.d.ts.map +1 -0
  30. package/esm/lib/codegen/services-generator.js +9 -4
  31. package/{types → esm}/lib/codegen/types.d.ts +5 -3
  32. package/esm/lib/codegen/types.d.ts.map +1 -0
  33. package/esm/lib/collect/collector.d.ts +4 -0
  34. package/esm/lib/collect/collector.d.ts.map +1 -0
  35. package/{types → esm}/lib/collect/helpers.d.ts +3 -2
  36. package/esm/lib/collect/helpers.d.ts.map +1 -0
  37. package/esm/lib/collect/index.d.ts +4 -0
  38. package/esm/lib/collect/index.d.ts.map +1 -0
  39. package/{types → esm}/lib/collect/types.d.ts +2 -1
  40. package/esm/lib/collect/types.d.ts.map +1 -0
  41. package/{types → esm}/lib/internal-utils.d.ts +1 -0
  42. package/esm/lib/internal-utils.d.ts.map +1 -0
  43. package/esm/lib/parse/deref-proxy.d.ts +4 -0
  44. package/esm/lib/parse/deref-proxy.d.ts.map +1 -0
  45. package/esm/lib/parse/deref-proxy.js +18 -3
  46. package/esm/lib/parse/index.d.ts +4 -0
  47. package/esm/lib/parse/index.d.ts.map +1 -0
  48. package/{types → esm}/lib/parse/openapi-types.d.ts +1 -0
  49. package/esm/lib/parse/openapi-types.d.ts.map +1 -0
  50. package/{types → esm}/lib/parse/parser.d.ts +4 -3
  51. package/esm/lib/parse/parser.d.ts.map +1 -0
  52. package/esm/lib/parse/parser.js +17 -6
  53. package/{types → esm}/lib/parse/types.d.ts +3 -2
  54. package/esm/lib/parse/types.d.ts.map +1 -0
  55. package/{types → esm}/lib/transform/api-types.d.ts +3 -2
  56. package/esm/lib/transform/api-types.d.ts.map +1 -0
  57. package/{types → esm}/lib/transform/helpers.d.ts +4 -3
  58. package/esm/lib/transform/helpers.d.ts.map +1 -0
  59. package/esm/lib/transform/helpers.js +9 -3
  60. package/esm/lib/transform/index.d.ts +3 -0
  61. package/esm/lib/transform/index.d.ts.map +1 -0
  62. package/esm/lib/transform/transform-document.d.ts +4 -0
  63. package/esm/lib/transform/transform-document.d.ts.map +1 -0
  64. package/esm/lib/transform/transform-endpoint.d.ts +5 -0
  65. package/esm/lib/transform/transform-endpoint.d.ts.map +1 -0
  66. package/esm/lib/transform/transform-schema.d.ts +5 -0
  67. package/esm/lib/transform/transform-schema.d.ts.map +1 -0
  68. package/esm/lib/transform/transform-schema.js +3 -1
  69. package/esm/lib/transform/transformer.d.ts +5 -0
  70. package/esm/lib/transform/transformer.d.ts.map +1 -0
  71. package/esm/lib/transform/transformer.js +1 -1
  72. package/{types → esm}/lib/transform/types.d.ts +5 -4
  73. package/esm/lib/transform/types.d.ts.map +1 -0
  74. package/{types → esm}/lib/utils/action-provider.d.ts +2 -1
  75. package/esm/lib/utils/action-provider.d.ts.map +1 -0
  76. package/esm/lib/utils/action-provider.js +6 -1
  77. package/{types → esm}/lib/utils/array.utils.d.ts +1 -0
  78. package/esm/lib/utils/array.utils.d.ts.map +1 -0
  79. package/esm/lib/utils/asset-manager.d.ts +8 -0
  80. package/esm/lib/utils/asset-manager.d.ts.map +1 -0
  81. package/esm/lib/utils/asset-manager.js +49 -0
  82. package/{types → esm}/lib/utils/class.utils.d.ts +1 -0
  83. package/esm/lib/utils/class.utils.d.ts.map +1 -0
  84. package/{types → esm}/lib/utils/common.utils.d.ts +2 -1
  85. package/esm/lib/utils/common.utils.d.ts.map +1 -0
  86. package/{types → esm}/lib/utils/condition.d.ts +1 -0
  87. package/esm/lib/utils/condition.d.ts.map +1 -0
  88. package/esm/lib/utils/endpoint.utils.d.ts +3 -0
  89. package/esm/lib/utils/endpoint.utils.d.ts.map +1 -0
  90. package/{types → esm}/lib/utils/error.utils.d.ts +1 -0
  91. package/esm/lib/utils/error.utils.d.ts.map +1 -0
  92. package/{types → esm}/lib/utils/factory.d.ts +2 -1
  93. package/esm/lib/utils/factory.d.ts.map +1 -0
  94. package/esm/lib/utils/factory.js +6 -1
  95. package/{types → esm}/lib/utils/file-system.utils.d.ts +2 -1
  96. package/esm/lib/utils/file-system.utils.d.ts.map +1 -0
  97. package/esm/lib/utils/file-system.utils.js +1 -1
  98. package/{types → esm}/lib/utils/generator.utils.d.ts +1 -0
  99. package/esm/lib/utils/generator.utils.d.ts.map +1 -0
  100. package/esm/lib/utils/index.d.ts +16 -0
  101. package/esm/lib/utils/index.d.ts.map +1 -0
  102. package/esm/lib/utils/index.js +1 -0
  103. package/{types → esm}/lib/utils/object.utils.d.ts +1 -0
  104. package/esm/lib/utils/object.utils.d.ts.map +1 -0
  105. package/esm/lib/utils/object.utils.js +6 -1
  106. package/{types → esm}/lib/utils/schema.utils.d.ts +3 -2
  107. package/esm/lib/utils/schema.utils.d.ts.map +1 -0
  108. package/{types → esm}/lib/utils/source-builder.d.ts +8 -6
  109. package/esm/lib/utils/source-builder.d.ts.map +1 -0
  110. package/esm/lib/utils/source-builder.js +39 -6
  111. package/esm/lib/utils/string-builder/index.d.ts +4 -0
  112. package/esm/lib/utils/string-builder/index.d.ts.map +1 -0
  113. package/{types → esm}/lib/utils/string-builder/options.d.ts +1 -0
  114. package/esm/lib/utils/string-builder/options.d.ts.map +1 -0
  115. package/esm/lib/utils/string-builder/options.js +1 -1
  116. package/{types → esm}/lib/utils/string-builder/string-builder.d.ts +3 -2
  117. package/esm/lib/utils/string-builder/string-builder.d.ts.map +1 -0
  118. package/esm/lib/utils/string-builder/string-builder.js +12 -1
  119. package/{types → esm}/lib/utils/string-builder/utils.d.ts +3 -2
  120. package/esm/lib/utils/string-builder/utils.d.ts.map +1 -0
  121. package/{types → esm}/lib/utils/string.utils.d.ts +3 -2
  122. package/esm/lib/utils/string.utils.d.ts.map +1 -0
  123. package/{types → esm}/lib/utils/string.utils.types.d.ts +1 -0
  124. package/esm/lib/utils/string.utils.types.d.ts.map +1 -0
  125. package/{types → esm}/lib/utils/type.utils.d.ts +2 -0
  126. package/esm/lib/utils/type.utils.d.ts.map +1 -0
  127. package/esm/package.json +3 -0
  128. package/package.json +23 -31
  129. package/script/_dnt.shims.d.ts +11 -0
  130. package/script/_dnt.shims.d.ts.map +1 -0
  131. package/script/_dnt.shims.js +75 -0
  132. package/script/index.d.ts +6 -0
  133. package/script/index.d.ts.map +1 -0
  134. package/script/index.js +8 -0
  135. package/script/lib/ast/index.d.ts +2 -0
  136. package/script/lib/ast/index.d.ts.map +1 -0
  137. package/{cjs → script}/lib/ast/index.js +1 -1
  138. package/script/lib/ast/node.d.ts +15 -0
  139. package/script/lib/ast/node.d.ts.map +1 -0
  140. package/{cjs → script}/lib/ast/node.js +6 -0
  141. package/script/lib/codegen/config.d.ts +16 -0
  142. package/script/lib/codegen/config.d.ts.map +1 -0
  143. package/script/lib/codegen/config.js +11 -0
  144. package/script/lib/codegen/endpoints-generator.d.ts +18 -0
  145. package/script/lib/codegen/endpoints-generator.d.ts.map +1 -0
  146. package/{cjs → script}/lib/codegen/endpoints-generator.js +13 -8
  147. package/script/lib/codegen/generator.d.ts +39 -0
  148. package/script/lib/codegen/generator.d.ts.map +1 -0
  149. package/{cjs → script}/lib/codegen/generator.js +33 -19
  150. package/script/lib/codegen/index.d.ts +7 -0
  151. package/script/lib/codegen/index.d.ts.map +1 -0
  152. package/script/lib/codegen/index.js +9 -0
  153. package/script/lib/codegen/internal-utils.d.ts +2 -0
  154. package/script/lib/codegen/internal-utils.d.ts.map +1 -0
  155. package/script/lib/codegen/schemas-generator.d.ts +19 -0
  156. package/script/lib/codegen/schemas-generator.d.ts.map +1 -0
  157. package/{cjs → script}/lib/codegen/schemas-generator.js +17 -11
  158. package/script/lib/codegen/services-generator.d.ts +18 -0
  159. package/script/lib/codegen/services-generator.d.ts.map +1 -0
  160. package/{cjs → script}/lib/codegen/services-generator.js +13 -8
  161. package/script/lib/codegen/types.d.ts +19 -0
  162. package/script/lib/codegen/types.d.ts.map +1 -0
  163. package/script/lib/collect/collector.d.ts +4 -0
  164. package/script/lib/collect/collector.d.ts.map +1 -0
  165. package/{cjs → script}/lib/collect/collector.js +28 -28
  166. package/script/lib/collect/helpers.d.ts +5 -0
  167. package/script/lib/collect/helpers.d.ts.map +1 -0
  168. package/{cjs → script}/lib/collect/helpers.js +2 -2
  169. package/script/lib/collect/index.d.ts +4 -0
  170. package/script/lib/collect/index.d.ts.map +1 -0
  171. package/script/lib/collect/index.js +6 -0
  172. package/script/lib/collect/types.d.ts +13 -0
  173. package/script/lib/collect/types.d.ts.map +1 -0
  174. package/script/lib/internal-utils.d.ts +2 -0
  175. package/script/lib/internal-utils.d.ts.map +1 -0
  176. package/script/lib/parse/deref-proxy.d.ts +4 -0
  177. package/script/lib/parse/deref-proxy.d.ts.map +1 -0
  178. package/{cjs → script}/lib/parse/deref-proxy.js +21 -6
  179. package/script/lib/parse/index.d.ts +4 -0
  180. package/script/lib/parse/index.d.ts.map +1 -0
  181. package/script/lib/parse/index.js +6 -0
  182. package/script/lib/parse/openapi-types.d.ts +898 -0
  183. package/script/lib/parse/openapi-types.d.ts.map +1 -0
  184. package/script/lib/parse/parser.d.ts +19 -0
  185. package/script/lib/parse/parser.d.ts.map +1 -0
  186. package/{cjs → script}/lib/parse/parser.js +32 -21
  187. package/script/lib/parse/types.d.ts +24 -0
  188. package/script/lib/parse/types.d.ts.map +1 -0
  189. package/script/lib/parse/types.js +5 -0
  190. package/script/lib/transform/api-types.d.ts +195 -0
  191. package/script/lib/transform/api-types.d.ts.map +1 -0
  192. package/script/lib/transform/helpers.d.ts +51 -0
  193. package/script/lib/transform/helpers.d.ts.map +1 -0
  194. package/{cjs → script}/lib/transform/helpers.js +16 -10
  195. package/script/lib/transform/index.d.ts +3 -0
  196. package/script/lib/transform/index.d.ts.map +1 -0
  197. package/script/lib/transform/index.js +5 -0
  198. package/script/lib/transform/transform-document.d.ts +4 -0
  199. package/script/lib/transform/transform-document.d.ts.map +1 -0
  200. package/{cjs → script}/lib/transform/transform-document.js +2 -2
  201. package/script/lib/transform/transform-endpoint.d.ts +5 -0
  202. package/script/lib/transform/transform-endpoint.d.ts.map +1 -0
  203. package/{cjs → script}/lib/transform/transform-endpoint.js +18 -18
  204. package/script/lib/transform/transform-schema.d.ts +5 -0
  205. package/script/lib/transform/transform-schema.d.ts.map +1 -0
  206. package/{cjs → script}/lib/transform/transform-schema.js +14 -12
  207. package/script/lib/transform/transformer.d.ts +5 -0
  208. package/script/lib/transform/transformer.d.ts.map +1 -0
  209. package/{cjs → script}/lib/transform/transformer.js +10 -10
  210. package/script/lib/transform/types.d.ts +36 -0
  211. package/script/lib/transform/types.d.ts.map +1 -0
  212. package/script/lib/utils/action-provider.d.ts +29 -0
  213. package/script/lib/utils/action-provider.d.ts.map +1 -0
  214. package/{cjs → script}/lib/utils/action-provider.js +6 -1
  215. package/script/lib/utils/array.utils.d.ts +2 -0
  216. package/script/lib/utils/array.utils.d.ts.map +1 -0
  217. package/script/lib/utils/asset-manager.d.ts +8 -0
  218. package/script/lib/utils/asset-manager.d.ts.map +1 -0
  219. package/script/lib/utils/asset-manager.js +54 -0
  220. package/script/lib/utils/class.utils.d.ts +8 -0
  221. package/script/lib/utils/class.utils.d.ts.map +1 -0
  222. package/script/lib/utils/common.utils.d.ts +16 -0
  223. package/script/lib/utils/common.utils.d.ts.map +1 -0
  224. package/script/lib/utils/condition.d.ts +4 -0
  225. package/script/lib/utils/condition.d.ts.map +1 -0
  226. package/script/lib/utils/endpoint.utils.d.ts +3 -0
  227. package/script/lib/utils/endpoint.utils.d.ts.map +1 -0
  228. package/script/lib/utils/error.utils.d.ts +2 -0
  229. package/script/lib/utils/error.utils.d.ts.map +1 -0
  230. package/script/lib/utils/factory.d.ts +21 -0
  231. package/script/lib/utils/factory.d.ts.map +1 -0
  232. package/{cjs → script}/lib/utils/factory.js +6 -1
  233. package/script/lib/utils/file-system.utils.d.ts +9 -0
  234. package/script/lib/utils/file-system.utils.d.ts.map +1 -0
  235. package/{cjs → script}/lib/utils/file-system.utils.js +2 -2
  236. package/script/lib/utils/generator.utils.d.ts +2 -0
  237. package/script/lib/utils/generator.utils.d.ts.map +1 -0
  238. package/script/lib/utils/index.d.ts +16 -0
  239. package/script/lib/utils/index.d.ts.map +1 -0
  240. package/script/lib/utils/index.js +18 -0
  241. package/script/lib/utils/object.utils.d.ts +3 -0
  242. package/script/lib/utils/object.utils.d.ts.map +1 -0
  243. package/{cjs → script}/lib/utils/object.utils.js +6 -1
  244. package/script/lib/utils/schema.utils.d.ts +11 -0
  245. package/script/lib/utils/schema.utils.d.ts.map +1 -0
  246. package/{cjs → script}/lib/utils/schema.utils.js +2 -2
  247. package/script/lib/utils/source-builder.d.ts +233 -0
  248. package/script/lib/utils/source-builder.d.ts.map +1 -0
  249. package/{cjs → script}/lib/utils/source-builder.js +59 -26
  250. package/script/lib/utils/string-builder/index.d.ts +4 -0
  251. package/script/lib/utils/string-builder/index.d.ts.map +1 -0
  252. package/script/lib/utils/string-builder/index.js +8 -0
  253. package/script/lib/utils/string-builder/options.d.ts +15 -0
  254. package/script/lib/utils/string-builder/options.d.ts.map +1 -0
  255. package/{cjs → script}/lib/utils/string-builder/options.js +2 -2
  256. package/script/lib/utils/string-builder/string-builder.d.ts +73 -0
  257. package/script/lib/utils/string-builder/string-builder.d.ts.map +1 -0
  258. package/{cjs → script}/lib/utils/string-builder/string-builder.js +17 -6
  259. package/script/lib/utils/string-builder/utils.d.ts +22 -0
  260. package/script/lib/utils/string-builder/utils.d.ts.map +1 -0
  261. package/{cjs → script}/lib/utils/string-builder/utils.js +4 -4
  262. package/script/lib/utils/string.utils.d.ts +130 -0
  263. package/script/lib/utils/string.utils.d.ts.map +1 -0
  264. package/{cjs → script}/lib/utils/string.utils.js +2 -2
  265. package/script/lib/utils/string.utils.types.d.ts +150 -0
  266. package/script/lib/utils/string.utils.types.d.ts.map +1 -0
  267. package/script/lib/utils/type.utils.d.ts +57 -0
  268. package/script/lib/utils/type.utils.d.ts.map +1 -0
  269. package/script/package.json +3 -0
  270. package/cjs/index.js +0 -8
  271. package/cjs/lib/codegen/config.js +0 -11
  272. package/cjs/lib/codegen/index.js +0 -9
  273. package/cjs/lib/collect/index.js +0 -6
  274. package/cjs/lib/parse/index.js +0 -6
  275. package/cjs/lib/parse/types.js +0 -5
  276. package/cjs/lib/transform/index.js +0 -5
  277. package/cjs/lib/utils/index.js +0 -17
  278. package/cjs/lib/utils/string-builder/index.js +0 -8
  279. package/cjs/package.json +0 -1
  280. package/types/index.d.ts +0 -5
  281. package/types/lib/ast/index.d.ts +0 -1
  282. package/types/lib/codegen/index.d.ts +0 -6
  283. package/types/lib/collect/collector.d.ts +0 -3
  284. package/types/lib/collect/index.d.ts +0 -3
  285. package/types/lib/parse/deref-proxy.d.ts +0 -3
  286. package/types/lib/parse/index.d.ts +0 -3
  287. package/types/lib/transform/index.d.ts +0 -2
  288. package/types/lib/transform/transform-document.d.ts +0 -3
  289. package/types/lib/transform/transform-endpoint.d.ts +0 -4
  290. package/types/lib/transform/transform-schema.d.ts +0 -4
  291. package/types/lib/transform/transformer.d.ts +0 -4
  292. package/types/lib/utils/endpoint.utils.d.ts +0 -2
  293. package/types/lib/utils/index.d.ts +0 -14
  294. package/types/lib/utils/string-builder/index.d.ts +0 -3
  295. /package/{cjs → script}/lib/codegen/internal-utils.js +0 -0
  296. /package/{cjs → script}/lib/codegen/types.js +0 -0
  297. /package/{cjs → script}/lib/collect/types.js +0 -0
  298. /package/{cjs → script}/lib/internal-utils.js +0 -0
  299. /package/{cjs → script}/lib/parse/openapi-types.js +0 -0
  300. /package/{cjs → script}/lib/transform/api-types.js +0 -0
  301. /package/{cjs → script}/lib/transform/types.js +0 -0
  302. /package/{cjs → script}/lib/utils/array.utils.js +0 -0
  303. /package/{cjs → script}/lib/utils/class.utils.js +0 -0
  304. /package/{cjs → script}/lib/utils/common.utils.js +0 -0
  305. /package/{cjs → script}/lib/utils/condition.js +0 -0
  306. /package/{cjs → script}/lib/utils/endpoint.utils.js +0 -0
  307. /package/{cjs → script}/lib/utils/error.utils.js +0 -0
  308. /package/{cjs → script}/lib/utils/generator.utils.js +0 -0
  309. /package/{cjs → script}/lib/utils/string.utils.types.js +0 -0
  310. /package/{cjs → script}/lib/utils/type.utils.js +0 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformEndpoint = transformEndpoint;
4
- const helpers_1 = require("./helpers");
5
- const transform_schema_1 = require("./transform-schema");
6
- const internal_utils_1 = require("../internal-utils");
4
+ const helpers_js_1 = require("./helpers.js");
5
+ const transform_schema_js_1 = require("./transform-schema.js");
6
+ const internal_utils_js_1 = require("../internal-utils.js");
7
7
  function transformEndpoint(context, endpointInfo) {
8
8
  var _a, _b, _c, _d;
9
9
  const apiPath = transformApiPath(context, endpointInfo.path, endpointInfo.pathItem);
@@ -14,7 +14,7 @@ function transformEndpoint(context, endpointInfo) {
14
14
  },
15
15
  $ref: undefined,
16
16
  id: context.idGenerator.generateId('endpoint'),
17
- name: (0, helpers_1.determineEndpointName)(endpointInfo),
17
+ name: (0, helpers_js_1.determineEndpointName)(endpointInfo),
18
18
  path: endpointInfo.path,
19
19
  pathInfo: apiPath,
20
20
  method: endpointInfo.method,
@@ -27,7 +27,7 @@ function transformEndpoint(context, endpointInfo) {
27
27
  : undefined,
28
28
  responses: transformResponses(context, endpointInfo.operation.responses),
29
29
  tags: (_d = endpointInfo.operation.tags) !== null && _d !== void 0 ? _d : [],
30
- custom: (0, helpers_1.getCustomFields)(endpointInfo.operation),
30
+ custom: (0, helpers_js_1.getCustomFields)(endpointInfo.operation),
31
31
  };
32
32
  const tags = endpoint.tags.length === 0 ? [''] : endpoint.tags;
33
33
  for (const tag of tags) {
@@ -54,7 +54,7 @@ function transformApiPath(context, path, pathItem, isReference = false) {
54
54
  const existingPath = context.paths.get(path);
55
55
  if (existingPath)
56
56
  return existingPath;
57
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(pathItem);
57
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(pathItem);
58
58
  const existing = context.transformed.paths.get(openApiObjectId);
59
59
  if (existing)
60
60
  return existing;
@@ -87,7 +87,7 @@ function transformApiPath(context, path, pathItem, isReference = false) {
87
87
  }
88
88
  function transformParameter(context, parameter) {
89
89
  var _a, _b, _c;
90
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(parameter);
90
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(parameter);
91
91
  const existing = context.transformed.parameters.get(openApiObjectId);
92
92
  if (existing)
93
93
  return existing;
@@ -109,14 +109,14 @@ function transformParameter(context, parameter) {
109
109
  style: parameter.style,
110
110
  explode: parameter.explode,
111
111
  allowReserved: parameter.allowReserved,
112
- schema: parameter.schema ? (0, transform_schema_1.transformSchema)(context, parameter.schema) : undefined,
112
+ schema: parameter.schema ? (0, transform_schema_js_1.transformSchema)(context, parameter.schema) : undefined,
113
113
  };
114
114
  context.transformed.parameters.set(openApiObjectId, p);
115
115
  return p;
116
116
  }
117
117
  function transformRequestBody(context, requestBody) {
118
118
  var _a;
119
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(requestBody);
119
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(requestBody);
120
120
  const existing = context.transformed.requestBodies.get(openApiObjectId);
121
121
  if (existing)
122
122
  return existing;
@@ -140,14 +140,14 @@ function transformResponses(context, responses) {
140
140
  return [];
141
141
  const result = [];
142
142
  for (const status of Object.keys(responses)) {
143
- if (!(0, internal_utils_1.isOpenApiObjectProperty)(status))
143
+ if (!(0, internal_utils_js_1.isOpenApiObjectProperty)(status))
144
144
  continue;
145
145
  result.push(transformResponse(context, responses[status], status));
146
146
  }
147
147
  return result;
148
148
  }
149
149
  function transformResponse(context, response, status) {
150
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(response);
150
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(response);
151
151
  const existing = context.transformed.responses.get(openApiObjectId);
152
152
  if (existing)
153
153
  return existing;
@@ -172,14 +172,14 @@ function transformContent(context, content) {
172
172
  return [];
173
173
  const result = [];
174
174
  for (const media of Object.keys(content)) {
175
- if (!(0, internal_utils_1.isOpenApiObjectProperty)(media))
175
+ if (!(0, internal_utils_js_1.isOpenApiObjectProperty)(media))
176
176
  continue;
177
177
  result.push(transformMediaType(context, content[media], media));
178
178
  }
179
179
  return result;
180
180
  }
181
181
  function transformMediaType(context, mediaType, media) {
182
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(mediaType);
182
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(mediaType);
183
183
  const existing = context.transformed.content.get(openApiObjectId);
184
184
  if (existing)
185
185
  return existing;
@@ -192,7 +192,7 @@ function transformMediaType(context, mediaType, media) {
192
192
  $ref: ref,
193
193
  id: context.idGenerator.generateId('content'),
194
194
  type: media,
195
- schema: mediaType.schema ? (0, transform_schema_1.transformSchema)(context, mediaType.schema) : undefined,
195
+ schema: mediaType.schema ? (0, transform_schema_js_1.transformSchema)(context, mediaType.schema) : undefined,
196
196
  };
197
197
  context.transformed.content.set(openApiObjectId, mt);
198
198
  return mt;
@@ -218,7 +218,7 @@ function transformHeaders(context, headers) {
218
218
  return [];
219
219
  const result = [];
220
220
  for (const name of Object.keys(headers)) {
221
- if (!(0, internal_utils_1.isOpenApiObjectProperty)(name))
221
+ if (!(0, internal_utils_js_1.isOpenApiObjectProperty)(name))
222
222
  continue;
223
223
  result.push(transformHeader(context, headers[name], name));
224
224
  }
@@ -226,7 +226,7 @@ function transformHeaders(context, headers) {
226
226
  }
227
227
  function transformHeader(context, header, name) {
228
228
  var _a, _b;
229
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(header);
229
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(header);
230
230
  const existing = context.transformed.headers.get(openApiObjectId);
231
231
  if (existing)
232
232
  return existing;
@@ -250,7 +250,7 @@ function transformHeader(context, header, name) {
250
250
  style: undefined,
251
251
  explode: undefined,
252
252
  allowReserved: undefined,
253
- schema: (0, transform_schema_1.transformSchema)(context, header),
253
+ schema: (0, transform_schema_js_1.transformSchema)(context, header),
254
254
  };
255
255
  }
256
256
  else {
@@ -270,7 +270,7 @@ function transformHeader(context, header, name) {
270
270
  style: header.style,
271
271
  explode: header.explode,
272
272
  allowReserved: header.allowReserved,
273
- schema: header.schema ? (0, transform_schema_1.transformSchema)(context, header.schema) : undefined,
273
+ schema: header.schema ? (0, transform_schema_js_1.transformSchema)(context, header.schema) : undefined,
274
274
  };
275
275
  }
276
276
  context.transformed.headers.set(openApiObjectId, h);
@@ -0,0 +1,5 @@
1
+ import type { ApiSchema } from './api-types.js';
2
+ import type { OpenApiTransformerContext } from './types.js';
3
+ import type { Deref, OpenApiSchema } from '../parse/index.js';
4
+ export declare function transformSchema<T extends Deref<OpenApiSchema>>(ctx: OpenApiTransformerContext, schema: T): ApiSchema;
5
+ //# sourceMappingURL=transform-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform-schema.d.ts","sourceRoot":"","sources":["../../../src/lib/transform/transform-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAsC,MAAM,gBAAgB,CAAC;AAUpF,OAAO,KAAK,EAAuB,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG9D,wBAAgB,eAAe,CAAC,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,yBAAyB,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAiFpH"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformSchema = transformSchema;
4
- const helpers_1 = require("./helpers");
5
- const utils_1 = require("../utils");
4
+ const helpers_js_1 = require("./helpers.js");
5
+ const index_js_1 = require("../utils/index.js");
6
6
  function transformSchema(ctx, schema) {
7
7
  var _a, _b;
8
8
  if (!schema) {
@@ -12,11 +12,11 @@ function transformSchema(ctx, schema) {
12
12
  const existingSchema = (_a = ctx.schemas.get(schemaSource)) !== null && _a !== void 0 ? _a : ctx.incompleteSchemas.get(schemaSource);
13
13
  if (existingSchema)
14
14
  return existingSchema;
15
- const openApiObjectId = (0, helpers_1.getOpenApiObjectIdentifier)(schema);
15
+ const openApiObjectId = (0, helpers_js_1.getOpenApiObjectIdentifier)(schema);
16
16
  const existing = ctx.transformed.schemas.get(openApiObjectId);
17
17
  if (existing)
18
18
  return existing;
19
- let kind = (0, helpers_1.determineSchemaKind)(ctx, schema);
19
+ let kind = (0, helpers_js_1.determineSchemaKind)(ctx, schema);
20
20
  let nullable = kind === 'null';
21
21
  if (kind === 'multi-type') {
22
22
  const types = schema.type;
@@ -28,16 +28,16 @@ function transformSchema(ctx, schema) {
28
28
  }
29
29
  if (isSingleType) {
30
30
  const newType = types.filter((t) => t !== 'null' && t !== null)[0];
31
- schema = (0, utils_1.createOverwriteProxy)(schema);
31
+ schema = (0, index_js_1.createOverwriteProxy)(schema);
32
32
  schema.type = newType;
33
- kind = (0, helpers_1.determineSchemaKind)(ctx, schema);
33
+ kind = (0, helpers_js_1.determineSchemaKind)(ctx, schema);
34
34
  }
35
35
  else {
36
36
  schema.type = types.filter((t) => t !== 'null' && t !== null);
37
37
  }
38
38
  }
39
39
  const id = ctx.idGenerator.generateId('schema');
40
- const nameInfo = (0, helpers_1.determineSchemaName)(schema, id);
40
+ const nameInfo = (0, helpers_js_1.determineSchemaName)(schema, id);
41
41
  const incompleteSchema = {
42
42
  $src: {
43
43
  ...schema.$src,
@@ -49,19 +49,21 @@ function transformSchema(ctx, schema) {
49
49
  isNameGenerated: nameInfo.isGenerated,
50
50
  description: schema.description,
51
51
  deprecated: (_b = schema.deprecated) !== null && _b !== void 0 ? _b : false,
52
- accessibility: (0, helpers_1.determineSchemaAccessibility)(schema),
52
+ accessibility: (0, helpers_js_1.determineSchemaAccessibility)(schema),
53
53
  kind,
54
54
  enum: schema.enum,
55
55
  default: schema.default,
56
56
  example: schema.example,
57
57
  nullable: nullable || schema.nullable === true,
58
58
  required: new Set(schema.required),
59
- custom: (0, helpers_1.getCustomFields)(schema),
59
+ custom: (0, helpers_js_1.getCustomFields)(schema),
60
60
  not: schema.not ? transformSchema(ctx, schema.not) : undefined,
61
61
  const: schema.const,
62
62
  discriminator: schema.discriminator
63
63
  ? {
64
- propertyName: typeof schema.discriminator === 'string' ? schema.discriminator : schema.discriminator.propertyName,
64
+ propertyName: typeof schema.discriminator === 'string'
65
+ ? schema.discriminator
66
+ : schema.discriminator.propertyName,
65
67
  mapping: {},
66
68
  }
67
69
  : undefined,
@@ -89,8 +91,8 @@ function allExtensionsTransformer(schema, context) {
89
91
  maxLength: schema.maxLength,
90
92
  minimum: schema.minimum,
91
93
  maximum: schema.maximum,
92
- properties: (0, helpers_1.transformSchemaProperties)(context, schema, transformSchema),
93
- additionalProperties: (0, helpers_1.transformAdditionalProperties)(context, schema, transformSchema),
94
+ properties: (0, helpers_js_1.transformSchemaProperties)(context, schema, transformSchema),
95
+ additionalProperties: (0, helpers_js_1.transformAdditionalProperties)(context, schema, transformSchema),
94
96
  allOf: (_d = (_c = schema.allOf) === null || _c === void 0 ? void 0 : _c.map((s) => transformSchema(context, s))) !== null && _d !== void 0 ? _d : [],
95
97
  anyOf: (_f = (_e = schema.anyOf) === null || _e === void 0 ? void 0 : _e.map((s) => transformSchema(context, s))) !== null && _f !== void 0 ? _f : [],
96
98
  items: schema.items ? transformSchema(context, schema.items) : undefined,
@@ -0,0 +1,5 @@
1
+ import type { ApiData } from './api-types.js';
2
+ import { type OpenApiTransformerOptions } from './types.js';
3
+ import type { OpenApiCollectorData } from '../collect/index.js';
4
+ export declare function transformOpenApi(data: OpenApiCollectorData, options?: Partial<OpenApiTransformerOptions>): ApiData;
5
+ //# sourceMappingURL=transformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../src/lib/transform/transformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK9C,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAuClH"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformOpenApi = transformOpenApi;
4
- const helpers_1 = require("./helpers");
5
- const transform_document_1 = require("./transform-document");
6
- const transform_endpoint_1 = require("./transform-endpoint");
7
- const transform_schema_1 = require("./transform-schema");
8
- const types_1 = require("./types");
4
+ const helpers_js_1 = require("./helpers.js");
5
+ const transform_document_js_1 = require("./transform-document.js");
6
+ const transform_endpoint_js_1 = require("./transform-endpoint.js");
7
+ const transform_schema_js_1 = require("./transform-schema.js");
8
+ const types_js_1 = require("./types.js");
9
9
  function transformOpenApi(data, options) {
10
10
  const context = {
11
- config: { ...types_1.defaultOpenApiTransformerOptions, ...options },
12
- idGenerator: new helpers_1.IdGenerator(),
11
+ config: { ...types_js_1.defaultOpenApiTransformerOptions, ...options },
12
+ idGenerator: new helpers_js_1.IdGenerator(),
13
13
  input: data,
14
14
  incompleteSchemas: new Map(),
15
15
  paths: new Map(),
@@ -28,13 +28,13 @@ function transformOpenApi(data, options) {
28
28
  },
29
29
  };
30
30
  for (const document of data.documents) {
31
- (0, transform_document_1.transformDocument)(context, document);
31
+ (0, transform_document_js_1.transformDocument)(context, document);
32
32
  }
33
33
  for (const schema of context.input.schemas.values()) {
34
- (0, transform_schema_1.transformSchema)(context, schema);
34
+ (0, transform_schema_js_1.transformSchema)(context, schema);
35
35
  }
36
36
  for (const endpoint of context.input.endpoints.values()) {
37
- (0, transform_endpoint_1.transformEndpoint)(context, endpoint);
37
+ (0, transform_endpoint_js_1.transformEndpoint)(context, endpoint);
38
38
  }
39
39
  return {
40
40
  services: Array.from(context.services.values()),
@@ -0,0 +1,36 @@
1
+ import type { ApiContent, ApiData, ApiHeader, ApiParameter, ApiPath, ApiRequestBody, ApiResponse, ApiSchema, ApiSchemaExtensions, ApiSchemaKind, ApiService } from './api-types.js';
2
+ import type { IdGenerator } from './helpers.js';
3
+ import type { OpenApiCollectorData } from '../collect/types.js';
4
+ import type { ArrayItem } from '../utils/type.utils.js';
5
+ export type OpenApiTransformerOptions = {
6
+ /**
7
+ * Determines how schemas without a `type` property should be treated.
8
+ * - `keep-unknown`: Keep the schema as-is.
9
+ * - `object-if-properties`: Treat the schema as an object schema only if it has properties.
10
+ * - `always-object`: Treat the schema as an object schema.
11
+ * @default 'object-if-properties'
12
+ */
13
+ unknownTypeBehavior: 'keep-unknown' | 'object-if-properties' | 'always-object';
14
+ };
15
+ export declare const defaultOpenApiTransformerOptions: OpenApiTransformerOptions;
16
+ export type IncompleteApiSchema = Omit<ApiSchema, Exclude<keyof ApiSchemaExtensions<ApiSchemaKind>, 'kind'>>;
17
+ export type OpenApiTransformerContext = {
18
+ config: OpenApiTransformerOptions;
19
+ idGenerator: IdGenerator;
20
+ input: OpenApiCollectorData;
21
+ incompleteSchemas: Map<string, IncompleteApiSchema>;
22
+ paths: Map<string, ApiPath>;
23
+ transformed: {
24
+ services: Map<string, ApiService>;
25
+ paths: Map<string, ApiPath>;
26
+ parameters: Map<string, ApiParameter>;
27
+ requestBodies: Map<string, ApiRequestBody>;
28
+ responses: Map<string, ApiResponse>;
29
+ content: Map<string, ApiContent>;
30
+ headers: Map<string, ApiHeader>;
31
+ schemas: Map<string, ApiSchema>;
32
+ };
33
+ } & {
34
+ [K in keyof ApiData]: Map<string, ArrayItem<ApiData[K]>>;
35
+ };
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transform/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,SAAS,EACT,YAAY,EACZ,OAAO,EACP,cAAc,EACd,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;;;;OAMG;IACH,mBAAmB,EAAE,cAAc,GAAG,sBAAsB,GAAG,eAAe,CAAC;CAChF,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,yBAE9C,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,mBAAmB,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7G,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,yBAAyB,CAAC;IAElC,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACpD,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5B,WAAW,EAAE;QACX,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAClC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QACtC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAC3C,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACpC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACjC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;KACjC,CAAC;CACH,GAAG;KAAG,CAAC,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { EmptyConstructor, FunctionNames } from './type.utils.js';
2
+ type MatchingFunctionNames<T, TAction> = {
3
+ [K in keyof T]: T[K] extends TAction ? K : never;
4
+ }[keyof T];
5
+ type CtorActionRunner<T, TAction> = {
6
+ kind: 'ctor';
7
+ factory: EmptyConstructor<T>;
8
+ functionName: MatchingFunctionNames<T, TAction>;
9
+ };
10
+ type FnActionRunner<TAction> = {
11
+ kind: 'fn';
12
+ action: TAction;
13
+ };
14
+ type ValueActionRunner<T, TAction> = {
15
+ kind: 'value';
16
+ value: T;
17
+ functionName: MatchingFunctionNames<T, TAction>;
18
+ };
19
+ type ActionRunner<TAction> = CtorActionRunner<any, TAction> | FnActionRunner<TAction> | ValueActionRunner<any, TAction>;
20
+ export declare class ActionProvider<TAction extends (...args: any[]) => any> {
21
+ private readonly _runner;
22
+ constructor(_runner: ActionRunner<TAction>);
23
+ run(...args: Parameters<TAction>): ReturnType<TAction>;
24
+ static fromType<T, TName extends FunctionNames<T>>(type: EmptyConstructor<T>, functionName: TName): ActionProvider<T[TName] extends (...args: any[]) => any ? T[TName] : never>;
25
+ static fromFn<TAction extends (...args: any[]) => any>(fn: TAction): ActionProvider<TAction>;
26
+ static fromValue<T, TName extends FunctionNames<T>>(value: T, functionName: TName): ActionProvider<T[TName] extends (...args: any[]) => any ? T[TName] : never>;
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=action-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action-provider.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/action-provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEvE,KAAK,qBAAqB,CAAC,CAAC,EAAE,OAAO,IAAI;KACtC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,OAAO,GAAG,CAAC,GAAG,KAAK;CACjD,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,KAAK,gBAAgB,CAAC,CAAC,EAAE,OAAO,IAAI;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC7B,YAAY,EAAE,qBAAqB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CACjD,CAAC;AAEF,KAAK,cAAc,CAAC,OAAO,IAAI;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,iBAAiB,CAAC,CAAC,EAAE,OAAO,IAAI;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,YAAY,EAAE,qBAAqB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CACjD,CAAC;AAQF,KAAK,YAAY,CAAC,OAAO,IAAI,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAExH,qBAAa,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC;IAEpD,GAAG,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC;WAW/C,QAAQ,CAAC,CAAC,EAAE,KAAK,SAAS,aAAa,CAAC,CAAC,CAAC,EACtD,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,EACzB,YAAY,EAAE,KAAK,GAClB,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;WAIhE,MAAM,CAAC,OAAO,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC;WAIrF,SAAS,CAAC,CAAC,EAAE,KAAK,SAAS,aAAa,CAAC,CAAC,CAAC,EACvD,KAAK,EAAE,CAAC,EACR,YAAY,EAAE,KAAK,GAClB,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;CAG/E"}
@@ -9,7 +9,12 @@ class Foo {
9
9
  }
10
10
  class ActionProvider {
11
11
  constructor(_runner) {
12
- this._runner = _runner;
12
+ Object.defineProperty(this, "_runner", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: _runner
17
+ });
13
18
  }
14
19
  run(...args) {
15
20
  switch (this._runner.kind) {
@@ -0,0 +1,2 @@
1
+ export declare function removeItems<T>(array: T[], predicate: (item: T) => boolean): void;
2
+ //# sourceMappingURL=array.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/array.utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,GAAG,IAAI,CAMhF"}
@@ -0,0 +1,8 @@
1
+ export declare class AssetManager {
2
+ private readonly _assetsBaseUrl;
3
+ constructor(assetsBaseUrl: URL);
4
+ getAssetFileContent(relativePath: string): Promise<string>;
5
+ copyAssetFile(relativePath: string, destDir: string, logName?: string): Promise<void>;
6
+ private fetchAssetFile;
7
+ }
8
+ //# sourceMappingURL=asset-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-manager.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/asset-manager.ts"],"names":[],"mappings":"AAOA,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAM;gBAEzB,aAAa,EAAE,GAAG;IAIjB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ1D,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAkBpF,cAAc;CAO7B"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssetManager = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const dntShim = tslib_1.__importStar(require("../../_dnt.shims.js"));
6
+ const node_path_1 = require("node:path");
7
+ const node_url_1 = require("node:url");
8
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
9
+ class AssetManager {
10
+ constructor(assetsBaseUrl) {
11
+ Object.defineProperty(this, "_assetsBaseUrl", {
12
+ enumerable: true,
13
+ configurable: true,
14
+ writable: true,
15
+ value: void 0
16
+ });
17
+ this._assetsBaseUrl = assetsBaseUrl;
18
+ }
19
+ async getAssetFileContent(relativePath) {
20
+ if (this._assetsBaseUrl.protocol === 'file:') {
21
+ return await fs_extra_1.default.readFile((0, node_path_1.resolve)((0, node_url_1.fileURLToPath)(this._assetsBaseUrl), relativePath), 'utf8');
22
+ }
23
+ else {
24
+ return await this.fetchAssetFile(relativePath);
25
+ }
26
+ }
27
+ async copyAssetFile(relativePath, destDir, logName) {
28
+ const targetPath = (0, node_path_1.resolve)(destDir, (0, node_path_1.basename)(relativePath));
29
+ if (logName !== undefined) {
30
+ if (logName) {
31
+ console.log(`Copying ${logName} to "${targetPath}"`);
32
+ }
33
+ else {
34
+ console.log(`Copying asset file "${relativePath}" to "${targetPath}"`);
35
+ }
36
+ }
37
+ if (this._assetsBaseUrl.protocol === 'file:') {
38
+ const srcPath = (0, node_path_1.resolve)((0, node_url_1.fileURLToPath)(this._assetsBaseUrl), relativePath);
39
+ await fs_extra_1.default.copyFile(srcPath, targetPath);
40
+ }
41
+ else {
42
+ const fileContent = await this.fetchAssetFile(relativePath);
43
+ await fs_extra_1.default.outputFile(targetPath, fileContent);
44
+ }
45
+ }
46
+ async fetchAssetFile(relativePath) {
47
+ const response = await dntShim.fetch(new URL(relativePath, this._assetsBaseUrl));
48
+ if (!response.ok) {
49
+ throw new Error(`Failed to fetch asset file "${relativePath}: ${response.statusText} (${response.status})`);
50
+ }
51
+ return await response.text();
52
+ }
53
+ }
54
+ exports.AssetManager = AssetManager;
@@ -0,0 +1,8 @@
1
+ export declare function classifyArray<TItem, TClassification extends Record<string, abstract new (...args: any[]) => any>>(items: Iterable<TItem>, classification: TClassification): {
2
+ [P in keyof TClassification]: InstanceType<TClassification[P]>[];
3
+ } & {
4
+ rest: Exclude<TItem, InstanceType<TClassification[string]>>[];
5
+ };
6
+ export declare function isInstanceOf<T>(item: unknown, type: abstract new (...args: any[]) => T): item is T;
7
+ export declare function getIsInstanceOf<T>(type: abstract new (...args: any[]) => T): (item: unknown) => item is T;
8
+ //# sourceMappingURL=class.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/class.utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAC/G,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EACtB,cAAc,EAAE,eAAe,GAC9B;KAAG,CAAC,IAAI,MAAM,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE;CAAE,GAAG;IACxE,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/D,CAyBA;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAElG;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,IAAI,CAAC,CAEzG"}
@@ -0,0 +1,16 @@
1
+ import type { SingleOrMultiple } from './type.utils.js';
2
+ export declare function isNullish(value: unknown): value is null | undefined;
3
+ export declare function notNullish<T>(value: T): value is NonNullable<T>;
4
+ export declare function concatSingleOrMultiple<T>(...values: SingleOrMultiple<T>[]): SingleOrMultiple<T>;
5
+ export declare function isIterable(value: unknown): value is Iterable<unknown>;
6
+ export declare function toArray<T>(value: T | T[] | Iterable<T>): T[];
7
+ export declare function modify<T>(value: T, callback: (value: NonNullable<T>) => void): T;
8
+ export declare function run<T>(value: T, callback: (value: T) => void): T;
9
+ export declare function transform<T, U>(value: T, callback: (value: T) => U): U;
10
+ type IterableItem<T> = T extends Iterable<infer U> ? U : never;
11
+ export declare function modifyEach<T extends Iterable<unknown>>(values: T, callback: (value: NonNullable<IterableItem<T>>) => void): T;
12
+ export declare function runEach<T extends Iterable<unknown>>(values: T, callback: (value: IterableItem<T>) => void): T;
13
+ export declare function transformEach<T, U>(values: Iterable<T>, callback: (value: T) => U): U[];
14
+ export declare function asVoid(_: unknown): void;
15
+ export {};
16
+ //# sourceMappingURL=common.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/common.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,SAAS,CAEnE;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAE/D;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAa/F;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC,OAAO,CAAC,CAErE;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAQ5D;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAKhF;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,CAAC,CAGhE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAEtE;AAED,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC/D,wBAAgB,UAAU,CAAC,CAAC,SAAS,QAAQ,CAAC,OAAO,CAAC,EACpD,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,GACtD,CAAC,CAOH;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC,CAK7G;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAMvF;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAEvC"}
@@ -0,0 +1,4 @@
1
+ export type Condition<T = never> = boolean | ([T] extends [never] ? () => boolean : (ctx: T) => boolean);
2
+ export declare function evalCondition(condition: Condition<never>): boolean;
3
+ export declare function evalCondition<T>(condition: Condition<T>, ctx: T): boolean;
4
+ //# sourceMappingURL=condition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/condition.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,KAAK,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;AACzG,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;AACpE,wBAAgB,aAAa,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ApiEndpoint } from '../transform/index.js';
2
+ export declare function getEndpointUrlPreview(endpoint: ApiEndpoint): string;
3
+ //# sourceMappingURL=endpoint.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/endpoint.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAOnE"}
@@ -0,0 +1,2 @@
1
+ export declare function throwExp(message: string): never;
2
+ //# sourceMappingURL=error.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/error.utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAE/C"}
@@ -0,0 +1,21 @@
1
+ import type { Constructor } from './type.utils.js';
2
+ type FactoryProvider<T, TArgs extends any[]> = {
3
+ kind: 'ctor';
4
+ factory: Constructor<T, TArgs>;
5
+ } | {
6
+ kind: 'fn';
7
+ factory: (...args: TArgs) => T;
8
+ } | {
9
+ kind: 'value';
10
+ factory: T;
11
+ };
12
+ export declare class Factory<T, TArgs extends any[]> {
13
+ private readonly _provider;
14
+ constructor(_provider: FactoryProvider<T, TArgs>);
15
+ create(...args: TArgs): T;
16
+ static fromType<T, TArgs extends any[]>(type: Constructor<T, TArgs>): Factory<T, TArgs>;
17
+ static fromFn<T, TArgs extends any[]>(fn: (...args: TArgs) => T): Factory<T, TArgs>;
18
+ static fromValue<T>(value: T): Factory<T, []>;
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/factory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,KAAK,eAAe,CAAC,CAAC,EAAE,KAAK,SAAS,GAAG,EAAE,IACvC;IACA,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;CAChC,GACC;IACA,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC,CAAC;CAChC,GACC;IACA,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEJ,qBAAa,OAAO,CAAC,CAAC,EAAE,KAAK,SAAS,GAAG,EAAE;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC;IAE1D,MAAM,CAAC,GAAG,IAAI,EAAE,KAAK,GAAG,CAAC;WAWlB,QAAQ,CAAC,CAAC,EAAE,KAAK,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC;WAIhF,MAAM,CAAC,CAAC,EAAE,KAAK,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC;WAI5E,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC;CAGrD"}
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Factory = void 0;
4
4
  class Factory {
5
5
  constructor(_provider) {
6
- this._provider = _provider;
6
+ Object.defineProperty(this, "_provider", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: _provider
11
+ });
7
12
  }
8
13
  create(...args) {
9
14
  switch (this._provider.kind) {
@@ -0,0 +1,9 @@
1
+ import type { Nullable } from './type.utils.js';
2
+ export type DirectoryScanOptions = {
3
+ recursive: boolean;
4
+ maxDepth: Nullable<number>;
5
+ filter?: (file: string) => boolean;
6
+ };
7
+ export declare const defaultDirectoryScanOptions: DirectoryScanOptions;
8
+ export declare function getFiles(dir: string, options?: Partial<DirectoryScanOptions>): Promise<string[]>;
9
+ //# sourceMappingURL=file-system.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/file-system.utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,oBAGzC,CAAC;AAEF,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAKtG"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultDirectoryScanOptions = void 0;
4
4
  exports.getFiles = getFiles;
5
5
  const tslib_1 = require("tslib");
6
- const path_1 = require("path");
6
+ const node_path_1 = require("node:path");
7
7
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
8
8
  exports.defaultDirectoryScanOptions = {
9
9
  recursive: false,
@@ -18,7 +18,7 @@ async function getFiles(dir, options) {
18
18
  async function getFilesImpl(dir, options, files, currentDepth) {
19
19
  const dirFiles = await fs_extra_1.default.readdir(dir);
20
20
  for (const file of dirFiles) {
21
- const filePath = (0, path_1.resolve)(dir, file);
21
+ const filePath = (0, node_path_1.resolve)(dir, file);
22
22
  const stat = await fs_extra_1.default.lstat(filePath);
23
23
  if (stat.isDirectory()) {
24
24
  if (options.recursive) {
@@ -0,0 +1,2 @@
1
+ export declare function getInitializedValue<T>(value: T | undefined): T;
2
+ //# sourceMappingURL=generator.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/generator.utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,CAK9D"}
@@ -0,0 +1,16 @@
1
+ export * from './array.utils.js';
2
+ export * from './asset-manager.js';
3
+ export * from './class.utils.js';
4
+ export * from './common.utils.js';
5
+ export * from './endpoint.utils.js';
6
+ export * from './error.utils.js';
7
+ export * from './factory.js';
8
+ export * from './generator.utils.js';
9
+ export * from './object.utils.js';
10
+ export * from './schema.utils.js';
11
+ export * from './source-builder.js';
12
+ export * from './string-builder/index.js';
13
+ export * from './string.utils.js';
14
+ export * from './string.utils.types.js';
15
+ export * from './type.utils.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC"}