@osdk/generator 2.0.0-beta.12 → 2.0.0-beta.14

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 (300) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/build/browser/GenerateContext/EnhanceCommon.d.ts +9 -0
  3. package/build/browser/GenerateContext/EnhanceCommon.d.ts.map +1 -0
  4. package/build/browser/GenerateContext/EnhanceCommon.js +17 -0
  5. package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -0
  6. package/build/browser/GenerateContext/EnhancedAction.d.ts +14 -0
  7. package/build/browser/GenerateContext/EnhancedAction.d.ts.map +1 -0
  8. package/build/browser/GenerateContext/EnhancedAction.js +42 -0
  9. package/build/browser/GenerateContext/EnhancedAction.js.map +1 -0
  10. package/build/browser/GenerateContext/EnhancedBase.d.ts +23 -0
  11. package/build/browser/GenerateContext/EnhancedBase.d.ts.map +1 -0
  12. package/build/browser/GenerateContext/EnhancedBase.js +72 -0
  13. package/build/browser/GenerateContext/EnhancedBase.js.map +1 -0
  14. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +13 -0
  15. package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -0
  16. package/build/browser/GenerateContext/EnhancedInterfaceType.js +38 -0
  17. package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  18. package/build/browser/GenerateContext/EnhancedObjectType.d.ts +12 -0
  19. package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +1 -0
  20. package/build/browser/GenerateContext/EnhancedObjectType.js +35 -0
  21. package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -0
  22. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts +27 -0
  23. package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts.map +1 -0
  24. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  25. package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  26. package/build/browser/GenerateContext/EnhancedQuery.d.ts +14 -0
  27. package/build/browser/GenerateContext/EnhancedQuery.d.ts.map +1 -0
  28. package/build/browser/GenerateContext/EnhancedQuery.js +42 -0
  29. package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -0
  30. package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts +8 -0
  31. package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts.map +1 -0
  32. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  33. package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  34. package/build/browser/GenerateContext/ForeignType.d.ts +10 -0
  35. package/build/browser/GenerateContext/ForeignType.d.ts.map +1 -0
  36. package/build/browser/GenerateContext/ForeignType.js +36 -0
  37. package/build/browser/GenerateContext/ForeignType.js.map +1 -0
  38. package/build/browser/GenerateContext/GenerateContext.d.ts +13 -0
  39. package/build/browser/GenerateContext/GenerateContext.d.ts.map +1 -0
  40. package/build/browser/GenerateContext/GenerateContext.js +17 -0
  41. package/build/browser/GenerateContext/GenerateContext.js.map +1 -0
  42. package/build/browser/GenerateContext/enhanceOntology.d.ts +4 -0
  43. package/build/browser/GenerateContext/enhanceOntology.d.ts.map +1 -0
  44. package/build/browser/GenerateContext/enhanceOntology.js +20 -0
  45. package/build/browser/GenerateContext/enhanceOntology.js.map +1 -0
  46. package/build/browser/MinimalFs.d.ts +10 -0
  47. package/build/browser/MinimalFs.d.ts.map +1 -0
  48. package/build/browser/MinimalFs.js +17 -0
  49. package/build/browser/MinimalFs.js.map +1 -0
  50. package/build/browser/WireOntologyDefinition.d.ts +4 -0
  51. package/build/browser/WireOntologyDefinition.d.ts.map +1 -0
  52. package/build/browser/WireOntologyDefinition.js +17 -0
  53. package/build/browser/WireOntologyDefinition.js.map +1 -0
  54. package/build/browser/generateClientSdkPackage.d.ts +47 -0
  55. package/build/browser/generateClientSdkPackage.d.ts.map +1 -0
  56. package/build/browser/generateClientSdkPackage.js +126 -0
  57. package/build/browser/generateClientSdkPackage.js.map +1 -0
  58. package/build/browser/generateClientSdkPackage.test.d.ts +2 -0
  59. package/build/browser/generateClientSdkPackage.test.d.ts.map +1 -0
  60. package/build/browser/generateClientSdkPackage.test.js +67 -0
  61. package/build/browser/generateClientSdkPackage.test.js.map +1 -0
  62. package/build/browser/index.d.ts +5 -0
  63. package/build/browser/index.d.ts.map +1 -0
  64. package/build/browser/index.js +17 -1311
  65. package/build/browser/index.js.map +1 -1
  66. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts +2 -0
  67. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +1 -0
  68. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  69. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  70. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +2 -0
  71. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +1 -0
  72. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  73. package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  74. package/build/browser/shared/getObjectImports.d.ts +4 -0
  75. package/build/browser/shared/getObjectImports.d.ts.map +1 -0
  76. package/build/browser/shared/getObjectImports.js +24 -0
  77. package/build/browser/shared/getObjectImports.js.map +1 -0
  78. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts +4 -0
  79. package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +1 -0
  80. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  81. package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  82. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts +3 -0
  83. package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +1 -0
  84. package/build/browser/shared/getObjectTypesFromQueryDataType.js +57 -0
  85. package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  86. package/build/browser/shared/propertyJsdoc.d.ts +6 -0
  87. package/build/browser/shared/propertyJsdoc.d.ts.map +1 -0
  88. package/build/browser/shared/propertyJsdoc.js +38 -0
  89. package/build/browser/shared/propertyJsdoc.js.map +1 -0
  90. package/build/browser/shared/sanitizeMetadata.d.ts +2 -0
  91. package/build/browser/shared/sanitizeMetadata.d.ts.map +1 -0
  92. package/build/browser/shared/sanitizeMetadata.js +33 -0
  93. package/build/browser/shared/sanitizeMetadata.js.map +1 -0
  94. package/build/browser/shared/sanitizeMetadata.test.d.ts +2 -0
  95. package/build/browser/shared/sanitizeMetadata.test.d.ts.map +1 -0
  96. package/build/browser/shared/sanitizeMetadata.test.js +44 -0
  97. package/build/browser/shared/sanitizeMetadata.test.js.map +1 -0
  98. package/build/browser/util/InMemoryFs.d.ts +7 -0
  99. package/build/browser/util/InMemoryFs.d.ts.map +1 -0
  100. package/build/browser/util/InMemoryFs.js +30 -0
  101. package/build/browser/util/InMemoryFs.js.map +1 -0
  102. package/build/browser/util/commaSeparatedIdentifiers.d.ts +2 -0
  103. package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +1 -0
  104. package/build/browser/util/commaSeparatedIdentifiers.js +25 -0
  105. package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -0
  106. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts +2 -0
  107. package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +1 -0
  108. package/build/browser/util/commaSeparatedTypeIdentifiers.js +19 -0
  109. package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  110. package/build/browser/util/deleteUndefineds.d.ts +2 -0
  111. package/build/browser/util/deleteUndefineds.d.ts.map +1 -0
  112. package/build/browser/util/deleteUndefineds.js +19 -0
  113. package/build/browser/util/deleteUndefineds.js.map +1 -0
  114. package/build/browser/util/reservedKeywords.d.ts +2 -0
  115. package/build/browser/util/reservedKeywords.d.ts.map +1 -0
  116. package/build/browser/util/reservedKeywords.js +21 -0
  117. package/build/browser/util/reservedKeywords.js.map +1 -0
  118. package/build/browser/util/stringUnionFrom.d.ts +2 -0
  119. package/build/browser/util/stringUnionFrom.d.ts.map +1 -0
  120. package/build/browser/util/stringUnionFrom.js +23 -0
  121. package/build/browser/util/stringUnionFrom.js.map +1 -0
  122. package/build/browser/util/stringify.d.ts +20 -0
  123. package/build/browser/util/stringify.d.ts.map +1 -0
  124. package/build/browser/util/stringify.js +36 -0
  125. package/build/browser/util/stringify.js.map +1 -0
  126. package/build/browser/util/test/TodoWireOntology.d.ts +217 -0
  127. package/build/browser/util/test/TodoWireOntology.d.ts.map +1 -0
  128. package/build/browser/util/test/TodoWireOntology.js +232 -0
  129. package/build/browser/util/test/TodoWireOntology.js.map +1 -0
  130. package/build/browser/util/test/compileThis.d.ts +3 -0
  131. package/build/browser/util/test/compileThis.d.ts.map +1 -0
  132. package/build/browser/util/test/compileThis.js +41 -0
  133. package/build/browser/util/test/compileThis.js.map +1 -0
  134. package/build/browser/util/test/createMockMinimalFiles.d.ts +13 -0
  135. package/build/browser/util/test/createMockMinimalFiles.d.ts.map +1 -0
  136. package/build/browser/util/test/createMockMinimalFiles.js +37 -0
  137. package/build/browser/util/test/createMockMinimalFiles.js.map +1 -0
  138. package/build/browser/util/test/formatTs.d.ts +2 -0
  139. package/build/browser/util/test/formatTs.d.ts.map +1 -0
  140. package/build/browser/util/test/formatTs.js +32 -0
  141. package/build/browser/util/test/formatTs.js.map +1 -0
  142. package/build/browser/util/verifyOutDir.d.ts +9 -0
  143. package/build/browser/util/verifyOutDir.d.ts.map +1 -0
  144. package/build/browser/util/verifyOutDir.js +35 -0
  145. package/build/browser/util/verifyOutDir.js.map +1 -0
  146. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +2 -0
  147. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +1 -0
  148. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  149. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  150. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +2 -0
  151. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +1 -0
  152. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  153. package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  154. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +4 -0
  155. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +1 -0
  156. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  157. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  158. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +2 -0
  159. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +1 -0
  160. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +1949 -0
  161. package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  162. package/build/browser/v2.0/generateMetadata.d.ts +3 -0
  163. package/build/browser/v2.0/generateMetadata.d.ts.map +1 -0
  164. package/build/browser/v2.0/generateMetadata.js +35 -0
  165. package/build/browser/v2.0/generateMetadata.js.map +1 -0
  166. package/build/browser/v2.0/generatePerActionDataFiles.d.ts +3 -0
  167. package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +1 -0
  168. package/build/browser/v2.0/generatePerActionDataFiles.js +240 -0
  169. package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -0
  170. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts +2 -0
  171. package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts.map +1 -0
  172. package/build/browser/v2.0/generatePerActionDataFiles.test.js +51 -0
  173. package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  174. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts +9 -0
  175. package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +1 -0
  176. package/build/browser/v2.0/generatePerQueryDataFiles.js +194 -0
  177. package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -0
  178. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts +2 -0
  179. package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts.map +1 -0
  180. package/build/browser/v2.0/generatePerQueryDataFiles.test.js +199 -0
  181. package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  182. package/build/browser/v2.0/getDescriptionIfPresent.d.ts +2 -0
  183. package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +1 -0
  184. package/build/browser/v2.0/getDescriptionIfPresent.js +24 -0
  185. package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -0
  186. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +13 -0
  187. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -0
  188. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  189. package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  190. package/build/browser/validateWireOntologyAssumptions.d.ts +3 -0
  191. package/build/browser/validateWireOntologyAssumptions.d.ts.map +1 -0
  192. package/build/browser/validateWireOntologyAssumptions.js +33 -0
  193. package/build/browser/validateWireOntologyAssumptions.js.map +1 -0
  194. package/build/esm/GenerateContext/EnhanceCommon.js +17 -0
  195. package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -0
  196. package/build/esm/GenerateContext/EnhancedAction.js +42 -0
  197. package/build/esm/GenerateContext/EnhancedAction.js.map +1 -0
  198. package/build/esm/GenerateContext/EnhancedBase.d.ts.map +1 -1
  199. package/build/esm/GenerateContext/EnhancedBase.js +72 -0
  200. package/build/esm/GenerateContext/EnhancedBase.js.map +1 -0
  201. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +2 -2
  202. package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +1 -1
  203. package/build/esm/GenerateContext/EnhancedInterfaceType.js +38 -0
  204. package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -0
  205. package/build/esm/GenerateContext/EnhancedObjectType.d.ts +2 -2
  206. package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +1 -1
  207. package/build/esm/GenerateContext/EnhancedObjectType.js +35 -0
  208. package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -0
  209. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +77 -0
  210. package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -0
  211. package/build/esm/GenerateContext/EnhancedQuery.js +42 -0
  212. package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -0
  213. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +24 -0
  214. package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -0
  215. package/build/esm/GenerateContext/ForeignType.js +36 -0
  216. package/build/esm/GenerateContext/ForeignType.js.map +1 -0
  217. package/build/esm/GenerateContext/GenerateContext.js +17 -0
  218. package/build/esm/GenerateContext/GenerateContext.js.map +1 -0
  219. package/build/esm/GenerateContext/enhanceOntology.js +20 -0
  220. package/build/esm/GenerateContext/enhanceOntology.js.map +1 -0
  221. package/build/esm/MinimalFs.js +17 -0
  222. package/build/esm/MinimalFs.js.map +1 -0
  223. package/build/esm/WireOntologyDefinition.js +17 -0
  224. package/build/esm/WireOntologyDefinition.js.map +1 -0
  225. package/build/esm/generateClientSdkPackage.d.ts +1 -6
  226. package/build/esm/generateClientSdkPackage.d.ts.map +1 -1
  227. package/build/esm/generateClientSdkPackage.js +126 -0
  228. package/build/esm/generateClientSdkPackage.js.map +1 -0
  229. package/build/esm/generateClientSdkPackage.test.js +67 -0
  230. package/build/esm/generateClientSdkPackage.test.js.map +1 -0
  231. package/build/esm/index.js +17 -1311
  232. package/build/esm/index.js.map +1 -1
  233. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +23 -0
  234. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -0
  235. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +46 -0
  236. package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -0
  237. package/build/esm/shared/getObjectImports.js +24 -0
  238. package/build/esm/shared/getObjectImports.js.map +1 -0
  239. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +27 -0
  240. package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -0
  241. package/build/esm/shared/getObjectTypesFromQueryDataType.js +57 -0
  242. package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -0
  243. package/build/esm/shared/propertyJsdoc.js +38 -0
  244. package/build/esm/shared/propertyJsdoc.js.map +1 -0
  245. package/build/esm/shared/sanitizeMetadata.js +33 -0
  246. package/build/esm/shared/sanitizeMetadata.js.map +1 -0
  247. package/build/esm/shared/sanitizeMetadata.test.js +44 -0
  248. package/build/esm/shared/sanitizeMetadata.test.js.map +1 -0
  249. package/build/esm/util/InMemoryFs.js +30 -0
  250. package/build/esm/util/InMemoryFs.js.map +1 -0
  251. package/build/esm/util/commaSeparatedIdentifiers.js +25 -0
  252. package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -0
  253. package/build/esm/util/commaSeparatedTypeIdentifiers.js +19 -0
  254. package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -0
  255. package/build/esm/util/deleteUndefineds.js +19 -0
  256. package/build/esm/util/deleteUndefineds.js.map +1 -0
  257. package/build/esm/util/reservedKeywords.js +21 -0
  258. package/build/esm/util/reservedKeywords.js.map +1 -0
  259. package/build/esm/util/stringUnionFrom.js +23 -0
  260. package/build/esm/util/stringUnionFrom.js.map +1 -0
  261. package/build/esm/util/stringify.js +36 -0
  262. package/build/esm/util/stringify.js.map +1 -0
  263. package/build/esm/util/test/TodoWireOntology.js +232 -0
  264. package/build/esm/util/test/TodoWireOntology.js.map +1 -0
  265. package/build/esm/util/test/compileThis.js +41 -0
  266. package/build/esm/util/test/compileThis.js.map +1 -0
  267. package/build/esm/util/test/createMockMinimalFiles.js +37 -0
  268. package/build/esm/util/test/createMockMinimalFiles.js.map +1 -0
  269. package/build/esm/util/test/formatTs.js +32 -0
  270. package/build/esm/util/test/formatTs.js.map +1 -0
  271. package/build/esm/util/verifyOutDir.js +35 -0
  272. package/build/esm/util/verifyOutDir.js.map +1 -0
  273. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +114 -0
  274. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -0
  275. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +273 -0
  276. package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -0
  277. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +119 -0
  278. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -0
  279. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +1949 -0
  280. package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -0
  281. package/build/esm/v2.0/generateMetadata.js +35 -0
  282. package/build/esm/v2.0/generateMetadata.js.map +1 -0
  283. package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +1 -1
  284. package/build/esm/v2.0/generatePerActionDataFiles.js +240 -0
  285. package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -0
  286. package/build/esm/v2.0/generatePerActionDataFiles.test.js +51 -0
  287. package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -0
  288. package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +1 -1
  289. package/build/esm/v2.0/generatePerQueryDataFiles.js +194 -0
  290. package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -0
  291. package/build/esm/v2.0/generatePerQueryDataFiles.test.js +199 -0
  292. package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -0
  293. package/build/esm/v2.0/getDescriptionIfPresent.js +24 -0
  294. package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -0
  295. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
  296. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +205 -0
  297. package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -0
  298. package/build/esm/validateWireOntologyAssumptions.js +33 -0
  299. package/build/esm/validateWireOntologyAssumptions.js.map +1 -0
  300. package/package.json +6 -8
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { EnhancedBase } from "./EnhancedBase.js";
17
+ export class EnhancedSharedPropertyType extends EnhancedBase {
18
+ raw;
19
+ constructor(common, raw) {
20
+ super(common, raw, raw.apiName, "./ontology/interfaces");
21
+ this.raw = raw;
22
+ }
23
+ }
24
+ //# sourceMappingURL=EnhancedSharedPropertyType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnhancedSharedPropertyType.js","names":["EnhancedBase","EnhancedSharedPropertyType","raw","constructor","common","apiName"],"sources":["EnhancedSharedPropertyType.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnhancedBase } from \"./EnhancedBase.js\";\nexport class EnhancedSharedPropertyType extends EnhancedBase {\n raw;\n constructor(common, raw) {\n super(common, raw, raw.apiName, \"./ontology/interfaces\");\n this.raw = raw;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,mBAAmB;AAChD,OAAO,MAAMC,0BAA0B,SAASD,YAAY,CAAC;EACzDE,GAAG;EACHC,WAAWA,CAACC,MAAM,EAAEF,GAAG,EAAE;IACrB,KAAK,CAACE,MAAM,EAAEF,GAAG,EAAEA,GAAG,CAACG,OAAO,EAAE,uBAAuB,CAAC;IACxD,IAAI,CAACH,GAAG,GAAGA,GAAG;EAClB;AACJ","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import type { EnhanceCommon } from "./EnhanceCommon.js";
2
+ import { AbstractImportable } from "./EnhancedBase.js";
3
+ export declare class ForeignType extends AbstractImportable {
4
+ _common: EnhanceCommon;
5
+ readonly type: string;
6
+ constructor(_common: EnhanceCommon, type: string, apiNamespace: string, shortApiName: string);
7
+ getImportedDefinitionIdentifier(v2: boolean): string;
8
+ getDefinitionIdentifier(v2: boolean): string;
9
+ }
10
+ //# sourceMappingURL=ForeignType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForeignType.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/ForeignType.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,qBAAa,WAAY,SAAQ,kBAAkB;IAExC,OAAO,EAAE,aAAa;aACb,IAAI,EAAE,MAAM;gBADrB,OAAO,EAAE,aAAa,EACb,IAAI,EAAE,MAAM,EAC5B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM;IAStB,+BAA+B,CAAC,EAAE,EAAE,OAAO;IAM3C,uBAAuB,CAAC,EAAE,EAAE,OAAO;CAOpC"}
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { AbstractImportable } from "./EnhancedBase.js";
17
+ export class ForeignType extends AbstractImportable {
18
+ _common;
19
+ type;
20
+ constructor(_common, type, apiNamespace, shortApiName) {
21
+ super(_common, `${apiNamespace}.${shortApiName}`, _common.apiNamespacePackageMap.get(apiNamespace));
22
+ this._common = _common;
23
+ this.type = type;
24
+ }
25
+ getImportedDefinitionIdentifier() {
26
+ return `$Imported$${this.type}$${this.apiNamespace.replace(/\./g, "$")}$${this.shortApiName}`;
27
+ }
28
+ getDefinitionIdentifier(v2) {
29
+ if (this.type === "objectTypes") {
30
+ return v2 ? this.uniqueImportName : `${this.uniqueImportName}Def`;
31
+ } else {
32
+ return this.uniqueImportName;
33
+ }
34
+ }
35
+ }
36
+ //# sourceMappingURL=ForeignType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForeignType.js","names":["AbstractImportable","ForeignType","_common","type","constructor","apiNamespace","shortApiName","apiNamespacePackageMap","get","getImportedDefinitionIdentifier","replace","getDefinitionIdentifier","v2","uniqueImportName"],"sources":["ForeignType.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractImportable } from \"./EnhancedBase.js\";\nexport class ForeignType extends AbstractImportable {\n _common;\n type;\n constructor(_common, type, apiNamespace, shortApiName) {\n super(_common, `${apiNamespace}.${shortApiName}`, _common.apiNamespacePackageMap.get(apiNamespace));\n this._common = _common;\n this.type = type;\n }\n getImportedDefinitionIdentifier(v2) {\n return `$Imported$${this.type}$${this.apiNamespace.replace(/\\./g, \"$\")}$${this.shortApiName}`;\n }\n getDefinitionIdentifier(v2) {\n if (this.type === \"objectTypes\") {\n return v2 ? this.uniqueImportName : `${this.uniqueImportName}Def`;\n }\n else {\n return this.uniqueImportName;\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,mBAAmB;AACtD,OAAO,MAAMC,WAAW,SAASD,kBAAkB,CAAC;EAChDE,OAAO;EACPC,IAAI;EACJC,WAAWA,CAACF,OAAO,EAAEC,IAAI,EAAEE,YAAY,EAAEC,YAAY,EAAE;IACnD,KAAK,CAACJ,OAAO,EAAE,GAAGG,YAAY,IAAIC,YAAY,EAAE,EAAEJ,OAAO,CAACK,sBAAsB,CAACC,GAAG,CAACH,YAAY,CAAC,CAAC;IACnG,IAAI,CAACH,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,IAAI,GAAGA,IAAI;EACpB;EACAM,+BAA+BA,CAAA,EAAK;IAChC,OAAO,aAAa,IAAI,CAACN,IAAI,IAAI,IAAI,CAACE,YAAY,CAACK,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,IAAI,CAACJ,YAAY,EAAE;EACjG;EACAK,uBAAuBA,CAACC,EAAE,EAAE;IACxB,IAAI,IAAI,CAACT,IAAI,KAAK,aAAa,EAAE;MAC7B,OAAOS,EAAE,GAAG,IAAI,CAACC,gBAAgB,GAAG,GAAG,IAAI,CAACA,gBAAgB,KAAK;IACrE,CAAC,MACI;MACD,OAAO,IAAI,CAACA,gBAAgB;IAChC;EACJ;AACJ","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import type { MinimalFs } from "../MinimalFs.js";
2
+ import type { WireOntologyDefinition } from "../WireOntologyDefinition.js";
3
+ import type { EnhancedOntologyDefinition } from "./EnhancedOntologyDefinition.js";
4
+ export interface GenerateContext {
5
+ sanitizedOntology: WireOntologyDefinition;
6
+ ontology: EnhancedOntologyDefinition;
7
+ importExt?: string;
8
+ fs: MinimalFs;
9
+ outDir: string;
10
+ ontologyApiNamespace?: string | undefined;
11
+ apiNamespacePackageMap?: Map<string, string>;
12
+ }
13
+ //# sourceMappingURL=GenerateContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/GenerateContext.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,EAAE,0BAA0B,CAAC;IAErC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,SAAS,CAAC;IAEd,MAAM,EAAE,MAAM,CAAC;IAEf,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=GenerateContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenerateContext.js","names":[],"sources":["GenerateContext.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import type { WireOntologyDefinition } from "../WireOntologyDefinition.js";
2
+ import { EnhancedOntologyDefinition } from "./EnhancedOntologyDefinition.js";
3
+ export declare function enhanceOntology(sanitized: WireOntologyDefinition, ontologyApiNamespace: string | undefined, apiNamespacePackageMap: Map<string, string>, importExt: string): EnhancedOntologyDefinition;
4
+ //# sourceMappingURL=enhanceOntology.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enhanceOntology.d.ts","sourceRoot":"","sources":["../../../src/GenerateContext/enhanceOntology.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,wBAAgB,eAAe,CAC7B,SAAS,EAAE,sBAAsB,EACjC,oBAAoB,EAAE,MAAM,GAAG,SAAS,EACxC,sBAAsB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,SAAS,EAAE,MAAM,GAChB,0BAA0B,CAO5B"}
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { EnhancedOntologyDefinition } from "./EnhancedOntologyDefinition.js";
17
+ export function enhanceOntology(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt) {
18
+ return new EnhancedOntologyDefinition(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt);
19
+ }
20
+ //# sourceMappingURL=enhanceOntology.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enhanceOntology.js","names":["EnhancedOntologyDefinition","enhanceOntology","sanitized","ontologyApiNamespace","apiNamespacePackageMap","importExt"],"sources":["enhanceOntology.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnhancedOntologyDefinition } from \"./EnhancedOntologyDefinition.js\";\nexport function enhanceOntology(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt) {\n return new EnhancedOntologyDefinition(sanitized, ontologyApiNamespace, apiNamespacePackageMap, importExt);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,0BAA0B,QAAQ,iCAAiC;AAC5E,OAAO,SAASC,eAAeA,CAACC,SAAS,EAAEC,oBAAoB,EAAEC,sBAAsB,EAAEC,SAAS,EAAE;EAChG,OAAO,IAAIL,0BAA0B,CAACE,SAAS,EAAEC,oBAAoB,EAAEC,sBAAsB,EAAEC,SAAS,CAAC;AAC7G","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ export interface MinimalFs {
2
+ mkdir: (path: string, options?: {
3
+ recursive: boolean;
4
+ }) => Promise<void>;
5
+ writeFile: WriteFileFn;
6
+ readdir: ReaddirFn;
7
+ }
8
+ export type WriteFileFn = (path: string, contents: string) => Promise<void>;
9
+ export type ReaddirFn = (path: string) => Promise<string[]>;
10
+ //# sourceMappingURL=MinimalFs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MinimalFs.d.ts","sourceRoot":"","sources":["../../src/MinimalFs.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5E,MAAM,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=MinimalFs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MinimalFs.js","names":[],"sources":["MinimalFs.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import type * as gateway from "@osdk/internal.foundry.core";
2
+ export interface WireOntologyDefinition extends gateway.OntologyFullMetadata {
3
+ }
4
+ //# sourceMappingURL=WireOntologyDefinition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WireOntologyDefinition.d.ts","sourceRoot":"","sources":["../../src/WireOntologyDefinition.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,OAAO,MAAM,6BAA6B,CAAC;AAE5D,MAAM,WAAW,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB;CAC3E"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=WireOntologyDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WireOntologyDefinition.js","names":[],"sources":["WireOntologyDefinition.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ import type { MinimalFs } from "./MinimalFs.js";
2
+ import type { WireOntologyDefinition } from "./WireOntologyDefinition.js";
3
+ export declare function generateClientSdkPackage(packageName: string, packageVersion: string, sdkVersion: "1.1" | "2.0", baseOutDir: string, ontology: WireOntologyDefinition, minimalFs: MinimalFs, dependencyVersions: DependencyVersions, cliVersion: string, ontologyApiNamespace: string | undefined, apiNamespacePackageMap: Map<string, string>): Promise<void>;
4
+ export interface DependencyVersions {
5
+ typescriptVersion: string;
6
+ tslibVersion: string;
7
+ areTheTypesWrongVersion: string;
8
+ osdkApiVersion: string;
9
+ osdkClientVersion: string;
10
+ }
11
+ export declare function getExpectedDependencies({ osdkApiVersion, osdkClientVersion, }: DependencyVersions): {
12
+ devDependencies: {
13
+ "@osdk/api": string;
14
+ };
15
+ peerDependencies: {
16
+ "@osdk/api": string;
17
+ "@osdk/client": string;
18
+ };
19
+ };
20
+ export declare function getPackageJsonContents(name: string, version: string, dependencyVersions: DependencyVersions): {
21
+ files: string[];
22
+ devDependencies: {
23
+ typescript: string;
24
+ tslib: string;
25
+ "@arethetypeswrong/cli": string;
26
+ "@osdk/api": string;
27
+ };
28
+ peerDependencies: {
29
+ "@osdk/api": string;
30
+ "@osdk/client": string;
31
+ };
32
+ name: string;
33
+ version: string;
34
+ main: string;
35
+ module: string;
36
+ exports: {
37
+ ".": {
38
+ import: string;
39
+ require: string;
40
+ };
41
+ };
42
+ scripts: {
43
+ prepack: string;
44
+ check: string;
45
+ };
46
+ };
47
+ //# sourceMappingURL=generateClientSdkPackage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateClientSdkPackage.d.ts","sourceRoot":"","sources":["../../src/generateClientSdkPackage.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,wBAAsB,wBAAwB,CAC5C,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,KAAK,GAAG,KAAK,EACzB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,sBAAsB,EAChC,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,MAAM,GAAG,SAAS,EACxC,sBAAsB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,iBA4D5C;AA+BD,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,uBAAuB,CACrC,EACE,cAAc,EACd,iBAAiB,GAClB,EAAE,kBAAkB;;;;;;;;EAWtB;AA0BD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BvC"}
@@ -0,0 +1,126 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as fs from "node:fs";
17
+ import * as path from "node:path";
18
+ import { generateClientSdkVersionTwoPointZero } from "./v2.0/generateClientSdkVersionTwoPointZero.js";
19
+ export async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, ontologyApiNamespace, apiNamespacePackageMap) {
20
+ if (!packageName) throw new Error("Package name is required");
21
+ if (sdkVersion === "1.1") {
22
+ throw new Error("This generator version does not support generating v1 sdks");
23
+ }
24
+ for (const packageType of ["module", "commonjs"]) {
25
+ const outDir = path.join(baseOutDir, "dist", packageType);
26
+ generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, ontologyApiNamespace, apiNamespacePackageMap);
27
+ await fs.promises.mkdir(outDir, {
28
+ recursive: true
29
+ });
30
+ await writeJson(minimalFs, path.join(outDir, "package.json"), {
31
+ type: packageType
32
+ });
33
+ await writeJson(minimalFs, path.join(outDir, `tsconfig.json`), {
34
+ compilerOptions: getTsCompilerOptions(packageType)
35
+ });
36
+ }
37
+ await writeJson(minimalFs, path.join(baseOutDir, "package.json"), await getPackageJsonContents(packageName, packageVersion, dependencyVersions));
38
+ // we need to shim for the node10 resolver
39
+ await minimalFs.mkdir(path.join(baseOutDir, "ontology"), {
40
+ recursive: true
41
+ });
42
+ await minimalFs.writeFile(path.join(baseOutDir, "ontology", "objects.js"), `module.exports = require("../../dist/module/ontology/objects")`);
43
+ await minimalFs.writeFile(path.join(baseOutDir, "ontology", "objects.d.ts"), `export * from "../dist/module/ontology/objects"`);
44
+ }
45
+ function getTsCompilerOptions(packageType) {
46
+ const commonTsconfig = {
47
+ importHelpers: true,
48
+ declaration: true,
49
+ isolatedModules: true,
50
+ esModuleInterop: true,
51
+ forceConsistentCasingInFileNames: true,
52
+ strict: true,
53
+ skipLibCheck: true
54
+ };
55
+ const compilerOptions = packageType === "commonjs" ? {
56
+ ...commonTsconfig,
57
+ module: "commonjs",
58
+ target: "es2018"
59
+ } : {
60
+ ...commonTsconfig,
61
+ module: "NodeNext",
62
+ target: "ES2020"
63
+ };
64
+ return compilerOptions;
65
+ }
66
+ export function getExpectedDependencies({
67
+ osdkApiVersion,
68
+ osdkClientVersion
69
+ }) {
70
+ return {
71
+ devDependencies: {
72
+ "@osdk/api": osdkApiVersion
73
+ },
74
+ peerDependencies: {
75
+ "@osdk/api": osdkApiVersion,
76
+ "@osdk/client": osdkClientVersion
77
+ }
78
+ };
79
+ }
80
+ function getExpectedDependenciesFull(dependencyVersions) {
81
+ const {
82
+ typescriptVersion,
83
+ tslibVersion,
84
+ areTheTypesWrongVersion
85
+ } = dependencyVersions;
86
+ const base = getExpectedDependencies(dependencyVersions);
87
+ return {
88
+ devDependencies: {
89
+ ...base.devDependencies,
90
+ "typescript": typescriptVersion,
91
+ "tslib": tslibVersion,
92
+ "@arethetypeswrong/cli": areTheTypesWrongVersion
93
+ },
94
+ peerDependencies: {
95
+ ...base.peerDependencies
96
+ }
97
+ };
98
+ }
99
+ export function getPackageJsonContents(name, version, dependencyVersions) {
100
+ const esmPrefix = "./dist/module";
101
+ const commonjsPrefix = "./dist/commonjs";
102
+ return {
103
+ name,
104
+ version,
105
+ main: `${commonjsPrefix}/index.js`,
106
+ module: `${esmPrefix}/index.js`,
107
+ exports: {
108
+ ".": {
109
+ import: `${esmPrefix}/index.js`,
110
+ require: `${commonjsPrefix}/index.js`
111
+ }
112
+ },
113
+ scripts: {
114
+ prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,
115
+ check: "npm exec attw $(npm pack)"
116
+ },
117
+ ...getExpectedDependenciesFull(dependencyVersions),
118
+ files: ["**/*.js", "**/*.d.ts", "dist/**/package.json"]
119
+ };
120
+ }
121
+ async function writeJson(minimalFs, filePath, body) {
122
+ // consola.info(`Writing ${filePath}`);
123
+ // consola.debug(`Writing ${filePath} with body`, body);
124
+ return await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + "\n");
125
+ }
126
+ //# sourceMappingURL=generateClientSdkPackage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateClientSdkPackage.js","names":["fs","path","generateClientSdkVersionTwoPointZero","generateClientSdkPackage","packageName","packageVersion","sdkVersion","baseOutDir","ontology","minimalFs","dependencyVersions","cliVersion","ontologyApiNamespace","apiNamespacePackageMap","Error","packageType","outDir","join","promises","mkdir","recursive","writeJson","type","compilerOptions","getTsCompilerOptions","getPackageJsonContents","writeFile","commonTsconfig","importHelpers","declaration","isolatedModules","esModuleInterop","forceConsistentCasingInFileNames","strict","skipLibCheck","module","target","getExpectedDependencies","osdkApiVersion","osdkClientVersion","devDependencies","peerDependencies","getExpectedDependenciesFull","typescriptVersion","tslibVersion","areTheTypesWrongVersion","base","name","version","esmPrefix","commonjsPrefix","main","exports","import","require","scripts","prepack","check","files","filePath","body","JSON","stringify","undefined"],"sources":["generateClientSdkPackage.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport async function generateClientSdkPackage(packageName, packageVersion, sdkVersion, baseOutDir, ontology, minimalFs, dependencyVersions, cliVersion, ontologyApiNamespace, apiNamespacePackageMap) {\n if (!packageName)\n throw new Error(\"Package name is required\");\n if (sdkVersion === \"1.1\") {\n throw new Error(\"This generator version does not support generating v1 sdks\");\n }\n for (const packageType of [\"module\", \"commonjs\"]) {\n const outDir = path.join(baseOutDir, \"dist\", packageType);\n generateClientSdkVersionTwoPointZero(ontology, `typescript-sdk/${packageVersion} osdk-cli/${cliVersion}`, minimalFs, outDir, packageType, ontologyApiNamespace, apiNamespacePackageMap);\n await fs.promises.mkdir(outDir, { recursive: true });\n await writeJson(minimalFs, path.join(outDir, \"package.json\"), { type: packageType });\n await writeJson(minimalFs, path.join(outDir, `tsconfig.json`), {\n compilerOptions: getTsCompilerOptions(packageType),\n });\n }\n await writeJson(minimalFs, path.join(baseOutDir, \"package.json\"), await getPackageJsonContents(packageName, packageVersion, dependencyVersions));\n // we need to shim for the node10 resolver\n await minimalFs.mkdir(path.join(baseOutDir, \"ontology\"), {\n recursive: true,\n });\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.js\"), `module.exports = require(\"../../dist/module/ontology/objects\")`);\n await minimalFs.writeFile(path.join(baseOutDir, \"ontology\", \"objects.d.ts\"), `export * from \"../dist/module/ontology/objects\"`);\n}\nfunction getTsCompilerOptions(packageType) {\n const commonTsconfig = {\n importHelpers: true,\n declaration: true,\n isolatedModules: true,\n esModuleInterop: true,\n forceConsistentCasingInFileNames: true,\n strict: true,\n skipLibCheck: true,\n };\n const compilerOptions = packageType === \"commonjs\"\n ? {\n ...commonTsconfig,\n module: \"commonjs\",\n target: \"es2018\",\n }\n : {\n ...commonTsconfig,\n module: \"NodeNext\",\n target: \"ES2020\",\n };\n return compilerOptions;\n}\nexport function getExpectedDependencies({ osdkApiVersion, osdkClientVersion, }) {\n return {\n devDependencies: {\n \"@osdk/api\": osdkApiVersion,\n },\n peerDependencies: {\n \"@osdk/api\": osdkApiVersion,\n \"@osdk/client\": osdkClientVersion,\n },\n };\n}\nfunction getExpectedDependenciesFull(dependencyVersions) {\n const { typescriptVersion, tslibVersion, areTheTypesWrongVersion, } = dependencyVersions;\n const base = getExpectedDependencies(dependencyVersions);\n return {\n devDependencies: {\n ...base.devDependencies,\n \"typescript\": typescriptVersion,\n \"tslib\": tslibVersion,\n \"@arethetypeswrong/cli\": areTheTypesWrongVersion,\n },\n peerDependencies: {\n ...base.peerDependencies,\n },\n };\n}\nexport function getPackageJsonContents(name, version, dependencyVersions) {\n const esmPrefix = \"./dist/module\";\n const commonjsPrefix = \"./dist/commonjs\";\n return {\n name,\n version,\n main: `${commonjsPrefix}/index.js`,\n module: `${esmPrefix}/index.js`,\n exports: {\n \".\": {\n import: `${esmPrefix}/index.js`,\n require: `${commonjsPrefix}/index.js`,\n },\n },\n scripts: {\n prepack: `tsc -p ${esmPrefix}/tsconfig.json && tsc -p ${commonjsPrefix}/tsconfig.json`,\n check: \"npm exec attw $(npm pack)\",\n },\n ...getExpectedDependenciesFull(dependencyVersions),\n files: [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n };\n}\nasync function writeJson(minimalFs, filePath, body) {\n // consola.info(`Writing ${filePath}`);\n // consola.debug(`Writing ${filePath} with body`, body);\n return await minimalFs.writeFile(filePath, JSON.stringify(body, undefined, 2) + \"\\n\");\n}\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=generateClientSdkPackage.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateClientSdkPackage.test.d.ts","sourceRoot":"","sources":["../../src/generateClientSdkPackage.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { describe, expect, test } from "vitest";
17
+ import { getPackageJsonContents } from "./generateClientSdkPackage.js";
18
+ describe("generateClientSdkPackage", () => {
19
+ describe(getPackageJsonContents, () => {
20
+ const versions = {
21
+ osdkApiVersion: "^99.9.9",
22
+ osdkClientVersion: "^88.8.8",
23
+ osdkClientApiVersion: "^66.6.6",
24
+ areTheTypesWrongVersion: "^0.15.2",
25
+ tslibVersion: "^2.6.2",
26
+ typescriptVersion: "^5.4.2"
27
+ };
28
+ describe("v2", () => {
29
+ test("returns the package.json contents", async () => {
30
+ expect(getPackageJsonContents("foo", "1.2.3", versions)).toMatchInlineSnapshot(`
31
+ {
32
+ "devDependencies": {
33
+ "@arethetypeswrong/cli": "^0.15.2",
34
+ "@osdk/api": "^99.9.9",
35
+ "tslib": "^2.6.2",
36
+ "typescript": "^5.4.2",
37
+ },
38
+ "exports": {
39
+ ".": {
40
+ "import": "./dist/module/index.js",
41
+ "require": "./dist/commonjs/index.js",
42
+ },
43
+ },
44
+ "files": [
45
+ "**/*.js",
46
+ "**/*.d.ts",
47
+ "dist/**/package.json",
48
+ ],
49
+ "main": "./dist/commonjs/index.js",
50
+ "module": "./dist/module/index.js",
51
+ "name": "foo",
52
+ "peerDependencies": {
53
+ "@osdk/api": "^99.9.9",
54
+ "@osdk/client": "^88.8.8",
55
+ },
56
+ "scripts": {
57
+ "check": "npm exec attw $(npm pack)",
58
+ "prepack": "tsc -p ./dist/module/tsconfig.json && tsc -p ./dist/commonjs/tsconfig.json",
59
+ },
60
+ "version": "1.2.3",
61
+ }
62
+ `);
63
+ });
64
+ });
65
+ });
66
+ });
67
+ //# sourceMappingURL=generateClientSdkPackage.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateClientSdkPackage.test.js","names":["describe","expect","test","getPackageJsonContents","versions","osdkApiVersion","osdkClientVersion","osdkClientApiVersion","areTheTypesWrongVersion","tslibVersion","typescriptVersion","toMatchInlineSnapshot"],"sources":["generateClientSdkPackage.test.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { describe, expect, test } from \"vitest\";\nimport { getPackageJsonContents } from \"./generateClientSdkPackage.js\";\ndescribe(\"generateClientSdkPackage\", () => {\n describe(getPackageJsonContents, () => {\n const versions = {\n osdkApiVersion: \"^99.9.9\",\n osdkClientVersion: \"^88.8.8\",\n osdkClientApiVersion: \"^66.6.6\",\n areTheTypesWrongVersion: \"^0.15.2\",\n tslibVersion: \"^2.6.2\",\n typescriptVersion: \"^5.4.2\",\n };\n describe(\"v2\", () => {\n test(\"returns the package.json contents\", async () => {\n expect(getPackageJsonContents(\"foo\", \"1.2.3\", versions))\n .toMatchInlineSnapshot(`\n {\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.15.2\",\n \"@osdk/api\": \"^99.9.9\",\n \"tslib\": \"^2.6.2\",\n \"typescript\": \"^5.4.2\",\n },\n \"exports\": {\n \".\": {\n \"import\": \"./dist/module/index.js\",\n \"require\": \"./dist/commonjs/index.js\",\n },\n },\n \"files\": [\n \"**/*.js\",\n \"**/*.d.ts\",\n \"dist/**/package.json\",\n ],\n \"main\": \"./dist/commonjs/index.js\",\n \"module\": \"./dist/module/index.js\",\n \"name\": \"foo\",\n \"peerDependencies\": {\n \"@osdk/api\": \"^99.9.9\",\n \"@osdk/client\": \"^88.8.8\",\n },\n \"scripts\": {\n \"check\": \"npm exec attw $(npm pack)\",\n \"prepack\": \"tsc -p ./dist/module/tsconfig.json && tsc -p ./dist/commonjs/tsconfig.json\",\n },\n \"version\": \"1.2.3\",\n }\n `);\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,QAAQ;AAC/C,SAASC,sBAAsB,QAAQ,+BAA+B;AACtEH,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvCA,QAAQ,CAACG,sBAAsB,EAAE,MAAM;IACnC,MAAMC,QAAQ,GAAG;MACbC,cAAc,EAAE,SAAS;MACzBC,iBAAiB,EAAE,SAAS;MAC5BC,oBAAoB,EAAE,SAAS;MAC/BC,uBAAuB,EAAE,SAAS;MAClCC,YAAY,EAAE,QAAQ;MACtBC,iBAAiB,EAAE;IACvB,CAAC;IACDV,QAAQ,CAAC,IAAI,EAAE,MAAM;MACjBE,IAAI,CAAC,mCAAmC,EAAE,YAAY;QAClDD,MAAM,CAACE,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAEC,QAAQ,CAAC,CAAC,CACnDO,qBAAqB,CAAC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,CAAC;MACA,CAAC,CAAC;IACN,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export { generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage, getExpectedDependencies, } from "./generateClientSdkPackage.js";
2
+ export type { MinimalFs } from "./MinimalFs.js";
3
+ export { generateClientSdkVersionTwoPointZero } from "./v2.0/generateClientSdkVersionTwoPointZero.js";
4
+ export type { WireOntologyDefinition } from "./WireOntologyDefinition.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,wBAAwB,IAAI,mCAAmC,EAC/D,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AACtG,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}