@inlang/sdk 0.36.4 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (727) hide show
  1. package/README.md +1 -1
  2. package/dist/database/initDb.d.ts +7 -0
  3. package/dist/database/initDb.d.ts.map +1 -0
  4. package/dist/database/initDb.js +36 -0
  5. package/dist/database/initDb.js.map +1 -0
  6. package/dist/database/initDbAndSchema.test.d.ts +2 -0
  7. package/dist/database/initDbAndSchema.test.d.ts.map +1 -0
  8. package/dist/database/initDbAndSchema.test.js +110 -0
  9. package/dist/database/initDbAndSchema.test.js.map +1 -0
  10. package/dist/database/jsonbPlugin.d.ts +20 -0
  11. package/dist/database/jsonbPlugin.d.ts.map +1 -0
  12. package/dist/database/jsonbPlugin.js +183 -0
  13. package/dist/database/jsonbPlugin.js.map +1 -0
  14. package/dist/database/jsonbPlugin.test.d.ts +2 -0
  15. package/dist/database/jsonbPlugin.test.d.ts.map +1 -0
  16. package/dist/database/jsonbPlugin.test.js +119 -0
  17. package/dist/database/jsonbPlugin.test.js.map +1 -0
  18. package/dist/database/schema.d.ts +74 -0
  19. package/dist/database/schema.d.ts.map +1 -0
  20. package/dist/database/schema.js +45 -0
  21. package/dist/database/schema.js.map +1 -0
  22. package/dist/helper.d.ts +71 -0
  23. package/dist/helper.d.ts.map +1 -0
  24. package/dist/helper.js +91 -0
  25. package/dist/helper.js.map +1 -0
  26. package/dist/human-id/human-id.d.ts +3 -0
  27. package/dist/human-id/human-id.d.ts.map +1 -0
  28. package/dist/human-id/human-id.js +12 -0
  29. package/dist/human-id/human-id.js.map +1 -0
  30. package/dist/human-id/words.d.ts.map +1 -0
  31. package/dist/{storage/human-id → human-id}/words.js +4 -0
  32. package/dist/human-id/words.js.map +1 -0
  33. package/dist/human-id/words.test.d.ts.map +1 -0
  34. package/dist/{storage/human-id → human-id}/words.test.js +4 -0
  35. package/dist/human-id/words.test.js.map +1 -0
  36. package/dist/import-export/exportFiles.d.ts +11 -0
  37. package/dist/import-export/exportFiles.d.ts.map +1 -0
  38. package/dist/import-export/exportFiles.js +26 -0
  39. package/dist/import-export/exportFiles.js.map +1 -0
  40. package/dist/import-export/importFiles.d.ts +13 -0
  41. package/dist/import-export/importFiles.d.ts.map +1 -0
  42. package/dist/import-export/importFiles.js +124 -0
  43. package/dist/import-export/importFiles.js.map +1 -0
  44. package/dist/import-export/importFiles.test.d.ts +2 -0
  45. package/dist/import-export/importFiles.test.d.ts.map +1 -0
  46. package/dist/import-export/importFiles.test.js +179 -0
  47. package/dist/import-export/importFiles.test.js.map +1 -0
  48. package/dist/import-export/roundtrip.test.d.ts +2 -0
  49. package/dist/import-export/roundtrip.test.d.ts.map +1 -0
  50. package/dist/import-export/roundtrip.test.js +273 -0
  51. package/dist/import-export/roundtrip.test.js.map +1 -0
  52. package/dist/import-export/upsertBundleNestedMatchByProperties.d.ts +4 -0
  53. package/dist/import-export/upsertBundleNestedMatchByProperties.d.ts.map +1 -0
  54. package/dist/import-export/upsertBundleNestedMatchByProperties.js +58 -0
  55. package/dist/import-export/upsertBundleNestedMatchByProperties.js.map +1 -0
  56. package/dist/index.d.ts +21 -18
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +20 -17
  59. package/dist/index.js.map +1 -0
  60. package/dist/json-schema/old-v1-message/fromMessageV1.d.ts +9 -0
  61. package/dist/json-schema/old-v1-message/fromMessageV1.d.ts.map +1 -0
  62. package/dist/json-schema/old-v1-message/fromMessageV1.js +84 -0
  63. package/dist/json-schema/old-v1-message/fromMessageV1.js.map +1 -0
  64. package/dist/json-schema/old-v1-message/fromMessageV1.test.d.ts +2 -0
  65. package/dist/json-schema/old-v1-message/fromMessageV1.test.d.ts.map +1 -0
  66. package/dist/json-schema/old-v1-message/fromMessageV1.test.js +85 -0
  67. package/dist/json-schema/old-v1-message/fromMessageV1.test.js.map +1 -0
  68. package/dist/json-schema/old-v1-message/schemaV1.d.ts +86 -0
  69. package/dist/json-schema/old-v1-message/schemaV1.d.ts.map +1 -0
  70. package/dist/json-schema/old-v1-message/schemaV1.js +35 -0
  71. package/dist/json-schema/old-v1-message/schemaV1.js.map +1 -0
  72. package/dist/json-schema/old-v1-message/toMessageV1.d.ts +9 -0
  73. package/dist/json-schema/old-v1-message/toMessageV1.d.ts.map +1 -0
  74. package/dist/json-schema/old-v1-message/toMessageV1.js +67 -0
  75. package/dist/json-schema/old-v1-message/toMessageV1.js.map +1 -0
  76. package/dist/json-schema/old-v1-message/toMessageV1.test.d.ts +2 -0
  77. package/dist/json-schema/old-v1-message/toMessageV1.test.d.ts.map +1 -0
  78. package/dist/json-schema/old-v1-message/toMessageV1.test.js +85 -0
  79. package/dist/json-schema/old-v1-message/toMessageV1.test.js.map +1 -0
  80. package/dist/json-schema/pattern.d.ts +190 -0
  81. package/dist/json-schema/pattern.d.ts.map +1 -0
  82. package/dist/json-schema/pattern.js +43 -0
  83. package/dist/json-schema/pattern.js.map +1 -0
  84. package/dist/json-schema/settings.d.ts +31 -0
  85. package/dist/json-schema/settings.d.ts.map +1 -0
  86. package/dist/json-schema/settings.js +96 -0
  87. package/dist/json-schema/settings.js.map +1 -0
  88. package/dist/json-schema/settings.test-d.d.ts +2 -0
  89. package/dist/json-schema/settings.test-d.d.ts.map +1 -0
  90. package/dist/json-schema/settings.test-d.js +20 -0
  91. package/dist/json-schema/settings.test-d.js.map +1 -0
  92. package/dist/lix-plugin/applyChanges.d.ts +3 -0
  93. package/dist/lix-plugin/applyChanges.d.ts.map +1 -0
  94. package/dist/lix-plugin/applyChanges.js +127 -0
  95. package/dist/lix-plugin/applyChanges.js.map +1 -0
  96. package/dist/lix-plugin/applyChanges.test.d.ts +2 -0
  97. package/dist/lix-plugin/applyChanges.test.d.ts.map +1 -0
  98. package/dist/lix-plugin/applyChanges.test.js +135 -0
  99. package/dist/lix-plugin/applyChanges.test.js.map +1 -0
  100. package/dist/lix-plugin/detectConflicts.d.ts +3 -0
  101. package/dist/lix-plugin/detectConflicts.d.ts.map +1 -0
  102. package/dist/lix-plugin/detectConflicts.js +47 -0
  103. package/dist/lix-plugin/detectConflicts.js.map +1 -0
  104. package/dist/lix-plugin/detectConflicts.test.d.ts +2 -0
  105. package/dist/lix-plugin/detectConflicts.test.d.ts.map +1 -0
  106. package/dist/lix-plugin/detectConflicts.test.js +251 -0
  107. package/dist/lix-plugin/detectConflicts.test.js.map +1 -0
  108. package/dist/lix-plugin/inlangLixPluginV1.d.ts +8 -0
  109. package/dist/lix-plugin/inlangLixPluginV1.d.ts.map +1 -0
  110. package/dist/lix-plugin/inlangLixPluginV1.js +109 -0
  111. package/dist/lix-plugin/inlangLixPluginV1.js.map +1 -0
  112. package/dist/lix-plugin/inlangLixPluginV1.test.d.ts +2 -0
  113. package/dist/lix-plugin/inlangLixPluginV1.test.d.ts.map +1 -0
  114. package/dist/lix-plugin/inlangLixPluginV1.test.js +418 -0
  115. package/dist/lix-plugin/inlangLixPluginV1.test.js.map +1 -0
  116. package/dist/lix-plugin/merge.test.d.ts +2 -0
  117. package/dist/lix-plugin/merge.test.d.ts.map +1 -0
  118. package/dist/lix-plugin/merge.test.js +120 -0
  119. package/dist/lix-plugin/merge.test.js.map +1 -0
  120. package/dist/lix-plugin/resolveConflictBySelecting.test.d.ts +2 -0
  121. package/dist/lix-plugin/resolveConflictBySelecting.test.d.ts.map +1 -0
  122. package/dist/lix-plugin/resolveConflictBySelecting.test.js +176 -0
  123. package/dist/lix-plugin/resolveConflictBySelecting.test.js.map +1 -0
  124. package/dist/migrations/v2/createMessageV1.d.ts +28 -0
  125. package/dist/migrations/v2/createMessageV1.d.ts.map +1 -0
  126. package/dist/migrations/v2/createMessageV1.js +31 -0
  127. package/dist/migrations/v2/createMessageV1.js.map +1 -0
  128. package/dist/migrations/v2/withLanguageTagToLocaleMigration.d.ts +9 -0
  129. package/dist/migrations/v2/withLanguageTagToLocaleMigration.d.ts.map +1 -0
  130. package/dist/migrations/v2/withLanguageTagToLocaleMigration.js +31 -0
  131. package/dist/migrations/v2/withLanguageTagToLocaleMigration.js.map +1 -0
  132. package/dist/migrations/v2/withLanguageTagToLocaleMigration.test.d.ts +2 -0
  133. package/dist/migrations/v2/withLanguageTagToLocaleMigration.test.d.ts.map +1 -0
  134. package/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js +45 -0
  135. package/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js.map +1 -0
  136. package/dist/plugin/cache.d.ts +6 -0
  137. package/dist/plugin/cache.d.ts.map +1 -0
  138. package/dist/plugin/cache.js +59 -0
  139. package/dist/plugin/cache.js.map +1 -0
  140. package/dist/plugin/cache.test.d.ts +2 -0
  141. package/dist/plugin/cache.test.d.ts.map +1 -0
  142. package/dist/plugin/cache.test.js +61 -0
  143. package/dist/plugin/cache.test.js.map +1 -0
  144. package/dist/plugin/errors.d.ts +41 -0
  145. package/dist/plugin/errors.d.ts.map +1 -0
  146. package/dist/plugin/errors.js +48 -0
  147. package/dist/plugin/errors.js.map +1 -0
  148. package/dist/plugin/importPlugins.d.ts +19 -0
  149. package/dist/plugin/importPlugins.d.ts.map +1 -0
  150. package/dist/plugin/importPlugins.js +43 -0
  151. package/dist/plugin/importPlugins.js.map +1 -0
  152. package/dist/plugin/importPlugins.test.d.ts +2 -0
  153. package/dist/plugin/importPlugins.test.d.ts.map +1 -0
  154. package/dist/plugin/importPlugins.test.js +95 -0
  155. package/dist/plugin/importPlugins.test.js.map +1 -0
  156. package/dist/plugin/meta/ideExtension.d.ts +54 -0
  157. package/dist/plugin/meta/ideExtension.d.ts.map +1 -0
  158. package/dist/plugin/meta/ideExtension.js +5 -0
  159. package/dist/plugin/meta/ideExtension.js.map +1 -0
  160. package/dist/plugin/schema.d.ts +152 -0
  161. package/dist/plugin/schema.d.ts.map +1 -0
  162. package/dist/plugin/schema.js +5 -0
  163. package/dist/plugin/schema.js.map +1 -0
  164. package/dist/project/api.d.ts +74 -0
  165. package/dist/project/api.d.ts.map +1 -0
  166. package/dist/project/api.js +5 -0
  167. package/dist/project/api.js.map +1 -0
  168. package/dist/project/initHandleSaveToLixOnChange.d.ts +14 -0
  169. package/dist/project/initHandleSaveToLixOnChange.d.ts.map +1 -0
  170. package/dist/project/initHandleSaveToLixOnChange.js +87 -0
  171. package/dist/project/initHandleSaveToLixOnChange.js.map +1 -0
  172. package/dist/project/loadProject.d.ts +53 -0
  173. package/dist/project/loadProject.d.ts.map +1 -0
  174. package/dist/project/loadProject.js +168 -0
  175. package/dist/project/loadProject.js.map +1 -0
  176. package/dist/project/loadProject.test.d.ts.map +1 -0
  177. package/dist/project/loadProject.test.js +146 -0
  178. package/dist/project/loadProject.test.js.map +1 -0
  179. package/dist/project/loadProjectFromDirectory.d.ts +77 -0
  180. package/dist/project/loadProjectFromDirectory.d.ts.map +1 -0
  181. package/dist/project/loadProjectFromDirectory.js +584 -0
  182. package/dist/project/loadProjectFromDirectory.js.map +1 -0
  183. package/dist/project/loadProjectFromDirectory.test.d.ts +2 -0
  184. package/dist/project/loadProjectFromDirectory.test.d.ts.map +1 -0
  185. package/dist/project/loadProjectFromDirectory.test.js +663 -0
  186. package/dist/project/loadProjectFromDirectory.test.js.map +1 -0
  187. package/dist/project/loadProjectInMemory.d.ts +8 -0
  188. package/dist/project/loadProjectInMemory.d.ts.map +1 -0
  189. package/dist/project/loadProjectInMemory.js +32 -0
  190. package/dist/project/loadProjectInMemory.js.map +1 -0
  191. package/dist/project/loadProjectInMemory.test.d.ts +2 -0
  192. package/dist/project/loadProjectInMemory.test.d.ts.map +1 -0
  193. package/dist/project/loadProjectInMemory.test.js +27 -0
  194. package/dist/project/loadProjectInMemory.test.js.map +1 -0
  195. package/dist/project/maybeCaptureTelemetry.d.ts +15 -0
  196. package/dist/project/maybeCaptureTelemetry.d.ts.map +1 -0
  197. package/dist/project/maybeCaptureTelemetry.js +58 -0
  198. package/dist/project/maybeCaptureTelemetry.js.map +1 -0
  199. package/dist/project/maybeCaptureTelemetry.test.d.ts +2 -0
  200. package/dist/project/maybeCaptureTelemetry.test.d.ts.map +1 -0
  201. package/dist/project/maybeCaptureTelemetry.test.js +71 -0
  202. package/dist/project/maybeCaptureTelemetry.test.js.map +1 -0
  203. package/dist/project/newProject.d.ts +17 -0
  204. package/dist/project/newProject.d.ts.map +1 -0
  205. package/dist/project/newProject.js +71 -0
  206. package/dist/project/newProject.js.map +1 -0
  207. package/dist/project/newProject.test.d.ts +2 -0
  208. package/dist/project/newProject.test.d.ts.map +1 -0
  209. package/dist/project/newProject.test.js +37 -0
  210. package/dist/project/newProject.test.js.map +1 -0
  211. package/dist/project/saveProjectToDirectory.d.ts +8 -0
  212. package/dist/project/saveProjectToDirectory.d.ts.map +1 -0
  213. package/dist/project/saveProjectToDirectory.js +86 -0
  214. package/dist/project/saveProjectToDirectory.js.map +1 -0
  215. package/dist/project/saveProjectToDirectory.test.d.ts +2 -0
  216. package/dist/project/saveProjectToDirectory.test.d.ts.map +1 -0
  217. package/dist/project/saveProjectToDirectory.test.js +245 -0
  218. package/dist/project/saveProjectToDirectory.test.js.map +1 -0
  219. package/dist/project/state/id$.d.ts +6 -0
  220. package/dist/project/state/id$.d.ts.map +1 -0
  221. package/dist/project/state/id$.js +19 -0
  222. package/dist/project/state/id$.js.map +1 -0
  223. package/dist/project/state/id$.test.d.ts +2 -0
  224. package/dist/project/state/id$.test.d.ts.map +1 -0
  225. package/dist/project/state/id$.test.js +36 -0
  226. package/dist/project/state/id$.test.js.map +1 -0
  227. package/dist/project/state/setSettings.d.ts +7 -0
  228. package/dist/project/state/setSettings.d.ts.map +1 -0
  229. package/dist/project/state/setSettings.js +16 -0
  230. package/dist/project/state/setSettings.js.map +1 -0
  231. package/dist/project/state/setSettings.test.d.ts +2 -0
  232. package/dist/project/state/setSettings.test.d.ts.map +1 -0
  233. package/dist/project/state/setSettings.test.js +58 -0
  234. package/dist/project/state/setSettings.test.js.map +1 -0
  235. package/dist/project/state/settings$.d.ts +7 -0
  236. package/dist/project/state/settings$.d.ts.map +1 -0
  237. package/dist/project/state/settings$.js +21 -0
  238. package/dist/project/state/settings$.js.map +1 -0
  239. package/dist/project/state/settings$.test.d.ts +2 -0
  240. package/dist/project/state/settings$.test.d.ts.map +1 -0
  241. package/dist/project/state/settings$.test.js +51 -0
  242. package/dist/project/state/settings$.test.js.map +1 -0
  243. package/dist/project/state/state.d.ts +58 -0
  244. package/dist/project/state/state.d.ts.map +1 -0
  245. package/dist/project/state/state.js +67 -0
  246. package/dist/project/state/state.js.map +1 -0
  247. package/dist/project/state/state.test.d.ts +2 -0
  248. package/dist/project/state/state.test.d.ts.map +1 -0
  249. package/dist/project/state/state.test.js +103 -0
  250. package/dist/project/state/state.test.js.map +1 -0
  251. package/dist/query-utilities/index.d.ts +5 -0
  252. package/dist/query-utilities/index.d.ts.map +1 -0
  253. package/dist/query-utilities/index.js +8 -0
  254. package/dist/query-utilities/index.js.map +1 -0
  255. package/dist/query-utilities/insertBundleNested.d.ts +4 -0
  256. package/dist/query-utilities/insertBundleNested.d.ts.map +1 -0
  257. package/dist/query-utilities/insertBundleNested.js +39 -0
  258. package/dist/query-utilities/insertBundleNested.js.map +1 -0
  259. package/dist/query-utilities/pollQuery.d.ts +14 -0
  260. package/dist/query-utilities/pollQuery.d.ts.map +1 -0
  261. package/dist/query-utilities/pollQuery.js +22 -0
  262. package/dist/query-utilities/pollQuery.js.map +1 -0
  263. package/dist/query-utilities/pollQuery.test.d.ts +2 -0
  264. package/dist/query-utilities/pollQuery.test.d.ts.map +1 -0
  265. package/dist/query-utilities/pollQuery.test.js +67 -0
  266. package/dist/query-utilities/pollQuery.test.js.map +1 -0
  267. package/dist/query-utilities/selectBundleNested.d.ts +107 -0
  268. package/dist/query-utilities/selectBundleNested.d.ts.map +1 -0
  269. package/dist/query-utilities/selectBundleNested.js +43 -0
  270. package/dist/query-utilities/selectBundleNested.js.map +1 -0
  271. package/dist/query-utilities/updateBundleNested.d.ts +12 -0
  272. package/dist/query-utilities/updateBundleNested.d.ts.map +1 -0
  273. package/dist/query-utilities/updateBundleNested.js +25 -0
  274. package/dist/query-utilities/updateBundleNested.js.map +1 -0
  275. package/dist/query-utilities/upsertBundleNested.d.ts +4 -0
  276. package/dist/query-utilities/upsertBundleNested.d.ts.map +1 -0
  277. package/dist/query-utilities/upsertBundleNested.js +50 -0
  278. package/dist/query-utilities/upsertBundleNested.js.map +1 -0
  279. package/dist/services/env-variables/index.d.ts +6 -0
  280. package/dist/services/env-variables/index.d.ts.map +1 -0
  281. package/dist/services/env-variables/index.js +9 -0
  282. package/dist/services/env-variables/index.js.map +1 -0
  283. package/dist/services/error-reporting/index.d.ts +15 -0
  284. package/dist/services/error-reporting/index.d.ts.map +1 -0
  285. package/dist/services/error-reporting/index.js +30 -0
  286. package/dist/services/error-reporting/index.js.map +1 -0
  287. package/dist/{telemetry → services/telemetry}/capture.d.ts +5 -2
  288. package/dist/services/telemetry/capture.d.ts.map +1 -0
  289. package/dist/services/telemetry/capture.js +76 -0
  290. package/dist/services/telemetry/capture.js.map +1 -0
  291. package/dist/services/telemetry/capture.test.d.ts +2 -0
  292. package/dist/services/telemetry/capture.test.d.ts.map +1 -0
  293. package/dist/services/telemetry/capture.test.js +46 -0
  294. package/dist/services/telemetry/capture.test.js.map +1 -0
  295. package/dist/utilities/detectJsonFormatting.d.ts +11 -0
  296. package/dist/utilities/detectJsonFormatting.d.ts.map +1 -0
  297. package/dist/utilities/detectJsonFormatting.js +83 -0
  298. package/dist/utilities/detectJsonFormatting.js.map +1 -0
  299. package/dist/utilities/detectJsonFormatting.test.d.ts +2 -0
  300. package/dist/utilities/detectJsonFormatting.test.d.ts.map +1 -0
  301. package/dist/utilities/detectJsonFormatting.test.js +33 -0
  302. package/dist/utilities/detectJsonFormatting.test.js.map +1 -0
  303. package/package.json +32 -40
  304. package/src/database/initDb.ts +34 -0
  305. package/src/database/initDbAndSchema.test.ts +125 -0
  306. package/src/database/jsonbPlugin.test.ts +154 -0
  307. package/src/database/jsonbPlugin.ts +215 -0
  308. package/src/database/schema.ts +127 -0
  309. package/src/helper.ts +113 -0
  310. package/src/human-id/human-id.ts +14 -0
  311. package/src/{storage/human-id → human-id}/words.test.ts +14 -14
  312. package/src/{storage/human-id → human-id}/words.ts +4 -4
  313. package/src/import-export/exportFiles.ts +36 -0
  314. package/src/import-export/importFiles.test.ts +211 -0
  315. package/src/import-export/importFiles.ts +142 -0
  316. package/src/import-export/roundtrip.test.ts +313 -0
  317. package/src/import-export/upsertBundleNestedMatchByProperties.ts +74 -0
  318. package/src/index.ts +29 -37
  319. package/src/json-schema/old-v1-message/README.md +1 -0
  320. package/src/json-schema/old-v1-message/fromMessageV1.test.ts +87 -0
  321. package/src/json-schema/old-v1-message/fromMessageV1.ts +99 -0
  322. package/src/json-schema/old-v1-message/schemaV1.ts +66 -0
  323. package/src/json-schema/old-v1-message/toMessageV1.test.ts +87 -0
  324. package/src/json-schema/old-v1-message/toMessageV1.ts +79 -0
  325. package/src/json-schema/pattern.ts +59 -0
  326. package/src/json-schema/settings.test-d.ts +21 -0
  327. package/src/json-schema/settings.ts +138 -0
  328. package/src/lix-plugin/applyChanges.test.ts +150 -0
  329. package/src/lix-plugin/applyChanges.ts +171 -0
  330. package/src/lix-plugin/detectConflicts.test.ts +286 -0
  331. package/src/lix-plugin/detectConflicts.ts +62 -0
  332. package/src/lix-plugin/inlangLixPluginV1.test.ts +439 -0
  333. package/src/lix-plugin/inlangLixPluginV1.ts +132 -0
  334. package/src/lix-plugin/merge.test.ts +133 -0
  335. package/src/lix-plugin/resolveConflictBySelecting.test.ts +188 -0
  336. package/src/migrations/v2/createMessageV1.ts +37 -0
  337. package/src/migrations/v2/withLanguageTagToLocaleMigration.test.ts +51 -0
  338. package/src/migrations/v2/withLanguageTagToLocaleMigration.ts +31 -0
  339. package/src/plugin/cache.test.ts +83 -0
  340. package/src/plugin/cache.ts +79 -0
  341. package/src/plugin/errors.ts +67 -0
  342. package/src/plugin/importPlugins.test.ts +107 -0
  343. package/src/plugin/importPlugins.ts +60 -0
  344. package/src/plugin/meta/ideExtension.ts +56 -0
  345. package/src/plugin/schema.ts +165 -0
  346. package/src/project/api.ts +77 -0
  347. package/src/project/initHandleSaveToLixOnChange.ts +93 -0
  348. package/src/project/loadProject.test.ts +176 -0
  349. package/src/project/loadProject.ts +246 -0
  350. package/src/project/loadProjectFromDirectory.test.ts +854 -0
  351. package/src/project/loadProjectFromDirectory.ts +752 -0
  352. package/src/project/loadProjectInMemory.test.ts +29 -0
  353. package/src/project/loadProjectInMemory.ts +36 -0
  354. package/src/project/maybeCaptureTelemetry.test.ts +79 -0
  355. package/src/project/maybeCaptureTelemetry.ts +69 -0
  356. package/src/project/newProject.test.ts +36 -0
  357. package/src/project/newProject.ts +78 -0
  358. package/src/project/saveProjectToDirectory.test.ts +310 -0
  359. package/src/project/saveProjectToDirectory.ts +100 -0
  360. package/src/query-utilities/index.ts +4 -0
  361. package/src/query-utilities/insertBundleNested.ts +46 -0
  362. package/src/query-utilities/selectBundleNested.ts +46 -0
  363. package/src/query-utilities/updateBundleNested.ts +35 -0
  364. package/src/query-utilities/upsertBundleNested.ts +61 -0
  365. package/src/services/env-variables/createIndexFile.js +40 -0
  366. package/src/{env-variables → services/env-variables}/index.d.ts +8 -5
  367. package/src/services/error-reporting/index.ts +28 -0
  368. package/src/services/telemetry/capture.test.ts +50 -0
  369. package/src/services/telemetry/capture.ts +99 -0
  370. package/src/utilities/detectJsonFormatting.test.ts +38 -0
  371. package/src/utilities/detectJsonFormatting.ts +109 -0
  372. package/dist/adapter/solidAdapter.d.ts +0 -33
  373. package/dist/adapter/solidAdapter.d.ts.map +0 -1
  374. package/dist/adapter/solidAdapter.js +0 -40
  375. package/dist/adapter/solidAdapter.test.d.ts +0 -2
  376. package/dist/adapter/solidAdapter.test.d.ts.map +0 -1
  377. package/dist/adapter/solidAdapter.test.js +0 -356
  378. package/dist/api.d.ts +0 -113
  379. package/dist/api.d.ts.map +0 -1
  380. package/dist/api.js +0 -1
  381. package/dist/api.test-d.d.ts +0 -2
  382. package/dist/api.test-d.d.ts.map +0 -1
  383. package/dist/api.test-d.js +0 -4
  384. package/dist/createMessageLintReportsQuery.d.ts +0 -12
  385. package/dist/createMessageLintReportsQuery.d.ts.map +0 -1
  386. package/dist/createMessageLintReportsQuery.js +0 -176
  387. package/dist/createMessagesQuery.d.ts +0 -19
  388. package/dist/createMessagesQuery.d.ts.map +0 -1
  389. package/dist/createMessagesQuery.js +0 -451
  390. package/dist/createMessagesQuery.test.d.ts +0 -2
  391. package/dist/createMessagesQuery.test.d.ts.map +0 -1
  392. package/dist/createMessagesQuery.test.js +0 -402
  393. package/dist/createNewProject.d.ts +0 -12
  394. package/dist/createNewProject.d.ts.map +0 -1
  395. package/dist/createNewProject.js +0 -38
  396. package/dist/createNewProject.test.d.ts +0 -2
  397. package/dist/createNewProject.test.d.ts.map +0 -1
  398. package/dist/createNewProject.test.js +0 -91
  399. package/dist/createNodeishFsWithAbsolutePaths.d.ts +0 -12
  400. package/dist/createNodeishFsWithAbsolutePaths.d.ts.map +0 -1
  401. package/dist/createNodeishFsWithAbsolutePaths.js +0 -38
  402. package/dist/createNodeishFsWithAbsolutePaths.test.d.ts +0 -2
  403. package/dist/createNodeishFsWithAbsolutePaths.test.d.ts.map +0 -1
  404. package/dist/createNodeishFsWithAbsolutePaths.test.js +0 -44
  405. package/dist/createNodeishFsWithWatcher.d.ts +0 -14
  406. package/dist/createNodeishFsWithWatcher.d.ts.map +0 -1
  407. package/dist/createNodeishFsWithWatcher.js +0 -75
  408. package/dist/createNodeishFsWithWatcher.test.d.ts +0 -2
  409. package/dist/createNodeishFsWithWatcher.test.d.ts.map +0 -1
  410. package/dist/createNodeishFsWithWatcher.test.js +0 -38
  411. package/dist/defaultProjectSettings.d.ts +0 -14
  412. package/dist/defaultProjectSettings.d.ts.map +0 -1
  413. package/dist/defaultProjectSettings.js +0 -22
  414. package/dist/env-variables/index.d.ts +0 -4
  415. package/dist/env-variables/index.d.ts.map +0 -1
  416. package/dist/env-variables/index.js +0 -3
  417. package/dist/errors.d.ts +0 -48
  418. package/dist/errors.d.ts.map +0 -1
  419. package/dist/errors.js +0 -62
  420. package/dist/lint/index.d.ts +0 -3
  421. package/dist/lint/index.d.ts.map +0 -1
  422. package/dist/lint/index.js +0 -2
  423. package/dist/lint/message/errors.d.ts +0 -7
  424. package/dist/lint/message/errors.d.ts.map +0 -1
  425. package/dist/lint/message/errors.js +0 -9
  426. package/dist/lint/message/lintMessages.d.ts +0 -13
  427. package/dist/lint/message/lintMessages.d.ts.map +0 -1
  428. package/dist/lint/message/lintMessages.js +0 -12
  429. package/dist/lint/message/lintMessages.test.d.ts +0 -2
  430. package/dist/lint/message/lintMessages.test.d.ts.map +0 -1
  431. package/dist/lint/message/lintMessages.test.js +0 -107
  432. package/dist/lint/message/lintSingleMessage.d.ts +0 -19
  433. package/dist/lint/message/lintSingleMessage.d.ts.map +0 -1
  434. package/dist/lint/message/lintSingleMessage.js +0 -38
  435. package/dist/lint/message/lintSingleMessage.test.d.ts +0 -2
  436. package/dist/lint/message/lintSingleMessage.test.d.ts.map +0 -1
  437. package/dist/lint/message/lintSingleMessage.test.js +0 -161
  438. package/dist/listProjects.d.ts +0 -5
  439. package/dist/listProjects.d.ts.map +0 -1
  440. package/dist/listProjects.js +0 -38
  441. package/dist/listProjects.test.d.ts +0 -2
  442. package/dist/listProjects.test.d.ts.map +0 -1
  443. package/dist/listProjects.test.js +0 -72
  444. package/dist/loadProject.d.ts +0 -19
  445. package/dist/loadProject.d.ts.map +0 -1
  446. package/dist/loadProject.js +0 -343
  447. package/dist/loadProject.test.d.ts.map +0 -1
  448. package/dist/loadProject.test.js +0 -975
  449. package/dist/messages/errors.d.ts +0 -13
  450. package/dist/messages/errors.d.ts.map +0 -1
  451. package/dist/messages/errors.js +0 -18
  452. package/dist/messages/index.d.ts +0 -3
  453. package/dist/messages/index.d.ts.map +0 -1
  454. package/dist/messages/index.js +0 -2
  455. package/dist/messages/variant.d.ts +0 -46
  456. package/dist/messages/variant.d.ts.map +0 -1
  457. package/dist/messages/variant.js +0 -176
  458. package/dist/messages/variant.test.d.ts +0 -2
  459. package/dist/messages/variant.test.d.ts.map +0 -1
  460. package/dist/messages/variant.test.js +0 -439
  461. package/dist/migrations/maybeAddModuleCache.d.ts +0 -6
  462. package/dist/migrations/maybeAddModuleCache.d.ts.map +0 -1
  463. package/dist/migrations/maybeAddModuleCache.js +0 -62
  464. package/dist/migrations/maybeCreateFirstProjectId.d.ts +0 -16
  465. package/dist/migrations/maybeCreateFirstProjectId.d.ts.map +0 -1
  466. package/dist/migrations/maybeCreateFirstProjectId.js +0 -46
  467. package/dist/migrations/maybeCreateFirstProjectId.test.d.ts +0 -2
  468. package/dist/migrations/maybeCreateFirstProjectId.test.d.ts.map +0 -1
  469. package/dist/migrations/maybeCreateFirstProjectId.test.js +0 -24
  470. package/dist/migrations/migrateToDirectory.d.ts +0 -10
  471. package/dist/migrations/migrateToDirectory.d.ts.map +0 -1
  472. package/dist/migrations/migrateToDirectory.js +0 -48
  473. package/dist/migrations/migrateToDirectory.test.d.ts +0 -2
  474. package/dist/migrations/migrateToDirectory.test.d.ts.map +0 -1
  475. package/dist/migrations/migrateToDirectory.test.js +0 -48
  476. package/dist/parseConfig.d.ts +0 -8
  477. package/dist/parseConfig.d.ts.map +0 -1
  478. package/dist/parseConfig.js +0 -26
  479. package/dist/persistence/batchedIO.d.ts +0 -11
  480. package/dist/persistence/batchedIO.d.ts.map +0 -1
  481. package/dist/persistence/batchedIO.js +0 -49
  482. package/dist/persistence/batchedIO.test.d.ts +0 -2
  483. package/dist/persistence/batchedIO.test.d.ts.map +0 -1
  484. package/dist/persistence/batchedIO.test.js +0 -56
  485. package/dist/persistence/filelock/acquireFileLock.d.ts +0 -3
  486. package/dist/persistence/filelock/acquireFileLock.d.ts.map +0 -1
  487. package/dist/persistence/filelock/acquireFileLock.js +0 -111
  488. package/dist/persistence/filelock/releaseLock.d.ts +0 -3
  489. package/dist/persistence/filelock/releaseLock.d.ts.map +0 -1
  490. package/dist/persistence/filelock/releaseLock.js +0 -24
  491. package/dist/persistence/store.d.ts +0 -107
  492. package/dist/persistence/store.d.ts.map +0 -1
  493. package/dist/persistence/store.js +0 -99
  494. package/dist/persistence/store.test.d.ts +0 -2
  495. package/dist/persistence/store.test.d.ts.map +0 -1
  496. package/dist/persistence/store.test.js +0 -79
  497. package/dist/persistence/storeApi.d.ts +0 -22
  498. package/dist/persistence/storeApi.d.ts.map +0 -1
  499. package/dist/persistence/storeApi.js +0 -1
  500. package/dist/reactivity/map.d.ts +0 -67
  501. package/dist/reactivity/map.d.ts.map +0 -1
  502. package/dist/reactivity/map.js +0 -143
  503. package/dist/reactivity/solid.d.ts +0 -14
  504. package/dist/reactivity/solid.d.ts.map +0 -1
  505. package/dist/reactivity/solid.js +0 -15
  506. package/dist/reactivity/solid.test.d.ts +0 -2
  507. package/dist/reactivity/solid.test.d.ts.map +0 -1
  508. package/dist/reactivity/solid.test.js +0 -189
  509. package/dist/reactivity/trigger.d.ts +0 -11
  510. package/dist/reactivity/trigger.d.ts.map +0 -1
  511. package/dist/reactivity/trigger.js +0 -46
  512. package/dist/resolve-modules/cache.d.ts +0 -6
  513. package/dist/resolve-modules/cache.d.ts.map +0 -1
  514. package/dist/resolve-modules/cache.js +0 -58
  515. package/dist/resolve-modules/errors.d.ts +0 -41
  516. package/dist/resolve-modules/errors.d.ts.map +0 -1
  517. package/dist/resolve-modules/errors.js +0 -45
  518. package/dist/resolve-modules/import.d.ts +0 -19
  519. package/dist/resolve-modules/import.d.ts.map +0 -1
  520. package/dist/resolve-modules/import.js +0 -102
  521. package/dist/resolve-modules/import.test.d.ts +0 -2
  522. package/dist/resolve-modules/import.test.d.ts.map +0 -1
  523. package/dist/resolve-modules/import.test.js +0 -47
  524. package/dist/resolve-modules/index.d.ts +0 -3
  525. package/dist/resolve-modules/index.d.ts.map +0 -1
  526. package/dist/resolve-modules/index.js +0 -2
  527. package/dist/resolve-modules/message-lint-rules/errors.d.ts +0 -9
  528. package/dist/resolve-modules/message-lint-rules/errors.d.ts.map +0 -1
  529. package/dist/resolve-modules/message-lint-rules/errors.js +0 -6
  530. package/dist/resolve-modules/message-lint-rules/resolveMessageLintRules.d.ts +0 -9
  531. package/dist/resolve-modules/message-lint-rules/resolveMessageLintRules.d.ts.map +0 -1
  532. package/dist/resolve-modules/message-lint-rules/resolveMessageLintRules.js +0 -24
  533. package/dist/resolve-modules/plugins/errors.d.ts +0 -33
  534. package/dist/resolve-modules/plugins/errors.d.ts.map +0 -1
  535. package/dist/resolve-modules/plugins/errors.js +0 -38
  536. package/dist/resolve-modules/plugins/resolvePlugins.d.ts +0 -3
  537. package/dist/resolve-modules/plugins/resolvePlugins.d.ts.map +0 -1
  538. package/dist/resolve-modules/plugins/resolvePlugins.js +0 -92
  539. package/dist/resolve-modules/plugins/resolvePlugins.test.d.ts +0 -2
  540. package/dist/resolve-modules/plugins/resolvePlugins.test.d.ts.map +0 -1
  541. package/dist/resolve-modules/plugins/resolvePlugins.test.js +0 -252
  542. package/dist/resolve-modules/plugins/types.d.ts +0 -57
  543. package/dist/resolve-modules/plugins/types.d.ts.map +0 -1
  544. package/dist/resolve-modules/plugins/types.js +0 -1
  545. package/dist/resolve-modules/plugins/types.test.d.ts +0 -2
  546. package/dist/resolve-modules/plugins/types.test.d.ts.map +0 -1
  547. package/dist/resolve-modules/plugins/types.test.js +0 -45
  548. package/dist/resolve-modules/resolveModules.d.ts +0 -3
  549. package/dist/resolve-modules/resolveModules.d.ts.map +0 -1
  550. package/dist/resolve-modules/resolveModules.js +0 -80
  551. package/dist/resolve-modules/resolveModules.test.d.ts +0 -2
  552. package/dist/resolve-modules/resolveModules.test.d.ts.map +0 -1
  553. package/dist/resolve-modules/resolveModules.test.js +0 -185
  554. package/dist/resolve-modules/types.d.ts +0 -63
  555. package/dist/resolve-modules/types.d.ts.map +0 -1
  556. package/dist/resolve-modules/types.js +0 -1
  557. package/dist/resolve-modules/validateModuleSettings.test.d.ts +0 -2
  558. package/dist/resolve-modules/validateModuleSettings.test.d.ts.map +0 -1
  559. package/dist/resolve-modules/validateModuleSettings.test.js +0 -71
  560. package/dist/resolve-modules/validatedModuleSettings.d.ts +0 -7
  561. package/dist/resolve-modules/validatedModuleSettings.d.ts.map +0 -1
  562. package/dist/resolve-modules/validatedModuleSettings.js +0 -11
  563. package/dist/storage/helper.d.ts +0 -11
  564. package/dist/storage/helper.d.ts.map +0 -1
  565. package/dist/storage/helper.js +0 -63
  566. package/dist/storage/helpers.test.d.ts +0 -2
  567. package/dist/storage/helpers.test.d.ts.map +0 -1
  568. package/dist/storage/helpers.test.js +0 -84
  569. package/dist/storage/human-id/human-readable-id.d.ts +0 -3
  570. package/dist/storage/human-id/human-readable-id.d.ts.map +0 -1
  571. package/dist/storage/human-id/human-readable-id.js +0 -20
  572. package/dist/storage/human-id/words.d.ts.map +0 -1
  573. package/dist/storage/human-id/words.test.d.ts.map +0 -1
  574. package/dist/telemetry/capture.d.ts.map +0 -1
  575. package/dist/telemetry/capture.js +0 -39
  576. package/dist/telemetry/groupIdentify.d.ts +0 -13
  577. package/dist/telemetry/groupIdentify.d.ts.map +0 -1
  578. package/dist/telemetry/groupIdentify.js +0 -35
  579. package/dist/test-utilities/createMessage.d.ts +0 -18
  580. package/dist/test-utilities/createMessage.d.ts.map +0 -1
  581. package/dist/test-utilities/createMessage.js +0 -17
  582. package/dist/test-utilities/createMessage.test.d.ts +0 -2
  583. package/dist/test-utilities/createMessage.test.d.ts.map +0 -1
  584. package/dist/test-utilities/createMessage.test.js +0 -106
  585. package/dist/test-utilities/index.d.ts +0 -3
  586. package/dist/test-utilities/index.d.ts.map +0 -1
  587. package/dist/test-utilities/index.js +0 -2
  588. package/dist/test-utilities/sleep.d.ts +0 -4
  589. package/dist/test-utilities/sleep.d.ts.map +0 -1
  590. package/dist/test-utilities/sleep.js +0 -9
  591. package/dist/v2/helper.d.ts +0 -43
  592. package/dist/v2/helper.d.ts.map +0 -1
  593. package/dist/v2/helper.js +0 -75
  594. package/dist/v2/helper.test.d.ts +0 -2
  595. package/dist/v2/helper.test.d.ts.map +0 -1
  596. package/dist/v2/helper.test.js +0 -92
  597. package/dist/v2/index.d.ts +0 -4
  598. package/dist/v2/index.d.ts.map +0 -1
  599. package/dist/v2/index.js +0 -2
  600. package/dist/v2/mocks/index.d.ts +0 -3
  601. package/dist/v2/mocks/index.d.ts.map +0 -1
  602. package/dist/v2/mocks/index.js +0 -2
  603. package/dist/v2/mocks/multipleMatcher/bundle.d.ts +0 -3
  604. package/dist/v2/mocks/multipleMatcher/bundle.d.ts.map +0 -1
  605. package/dist/v2/mocks/multipleMatcher/bundle.js +0 -194
  606. package/dist/v2/mocks/multipleMatcher/bundle.test.d.ts +0 -2
  607. package/dist/v2/mocks/multipleMatcher/bundle.test.d.ts.map +0 -1
  608. package/dist/v2/mocks/multipleMatcher/bundle.test.js +0 -10
  609. package/dist/v2/mocks/plural/bundle.d.ts +0 -3
  610. package/dist/v2/mocks/plural/bundle.d.ts.map +0 -1
  611. package/dist/v2/mocks/plural/bundle.js +0 -162
  612. package/dist/v2/mocks/plural/bundle.test.d.ts +0 -2
  613. package/dist/v2/mocks/plural/bundle.test.d.ts.map +0 -1
  614. package/dist/v2/mocks/plural/bundle.test.js +0 -15
  615. package/dist/v2/shim.d.ts +0 -12
  616. package/dist/v2/shim.d.ts.map +0 -1
  617. package/dist/v2/shim.js +0 -151
  618. package/dist/v2/shim.test.d.ts +0 -2
  619. package/dist/v2/shim.test.d.ts.map +0 -1
  620. package/dist/v2/shim.test.js +0 -49
  621. package/dist/v2/stubQueryApi.d.ts +0 -9
  622. package/dist/v2/stubQueryApi.d.ts.map +0 -1
  623. package/dist/v2/stubQueryApi.js +0 -38
  624. package/dist/v2/types.d.ts +0 -521
  625. package/dist/v2/types.d.ts.map +0 -1
  626. package/dist/v2/types.js +0 -78
  627. package/dist/validateProjectPath.d.ts +0 -17
  628. package/dist/validateProjectPath.d.ts.map +0 -1
  629. package/dist/validateProjectPath.js +0 -31
  630. package/dist/validateProjectPath.test.d.ts +0 -2
  631. package/dist/validateProjectPath.test.d.ts.map +0 -1
  632. package/dist/validateProjectPath.test.js +0 -40
  633. package/dist/versionedInterfaces.d.ts +0 -8
  634. package/dist/versionedInterfaces.d.ts.map +0 -1
  635. package/dist/versionedInterfaces.js +0 -8
  636. package/src/adapter/solidAdapter.test.ts +0 -472
  637. package/src/adapter/solidAdapter.ts +0 -79
  638. package/src/api.test-d.ts +0 -8
  639. package/src/api.ts +0 -116
  640. package/src/createMessageLintReportsQuery.ts +0 -225
  641. package/src/createMessagesQuery.test.ts +0 -538
  642. package/src/createMessagesQuery.ts +0 -635
  643. package/src/createNewProject.test.ts +0 -105
  644. package/src/createNewProject.ts +0 -46
  645. package/src/createNodeishFsWithAbsolutePaths.test.ts +0 -55
  646. package/src/createNodeishFsWithAbsolutePaths.ts +0 -52
  647. package/src/createNodeishFsWithWatcher.test.ts +0 -50
  648. package/src/createNodeishFsWithWatcher.ts +0 -85
  649. package/src/defaultProjectSettings.ts +0 -26
  650. package/src/env-variables/.prettierignore +0 -1
  651. package/src/env-variables/createIndexFile.js +0 -28
  652. package/src/errors.ts +0 -84
  653. package/src/lint/index.ts +0 -2
  654. package/src/lint/message/errors.ts +0 -9
  655. package/src/lint/message/lintMessages.test.ts +0 -126
  656. package/src/lint/message/lintMessages.ts +0 -25
  657. package/src/lint/message/lintSingleMessage.test.ts +0 -191
  658. package/src/lint/message/lintSingleMessage.ts +0 -57
  659. package/src/listProjects.test.ts +0 -91
  660. package/src/listProjects.ts +0 -48
  661. package/src/loadProject.test.ts +0 -1173
  662. package/src/loadProject.ts +0 -460
  663. package/src/messages/errors.ts +0 -25
  664. package/src/messages/index.ts +0 -2
  665. package/src/messages/variant.test.ts +0 -511
  666. package/src/messages/variant.ts +0 -247
  667. package/src/migrations/maybeAddModuleCache.ts +0 -68
  668. package/src/migrations/maybeCreateFirstProjectId.test.ts +0 -31
  669. package/src/migrations/maybeCreateFirstProjectId.ts +0 -51
  670. package/src/migrations/migrateToDirectory.test.ts +0 -54
  671. package/src/migrations/migrateToDirectory.ts +0 -62
  672. package/src/parseConfig.ts +0 -35
  673. package/src/persistence/batchedIO.test.ts +0 -63
  674. package/src/persistence/batchedIO.ts +0 -64
  675. package/src/persistence/filelock/acquireFileLock.ts +0 -129
  676. package/src/persistence/filelock/releaseLock.ts +0 -29
  677. package/src/persistence/store.test.ts +0 -102
  678. package/src/persistence/store.ts +0 -119
  679. package/src/persistence/storeApi.ts +0 -19
  680. package/src/reactivity/map.ts +0 -135
  681. package/src/reactivity/solid.test.ts +0 -222
  682. package/src/reactivity/solid.ts +0 -42
  683. package/src/reactivity/trigger.ts +0 -46
  684. package/src/resolve-modules/cache.ts +0 -89
  685. package/src/resolve-modules/errors.ts +0 -69
  686. package/src/resolve-modules/import.test.ts +0 -62
  687. package/src/resolve-modules/import.ts +0 -133
  688. package/src/resolve-modules/index.ts +0 -2
  689. package/src/resolve-modules/message-lint-rules/errors.ts +0 -9
  690. package/src/resolve-modules/message-lint-rules/resolveMessageLintRules.ts +0 -27
  691. package/src/resolve-modules/plugins/errors.ts +0 -56
  692. package/src/resolve-modules/plugins/resolvePlugins.test.ts +0 -301
  693. package/src/resolve-modules/plugins/resolvePlugins.ts +0 -129
  694. package/src/resolve-modules/plugins/types.test.ts +0 -53
  695. package/src/resolve-modules/plugins/types.ts +0 -76
  696. package/src/resolve-modules/resolveModules.test.ts +0 -224
  697. package/src/resolve-modules/resolveModules.ts +0 -113
  698. package/src/resolve-modules/types.ts +0 -72
  699. package/src/resolve-modules/validateModuleSettings.test.ts +0 -85
  700. package/src/resolve-modules/validatedModuleSettings.ts +0 -19
  701. package/src/storage/helper.ts +0 -74
  702. package/src/storage/helpers.test.ts +0 -95
  703. package/src/storage/human-id/human-readable-id.ts +0 -27
  704. package/src/telemetry/capture.ts +0 -49
  705. package/src/telemetry/groupIdentify.ts +0 -41
  706. package/src/test-utilities/createMessage.test.ts +0 -118
  707. package/src/test-utilities/createMessage.ts +0 -21
  708. package/src/test-utilities/index.ts +0 -2
  709. package/src/test-utilities/sleep.ts +0 -11
  710. package/src/v2/helper.test.ts +0 -95
  711. package/src/v2/helper.ts +0 -98
  712. package/src/v2/index.ts +0 -3
  713. package/src/v2/mocks/index.ts +0 -2
  714. package/src/v2/mocks/multipleMatcher/bundle.test.ts +0 -11
  715. package/src/v2/mocks/multipleMatcher/bundle.ts +0 -196
  716. package/src/v2/mocks/plural/bundle.test.ts +0 -18
  717. package/src/v2/mocks/plural/bundle.ts +0 -164
  718. package/src/v2/shim.test.ts +0 -56
  719. package/src/v2/shim.ts +0 -173
  720. package/src/v2/stubQueryApi.ts +0 -43
  721. package/src/v2/types.ts +0 -159
  722. package/src/validateProjectPath.test.ts +0 -50
  723. package/src/validateProjectPath.ts +0 -38
  724. package/src/versionedInterfaces.ts +0 -9
  725. /package/dist/{storage/human-id → human-id}/words.d.ts +0 -0
  726. /package/dist/{storage/human-id → human-id}/words.test.d.ts +0 -0
  727. /package/dist/{loadProject.test.d.ts → project/loadProject.test.d.ts} +0 -0
@@ -0,0 +1,45 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d18172ff-c888-5198-afa4-b43d012b6685")}catch(e){}}();
3
+ import { Declaration, Pattern, VariableReference, } from "../json-schema/pattern.js";
4
+ export function applySchema(args) {
5
+ const foreignKeyActivated = args.sqlite.exec("PRAGMA foreign_keys", {
6
+ returnValue: "resultRows",
7
+ });
8
+ if (
9
+ // first row that is returned
10
+ // first column of the first row
11
+ // is equal to 0, then foreign keys are disabled
12
+ foreignKeyActivated[0][0] === 0) {
13
+ args.sqlite.exec("PRAGMA foreign_keys = ON", {
14
+ returnValue: "resultRows",
15
+ });
16
+ }
17
+ args.sqlite.exec(`
18
+ CREATE TABLE IF NOT EXISTS bundle (
19
+ id TEXT PRIMARY KEY DEFAULT (human_id()),
20
+ declarations BLOB NOT NULL DEFAULT (jsonb('[]'))
21
+ ) strict;
22
+
23
+ CREATE TABLE IF NOT EXISTS message (
24
+ id TEXT PRIMARY KEY DEFAULT (uuid_v7()),
25
+ bundle_id TEXT NOT NULL,
26
+ locale TEXT NOT NULL,
27
+ selectors BLOB NOT NULL DEFAULT (jsonb('[]')),
28
+ FOREIGN KEY (bundle_id) REFERENCES bundle(id) ON DELETE CASCADE
29
+ ) strict;
30
+
31
+
32
+ CREATE TABLE IF NOT EXISTS variant (
33
+ id TEXT PRIMARY KEY DEFAULT (uuid_v7()),
34
+ message_id TEXT NOT NULL,
35
+ matches BLOB NOT NULL DEFAULT (jsonb('[]')),
36
+ pattern BLOB NOT NULL DEFAULT (jsonb('[]')),
37
+ FOREIGN KEY (message_id) REFERENCES message(id) ON DELETE CASCADE
38
+ ) strict;
39
+
40
+ CREATE INDEX IF NOT EXISTS idx_message_bundle_id ON message (bundle_id);
41
+ CREATE INDEX IF NOT EXISTS idx_variant_message_id ON variant (message_id);
42
+ `);
43
+ }
44
+ //# sourceMappingURL=schema.js.map
45
+ //# debugId=d18172ff-c888-5198-afa4-b43d012b6685
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sources":["database/schema.ts"],"sourceRoot":"/","sourcesContent":["import type { Generated, Insertable, Selectable, Updateable } from \"kysely\";\nimport type { SqliteDatabase } from \"sqlite-wasm-kysely\";\nimport {\n\tDeclaration,\n\tPattern,\n\tVariableReference,\n} from \"../json-schema/pattern.js\";\n\nexport function applySchema(args: { sqlite: SqliteDatabase }) {\n\tconst foreignKeyActivated: any = args.sqlite.exec(\"PRAGMA foreign_keys\", {\n\t\treturnValue: \"resultRows\",\n\t});\n\tif (\n\t\t// first row that is returned\n\t\t// first column of the first row\n\t\t// is equal to 0, then foreign keys are disabled\n\t\tforeignKeyActivated[0][0] === 0\n\t) {\n\t\targs.sqlite.exec(\"PRAGMA foreign_keys = ON\", {\n\t\t\treturnValue: \"resultRows\",\n\t\t});\n\t}\n\n\targs.sqlite.exec(`\nCREATE TABLE IF NOT EXISTS bundle (\n id TEXT PRIMARY KEY DEFAULT (human_id()),\n\tdeclarations BLOB NOT NULL DEFAULT (jsonb('[]'))\n) strict;\n\nCREATE TABLE IF NOT EXISTS message (\n id TEXT PRIMARY KEY DEFAULT (uuid_v7()), \n bundle_id TEXT NOT NULL,\n locale TEXT NOT NULL,\n selectors BLOB NOT NULL DEFAULT (jsonb('[]')),\n FOREIGN KEY (bundle_id) REFERENCES bundle(id) ON DELETE CASCADE\n) strict;\n\n\nCREATE TABLE IF NOT EXISTS variant (\n id TEXT PRIMARY KEY DEFAULT (uuid_v7()), \n message_id TEXT NOT NULL,\n matches BLOB NOT NULL DEFAULT (jsonb('[]')),\n pattern BLOB NOT NULL DEFAULT (jsonb('[]')),\n FOREIGN KEY (message_id) REFERENCES message(id) ON DELETE CASCADE\n) strict;\n \nCREATE INDEX IF NOT EXISTS idx_message_bundle_id ON message (bundle_id);\nCREATE INDEX IF NOT EXISTS idx_variant_message_id ON variant (message_id);\n\t\t`);\n}\n\nexport type InlangDatabaseSchema = {\n\tbundle: BundleTable;\n\tmessage: MessageTable;\n\tvariant: VariantTable;\n};\n\ntype BundleTable = {\n\tid: Generated<string>;\n\tdeclarations: Generated<Array<Declaration>>;\n};\n\ntype MessageTable = {\n\tid: Generated<string>;\n\tbundleId: string;\n\tlocale: string;\n\tselectors: Generated<Array<VariableReference>>;\n};\n\ntype VariantTable = {\n\tid: Generated<string>;\n\tmessageId: string;\n\tmatches: Generated<Array<Match>>;\n\tpattern: Generated<Pattern>;\n};\n\n/**\n * A match is a variable reference that is either a literal or a catch-all.\n *\n * https://github.com/opral/inlang-sdk/issues/205\n *\n * @example\n * match = { type: \"match\", name: \"gender\", value: { type: \"literal\", value: \"male\" }}\n */\nexport type Match = LiteralMatch | CatchAllMatch;\n\nexport type LiteralMatch = {\n\ttype: \"literal-match\";\n\tkey: VariableReference[\"name\"];\n\tvalue: string;\n};\nexport type CatchAllMatch = {\n\ttype: \"catchall-match\";\n\tkey: VariableReference[\"name\"];\n};\n\nexport type Bundle = Selectable<BundleTable>;\nexport type NewBundle = Insertable<BundleTable>;\nexport type BundleUpdate = Updateable<BundleTable>;\n\nexport type Message = Selectable<MessageTable>;\nexport type NewMessage = Insertable<MessageTable>;\nexport type MessageUpdate = Updateable<MessageTable>;\n\nexport type Variant = Selectable<VariantTable>;\nexport type NewVariant = Insertable<VariantTable>;\nexport type VariantUpdate = Updateable<VariantTable>;\n\nexport type MessageNested = Message & {\n\tvariants: Variant[];\n};\nexport type NewMessageNested = NewMessage & {\n\tvariants: NewVariant[];\n};\nexport type MessageNestedUpdate = Updateable<MessageTable> & {\n\tvariants: VariantUpdate[];\n};\n\nexport type BundleNested = Bundle & {\n\tmessages: MessageNested[];\n};\nexport type NewBundleNested = NewBundle & {\n\tmessages: NewMessageNested[];\n};\nexport type BundleNestedUpdate = BundleUpdate & {\n\tmessages: MessageNestedUpdate[];\n};\n"],"names":[],"mappings":";;AAEA,OAAO,EACN,WAAW,EACX,OAAO,EACP,iBAAiB,GACjB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,UAAU,WAAW,CAAC,IAAgC;IAC3D,MAAM,mBAAmB,GAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE;QACxE,WAAW,EAAE,YAAY;KACzB,CAAC,CAAC;IACH;IACC,6BAA6B;IAC7B,gCAAgC;IAChC,gDAAgD;IAChD,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAC9B,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE;YAC5C,WAAW,EAAE,YAAY;SACzB,CAAC,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBf,CAAC,CAAC;AACL,CAAC","debug_id":"d18172ff-c888-5198-afa4-b43d012b6685"}
@@ -0,0 +1,71 @@
1
+ import type { ProjectSettings } from "./json-schema/settings.js";
2
+ import type { Match, NewBundleNested, NewMessageNested, Variant } from "./database/schema.js";
3
+ import type { Text } from "./json-schema/pattern.js";
4
+ /**
5
+ * create v2 Bundle with a random human ID
6
+ *
7
+ * @deprecated
8
+ *
9
+ * use the database directly
10
+ *
11
+ * - less code because the database has default values
12
+ * - `createMessage` is misleading because it does not treat expressions in the text
13
+ *
14
+ * @example createBundle({
15
+ * messages: [
16
+ * createMessage({locale: "en", text: "Hello world!"})
17
+ * createMessage({locale: "de", text: "Hallo Welt!"})
18
+ * ]
19
+ * })
20
+ */
21
+ export declare function createBundle(args: {
22
+ id?: string;
23
+ messages: NewMessageNested[];
24
+ }): NewBundleNested;
25
+ /**
26
+ *
27
+ * @deprecated
28
+ * use the database directly
29
+ *
30
+ * - text will always be a string, no matter
31
+ * if an expression is provided like hello "{username}"
32
+ * - the database has default values
33
+ *
34
+ * ```
35
+ * await project.db.insertInto("message").values({
36
+ * bundleId: "bundleId",
37
+ * pattern: []
38
+ * ...
39
+ * })
40
+ * ```
41
+ *
42
+ * create v2 Messsage AST with a randomId, and text-only pattern
43
+ * @example createMessage({locale: "en", text: "Hello world"})
44
+ */
45
+ export declare function createMessage(args: {
46
+ bundleId: string;
47
+ locale: ProjectSettings["locales"][number];
48
+ text: string;
49
+ matches?: Match[];
50
+ }): NewMessageNested;
51
+ /**
52
+ *
53
+ * @deprecated
54
+ *
55
+ * use the database directly
56
+ *
57
+ * - less code because the database has default values
58
+ * - `text` is misleading because it does not treat expressions in the text
59
+ *
60
+ * create v2 Variant AST with text-only pattern
61
+ * @example createVariant({match: ["*"], text: "Hello world"})
62
+ */
63
+ export declare function createVariant(args: {
64
+ messageId: string;
65
+ id?: string;
66
+ text?: string;
67
+ matches?: Match[];
68
+ pattern?: Variant["pattern"];
69
+ }): Variant;
70
+ export declare function toTextElement(text: string): Text;
71
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"/","sources":["helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EACX,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC7B,GAAG,eAAe,CAKlB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,GAAG,gBAAgB,CAenB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC7B,GAAG,OAAO,CAOV;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKhD"}
package/dist/helper.js ADDED
@@ -0,0 +1,91 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="72758e09-d619-5220-a608-230edefa2a5f")}catch(e){}}();
3
+ import { v4 as uuid } from "uuid";
4
+ import { humanId } from "./human-id/human-id.js";
5
+ /**
6
+ * create v2 Bundle with a random human ID
7
+ *
8
+ * @deprecated
9
+ *
10
+ * use the database directly
11
+ *
12
+ * - less code because the database has default values
13
+ * - `createMessage` is misleading because it does not treat expressions in the text
14
+ *
15
+ * @example createBundle({
16
+ * messages: [
17
+ * createMessage({locale: "en", text: "Hello world!"})
18
+ * createMessage({locale: "de", text: "Hallo Welt!"})
19
+ * ]
20
+ * })
21
+ */
22
+ export function createBundle(args) {
23
+ return {
24
+ id: args.id ?? humanId(),
25
+ messages: args.messages,
26
+ };
27
+ }
28
+ /**
29
+ *
30
+ * @deprecated
31
+ * use the database directly
32
+ *
33
+ * - text will always be a string, no matter
34
+ * if an expression is provided like hello "{username}"
35
+ * - the database has default values
36
+ *
37
+ * ```
38
+ * await project.db.insertInto("message").values({
39
+ * bundleId: "bundleId",
40
+ * pattern: []
41
+ * ...
42
+ * })
43
+ * ```
44
+ *
45
+ * create v2 Messsage AST with a randomId, and text-only pattern
46
+ * @example createMessage({locale: "en", text: "Hello world"})
47
+ */
48
+ export function createMessage(args) {
49
+ const messageId = uuid();
50
+ return {
51
+ bundleId: args.bundleId,
52
+ id: messageId,
53
+ locale: args.locale,
54
+ selectors: [],
55
+ variants: [
56
+ createVariant({
57
+ messageId: messageId,
58
+ text: args.text,
59
+ matches: args.matches,
60
+ }),
61
+ ],
62
+ };
63
+ }
64
+ /**
65
+ *
66
+ * @deprecated
67
+ *
68
+ * use the database directly
69
+ *
70
+ * - less code because the database has default values
71
+ * - `text` is misleading because it does not treat expressions in the text
72
+ *
73
+ * create v2 Variant AST with text-only pattern
74
+ * @example createVariant({match: ["*"], text: "Hello world"})
75
+ */
76
+ export function createVariant(args) {
77
+ return {
78
+ messageId: args.messageId,
79
+ id: args.id ? args.id : uuid(),
80
+ matches: args.matches ? args.matches : [],
81
+ pattern: args.pattern ? args.pattern : [toTextElement(args.text ?? "")],
82
+ };
83
+ }
84
+ export function toTextElement(text) {
85
+ return {
86
+ type: "text",
87
+ value: text,
88
+ };
89
+ }
90
+ //# sourceMappingURL=helper.js.map
91
+ //# debugId=72758e09-d619-5220-a608-230edefa2a5f
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sources":["helper.ts"],"sourceRoot":"/","sourcesContent":["import { v4 as uuid } from \"uuid\";\nimport type { ProjectSettings } from \"./json-schema/settings.js\";\nimport { humanId } from \"./human-id/human-id.js\";\nimport type {\n\tMatch,\n\tNewBundleNested,\n\tNewMessageNested,\n\tVariant,\n} from \"./database/schema.js\";\nimport type { Text } from \"./json-schema/pattern.js\";\n\n/**\n * create v2 Bundle with a random human ID\n *\n * @deprecated\n *\n * use the database directly\n *\n * - less code because the database has default values\n * - `createMessage` is misleading because it does not treat expressions in the text\n *\n * @example createBundle({\n * messages: [\n * \t\t createMessage({locale: \"en\", text: \"Hello world!\"})\n * \t\t createMessage({locale: \"de\", text: \"Hallo Welt!\"})\n * ]\n * })\n */\nexport function createBundle(args: {\n\tid?: string;\n\tmessages: NewMessageNested[];\n}): NewBundleNested {\n\treturn {\n\t\tid: args.id ?? humanId(),\n\t\tmessages: args.messages,\n\t};\n}\n\n/**\n *\n * @deprecated\n * use the database directly\n *\n * - text will always be a string, no matter\n * if an expression is provided like hello \"{username}\"\n * - the database has default values\n *\n * ```\n * await project.db.insertInto(\"message\").values({\n * \t\tbundleId: \"bundleId\",\n * pattern: []\n * \t\t...\n * })\n * ```\n *\n * create v2 Messsage AST with a randomId, and text-only pattern\n * @example createMessage({locale: \"en\", text: \"Hello world\"})\n */\nexport function createMessage(args: {\n\tbundleId: string;\n\tlocale: ProjectSettings[\"locales\"][number];\n\ttext: string;\n\tmatches?: Match[];\n}): NewMessageNested {\n\tconst messageId = uuid();\n\treturn {\n\t\tbundleId: args.bundleId,\n\t\tid: messageId,\n\t\tlocale: args.locale,\n\t\tselectors: [],\n\t\tvariants: [\n\t\t\tcreateVariant({\n\t\t\t\tmessageId: messageId,\n\t\t\t\ttext: args.text,\n\t\t\t\tmatches: args.matches,\n\t\t\t}),\n\t\t],\n\t};\n}\n\n/**\n *\n * @deprecated\n *\n * use the database directly\n *\n * - less code because the database has default values\n * - `text` is misleading because it does not treat expressions in the text\n *\n * create v2 Variant AST with text-only pattern\n * @example createVariant({match: [\"*\"], text: \"Hello world\"})\n */\nexport function createVariant(args: {\n\tmessageId: string;\n\tid?: string;\n\ttext?: string;\n\tmatches?: Match[];\n\tpattern?: Variant[\"pattern\"];\n}): Variant {\n\treturn {\n\t\tmessageId: args.messageId,\n\t\tid: args.id ? args.id : uuid(),\n\t\tmatches: args.matches ? args.matches : [],\n\t\tpattern: args.pattern ? args.pattern : [toTextElement(args.text ?? \"\")],\n\t};\n}\n\nexport function toTextElement(text: string): Text {\n\treturn {\n\t\ttype: \"text\",\n\t\tvalue: text,\n\t};\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AASjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,YAAY,CAAC,IAG5B;IACA,OAAO;QACN,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE;QACxB,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACvB,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,aAAa,CAAC,IAK7B;IACA,MAAM,SAAS,GAAG,IAAI,EAAE,CAAC;IACzB,OAAO;QACN,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,EAAE,EAAE,SAAS;QACb,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE;YACT,aAAa,CAAC;gBACb,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;aACrB,CAAC;SACF;KACD,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,IAM7B;IACA,OAAO;QACN,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;QAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QACzC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;KACvE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACzC,OAAO;QACN,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACX,CAAC;AACH,CAAC","debug_id":"72758e09-d619-5220-a608-230edefa2a5f"}
@@ -0,0 +1,3 @@
1
+ export declare function humanId(): string;
2
+ export declare function isHumanId(id: string): boolean;
3
+ //# sourceMappingURL=human-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-id.d.ts","sourceRoot":"/","sources":["human-id/human-id.ts"],"names":[],"mappings":"AAEA,wBAAgB,OAAO,WAMtB;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAG7C"}
@@ -0,0 +1,12 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bf56aec1-86e6-5dd9-b6fb-e21a5732c0d6")}catch(e){}}();
3
+ import { adjectives, animals, verbs } from "./words.js";
4
+ export function humanId() {
5
+ return `${adjectives[Math.floor(Math.random() * 256)]}_${adjectives[Math.floor(Math.random() * 256)]}_${animals[Math.floor(Math.random() * 256)]}_${verbs[Math.floor(Math.random() * 256)]}`;
6
+ }
7
+ export function isHumanId(id) {
8
+ // naive implementation (good enough for now)
9
+ return id.split("_").length === 4;
10
+ }
11
+ //# sourceMappingURL=human-id.js.map
12
+ //# debugId=bf56aec1-86e6-5dd9-b6fb-e21a5732c0d6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-id.js","sources":["human-id/human-id.ts"],"sourceRoot":"/","sourcesContent":["import { adjectives, animals, verbs } from \"./words.js\";\n\nexport function humanId() {\n\treturn `${adjectives[Math.floor(Math.random() * 256)]}_${\n\t\tadjectives[Math.floor(Math.random() * 256)]\n\t}_${animals[Math.floor(Math.random() * 256)]}_${\n\t\tverbs[Math.floor(Math.random() * 256)]\n\t}`;\n}\n\nexport function isHumanId(id: string): boolean {\n\t// naive implementation (good enough for now)\n\treturn id.split(\"_\").length === 4;\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,UAAU,OAAO;IACtB,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,IACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAC3C,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,IAC3C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CACtC,EAAE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAU;IACnC,6CAA6C;IAC7C,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACnC,CAAC","debug_id":"bf56aec1-86e6-5dd9-b6fb-e21a5732c0d6"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"words.d.ts","sourceRoot":"/","sources":["human-id/words.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAiQnB,CAAC;AAEF,eAAO,MAAM,UAAU,UAiQtB,CAAC;AAEF,eAAO,MAAM,OAAO,UAiQnB,CAAC;AAEF,eAAO,MAAM,KAAK,UAiQjB,CAAC"}
@@ -1,3 +1,5 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e8972a8a-c3a2-5f74-9499-172808f5a618")}catch(e){}}();
1
3
  export const animals = [
2
4
  "albatross",
3
5
  "alligator",
@@ -1030,3 +1032,5 @@ export const verbs = [
1030
1032
  "zip",
1031
1033
  "zoom",
1032
1034
  ];
1035
+ //# sourceMappingURL=words.js.map
1036
+ //# debugId=e8972a8a-c3a2-5f74-9499-172808f5a618
@@ -0,0 +1 @@
1
+ {"version":3,"file":"words.js","sources":["human-id/words.ts"],"sourceRoot":"/","sourcesContent":["export const animals = [\n\t\"albatross\",\n\t\"alligator\",\n\t\"alpaca\",\n\t\"anaconda\",\n\t\"angelfish\",\n\t\"ant\",\n\t\"anteater\",\n\t\"antelope\",\n\t\"ape\",\n\t\"baboon\",\n\t\"badger\",\n\t\"barbel\",\n\t\"bat\",\n\t\"bear\",\n\t\"beaver\",\n\t\"bee\",\n\t\"beetle\",\n\t\"bird\",\n\t\"bison\",\n\t\"blackbird\",\n\t\"boar\",\n\t\"bobcat\",\n\t\"bulldog\",\n\t\"bullock\",\n\t\"bumblebee\",\n\t\"butterfly\",\n\t\"buzzard\",\n\t\"camel\",\n\t\"canary\",\n\t\"capybara\",\n\t\"carp\",\n\t\"cat\",\n\t\"cheetah\",\n\t\"chicken\",\n\t\"chipmunk\",\n\t\"clownfish\",\n\t\"cobra\",\n\t\"cockroach\",\n\t\"cod\",\n\t\"cougar\",\n\t\"cow\",\n\t\"cowfish\",\n\t\"coyote\",\n\t\"crab\",\n\t\"crocodile\",\n\t\"crossbill\",\n\t\"crow\",\n\t\"cuckoo\",\n\t\"dachshund\",\n\t\"deer\",\n\t\"dingo\",\n\t\"dog\",\n\t\"dolphin\",\n\t\"donkey\",\n\t\"dove\",\n\t\"dragonfly\",\n\t\"duck\",\n\t\"eagle\",\n\t\"earthworm\",\n\t\"eel\",\n\t\"elephant\",\n\t\"elk\",\n\t\"emu\",\n\t\"falcon\",\n\t\"felix\",\n\t\"finch\",\n\t\"fireant\",\n\t\"firefox\",\n\t\"fish\",\n\t\"flamingo\",\n\t\"flea\",\n\t\"florian\",\n\t\"fly\",\n\t\"fox\",\n\t\"frog\",\n\t\"gadfly\",\n\t\"gazelle\",\n\t\"gecko\",\n\t\"gibbon\",\n\t\"giraffe\",\n\t\"goat\",\n\t\"goldfish\",\n\t\"goose\",\n\t\"gopher\",\n\t\"gorilla\",\n\t\"grebe\",\n\t\"grizzly\",\n\t\"gull\",\n\t\"guppy\",\n\t\"haddock\",\n\t\"halibut\",\n\t\"hamster\",\n\t\"hare\",\n\t\"hawk\",\n\t\"hedgehog\",\n\t\"herring\",\n\t\"hornet\",\n\t\"horse\",\n\t\"hound\",\n\t\"husky\",\n\t\"hyena\",\n\t\"ibex\",\n\t\"iguana\",\n\t\"impala\",\n\t\"insect\",\n\t\"jackal\",\n\t\"jackdaw\",\n\t\"jaguar\",\n\t\"jan\",\n\t\"jannes\",\n\t\"javelina\",\n\t\"jay\",\n\t\"jellyfish\",\n\t\"jurgen\",\n\t\"kangaroo\",\n\t\"kestrel\",\n\t\"kitten\",\n\t\"koala\",\n\t\"kudu\",\n\t\"ladybug\",\n\t\"lamb\",\n\t\"lark\",\n\t\"larva\",\n\t\"lemming\",\n\t\"lemur\",\n\t\"leopard\",\n\t\"liger\",\n\t\"lion\",\n\t\"lionfish\",\n\t\"lizard\",\n\t\"llama\",\n\t\"lobster\",\n\t\"loris\",\n\t\"lynx\",\n\t\"macaw\",\n\t\"maggot\",\n\t\"mallard\",\n\t\"mammoth\",\n\t\"manatee\",\n\t\"mantis\",\n\t\"mare\",\n\t\"marlin\",\n\t\"marmot\",\n\t\"marten\",\n\t\"martin\",\n\t\"mayfly\",\n\t\"meerkat\",\n\t\"midge\",\n\t\"millipede\",\n\t\"mink\",\n\t\"mole\",\n\t\"mongoose\",\n\t\"monkey\",\n\t\"moose\",\n\t\"moth\",\n\t\"mouse\",\n\t\"mule\",\n\t\"myna\",\n\t\"newt\",\n\t\"niklas\",\n\t\"nils\",\n\t\"nuthatch\",\n\t\"ocelot\",\n\t\"octopus\",\n\t\"okapi\",\n\t\"opossum\",\n\t\"orangutan\",\n\t\"oryx\",\n\t\"osprey\",\n\t\"ostrich\",\n\t\"otter\",\n\t\"owl\",\n\t\"ox\",\n\t\"panda\",\n\t\"panther\",\n\t\"parakeet\",\n\t\"parrot\",\n\t\"peacock\",\n\t\"pelican\",\n\t\"penguin\",\n\t\"pig\",\n\t\"pigeon\",\n\t\"piranha\",\n\t\"platypus\",\n\t\"polecat\",\n\t\"pony\",\n\t\"poodle\",\n\t\"porpoise\",\n\t\"puffin\",\n\t\"pug\",\n\t\"puma\",\n\t\"quail\",\n\t\"rabbit\",\n\t\"racoon\",\n\t\"rat\",\n\t\"raven\",\n\t\"ray\",\n\t\"reindeer\",\n\t\"robin\",\n\t\"rook\",\n\t\"rooster\",\n\t\"salmon\",\n\t\"samuel\",\n\t\"sawfish\",\n\t\"scallop\",\n\t\"seahorse\",\n\t\"seal\",\n\t\"shad\",\n\t\"shark\",\n\t\"sheep\",\n\t\"shell\",\n\t\"shrike\",\n\t\"shrimp\",\n\t\"skate\",\n\t\"skunk\",\n\t\"sloth\",\n\t\"slug\",\n\t\"snail\",\n\t\"snake\",\n\t\"sparrow\",\n\t\"spider\",\n\t\"squid\",\n\t\"squirrel\",\n\t\"starfish\",\n\t\"stingray\",\n\t\"stork\",\n\t\"swallow\",\n\t\"swan\",\n\t\"tadpole\",\n\t\"tapir\",\n\t\"termite\",\n\t\"tern\",\n\t\"thrush\",\n\t\"tiger\",\n\t\"toad\",\n\t\"tortoise\",\n\t\"toucan\",\n\t\"trout\",\n\t\"tuna\",\n\t\"turkey\",\n\t\"turtle\",\n\t\"vole\",\n\t\"vulture\",\n\t\"wallaby\",\n\t\"walrus\",\n\t\"warbler\",\n\t\"warthog\",\n\t\"wasp\",\n\t\"weasel\",\n\t\"whale\",\n\t\"wolf\",\n\t\"wombat\",\n\t\"worm\",\n\t\"wren\",\n\t\"yak\",\n\t\"zebra\",\n];\n\nexport const adjectives = [\n\t\"acidic\",\n\t\"active\",\n\t\"actual\",\n\t\"agent\",\n\t\"ago\",\n\t\"alert\",\n\t\"alive\",\n\t\"aloof\",\n\t\"antsy\",\n\t\"any\",\n\t\"aqua\",\n\t\"arable\",\n\t\"awake\",\n\t\"aware\",\n\t\"away\",\n\t\"awful\",\n\t\"bad\",\n\t\"bald\",\n\t\"basic\",\n\t\"best\",\n\t\"big\",\n\t\"bland\",\n\t\"blue\",\n\t\"bold\",\n\t\"born\",\n\t\"brave\",\n\t\"brief\",\n\t\"bright\",\n\t\"broad\",\n\t\"busy\",\n\t\"calm\",\n\t\"candid\",\n\t\"careful\",\n\t\"caring\",\n\t\"chunky\",\n\t\"civil\",\n\t\"clean\",\n\t\"clear\",\n\t\"close\",\n\t\"cool\",\n\t\"cozy\",\n\t\"crazy\",\n\t\"crisp\",\n\t\"cuddly\",\n\t\"curly\",\n\t\"cute\",\n\t\"dark\",\n\t\"day\",\n\t\"deft\",\n\t\"direct\",\n\t\"dirty\",\n\t\"dizzy\",\n\t\"drab\",\n\t\"dry\",\n\t\"due\",\n\t\"dull\",\n\t\"each\",\n\t\"early\",\n\t\"east\",\n\t\"elegant\",\n\t\"empty\",\n\t\"equal\",\n\t\"even\",\n\t\"every\",\n\t\"extra\",\n\t\"factual\",\n\t\"fair\",\n\t\"fancy\",\n\t\"few\",\n\t\"fine\",\n\t\"fit\",\n\t\"flaky\",\n\t\"flat\",\n\t\"fluffy\",\n\t\"formal\",\n\t\"frail\",\n\t\"free\",\n\t\"fresh\",\n\t\"front\",\n\t\"full\",\n\t\"fun\",\n\t\"funny\",\n\t\"fuzzy\",\n\t\"game\",\n\t\"gaudy\",\n\t\"giant\",\n\t\"glad\",\n\t\"good\",\n\t\"grand\",\n\t\"grassy\",\n\t\"gray\",\n\t\"great\",\n\t\"green\",\n\t\"gross\",\n\t\"happy\",\n\t\"heavy\",\n\t\"helpful\",\n\t\"heroic\",\n\t\"home\",\n\t\"honest\",\n\t\"hour\",\n\t\"house\",\n\t\"icy\",\n\t\"ideal\",\n\t\"inclusive\",\n\t\"inner\",\n\t\"jolly\",\n\t\"jumpy\",\n\t\"just\",\n\t\"keen\",\n\t\"key\",\n\t\"kind\",\n\t\"knotty\",\n\t\"known\",\n\t\"large\",\n\t\"last\",\n\t\"late\",\n\t\"lazy\",\n\t\"least\",\n\t\"left\",\n\t\"legal\",\n\t\"less\",\n\t\"level\",\n\t\"light\",\n\t\"lime\",\n\t\"livid\",\n\t\"lofty\",\n\t\"long\",\n\t\"loose\",\n\t\"lost\",\n\t\"loud\",\n\t\"loved\",\n\t\"low\",\n\t\"lower\",\n\t\"lucky\",\n\t\"mad\",\n\t\"main\",\n\t\"major\",\n\t\"male\",\n\t\"many\",\n\t\"maroon\",\n\t\"mealy\",\n\t\"mean\",\n\t\"mellow\",\n\t\"merry\",\n\t\"mild\",\n\t\"minor\",\n\t\"misty\",\n\t\"moving\",\n\t\"muddy\",\n\t\"mushy\",\n\t\"neat\",\n\t\"new\",\n\t\"next\",\n\t\"nice\",\n\t\"nimble\",\n\t\"noble\",\n\t\"noisy\",\n\t\"north\",\n\t\"novel\",\n\t\"odd\",\n\t\"ok\",\n\t\"only\",\n\t\"orange\",\n\t\"ornate\",\n\t\"patchy\",\n\t\"patient\",\n\t\"petty\",\n\t\"pink\",\n\t\"plain\",\n\t\"plane\",\n\t\"polite\",\n\t\"pretty\",\n\t\"proof\",\n\t\"proud\",\n\t\"quaint\",\n\t\"quick\",\n\t\"quiet\",\n\t\"raw\",\n\t\"real\",\n\t\"red\",\n\t\"round\",\n\t\"royal\",\n\t\"sad\",\n\t\"safe\",\n\t\"salty\",\n\t\"same\",\n\t\"sea\",\n\t\"seemly\",\n\t\"sharp\",\n\t\"short\",\n\t\"shy\",\n\t\"silly\",\n\t\"simple\",\n\t\"sleek\",\n\t\"slimy\",\n\t\"slow\",\n\t\"small\",\n\t\"smart\",\n\t\"smug\",\n\t\"soft\",\n\t\"solid\",\n\t\"sound\",\n\t\"sour\",\n\t\"spare\",\n\t\"spicy\",\n\t\"spry\",\n\t\"stale\",\n\t\"steep\",\n\t\"still\",\n\t\"stock\",\n\t\"stout\",\n\t\"strong\",\n\t\"suave\",\n\t\"such\",\n\t\"sunny\",\n\t\"super\",\n\t\"sweet\",\n\t\"swift\",\n\t\"tame\",\n\t\"tangy\",\n\t\"tasty\",\n\t\"teal\",\n\t\"teary\",\n\t\"tense\",\n\t\"that\",\n\t\"these\",\n\t\"this\",\n\t\"tidy\",\n\t\"tiny\",\n\t\"tired\",\n\t\"top\",\n\t\"topical\",\n\t\"tough\",\n\t\"trick\",\n\t\"trite\",\n\t\"true\",\n\t\"upper\",\n\t\"vexed\",\n\t\"vivid\",\n\t\"wacky\",\n\t\"warm\",\n\t\"watery\",\n\t\"weak\",\n\t\"weary\",\n\t\"weird\",\n\t\"white\",\n\t\"whole\",\n\t\"wide\",\n\t\"wild\",\n\t\"wise\",\n\t\"witty\",\n\t\"yummy\",\n\t\"zany\",\n\t\"zesty\",\n\t\"zippy\",\n];\n\nexport const adverbs = [\n\t\"ablaze\",\n\t\"about\",\n\t\"above\",\n\t\"abroad\",\n\t\"across\",\n\t\"adrift\",\n\t\"afloat\",\n\t\"after\",\n\t\"again\",\n\t\"ahead\",\n\t\"alike\",\n\t\"all\",\n\t\"almost\",\n\t\"alone\",\n\t\"along\",\n\t\"aloud\",\n\t\"always\",\n\t\"amazing\",\n\t\"anxious\",\n\t\"anywhere\",\n\t\"apart\",\n\t\"around\",\n\t\"arrogant\",\n\t\"aside\",\n\t\"asleep\",\n\t\"awkward\",\n\t\"back\",\n\t\"bashful\",\n\t\"beautiful\",\n\t\"before\",\n\t\"behind\",\n\t\"below\",\n\t\"beside\",\n\t\"besides\",\n\t\"beyond\",\n\t\"bitter\",\n\t\"bleak\",\n\t\"blissful\",\n\t\"boldly\",\n\t\"bravely\",\n\t\"briefly\",\n\t\"brightly\",\n\t\"brisk\",\n\t\"busily\",\n\t\"calmly\",\n\t\"carefully\",\n\t\"careless\",\n\t\"cautious\",\n\t\"certain\",\n\t\"cheerful\",\n\t\"clearly\",\n\t\"clever\",\n\t\"closely\",\n\t\"closer\",\n\t\"colorful\",\n\t\"common\",\n\t\"correct\",\n\t\"cross\",\n\t\"cruel\",\n\t\"curious\",\n\t\"daily\",\n\t\"dainty\",\n\t\"daring\",\n\t\"dear\",\n\t\"desperate\",\n\t\"diligent\",\n\t\"doubtful\",\n\t\"doubtless\",\n\t\"down\",\n\t\"downwards\",\n\t\"dreamily\",\n\t\"eager\",\n\t\"easily\",\n\t\"either\",\n\t\"elegantly\",\n\t\"else\",\n\t\"elsewhere\",\n\t\"enormous\",\n\t\"enough\",\n\t\"ever\",\n\t\"famous\",\n\t\"far\",\n\t\"fast\",\n\t\"fervent\",\n\t\"fierce\",\n\t\"fondly\",\n\t\"foolish\",\n\t\"forever\",\n\t\"forth\",\n\t\"fortunate\",\n\t\"forward\",\n\t\"frank\",\n\t\"freely\",\n\t\"frequent\",\n\t\"fully\",\n\t\"general\",\n\t\"generous\",\n\t\"gladly\",\n\t\"graceful\",\n\t\"grateful\",\n\t\"gratis\",\n\t\"half\",\n\t\"happily\",\n\t\"hard\",\n\t\"harsh\",\n\t\"hearty\",\n\t\"helpless\",\n\t\"here\",\n\t\"highly\",\n\t\"hitherto\",\n\t\"how\",\n\t\"however\",\n\t\"hurried\",\n\t\"immediate\",\n\t\"in\",\n\t\"indeed\",\n\t\"inland\",\n\t\"innocent\",\n\t\"inside\",\n\t\"instant\",\n\t\"intense\",\n\t\"inward\",\n\t\"jealous\",\n\t\"jovial\",\n\t\"joyful\",\n\t\"jubilant\",\n\t\"keenly\",\n\t\"kindly\",\n\t\"knowing\",\n\t\"lately\",\n\t\"lazily\",\n\t\"lightly\",\n\t\"likely\",\n\t\"little\",\n\t\"live\",\n\t\"loftily\",\n\t\"longing\",\n\t\"loosely\",\n\t\"loudly\",\n\t\"loving\",\n\t\"loyal\",\n\t\"luckily\",\n\t\"madly\",\n\t\"maybe\",\n\t\"meanwhile\",\n\t\"mocking\",\n\t\"monthly\",\n\t\"moreover\",\n\t\"much\",\n\t\"near\",\n\t\"neatly\",\n\t\"neither\",\n\t\"nervous\",\n\t\"never\",\n\t\"noisily\",\n\t\"normal\",\n\t\"not\",\n\t\"now\",\n\t\"nowadays\",\n\t\"nowhere\",\n\t\"oddly\",\n\t\"off\",\n\t\"official\",\n\t\"often\",\n\t\"on\",\n\t\"once\",\n\t\"open\",\n\t\"openly\",\n\t\"opposite\",\n\t\"otherwise\",\n\t\"out\",\n\t\"outside\",\n\t\"over\",\n\t\"overall\",\n\t\"overhead\",\n\t\"overnight\",\n\t\"overseas\",\n\t\"parallel\",\n\t\"partial\",\n\t\"past\",\n\t\"patiently\",\n\t\"perfect\",\n\t\"perhaps\",\n\t\"physical\",\n\t\"playful\",\n\t\"politely\",\n\t\"potential\",\n\t\"powerful\",\n\t\"presto\",\n\t\"profound\",\n\t\"prompt\",\n\t\"proper\",\n\t\"proudly\",\n\t\"punctual\",\n\t\"quickly\",\n\t\"quizzical\",\n\t\"rare\",\n\t\"ravenous\",\n\t\"ready\",\n\t\"really\",\n\t\"reckless\",\n\t\"regular\",\n\t\"repeated\",\n\t\"restful\",\n\t\"rightful\",\n\t\"rigid\",\n\t\"rude\",\n\t\"sadly\",\n\t\"safely\",\n\t\"scarce\",\n\t\"scary\",\n\t\"searching\",\n\t\"seeming\",\n\t\"seldom\",\n\t\"selfish\",\n\t\"separate\",\n\t\"serious\",\n\t\"shaky\",\n\t\"sheepish\",\n\t\"silent\",\n\t\"sleepy\",\n\t\"smooth\",\n\t\"softly\",\n\t\"solemn\",\n\t\"solidly\",\n\t\"sometimes\",\n\t\"speedy\",\n\t\"stealthy\",\n\t\"stern\",\n\t\"strict\",\n\t\"stubborn\",\n\t\"sudden\",\n\t\"supposed\",\n\t\"sweetly\",\n\t\"swiftly\",\n\t\"tender\",\n\t\"tensely\",\n\t\"thankful\",\n\t\"tight\",\n\t\"too\",\n\t\"twice\",\n\t\"under\",\n\t\"untrue\",\n\t\"uphill\",\n\t\"upward\",\n\t\"vaguely\",\n\t\"vainly\",\n\t\"vastly\",\n\t\"warmly\",\n\t\"wearily\",\n\t\"weekly\",\n\t\"well\",\n\t\"wisely\",\n\t\"within\",\n\t\"wrongly\",\n\t\"yonder\",\n];\n\nexport const verbs = [\n\t\"absorb\",\n\t\"accept\",\n\t\"achieve\",\n\t\"adapt\",\n\t\"adore\",\n\t\"advise\",\n\t\"affirm\",\n\t\"agree\",\n\t\"aid\",\n\t\"aim\",\n\t\"amaze\",\n\t\"amuse\",\n\t\"animate\",\n\t\"approve\",\n\t\"arise\",\n\t\"arrive\",\n\t\"ascend\",\n\t\"ask\",\n\t\"aspire\",\n\t\"assure\",\n\t\"attend\",\n\t\"bake\",\n\t\"bask\",\n\t\"beam\",\n\t\"believe\",\n\t\"belong\",\n\t\"bend\",\n\t\"blend\",\n\t\"bless\",\n\t\"blink\",\n\t\"bloom\",\n\t\"boil\",\n\t\"boost\",\n\t\"borrow\",\n\t\"breathe\",\n\t\"bubble\",\n\t\"build\",\n\t\"bump\",\n\t\"burn\",\n\t\"buy\",\n\t\"buzz\",\n\t\"care\",\n\t\"catch\",\n\t\"charm\",\n\t\"cheer\",\n\t\"cherish\",\n\t\"chop\",\n\t\"clap\",\n\t\"clasp\",\n\t\"climb\",\n\t\"clip\",\n\t\"coax\",\n\t\"comfort\",\n\t\"commend\",\n\t\"compose\",\n\t\"conquer\",\n\t\"cook\",\n\t\"create\",\n\t\"cry\",\n\t\"cuddle\",\n\t\"cure\",\n\t\"cut\",\n\t\"dance\",\n\t\"dare\",\n\t\"dart\",\n\t\"dash\",\n\t\"dazzle\",\n\t\"delight\",\n\t\"devour\",\n\t\"dial\",\n\t\"dig\",\n\t\"dine\",\n\t\"dream\",\n\t\"drip\",\n\t\"drop\",\n\t\"drum\",\n\t\"dust\",\n\t\"earn\",\n\t\"edit\",\n\t\"embrace\",\n\t\"emerge\",\n\t\"empower\",\n\t\"enchant\",\n\t\"endure\",\n\t\"engage\",\n\t\"enjoy\",\n\t\"enrich\",\n\t\"evoke\",\n\t\"exhale\",\n\t\"expand\",\n\t\"explore\",\n\t\"express\",\n\t\"fade\",\n\t\"fall\",\n\t\"favor\",\n\t\"fear\",\n\t\"feast\",\n\t\"feel\",\n\t\"fetch\",\n\t\"file\",\n\t\"find\",\n\t\"flip\",\n\t\"flop\",\n\t\"flow\",\n\t\"fold\",\n\t\"fond\",\n\t\"forgive\",\n\t\"foster\",\n\t\"fry\",\n\t\"fulfill\",\n\t\"gasp\",\n\t\"gaze\",\n\t\"gleam\",\n\t\"glow\",\n\t\"grace\",\n\t\"grasp\",\n\t\"greet\",\n\t\"grin\",\n\t\"grip\",\n\t\"grow\",\n\t\"gulp\",\n\t\"hack\",\n\t\"harbor\",\n\t\"heal\",\n\t\"heart\",\n\t\"hike\",\n\t\"hint\",\n\t\"honor\",\n\t\"hope\",\n\t\"hug\",\n\t\"hunt\",\n\t\"hurl\",\n\t\"hush\",\n\t\"imagine\",\n\t\"inspire\",\n\t\"intend\",\n\t\"jest\",\n\t\"jolt\",\n\t\"jump\",\n\t\"kick\",\n\t\"kiss\",\n\t\"laugh\",\n\t\"launch\",\n\t\"lead\",\n\t\"leap\",\n\t\"learn\",\n\t\"lend\",\n\t\"lift\",\n\t\"link\",\n\t\"list\",\n\t\"lock\",\n\t\"loop\",\n\t\"love\",\n\t\"mend\",\n\t\"mix\",\n\t\"mop\",\n\t\"nail\",\n\t\"nourish\",\n\t\"nudge\",\n\t\"nurture\",\n\t\"offer\",\n\t\"pat\",\n\t\"pause\",\n\t\"pave\",\n\t\"peek\",\n\t\"peel\",\n\t\"persist\",\n\t\"pet\",\n\t\"pick\",\n\t\"pinch\",\n\t\"play\",\n\t\"pop\",\n\t\"pout\",\n\t\"praise\",\n\t\"pray\",\n\t\"pride\",\n\t\"promise\",\n\t\"propel\",\n\t\"prosper\",\n\t\"pull\",\n\t\"push\",\n\t\"quell\",\n\t\"quiz\",\n\t\"race\",\n\t\"radiate\",\n\t\"read\",\n\t\"reap\",\n\t\"relish\",\n\t\"renew\",\n\t\"reside\",\n\t\"rest\",\n\t\"revive\",\n\t\"ripple\",\n\t\"rise\",\n\t\"roam\",\n\t\"roar\",\n\t\"rush\",\n\t\"sail\",\n\t\"savor\",\n\t\"scold\",\n\t\"scoop\",\n\t\"seek\",\n\t\"sew\",\n\t\"shine\",\n\t\"sing\",\n\t\"skip\",\n\t\"slide\",\n\t\"slurp\",\n\t\"smile\",\n\t\"snap\",\n\t\"snip\",\n\t\"soar\",\n\t\"spark\",\n\t\"spin\",\n\t\"splash\",\n\t\"sprout\",\n\t\"spur\",\n\t\"stab\",\n\t\"startle\",\n\t\"stir\",\n\t\"stop\",\n\t\"strive\",\n\t\"succeed\",\n\t\"support\",\n\t\"surge\",\n\t\"sway\",\n\t\"swim\",\n\t\"talk\",\n\t\"tap\",\n\t\"taste\",\n\t\"tear\",\n\t\"tend\",\n\t\"thrive\",\n\t\"tickle\",\n\t\"transform\",\n\t\"treasure\",\n\t\"treat\",\n\t\"trim\",\n\t\"trip\",\n\t\"trust\",\n\t\"twirl\",\n\t\"twist\",\n\t\"type\",\n\t\"urge\",\n\t\"value\",\n\t\"vent\",\n\t\"view\",\n\t\"walk\",\n\t\"wave\",\n\t\"win\",\n\t\"wish\",\n\t\"work\",\n\t\"yell\",\n\t\"zap\",\n\t\"zip\",\n\t\"zoom\",\n];\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,WAAW;IACX,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;IACX,KAAK;IACL,UAAU;IACV,UAAU;IACV,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,MAAM;IACN,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,MAAM;IACN,OAAO;IACP,WAAW;IACX,MAAM;IACN,QAAQ;IACR,SAAS;IACT,SAAS;IACT,WAAW;IACX,WAAW;IACX,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,MAAM;IACN,KAAK;IACL,SAAS;IACT,SAAS;IACT,UAAU;IACV,WAAW;IACX,OAAO;IACP,WAAW;IACX,KAAK;IACL,QAAQ;IACR,KAAK;IACL,SAAS;IACT,QAAQ;IACR,MAAM;IACN,WAAW;IACX,WAAW;IACX,MAAM;IACN,QAAQ;IACR,WAAW;IACX,MAAM;IACN,OAAO;IACP,KAAK;IACL,SAAS;IACT,QAAQ;IACR,MAAM;IACN,WAAW;IACX,MAAM;IACN,OAAO;IACP,WAAW;IACX,KAAK;IACL,UAAU;IACV,KAAK;IACL,KAAK;IACL,QAAQ;IACR,OAAO;IACP,OAAO;IACP,SAAS;IACT,SAAS;IACT,MAAM;IACN,UAAU;IACV,MAAM;IACN,SAAS;IACT,KAAK;IACL,KAAK;IACL,MAAM;IACN,QAAQ;IACR,SAAS;IACT,OAAO;IACP,QAAQ;IACR,SAAS;IACT,MAAM;IACN,UAAU;IACV,OAAO;IACP,QAAQ;IACR,SAAS;IACT,OAAO;IACP,SAAS;IACT,MAAM;IACN,OAAO;IACP,SAAS;IACT,SAAS;IACT,SAAS;IACT,MAAM;IACN,MAAM;IACN,UAAU;IACV,SAAS;IACT,QAAQ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IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,QAAQ;IACR,KAAK;IACL,SAAS;IACT,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,SAAS;IACT,OAAO;IACP,SAAS;IACT,OAAO;IACP,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,MAAM;IACN,SAAS;IACT,MAAM;IACN,MAAM;IACN,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,UAAU;IACV,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;CACN,CAAC","debug_id":"e8972a8a-c3a2-5f74-9499-172808f5a618"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"words.test.d.ts","sourceRoot":"/","sources":["human-id/words.test.ts"],"names":[],"mappings":""}
@@ -1,3 +1,5 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0396a296-9686-503d-9197-353bc24140ad")}catch(e){}}();
1
3
  import { describe, it, expect } from "vitest";
2
4
  import { adjectives, animals, adverbs, verbs } from "./words.js";
3
5
  const wordlists = [adjectives, animals, adverbs, verbs];
@@ -23,3 +25,5 @@ describe("wordlists", () => {
23
25
  }
24
26
  });
25
27
  });
28
+ //# sourceMappingURL=words.test.js.map
29
+ //# debugId=0396a296-9686-503d-9197-353bc24140ad
@@ -0,0 +1 @@
1
+ {"version":3,"file":"words.test.js","sources":["human-id/words.test.ts"],"sourceRoot":"/","sourcesContent":["import { describe, it, expect } from \"vitest\";\nimport { adjectives, animals, adverbs, verbs } from \"./words.js\";\n\nconst wordlists = [adjectives, animals, adverbs, verbs];\nconst allwords = [...adjectives, ...animals, ...adverbs, ...verbs];\n\ndescribe(\"wordlists\", () => {\n\tit(\"should have 256 words\", () => {\n\t\tfor (const wordlist of wordlists) {\n\t\t\texpect(wordlist.length).toBe(256);\n\t\t}\n\t});\n\tit(\"words should be unique across lists\", () => {\n\t\tconst unique = new Set(allwords);\n\t\texpect(unique.size).toBe(256 * 4);\n\t});\n\tit(\"words should have < 10 characters\", () => {\n\t\tfor (const word of allwords) {\n\t\t\texpect(word.length).toBeLessThan(10);\n\t\t}\n\t});\n\tit(\"words should match /^[a-z]+$/\", () => {\n\t\tfor (const word of allwords) {\n\t\t\texpect(word.match(/^[a-z]+$/) !== null).toBe(true);\n\t\t}\n\t});\n});\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,SAAS,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AACxD,MAAM,QAAQ,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC,CAAC;AAEnE,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAChC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;IACF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC9C,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC5C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACtC,CAAC;IACF,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACxC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","debug_id":"0396a296-9686-503d-9197-353bc24140ad"}
@@ -0,0 +1,11 @@
1
+ import type { Kysely } from "kysely";
2
+ import type { ProjectSettings } from "../json-schema/settings.js";
3
+ import type { InlangDatabaseSchema } from "../database/schema.js";
4
+ import type { InlangPlugin } from "../plugin/schema.js";
5
+ export declare function exportFiles(opts: {
6
+ readonly pluginKey: string;
7
+ readonly settings: ProjectSettings;
8
+ readonly plugins: readonly InlangPlugin[];
9
+ readonly db: Kysely<InlangDatabaseSchema>;
10
+ }): Promise<import("../index.js").ExportFile[]>;
11
+ //# sourceMappingURL=exportFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportFiles.d.ts","sourceRoot":"/","sources":["import-export/exportFiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;CAC1C,+CAqBA"}
@@ -0,0 +1,26 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bec77b74-fbb4-5eda-87d6-1c11e4009eec")}catch(e){}}();
3
+ import { PluginDoesNotImplementFunctionError, PluginMissingError, } from "../plugin/errors.js";
4
+ export async function exportFiles(opts) {
5
+ const plugin = opts.plugins.find((p) => p.key === opts.pluginKey);
6
+ if (!plugin)
7
+ throw new PluginMissingError({ plugin: opts.pluginKey });
8
+ if (!plugin.exportFiles) {
9
+ throw new PluginDoesNotImplementFunctionError({
10
+ plugin: opts.pluginKey,
11
+ function: "exportFiles",
12
+ });
13
+ }
14
+ const bundles = await opts.db.selectFrom("bundle").selectAll().execute();
15
+ const messages = await opts.db.selectFrom("message").selectAll().execute();
16
+ const variants = await opts.db.selectFrom("variant").selectAll().execute();
17
+ const files = await plugin.exportFiles({
18
+ settings: structuredClone(opts.settings),
19
+ bundles,
20
+ messages,
21
+ variants,
22
+ });
23
+ return files;
24
+ }
25
+ //# sourceMappingURL=exportFiles.js.map
26
+ //# debugId=bec77b74-fbb4-5eda-87d6-1c11e4009eec
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportFiles.js","sources":["import-export/exportFiles.ts"],"sourceRoot":"/","sourcesContent":["import type { Kysely } from \"kysely\";\nimport {\n\tPluginDoesNotImplementFunctionError,\n\tPluginMissingError,\n} from \"../plugin/errors.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport type { InlangDatabaseSchema } from \"../database/schema.js\";\nimport type { InlangPlugin } from \"../plugin/schema.js\";\n\nexport async function exportFiles(opts: {\n\treadonly pluginKey: string;\n\treadonly settings: ProjectSettings;\n\treadonly plugins: readonly InlangPlugin[];\n\treadonly db: Kysely<InlangDatabaseSchema>;\n}) {\n\tconst plugin = opts.plugins.find((p) => p.key === opts.pluginKey);\n\tif (!plugin) throw new PluginMissingError({ plugin: opts.pluginKey });\n\tif (!plugin.exportFiles) {\n\t\tthrow new PluginDoesNotImplementFunctionError({\n\t\t\tplugin: opts.pluginKey,\n\t\t\tfunction: \"exportFiles\",\n\t\t});\n\t}\n\n\tconst bundles = await opts.db.selectFrom(\"bundle\").selectAll().execute();\n\tconst messages = await opts.db.selectFrom(\"message\").selectAll().execute();\n\tconst variants = await opts.db.selectFrom(\"variant\").selectAll().execute();\n\n\tconst files = await plugin.exportFiles({\n\t\tsettings: structuredClone(opts.settings),\n\t\tbundles,\n\t\tmessages,\n\t\tvariants,\n\t});\n\treturn files;\n}\n"],"names":[],"mappings":";;AACA,OAAO,EACN,mCAAmC,EACnC,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAK7B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAKjC;IACA,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;IAClE,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,kBAAkB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACtE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,mCAAmC,CAAC;YAC7C,MAAM,EAAE,IAAI,CAAC,SAAS;YACtB,QAAQ,EAAE,aAAa;SACvB,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IACzE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IAC3E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IAE3E,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC;QACtC,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;QACxC,OAAO;QACP,QAAQ;QACR,QAAQ;KACR,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACd,CAAC","debug_id":"bec77b74-fbb4-5eda-87d6-1c11e4009eec"}
@@ -0,0 +1,13 @@
1
+ import type { Kysely } from "kysely";
2
+ import type { ProjectSettings } from "../json-schema/settings.js";
3
+ import type { InlangDatabaseSchema } from "../database/schema.js";
4
+ import type { InlangPlugin } from "../plugin/schema.js";
5
+ import type { ImportFile } from "../project/api.js";
6
+ export declare function importFiles(args: {
7
+ files: ImportFile[];
8
+ readonly pluginKey: string;
9
+ readonly settings: ProjectSettings;
10
+ readonly plugins: readonly InlangPlugin[];
11
+ readonly db: Kysely<InlangDatabaseSchema>;
12
+ }): Promise<void>;
13
+ //# sourceMappingURL=importFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importFiles.d.ts","sourceRoot":"/","sources":["import-export/importFiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAc,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,wBAAsB,WAAW,CAAC,IAAI,EAAE;IACvC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;CAC1C,iBA6HA"}
@@ -0,0 +1,124 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0180f00c-8bb4-50a0-a603-1c8f0e7bdcd8")}catch(e){}}();
3
+ import { PluginDoesNotImplementFunctionError, PluginMissingError, } from "../plugin/errors.js";
4
+ export async function importFiles(args) {
5
+ const plugin = args.plugins.find((p) => p.key === args.pluginKey);
6
+ if (!plugin)
7
+ throw new PluginMissingError({ plugin: args.pluginKey });
8
+ if (!plugin.importFiles) {
9
+ throw new PluginDoesNotImplementFunctionError({
10
+ plugin: args.pluginKey,
11
+ function: "importFiles",
12
+ });
13
+ }
14
+ const imported = await plugin.importFiles({
15
+ files: args.files,
16
+ settings: structuredClone(args.settings),
17
+ });
18
+ await args.db.transaction().execute(async (trx) => {
19
+ // upsert every bundle
20
+ for (const bundle of imported.bundles) {
21
+ await trx
22
+ .insertInto("bundle")
23
+ .values(bundle)
24
+ .onConflict((oc) => oc.column("id").doUpdateSet(bundle))
25
+ .execute();
26
+ }
27
+ // upsert every message
28
+ for (const message of imported.messages) {
29
+ // match the message by bundle id and locale if
30
+ // no id is provided by the importer
31
+ if (message.id === undefined) {
32
+ const exisingMessage = await trx
33
+ .selectFrom("message")
34
+ .where("bundleId", "=", message.bundleId)
35
+ .where("locale", "=", message.locale)
36
+ .select("id")
37
+ .executeTakeFirst();
38
+ message.id = exisingMessage?.id;
39
+ }
40
+ try {
41
+ await trx
42
+ .insertInto("message")
43
+ .values(message)
44
+ .onConflict((oc) => oc.column("id").doUpdateSet(message))
45
+ .execute();
46
+ }
47
+ catch (e) {
48
+ // 787 = SQLITE_CONSTRAINT_FOREIGNKEY
49
+ // handle foreign key violation
50
+ // e.g. a message references a bundle that doesn't exist
51
+ // by creating the bundle
52
+ if (e?.resultCode === 787) {
53
+ await trx
54
+ .insertInto("bundle")
55
+ .values({ id: message.bundleId })
56
+ .execute();
57
+ await trx.insertInto("message").values(message).execute();
58
+ }
59
+ else {
60
+ throw e;
61
+ }
62
+ }
63
+ }
64
+ // upsert every variant
65
+ for (const variant of imported.variants) {
66
+ // match the variant by message id and matches if
67
+ // no id is provided by the importer
68
+ if (variant.id === undefined) {
69
+ let existingMessage = await trx
70
+ .selectFrom("message")
71
+ .where("bundleId", "=", variant.messageBundleId)
72
+ .where("locale", "=", variant.messageLocale)
73
+ .select("id")
74
+ .executeTakeFirst();
75
+ // if the message does not exist, create it
76
+ if (existingMessage === undefined) {
77
+ const existingBundle = await trx
78
+ .selectFrom("bundle")
79
+ .where("id", "=", variant.messageBundleId)
80
+ .select("id")
81
+ .executeTakeFirst();
82
+ // if the bundle does not exist, create it
83
+ if (existingBundle === undefined) {
84
+ await trx
85
+ .insertInto("bundle")
86
+ .values({ id: variant.messageBundleId })
87
+ .execute();
88
+ }
89
+ // insert the message
90
+ existingMessage = await trx
91
+ .insertInto("message")
92
+ .values({
93
+ bundleId: variant.messageBundleId,
94
+ locale: variant.messageLocale,
95
+ })
96
+ .returningAll()
97
+ .executeTakeFirstOrThrow();
98
+ }
99
+ const existingVariants = await trx
100
+ .selectFrom("variant")
101
+ .where("messageId", "=", existingMessage.id)
102
+ .selectAll()
103
+ .execute();
104
+ const existingVariant = existingVariants.find((v) => JSON.stringify(v.matches) === JSON.stringify(variant.matches));
105
+ // need to reset typescript's type narrowing
106
+ variant.id = existingVariant?.id;
107
+ variant.messageId = existingMessage.id;
108
+ }
109
+ const toBeInsertedVariant = {
110
+ ...variant,
111
+ // @ts-expect-error - bundle id is provided by VariantImport but not needed when inserting
112
+ messageBundleId: undefined,
113
+ messageLocale: undefined,
114
+ };
115
+ await trx
116
+ .insertInto("variant")
117
+ .values(toBeInsertedVariant)
118
+ .onConflict((oc) => oc.column("id").doUpdateSet(toBeInsertedVariant))
119
+ .execute();
120
+ }
121
+ });
122
+ }
123
+ //# sourceMappingURL=importFiles.js.map
124
+ //# debugId=0180f00c-8bb4-50a0-a603-1c8f0e7bdcd8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importFiles.js","sources":["import-export/importFiles.ts"],"sourceRoot":"/","sourcesContent":["import type { Kysely } from \"kysely\";\nimport {\n\tPluginDoesNotImplementFunctionError,\n\tPluginMissingError,\n} from \"../plugin/errors.js\";\nimport type { ProjectSettings } from \"../json-schema/settings.js\";\nimport type { InlangDatabaseSchema, NewVariant } from \"../database/schema.js\";\nimport type { InlangPlugin, VariantImport } from \"../plugin/schema.js\";\nimport type { ImportFile } from \"../project/api.js\";\n\nexport async function importFiles(args: {\n\tfiles: ImportFile[];\n\treadonly pluginKey: string;\n\treadonly settings: ProjectSettings;\n\treadonly plugins: readonly InlangPlugin[];\n\treadonly db: Kysely<InlangDatabaseSchema>;\n}) {\n\tconst plugin = args.plugins.find((p) => p.key === args.pluginKey);\n\n\tif (!plugin) throw new PluginMissingError({ plugin: args.pluginKey });\n\n\tif (!plugin.importFiles) {\n\t\tthrow new PluginDoesNotImplementFunctionError({\n\t\t\tplugin: args.pluginKey,\n\t\t\tfunction: \"importFiles\",\n\t\t});\n\t}\n\n\tconst imported = await plugin.importFiles({\n\t\tfiles: args.files,\n\t\tsettings: structuredClone(args.settings),\n\t});\n\n\tawait args.db.transaction().execute(async (trx) => {\n\t\t// upsert every bundle\n\t\tfor (const bundle of imported.bundles) {\n\t\t\tawait trx\n\t\t\t\t.insertInto(\"bundle\")\n\t\t\t\t.values(bundle)\n\t\t\t\t.onConflict((oc) => oc.column(\"id\").doUpdateSet(bundle))\n\t\t\t\t.execute();\n\t\t}\n\t\t// upsert every message\n\t\tfor (const message of imported.messages) {\n\t\t\t// match the message by bundle id and locale if\n\t\t\t// no id is provided by the importer\n\t\t\tif (message.id === undefined) {\n\t\t\t\tconst exisingMessage = await trx\n\t\t\t\t\t.selectFrom(\"message\")\n\t\t\t\t\t.where(\"bundleId\", \"=\", message.bundleId)\n\t\t\t\t\t.where(\"locale\", \"=\", message.locale)\n\t\t\t\t\t.select(\"id\")\n\t\t\t\t\t.executeTakeFirst();\n\t\t\t\tmessage.id = exisingMessage?.id;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait trx\n\t\t\t\t\t.insertInto(\"message\")\n\t\t\t\t\t.values(message)\n\t\t\t\t\t.onConflict((oc) => oc.column(\"id\").doUpdateSet(message))\n\t\t\t\t\t.execute();\n\t\t\t} catch (e) {\n\t\t\t\t// 787 = SQLITE_CONSTRAINT_FOREIGNKEY\n\t\t\t\t// handle foreign key violation\n\t\t\t\t// e.g. a message references a bundle that doesn't exist\n\t\t\t\t// by creating the bundle\n\t\t\t\tif ((e as any)?.resultCode === 787) {\n\t\t\t\t\tawait trx\n\t\t\t\t\t\t.insertInto(\"bundle\")\n\t\t\t\t\t\t.values({ id: message.bundleId })\n\t\t\t\t\t\t.execute();\n\t\t\t\t\tawait trx.insertInto(\"message\").values(message).execute();\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// upsert every variant\n\t\tfor (const variant of imported.variants) {\n\t\t\t// match the variant by message id and matches if\n\t\t\t// no id is provided by the importer\n\t\t\tif (variant.id === undefined) {\n\t\t\t\tlet existingMessage = await trx\n\t\t\t\t\t.selectFrom(\"message\")\n\t\t\t\t\t.where(\"bundleId\", \"=\", variant.messageBundleId)\n\t\t\t\t\t.where(\"locale\", \"=\", variant.messageLocale)\n\t\t\t\t\t.select(\"id\")\n\t\t\t\t\t.executeTakeFirst();\n\n\t\t\t\t// if the message does not exist, create it\n\t\t\t\tif (existingMessage === undefined) {\n\t\t\t\t\tconst existingBundle = await trx\n\t\t\t\t\t\t.selectFrom(\"bundle\")\n\t\t\t\t\t\t.where(\"id\", \"=\", variant.messageBundleId)\n\t\t\t\t\t\t.select(\"id\")\n\t\t\t\t\t\t.executeTakeFirst();\n\t\t\t\t\t// if the bundle does not exist, create it\n\t\t\t\t\tif (existingBundle === undefined) {\n\t\t\t\t\t\tawait trx\n\t\t\t\t\t\t\t.insertInto(\"bundle\")\n\t\t\t\t\t\t\t.values({ id: variant.messageBundleId })\n\t\t\t\t\t\t\t.execute();\n\t\t\t\t\t}\n\t\t\t\t\t// insert the message\n\t\t\t\t\texistingMessage = await trx\n\t\t\t\t\t\t.insertInto(\"message\")\n\t\t\t\t\t\t.values({\n\t\t\t\t\t\t\tbundleId: variant.messageBundleId,\n\t\t\t\t\t\t\tlocale: variant.messageLocale,\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.returningAll()\n\t\t\t\t\t\t.executeTakeFirstOrThrow();\n\t\t\t\t}\n\n\t\t\t\tconst existingVariants = await trx\n\t\t\t\t\t.selectFrom(\"variant\")\n\t\t\t\t\t.where(\"messageId\", \"=\", existingMessage.id)\n\t\t\t\t\t.selectAll()\n\t\t\t\t\t.execute();\n\n\t\t\t\tconst existingVariant = existingVariants.find(\n\t\t\t\t\t(v) => JSON.stringify(v.matches) === JSON.stringify(variant.matches)\n\t\t\t\t);\n\n\t\t\t\t// need to reset typescript's type narrowing\n\t\t\t\t(variant as VariantImport).id = existingVariant?.id;\n\t\t\t\t(variant as VariantImport).messageId = existingMessage.id;\n\t\t\t}\n\t\t\tconst toBeInsertedVariant: NewVariant = {\n\t\t\t\t...variant,\n\t\t\t\t// @ts-expect-error - bundle id is provided by VariantImport but not needed when inserting\n\t\t\t\tmessageBundleId: undefined,\n\t\t\t\tmessageLocale: undefined,\n\t\t\t};\n\t\t\tawait trx\n\t\t\t\t.insertInto(\"variant\")\n\t\t\t\t.values(toBeInsertedVariant)\n\t\t\t\t.onConflict((oc) => oc.column(\"id\").doUpdateSet(toBeInsertedVariant))\n\t\t\t\t.execute();\n\t\t}\n\t});\n}\n"],"names":[],"mappings":";;AACA,OAAO,EACN,mCAAmC,EACnC,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAM7B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAMjC;IACA,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;IAElE,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,kBAAkB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAEtE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,IAAI,mCAAmC,CAAC;YAC7C,MAAM,EAAE,IAAI,CAAC,SAAS;YACtB,QAAQ,EAAE,aAAa;SACvB,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC;QACzC,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC;KACxC,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACjD,sBAAsB;QACtB,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACvC,MAAM,GAAG;iBACP,UAAU,CAAC,QAAQ,CAAC;iBAC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AE,OAAO,CAAC,aAAa;qBAC7B,CAAC;yBACD,YAAY,EAAE;yBACd,uBAAuB,EAAE,CAAC;gBAC7B,CAAC;gBAED,MAAM,gBAAgB,GAAG,MAAM,GAAG;qBAChC,UAAU,CAAC,SAAS,CAAC;qBACrB,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,eAAe,CAAC,EAAE,CAAC;qBAC3C,SAAS,EAAE;qBACX,OAAO,EAAE,CAAC;gBAEZ,MAAM,eAAe,GAAG,gBAAgB,CAAC,IAAI,CAC5C,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CACpE,CAAC;gBAEF,4CAA4C;gBAC3C,OAAyB,CAAC,EAAE,GAAG,eAAe,EAAE,EAAE,CAAC;gBACnD,OAAyB,CAAC,SAAS,GAAG,eAAe,CAAC,EAAE,CAAC;YAC3D,CAAC;YACD,MAAM,mBAAmB,GAAe;gBACvC,GAAG,OAAO;gBACV,0FAA0F;gBAC1F,eAAe,EAAE,SAAS;gBAC1B,aAAa,EAAE,SAAS;aACxB,CAAC;YACF,MAAM,GAAG;iBACP,UAAU,CAAC,SAAS,CAAC;iBACrB,MAAM,CAAC,mBAAmB,CAAC;iBAC3B,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;iBACpE,OAAO,EAAE,CAAC;QACb,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC","debug_id":"0180f00c-8bb4-50a0-a603-1c8f0e7bdcd8"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=importFiles.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importFiles.test.d.ts","sourceRoot":"/","sources":["import-export/importFiles.test.ts"],"names":[],"mappings":""}