@dbml/core 10.3.0-alpha.2 → 10.4.0-alpha.0

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 (604) hide show
  1. package/lib/export/DbmlExporter.cjs +2 -2
  2. package/lib/export/DbmlExporter.mjs +7 -5
  3. package/lib/export/MysqlExporter.cjs +1 -1
  4. package/lib/export/MysqlExporter.mjs +4 -4
  5. package/lib/export/OracleExporter.cjs +1 -1
  6. package/lib/export/OracleExporter.mjs +5 -5
  7. package/lib/export/PostgresExporter.cjs +1 -1
  8. package/lib/export/PostgresExporter.mjs +4 -4
  9. package/lib/export/SqlServerExporter.cjs +1 -1
  10. package/lib/export/SqlServerExporter.mjs +4 -4
  11. package/lib/model_structure/database.cjs +1 -1
  12. package/lib/model_structure/database.mjs +3 -3
  13. package/lib/model_structure/dep.cjs +1 -1
  14. package/lib/model_structure/dep.mjs +2 -2
  15. package/lib/model_structure/enum.cjs +1 -1
  16. package/lib/model_structure/enum.mjs +2 -2
  17. package/lib/model_structure/enumValue.cjs +1 -1
  18. package/lib/model_structure/enumValue.mjs +2 -2
  19. package/lib/model_structure/field.cjs +1 -1
  20. package/lib/model_structure/field.mjs +2 -2
  21. package/lib/model_structure/ref.cjs +1 -1
  22. package/lib/model_structure/ref.mjs +3 -2
  23. package/lib/model_structure/schema.cjs +1 -1
  24. package/lib/model_structure/schema.mjs +2 -2
  25. package/lib/model_structure/table.cjs +1 -1
  26. package/lib/model_structure/table.mjs +3 -3
  27. package/lib/model_structure/tableGroup.cjs +1 -1
  28. package/lib/model_structure/tableGroup.mjs +2 -2
  29. package/lib/model_structure/tablePartial.cjs +1 -1
  30. package/lib/model_structure/tablePartial.mjs +2 -2
  31. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_DataView.cjs +1 -0
  32. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_DataView.mjs +2 -2
  33. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Hash.cjs +1 -0
  34. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Hash.mjs +2 -2
  35. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.cjs +1 -0
  36. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_ListCache.mjs +2 -2
  37. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Map.cjs +1 -0
  38. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Map.mjs +2 -2
  39. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.cjs +1 -0
  40. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_MapCache.mjs +2 -2
  41. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Promise.cjs +1 -0
  42. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Promise.mjs +2 -2
  43. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Set.cjs +1 -0
  44. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Set.mjs +2 -2
  45. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.cjs +1 -0
  46. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_SetCache.mjs +2 -2
  47. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Stack.cjs +1 -0
  48. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Stack.mjs +2 -2
  49. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.cjs +1 -0
  50. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Symbol.mjs +2 -2
  51. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.cjs +1 -0
  52. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_Uint8Array.mjs +2 -2
  53. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.cjs +1 -0
  54. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_WeakMap.mjs +2 -2
  55. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayAggregator.cjs +1 -0
  56. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayAggregator.mjs +2 -2
  57. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.cjs +1 -0
  58. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayEach.mjs +2 -2
  59. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.cjs +1 -0
  60. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayFilter.mjs +2 -2
  61. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.cjs +1 -0
  62. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayLikeKeys.mjs +2 -2
  63. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.cjs +1 -0
  64. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayMap.mjs +2 -2
  65. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.cjs +1 -0
  66. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayPush.mjs +2 -2
  67. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.cjs +1 -0
  68. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arrayReduce.mjs +2 -2
  69. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.cjs +1 -0
  70. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_arraySome.mjs +2 -2
  71. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiToArray.cjs +1 -0
  72. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiToArray.mjs +9 -0
  73. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.cjs +1 -0
  74. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_assocIndexOf.mjs +2 -2
  75. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAggregator.cjs +1 -0
  76. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseAggregator.mjs +2 -2
  77. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.cjs +1 -0
  78. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseAssignValue.mjs +2 -2
  79. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.cjs +1 -0
  80. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseEach.mjs +2 -2
  81. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.cjs +1 -0
  82. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseFlatten.mjs +2 -2
  83. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.cjs +1 -0
  84. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseFor.mjs +2 -2
  85. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.cjs +1 -0
  86. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseForOwn.mjs +2 -2
  87. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.cjs +1 -0
  88. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseGet.mjs +2 -2
  89. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.cjs +1 -0
  90. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseGetAllKeys.mjs +2 -2
  91. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.cjs +1 -0
  92. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseGetTag.mjs +2 -2
  93. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.cjs +1 -0
  94. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.mjs +9 -0
  95. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.cjs +1 -0
  96. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIsArguments.mjs +2 -2
  97. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.cjs +1 -0
  98. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIsEqual.mjs +2 -2
  99. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.cjs +1 -0
  100. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIsEqualDeep.mjs +2 -2
  101. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.cjs +1 -0
  102. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIsMatch.mjs +2 -2
  103. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.cjs +1 -0
  104. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIsNative.mjs +2 -2
  105. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.cjs +1 -0
  106. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIsTypedArray.mjs +2 -2
  107. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.cjs +1 -0
  108. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseIteratee.mjs +2 -2
  109. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.cjs +1 -0
  110. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseKeys.mjs +2 -2
  111. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.cjs +1 -0
  112. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseMatches.mjs +2 -2
  113. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.cjs +1 -0
  114. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseMatchesProperty.mjs +2 -2
  115. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseNth.cjs +1 -0
  116. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseNth.mjs +2 -2
  117. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.cjs +1 -0
  118. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.mjs +11 -0
  119. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.cjs +1 -0
  120. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_basePropertyDeep.mjs +2 -2
  121. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.cjs +1 -0
  122. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseReduce.mjs +2 -2
  123. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSlice.cjs +1 -0
  124. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseSlice.mjs +2 -2
  125. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.cjs +1 -0
  126. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseTimes.mjs +2 -2
  127. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.cjs +1 -0
  128. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseToString.mjs +2 -2
  129. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.cjs +1 -0
  130. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_baseTrim.mjs +2 -2
  131. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.cjs +1 -0
  132. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.mjs +11 -0
  133. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.cjs +1 -0
  134. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.mjs +9 -0
  135. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castFunction.cjs +1 -0
  136. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_castFunction.mjs +2 -2
  137. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castPath.cjs +1 -0
  138. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_castPath.mjs +2 -2
  139. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castSlice.cjs +1 -0
  140. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_castSlice.mjs +2 -2
  141. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.cjs +1 -0
  142. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_copyArray.mjs +2 -2
  143. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.cjs +1 -0
  144. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_coreJsData.mjs +2 -2
  145. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createAggregator.cjs +1 -0
  146. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_createAggregator.mjs +2 -2
  147. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.cjs +1 -0
  148. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_createBaseEach.mjs +2 -2
  149. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.cjs +1 -0
  150. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_createBaseFor.mjs +2 -2
  151. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCaseFirst.cjs +1 -0
  152. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_createCaseFirst.mjs +2 -2
  153. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.cjs +1 -0
  154. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_defineProperty.mjs +2 -2
  155. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.cjs +1 -0
  156. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_equalArrays.mjs +2 -2
  157. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.cjs +1 -0
  158. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_equalByTag.mjs +2 -2
  159. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.cjs +1 -0
  160. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_equalObjects.mjs +2 -2
  161. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.cjs +1 -0
  162. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_freeGlobal.mjs +2 -2
  163. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.cjs +1 -0
  164. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getAllKeys.mjs +2 -2
  165. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.cjs +1 -0
  166. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getMapData.mjs +2 -2
  167. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.cjs +1 -0
  168. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getMatchData.mjs +2 -2
  169. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getNative.cjs +1 -0
  170. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getNative.mjs +2 -2
  171. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.cjs +1 -0
  172. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getRawTag.mjs +2 -2
  173. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.cjs +1 -0
  174. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getSymbols.mjs +2 -2
  175. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getTag.cjs +1 -0
  176. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_getTag.mjs +2 -2
  177. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.cjs +1 -0
  178. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getValue.mjs +9 -0
  179. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.cjs +1 -0
  180. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hasPath.mjs +2 -2
  181. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicode.cjs +1 -0
  182. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hasUnicode.mjs +2 -2
  183. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.cjs +1 -0
  184. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hashClear.mjs +2 -2
  185. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.cjs +1 -0
  186. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hashDelete.mjs +2 -2
  187. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.cjs +1 -0
  188. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hashGet.mjs +2 -2
  189. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.cjs +1 -0
  190. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hashHas.mjs +2 -2
  191. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.cjs +1 -0
  192. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_hashSet.mjs +2 -2
  193. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.cjs +1 -0
  194. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isFlattenable.mjs +2 -2
  195. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.cjs +1 -0
  196. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isIndex.mjs +2 -2
  197. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.cjs +1 -0
  198. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isKey.mjs +2 -2
  199. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.cjs +1 -0
  200. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isKeyable.mjs +2 -2
  201. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.cjs +1 -0
  202. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isMasked.mjs +2 -2
  203. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.cjs +1 -0
  204. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isPrototype.mjs +2 -2
  205. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.cjs +1 -0
  206. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_isStrictComparable.mjs +2 -2
  207. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.cjs +1 -0
  208. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.mjs +9 -0
  209. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.cjs +1 -0
  210. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_listCacheDelete.mjs +2 -2
  211. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.cjs +1 -0
  212. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_listCacheGet.mjs +2 -2
  213. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.cjs +1 -0
  214. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_listCacheHas.mjs +2 -2
  215. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.cjs +1 -0
  216. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_listCacheSet.mjs +2 -2
  217. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.cjs +1 -0
  218. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_mapCacheClear.mjs +2 -2
  219. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.cjs +1 -0
  220. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_mapCacheDelete.mjs +2 -2
  221. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.cjs +1 -0
  222. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_mapCacheGet.mjs +2 -2
  223. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.cjs +1 -0
  224. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_mapCacheHas.mjs +2 -2
  225. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.cjs +1 -0
  226. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_mapCacheSet.mjs +2 -2
  227. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.cjs +1 -0
  228. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_mapToArray.mjs +2 -2
  229. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.cjs +1 -0
  230. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_matchesStrictComparable.mjs +2 -2
  231. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.cjs +1 -0
  232. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_memoizeCapped.mjs +2 -2
  233. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.cjs +1 -0
  234. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_nativeCreate.mjs +2 -2
  235. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.cjs +1 -0
  236. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_nativeKeys.mjs +2 -2
  237. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.cjs +1 -0
  238. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_nodeUtil.mjs +2 -2
  239. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.cjs +1 -0
  240. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.mjs +11 -0
  241. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.cjs +1 -0
  242. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_overArg.mjs +11 -0
  243. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_root.cjs +1 -0
  244. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_root.mjs +2 -2
  245. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.cjs +1 -0
  246. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_setCacheAdd.mjs +2 -2
  247. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.cjs +1 -0
  248. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.mjs +9 -0
  249. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.cjs +1 -0
  250. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_setToArray.mjs +2 -2
  251. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.cjs +1 -0
  252. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_stackClear.mjs +2 -2
  253. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.cjs +1 -0
  254. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_stackDelete.mjs +2 -2
  255. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.cjs +1 -0
  256. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.mjs +9 -0
  257. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.cjs +1 -0
  258. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.mjs +9 -0
  259. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.cjs +1 -0
  260. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_stackSet.mjs +2 -2
  261. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToArray.cjs +1 -0
  262. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_stringToArray.mjs +2 -2
  263. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.cjs +1 -0
  264. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_stringToPath.mjs +2 -2
  265. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.cjs +1 -0
  266. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_toKey.mjs +2 -2
  267. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toSource.cjs +1 -0
  268. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_toSource.mjs +2 -2
  269. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.cjs +1 -0
  270. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_trimmedEndIndex.mjs +2 -2
  271. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_unicodeToArray.cjs +1 -0
  272. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/_unicodeToArray.mjs +2 -2
  273. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/capitalize.cjs +1 -0
  274. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/capitalize.mjs +2 -2
  275. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.cjs +1 -0
  276. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/concat.mjs +2 -2
  277. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/eq.cjs +1 -0
  278. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/eq.mjs +9 -0
  279. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/first.cjs +1 -0
  280. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/first.mjs +9 -0
  281. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.cjs +1 -0
  282. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/flatten.mjs +2 -2
  283. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flattenDeep.cjs +1 -0
  284. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/flattenDeep.mjs +2 -2
  285. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flattenDepth.cjs +1 -0
  286. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/flattenDepth.mjs +2 -2
  287. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/forEach.cjs +1 -0
  288. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/forEach.mjs +2 -2
  289. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs +1 -0
  290. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/get.mjs +2 -2
  291. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/groupBy.cjs +1 -0
  292. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/groupBy.mjs +2 -2
  293. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/hasIn.cjs +1 -0
  294. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/hasIn.mjs +2 -2
  295. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/head.cjs +1 -0
  296. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/head.mjs +9 -0
  297. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.cjs +1 -0
  298. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.mjs +9 -0
  299. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArguments.cjs +1 -0
  300. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isArguments.mjs +2 -2
  301. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.cjs +1 -0
  302. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArray.mjs +8 -0
  303. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.cjs +1 -0
  304. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isArrayLike.mjs +2 -2
  305. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.cjs +1 -0
  306. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isBuffer.mjs +2 -2
  307. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.cjs +1 -0
  308. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isEmpty.mjs +2 -2
  309. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isFunction.cjs +1 -0
  310. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isFunction.mjs +2 -2
  311. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.cjs +1 -0
  312. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isLength.mjs +2 -2
  313. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.cjs +1 -0
  314. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.mjs +9 -0
  315. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.cjs +1 -0
  316. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isObject.mjs +2 -2
  317. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.cjs +1 -0
  318. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.mjs +9 -0
  319. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.cjs +1 -0
  320. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isSymbol.mjs +2 -2
  321. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.cjs +1 -0
  322. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/isTypedArray.mjs +2 -2
  323. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keys.cjs +1 -0
  324. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/keys.mjs +2 -2
  325. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/last.cjs +1 -0
  326. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/last.mjs +2 -2
  327. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs +1 -0
  328. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/lodash.mjs +2 -2
  329. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/memoize.cjs +1 -0
  330. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/memoize.mjs +2 -2
  331. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/nth.cjs +1 -0
  332. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/nth.mjs +2 -2
  333. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/property.cjs +1 -0
  334. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/property.mjs +2 -2
  335. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/reduce.cjs +1 -0
  336. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/reduce.mjs +2 -2
  337. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubArray.cjs +1 -0
  338. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubArray.mjs +9 -0
  339. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.cjs +1 -0
  340. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.mjs +9 -0
  341. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toFinite.cjs +1 -0
  342. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/toFinite.mjs +2 -2
  343. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toInteger.cjs +1 -0
  344. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/toInteger.mjs +2 -2
  345. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toNumber.cjs +1 -0
  346. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/toNumber.mjs +2 -2
  347. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toString.cjs +1 -0
  348. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/toString.mjs +2 -2
  349. package/lib/node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/upperFirst.cjs +1 -0
  350. package/lib/node_modules/{lodash-es → .pnpm/lodash-es@4.18.1/node_modules/lodash-es}/upperFirst.mjs +2 -2
  351. package/lib/node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/lodash.cjs +20 -0
  352. package/lib/{packages/dbml-core → node_modules/.pnpm/lodash@4.18.1}/node_modules/lodash/lodash.mjs +2 -2
  353. package/lib/node_modules/{parsimmon → .pnpm/parsimmon@1.18.1/node_modules/parsimmon}/build/parsimmon.umd.min.cjs +1 -1
  354. package/lib/node_modules/{parsimmon → .pnpm/parsimmon@1.18.1/node_modules/parsimmon}/build/parsimmon.umd.min.mjs +2 -2
  355. package/lib/node_modules/.pnpm/pluralize@8.0.0/node_modules/pluralize/pluralize.cjs +1 -0
  356. package/lib/node_modules/{pluralize → .pnpm/pluralize@8.0.0/node_modules/pluralize}/pluralize.mjs +2 -2
  357. package/lib/package.json.cjs +1 -0
  358. package/lib/{packages/dbml-core/package.json.mjs → package.json.mjs} +1 -1
  359. package/lib/parse/ANTLR/ASTGeneration/helpers.cjs +1 -1
  360. package/lib/parse/ANTLR/ASTGeneration/helpers.mjs +2 -2
  361. package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.cjs +1 -1
  362. package/lib/parse/ANTLR/ASTGeneration/mssql/MssqlASTGen.mjs +6 -6
  363. package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.cjs +1 -1
  364. package/lib/parse/ANTLR/ASTGeneration/mysql/MySQLASTGen.mjs +4 -4
  365. package/lib/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.cjs +1 -1
  366. package/lib/parse/ANTLR/ASTGeneration/oraclesql/OracleSQLASTGen.mjs +3 -3
  367. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.cjs +1 -1
  368. package/lib/parse/ANTLR/ASTGeneration/postgres/PostgresASTGen.mjs +4 -4
  369. package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.cjs +1 -1
  370. package/lib/parse/ANTLR/ASTGeneration/snowflake/SnowflakeASTGen.mjs +4 -4
  371. package/lib/parse/Parser.cjs +1 -1
  372. package/lib/parse/Parser.mjs +1 -0
  373. package/lib/parse/deprecated/dbmlParser.cjs +1 -1
  374. package/lib/parse/deprecated/dbmlParser.mjs +2 -2
  375. package/lib/parse/deprecated/mssql/base_parsers.cjs +1 -1
  376. package/lib/parse/deprecated/mssql/base_parsers.mjs +1 -1
  377. package/lib/parse/deprecated/mssql/column_definition/actions.cjs +1 -1
  378. package/lib/parse/deprecated/mssql/column_definition/actions.mjs +2 -2
  379. package/lib/parse/deprecated/mssql/column_definition/index.cjs +1 -1
  380. package/lib/parse/deprecated/mssql/column_definition/index.mjs +1 -1
  381. package/lib/parse/deprecated/mssql/constraint_definition/index.cjs +1 -1
  382. package/lib/parse/deprecated/mssql/constraint_definition/index.mjs +1 -1
  383. package/lib/parse/deprecated/mssql/expression.cjs +1 -1
  384. package/lib/parse/deprecated/mssql/expression.mjs +3 -3
  385. package/lib/parse/deprecated/mssql/fk_definition/index.cjs +1 -1
  386. package/lib/parse/deprecated/mssql/fk_definition/index.mjs +1 -1
  387. package/lib/parse/deprecated/mssql/index_definition/index.cjs +1 -1
  388. package/lib/parse/deprecated/mssql/index_definition/index.mjs +1 -1
  389. package/lib/parse/deprecated/mssql/keyword_utils.cjs +1 -1
  390. package/lib/parse/deprecated/mssql/keyword_utils.mjs +1 -1
  391. package/lib/parse/deprecated/mssql/statements/actions.cjs +1 -1
  392. package/lib/parse/deprecated/mssql/statements/actions.mjs +2 -2
  393. package/lib/parse/deprecated/mssql/statements/index.cjs +1 -1
  394. package/lib/parse/deprecated/mssql/statements/index.mjs +1 -1
  395. package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/add/index.cjs +1 -1
  396. package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/add/index.mjs +1 -1
  397. package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/index.cjs +1 -1
  398. package/lib/parse/deprecated/mssql/statements/statement_types/alter_table/index.mjs +1 -1
  399. package/lib/parse/deprecated/mssql/statements/statement_types/comments/index.cjs +1 -1
  400. package/lib/parse/deprecated/mssql/statements/statement_types/comments/index.mjs +1 -1
  401. package/lib/parse/deprecated/mssql/statements/statement_types/create_index/index.cjs +1 -1
  402. package/lib/parse/deprecated/mssql/statements/statement_types/create_index/index.mjs +1 -1
  403. package/lib/parse/deprecated/mssql/statements/statement_types/create_table/index.cjs +1 -1
  404. package/lib/parse/deprecated/mssql/statements/statement_types/create_table/index.mjs +1 -1
  405. package/lib/parse/deprecated/mssql/utils.cjs +1 -1
  406. package/lib/parse/deprecated/mssql/utils.mjs +3 -3
  407. package/lib/parse/deprecated/mssql/whitespaces.cjs +1 -1
  408. package/lib/parse/deprecated/mssql/whitespaces.mjs +1 -1
  409. package/lib/parse/deprecated/mysqlParser.cjs +1 -1
  410. package/lib/parse/deprecated/mysqlParser.mjs +2 -2
  411. package/lib/parse/deprecated/postgresParser.cjs +1 -1
  412. package/lib/parse/deprecated/postgresParser.mjs +2 -2
  413. package/lib/parse/deprecated/schemarbParser.cjs +1 -1
  414. package/lib/parse/deprecated/schemarbParser.mjs +2 -2
  415. package/lib/utils/version.cjs +1 -1
  416. package/lib/utils/version.mjs +1 -1
  417. package/package.json +3 -3
  418. package/types/index.d.ts +1 -0
  419. package/types/model_structure/ref.d.ts +7 -1
  420. package/types/tsconfig.tsbuildinfo +1 -0
  421. package/lib/node_modules/lodash-es/_DataView.cjs +0 -1
  422. package/lib/node_modules/lodash-es/_Hash.cjs +0 -1
  423. package/lib/node_modules/lodash-es/_ListCache.cjs +0 -1
  424. package/lib/node_modules/lodash-es/_Map.cjs +0 -1
  425. package/lib/node_modules/lodash-es/_MapCache.cjs +0 -1
  426. package/lib/node_modules/lodash-es/_Promise.cjs +0 -1
  427. package/lib/node_modules/lodash-es/_Set.cjs +0 -1
  428. package/lib/node_modules/lodash-es/_SetCache.cjs +0 -1
  429. package/lib/node_modules/lodash-es/_Stack.cjs +0 -1
  430. package/lib/node_modules/lodash-es/_Symbol.cjs +0 -1
  431. package/lib/node_modules/lodash-es/_Uint8Array.cjs +0 -1
  432. package/lib/node_modules/lodash-es/_WeakMap.cjs +0 -1
  433. package/lib/node_modules/lodash-es/_arrayAggregator.cjs +0 -1
  434. package/lib/node_modules/lodash-es/_arrayEach.cjs +0 -1
  435. package/lib/node_modules/lodash-es/_arrayFilter.cjs +0 -1
  436. package/lib/node_modules/lodash-es/_arrayLikeKeys.cjs +0 -1
  437. package/lib/node_modules/lodash-es/_arrayMap.cjs +0 -1
  438. package/lib/node_modules/lodash-es/_arrayPush.cjs +0 -1
  439. package/lib/node_modules/lodash-es/_arrayReduce.cjs +0 -1
  440. package/lib/node_modules/lodash-es/_arraySome.cjs +0 -1
  441. package/lib/node_modules/lodash-es/_asciiToArray.cjs +0 -1
  442. package/lib/node_modules/lodash-es/_asciiToArray.mjs +0 -9
  443. package/lib/node_modules/lodash-es/_assocIndexOf.cjs +0 -1
  444. package/lib/node_modules/lodash-es/_baseAggregator.cjs +0 -1
  445. package/lib/node_modules/lodash-es/_baseAssignValue.cjs +0 -1
  446. package/lib/node_modules/lodash-es/_baseEach.cjs +0 -1
  447. package/lib/node_modules/lodash-es/_baseFlatten.cjs +0 -1
  448. package/lib/node_modules/lodash-es/_baseFor.cjs +0 -1
  449. package/lib/node_modules/lodash-es/_baseForOwn.cjs +0 -1
  450. package/lib/node_modules/lodash-es/_baseGet.cjs +0 -1
  451. package/lib/node_modules/lodash-es/_baseGetAllKeys.cjs +0 -1
  452. package/lib/node_modules/lodash-es/_baseGetTag.cjs +0 -1
  453. package/lib/node_modules/lodash-es/_baseHasIn.cjs +0 -1
  454. package/lib/node_modules/lodash-es/_baseHasIn.mjs +0 -9
  455. package/lib/node_modules/lodash-es/_baseIsArguments.cjs +0 -1
  456. package/lib/node_modules/lodash-es/_baseIsEqual.cjs +0 -1
  457. package/lib/node_modules/lodash-es/_baseIsEqualDeep.cjs +0 -1
  458. package/lib/node_modules/lodash-es/_baseIsMatch.cjs +0 -1
  459. package/lib/node_modules/lodash-es/_baseIsNative.cjs +0 -1
  460. package/lib/node_modules/lodash-es/_baseIsTypedArray.cjs +0 -1
  461. package/lib/node_modules/lodash-es/_baseIteratee.cjs +0 -1
  462. package/lib/node_modules/lodash-es/_baseKeys.cjs +0 -1
  463. package/lib/node_modules/lodash-es/_baseMatches.cjs +0 -1
  464. package/lib/node_modules/lodash-es/_baseMatchesProperty.cjs +0 -1
  465. package/lib/node_modules/lodash-es/_baseNth.cjs +0 -1
  466. package/lib/node_modules/lodash-es/_baseProperty.cjs +0 -1
  467. package/lib/node_modules/lodash-es/_baseProperty.mjs +0 -11
  468. package/lib/node_modules/lodash-es/_basePropertyDeep.cjs +0 -1
  469. package/lib/node_modules/lodash-es/_baseReduce.cjs +0 -1
  470. package/lib/node_modules/lodash-es/_baseSlice.cjs +0 -1
  471. package/lib/node_modules/lodash-es/_baseTimes.cjs +0 -1
  472. package/lib/node_modules/lodash-es/_baseToString.cjs +0 -1
  473. package/lib/node_modules/lodash-es/_baseTrim.cjs +0 -1
  474. package/lib/node_modules/lodash-es/_baseUnary.cjs +0 -1
  475. package/lib/node_modules/lodash-es/_baseUnary.mjs +0 -11
  476. package/lib/node_modules/lodash-es/_cacheHas.cjs +0 -1
  477. package/lib/node_modules/lodash-es/_cacheHas.mjs +0 -9
  478. package/lib/node_modules/lodash-es/_castFunction.cjs +0 -1
  479. package/lib/node_modules/lodash-es/_castPath.cjs +0 -1
  480. package/lib/node_modules/lodash-es/_castSlice.cjs +0 -1
  481. package/lib/node_modules/lodash-es/_copyArray.cjs +0 -1
  482. package/lib/node_modules/lodash-es/_coreJsData.cjs +0 -1
  483. package/lib/node_modules/lodash-es/_createAggregator.cjs +0 -1
  484. package/lib/node_modules/lodash-es/_createBaseEach.cjs +0 -1
  485. package/lib/node_modules/lodash-es/_createBaseFor.cjs +0 -1
  486. package/lib/node_modules/lodash-es/_createCaseFirst.cjs +0 -1
  487. package/lib/node_modules/lodash-es/_defineProperty.cjs +0 -1
  488. package/lib/node_modules/lodash-es/_equalArrays.cjs +0 -1
  489. package/lib/node_modules/lodash-es/_equalByTag.cjs +0 -1
  490. package/lib/node_modules/lodash-es/_equalObjects.cjs +0 -1
  491. package/lib/node_modules/lodash-es/_freeGlobal.cjs +0 -1
  492. package/lib/node_modules/lodash-es/_getAllKeys.cjs +0 -1
  493. package/lib/node_modules/lodash-es/_getMapData.cjs +0 -1
  494. package/lib/node_modules/lodash-es/_getMatchData.cjs +0 -1
  495. package/lib/node_modules/lodash-es/_getNative.cjs +0 -1
  496. package/lib/node_modules/lodash-es/_getRawTag.cjs +0 -1
  497. package/lib/node_modules/lodash-es/_getSymbols.cjs +0 -1
  498. package/lib/node_modules/lodash-es/_getTag.cjs +0 -1
  499. package/lib/node_modules/lodash-es/_getValue.cjs +0 -1
  500. package/lib/node_modules/lodash-es/_getValue.mjs +0 -9
  501. package/lib/node_modules/lodash-es/_hasPath.cjs +0 -1
  502. package/lib/node_modules/lodash-es/_hasUnicode.cjs +0 -1
  503. package/lib/node_modules/lodash-es/_hashClear.cjs +0 -1
  504. package/lib/node_modules/lodash-es/_hashDelete.cjs +0 -1
  505. package/lib/node_modules/lodash-es/_hashGet.cjs +0 -1
  506. package/lib/node_modules/lodash-es/_hashHas.cjs +0 -1
  507. package/lib/node_modules/lodash-es/_hashSet.cjs +0 -1
  508. package/lib/node_modules/lodash-es/_isFlattenable.cjs +0 -1
  509. package/lib/node_modules/lodash-es/_isIndex.cjs +0 -1
  510. package/lib/node_modules/lodash-es/_isKey.cjs +0 -1
  511. package/lib/node_modules/lodash-es/_isKeyable.cjs +0 -1
  512. package/lib/node_modules/lodash-es/_isMasked.cjs +0 -1
  513. package/lib/node_modules/lodash-es/_isPrototype.cjs +0 -1
  514. package/lib/node_modules/lodash-es/_isStrictComparable.cjs +0 -1
  515. package/lib/node_modules/lodash-es/_listCacheClear.cjs +0 -1
  516. package/lib/node_modules/lodash-es/_listCacheClear.mjs +0 -9
  517. package/lib/node_modules/lodash-es/_listCacheDelete.cjs +0 -1
  518. package/lib/node_modules/lodash-es/_listCacheGet.cjs +0 -1
  519. package/lib/node_modules/lodash-es/_listCacheHas.cjs +0 -1
  520. package/lib/node_modules/lodash-es/_listCacheSet.cjs +0 -1
  521. package/lib/node_modules/lodash-es/_mapCacheClear.cjs +0 -1
  522. package/lib/node_modules/lodash-es/_mapCacheDelete.cjs +0 -1
  523. package/lib/node_modules/lodash-es/_mapCacheGet.cjs +0 -1
  524. package/lib/node_modules/lodash-es/_mapCacheHas.cjs +0 -1
  525. package/lib/node_modules/lodash-es/_mapCacheSet.cjs +0 -1
  526. package/lib/node_modules/lodash-es/_mapToArray.cjs +0 -1
  527. package/lib/node_modules/lodash-es/_matchesStrictComparable.cjs +0 -1
  528. package/lib/node_modules/lodash-es/_memoizeCapped.cjs +0 -1
  529. package/lib/node_modules/lodash-es/_nativeCreate.cjs +0 -1
  530. package/lib/node_modules/lodash-es/_nativeKeys.cjs +0 -1
  531. package/lib/node_modules/lodash-es/_nodeUtil.cjs +0 -1
  532. package/lib/node_modules/lodash-es/_objectToString.cjs +0 -1
  533. package/lib/node_modules/lodash-es/_objectToString.mjs +0 -11
  534. package/lib/node_modules/lodash-es/_overArg.cjs +0 -1
  535. package/lib/node_modules/lodash-es/_overArg.mjs +0 -11
  536. package/lib/node_modules/lodash-es/_root.cjs +0 -1
  537. package/lib/node_modules/lodash-es/_setCacheAdd.cjs +0 -1
  538. package/lib/node_modules/lodash-es/_setCacheHas.cjs +0 -1
  539. package/lib/node_modules/lodash-es/_setCacheHas.mjs +0 -9
  540. package/lib/node_modules/lodash-es/_setToArray.cjs +0 -1
  541. package/lib/node_modules/lodash-es/_stackClear.cjs +0 -1
  542. package/lib/node_modules/lodash-es/_stackDelete.cjs +0 -1
  543. package/lib/node_modules/lodash-es/_stackGet.cjs +0 -1
  544. package/lib/node_modules/lodash-es/_stackGet.mjs +0 -9
  545. package/lib/node_modules/lodash-es/_stackHas.cjs +0 -1
  546. package/lib/node_modules/lodash-es/_stackHas.mjs +0 -9
  547. package/lib/node_modules/lodash-es/_stackSet.cjs +0 -1
  548. package/lib/node_modules/lodash-es/_stringToArray.cjs +0 -1
  549. package/lib/node_modules/lodash-es/_stringToPath.cjs +0 -1
  550. package/lib/node_modules/lodash-es/_toKey.cjs +0 -1
  551. package/lib/node_modules/lodash-es/_toSource.cjs +0 -1
  552. package/lib/node_modules/lodash-es/_trimmedEndIndex.cjs +0 -1
  553. package/lib/node_modules/lodash-es/_unicodeToArray.cjs +0 -1
  554. package/lib/node_modules/lodash-es/capitalize.cjs +0 -1
  555. package/lib/node_modules/lodash-es/concat.cjs +0 -1
  556. package/lib/node_modules/lodash-es/eq.cjs +0 -1
  557. package/lib/node_modules/lodash-es/eq.mjs +0 -9
  558. package/lib/node_modules/lodash-es/first.cjs +0 -1
  559. package/lib/node_modules/lodash-es/first.mjs +0 -9
  560. package/lib/node_modules/lodash-es/flatten.cjs +0 -1
  561. package/lib/node_modules/lodash-es/flattenDeep.cjs +0 -1
  562. package/lib/node_modules/lodash-es/flattenDepth.cjs +0 -1
  563. package/lib/node_modules/lodash-es/forEach.cjs +0 -1
  564. package/lib/node_modules/lodash-es/get.cjs +0 -1
  565. package/lib/node_modules/lodash-es/groupBy.cjs +0 -1
  566. package/lib/node_modules/lodash-es/hasIn.cjs +0 -1
  567. package/lib/node_modules/lodash-es/head.cjs +0 -1
  568. package/lib/node_modules/lodash-es/head.mjs +0 -9
  569. package/lib/node_modules/lodash-es/identity.cjs +0 -1
  570. package/lib/node_modules/lodash-es/identity.mjs +0 -9
  571. package/lib/node_modules/lodash-es/isArguments.cjs +0 -1
  572. package/lib/node_modules/lodash-es/isArray.cjs +0 -1
  573. package/lib/node_modules/lodash-es/isArray.mjs +0 -8
  574. package/lib/node_modules/lodash-es/isArrayLike.cjs +0 -1
  575. package/lib/node_modules/lodash-es/isBuffer.cjs +0 -1
  576. package/lib/node_modules/lodash-es/isEmpty.cjs +0 -1
  577. package/lib/node_modules/lodash-es/isFunction.cjs +0 -1
  578. package/lib/node_modules/lodash-es/isLength.cjs +0 -1
  579. package/lib/node_modules/lodash-es/isNil.cjs +0 -1
  580. package/lib/node_modules/lodash-es/isNil.mjs +0 -9
  581. package/lib/node_modules/lodash-es/isObject.cjs +0 -1
  582. package/lib/node_modules/lodash-es/isObjectLike.cjs +0 -1
  583. package/lib/node_modules/lodash-es/isObjectLike.mjs +0 -9
  584. package/lib/node_modules/lodash-es/isSymbol.cjs +0 -1
  585. package/lib/node_modules/lodash-es/isTypedArray.cjs +0 -1
  586. package/lib/node_modules/lodash-es/keys.cjs +0 -1
  587. package/lib/node_modules/lodash-es/last.cjs +0 -1
  588. package/lib/node_modules/lodash-es/lodash.cjs +0 -1
  589. package/lib/node_modules/lodash-es/memoize.cjs +0 -1
  590. package/lib/node_modules/lodash-es/nth.cjs +0 -1
  591. package/lib/node_modules/lodash-es/property.cjs +0 -1
  592. package/lib/node_modules/lodash-es/reduce.cjs +0 -1
  593. package/lib/node_modules/lodash-es/stubArray.cjs +0 -1
  594. package/lib/node_modules/lodash-es/stubArray.mjs +0 -9
  595. package/lib/node_modules/lodash-es/stubFalse.cjs +0 -1
  596. package/lib/node_modules/lodash-es/stubFalse.mjs +0 -9
  597. package/lib/node_modules/lodash-es/toFinite.cjs +0 -1
  598. package/lib/node_modules/lodash-es/toInteger.cjs +0 -1
  599. package/lib/node_modules/lodash-es/toNumber.cjs +0 -1
  600. package/lib/node_modules/lodash-es/toString.cjs +0 -1
  601. package/lib/node_modules/lodash-es/upperFirst.cjs +0 -1
  602. package/lib/node_modules/pluralize/pluralize.cjs +0 -1
  603. package/lib/packages/dbml-core/node_modules/lodash/lodash.cjs +0 -20
  604. package/lib/packages/dbml-core/package.json.cjs +0 -1
@@ -1,10 +1,10 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/groupBy.cjs"),t=require("../node_modules/lodash-es/isEmpty.cjs"),n=require("../node_modules/lodash-es/reduce.cjs"),r=require("../node_modules/lodash-es/lodash.cjs");require("../model_structure/config.cjs");const i=require("./utils.cjs");let a=require("@dbml/parse");r.init_lodash();var o=class r{static hasWhiteSpace(e){return/\s/g.test(e)}static hasSquareBracket(e){return/\[|\]/.test(e)}static isExpression(e){return/\s*(\*|\+|-|\([A-Za-z0-9_]+\)|\(\))/g.test(e)}static escapeNote(e){if(e===null)return``;let t=e.replaceAll(`\\`,`\\\\`);return t.match(/[\n\r']/)?(t=t.replaceAll(`'`,`\\'`),t=t.replaceAll(`\r
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/groupBy.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/reduce.cjs"),r=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs");require("../model_structure/config.cjs");const i=require("./utils.cjs");let a=require("@dbml/parse");r.init_lodash();var o=class r{static hasWhiteSpace(e){return/\s/g.test(e)}static hasSquareBracket(e){return/\[|\]/.test(e)}static isExpression(e){return/\s*(\*|\+|-|\([A-Za-z0-9_]+\)|\(\))/g.test(e)}static escapeNote(e){if(e===null)return``;let t=e.replaceAll(`\\`,`\\\\`);return t.match(/[\n\r']/)?(t=t.replaceAll(`'`,`\\'`),t=t.replaceAll(`\r
2
2
  `,`
3
3
  `),`'''${t}'''`):`'${t}'`}static exportEnums(e,t){let n=e.map(e=>{let n=t.enums[e],a=t.schemas[n.schemaId];return`Enum ${i.shouldPrintSchema(a,t)?`"${a.name}".`:``}"${n.name}" {\n${n.valueIds.map(e=>` "${t.enumValues[e].name}"${t.enumValues[e].note?` [note: ${r.escapeNote(t.enumValues[e].note)}]`:``}`).join(`
4
4
  `)}\n}\n`});return n.length?n.join(`
5
5
  `):``}static getFieldLines(e,t){return t.tables[e].fieldIds.map(e=>{let n=t.fields[e],i=``;n.type.schemaName&&n.type.schemaName!==`public`&&(i=r.hasWhiteSpace(n.type.schemaName)?`"${n.type.schemaName}".`:`${n.type.schemaName}.`);let a=`"${n.name}" ${i}${r.hasWhiteSpace(n.type.type_name)||r.hasSquareBracket(n.type.type_name)?`"${n.type.type_name}"`:n.type.type_name}`,o=[];if(n.unique&&o.push(`unique`),n.pk&&o.push(`pk`),n.not_null&&o.push(`not null`),n.increment&&o.push(`increment`),n.checkIds&&o.push(...n.checkIds.map(e=>`check: \`${t.checks[e].expression}\``)),n.dbdefault&&!(n.dbdefault.type===`boolean`&&(n.dbdefault.value===null||typeof n.dbdefault.value==`string`&&n.dbdefault.value.toLowerCase()===`null`))){let e=`default: `;switch(n.dbdefault.type){case`boolean`:case`number`:e+=`${n.dbdefault.value}`;break;case`string`:{let t=String(n.dbdefault.value),r=t.includes(`
6
6
  `)?`'''`:`'`;e+=`${r}${t}${r}`;break}case`expression`:e+=`\`${n.dbdefault.value}\``;break;default:e+=`\`${n.dbdefault.value}\``;break}o.push(e)}return n.note&&o.push(`note: ${r.escapeNote(n.note)}`),o.length>0&&(a+=` [${o.join(`, `)}]`),a})}static getIndexLines(e,t){return t.tables[e].indexIds.map(e=>{let n=``,r=t.indexes[e];if(r.columnIds.length>1)n=`(${r.columnIds.map(e=>{let n=t.indexColumns[e];return n.type===`expression`?`\`${n.value}\``:n.value}).join(`, `)})`;else if(r.columnIds.length===1){let e=t.indexColumns[r.columnIds[0]];n=e.type===`expression`?`\`${e.value}\``:e.value}let i=[];return r.pk&&i.push(`pk`),r.type&&i.push(`type: ${r.type.toLowerCase()}`),r.unique&&i.push(`unique`),r.name&&i.push(`name: "${r.name}"`),i.length>1?n+=` [${i.join(`, `)}]`:i.length===1&&(n+=` [${i[0]}]`),n})}static getCheckLines(e,t){return t.tables[e].checkIds.map(e=>{let n=``,{expression:r,name:i}=t.checks[e];return n+=`\`${r}\``,i&&(n+=` [name: '${i}']`),n})}static getTableContentArr(e,t){return e.map(e=>({tableId:e,fieldContents:r.getFieldLines(e,t),checkContents:r.getCheckLines(e,t),indexContents:r.getIndexLines(e,t)}))}static getTableSettings(e){let t=``;return e.headerColor&&(t+=`headerColor: ${e.headerColor}, `),t.endsWith(`, `)&&(t=t.replace(/,\s$/,``)),t?` [${t}]`:``}static exportTables(e,n){let o=r.getTableContentArr(e,n).map(e=>{let o=n.tables[e.tableId],s=n.schemas[o.schemaId],c=r.getTableSettings(o),l=`"${o.name}"`;i.shouldPrintSchema(s,n)&&(l=`"${s.name}"."${o.name}"`);let u=o.alias?` as ${(0,a.addDoubleQuoteIfNeeded)(o.alias)}`:``,d=e.fieldContents.map(e=>` ${e}\n`).join(``),f=``;t.default(e.checkContents)||(f=`\n Checks {\n${e.checkContents.map(e=>` ${e}\n`).join(``)} }\n`);let p=``;t.default(e.indexContents)||(p=`\n Indexes {\n${e.indexContents.map(e=>` ${e}\n`).join(``)} }\n`);let m=o.note?` Note: ${r.escapeNote(o.note)}\n`:``;return`Table ${l}${u}${c} {\n${d}${f}${p}${m}}\n`});return o.length?o.join(`
7
- `):``}static buildFieldName(e,t){let n=e.map(e=>`"${t.fields[e].name}"`).join(`, `);return e.length===1?n:`(${n})`}static exportRefs(e,t){let n=e.map(e=>{let n=t.refs[e],o=n.endpointIds.findIndex(e=>(0,a.parseCardinality)(t.endpoints[e].relation).max===1),s=o===-1?0:o,c=t.endpoints[n.endpointIds[s]],l=t.endpoints[n.endpointIds[1-s]],u=(0,a.getRelationshipOp)(c.relation,l.relation),d=t.fields[c.fieldIds[0]],f=t.tables[d.tableId],p=t.schemas[f.schemaId],m=r.buildFieldName(c.fieldIds,t),h=`Ref`;n.name&&(h+=` ${i.shouldPrintSchema(t.schemas[n.schemaId],t)?`"${t.schemas[n.schemaId].name}".`:``}"${n.name}"`),h+=`:`,h+=`${i.shouldPrintSchema(p,t)?`"${p.name}".`:``}"${f.name}".${m} `;let g=t.fields[l.fieldIds[0]],_=t.tables[g.tableId],v=t.schemas[_.schemaId],y=r.buildFieldName(l.fieldIds,t);h+=`${u} `,h+=`${i.shouldPrintSchema(v,t)?`"${v.name}".`:``}"${_.name}".${y}`;let b=[];return n.onUpdate&&b.push(`update: ${n.onUpdate.toLowerCase()}`),n.onDelete&&b.push(`delete: ${n.onDelete.toLowerCase()}`),n.inactive&&b.push(`inactive`),b.length>0&&(h+=` [${b.join(`, `)}]`),h+=`
7
+ `):``}static buildFieldName(e,t){let n=e.map(e=>`"${t.fields[e].name}"`).join(`, `);return e.length===1?n:`(${n})`}static exportRefs(e,t){let n=e.map(e=>{let n=t.refs[e],o=n.endpointIds.findIndex(e=>(0,a.parseCardinality)(t.endpoints[e].relation).max===1),s=o===-1?0:o,c=t.endpoints[n.endpointIds[s]],l=t.endpoints[n.endpointIds[1-s]],u=(0,a.getRelationshipOp)(c.relation,l.relation),d=t.fields[c.fieldIds[0]],f=t.tables[d.tableId],p=t.schemas[f.schemaId],m=r.buildFieldName(c.fieldIds,t),h=`Ref`;n.name&&(h+=` ${i.shouldPrintSchema(t.schemas[n.schemaId],t)?`"${t.schemas[n.schemaId].name}".`:``}"${n.name}"`),h+=`:`,h+=`${i.shouldPrintSchema(p,t)?`"${p.name}".`:``}"${f.name}".${m} `;let g=t.fields[l.fieldIds[0]],_=t.tables[g.tableId],v=t.schemas[_.schemaId],y=r.buildFieldName(l.fieldIds,t);h+=`${u} `,h+=`${i.shouldPrintSchema(v,t)?`"${v.name}".`:``}"${_.name}".${y}`;let b=[];return n.onUpdate&&b.push(`update: ${n.onUpdate.toLowerCase()}`),n.onDelete&&b.push(`delete: ${n.onDelete.toLowerCase()}`),n.color&&b.push(`color: ${n.color}`),n.inactive&&b.push(`inactive`),Object.entries(n.metadata??{}).forEach(([e,t])=>{b.push(`${e}: ${r.formatDepCustomValue(t)}`)}),b.length>0&&(h+=` [${b.join(`, `)}]`),h+=`
8
8
  `,h});return n.length?n.join(`
9
9
  `):``}static getTableGroupSettings(e){let t=[];return e.color&&t.push(`color: ${e.color}`),t.length?` [${t.join(`, `)}]`:``}static formatDepEndpoint(e){let t=e.schemaName?`"${e.schemaName}".`:``,n=`"${e.tableName}"`;return!e.fieldNames||e.fieldNames.length===0?`${t}${n}`:`${t}${n}.${e.fieldNames.length===1?`"${e.fieldNames[0]}"`:`(${e.fieldNames.map(e=>`"${e}"`).join(`, `)})`}`}static formatDepCustomValue(e){return typeof e==`string`?`'${(0,a.escapeString)(e)}'`:e==null?`null`:String(e)}static exportDeps(e,t){let n=e.map(e=>{let n=t.deps[e],i=n.edgeIds.map(e=>t.depEdges[e]),a=!!n.note,o=n.metadata?Object.entries(n.metadata):[],s=a||o.length>0;if(i.length===1&&!s)return`Dep: ${r.formatDepEndpoint(i[0].upstream)} -> ${r.formatDepEndpoint(i[0].downstream)}\n`;let c=`Dep {
10
10
  `;return i.forEach(e=>{c+=` ${r.formatDepEndpoint(e.upstream)} -> ${r.formatDepEndpoint(e.downstream)}\n`}),s&&(c+=`
@@ -1,7 +1,7 @@
1
- import e from "../node_modules/lodash-es/groupBy.mjs";
2
- import t from "../node_modules/lodash-es/isEmpty.mjs";
3
- import n from "../node_modules/lodash-es/reduce.mjs";
4
- import { init_lodash as r } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/groupBy.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.mjs";
3
+ import n from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/reduce.mjs";
4
+ import { init_lodash as r } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
5
5
  import "../model_structure/config.mjs";
6
6
  import { shouldPrintSchema as i } from "./utils.mjs";
7
7
  import { addDoubleQuoteIfNeeded as a, escapeString as o, formatRecordValue as s, getRelationshipOp as c, normalizeQualifiedName as l, parseCardinality as u } from "@dbml/parse";
@@ -115,7 +115,9 @@ var d = class r {
115
115
  let _ = t.fields[l.fieldIds[0]], v = t.tables[_.tableId], y = t.schemas[v.schemaId], b = r.buildFieldName(l.fieldIds, t);
116
116
  g += `${d} `, g += `${i(y, t) ? `"${y.name}".` : ""}"${v.name}".${b}`;
117
117
  let x = [];
118
- return n.onUpdate && x.push(`update: ${n.onUpdate.toLowerCase()}`), n.onDelete && x.push(`delete: ${n.onDelete.toLowerCase()}`), n.inactive && x.push("inactive"), x.length > 0 && (g += ` [${x.join(", ")}]`), g += "\n", g;
118
+ return n.onUpdate && x.push(`update: ${n.onUpdate.toLowerCase()}`), n.onDelete && x.push(`delete: ${n.onDelete.toLowerCase()}`), n.color && x.push(`color: ${n.color}`), n.inactive && x.push("inactive"), Object.entries(n.metadata ?? {}).forEach(([e, t]) => {
119
+ x.push(`${e}: ${r.formatDepCustomValue(t)}`);
120
+ }), x.length > 0 && (g += ` [${x.join(", ")}]`), g += "\n", g;
119
121
  });
120
122
  return n.length ? n.join("\n") : "";
121
123
  }
@@ -1,4 +1,4 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/lodash-es/concat.cjs"),n=require("../node_modules/lodash-es/isEmpty.cjs"),r=require("../node_modules/lodash-es/lodash.cjs"),i=require("./utils.cjs");let a=require("@dbml/parse");r.init_lodash();var o=class r{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return n.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e,o=t?`\`${t}\`.\`${n}\``:`\`${n}\``,s=r.length>0?`(\`${r.join("`, `")}\`)`:``,c=e=>e.value===null?`NULL`:e.type===`expression`||(0,a.isNumericType)(e.type)?e.value:(0,a.isBooleanType)(e.type)?String(e.value).toUpperCase()===`TRUE`?`TRUE`:`FALSE`:(0,a.isStringType)(e.type)||(0,a.isBinaryType)(e.type)||(0,a.isDateTimeType)(e.type)?`'${e.value.replace(/'/g,`''`).replace(/\\/g,`\\\\`)}'`:`CAST('${e.value.replace(/'/g,`''`).replace(/\\/g,`\\\\`)}' AS ${e.type})`;return`INSERT INTO ${o} ${s}\nVALUES\n ${i.map(e=>`(${e.map(c).join(`, `)})`).join(`,
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.cjs"),r=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),i=require("./utils.cjs");let a=require("@dbml/parse");r.init_lodash();var o=class r{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return n.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e,o=t?`\`${t}\`.\`${n}\``:`\`${n}\``,s=r.length>0?`(\`${r.join("`, `")}\`)`:``,c=e=>e.value===null?`NULL`:e.type===`expression`||(0,a.isNumericType)(e.type)?e.value:(0,a.isBooleanType)(e.type)?String(e.value).toUpperCase()===`TRUE`?`TRUE`:`FALSE`:(0,a.isStringType)(e.type)||(0,a.isBinaryType)(e.type)||(0,a.isDateTimeType)(e.type)?`'${e.value.replace(/'/g,`''`).replace(/\\/g,`\\\\`)}'`:`CAST('${e.value.replace(/'/g,`''`).replace(/\\/g,`\\\\`)}' AS ${e.type})`;return`INSERT INTO ${o} ${s}\nVALUES\n ${i.map(e=>`(${e.map(c).join(`, `)})`).join(`,
2
2
  `)};`})}static getFieldLines(e,t){return t.tables[e].fieldIds.map(e=>{let n=t.fields[e],r=``;if(n.enumId){let e=t.enums[n.enumId];r=`\`${n.name}\` ENUM (`;let i=e.valueIds.map(e=>`'${t.enumValues[e].name}'`);r+=`${i.join(`, `)})`}else r=`\`${n.name}\` ${n.type.type_name===`varchar`?`varchar(255)`:n.type.type_name}`;if(n.unique&&(r+=` UNIQUE`),n.pk&&(r+=` PRIMARY KEY`),n.not_null&&(r+=` NOT NULL`),n.increment&&(r+=` AUTO_INCREMENT`),n.checkIds&&n.checkIds.length>0)if(n.checkIds.length===1){let e=t.checks[n.checkIds[0]];e.name&&(r+=` CONSTRAINT \`${e.name}\``),r+=` CHECK (${e.expression})`}else{let e=n.checkIds.map(e=>`(${t.checks[e].expression})`);r+=` CHECK (${e.join(` AND `)})`}return n.dbdefault&&(n.dbdefault.type===`boolean`&&(n.dbdefault.value===null||typeof n.dbdefault.value==`string`&&n.dbdefault.value.toLowerCase()===`null`)||(n.dbdefault.type===`expression`?r+=` DEFAULT (${n.dbdefault.value})`:n.dbdefault.type===`string`?r+=` DEFAULT '${n.dbdefault.value}'`:r+=` DEFAULT ${n.dbdefault.value}`)),n.note&&(r+=` COMMENT '${n.note.replace(/'/g,`''`)}'`),r})}static getCompositePKs(e,t){let n=t.tables[e];return(n.indexIds?n.indexIds.filter(e=>t.indexes[e].pk):[]).map(e=>{let n=t.indexes[e],r=`PRIMARY KEY`,i=[];return n.columnIds.forEach(e=>{let n=t.indexColumns[e],r=``;r=n.type===`expression`?`(${n.value})`:`\`${n.value}\``,i.push(r)}),r+=` (${i.join(`, `)})`,r})}static getCheckLines(e,t){let n=t.tables[e];return!n.checkIds||n.checkIds.length===0?[]:n.checkIds.map(e=>{let n=t.checks[e],r=``;return n.name&&(r=`CONSTRAINT \`${n.name}\` `),r+=`CHECK (${n.expression})`,r})}static getTableContentArr(e,t){return e.map(e=>({tableId:e,fieldContents:r.getFieldLines(e,t),checkContents:r.getCheckLines(e,t),compositePKs:r.getCompositePKs(e,t)}))}static exportTables(e,t){return r.getTableContentArr(e,t).map(e=>{let n=[...e.fieldContents,...e.checkContents,...e.compositePKs],r=t.tables[e.tableId],a=t.schemas[r.schemaId];return`CREATE TABLE ${i.shouldPrintSchema(a,t)?`\`${a.name}\`.`:``}\`${r.name}\` (\n${n.map(e=>` ${e}`).join(`,
3
3
  `)}\n);\n`})}static buildFieldName(e,t){return`(${e.map(e=>`\`${t.fields[e].name}\``).join(`, `)})`}static buildTableManyToMany(e,t,n,r,a){let o=`CREATE TABLE ${i.shouldPrintSchema(r,a)?`\`${r.name}\`.`:``}\`${n}\` (\n`,s=[...e.keys()].join("`, `"),c=[...t.keys()].join("`, `");return e.forEach((e,t)=>{o+=` \`${t}\` ${e},\n`}),t.forEach((e,t)=>{o+=` \`${t}\` ${e},\n`}),o+=` PRIMARY KEY (\`${s}\`, \`${c}\`)\n`,o+=`);
4
4
 
@@ -1,7 +1,7 @@
1
- import e from "../node_modules/lodash-es/flatten.mjs";
2
- import t from "../node_modules/lodash-es/concat.mjs";
3
- import n from "../node_modules/lodash-es/isEmpty.mjs";
4
- import { init_lodash as r } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.mjs";
3
+ import n from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.mjs";
4
+ import { init_lodash as r } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
5
5
  import { buildJunctionFields1 as i, buildJunctionFields2 as a, buildNewTableName as o, shouldPrintSchema as s } from "./utils.mjs";
6
6
  import { isBinaryType as c, isBooleanType as l, isDateTimeType as u, isNumericType as d, isStringType as f, parseCardinality as p } from "@dbml/parse";
7
7
  //#region src/export/MysqlExporter.js
@@ -1,4 +1,4 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/lodash-es/concat.cjs"),n=require("../node_modules/lodash-es/forEach.cjs"),r=require("../node_modules/lodash-es/isEmpty.cjs"),i=require("../node_modules/lodash-es/lodash.cjs"),a=require("./utils.cjs");let o=require("@dbml/parse");i.init_lodash();var s=class{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return r.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e,s=t?`"${t}"."${n}"`:`"${n}"`,c=r.length>0?`("${r.join(`", "`)}")`:``,l=e=>{if(e.value===null)return`NULL`;if(e.type===`expression`||(0,o.isNumericType)(e.type))return e.value;if((0,o.isBooleanType)(e.type))return String(e.value).toUpperCase()===`TRUE`?`1`:`0`;if((0,o.isDateTimeType)(e.type)){let t=a.parseIsoDatetime(e.value);if(t){let{datetime:e,hasTimezone:n}=t,r=a.formatDatetimeForOracle(e,n);return n?`TO_TIMESTAMP_TZ('${r}', 'YYYY-MM-DD HH24:MI:SS.FF3 TZH:TZM')`:`TO_TIMESTAMP('${r}', 'YYYY-MM-DD HH24:MI:SS.FF3')`}return`'${e.value.replace(/'/g,`''`)}'`}return(0,o.isStringType)(e.type)?`'${e.value.replace(/'/g,`''`)}'`:(0,o.isBinaryType)(e.type)?`HEXTORAW('${e.value}')`:`CAST('${e.value.replace(/'/g,`''`)}' AS ${e.type})`};return i.length>1?`INSERT ALL\n${i.map(e=>` INTO ${s} ${c} VALUES (${e.map(l).join(`, `)})`).join(`
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/forEach.cjs"),r=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.cjs"),i=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),a=require("./utils.cjs");let o=require("@dbml/parse");i.init_lodash();var s=class{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return r.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e,s=t?`"${t}"."${n}"`:`"${n}"`,c=r.length>0?`("${r.join(`", "`)}")`:``,l=e=>{if(e.value===null)return`NULL`;if(e.type===`expression`||(0,o.isNumericType)(e.type))return e.value;if((0,o.isBooleanType)(e.type))return String(e.value).toUpperCase()===`TRUE`?`1`:`0`;if((0,o.isDateTimeType)(e.type)){let t=a.parseIsoDatetime(e.value);if(t){let{datetime:e,hasTimezone:n}=t,r=a.formatDatetimeForOracle(e,n);return n?`TO_TIMESTAMP_TZ('${r}', 'YYYY-MM-DD HH24:MI:SS.FF3 TZH:TZM')`:`TO_TIMESTAMP('${r}', 'YYYY-MM-DD HH24:MI:SS.FF3')`}return`'${e.value.replace(/'/g,`''`)}'`}return(0,o.isStringType)(e.type)?`'${e.value.replace(/'/g,`''`)}'`:(0,o.isBinaryType)(e.type)?`HEXTORAW('${e.value}')`:`CAST('${e.value.replace(/'/g,`''`)}' AS ${e.type})`};return i.length>1?`INSERT ALL\n${i.map(e=>` INTO ${s} ${c} VALUES (${e.map(l).join(`, `)})`).join(`
2
2
  `)}\nSELECT * FROM dual;`:`INSERT INTO ${s} ${c}\nVALUES (${i[0].map(l).join(`, `)});`})}static buildSchemaToTableNameSetMap(e){let t=new Map;return n.default(e.tables,n=>{let r=e.schemas[n.schemaId],i=t.get(r.name);if(!i){t.set(r.name,new Set([n.name]));return}i.add(n.name)}),t}static buildTableNameWithSchema(e,t,n){return`${a.shouldPrintSchema(t,e)?`${a.escapeObjectName(t.name,`oracle`)}.`:``}${a.escapeObjectName(n.name,`oracle`)}`}static exportSchema(e){return`CREATE USER ${a.escapeObjectName(e,`oracle`)}\nNO AUTHENTICATION
3
3
  DEFAULT TABLESPACE system
4
4
  TEMPORARY TABLESPACE temp
@@ -1,8 +1,8 @@
1
- import e from "../node_modules/lodash-es/flatten.mjs";
2
- import t from "../node_modules/lodash-es/concat.mjs";
3
- import n from "../node_modules/lodash-es/forEach.mjs";
4
- import r from "../node_modules/lodash-es/isEmpty.mjs";
5
- import { init_lodash as i } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.mjs";
3
+ import n from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/forEach.mjs";
4
+ import r from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.mjs";
5
+ import { init_lodash as i } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
6
6
  import { buildJunctionFields1 as a, buildJunctionFields2 as o, buildUniqueTableName as s, escapeObjectName as c, formatDatetimeForOracle as l, parseIsoDatetime as u, shouldPrintSchema as d } from "./utils.mjs";
7
7
  import { isBinaryType as f, isBooleanType as p, isDateTimeType as m, isNumericType as h, isStringType as g, parseCardinality as _ } from "@dbml/parse";
8
8
  //#region src/export/OracleExporter.js
@@ -1,4 +1,4 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/lodash-es/concat.cjs"),n=require("../node_modules/lodash-es/isEmpty.cjs"),r=require("../node_modules/lodash-es/lodash.cjs"),i=require("./utils.cjs"),a=require("../model_structure/utils.cjs");let o=require("@dbml/parse");r.init_lodash();var s=`SMALLINT.INTEGER.INT.BIGINT.DECIMAL.NUMERIC.REAL.DOUBLE PRECISION.SMALLSERIAL.SERIAL.BIGSERIAL.FLOAT.MONEY.CHARACTER.CHAR.CHARACTER VARYING.VARCHAR.TEXT.NAME.BPCHAR.BYTEA.TIMESTAMP.TIMESTAMP WITH TIME ZONE.TIMESTAMP WITHOUT TIME ZONE.DATE.TIME.TIME WITH TIME ZONE.TIME WITHOUT TIME ZONE.INTERVAL.BOOLEAN.BOOL.POINT.LINE.LSEG.BOX.PATH.POLYGON.CIRCLE.CIDR.INET.MACADDR.MACADDR8.BIT.BIT VARYING.VARBIT.UUID.XML.JSON.JSONB.INT4RANGE.INT8RANGE.NUMRANGE.TSRANGE.TSTZRANGE.DATERANGE.OID.REGCLASS.REGCOLLATION.REGCONFIG.REGDICTIONARY.REGNAMESPACE.REGOPER.REGOPERATOR.REGPROC.REGPROCEDURE.REGROLE.REGTYPE.PG_LSN.VOID.RECORD.TRIGGER.EVENT_TRIGGER.PG_DDL_COMMAND.UNKNOWN.ANYELEMENT.ANYARRAY.ANYNONARRAY.ANYENUM.ANYRANGE.ANY.CSTRING.INTERNAL.LANGUAGE_HANDLER.FDW_HANDLER.INDEX_AM_HANDLER.TSM_HANDLER.OPAQUE`.split(`.`),c=[`USER`],l=class r{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return n.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e;if(!i||i.length===0)return null;let a=t?`"${t}"."${n}"`:`"${n}"`,s=r.length>0?`(${r.map(e=>`"${e}"`).join(`, `)})`:``,c=e=>e.value===null?`NULL`:e.type===`expression`||(0,o.isNumericType)(e.type)?e.value:(0,o.isBooleanType)(e.type)?String(e.value).toUpperCase()===`TRUE`?`TRUE`:`FALSE`:(0,o.isStringType)(e.type)||(0,o.isDateTimeType)(e.type)||(0,o.isBinaryType)(e.type)?`'${String(e.value).replace(/'/g,`''`)}'`:`CAST('${String(e.value).replace(/'/g,`''`)}' AS ${e.type})`;return`INSERT INTO ${a} ${s}\nVALUES\n ${i.map(e=>`(${e.map(c).join(`, `)})`).join(`,
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.cjs"),r=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),i=require("./utils.cjs"),a=require("../model_structure/utils.cjs");let o=require("@dbml/parse");r.init_lodash();var s=`SMALLINT.INTEGER.INT.BIGINT.DECIMAL.NUMERIC.REAL.DOUBLE PRECISION.SMALLSERIAL.SERIAL.BIGSERIAL.FLOAT.MONEY.CHARACTER.CHAR.CHARACTER VARYING.VARCHAR.TEXT.NAME.BPCHAR.BYTEA.TIMESTAMP.TIMESTAMP WITH TIME ZONE.TIMESTAMP WITHOUT TIME ZONE.DATE.TIME.TIME WITH TIME ZONE.TIME WITHOUT TIME ZONE.INTERVAL.BOOLEAN.BOOL.POINT.LINE.LSEG.BOX.PATH.POLYGON.CIRCLE.CIDR.INET.MACADDR.MACADDR8.BIT.BIT VARYING.VARBIT.UUID.XML.JSON.JSONB.INT4RANGE.INT8RANGE.NUMRANGE.TSRANGE.TSTZRANGE.DATERANGE.OID.REGCLASS.REGCOLLATION.REGCONFIG.REGDICTIONARY.REGNAMESPACE.REGOPER.REGOPERATOR.REGPROC.REGPROCEDURE.REGROLE.REGTYPE.PG_LSN.VOID.RECORD.TRIGGER.EVENT_TRIGGER.PG_DDL_COMMAND.UNKNOWN.ANYELEMENT.ANYARRAY.ANYNONARRAY.ANYENUM.ANYRANGE.ANY.CSTRING.INTERNAL.LANGUAGE_HANDLER.FDW_HANDLER.INDEX_AM_HANDLER.TSM_HANDLER.OPAQUE`.split(`.`),c=[`USER`],l=class r{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return n.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e;if(!i||i.length===0)return null;let a=t?`"${t}"."${n}"`:`"${n}"`,s=r.length>0?`(${r.map(e=>`"${e}"`).join(`, `)})`:``,c=e=>e.value===null?`NULL`:e.type===`expression`||(0,o.isNumericType)(e.type)?e.value:(0,o.isBooleanType)(e.type)?String(e.value).toUpperCase()===`TRUE`?`TRUE`:`FALSE`:(0,o.isStringType)(e.type)||(0,o.isDateTimeType)(e.type)||(0,o.isBinaryType)(e.type)?`'${String(e.value).replace(/'/g,`''`)}'`:`CAST('${String(e.value).replace(/'/g,`''`)}' AS ${e.type})`;return`INSERT INTO ${a} ${s}\nVALUES\n ${i.map(e=>`(${e.map(c).join(`, `)})`).join(`,
2
2
  `)};`}).filter(Boolean)}static exportEnums(e,t){return e.map(e=>{let n=t.enums[e],r=t.schemas[n.schemaId],a=`${i.shouldPrintSchema(r,t)?`"${r.name}".`:``}"${n.name}"`;return[a,`CREATE TYPE ${a} AS ENUM (\n${n.valueIds.map(e=>` '${t.enumValues[e].name}'`).join(`,
3
3
  `)}\n);\n`]})}static getFieldLines(e,t,n){return t.tables[e].fieldIds.map(e=>{let r=t.fields[e],o=``;if(r.increment){let e=new Set([`BIGINT`,`INT`,`INTEGER`,`SMALLINT`]),t=new Set([`SMALLSERIAL`,`SERIAL`,`BIGSERIAL`]),n=r.type.type_name.toUpperCase(),i=``;i=e.has(n)?`${n} GENERATED BY DEFAULT AS IDENTITY`:t.has(n)?n:`SERIAL`,o=`"${r.name}" ${i}`}else if(!r.type.schemaName||!a.shouldPrintSchemaName(r.type.schemaName)){let e=r.type.type_name,t=e.toUpperCase(),n=!s.includes(t)&&(i.hasWhiteSpaceOrUpperCase(e)||c.includes(t))?`"${e}"`:e;o=`"${r.name}" ${n}`}else if(r.type.originalTypeName)o=`"${r.name}" "${r.type.schemaName}"."${r.type.originalTypeName}"`;else{let e=`${i.hasWhiteSpaceOrUpperCase(r.type.schemaName)?`"${r.type.schemaName}".`:`${r.type.schemaName}.`}${i.hasWhiteSpaceOrUpperCase(r.type.type_name)?`"${r.type.type_name}"`:r.type.type_name}`,t=`"${r.type.schemaName}"."${r.type.type_name}"`;!n.has(t)&&!i.hasWhiteSpace(t)&&(e=e.replaceAll(`"`,``)),o=`"${r.name}" ${e}`}if(r.unique&&(o+=` UNIQUE`),r.pk&&(o+=` PRIMARY KEY`),r.not_null&&(o+=` NOT NULL`),r.checkIds&&r.checkIds.length>0)if(r.checkIds.length===1){let e=t.checks[r.checkIds[0]];e.name&&(o+=` CONSTRAINT "${e.name}"`),o+=` CHECK (${e.expression})`}else{let e=r.checkIds.map(e=>`(${t.checks[e].expression})`);o+=` CHECK (${e.join(` AND `)})`}return r.dbdefault&&(r.dbdefault.type===`boolean`&&(r.dbdefault.value===null||typeof r.dbdefault.value==`string`&&r.dbdefault.value.toLowerCase()===`null`)||(r.dbdefault.type===`expression`?o+=` DEFAULT (${r.dbdefault.value})`:r.dbdefault.type===`string`?o+=` DEFAULT '${r.dbdefault.value}'`:o+=` DEFAULT ${r.dbdefault.value}`)),o})}static getCompositePKs(e,t){let n=t.tables[e];return(n.indexIds?n.indexIds.filter(e=>t.indexes[e].pk):[]).map(e=>{let n=t.indexes[e],r=`PRIMARY KEY`,i=[];return n.columnIds.forEach(e=>{let n=t.indexColumns[e],r=``;r=n.type===`expression`?`(${n.value})`:`"${n.value}"`,i.push(r)}),r+=` (${i.join(`, `)})`,r})}static getCheckLines(e,t){let n=t.tables[e];return!n.checkIds||n.checkIds.length===0?[]:n.checkIds.map(e=>{let n=t.checks[e],r=``;return n.name&&(r=`CONSTRAINT "${n.name}" `),r+=`CHECK (${n.expression})`,r})}static getTableContentArr(e,t,n){return e.map(e=>({tableId:e,fieldContents:r.getFieldLines(e,t,n),checkContents:r.getCheckLines(e,t),compositePKs:r.getCompositePKs(e,t)}))}static exportTables(e,t,n){return r.getTableContentArr(e,t,n).map(e=>{let n=[...e.fieldContents,...e.checkContents,...e.compositePKs],r=t.tables[e.tableId],a=t.schemas[r.schemaId];return`CREATE TABLE ${i.shouldPrintSchema(a,t)?`"${a.name}".`:``}"${r.name}" (\n${n.map(e=>` ${e}`).join(`,
4
4
  `)}\n);\n`})}static buildFieldName(e,t){return`(${e.map(e=>`"${t.fields[e].name}"`).join(`, `)})`}static buildTableManyToMany(e,t,n,r,a){let o=`CREATE TABLE ${i.shouldPrintSchema(r,a)?`"${r.name}".`:``}"${n}" (\n`,s=[...e.keys()].join(`", "`),c=[...t.keys()].join(`", "`);return e.forEach((e,t)=>{o+=` "${t}" ${e},\n`}),t.forEach((e,t)=>{o+=` "${t}" ${e},\n`}),o+=` PRIMARY KEY ("${s}", "${c}")\n`,o+=`);
@@ -1,7 +1,7 @@
1
- import e from "../node_modules/lodash-es/flatten.mjs";
2
- import t from "../node_modules/lodash-es/concat.mjs";
3
- import n from "../node_modules/lodash-es/isEmpty.mjs";
4
- import { init_lodash as r } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.mjs";
3
+ import n from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.mjs";
4
+ import { init_lodash as r } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
5
5
  import { buildJunctionFields1 as i, buildJunctionFields2 as a, buildNewTableName as o, hasWhiteSpace as s, hasWhiteSpaceOrUpperCase as c, shouldPrintSchema as l } from "./utils.mjs";
6
6
  import { shouldPrintSchemaName as u } from "../model_structure/utils.mjs";
7
7
  import { isBinaryType as d, isBooleanType as f, isDateTimeType as p, isNumericType as m, isStringType as h, parseCardinality as g } from "@dbml/parse";
@@ -1,4 +1,4 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/lodash-es/concat.cjs"),n=require("../node_modules/lodash-es/isEmpty.cjs"),r=require("../node_modules/lodash-es/lodash.cjs"),i=require("./utils.cjs");let a=require("@dbml/parse");r.init_lodash();var o=class r{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return n.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e,o=t?`[${t}].[${n}]`:`[${n}]`,s=r.length>0?`([${r.join(`], [`)}])`:``,c=e=>e.value===null?`NULL`:e.type===`expression`||(0,a.isNumericType)(e.type)?e.value:(0,a.isBooleanType)(e.type)?String(e.value).toUpperCase()===`TRUE`?`1`:`0`:(0,a.isStringType)(e.type)||(0,a.isDateTimeType)(e.type)?`'${e.value.replace(/'/g,`''`)}'`:(0,a.isBinaryType)(e.type)?`0x${e.value}`:`CAST('${e.value.replace(/'/g,`''`)}' AS ${e.type})`;return`INSERT INTO ${o} ${s}\nVALUES\n ${i.map(e=>`(${e.map(c).join(`, `)})`).join(`,
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.cjs"),r=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),i=require("./utils.cjs");let a=require("@dbml/parse");r.init_lodash();var o=class r{static exportRecords(e){let t=Object.values(e.records||{}).filter(e=>!e.example);return n.default(t)?[]:t.map(e=>{let{schemaName:t,tableName:n,columns:r,values:i}=e,o=t?`[${t}].[${n}]`:`[${n}]`,s=r.length>0?`([${r.join(`], [`)}])`:``,c=e=>e.value===null?`NULL`:e.type===`expression`||(0,a.isNumericType)(e.type)?e.value:(0,a.isBooleanType)(e.type)?String(e.value).toUpperCase()===`TRUE`?`1`:`0`:(0,a.isStringType)(e.type)||(0,a.isDateTimeType)(e.type)?`'${e.value.replace(/'/g,`''`)}'`:(0,a.isBinaryType)(e.type)?`0x${e.value}`:`CAST('${e.value.replace(/'/g,`''`)}' AS ${e.type})`;return`INSERT INTO ${o} ${s}\nVALUES\n ${i.map(e=>`(${e.map(c).join(`, `)})`).join(`,
2
2
  `)};\nGO`})}static getFieldLines(e,t){return t.tables[e].fieldIds.map(e=>{let n=t.fields[e],r=``;if(n.enumId){let e=t.enums[n.enumId];r=`[${n.name}] nvarchar(255) CHECK ([${n.name}] IN (`;let i=e.valueIds.map(e=>`'${t.enumValues[e].name}'`);r+=`${i.join(`, `)}))`}else r=`[${n.name}] ${n.type.type_name===`varchar`?`nvarchar(255)`:n.type.type_name}`;if(n.unique&&(r+=` UNIQUE`),n.pk&&(r+=` PRIMARY KEY`),n.not_null&&(r+=` NOT NULL`),n.increment&&(r+=` IDENTITY(1, 1)`),n.checkIds&&n.checkIds.length>0)if(n.checkIds.length===1){let e=t.checks[n.checkIds[0]];e.name&&(r+=` CONSTRAINT [${e.name}]`),r+=` CHECK (${e.expression})`}else{let e=n.checkIds.map(e=>`(${t.checks[e].expression})`);r+=` CHECK (${e.join(` AND `)})`}return n.dbdefault&&(n.dbdefault.type===`boolean`&&(n.dbdefault.value===null||typeof n.dbdefault.value==`string`&&n.dbdefault.value.toLowerCase()===`null`)||(n.dbdefault.type===`expression`?r+=` DEFAULT (${n.dbdefault.value})`:n.dbdefault.type===`string`?r+=` DEFAULT '${n.dbdefault.value}'`:r+=` DEFAULT (${n.dbdefault.value})`)),r})}static getCompositePKs(e,t){let n=t.tables[e];return(n.indexIds?n.indexIds.filter(e=>t.indexes[e].pk):[]).map(e=>{let n=t.indexes[e],r=`PRIMARY KEY`,i=[];return n.columnIds.forEach(e=>{let n=t.indexColumns[e],r=``;r=n.type===`expression`?`(${n.value})`:`[${n.value}]`,i.push(r)}),r+=` (${i.join(`, `)})`,r})}static getCheckLines(e,t){let n=t.tables[e];return!n.checkIds||n.checkIds.length===0?[]:n.checkIds.map(e=>{let n=t.checks[e],r=``;return n.name&&(r=`CONSTRAINT [${n.name}] `),r+=`CHECK (${n.expression})`,r})}static getTableContentArr(e,t){return e.map(e=>({tableId:e,fieldContents:r.getFieldLines(e,t),checkContents:r.getCheckLines(e,t),compositePKs:r.getCompositePKs(e,t)}))}static exportTables(e,t){return r.getTableContentArr(e,t).map(e=>{let n=[...e.fieldContents,...e.checkContents,...e.compositePKs],r=t.tables[e.tableId],a=t.schemas[r.schemaId];return`CREATE TABLE ${i.shouldPrintSchema(a,t)?`[${a.name}].`:``}[${r.name}] (\n${n.map(e=>` ${e}`).join(`,
3
3
  `)}\n)\nGO\n`})}static buildTableManyToMany(e,t,n,r,a){let o=`CREATE TABLE ${i.shouldPrintSchema(r,a)?`[${r.name}].`:``}[${n}] (\n`,s=[...e.keys()].join(`], [`),c=[...t.keys()].join(`], [`);return e.forEach((e,t)=>{o+=` [${t}] ${e},\n`}),t.forEach((e,t)=>{o+=` [${t}] ${e},\n`}),o+=` PRIMARY KEY ([${s}], [${c}])\n`,o+=`);
4
4
  GO
@@ -1,7 +1,7 @@
1
- import e from "../node_modules/lodash-es/flatten.mjs";
2
- import t from "../node_modules/lodash-es/concat.mjs";
3
- import n from "../node_modules/lodash-es/isEmpty.mjs";
4
- import { init_lodash as r } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/concat.mjs";
3
+ import n from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.mjs";
4
+ import { init_lodash as r } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
5
5
  import { buildJunctionFields1 as i, buildJunctionFields2 as a, buildNewTableName as o, shouldPrintSchema as s } from "./utils.mjs";
6
6
  import { isBinaryType as c, isBooleanType as l, isDateTimeType as u, isNumericType as d, isStringType as f, parseCardinality as p } from "@dbml/parse";
7
7
  //#region src/export/SqlServerExporter.js
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/capitalize.cjs"),n=require("../node_modules/lodash-es/lodash.cjs"),r=require("./config.cjs"),i=require("./dbState.cjs"),a=require("./element.cjs"),o=require("./dep.cjs"),s=require("./enum.cjs"),c=require("./ref.cjs"),l=require("./table.cjs"),u=require("./tableGroup.cjs"),d=require("./schema.cjs"),f=require("./stickyNote.cjs"),p=require("./tablePartial.cjs");let m=require("@dbml/parse");n.init_lodash();var h=class extends a.default{constructor({schemas:t=[],tables:n=[],notes:a=[],enums:o=[],refs:s=[],deps:l=[],tableGroups:u=[],project:d={},aliases:f=[],records:p=[],tablePartials:m=[],diagramViews:h=[]}={}){super(),this.dbState=new i.default,this.generateId(),this.hasDefaultSchema=!1,this.schemas=[],this.notes=[],this.note=d.note?e.default(d,`note.value`,typeof d.note==`string`?d.note:null):null,this.noteToken=d.note?e.default(d,`note.token`,d.noteToken):null,this.databaseType=d.database_type,this.name=d.name,this.token=d.token,this.aliases=f,this.records=[],this.tablePartials=[],this.diagramViews=h,this.injectedRawRefs=[],this.processNotes(a),this.processRecords(p),this.processTablePartials(m),this.processSchemas(t),this.processSchemaElements(o,r.ENUM),this.processSchemaElements(n,r.TABLE),this.linkRecordsToTables(),this.processSchemaElements(a,r.NOTE),this.processSchemaElements(s,`ref`),this.processSchemaElements(l,`dep`),this.processSchemaElements(u,r.TABLE_GROUP),this.injectedRawRefs.forEach(e=>{let t=this.findOrCreateSchema(r.DEFAULT_SCHEMA_NAME),n=new c.default({...e,schema:t});t.refs.some(e=>e.equals(n))||t.pushRef(n)})}generateId(){this.id=this.dbState.generateId(`dbId`)}processNotes(e){e.forEach(e=>{this.pushNote(new f.default({...e,database:this}))})}processRecords(e){e.forEach(({schemaName:e,tableName:t,columns:n,values:r,example:i,token:a})=>{this.records.push({id:this.dbState.generateId(`recordId`),schemaName:e,tableName:t,columns:n,values:r,example:i,token:a})})}processTablePartials(e){e.forEach(e=>{this.tablePartials.push(new p.default({...e,dbState:this.dbState}))})}pushNote(e){this.checkNote(e),this.notes.push(e)}checkNote(e){this.notes.some(t=>t.name===e.name)&&e.error(`Notes ${e.name} existed`)}processSchemas(e){e.forEach(e=>{this.pushSchema(new d.default({...e,database:this}))})}pushSchema(e){this.checkSchema(e),this.schemas.push(e)}checkSchema(e){this.schemas.some(t=>t.name===e.name)&&e.error(`Schemas ${e.name} existed`)}processSchemaElements(e,t){let n;e.forEach(e=>{switch(e.schemaName?(n=this.findOrCreateSchema(e.schemaName),e.schemaName):n=this.findOrCreateSchema(r.DEFAULT_SCHEMA_NAME),t){case r.TABLE:n.pushTable(new l.default({...e,schema:n}));break;case r.ENUM:n.pushEnum(new s.default({...e,schema:n}));break;case r.TABLE_GROUP:n.pushTableGroup(new u.default({...e,schema:n}));break;case`ref`:n.pushRef(new c.default({...e,schema:n}));break;case`dep`:n.pushDep(new o.default({...e,schema:n}));break;default:break}})}linkRecordsToTables(){let e={};this.schemas.forEach(t=>{e[t.name]={},t.tables.forEach(n=>{e[t.name][n.name]=n})}),this.records.forEach(t=>{let n=e[t.schemaName??`public`]?.[t.tableName];n&&(t.tableId=n.id,n.records.push(t))})}findOrCreateSchema(e){let n=this.schemas.find(t=>t.name===e||t.alias===e);return n||(n=new d.default({name:e,note:{value:e===`public`?`Default ${t.default(r.DEFAULT_SCHEMA_NAME)} Schema`:null},database:this}),this.pushSchema(n)),n}findTableAlias(e){let t=this.aliases.find(t=>t.name===e);if(!t||t.kind!==`table`)return null;let n=t.value.schemaName||`public`,r=this.schemas.find(e=>e.name===n);if(!r)return null;let{tableName:i}=t.value;return r.tables.find(e=>e.name===i)||null}findTable(e,t){let n=null;if(!e&&(n=this.findTableAlias(t),n))return n;let r=this.findOrCreateSchema(e||`public`);return r||this.error(`Schema ${e||`public`} don't exist`),r.findTable(t)}findEnum(e,t){let n=this.schemas.find(t=>t.name===e||t.alias===e);if(n)return n.enums.find(e=>e.name===t)}findTablePartial(e){return this.tablePartials.find(t=>t.name===e)}adjustCardinalitiesFromColumns(){this.schemas.forEach(e=>{e.refs.forEach(e=>{let t=e.endpoints.find(e=>(0,m.parseCardinality)(e.relation).max===`*`),n=e.endpoints.find(e=>(0,m.parseCardinality)(e.relation).max===1);if(!n)return;let r,i;t?(r=t,i=n):(r=e.endpoints[1],i=e.endpoints[0]),!(!r||!i)&&r.fields.every(e=>e.not_null||e.pk||e.increment)&&(i.relation=(0,m.makeCardinalityRequired)(i.relation))})})}export(){return{...this.exportChild()}}shallowExport(){return{hasDefaultSchema:this.hasDefaultSchema,note:this.note,databaseType:this.databaseType,name:this.name}}exportChild(){return{schemas:this.schemas.map(e=>e.export()),notes:this.notes.map(e=>e.export()),records:this.records.map(e=>({...e}))}}exportChildIds(){return{schemaIds:this.schemas.map(e=>e.id),noteIds:this.notes.map(e=>e.id)}}normalize(){let e={database:{[this.id]:{id:this.id,...this.shallowExport(),...this.exportChildIds()}},schemas:{},notes:{},refs:{},deps:{},depEdges:{},enums:{},tableGroups:{},tables:{},endpoints:{},enumValues:{},indexes:{},indexColumns:{},checks:{},fields:{},records:{},tablePartials:{}};return this.schemas.forEach(t=>t.normalize(e)),this.notes.forEach(t=>t.normalize(e)),this.records.forEach(t=>{e.records[t.id]={...t}}),this.tablePartials.forEach(t=>t.normalize(e)),e}};exports.default=h;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/capitalize.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),r=require("./config.cjs"),i=require("./dbState.cjs"),a=require("./element.cjs"),o=require("./dep.cjs"),s=require("./enum.cjs"),c=require("./ref.cjs"),l=require("./table.cjs"),u=require("./tableGroup.cjs"),d=require("./schema.cjs"),f=require("./stickyNote.cjs"),p=require("./tablePartial.cjs");let m=require("@dbml/parse");n.init_lodash();var h=class extends a.default{constructor({schemas:t=[],tables:n=[],notes:a=[],enums:o=[],refs:s=[],deps:l=[],tableGroups:u=[],project:d={},aliases:f=[],records:p=[],tablePartials:m=[],diagramViews:h=[]}={}){super(),this.dbState=new i.default,this.generateId(),this.hasDefaultSchema=!1,this.schemas=[],this.notes=[],this.note=d.note?e.default(d,`note.value`,typeof d.note==`string`?d.note:null):null,this.noteToken=d.note?e.default(d,`note.token`,d.noteToken):null,this.databaseType=d.database_type,this.name=d.name,this.token=d.token,this.aliases=f,this.records=[],this.tablePartials=[],this.diagramViews=h,this.injectedRawRefs=[],this.processNotes(a),this.processRecords(p),this.processTablePartials(m),this.processSchemas(t),this.processSchemaElements(o,r.ENUM),this.processSchemaElements(n,r.TABLE),this.linkRecordsToTables(),this.processSchemaElements(a,r.NOTE),this.processSchemaElements(s,`ref`),this.processSchemaElements(l,`dep`),this.processSchemaElements(u,r.TABLE_GROUP),this.injectedRawRefs.forEach(e=>{let t=this.findOrCreateSchema(r.DEFAULT_SCHEMA_NAME),n=new c.default({...e,schema:t});t.refs.some(e=>e.equals(n))||t.pushRef(n)})}generateId(){this.id=this.dbState.generateId(`dbId`)}processNotes(e){e.forEach(e=>{this.pushNote(new f.default({...e,database:this}))})}processRecords(e){e.forEach(({schemaName:e,tableName:t,columns:n,values:r,example:i,token:a})=>{this.records.push({id:this.dbState.generateId(`recordId`),schemaName:e,tableName:t,columns:n,values:r,example:i,token:a})})}processTablePartials(e){e.forEach(e=>{this.tablePartials.push(new p.default({...e,dbState:this.dbState}))})}pushNote(e){this.checkNote(e),this.notes.push(e)}checkNote(e){this.notes.some(t=>t.name===e.name)&&e.error(`Notes ${e.name} existed`)}processSchemas(e){e.forEach(e=>{this.pushSchema(new d.default({...e,database:this}))})}pushSchema(e){this.checkSchema(e),this.schemas.push(e)}checkSchema(e){this.schemas.some(t=>t.name===e.name)&&e.error(`Schemas ${e.name} existed`)}processSchemaElements(e,t){let n;e.forEach(e=>{switch(e.schemaName?(n=this.findOrCreateSchema(e.schemaName),e.schemaName):n=this.findOrCreateSchema(r.DEFAULT_SCHEMA_NAME),t){case r.TABLE:n.pushTable(new l.default({...e,schema:n}));break;case r.ENUM:n.pushEnum(new s.default({...e,schema:n}));break;case r.TABLE_GROUP:n.pushTableGroup(new u.default({...e,schema:n}));break;case`ref`:n.pushRef(new c.default({...e,schema:n}));break;case`dep`:n.pushDep(new o.default({...e,schema:n}));break;default:break}})}linkRecordsToTables(){let e={};this.schemas.forEach(t=>{e[t.name]={},t.tables.forEach(n=>{e[t.name][n.name]=n})}),this.records.forEach(t=>{let n=e[t.schemaName??`public`]?.[t.tableName];n&&(t.tableId=n.id,n.records.push(t))})}findOrCreateSchema(e){let n=this.schemas.find(t=>t.name===e||t.alias===e);return n||(n=new d.default({name:e,note:{value:e===`public`?`Default ${t.default(r.DEFAULT_SCHEMA_NAME)} Schema`:null},database:this}),this.pushSchema(n)),n}findTableAlias(e){let t=this.aliases.find(t=>t.name===e);if(!t||t.kind!==`table`)return null;let n=t.value.schemaName||`public`,r=this.schemas.find(e=>e.name===n);if(!r)return null;let{tableName:i}=t.value;return r.tables.find(e=>e.name===i)||null}findTable(e,t){let n=null;if(!e&&(n=this.findTableAlias(t),n))return n;let r=this.findOrCreateSchema(e||`public`);return r||this.error(`Schema ${e||`public`} don't exist`),r.findTable(t)}findEnum(e,t){let n=this.schemas.find(t=>t.name===e||t.alias===e);if(n)return n.enums.find(e=>e.name===t)}findTablePartial(e){return this.tablePartials.find(t=>t.name===e)}adjustCardinalitiesFromColumns(){this.schemas.forEach(e=>{e.refs.forEach(e=>{let t=e.endpoints.find(e=>(0,m.parseCardinality)(e.relation).max===`*`),n=e.endpoints.find(e=>(0,m.parseCardinality)(e.relation).max===1);if(!n)return;let r,i;t?(r=t,i=n):(r=e.endpoints[1],i=e.endpoints[0]),!(!r||!i)&&r.fields.every(e=>e.not_null||e.pk||e.increment)&&(i.relation=(0,m.makeCardinalityRequired)(i.relation))})})}export(){return{...this.exportChild()}}shallowExport(){return{hasDefaultSchema:this.hasDefaultSchema,note:this.note,databaseType:this.databaseType,name:this.name}}exportChild(){return{schemas:this.schemas.map(e=>e.export()),notes:this.notes.map(e=>e.export()),records:this.records.map(e=>({...e}))}}exportChildIds(){return{schemaIds:this.schemas.map(e=>e.id),noteIds:this.notes.map(e=>e.id)}}normalize(){let e={database:{[this.id]:{id:this.id,...this.shallowExport(),...this.exportChildIds()}},schemas:{},notes:{},refs:{},deps:{},depEdges:{},enums:{},tableGroups:{},tables:{},endpoints:{},enumValues:{},indexes:{},indexColumns:{},checks:{},fields:{},records:{},tablePartials:{}};return this.schemas.forEach(t=>t.normalize(e)),this.notes.forEach(t=>t.normalize(e)),this.records.forEach(t=>{e.records[t.id]={...t}}),this.tablePartials.forEach(t=>t.normalize(e)),e}};exports.default=h;
@@ -1,6 +1,6 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import t from "../node_modules/lodash-es/capitalize.mjs";
3
- import { init_lodash as n } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/capitalize.mjs";
3
+ import { init_lodash as n } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
4
4
  import { DEFAULT_SCHEMA_NAME as r, ENUM as i, NOTE as a, TABLE as o, TABLE_GROUP as s } from "./config.mjs";
5
5
  import c from "./dbState.mjs";
6
6
  import l from "./element.mjs";
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs");require("./config.cjs");const n=require("./element.cjs"),r=require("./depEdge.cjs");t.init_lodash();var i=class extends n.default{constructor({name:t,color:n,note:r,metadata:i,edges:a,token:o,schema:s={}}){super(o),this.name=t??null,this.color=n,this.note=r?e.default(r,`value`,r):null,this.noteToken=r?e.default(r,`token`,null):null,this.metadata=i??null,this.edges=[],this.schema=s,this.dbState=this.schema.dbState,this.generateId(),this.processEdges(a??[])}generateId(){this.id=this.dbState.generateId(`depId`)}processEdges(e){e.forEach(e=>{let t=e.upstream?.schemaName||`public`,n=e.downstream?.schemaName||`public`,i=e.upstream?.tableName,a=e.downstream?.tableName,o=e.upstream?.fieldNames?.join(`,`),s=e.downstream?.fieldNames?.join(`,`);t===n&&i===a&&o===s&&o&&this.error(`Self-loop Dep edge not allowed: "${t}"."${i}" columns cannot depend on itself`),this.edges.push(new r.default({...e,dep:this}))})}export(){return{...this.shallowExport(),...this.exportChild()}}shallowExport(){return{name:this.name,color:this.color,note:this.note,metadata:this.metadata}}exportChild(){return{edges:this.edges.map(e=>e.export())}}exportChildIds(){return{edgeIds:this.edges.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}normalize(e){e.deps[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.edges.forEach(t=>t.normalize(e))}};exports.default=i;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs");require("./config.cjs");const n=require("./element.cjs"),r=require("./depEdge.cjs");t.init_lodash();var i=class extends n.default{constructor({name:t,color:n,note:r,metadata:i,edges:a,token:o,schema:s={}}){super(o),this.name=t??null,this.color=n,this.note=r?e.default(r,`value`,r):null,this.noteToken=r?e.default(r,`token`,null):null,this.metadata=i??null,this.edges=[],this.schema=s,this.dbState=this.schema.dbState,this.generateId(),this.processEdges(a??[])}generateId(){this.id=this.dbState.generateId(`depId`)}processEdges(e){e.forEach(e=>{let t=e.upstream?.schemaName||`public`,n=e.downstream?.schemaName||`public`,i=e.upstream?.tableName,a=e.downstream?.tableName,o=e.upstream?.fieldNames?.join(`,`),s=e.downstream?.fieldNames?.join(`,`);t===n&&i===a&&o===s&&o&&this.error(`Self-loop Dep edge not allowed: "${t}"."${i}" columns cannot depend on itself`),this.edges.push(new r.default({...e,dep:this}))})}export(){return{...this.shallowExport(),...this.exportChild()}}shallowExport(){return{name:this.name,color:this.color,note:this.note,metadata:this.metadata}}exportChild(){return{edges:this.edges.map(e=>e.export())}}exportChildIds(){return{edgeIds:this.edges.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}normalize(e){e.deps[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.edges.forEach(t=>t.normalize(e))}};exports.default=i;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import "./config.mjs";
4
4
  import n from "./element.mjs";
5
5
  import r from "./depEdge.mjs";
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs"),n=require("./utils.cjs"),r=require("./element.cjs"),i=require("./enumValue.cjs");t.init_lodash();var a=class extends r.default{constructor({name:t,token:n,values:r,note:i,schema:a,noteToken:o=null}={}){super(n),t||this.error(`Enum must have a name`),this.name=t,this.note=i?e.default(i,`value`,i):null,this.noteToken=i?e.default(i,`token`,o):null,this.values=[],this.fields=[],this.schema=a,this.dbState=this.schema.dbState,this.generateId(),this.processValues(r)}generateId(){this.id=this.dbState.generateId(`enumId`)}processValues(e){e.forEach(e=>{this.pushValue(new i.default({...e,_enum:this}))})}pushValue(e){this.checkValue(e),this.values.push(e)}checkValue(e){this.values.some(t=>t.name===e.name)&&e.error(`Enum value "${e.name}" existed in enum ${n.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}"${this.name}"`)}pushField(e){this.checkField(e),this.fields.push(e)}checkField(e){this.fields.some(t=>t.id===e.id)&&this.error(`Field ${n.shouldPrintSchema(e.table.schema)?`"${e.table.schema.name}".`:``}"${e.table.name}"."${e.name}" already associated with enum ${n.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}${this.name}"`)}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{values:this.values.map(e=>e.export())}}exportChildIds(){return{valueIds:this.values.map(e=>e.id),fieldIds:this.fields.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}shallowExport(){return{name:this.name,note:this.note}}normalize(e){e.enums[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.values.forEach(t=>t.normalize(e))}};exports.default=a;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),n=require("./utils.cjs"),r=require("./element.cjs"),i=require("./enumValue.cjs");t.init_lodash();var a=class extends r.default{constructor({name:t,token:n,values:r,note:i,schema:a,noteToken:o=null}={}){super(n),t||this.error(`Enum must have a name`),this.name=t,this.note=i?e.default(i,`value`,i):null,this.noteToken=i?e.default(i,`token`,o):null,this.values=[],this.fields=[],this.schema=a,this.dbState=this.schema.dbState,this.generateId(),this.processValues(r)}generateId(){this.id=this.dbState.generateId(`enumId`)}processValues(e){e.forEach(e=>{this.pushValue(new i.default({...e,_enum:this}))})}pushValue(e){this.checkValue(e),this.values.push(e)}checkValue(e){this.values.some(t=>t.name===e.name)&&e.error(`Enum value "${e.name}" existed in enum ${n.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}"${this.name}"`)}pushField(e){this.checkField(e),this.fields.push(e)}checkField(e){this.fields.some(t=>t.id===e.id)&&this.error(`Field ${n.shouldPrintSchema(e.table.schema)?`"${e.table.schema.name}".`:``}"${e.table.name}"."${e.name}" already associated with enum ${n.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}${this.name}"`)}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{values:this.values.map(e=>e.export())}}exportChildIds(){return{valueIds:this.values.map(e=>e.id),fieldIds:this.fields.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}shallowExport(){return{name:this.name,note:this.note}}normalize(e){e.enums[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.values.forEach(t=>t.normalize(e))}};exports.default=a;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import { shouldPrintSchema as n } from "./utils.mjs";
4
4
  import r from "./element.mjs";
5
5
  import i from "./enumValue.mjs";
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs"),n=require("./element.cjs");t.init_lodash();var r=class extends n.default{constructor({name:t,token:n,note:r,_enum:i,noteToken:a=null}={}){super(n),t||this.error(`Enum value must have a name`),this.name=t,this.note=r?e.default(r,`value`,r):null,this.noteToken=r?e.default(r,`token`,a):null,this._enum=i,this.dbState=this._enum.dbState,this.generateId()}generateId(){this.id=this.dbState.generateId(`enumValueId`)}export(){return{...this.shallowExport()}}exportParentIds(){return{enumId:this._enum.id}}shallowExport(){return{name:this.name,note:this.note}}normalize(e){e.enumValues[this.id]={id:this.id,...this.shallowExport(),...this.exportParentIds()}}};exports.default=r;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),n=require("./element.cjs");t.init_lodash();var r=class extends n.default{constructor({name:t,token:n,note:r,_enum:i,noteToken:a=null}={}){super(n),t||this.error(`Enum value must have a name`),this.name=t,this.note=r?e.default(r,`value`,r):null,this.noteToken=r?e.default(r,`token`,a):null,this._enum=i,this.dbState=this._enum.dbState,this.generateId()}generateId(){this.id=this.dbState.generateId(`enumValueId`)}export(){return{...this.shallowExport()}}exportParentIds(){return{enumId:this._enum.id}}shallowExport(){return{name:this.name,note:this.note}}normalize(e){e.enumValues[this.id]={id:this.id,...this.shallowExport(),...this.exportParentIds()}}};exports.default=r;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import n from "./element.mjs";
4
4
  //#region src/model_structure/enumValue.js
5
5
  t();
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs");require("./config.cjs");const n=require("./element.cjs"),r=require("./check.cjs");t.init_lodash();var i=class extends n.default{constructor({name:t,type:n,unique:r,pk:i,token:a,not_null:o,note:s,dbdefault:c,increment:l,checks:u=[],table:d={},noteToken:f=null,injectedPartial:p=null,injectedToken:m=null,metadata:h={}}){super(a),t||this.error(`Field must have a name`),n||this.error(`Field must have a type`),this.name=t,this.type=n,this.unique=r,this.pk=i,this.not_null=o,this.note=s?e.default(s,`value`,s):null,this.noteToken=s?e.default(s,`token`,f):null,this.dbdefault=c,this.increment=l,this.checks=[],this.endpoints=[],this.depEdges=[],this.table=d,this.injectedPartial=p,this.injectedToken=m,this.dbState=this.table.dbState,this.metadata=h,this.generateId(),this.bindType(),this.processChecks(u)}generateId(){this.id=this.dbState.generateId(`fieldId`)}bindType(){let e=this.type.type_name,t=this.type.schemaName||`public`;if(this.type.schemaName){let n=this.table.schema.database.findEnum(t,e);if(!n){this.type.type_name=`${t}.${e}`,this.type.originalTypeName=e;return}this._enum=n,n.pushField(this)}else{let n=this.table.schema.database.findEnum(t,e);if(!n)return;this._enum=n,n.pushField(this)}}pushEndpoint(e){this.endpoints.push(e)}pushDepEdge(e){this.depEdges.push(e)}export(){return{...this.shallowExport()}}exportParentIds(){return{tableId:this.table.id,enumId:this._enum?this._enum.id:null}}exportChildIds(){return{endpointIds:this.endpoints.map(e=>e.id),depEdgeIds:this.depEdges.map(e=>e.id)}}shallowExport(){return{name:this.name,type:this.type,unique:this.unique,pk:this.pk,not_null:this.not_null,note:this.note,dbdefault:this.dbdefault,increment:this.increment,injectedPartialId:this.injectedPartial?.id??null,checkIds:this.checks.map(e=>e.id),metadata:this.metadata}}normalize(e){e.fields[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.checks.forEach(t=>t.normalize(e))}processChecks(e){e.forEach(e=>{this.checks.push(new r.default({...e,table:this.table,column:this}))})}};exports.default=i;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs");require("./config.cjs");const n=require("./element.cjs"),r=require("./check.cjs");t.init_lodash();var i=class extends n.default{constructor({name:t,type:n,unique:r,pk:i,token:a,not_null:o,note:s,dbdefault:c,increment:l,checks:u=[],table:d={},noteToken:f=null,injectedPartial:p=null,injectedToken:m=null,metadata:h={}}){super(a),t||this.error(`Field must have a name`),n||this.error(`Field must have a type`),this.name=t,this.type=n,this.unique=r,this.pk=i,this.not_null=o,this.note=s?e.default(s,`value`,s):null,this.noteToken=s?e.default(s,`token`,f):null,this.dbdefault=c,this.increment=l,this.checks=[],this.endpoints=[],this.depEdges=[],this.table=d,this.injectedPartial=p,this.injectedToken=m,this.dbState=this.table.dbState,this.metadata=h,this.generateId(),this.bindType(),this.processChecks(u)}generateId(){this.id=this.dbState.generateId(`fieldId`)}bindType(){let e=this.type.type_name,t=this.type.schemaName||`public`;if(this.type.schemaName){let n=this.table.schema.database.findEnum(t,e);if(!n){this.type.type_name=`${t}.${e}`,this.type.originalTypeName=e;return}this._enum=n,n.pushField(this)}else{let n=this.table.schema.database.findEnum(t,e);if(!n)return;this._enum=n,n.pushField(this)}}pushEndpoint(e){this.endpoints.push(e)}pushDepEdge(e){this.depEdges.push(e)}export(){return{...this.shallowExport()}}exportParentIds(){return{tableId:this.table.id,enumId:this._enum?this._enum.id:null}}exportChildIds(){return{endpointIds:this.endpoints.map(e=>e.id),depEdgeIds:this.depEdges.map(e=>e.id)}}shallowExport(){return{name:this.name,type:this.type,unique:this.unique,pk:this.pk,not_null:this.not_null,note:this.note,dbdefault:this.dbdefault,increment:this.increment,injectedPartialId:this.injectedPartial?.id??null,checkIds:this.checks.map(e=>e.id),metadata:this.metadata}}normalize(e){e.fields[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.checks.forEach(t=>t.normalize(e))}processChecks(e){e.forEach(e=>{this.checks.push(new r.default({...e,table:this.table,column:this}))})}};exports.default=i;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import "./config.mjs";
4
4
  import n from "./element.mjs";
5
5
  import r from "./check.mjs";
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs"),require("./config.cjs");const e=require("./element.cjs"),t=require("./endpoint.cjs");function n(e,t){return e[0].equals(t[0])&&e[1].equals(t[1])}var r=class extends e.default{constructor({name:e,color:t,endpoints:n,onDelete:r,onUpdate:i,inactive:a,token:o,schema:s={},injectedPartial:c=null}={}){super(o),this.name=e,this.color=t,this.onDelete=r,this.onUpdate=i,this.inactive=a,this.endpoints=[],this.schema=s,this.injectedPartial=c,this.dbState=this.schema.dbState,this.generateId(),this.processEndpoints(n)}generateId(){this.id=this.dbState.generateId(`refId`)}processEndpoints(e){e.forEach(e=>{this.endpoints.push(new t.default({...e,ref:this})),e.schemaName}),this.endpoints[0].equals(this.endpoints[1])&&this.error(`Two endpoints are the same`),this.endpoints[0].fields.length!==this.endpoints[1].fields.length&&this.error(`Two endpoints have unequal number of fields`)}equals(e){return n(this.endpoints,e.endpoints)||n(this.endpoints,e.endpoints.slice().reverse())}export(){return{...this.shallowExport(),...this.exportChild()}}shallowExport(){return{name:this.name,color:this.color,onDelete:this.onDelete,onUpdate:this.onUpdate,inactive:this.inactive,injectedPartialId:this.injectedPartial?.id}}exportChild(){return{endpoints:this.endpoints.map(e=>e.export())}}exportChildIds(){return{endpointIds:this.endpoints.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}normalize(e){e.refs[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.endpoints.forEach(t=>t.normalize(e))}};exports.default=r;
1
+ require("../_virtual/_rolldown/runtime.cjs"),require("./config.cjs");const e=require("./element.cjs"),t=require("./endpoint.cjs");function n(e,t){return e[0].equals(t[0])&&e[1].equals(t[1])}var r=class extends e.default{constructor({name:e,color:t,endpoints:n,onDelete:r,onUpdate:i,inactive:a,token:o,schema:s={},injectedPartial:c=null,metadata:l={}}={}){super(o),this.name=e,this.color=t,this.onDelete=r,this.onUpdate=i,this.inactive=a,this.metadata=l,this.endpoints=[],this.schema=s,this.injectedPartial=c,this.dbState=this.schema.dbState,this.generateId(),this.processEndpoints(n)}generateId(){this.id=this.dbState.generateId(`refId`)}processEndpoints(e){e.forEach(e=>{this.endpoints.push(new t.default({...e,ref:this})),e.schemaName}),this.endpoints[0].equals(this.endpoints[1])&&this.error(`Two endpoints are the same`),this.endpoints[0].fields.length!==this.endpoints[1].fields.length&&this.error(`Two endpoints have unequal number of fields`)}equals(e){return n(this.endpoints,e.endpoints)||n(this.endpoints,e.endpoints.slice().reverse())}export(){return{...this.shallowExport(),...this.exportChild()}}shallowExport(){return{name:this.name,color:this.color,onDelete:this.onDelete,onUpdate:this.onUpdate,inactive:this.inactive,metadata:this.metadata,injectedPartialId:this.injectedPartial?.id}}exportChild(){return{endpoints:this.endpoints.map(e=>e.export())}}exportChildIds(){return{endpointIds:this.endpoints.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}normalize(e){e.refs[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.endpoints.forEach(t=>t.normalize(e))}};exports.default=r;
@@ -6,8 +6,8 @@ function n(e, t) {
6
6
  return e[0].equals(t[0]) && e[1].equals(t[1]);
7
7
  }
8
8
  var r = class extends e {
9
- constructor({ name: e, color: t, endpoints: n, onDelete: r, onUpdate: i, inactive: a, token: o, schema: s = {}, injectedPartial: c = null } = {}) {
10
- super(o), this.name = e, this.color = t, this.onDelete = r, this.onUpdate = i, this.inactive = a, this.endpoints = [], this.schema = s, this.injectedPartial = c, this.dbState = this.schema.dbState, this.generateId(), this.processEndpoints(n);
9
+ constructor({ name: e, color: t, endpoints: n, onDelete: r, onUpdate: i, inactive: a, token: o, schema: s = {}, injectedPartial: c = null, metadata: l = {} } = {}) {
10
+ super(o), this.name = e, this.color = t, this.onDelete = r, this.onUpdate = i, this.inactive = a, this.metadata = l, this.endpoints = [], this.schema = s, this.injectedPartial = c, this.dbState = this.schema.dbState, this.generateId(), this.processEndpoints(n);
11
11
  }
12
12
  generateId() {
13
13
  this.id = this.dbState.generateId("refId");
@@ -36,6 +36,7 @@ var r = class extends e {
36
36
  onDelete: this.onDelete,
37
37
  onUpdate: this.onUpdate,
38
38
  inactive: this.inactive,
39
+ metadata: this.metadata,
39
40
  injectedPartialId: this.injectedPartial?.id
40
41
  };
41
42
  }
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs"),n=require("./utils.cjs"),r=require("./element.cjs"),i=require("./dep.cjs"),a=require("./enum.cjs"),o=require("./ref.cjs"),s=require("./table.cjs"),c=require("./tableGroup.cjs");t.init_lodash();var l=class extends r.default{constructor({name:t,alias:n,note:r,tables:i=[],refs:a=[],deps:o=[],enums:s=[],tableGroups:c=[],token:l,database:u={},noteToken:d=null}={}){super(l),this.tables=[],this.enums=[],this.tableGroups=[],this.refs=[],this.deps=[],this.name=t,this.note=r?e.default(r,`value`,typeof r==`string`?r:null):null,this.noteToken=r?e.default(r,`token`,d):null,this.alias=n,this.database=u,this.dbState=this.database.dbState,this.generateId(),this.processEnums(s),this.processTables(i),this.processRefs(a),this.processDeps(o),this.processTableGroups(c)}generateId(){this.id=this.dbState.generateId(`schemaId`)}processTables(e){e.forEach(e=>{this.pushTable(new s.default({...e,schema:this}))})}pushTable(e){this.checkTable(e),this.tables.push(e)}checkTable(e){this.tables.some(t=>t.name===e.name)&&e.error(`Table ${n.shouldPrintSchema(this)?`"${this.name}".`:``}"${e.name}" existed`)}findTable(e){return this.tables.find(t=>t.name===e)}processEnums(e){e.forEach(e=>{this.pushEnum(new a.default({...e,schema:this}))})}pushEnum(e){this.checkEnum(e),this.enums.push(e)}checkEnum(e){this.enums.some(t=>t.name===e.name)&&e.error(`Enum ${n.shouldPrintSchema(this)?`"${this.name}".`:``}"${e.name}" existed`)}processRefs(e){e.forEach(e=>{this.pushRef(new o.default({...e,schema:this}))})}pushRef(e){this.checkRef(e),this.refs.push(e)}checkRef(e){if(this.refs.some(t=>t.equals(e))){let t=e.endpoints[0],n=t.fieldNames.map(e=>JSON.stringify(e)).join(`, `),r=e.endpoints[1],i=r.fieldNames.map(e=>JSON.stringify(e)).join(`, `),a=`"${t.schemaName?`${t.schemaName}"."`:``}${t.tableName}"(${n})`,o=`"${r.schemaName?`${r.schemaName}"."`:``}${r.tableName}"(${i})`;e.error(`Reference with the same endpoints already exists: ${a} references ${o}`)}}processDeps(e){e.forEach(e=>{this.pushDep(new i.default({...e,schema:this}))})}pushDep(e){this.deps.push(e)}processTableGroups(e){e.forEach(e=>{this.pushTableGroup(new c.default({...e,schema:this}))})}pushTableGroup(e){this.checkTableGroup(e),this.tableGroups.push(e)}checkTableGroup(e){this.tableGroups.some(t=>t.name===e.name)&&e.error(`Table Group ${n.shouldPrintSchema(this)?`"${this.name}".`:``}"${e.name}" existed`)}checkSameId(e){return this.name===e.name||this.alias===e.name||this.name===e.alias||!!this.alias&&this.alias===e.alias}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{tables:this.tables.map(e=>e.export()),enums:this.enums.map(e=>e.export()),tableGroups:this.tableGroups.map(e=>e.export()),refs:this.refs.map(e=>e.export()),deps:this.deps.map(e=>e.export())}}exportChildIds(){return{tableIds:this.tables.map(e=>e.id),enumIds:this.enums.map(e=>e.id),tableGroupIds:this.tableGroups.map(e=>e.id),refIds:this.refs.map(e=>e.id),depIds:this.deps.map(e=>e.id)}}exportParentIds(){return{databaseId:this.database.id}}shallowExport(){return{name:this.name,note:this.note,alias:this.alias}}normalize(e){e.schemas[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.tables.forEach(t=>t.normalize(e)),this.enums.forEach(t=>t.normalize(e)),this.tableGroups.forEach(t=>t.normalize(e)),this.refs.forEach(t=>t.normalize(e)),this.deps.forEach(t=>t.normalize(e))}};exports.default=l;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),n=require("./utils.cjs"),r=require("./element.cjs"),i=require("./dep.cjs"),a=require("./enum.cjs"),o=require("./ref.cjs"),s=require("./table.cjs"),c=require("./tableGroup.cjs");t.init_lodash();var l=class extends r.default{constructor({name:t,alias:n,note:r,tables:i=[],refs:a=[],deps:o=[],enums:s=[],tableGroups:c=[],token:l,database:u={},noteToken:d=null}={}){super(l),this.tables=[],this.enums=[],this.tableGroups=[],this.refs=[],this.deps=[],this.name=t,this.note=r?e.default(r,`value`,typeof r==`string`?r:null):null,this.noteToken=r?e.default(r,`token`,d):null,this.alias=n,this.database=u,this.dbState=this.database.dbState,this.generateId(),this.processEnums(s),this.processTables(i),this.processRefs(a),this.processDeps(o),this.processTableGroups(c)}generateId(){this.id=this.dbState.generateId(`schemaId`)}processTables(e){e.forEach(e=>{this.pushTable(new s.default({...e,schema:this}))})}pushTable(e){this.checkTable(e),this.tables.push(e)}checkTable(e){this.tables.some(t=>t.name===e.name)&&e.error(`Table ${n.shouldPrintSchema(this)?`"${this.name}".`:``}"${e.name}" existed`)}findTable(e){return this.tables.find(t=>t.name===e)}processEnums(e){e.forEach(e=>{this.pushEnum(new a.default({...e,schema:this}))})}pushEnum(e){this.checkEnum(e),this.enums.push(e)}checkEnum(e){this.enums.some(t=>t.name===e.name)&&e.error(`Enum ${n.shouldPrintSchema(this)?`"${this.name}".`:``}"${e.name}" existed`)}processRefs(e){e.forEach(e=>{this.pushRef(new o.default({...e,schema:this}))})}pushRef(e){this.checkRef(e),this.refs.push(e)}checkRef(e){if(this.refs.some(t=>t.equals(e))){let t=e.endpoints[0],n=t.fieldNames.map(e=>JSON.stringify(e)).join(`, `),r=e.endpoints[1],i=r.fieldNames.map(e=>JSON.stringify(e)).join(`, `),a=`"${t.schemaName?`${t.schemaName}"."`:``}${t.tableName}"(${n})`,o=`"${r.schemaName?`${r.schemaName}"."`:``}${r.tableName}"(${i})`;e.error(`Reference with the same endpoints already exists: ${a} references ${o}`)}}processDeps(e){e.forEach(e=>{this.pushDep(new i.default({...e,schema:this}))})}pushDep(e){this.deps.push(e)}processTableGroups(e){e.forEach(e=>{this.pushTableGroup(new c.default({...e,schema:this}))})}pushTableGroup(e){this.checkTableGroup(e),this.tableGroups.push(e)}checkTableGroup(e){this.tableGroups.some(t=>t.name===e.name)&&e.error(`Table Group ${n.shouldPrintSchema(this)?`"${this.name}".`:``}"${e.name}" existed`)}checkSameId(e){return this.name===e.name||this.alias===e.name||this.name===e.alias||!!this.alias&&this.alias===e.alias}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{tables:this.tables.map(e=>e.export()),enums:this.enums.map(e=>e.export()),tableGroups:this.tableGroups.map(e=>e.export()),refs:this.refs.map(e=>e.export()),deps:this.deps.map(e=>e.export())}}exportChildIds(){return{tableIds:this.tables.map(e=>e.id),enumIds:this.enums.map(e=>e.id),tableGroupIds:this.tableGroups.map(e=>e.id),refIds:this.refs.map(e=>e.id),depIds:this.deps.map(e=>e.id)}}exportParentIds(){return{databaseId:this.database.id}}shallowExport(){return{name:this.name,note:this.note,alias:this.alias}}normalize(e){e.schemas[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.tables.forEach(t=>t.normalize(e)),this.enums.forEach(t=>t.normalize(e)),this.tableGroups.forEach(t=>t.normalize(e)),this.refs.forEach(t=>t.normalize(e)),this.deps.forEach(t=>t.normalize(e))}};exports.default=l;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import { shouldPrintSchema as n } from "./utils.mjs";
4
4
  import r from "./element.mjs";
5
5
  import i from "./dep.mjs";
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/isNil.cjs"),n=require("../node_modules/lodash-es/lodash.cjs");require("./config.cjs");const r=require("./utils.cjs"),i=require("./element.cjs"),a=require("./check.cjs"),o=require("./field.cjs"),s=require("./indexes.cjs");let c=require("@dbml/parse");n.init_lodash();var l=class extends i.default{constructor({name:t,alias:n,note:r,fields:i=[],indexes:a=[],checks:o=[],schema:s={},token:c,headerColor:l,noteToken:u=null,partials:d=[],metadata:f={}}){super(c),this.metadata=f,this.name=t,this.alias=n,this.note=r?e.default(r,`value`,r):null,this.noteToken=r?e.default(r,`token`,u):null,this.headerColor=l,this.fields=[],this.indexes=[],this.checks=[],this.schema=s,this.partials=d,this.records=[],this.dbState=this.schema.dbState,this.generateId(),this.processFields(i),this.processPartials(),this.checkFieldCount(),this.processIndexes(a),this.processChecks(o)}generateId(){this.id=this.dbState.generateId(`tableId`)}checkFieldCount(){this.fields.length===0&&this.error(`Table must have at least one field`)}processFields(e){e.forEach(e=>{this.pushField(new o.default({...e,table:this}))})}pushField(e){this.checkField(e),this.fields.push(e)}checkField(e){this.fields.some(t=>t.name===e.name)&&e.error(`Field "${e.name}" existed in table ${r.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}"${this.name}"`)}processIndexes(e){e.forEach(e=>{this.pushIndex(new s.default({...e,table:this}))})}pushIndex(e){this.checkIndex(e),this.indexes.push(e)}checkIndex(e){e.columns.forEach(t=>{t.type===`column`&&!this.findField(t.value)&&e.error(`Column "${t.value}" do not exist in table ${r.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}"${this.name}"`)})}processChecks(e){e.forEach(e=>{this.pushCheck(new a.default({...e,table:this}))})}pushCheck(e){this.checks.push(e)}findField(e){return this.fields.find(t=>t.name===e)}checkSameId(e){return this.schema.checkSameId(e.schemaName||`public`)&&(this.name===e.name||this.alias===e.name||this.name===e.alias||this.alias&&this.alias===e.alias)}processPartials(){if(!this.partials?.length)return;let e=new Set(this.fields.map(e=>e.name)),n=new Set;t.default(this.note)||n.add(`note`),t.default(this.headerColor)||n.add(`headerColor`);let r=this.partials.sort((e,t)=>t.order-e.order);r.toReversed().forEach(e=>{this.fields.splice(e.order,0,`dummy`)}),r.forEach(r=>{let i=this.schema.database.findTablePartial(r.name);if(i||this.error(`Table partial ${r.name} not found`),r.id=i.id,i.fields){let t=i.fields.filter(t=>!e.has(t.name)).map(t=>(e.add(t.name),t.inline_refs&&t.inline_refs.forEach(e=>{let n=(0,c.getMultiplicities)(e.relation)||[`*`,`*`],r={token:t.token,endpoints:[{tableName:this.name,schemaName:this.schema?.name,fieldNames:[t.name],relation:n[0],token:t.token},{tableName:e.tableName,schemaName:e.schemaName,fieldNames:e.fieldNames,relation:n[1],token:e.token}],injectedPartial:i};this.schema.database.injectedRawRefs.push(r)}),new o.default({...t,noteToken:null,table:this,injectedPartial:i,injectedToken:r.token})));this.fields.splice(r.order,1,...t)}else this.fields.splice(r.order,1);!n.has(`note`)&&!t.default(i.note)&&(this.noteToken=null,this.note=i.note,n.add(`note`)),!n.has(`headerColor`)&&!t.default(i.headerColor)&&(this.headerColor=i.headerColor,n.add(`headerColor`)),i.indexes.forEach(e=>{this.indexes.push(new s.default({...e,table:this,injectedPartial:i}))}),i.checks.forEach(e=>{this.checks.push(new a.default({...e,name:e.name&&`${this.name}.${e.name}`,table:this,injectedPartial:i}))})})}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{fields:this.fields.map(e=>e.export()),indexes:this.indexes.map(e=>e.export())}}exportChildIds(){return{fieldIds:this.fields.map(e=>e.id),indexIds:this.indexes.map(e=>e.id),checkIds:this.checks.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id,groupId:this.group?this.group.id:null}}shallowExport(){return{name:this.name,alias:this.alias,note:this.note,headerColor:this.headerColor,partials:this.partials,recordIds:this.records.map(e=>e.id),metadata:this.metadata}}normalize(e){e.tables[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.fields.forEach(t=>t.normalize(e)),this.indexes.forEach(t=>t.normalize(e)),this.checks.forEach(t=>t.normalize(e))}};exports.default=l;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.cjs"),n=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs");require("./config.cjs");const r=require("./utils.cjs"),i=require("./element.cjs"),a=require("./check.cjs"),o=require("./field.cjs"),s=require("./indexes.cjs");let c=require("@dbml/parse");n.init_lodash();var l=class extends i.default{constructor({name:t,alias:n,note:r,fields:i=[],indexes:a=[],checks:o=[],schema:s={},token:c,headerColor:l,noteToken:u=null,partials:d=[],metadata:f={}}){super(c),this.metadata=f,this.name=t,this.alias=n,this.note=r?e.default(r,`value`,r):null,this.noteToken=r?e.default(r,`token`,u):null,this.headerColor=l,this.fields=[],this.indexes=[],this.checks=[],this.schema=s,this.partials=d,this.records=[],this.dbState=this.schema.dbState,this.generateId(),this.processFields(i),this.processPartials(),this.checkFieldCount(),this.processIndexes(a),this.processChecks(o)}generateId(){this.id=this.dbState.generateId(`tableId`)}checkFieldCount(){this.fields.length===0&&this.error(`Table must have at least one field`)}processFields(e){e.forEach(e=>{this.pushField(new o.default({...e,table:this}))})}pushField(e){this.checkField(e),this.fields.push(e)}checkField(e){this.fields.some(t=>t.name===e.name)&&e.error(`Field "${e.name}" existed in table ${r.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}"${this.name}"`)}processIndexes(e){e.forEach(e=>{this.pushIndex(new s.default({...e,table:this}))})}pushIndex(e){this.checkIndex(e),this.indexes.push(e)}checkIndex(e){e.columns.forEach(t=>{t.type===`column`&&!this.findField(t.value)&&e.error(`Column "${t.value}" do not exist in table ${r.shouldPrintSchema(this.schema)?`"${this.schema.name}".`:``}"${this.name}"`)})}processChecks(e){e.forEach(e=>{this.pushCheck(new a.default({...e,table:this}))})}pushCheck(e){this.checks.push(e)}findField(e){return this.fields.find(t=>t.name===e)}checkSameId(e){return this.schema.checkSameId(e.schemaName||`public`)&&(this.name===e.name||this.alias===e.name||this.name===e.alias||this.alias&&this.alias===e.alias)}processPartials(){if(!this.partials?.length)return;let e=new Set(this.fields.map(e=>e.name)),n=new Set;t.default(this.note)||n.add(`note`),t.default(this.headerColor)||n.add(`headerColor`);let r=this.partials.sort((e,t)=>t.order-e.order);r.toReversed().forEach(e=>{this.fields.splice(e.order,0,`dummy`)}),r.forEach(r=>{let i=this.schema.database.findTablePartial(r.name);if(i||this.error(`Table partial ${r.name} not found`),r.id=i.id,i.fields){let t=i.fields.filter(t=>!e.has(t.name)).map(t=>(e.add(t.name),t.inline_refs&&t.inline_refs.forEach(e=>{let n=(0,c.getMultiplicities)(e.relation)||[`*`,`*`],r={token:t.token,endpoints:[{tableName:this.name,schemaName:this.schema?.name,fieldNames:[t.name],relation:n[0],token:t.token},{tableName:e.tableName,schemaName:e.schemaName,fieldNames:e.fieldNames,relation:n[1],token:e.token}],injectedPartial:i};this.schema.database.injectedRawRefs.push(r)}),new o.default({...t,noteToken:null,table:this,injectedPartial:i,injectedToken:r.token})));this.fields.splice(r.order,1,...t)}else this.fields.splice(r.order,1);!n.has(`note`)&&!t.default(i.note)&&(this.noteToken=null,this.note=i.note,n.add(`note`)),!n.has(`headerColor`)&&!t.default(i.headerColor)&&(this.headerColor=i.headerColor,n.add(`headerColor`)),i.indexes.forEach(e=>{this.indexes.push(new s.default({...e,table:this,injectedPartial:i}))}),i.checks.forEach(e=>{this.checks.push(new a.default({...e,name:e.name&&`${this.name}.${e.name}`,table:this,injectedPartial:i}))})})}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{fields:this.fields.map(e=>e.export()),indexes:this.indexes.map(e=>e.export())}}exportChildIds(){return{fieldIds:this.fields.map(e=>e.id),indexIds:this.indexes.map(e=>e.id),checkIds:this.checks.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id,groupId:this.group?this.group.id:null}}shallowExport(){return{name:this.name,alias:this.alias,note:this.note,headerColor:this.headerColor,partials:this.partials,recordIds:this.records.map(e=>e.id),metadata:this.metadata}}normalize(e){e.tables[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()},this.fields.forEach(t=>t.normalize(e)),this.indexes.forEach(t=>t.normalize(e)),this.checks.forEach(t=>t.normalize(e))}};exports.default=l;
@@ -1,6 +1,6 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import t from "../node_modules/lodash-es/isNil.mjs";
3
- import { init_lodash as n } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import t from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isNil.mjs";
3
+ import { init_lodash as n } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
4
4
  import "./config.mjs";
5
5
  import { shouldPrintSchema as r } from "./utils.mjs";
6
6
  import i from "./element.mjs";
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs"),n=require("./utils.cjs"),r=require("./element.cjs");t.init_lodash();var i=class extends r.default{constructor({name:t,token:n,tables:r=[],schema:i={},note:a,color:o,noteToken:s=null,metadata:c={}}){super(n),this.metadata=c,this.name=t,this.tables=[],this.schema=i,this.dbState=this.schema.dbState,this.note=a?e.default(a,`value`,a):null,this.noteToken=a?e.default(a,`token`,s):null,this.color=o,this.generateId(),this.processTables(r)}generateId(){this.id=this.dbState.generateId(`tableGroupId`)}processTables(e){e.forEach(e=>{let t=this.schema.database.findTable(e.schemaName,e.name);t||this.error(`Table ${e.schemaName?`"${e.schemaName}".`:``}${e.name} don't exist`),this.pushTable(t)})}pushTable(e){this.checkTable(e),this.tables.push(e),e.group=this}checkTable(e){this.tables.some(t=>t.id===e.id)&&this.error(`Table ${n.shouldPrintSchema(e.schema)?`"${e.schema.name}".`:``}.${e.name} is already in the group`),e.group&&this.error(`Table ${n.shouldPrintSchema(e.schema)?`"${e.schema.name}".`:``}.${e.name} is already in group ${n.shouldPrintSchema(e.group.schema)?`"${e.group.schema.name}".`:``}${e.group.name}`)}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{tables:this.tables.map(e=>({tableName:e.name,schemaName:e.schema.name}))}}exportChildIds(){return{tableIds:this.tables.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}shallowExport(){return{name:this.name,note:this.note,color:this.color,metadata:this.metadata}}normalize(e){e.tableGroups[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()}}};exports.default=i;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),n=require("./utils.cjs"),r=require("./element.cjs");t.init_lodash();var i=class extends r.default{constructor({name:t,token:n,tables:r=[],schema:i={},note:a,color:o,noteToken:s=null,metadata:c={}}){super(n),this.metadata=c,this.name=t,this.tables=[],this.schema=i,this.dbState=this.schema.dbState,this.note=a?e.default(a,`value`,a):null,this.noteToken=a?e.default(a,`token`,s):null,this.color=o,this.generateId(),this.processTables(r)}generateId(){this.id=this.dbState.generateId(`tableGroupId`)}processTables(e){e.forEach(e=>{let t=this.schema.database.findTable(e.schemaName,e.name);t||this.error(`Table ${e.schemaName?`"${e.schemaName}".`:``}${e.name} don't exist`),this.pushTable(t)})}pushTable(e){this.checkTable(e),this.tables.push(e),e.group=this}checkTable(e){this.tables.some(t=>t.id===e.id)&&this.error(`Table ${n.shouldPrintSchema(e.schema)?`"${e.schema.name}".`:``}.${e.name} is already in the group`),e.group&&this.error(`Table ${n.shouldPrintSchema(e.schema)?`"${e.schema.name}".`:``}.${e.name} is already in group ${n.shouldPrintSchema(e.group.schema)?`"${e.group.schema.name}".`:``}${e.group.name}`)}export(){return{...this.shallowExport(),...this.exportChild()}}exportChild(){return{tables:this.tables.map(e=>({tableName:e.name,schemaName:e.schema.name}))}}exportChildIds(){return{tableIds:this.tables.map(e=>e.id)}}exportParentIds(){return{schemaId:this.schema.id}}shallowExport(){return{name:this.name,note:this.note,color:this.color,metadata:this.metadata}}normalize(e){e.tableGroups[this.id]={id:this.id,...this.shallowExport(),...this.exportChildIds(),...this.exportParentIds()}}};exports.default=i;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import { shouldPrintSchema as n } from "./utils.mjs";
4
4
  import r from "./element.mjs";
5
5
  //#region src/model_structure/tableGroup.ts
@@ -1 +1 @@
1
- require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/lodash-es/get.cjs"),t=require("../node_modules/lodash-es/lodash.cjs"),n=require("./element.cjs");t.init_lodash();var r=class extends n.default{constructor({name:t,note:n,fields:r=[],indexes:i=[],checks:a=[],token:o,headerColor:s,noteToken:c=null,dbState:l}={}){super(o),this.name=t,this.note=n?e.default(n,`value`,n):null,this.noteToken=n?e.default(n,`token`,c):null,this.headerColor=s,this.fields=r,this.indexes=i,this.checks=a,this.dbState=l,this.generateId()}generateId(){this.id=this.dbState.generateId(`tablePartialId`)}export(){return{...this.shallowExport()}}shallowExport(){return{name:this.name,note:this.note,headerColor:this.headerColor,fields:this.fields,indexes:this.indexes}}normalize(e){e.tablePartials[this.id]={id:this.id,...this.shallowExport()}}};exports.default=r;
1
+ require("../_virtual/_rolldown/runtime.cjs");const e=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.cjs"),t=require("../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.cjs"),n=require("./element.cjs");t.init_lodash();var r=class extends n.default{constructor({name:t,note:n,fields:r=[],indexes:i=[],checks:a=[],token:o,headerColor:s,noteToken:c=null,dbState:l}={}){super(o),this.name=t,this.note=n?e.default(n,`value`,n):null,this.noteToken=n?e.default(n,`token`,c):null,this.headerColor=s,this.fields=r,this.indexes=i,this.checks=a,this.dbState=l,this.generateId()}generateId(){this.id=this.dbState.generateId(`tablePartialId`)}export(){return{...this.shallowExport()}}shallowExport(){return{name:this.name,note:this.note,headerColor:this.headerColor,fields:this.fields,indexes:this.indexes}}normalize(e){e.tablePartials[this.id]={id:this.id,...this.shallowExport()}}};exports.default=r;
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/lodash-es/get.mjs";
2
- import { init_lodash as t } from "../node_modules/lodash-es/lodash.mjs";
1
+ import e from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/get.mjs";
2
+ import { init_lodash as t } from "../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/lodash.mjs";
3
3
  import n from "./element.mjs";
4
4
  //#region src/model_structure/tablePartial.js
5
5
  t();
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_root.cjs"),n=require("./_getNative.cjs");var r,i=e.__esmMin((()=>{n.init__getNative(),t.init__root(),r=n.default(t.default,`DataView`)}));i(),exports.default=r,Object.defineProperty(exports,"init__DataView",{enumerable:!0,get:function(){return i}});
@@ -1,7 +1,7 @@
1
- import { __esmMin as e } from "../../_virtual/_rolldown/runtime.mjs";
1
+ import { __esmMin as e } from "../../../../../_virtual/_rolldown/runtime.mjs";
2
2
  import t, { init__root as n } from "./_root.mjs";
3
3
  import r, { init__getNative as i } from "./_getNative.mjs";
4
- //#region ../../node_modules/lodash-es/_DataView.js
4
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js
5
5
  var a, o = e((() => {
6
6
  i(), n(), a = r(t, "DataView");
7
7
  }));
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_hashClear.cjs"),n=require("./_hashDelete.cjs"),r=require("./_hashGet.cjs"),i=require("./_hashHas.cjs"),a=require("./_hashSet.cjs");function o(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var s=e.__esmMin((()=>{t.init__hashClear(),n.init__hashDelete(),r.init__hashGet(),i.init__hashHas(),a.init__hashSet(),o.prototype.clear=t.default,o.prototype.delete=n.default,o.prototype.get=r.default,o.prototype.has=i.default,o.prototype.set=a.default}));s(),exports.default=o,Object.defineProperty(exports,"init__Hash",{enumerable:!0,get:function(){return s}});
@@ -1,10 +1,10 @@
1
- import { __esmMin as e } from "../../_virtual/_rolldown/runtime.mjs";
1
+ import { __esmMin as e } from "../../../../../_virtual/_rolldown/runtime.mjs";
2
2
  import t, { init__hashClear as n } from "./_hashClear.mjs";
3
3
  import r, { init__hashDelete as i } from "./_hashDelete.mjs";
4
4
  import a, { init__hashGet as o } from "./_hashGet.mjs";
5
5
  import s, { init__hashHas as c } from "./_hashHas.mjs";
6
6
  import l, { init__hashSet as u } from "./_hashSet.mjs";
7
- //#region ../../node_modules/lodash-es/_Hash.js
7
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js
8
8
  function d(e) {
9
9
  var t = -1, n = e == null ? 0 : e.length;
10
10
  for (this.clear(); ++t < n;) {
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_listCacheClear.cjs"),n=require("./_listCacheDelete.cjs"),r=require("./_listCacheGet.cjs"),i=require("./_listCacheHas.cjs"),a=require("./_listCacheSet.cjs");function o(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var s=e.__esmMin((()=>{t.init__listCacheClear(),n.init__listCacheDelete(),r.init__listCacheGet(),i.init__listCacheHas(),a.init__listCacheSet(),o.prototype.clear=t.default,o.prototype.delete=n.default,o.prototype.get=r.default,o.prototype.has=i.default,o.prototype.set=a.default}));s(),exports.default=o,Object.defineProperty(exports,"init__ListCache",{enumerable:!0,get:function(){return s}});
@@ -1,10 +1,10 @@
1
- import { __esmMin as e } from "../../_virtual/_rolldown/runtime.mjs";
1
+ import { __esmMin as e } from "../../../../../_virtual/_rolldown/runtime.mjs";
2
2
  import t, { init__listCacheClear as n } from "./_listCacheClear.mjs";
3
3
  import r, { init__listCacheDelete as i } from "./_listCacheDelete.mjs";
4
4
  import a, { init__listCacheGet as o } from "./_listCacheGet.mjs";
5
5
  import s, { init__listCacheHas as c } from "./_listCacheHas.mjs";
6
6
  import l, { init__listCacheSet as u } from "./_listCacheSet.mjs";
7
- //#region ../../node_modules/lodash-es/_ListCache.js
7
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js
8
8
  function d(e) {
9
9
  var t = -1, n = e == null ? 0 : e.length;
10
10
  for (this.clear(); ++t < n;) {
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_root.cjs"),n=require("./_getNative.cjs");var r,i=e.__esmMin((()=>{n.init__getNative(),t.init__root(),r=n.default(t.default,`Map`)}));i(),exports.default=r,Object.defineProperty(exports,"init__Map",{enumerable:!0,get:function(){return i}});
@@ -1,7 +1,7 @@
1
- import { __esmMin as e } from "../../_virtual/_rolldown/runtime.mjs";
1
+ import { __esmMin as e } from "../../../../../_virtual/_rolldown/runtime.mjs";
2
2
  import t, { init__root as n } from "./_root.mjs";
3
3
  import r, { init__getNative as i } from "./_getNative.mjs";
4
- //#region ../../node_modules/lodash-es/_Map.js
4
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Map.js
5
5
  var a, o = e((() => {
6
6
  i(), n(), a = r(t, "Map");
7
7
  }));
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_mapCacheClear.cjs"),n=require("./_mapCacheDelete.cjs"),r=require("./_mapCacheGet.cjs"),i=require("./_mapCacheHas.cjs"),a=require("./_mapCacheSet.cjs");function o(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var s=e.__esmMin((()=>{t.init__mapCacheClear(),n.init__mapCacheDelete(),r.init__mapCacheGet(),i.init__mapCacheHas(),a.init__mapCacheSet(),o.prototype.clear=t.default,o.prototype.delete=n.default,o.prototype.get=r.default,o.prototype.has=i.default,o.prototype.set=a.default}));s(),exports.default=o,Object.defineProperty(exports,"init__MapCache",{enumerable:!0,get:function(){return s}});
@@ -1,10 +1,10 @@
1
- import { __esmMin as e } from "../../_virtual/_rolldown/runtime.mjs";
1
+ import { __esmMin as e } from "../../../../../_virtual/_rolldown/runtime.mjs";
2
2
  import t, { init__mapCacheClear as n } from "./_mapCacheClear.mjs";
3
3
  import r, { init__mapCacheDelete as i } from "./_mapCacheDelete.mjs";
4
4
  import a, { init__mapCacheGet as o } from "./_mapCacheGet.mjs";
5
5
  import s, { init__mapCacheHas as c } from "./_mapCacheHas.mjs";
6
6
  import l, { init__mapCacheSet as u } from "./_mapCacheSet.mjs";
7
- //#region ../../node_modules/lodash-es/_MapCache.js
7
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js
8
8
  function d(e) {
9
9
  var t = -1, n = e == null ? 0 : e.length;
10
10
  for (this.clear(); ++t < n;) {
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_root.cjs"),n=require("./_getNative.cjs");var r,i=e.__esmMin((()=>{n.init__getNative(),t.init__root(),r=n.default(t.default,`Promise`)}));i(),exports.default=r,Object.defineProperty(exports,"init__Promise",{enumerable:!0,get:function(){return i}});
@@ -1,7 +1,7 @@
1
- import { __esmMin as e } from "../../_virtual/_rolldown/runtime.mjs";
1
+ import { __esmMin as e } from "../../../../../_virtual/_rolldown/runtime.mjs";
2
2
  import t, { init__root as n } from "./_root.mjs";
3
3
  import r, { init__getNative as i } from "./_getNative.mjs";
4
- //#region ../../node_modules/lodash-es/_Promise.js
4
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js
5
5
  var a, o = e((() => {
6
6
  i(), n(), a = r(t, "Promise");
7
7
  }));
@@ -0,0 +1 @@
1
+ const e=require("../../../../../_virtual/_rolldown/runtime.cjs"),t=require("./_root.cjs"),n=require("./_getNative.cjs");var r,i=e.__esmMin((()=>{n.init__getNative(),t.init__root(),r=n.default(t.default,`Set`)}));i(),exports.default=r,Object.defineProperty(exports,"init__Set",{enumerable:!0,get:function(){return i}});