@inlang/paraglide-js 2.0.0-prerelease.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (740) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -70
  3. package/dist/bundler-plugins/esbuild.d.ts +2 -0
  4. package/dist/bundler-plugins/esbuild.d.ts.map +1 -0
  5. package/dist/bundler-plugins/esbuild.js +3 -0
  6. package/dist/bundler-plugins/index.d.ts +7 -0
  7. package/dist/bundler-plugins/index.d.ts.map +1 -0
  8. package/dist/bundler-plugins/index.js +6 -0
  9. package/dist/bundler-plugins/rolldown.d.ts +2 -0
  10. package/dist/bundler-plugins/rolldown.d.ts.map +1 -0
  11. package/dist/bundler-plugins/rolldown.js +3 -0
  12. package/dist/bundler-plugins/rollup.d.ts +2 -0
  13. package/dist/bundler-plugins/rollup.d.ts.map +1 -0
  14. package/dist/bundler-plugins/rollup.js +3 -0
  15. package/dist/bundler-plugins/rspack.d.ts +2 -0
  16. package/dist/bundler-plugins/rspack.d.ts.map +1 -0
  17. package/dist/bundler-plugins/rspack.js +3 -0
  18. package/dist/bundler-plugins/unplugin.d.ts +4 -0
  19. package/dist/bundler-plugins/unplugin.d.ts.map +1 -0
  20. package/dist/bundler-plugins/unplugin.js +131 -0
  21. package/dist/bundler-plugins/vite.d.ts +2 -0
  22. package/dist/bundler-plugins/vite.d.ts.map +1 -0
  23. package/dist/bundler-plugins/vite.js +3 -0
  24. package/dist/bundler-plugins/webpack.d.ts +2 -0
  25. package/dist/bundler-plugins/webpack.d.ts.map +1 -0
  26. package/dist/bundler-plugins/webpack.js +3 -0
  27. package/dist/cli/commands/compile/command.d.ts.map +1 -1
  28. package/dist/cli/commands/compile/command.js +23 -24
  29. package/dist/cli/commands/init/command.d.ts +0 -21
  30. package/dist/cli/commands/init/command.d.ts.map +1 -1
  31. package/dist/cli/commands/init/command.js +30 -46
  32. package/dist/cli/defaults.d.ts +1 -1
  33. package/dist/cli/defaults.d.ts.map +1 -1
  34. package/dist/cli/defaults.js +5 -10
  35. package/dist/cli/index.d.ts +0 -9
  36. package/dist/cli/index.d.ts.map +1 -1
  37. package/dist/cli/index.js +2 -9
  38. package/dist/cli/steps/add-vite-plugin.d.ts +10 -0
  39. package/dist/cli/steps/add-vite-plugin.d.ts.map +1 -0
  40. package/dist/cli/steps/add-vite-plugin.js +61 -0
  41. package/dist/cli/steps/add-vite-plugin.test.d.ts +2 -0
  42. package/dist/cli/steps/add-vite-plugin.test.d.ts.map +1 -0
  43. package/dist/cli/steps/add-vite-plugin.test.js +69 -0
  44. package/dist/cli/steps/detect-bundler.d.ts +11 -0
  45. package/dist/cli/steps/detect-bundler.d.ts.map +1 -0
  46. package/dist/cli/steps/detect-bundler.js +21 -0
  47. package/dist/cli/steps/detect-bundler.test.d.ts +2 -0
  48. package/dist/cli/steps/detect-bundler.test.d.ts.map +1 -0
  49. package/dist/cli/steps/detect-bundler.test.js +28 -0
  50. package/dist/cli/steps/initialize-inlang-project.d.ts +1 -11
  51. package/dist/cli/steps/initialize-inlang-project.d.ts.map +1 -1
  52. package/dist/cli/steps/initialize-inlang-project.js +145 -121
  53. package/dist/cli/steps/maybe-add-machine-translation.d.ts +16 -0
  54. package/dist/cli/steps/maybe-add-machine-translation.d.ts.map +1 -0
  55. package/dist/cli/steps/maybe-add-machine-translation.js +48 -0
  56. package/dist/cli/steps/maybe-add-sherlock.d.ts +1 -2
  57. package/dist/cli/steps/maybe-add-sherlock.d.ts.map +1 -1
  58. package/dist/cli/steps/maybe-add-sherlock.js +13 -13
  59. package/dist/cli/steps/update-package-json.d.ts +1 -2
  60. package/dist/cli/steps/update-package-json.d.ts.map +1 -1
  61. package/dist/cli/steps/update-ts-config.d.ts +4 -15
  62. package/dist/cli/steps/update-ts-config.d.ts.map +1 -1
  63. package/dist/cli/steps/update-ts-config.js +100 -78
  64. package/dist/compiler/{compileBundle.d.ts → compile-bundle.d.ts} +4 -5
  65. package/dist/compiler/compile-bundle.d.ts.map +1 -0
  66. package/dist/compiler/compile-bundle.js +60 -0
  67. package/dist/compiler/compile-bundle.test.d.ts +2 -0
  68. package/dist/compiler/compile-bundle.test.d.ts.map +1 -0
  69. package/dist/compiler/compile-bundle.test.js +97 -0
  70. package/dist/compiler/compile-local-variable.d.ts +17 -0
  71. package/dist/compiler/compile-local-variable.d.ts.map +1 -0
  72. package/dist/compiler/compile-local-variable.js +38 -0
  73. package/dist/compiler/compile-local-variable.test.d.ts +2 -0
  74. package/dist/compiler/compile-local-variable.test.d.ts.map +1 -0
  75. package/dist/compiler/compile-local-variable.test.js +71 -0
  76. package/dist/compiler/compile-message.d.ts +8 -0
  77. package/dist/compiler/compile-message.d.ts.map +1 -0
  78. package/dist/compiler/compile-message.js +89 -0
  79. package/dist/compiler/compile-message.test.d.ts +2 -0
  80. package/dist/compiler/compile-message.test.d.ts.map +1 -0
  81. package/dist/compiler/compile-message.test.js +308 -0
  82. package/dist/compiler/compile-pattern.d.ts +20 -0
  83. package/dist/compiler/compile-pattern.d.ts.map +1 -0
  84. package/dist/compiler/compile-pattern.js +40 -0
  85. package/dist/compiler/compile-pattern.test.d.ts +2 -0
  86. package/dist/compiler/compile-pattern.test.d.ts.map +1 -0
  87. package/dist/compiler/compile-pattern.test.js +75 -0
  88. package/dist/compiler/{compileProject.d.ts → compile-project.d.ts} +3 -28
  89. package/dist/compiler/compile-project.d.ts.map +1 -0
  90. package/dist/compiler/compile-project.js +92 -0
  91. package/dist/compiler/compile-project.test.d.ts +2 -0
  92. package/dist/compiler/compile-project.test.d.ts.map +1 -0
  93. package/dist/compiler/compile-project.test.js +867 -0
  94. package/dist/compiler/compile.bench.d.ts +2 -0
  95. package/dist/compiler/compile.bench.d.ts.map +1 -0
  96. package/dist/compiler/compile.bench.js +39 -0
  97. package/dist/compiler/compile.d.ts +8 -8
  98. package/dist/compiler/compile.d.ts.map +1 -1
  99. package/dist/compiler/compile.js +56 -14
  100. package/dist/compiler/compile.test.js +234 -3
  101. package/dist/compiler/compiler-options.d.ts +232 -0
  102. package/dist/compiler/compiler-options.d.ts.map +1 -0
  103. package/dist/compiler/compiler-options.js +13 -0
  104. package/dist/compiler/create-paraglide.d.ts +37 -0
  105. package/dist/compiler/create-paraglide.d.ts.map +1 -0
  106. package/dist/compiler/create-paraglide.js +97 -0
  107. package/dist/compiler/create-paraglide.test.d.ts +2 -0
  108. package/dist/compiler/create-paraglide.test.d.ts.map +1 -0
  109. package/dist/compiler/create-paraglide.test.js +75 -0
  110. package/dist/compiler/index.d.ts +9 -4
  111. package/dist/compiler/index.d.ts.map +1 -1
  112. package/dist/compiler/index.js +6 -4
  113. package/dist/compiler/jsdoc-types.d.ts +15 -0
  114. package/dist/compiler/jsdoc-types.d.ts.map +1 -0
  115. package/dist/compiler/jsdoc-types.js +26 -0
  116. package/dist/compiler/output-structure/locale-modules.d.ts +5 -0
  117. package/dist/compiler/output-structure/locale-modules.d.ts.map +1 -0
  118. package/dist/compiler/output-structure/locale-modules.js +47 -0
  119. package/dist/compiler/output-structure/locale-modules.test.d.ts +2 -0
  120. package/dist/compiler/output-structure/locale-modules.test.d.ts.map +1 -0
  121. package/dist/compiler/output-structure/locale-modules.test.js +61 -0
  122. package/dist/compiler/output-structure/message-modules.d.ts +5 -0
  123. package/dist/compiler/output-structure/message-modules.d.ts.map +1 -0
  124. package/dist/compiler/output-structure/message-modules.js +71 -0
  125. package/dist/compiler/output-structure/message-modules.test.d.ts +2 -0
  126. package/dist/compiler/output-structure/message-modules.test.d.ts.map +1 -0
  127. package/dist/compiler/output-structure/message-modules.test.js +77 -0
  128. package/dist/compiler/registry.d.ts +10 -10
  129. package/dist/compiler/registry.d.ts.map +1 -1
  130. package/dist/compiler/registry.js +23 -34
  131. package/dist/compiler/runtime/assert-is-locale.d.ts +9 -0
  132. package/dist/compiler/runtime/assert-is-locale.d.ts.map +1 -0
  133. package/dist/compiler/runtime/assert-is-locale.js +15 -0
  134. package/dist/compiler/runtime/assert-is-locale.test.d.ts +2 -0
  135. package/dist/compiler/runtime/assert-is-locale.test.d.ts.map +1 -0
  136. package/dist/compiler/runtime/assert-is-locale.test.js +39 -0
  137. package/dist/compiler/runtime/create-runtime.d.ts +18 -0
  138. package/dist/compiler/runtime/create-runtime.d.ts.map +1 -0
  139. package/dist/compiler/runtime/create-runtime.js +103 -0
  140. package/dist/compiler/runtime/extract-locale-from-cookie.d.ts +10 -0
  141. package/dist/compiler/runtime/extract-locale-from-cookie.d.ts.map +1 -0
  142. package/dist/compiler/runtime/extract-locale-from-cookie.js +21 -0
  143. package/dist/compiler/runtime/extract-locale-from-cookie.test.d.ts +2 -0
  144. package/dist/compiler/runtime/extract-locale-from-cookie.test.d.ts.map +1 -0
  145. package/dist/compiler/runtime/extract-locale-from-cookie.test.js +58 -0
  146. package/dist/compiler/runtime/extract-locale-from-request.d.ts +17 -0
  147. package/dist/compiler/runtime/extract-locale-from-request.d.ts.map +1 -0
  148. package/dist/compiler/runtime/extract-locale-from-request.js +91 -0
  149. package/dist/compiler/runtime/extract-locale-from-request.test.d.ts +2 -0
  150. package/dist/compiler/runtime/extract-locale-from-request.test.d.ts.map +1 -0
  151. package/dist/compiler/runtime/extract-locale-from-request.test.js +260 -0
  152. package/dist/compiler/runtime/extract-locale-from-url.d.ts +8 -0
  153. package/dist/compiler/runtime/extract-locale-from-url.d.ts.map +1 -0
  154. package/dist/compiler/runtime/extract-locale-from-url.js +47 -0
  155. package/dist/compiler/runtime/extract-locale-from-url.test.d.ts +2 -0
  156. package/dist/compiler/runtime/extract-locale-from-url.test.d.ts.map +1 -0
  157. package/dist/compiler/runtime/extract-locale-from-url.test.js +137 -0
  158. package/dist/compiler/runtime/generate-static-localized-urls.d.ts +24 -0
  159. package/dist/compiler/runtime/generate-static-localized-urls.d.ts.map +1 -0
  160. package/dist/compiler/runtime/generate-static-localized-urls.js +91 -0
  161. package/dist/compiler/runtime/generate-static-localized-urls.test.d.ts +2 -0
  162. package/dist/compiler/runtime/generate-static-localized-urls.test.d.ts.map +1 -0
  163. package/dist/compiler/runtime/generate-static-localized-urls.test.js +190 -0
  164. package/dist/compiler/runtime/get-locale.d.ts +30 -0
  165. package/dist/compiler/runtime/get-locale.d.ts.map +1 -0
  166. package/dist/compiler/runtime/get-locale.js +120 -0
  167. package/dist/compiler/runtime/get-locale.test.d.ts +2 -0
  168. package/dist/compiler/runtime/get-locale.test.d.ts.map +1 -0
  169. package/dist/compiler/runtime/get-locale.test.js +200 -0
  170. package/dist/compiler/runtime/get-url-origin.d.ts +20 -0
  171. package/dist/compiler/runtime/get-url-origin.d.ts.map +1 -0
  172. package/dist/compiler/runtime/get-url-origin.js +30 -0
  173. package/dist/compiler/runtime/get-url-origin.test.d.ts +2 -0
  174. package/dist/compiler/runtime/get-url-origin.test.d.ts.map +1 -0
  175. package/dist/compiler/runtime/get-url-origin.test.js +28 -0
  176. package/dist/compiler/runtime/is-locale.d.ts +15 -0
  177. package/dist/compiler/runtime/is-locale.d.ts.map +1 -0
  178. package/dist/compiler/runtime/is-locale.js +17 -0
  179. package/dist/compiler/runtime/localize-href.d.ts +82 -0
  180. package/dist/compiler/runtime/localize-href.d.ts.map +1 -0
  181. package/dist/compiler/runtime/localize-href.js +108 -0
  182. package/dist/compiler/runtime/localize-href.test.d.ts +2 -0
  183. package/dist/compiler/runtime/localize-href.test.d.ts.map +1 -0
  184. package/dist/compiler/runtime/localize-href.test.js +160 -0
  185. package/dist/compiler/runtime/localize-url.d.ts +85 -0
  186. package/dist/compiler/runtime/localize-url.d.ts.map +1 -0
  187. package/dist/compiler/runtime/localize-url.js +311 -0
  188. package/dist/compiler/runtime/localize-url.test.d.ts +2 -0
  189. package/dist/compiler/runtime/localize-url.test.d.ts.map +1 -0
  190. package/dist/compiler/runtime/localize-url.test.js +617 -0
  191. package/dist/compiler/runtime/set-locale.d.ts +21 -0
  192. package/dist/compiler/runtime/set-locale.d.ts.map +1 -0
  193. package/dist/compiler/runtime/set-locale.js +107 -0
  194. package/dist/compiler/runtime/set-locale.test.d.ts +2 -0
  195. package/dist/compiler/runtime/set-locale.test.d.ts.map +1 -0
  196. package/dist/compiler/runtime/set-locale.test.js +215 -0
  197. package/dist/compiler/runtime/track-message-call.d.ts +6 -0
  198. package/dist/compiler/runtime/track-message-call.d.ts.map +1 -0
  199. package/dist/compiler/runtime/track-message-call.js +13 -0
  200. package/dist/compiler/runtime/track-message-call.test.d.ts +2 -0
  201. package/dist/compiler/runtime/track-message-call.test.d.ts.map +1 -0
  202. package/dist/compiler/runtime/track-message-call.test.js +26 -0
  203. package/dist/compiler/runtime/type.d.ts +33 -0
  204. package/dist/compiler/runtime/type.d.ts.map +1 -0
  205. package/dist/compiler/runtime/type.test.d.ts +2 -0
  206. package/dist/compiler/runtime/type.test.d.ts.map +1 -0
  207. package/dist/compiler/runtime/type.test.js +91 -0
  208. package/dist/compiler/runtime/variables.d.ts +88 -0
  209. package/dist/compiler/runtime/variables.d.ts.map +1 -0
  210. package/dist/compiler/runtime/variables.js +74 -0
  211. package/dist/compiler/safe-module-id.d.ts +8 -0
  212. package/dist/compiler/safe-module-id.d.ts.map +1 -0
  213. package/dist/{services/valid-js-identifier/reservedWords.js → compiler/safe-module-id.js} +22 -1
  214. package/dist/compiler/safe-module-id.test.d.ts +2 -0
  215. package/dist/compiler/safe-module-id.test.d.ts.map +1 -0
  216. package/dist/compiler/safe-module-id.test.js +30 -0
  217. package/dist/compiler/server/create-server-file.d.ts +12 -0
  218. package/dist/compiler/server/create-server-file.d.ts.map +1 -0
  219. package/dist/compiler/server/create-server-file.js +47 -0
  220. package/dist/compiler/server/middleware.d.ts +66 -0
  221. package/dist/compiler/server/middleware.d.ts.map +1 -0
  222. package/dist/compiler/server/middleware.js +185 -0
  223. package/dist/compiler/server/middleware.test.d.ts +2 -0
  224. package/dist/compiler/server/middleware.test.d.ts.map +1 -0
  225. package/dist/compiler/server/middleware.test.js +435 -0
  226. package/dist/compiler/server/type.d.ts +7 -0
  227. package/dist/compiler/server/type.d.ts.map +1 -0
  228. package/dist/compiler/types.d.ts +17 -2
  229. package/dist/compiler/types.d.ts.map +1 -1
  230. package/dist/compiler/types.js +1 -28
  231. package/dist/index.d.ts +2 -8
  232. package/dist/index.d.ts.map +1 -1
  233. package/dist/index.js +2 -4
  234. package/dist/services/account/index.d.ts +15 -0
  235. package/dist/services/account/index.d.ts.map +1 -0
  236. package/dist/services/account/index.js +42 -0
  237. package/dist/services/env-variables/create-index-file.d.ts +2 -0
  238. package/dist/services/env-variables/create-index-file.d.ts.map +1 -0
  239. package/dist/services/env-variables/create-index-file.js +29 -0
  240. package/dist/services/env-variables/index.js +1 -1
  241. package/dist/services/file-handling/write-output.d.ts +7 -1
  242. package/dist/services/file-handling/write-output.d.ts.map +1 -1
  243. package/dist/services/file-handling/write-output.js +103 -27
  244. package/dist/services/file-handling/write-output.test.js +153 -45
  245. package/dist/services/logger/index.d.ts +0 -4
  246. package/dist/services/logger/index.d.ts.map +1 -1
  247. package/dist/services/logger/index.js +11 -14
  248. package/dist/services/telemetry/capture.d.ts +1 -2
  249. package/dist/services/telemetry/capture.d.ts.map +1 -1
  250. package/dist/services/telemetry/stack-detection.d.ts +1 -1
  251. package/dist/services/telemetry/stack-detection.d.ts.map +1 -1
  252. package/dist/services/telemetry/stack-detection.js +3 -8
  253. package/dist/services/telemetry/stack-detection.test.js +9 -12
  254. package/dist/urlpattern-polyfill/index.d.ts +2 -0
  255. package/dist/urlpattern-polyfill/index.d.ts.map +1 -0
  256. package/dist/urlpattern-polyfill/index.js +1 -0
  257. package/dist/utilities/node-normalize-path.d.ts +2 -0
  258. package/dist/utilities/node-normalize-path.d.ts.map +1 -0
  259. package/dist/utilities/node-normalize-path.js +9 -0
  260. package/package.json +43 -51
  261. package/default/why.txt +0 -3
  262. package/dist/adapter-utils/index.d.ts +0 -6
  263. package/dist/adapter-utils/index.d.ts.map +0 -1
  264. package/dist/adapter-utils/index.js +0 -5
  265. package/dist/adapter-utils/negotiation/language.d.ts +0 -10
  266. package/dist/adapter-utils/negotiation/language.d.ts.map +0 -1
  267. package/dist/adapter-utils/negotiation/language.js +0 -137
  268. package/dist/adapter-utils/negotiation/language.test.d.ts +0 -2
  269. package/dist/adapter-utils/negotiation/language.test.d.ts.map +0 -1
  270. package/dist/adapter-utils/negotiation/language.test.js +0 -24
  271. package/dist/adapter-utils/routing/detectLanguage.d.ts +0 -25
  272. package/dist/adapter-utils/routing/detectLanguage.d.ts.map +0 -1
  273. package/dist/adapter-utils/routing/detectLanguage.js +0 -32
  274. package/dist/adapter-utils/routing/detectLanguage.test.d.ts +0 -2
  275. package/dist/adapter-utils/routing/detectLanguage.test.d.ts.map +0 -1
  276. package/dist/adapter-utils/routing/detectLanguage.test.js +0 -37
  277. package/dist/adapter-utils/routing/resolveUserPathDefinition.test.d.ts +0 -2
  278. package/dist/adapter-utils/routing/resolveUserPathDefinition.test.d.ts.map +0 -1
  279. package/dist/adapter-utils/routing/resolveUserPathDefinition.test.js +0 -35
  280. package/dist/adapter-utils/routing/resolveUserPathDefinitions.d.ts +0 -40
  281. package/dist/adapter-utils/routing/resolveUserPathDefinitions.d.ts.map +0 -1
  282. package/dist/adapter-utils/routing/resolveUserPathDefinitions.js +0 -22
  283. package/dist/adapter-utils/routing/routeDefinitions.d.ts +0 -48
  284. package/dist/adapter-utils/routing/routeDefinitions.d.ts.map +0 -1
  285. package/dist/adapter-utils/routing/routeDefinitions.js +0 -224
  286. package/dist/adapter-utils/routing/routeDefinitions.test.d.ts +0 -2
  287. package/dist/adapter-utils/routing/routeDefinitions.test.d.ts.map +0 -1
  288. package/dist/adapter-utils/routing/routeDefinitions.test.js +0 -234
  289. package/dist/adapter-utils/routing/sortRoutes.d.ts +0 -2
  290. package/dist/adapter-utils/routing/sortRoutes.d.ts.map +0 -1
  291. package/dist/adapter-utils/routing/sortRoutes.js +0 -135
  292. package/dist/adapter-utils/routing/validatePathTranslations.d.ts +0 -15
  293. package/dist/adapter-utils/routing/validatePathTranslations.d.ts.map +0 -1
  294. package/dist/adapter-utils/routing/validatePathTranslations.js +0 -98
  295. package/dist/adapter-utils/routing/validatePathTranslations.test.d.ts +0 -2
  296. package/dist/adapter-utils/routing/validatePathTranslations.test.d.ts.map +0 -1
  297. package/dist/adapter-utils/routing/validatePathTranslations.test.js +0 -121
  298. package/dist/cli/steps/run-compiler.d.ts +0 -9
  299. package/dist/cli/steps/run-compiler.d.ts.map +0 -1
  300. package/dist/cli/steps/run-compiler.js +0 -13
  301. package/dist/compiler/compileBundle.d.ts.map +0 -1
  302. package/dist/compiler/compileBundle.js +0 -55
  303. package/dist/compiler/compileExpression.d.ts +0 -5
  304. package/dist/compiler/compileExpression.d.ts.map +0 -1
  305. package/dist/compiler/compileExpression.js +0 -41
  306. package/dist/compiler/compileMessage.d.ts +0 -12
  307. package/dist/compiler/compileMessage.d.ts.map +0 -1
  308. package/dist/compiler/compileMessage.js +0 -64
  309. package/dist/compiler/compileMessage.test.d.ts +0 -2
  310. package/dist/compiler/compileMessage.test.d.ts.map +0 -1
  311. package/dist/compiler/compileMessage.test.js +0 -74
  312. package/dist/compiler/compilePattern.d.ts +0 -12
  313. package/dist/compiler/compilePattern.d.ts.map +0 -1
  314. package/dist/compiler/compilePattern.js +0 -28
  315. package/dist/compiler/compilePattern.test.d.ts +0 -2
  316. package/dist/compiler/compilePattern.test.d.ts.map +0 -1
  317. package/dist/compiler/compilePattern.test.js +0 -67
  318. package/dist/compiler/compileProject.d.ts.map +0 -1
  319. package/dist/compiler/compileProject.js +0 -204
  320. package/dist/compiler/compileProject.test.d.ts +0 -2
  321. package/dist/compiler/compileProject.test.d.ts.map +0 -1
  322. package/dist/compiler/compileProject.test.js +0 -638
  323. package/dist/compiler/emit-dts.d.ts +0 -6
  324. package/dist/compiler/emit-dts.d.ts.map +0 -1
  325. package/dist/compiler/emit-dts.js +0 -50
  326. package/dist/compiler/emit-dts.test.d.ts +0 -2
  327. package/dist/compiler/emit-dts.test.d.ts.map +0 -1
  328. package/dist/compiler/emit-dts.test.js +0 -40
  329. package/dist/compiler/jsDocComment.d.ts +0 -9
  330. package/dist/compiler/jsDocComment.d.ts.map +0 -1
  331. package/dist/compiler/jsDocComment.js +0 -29
  332. package/dist/compiler/runtime.d.ts +0 -6
  333. package/dist/compiler/runtime.d.ts.map +0 -1
  334. package/dist/compiler/runtime.js +0 -199
  335. package/dist/services/codegen/identifier.d.ts +0 -6
  336. package/dist/services/codegen/identifier.d.ts.map +0 -1
  337. package/dist/services/codegen/identifier.js +0 -11
  338. package/dist/services/codegen/indentifier.test.d.ts +0 -2
  339. package/dist/services/codegen/indentifier.test.d.ts.map +0 -1
  340. package/dist/services/codegen/indentifier.test.js +0 -8
  341. package/dist/services/telemetry/events.d.ts +0 -7
  342. package/dist/services/telemetry/events.d.ts.map +0 -1
  343. package/dist/services/telemetry/events.js +0 -1
  344. package/dist/services/valid-js-identifier/index.d.ts +0 -6
  345. package/dist/services/valid-js-identifier/index.d.ts.map +0 -1
  346. package/dist/services/valid-js-identifier/index.js +0 -24
  347. package/dist/services/valid-js-identifier/index.test.d.ts +0 -2
  348. package/dist/services/valid-js-identifier/index.test.d.ts.map +0 -1
  349. package/dist/services/valid-js-identifier/index.test.js +0 -30
  350. package/dist/services/valid-js-identifier/reservedWords.d.ts +0 -2
  351. package/dist/services/valid-js-identifier/reservedWords.d.ts.map +0 -1
  352. package/node_modules/@inlang/sdk/LICENSE +0 -201
  353. package/node_modules/@inlang/sdk/README.md +0 -16
  354. package/node_modules/@inlang/sdk/dist/database/initDb.d.ts +0 -7
  355. package/node_modules/@inlang/sdk/dist/database/initDb.d.ts.map +0 -1
  356. package/node_modules/@inlang/sdk/dist/database/initDb.js +0 -36
  357. package/node_modules/@inlang/sdk/dist/database/initDb.js.map +0 -1
  358. package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.d.ts +0 -2
  359. package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.d.ts.map +0 -1
  360. package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.js +0 -110
  361. package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.js.map +0 -1
  362. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.d.ts +0 -20
  363. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.d.ts.map +0 -1
  364. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.js +0 -183
  365. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.js.map +0 -1
  366. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.d.ts +0 -2
  367. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.d.ts.map +0 -1
  368. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.js +0 -119
  369. package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.js.map +0 -1
  370. package/node_modules/@inlang/sdk/dist/database/schema.d.ts +0 -74
  371. package/node_modules/@inlang/sdk/dist/database/schema.d.ts.map +0 -1
  372. package/node_modules/@inlang/sdk/dist/database/schema.js +0 -45
  373. package/node_modules/@inlang/sdk/dist/database/schema.js.map +0 -1
  374. package/node_modules/@inlang/sdk/dist/helper.d.ts +0 -71
  375. package/node_modules/@inlang/sdk/dist/helper.d.ts.map +0 -1
  376. package/node_modules/@inlang/sdk/dist/helper.js +0 -91
  377. package/node_modules/@inlang/sdk/dist/helper.js.map +0 -1
  378. package/node_modules/@inlang/sdk/dist/human-id/human-id.d.ts +0 -3
  379. package/node_modules/@inlang/sdk/dist/human-id/human-id.d.ts.map +0 -1
  380. package/node_modules/@inlang/sdk/dist/human-id/human-id.js +0 -12
  381. package/node_modules/@inlang/sdk/dist/human-id/human-id.js.map +0 -1
  382. package/node_modules/@inlang/sdk/dist/human-id/words.d.ts +0 -5
  383. package/node_modules/@inlang/sdk/dist/human-id/words.d.ts.map +0 -1
  384. package/node_modules/@inlang/sdk/dist/human-id/words.js +0 -1036
  385. package/node_modules/@inlang/sdk/dist/human-id/words.js.map +0 -1
  386. package/node_modules/@inlang/sdk/dist/human-id/words.test.d.ts +0 -2
  387. package/node_modules/@inlang/sdk/dist/human-id/words.test.d.ts.map +0 -1
  388. package/node_modules/@inlang/sdk/dist/human-id/words.test.js +0 -29
  389. package/node_modules/@inlang/sdk/dist/human-id/words.test.js.map +0 -1
  390. package/node_modules/@inlang/sdk/dist/import-export/exportFiles.d.ts +0 -11
  391. package/node_modules/@inlang/sdk/dist/import-export/exportFiles.d.ts.map +0 -1
  392. package/node_modules/@inlang/sdk/dist/import-export/exportFiles.js +0 -26
  393. package/node_modules/@inlang/sdk/dist/import-export/exportFiles.js.map +0 -1
  394. package/node_modules/@inlang/sdk/dist/import-export/importFiles.d.ts +0 -13
  395. package/node_modules/@inlang/sdk/dist/import-export/importFiles.d.ts.map +0 -1
  396. package/node_modules/@inlang/sdk/dist/import-export/importFiles.js +0 -124
  397. package/node_modules/@inlang/sdk/dist/import-export/importFiles.js.map +0 -1
  398. package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.d.ts +0 -2
  399. package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.d.ts.map +0 -1
  400. package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.js +0 -179
  401. package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.js.map +0 -1
  402. package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.d.ts +0 -2
  403. package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.d.ts.map +0 -1
  404. package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.js +0 -273
  405. package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.js.map +0 -1
  406. package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.d.ts +0 -4
  407. package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.d.ts.map +0 -1
  408. package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.js +0 -58
  409. package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.js.map +0 -1
  410. package/node_modules/@inlang/sdk/dist/index.d.ts +0 -24
  411. package/node_modules/@inlang/sdk/dist/index.d.ts.map +0 -1
  412. package/node_modules/@inlang/sdk/dist/index.js +0 -22
  413. package/node_modules/@inlang/sdk/dist/index.js.map +0 -1
  414. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.d.ts +0 -9
  415. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.d.ts.map +0 -1
  416. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.js +0 -84
  417. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.js.map +0 -1
  418. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.d.ts +0 -2
  419. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.d.ts.map +0 -1
  420. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.js +0 -85
  421. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.js.map +0 -1
  422. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.d.ts +0 -86
  423. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.d.ts.map +0 -1
  424. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.js +0 -35
  425. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.js.map +0 -1
  426. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.d.ts +0 -9
  427. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.d.ts.map +0 -1
  428. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.js +0 -67
  429. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.js.map +0 -1
  430. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.d.ts +0 -2
  431. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.d.ts.map +0 -1
  432. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.js +0 -85
  433. package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.js.map +0 -1
  434. package/node_modules/@inlang/sdk/dist/json-schema/pattern.d.ts +0 -190
  435. package/node_modules/@inlang/sdk/dist/json-schema/pattern.d.ts.map +0 -1
  436. package/node_modules/@inlang/sdk/dist/json-schema/pattern.js +0 -43
  437. package/node_modules/@inlang/sdk/dist/json-schema/pattern.js.map +0 -1
  438. package/node_modules/@inlang/sdk/dist/json-schema/settings.d.ts +0 -31
  439. package/node_modules/@inlang/sdk/dist/json-schema/settings.d.ts.map +0 -1
  440. package/node_modules/@inlang/sdk/dist/json-schema/settings.js +0 -96
  441. package/node_modules/@inlang/sdk/dist/json-schema/settings.js.map +0 -1
  442. package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.d.ts +0 -2
  443. package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.d.ts.map +0 -1
  444. package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.js +0 -20
  445. package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.js.map +0 -1
  446. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.d.ts +0 -3
  447. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.d.ts.map +0 -1
  448. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.js +0 -127
  449. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.js.map +0 -1
  450. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.d.ts +0 -2
  451. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.d.ts.map +0 -1
  452. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.js +0 -135
  453. package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.js.map +0 -1
  454. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.d.ts +0 -3
  455. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.d.ts.map +0 -1
  456. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.js +0 -47
  457. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.js.map +0 -1
  458. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.d.ts +0 -2
  459. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.d.ts.map +0 -1
  460. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.js +0 -251
  461. package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.js.map +0 -1
  462. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.d.ts +0 -8
  463. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.d.ts.map +0 -1
  464. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.js +0 -109
  465. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.js.map +0 -1
  466. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.d.ts +0 -2
  467. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.d.ts.map +0 -1
  468. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.js +0 -418
  469. package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.js.map +0 -1
  470. package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.d.ts +0 -2
  471. package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.d.ts.map +0 -1
  472. package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.js +0 -120
  473. package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.js.map +0 -1
  474. package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.d.ts +0 -2
  475. package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.d.ts.map +0 -1
  476. package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.js +0 -176
  477. package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.js.map +0 -1
  478. package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.d.ts +0 -28
  479. package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.d.ts.map +0 -1
  480. package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.js +0 -31
  481. package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.js.map +0 -1
  482. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.d.ts +0 -9
  483. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.d.ts.map +0 -1
  484. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.js +0 -31
  485. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.js.map +0 -1
  486. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.d.ts +0 -2
  487. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.d.ts.map +0 -1
  488. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js +0 -45
  489. package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js.map +0 -1
  490. package/node_modules/@inlang/sdk/dist/plugin/cache.d.ts +0 -6
  491. package/node_modules/@inlang/sdk/dist/plugin/cache.d.ts.map +0 -1
  492. package/node_modules/@inlang/sdk/dist/plugin/cache.js +0 -59
  493. package/node_modules/@inlang/sdk/dist/plugin/cache.js.map +0 -1
  494. package/node_modules/@inlang/sdk/dist/plugin/cache.test.d.ts +0 -2
  495. package/node_modules/@inlang/sdk/dist/plugin/cache.test.d.ts.map +0 -1
  496. package/node_modules/@inlang/sdk/dist/plugin/cache.test.js +0 -61
  497. package/node_modules/@inlang/sdk/dist/plugin/cache.test.js.map +0 -1
  498. package/node_modules/@inlang/sdk/dist/plugin/errors.d.ts +0 -41
  499. package/node_modules/@inlang/sdk/dist/plugin/errors.d.ts.map +0 -1
  500. package/node_modules/@inlang/sdk/dist/plugin/errors.js +0 -48
  501. package/node_modules/@inlang/sdk/dist/plugin/errors.js.map +0 -1
  502. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.d.ts +0 -19
  503. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.d.ts.map +0 -1
  504. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.js +0 -43
  505. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.js.map +0 -1
  506. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.d.ts +0 -2
  507. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.d.ts.map +0 -1
  508. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.js +0 -95
  509. package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.js.map +0 -1
  510. package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.d.ts +0 -54
  511. package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.d.ts.map +0 -1
  512. package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.js +0 -5
  513. package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.js.map +0 -1
  514. package/node_modules/@inlang/sdk/dist/plugin/schema.d.ts +0 -152
  515. package/node_modules/@inlang/sdk/dist/plugin/schema.d.ts.map +0 -1
  516. package/node_modules/@inlang/sdk/dist/plugin/schema.js +0 -5
  517. package/node_modules/@inlang/sdk/dist/plugin/schema.js.map +0 -1
  518. package/node_modules/@inlang/sdk/dist/project/api.d.ts +0 -78
  519. package/node_modules/@inlang/sdk/dist/project/api.d.ts.map +0 -1
  520. package/node_modules/@inlang/sdk/dist/project/api.js +0 -5
  521. package/node_modules/@inlang/sdk/dist/project/api.js.map +0 -1
  522. package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.d.ts +0 -14
  523. package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.d.ts.map +0 -1
  524. package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.js +0 -81
  525. package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.js.map +0 -1
  526. package/node_modules/@inlang/sdk/dist/project/loadProject.d.ts +0 -43
  527. package/node_modules/@inlang/sdk/dist/project/loadProject.d.ts.map +0 -1
  528. package/node_modules/@inlang/sdk/dist/project/loadProject.js +0 -105
  529. package/node_modules/@inlang/sdk/dist/project/loadProject.js.map +0 -1
  530. package/node_modules/@inlang/sdk/dist/project/loadProject.test.d.ts +0 -2
  531. package/node_modules/@inlang/sdk/dist/project/loadProject.test.d.ts.map +0 -1
  532. package/node_modules/@inlang/sdk/dist/project/loadProject.test.js +0 -123
  533. package/node_modules/@inlang/sdk/dist/project/loadProject.test.js.map +0 -1
  534. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.d.ts +0 -87
  535. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.d.ts.map +0 -1
  536. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.js +0 -593
  537. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.js.map +0 -1
  538. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.d.ts +0 -2
  539. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.d.ts.map +0 -1
  540. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.js +0 -642
  541. package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.js.map +0 -1
  542. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.d.ts +0 -8
  543. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.d.ts.map +0 -1
  544. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.js +0 -31
  545. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.js.map +0 -1
  546. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.d.ts +0 -2
  547. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.d.ts.map +0 -1
  548. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.js +0 -27
  549. package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.js.map +0 -1
  550. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.d.ts +0 -9
  551. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.d.ts.map +0 -1
  552. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.js +0 -46
  553. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.js.map +0 -1
  554. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.d.ts +0 -2
  555. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.d.ts.map +0 -1
  556. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.js +0 -60
  557. package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.js.map +0 -1
  558. package/node_modules/@inlang/sdk/dist/project/newProject.d.ts +0 -17
  559. package/node_modules/@inlang/sdk/dist/project/newProject.d.ts.map +0 -1
  560. package/node_modules/@inlang/sdk/dist/project/newProject.js +0 -70
  561. package/node_modules/@inlang/sdk/dist/project/newProject.js.map +0 -1
  562. package/node_modules/@inlang/sdk/dist/project/newProject.test.d.ts +0 -2
  563. package/node_modules/@inlang/sdk/dist/project/newProject.test.d.ts.map +0 -1
  564. package/node_modules/@inlang/sdk/dist/project/newProject.test.js +0 -37
  565. package/node_modules/@inlang/sdk/dist/project/newProject.test.js.map +0 -1
  566. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.d.ts +0 -8
  567. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.d.ts.map +0 -1
  568. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.js +0 -86
  569. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.js.map +0 -1
  570. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.d.ts +0 -2
  571. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.d.ts.map +0 -1
  572. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.js +0 -245
  573. package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.js.map +0 -1
  574. package/node_modules/@inlang/sdk/dist/project/state/id$.d.ts +0 -6
  575. package/node_modules/@inlang/sdk/dist/project/state/id$.d.ts.map +0 -1
  576. package/node_modules/@inlang/sdk/dist/project/state/id$.js +0 -19
  577. package/node_modules/@inlang/sdk/dist/project/state/id$.js.map +0 -1
  578. package/node_modules/@inlang/sdk/dist/project/state/id$.test.d.ts +0 -2
  579. package/node_modules/@inlang/sdk/dist/project/state/id$.test.d.ts.map +0 -1
  580. package/node_modules/@inlang/sdk/dist/project/state/id$.test.js +0 -36
  581. package/node_modules/@inlang/sdk/dist/project/state/id$.test.js.map +0 -1
  582. package/node_modules/@inlang/sdk/dist/project/state/setSettings.d.ts +0 -7
  583. package/node_modules/@inlang/sdk/dist/project/state/setSettings.d.ts.map +0 -1
  584. package/node_modules/@inlang/sdk/dist/project/state/setSettings.js +0 -16
  585. package/node_modules/@inlang/sdk/dist/project/state/setSettings.js.map +0 -1
  586. package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.d.ts +0 -2
  587. package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.d.ts.map +0 -1
  588. package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.js +0 -58
  589. package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.js.map +0 -1
  590. package/node_modules/@inlang/sdk/dist/project/state/settings$.d.ts +0 -7
  591. package/node_modules/@inlang/sdk/dist/project/state/settings$.d.ts.map +0 -1
  592. package/node_modules/@inlang/sdk/dist/project/state/settings$.js +0 -21
  593. package/node_modules/@inlang/sdk/dist/project/state/settings$.js.map +0 -1
  594. package/node_modules/@inlang/sdk/dist/project/state/settings$.test.d.ts +0 -2
  595. package/node_modules/@inlang/sdk/dist/project/state/settings$.test.d.ts.map +0 -1
  596. package/node_modules/@inlang/sdk/dist/project/state/settings$.test.js +0 -51
  597. package/node_modules/@inlang/sdk/dist/project/state/settings$.test.js.map +0 -1
  598. package/node_modules/@inlang/sdk/dist/project/state/state.d.ts +0 -58
  599. package/node_modules/@inlang/sdk/dist/project/state/state.d.ts.map +0 -1
  600. package/node_modules/@inlang/sdk/dist/project/state/state.js +0 -67
  601. package/node_modules/@inlang/sdk/dist/project/state/state.js.map +0 -1
  602. package/node_modules/@inlang/sdk/dist/project/state/state.test.d.ts +0 -2
  603. package/node_modules/@inlang/sdk/dist/project/state/state.test.d.ts.map +0 -1
  604. package/node_modules/@inlang/sdk/dist/project/state/state.test.js +0 -103
  605. package/node_modules/@inlang/sdk/dist/project/state/state.test.js.map +0 -1
  606. package/node_modules/@inlang/sdk/dist/query-utilities/index.d.ts +0 -6
  607. package/node_modules/@inlang/sdk/dist/query-utilities/index.d.ts.map +0 -1
  608. package/node_modules/@inlang/sdk/dist/query-utilities/index.js +0 -9
  609. package/node_modules/@inlang/sdk/dist/query-utilities/index.js.map +0 -1
  610. package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.d.ts +0 -4
  611. package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.d.ts.map +0 -1
  612. package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.js +0 -39
  613. package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.js.map +0 -1
  614. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.d.ts +0 -14
  615. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.d.ts.map +0 -1
  616. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.js +0 -22
  617. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.js.map +0 -1
  618. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.d.ts +0 -2
  619. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.d.ts.map +0 -1
  620. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.js +0 -67
  621. package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.js.map +0 -1
  622. package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.d.ts +0 -107
  623. package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.d.ts.map +0 -1
  624. package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.js +0 -43
  625. package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.js.map +0 -1
  626. package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.d.ts +0 -12
  627. package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.d.ts.map +0 -1
  628. package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.js +0 -25
  629. package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.js.map +0 -1
  630. package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.d.ts +0 -4
  631. package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.d.ts.map +0 -1
  632. package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.js +0 -50
  633. package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.js.map +0 -1
  634. package/node_modules/@inlang/sdk/dist/services/env-variables/index.d.ts +0 -6
  635. package/node_modules/@inlang/sdk/dist/services/env-variables/index.d.ts.map +0 -1
  636. package/node_modules/@inlang/sdk/dist/services/env-variables/index.js +0 -9
  637. package/node_modules/@inlang/sdk/dist/services/env-variables/index.js.map +0 -1
  638. package/node_modules/@inlang/sdk/dist/services/error-reporting/index.d.ts +0 -15
  639. package/node_modules/@inlang/sdk/dist/services/error-reporting/index.d.ts.map +0 -1
  640. package/node_modules/@inlang/sdk/dist/services/error-reporting/index.js +0 -30
  641. package/node_modules/@inlang/sdk/dist/services/error-reporting/index.js.map +0 -1
  642. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.d.ts +0 -23
  643. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.d.ts.map +0 -1
  644. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.js +0 -77
  645. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.js.map +0 -1
  646. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.d.ts +0 -2
  647. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.d.ts.map +0 -1
  648. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.js +0 -44
  649. package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.js.map +0 -1
  650. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.d.ts +0 -11
  651. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.d.ts.map +0 -1
  652. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.js +0 -83
  653. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.js.map +0 -1
  654. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.d.ts +0 -2
  655. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.d.ts.map +0 -1
  656. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.js +0 -33
  657. package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.js.map +0 -1
  658. package/node_modules/@inlang/sdk/package.json +0 -64
  659. package/node_modules/@inlang/sdk/src/database/initDb.ts +0 -34
  660. package/node_modules/@inlang/sdk/src/database/initDbAndSchema.test.ts +0 -125
  661. package/node_modules/@inlang/sdk/src/database/jsonbPlugin.test.ts +0 -154
  662. package/node_modules/@inlang/sdk/src/database/jsonbPlugin.ts +0 -215
  663. package/node_modules/@inlang/sdk/src/database/schema.ts +0 -127
  664. package/node_modules/@inlang/sdk/src/helper.ts +0 -113
  665. package/node_modules/@inlang/sdk/src/human-id/human-id.ts +0 -14
  666. package/node_modules/@inlang/sdk/src/human-id/words.test.ts +0 -27
  667. package/node_modules/@inlang/sdk/src/human-id/words.ts +0 -1035
  668. package/node_modules/@inlang/sdk/src/import-export/exportFiles.ts +0 -36
  669. package/node_modules/@inlang/sdk/src/import-export/importFiles.test.ts +0 -211
  670. package/node_modules/@inlang/sdk/src/import-export/importFiles.ts +0 -142
  671. package/node_modules/@inlang/sdk/src/import-export/roundtrip.test.ts +0 -313
  672. package/node_modules/@inlang/sdk/src/import-export/upsertBundleNestedMatchByProperties.ts +0 -74
  673. package/node_modules/@inlang/sdk/src/index.ts +0 -32
  674. package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/README.md +0 -1
  675. package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/fromMessageV1.test.ts +0 -87
  676. package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/fromMessageV1.ts +0 -99
  677. package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/schemaV1.ts +0 -66
  678. package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/toMessageV1.test.ts +0 -87
  679. package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/toMessageV1.ts +0 -79
  680. package/node_modules/@inlang/sdk/src/json-schema/pattern.ts +0 -59
  681. package/node_modules/@inlang/sdk/src/json-schema/settings.test-d.ts +0 -21
  682. package/node_modules/@inlang/sdk/src/json-schema/settings.ts +0 -138
  683. package/node_modules/@inlang/sdk/src/lix-plugin/applyChanges.test.ts +0 -150
  684. package/node_modules/@inlang/sdk/src/lix-plugin/applyChanges.ts +0 -171
  685. package/node_modules/@inlang/sdk/src/lix-plugin/detectConflicts.test.ts +0 -286
  686. package/node_modules/@inlang/sdk/src/lix-plugin/detectConflicts.ts +0 -62
  687. package/node_modules/@inlang/sdk/src/lix-plugin/inlangLixPluginV1.test.ts +0 -439
  688. package/node_modules/@inlang/sdk/src/lix-plugin/inlangLixPluginV1.ts +0 -132
  689. package/node_modules/@inlang/sdk/src/lix-plugin/merge.test.ts +0 -133
  690. package/node_modules/@inlang/sdk/src/lix-plugin/resolveConflictBySelecting.test.ts +0 -188
  691. package/node_modules/@inlang/sdk/src/migrations/v2/createMessageV1.ts +0 -37
  692. package/node_modules/@inlang/sdk/src/migrations/v2/withLanguageTagToLocaleMigration.test.ts +0 -51
  693. package/node_modules/@inlang/sdk/src/migrations/v2/withLanguageTagToLocaleMigration.ts +0 -31
  694. package/node_modules/@inlang/sdk/src/plugin/cache.test.ts +0 -83
  695. package/node_modules/@inlang/sdk/src/plugin/cache.ts +0 -79
  696. package/node_modules/@inlang/sdk/src/plugin/errors.ts +0 -67
  697. package/node_modules/@inlang/sdk/src/plugin/importPlugins.test.ts +0 -107
  698. package/node_modules/@inlang/sdk/src/plugin/importPlugins.ts +0 -60
  699. package/node_modules/@inlang/sdk/src/plugin/meta/ideExtension.ts +0 -56
  700. package/node_modules/@inlang/sdk/src/plugin/schema.ts +0 -165
  701. package/node_modules/@inlang/sdk/src/project/api.ts +0 -81
  702. package/node_modules/@inlang/sdk/src/project/initHandleSaveToLixOnChange.ts +0 -88
  703. package/node_modules/@inlang/sdk/src/project/loadProject.test.ts +0 -148
  704. package/node_modules/@inlang/sdk/src/project/loadProject.ts +0 -153
  705. package/node_modules/@inlang/sdk/src/project/loadProjectFromDirectory.test.ts +0 -819
  706. package/node_modules/@inlang/sdk/src/project/loadProjectFromDirectory.ts +0 -767
  707. package/node_modules/@inlang/sdk/src/project/loadProjectInMemory.test.ts +0 -29
  708. package/node_modules/@inlang/sdk/src/project/loadProjectInMemory.ts +0 -35
  709. package/node_modules/@inlang/sdk/src/project/maybeCaptureTelemetry.test.ts +0 -65
  710. package/node_modules/@inlang/sdk/src/project/maybeCaptureTelemetry.ts +0 -51
  711. package/node_modules/@inlang/sdk/src/project/newProject.test.ts +0 -36
  712. package/node_modules/@inlang/sdk/src/project/newProject.ts +0 -77
  713. package/node_modules/@inlang/sdk/src/project/saveProjectToDirectory.test.ts +0 -310
  714. package/node_modules/@inlang/sdk/src/project/saveProjectToDirectory.ts +0 -100
  715. package/node_modules/@inlang/sdk/src/project/state/README.md +0 -22
  716. package/node_modules/@inlang/sdk/src/project/state/id$.test.ts +0 -40
  717. package/node_modules/@inlang/sdk/src/project/state/id$.ts +0 -21
  718. package/node_modules/@inlang/sdk/src/project/state/setSettings.test.ts +0 -73
  719. package/node_modules/@inlang/sdk/src/project/state/setSettings.ts +0 -19
  720. package/node_modules/@inlang/sdk/src/project/state/settings$.test.ts +0 -63
  721. package/node_modules/@inlang/sdk/src/project/state/settings$.ts +0 -26
  722. package/node_modules/@inlang/sdk/src/project/state/state.test.ts +0 -128
  723. package/node_modules/@inlang/sdk/src/project/state/state.ts +0 -94
  724. package/node_modules/@inlang/sdk/src/query-utilities/index.ts +0 -5
  725. package/node_modules/@inlang/sdk/src/query-utilities/insertBundleNested.ts +0 -46
  726. package/node_modules/@inlang/sdk/src/query-utilities/pollQuery.test.ts +0 -88
  727. package/node_modules/@inlang/sdk/src/query-utilities/pollQuery.ts +0 -26
  728. package/node_modules/@inlang/sdk/src/query-utilities/selectBundleNested.ts +0 -46
  729. package/node_modules/@inlang/sdk/src/query-utilities/updateBundleNested.ts +0 -35
  730. package/node_modules/@inlang/sdk/src/query-utilities/upsertBundleNested.ts +0 -61
  731. package/node_modules/@inlang/sdk/src/services/env-variables/createIndexFile.js +0 -40
  732. package/node_modules/@inlang/sdk/src/services/env-variables/index.d.ts +0 -16
  733. package/node_modules/@inlang/sdk/src/services/env-variables/index.ts +0 -6
  734. package/node_modules/@inlang/sdk/src/services/error-reporting/index.ts +0 -28
  735. package/node_modules/@inlang/sdk/src/services/telemetry/capture.test.ts +0 -48
  736. package/node_modules/@inlang/sdk/src/services/telemetry/capture.ts +0 -98
  737. package/node_modules/@inlang/sdk/src/utilities/detectJsonFormatting.test.ts +0 -38
  738. package/node_modules/@inlang/sdk/src/utilities/detectJsonFormatting.ts +0 -109
  739. /package/{default/index.d.ts → dist/compiler/runtime/type.js} +0 -0
  740. /package/{default/index.js → dist/compiler/server/type.js} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Opral US Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,77 +1,14 @@
1
1
  [![Inlang-ecosystem compatibility badge](https://cdn.jsdelivr.net/gh/opral/monorepo@main/inlang/assets/md-badges/inlang.svg)](https://inlang.com)
2
2
 
3
- # Getting started
3
+ [![NPM Downloads](https://img.shields.io/npm/dw/%40inlang%2Fparaglide-js?logo=npm&logoColor=red&label=npm%20downloads)](https://www.npmjs.com/package/@inlang/paraglide-js)
4
+ [![Closed github issues](https://img.shields.io/github/issues-closed/opral/paraglide-js?logo=github&color=purple)](https://github.com/opral/inlang-paraglide-js/issues)
5
+ [![Monorepo contributors](https://img.shields.io/github/contributors/opral/monorepo?logo=github)](https://github.com/opral/monorepo/graphs/contributors)
4
6
 
5
- To use Paraglide standalone without a framework, run the following command:
6
7
 
7
- ```bash
8
- npx @inlang/paraglide-js@latest init
9
- ```
8
+ A compiler-based i18n library that emits tree-shakable message functions. This means that only the messages you actually use are loaded without asynchronous waterfalls.
10
9
 
11
- This will:
10
+ Visit https://inlang.com/m/gerre34r/library-inlang-paraglideJs to learn more.
12
11
 
13
- - Install necessary dependencies
14
- - Generate a `messages/` folder where your translation files live
15
- - Add the Paraglide compiler to your `build` script in `package.json`
16
- - Create necessary configuration files
12
+ ## Contributing
17
13
 
18
- Running the Paraglide compiler will generate a `src/paraglide` folder. This folder contains all the code that you will use in your app.
19
-
20
- ## Adding and Editing Messages
21
-
22
- Messages are stored in `messages/{lang}.json` as key-value pairs. You can add parameters with curly braces.
23
-
24
- ```diff
25
- // messages/en.json
26
- {
27
- "$schema": "https://inlang.com/schema/inlang-message-format",
28
- + "greeting": "Hello {name}!"
29
- }
30
- ```
31
-
32
- Make sure to re-run the paraglide compiler after editing your messages.
33
-
34
- ```bash
35
- npx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/paraglide
36
- ```
37
-
38
- If you are using a Bundler use one of the [Bundler Plugins](usage#usage-with-a-bundler) to recompile automatically.
39
-
40
- ## Using Messages in Code
41
-
42
- After running the compiler import the messages with `import * as m from "./paraglide/messages"`. By convention, a wildcard import is used.
43
-
44
- ```js
45
- import * as m from "./paraglide/messages.js";
46
-
47
- m.hello(); // Hello world!
48
- m.loginHeader({ name: "Samuel" }); // Hello Samuel, please login to continue.
49
- ```
50
-
51
- # Playground
52
-
53
- Find examples of how to use Paraglide on CodeSandbox or in [our GitHub repository](https://github.com/opral/monorepo/tree/main/inlang/packages/paraglide).
54
-
55
- <doc-links>
56
- <doc-link title="NextJS + Paraglide JS" icon="lucide:codesandbox" href="https://stackblitz.com/~/LorisSigrist/paraglide-next-app-router-example" description="Play around with NextJS and Paraglide JS"></doc-link>
57
- <doc-link title="Svelte + Paraglide JS" icon="lucide:codesandbox" href="https://stackblitz.com/~/github.com/LorisSigrist/paraglide-sveltekit-example" description="Play around with Svelte and Paraglide JS"></doc-link>
58
- <doc-link title="Astro + Paraglide JS" icon="lucide:codesandbox" href="https://stackblitz.com/~/github.com/LorisSigrist/paraglide-astro-example" description="Play around with Astro and Paraglide JS"></doc-link>
59
- </doc-links>
60
-
61
- # Roadmap
62
-
63
- Of course, we're not done yet! We plan on adding the following features to Paraglide JS soon:
64
-
65
- - [ ] Pluralization ([Join the Discussion](https://github.com/opral/monorepo/discussions/2025))
66
- - [ ] Formatting of numbers and dates ([Join the Discussion](https://github.com/opral/monorepo/discussions/992))
67
- - [ ] Markup Placeholders ([Join the Discussion](https://github.com/opral/monorepo/discussions/913))
68
- - [ ] Component Interpolation
69
- - [ ] Per-Language Splitting without Lazy-Loading
70
- - [ ] Even Smaller Output
71
-
72
- # Talks
73
-
74
- - [Svelte Summit Spring 2023](https://www.youtube.com/watch?v=Y6IbPfMU1xM)
75
- - [Svelte Summit Fall 2023](https://www.youtube.com/watch?v=-YES3CCAG90)
76
- - Web Zurich December 2023
77
- - [Svelte London January 2024](https://www.youtube.com/watch?v=eswNQiq4T2w&t=646s)
14
+ Read the [CONTRIBUTING.md](https://github.com/opral/monorepo/blob/main/inlang/packages/paraglide/paraglide-js/CONTRIBUTING.md) file to learn more on how to contribute.
@@ -0,0 +1,2 @@
1
+ export declare const paraglideEsbuildPlugin: (options: import("../index.js").CompilerOptions) => import("unplugin").EsbuildPlugin;
2
+ //# sourceMappingURL=esbuild.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"esbuild.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/esbuild.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,sFAAuC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createEsbuildPlugin } from "unplugin";
2
+ import { unpluginFactory } from "./unplugin.js";
3
+ export const paraglideEsbuildPlugin = createEsbuildPlugin(unpluginFactory);
@@ -0,0 +1,7 @@
1
+ export { paraglideEsbuildPlugin } from "./esbuild.js";
2
+ export { paraglideRolldownPlugin } from "./rolldown.js";
3
+ export { paraglideRollupPlugin } from "./rollup.js";
4
+ export { paraglideRspackPlugin } from "./rspack.js";
5
+ export { paraglideVitePlugin } from "./vite.js";
6
+ export { paraglideWebpackPlugin } from "./webpack.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { paraglideEsbuildPlugin } from "./esbuild.js";
2
+ export { paraglideRolldownPlugin } from "./rolldown.js";
3
+ export { paraglideRollupPlugin } from "./rollup.js";
4
+ export { paraglideRspackPlugin } from "./rspack.js";
5
+ export { paraglideVitePlugin } from "./vite.js";
6
+ export { paraglideWebpackPlugin } from "./webpack.js";
@@ -0,0 +1,2 @@
1
+ export declare const paraglideRolldownPlugin: (options: import("../index.js").CompilerOptions) => import("unplugin").RolldownPlugin<any> | import("unplugin").RolldownPlugin<any>[];
2
+ //# sourceMappingURL=rolldown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolldown.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/rolldown.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,uIAAwC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createRolldownPlugin } from "unplugin";
2
+ import { unpluginFactory } from "./unplugin.js";
3
+ export const paraglideRolldownPlugin = createRolldownPlugin(unpluginFactory);
@@ -0,0 +1,2 @@
1
+ export declare const paraglideRollupPlugin: (options: import("../index.js").CompilerOptions) => import("unplugin").RollupPlugin<any> | import("unplugin").RollupPlugin<any>[];
2
+ //# sourceMappingURL=rollup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rollup.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/rollup.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,mIAAsC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createRollupPlugin } from "unplugin";
2
+ import { unpluginFactory } from "./unplugin.js";
3
+ export const paraglideRollupPlugin = createRollupPlugin(unpluginFactory);
@@ -0,0 +1,2 @@
1
+ export declare const paraglideRspackPlugin: (options: import("../index.js").CompilerOptions) => RspackPluginInstance;
2
+ //# sourceMappingURL=rspack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rspack.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/rspack.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,0EAAsC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createRspackPlugin } from "unplugin";
2
+ import { unpluginFactory } from "./unplugin.js";
3
+ export const paraglideRspackPlugin = createRspackPlugin(unpluginFactory);
@@ -0,0 +1,4 @@
1
+ import type { UnpluginFactory } from "unplugin";
2
+ import type { CompilerOptions } from "../compiler/compiler-options.js";
3
+ export declare const unpluginFactory: UnpluginFactory<CompilerOptions>;
4
+ //# sourceMappingURL=unplugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unplugin.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/unplugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavE,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,eAAe,CAmG3D,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { compile } from "../compiler/compile.js";
2
+ import fs from "node:fs";
3
+ import { resolve, relative } from "node:path";
4
+ import { nodeNormalizePath } from "../utilities/node-normalize-path.js";
5
+ import { Logger } from "../services/logger/index.js";
6
+ const PLUGIN_NAME = "unplugin-paraglide-js";
7
+ const logger = new Logger();
8
+ /**
9
+ * Default isServer which differs per bundler.
10
+ */
11
+ let isServer;
12
+ let previousCompilation;
13
+ export const unpluginFactory = (args) => ({
14
+ name: PLUGIN_NAME,
15
+ enforce: "pre",
16
+ async buildStart() {
17
+ logger.info("Compiling inlang project...");
18
+ try {
19
+ previousCompilation = await compile({
20
+ fs: wrappedFs,
21
+ previousCompilation,
22
+ // webpack invokes the `buildStart` api in watch mode,
23
+ // to avoid cleaning the output directory in watch mode,
24
+ // we only clean the output directory if there was no previous compilation
25
+ cleanOutdir: previousCompilation === undefined,
26
+ isServer,
27
+ ...args,
28
+ });
29
+ logger.success("Compilation complete");
30
+ }
31
+ catch (error) {
32
+ logger.error("Failed to compile project:", error.message);
33
+ logger.info("Please check your translation files for syntax errors.");
34
+ }
35
+ finally {
36
+ // in any case add the files to watch
37
+ for (const path of Array.from(readFiles)) {
38
+ this.addWatchFile(path);
39
+ }
40
+ }
41
+ },
42
+ async watchChange(path) {
43
+ const shouldCompile = readFiles.has(path) && !path.includes("cache");
44
+ if (shouldCompile === false) {
45
+ return;
46
+ }
47
+ const previouslyReadFiles = new Set(readFiles);
48
+ try {
49
+ logger.info(`Re-compiling inlang project... File "${relative(process.cwd(), path)}" has changed.`);
50
+ // Clear readFiles to track fresh file reads
51
+ readFiles.clear();
52
+ previousCompilation = await compile({
53
+ fs: wrappedFs,
54
+ previousCompilation,
55
+ cleanOutdir: false,
56
+ isServer,
57
+ ...args,
58
+ });
59
+ logger.success("Re-compilation complete");
60
+ // Add any new files to watch
61
+ for (const filePath of Array.from(readFiles)) {
62
+ this.addWatchFile(filePath);
63
+ }
64
+ }
65
+ catch (e) {
66
+ readFiles = previouslyReadFiles;
67
+ // Reset compilation result on error
68
+ previousCompilation = undefined;
69
+ logger.warn("Failed to re-compile project:", e.message);
70
+ }
71
+ },
72
+ vite: {
73
+ config: {
74
+ handler: () => {
75
+ isServer = "import.meta.env?.SSR ?? typeof window === 'undefined'";
76
+ },
77
+ },
78
+ },
79
+ webpack(compiler) {
80
+ compiler.options.resolve = {
81
+ ...compiler.options.resolve,
82
+ fallback: {
83
+ ...compiler.options.resolve?.fallback,
84
+ // https://stackoverflow.com/a/72989932
85
+ async_hooks: false,
86
+ },
87
+ };
88
+ compiler.hooks.beforeRun.tapPromise(PLUGIN_NAME, async () => {
89
+ try {
90
+ previousCompilation = await compile({
91
+ fs: wrappedFs,
92
+ previousCompilation,
93
+ // clean dir needs to be false. otherwise webpack get's into a race condition
94
+ // of deleting the output directory and writing files at the same time for
95
+ // multi environment builds
96
+ cleanOutdir: false,
97
+ ...args,
98
+ });
99
+ logger.success("Compilation complete");
100
+ }
101
+ catch (error) {
102
+ logger.warn("Failed to compile project:", error.message);
103
+ logger.warn("Please check your translation files for syntax errors.");
104
+ }
105
+ });
106
+ },
107
+ });
108
+ let readFiles = new Set();
109
+ // Create a wrapper around the fs object to intercept and store read files
110
+ const wrappedFs = {
111
+ ...fs,
112
+ // @ts-expect-error - Node's fs has too many overloads
113
+ readFile: (path, options, callback) => {
114
+ readFiles.add(nodeNormalizePath(resolve(process.cwd(), path.toString())));
115
+ return fs.readFile(path, options, callback);
116
+ },
117
+ // @ts-expect-error - Node's fs has too many overloads
118
+ readFileSync: (path, options) => {
119
+ readFiles.add(nodeNormalizePath(resolve(process.cwd(), path.toString())));
120
+ return fs.readFileSync(path, options);
121
+ },
122
+ promises: {
123
+ ...fs.promises,
124
+ // @ts-expect-error - Node's fs.promises has too many overloads
125
+ readFile: async (path, options) => {
126
+ readFiles.add(nodeNormalizePath(resolve(process.cwd(), path.toString())));
127
+ return fs.promises.readFile(path, options);
128
+ },
129
+ },
130
+ // Add other fs methods as needed
131
+ };
@@ -0,0 +1,2 @@
1
+ export declare const paraglideVitePlugin: (options: import("../index.js").CompilerOptions) => import("vite").Plugin<any> | import("vite").Plugin<any>[];
2
+ //# sourceMappingURL=vite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/vite.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,+GAAoC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createVitePlugin } from "unplugin";
2
+ import { unpluginFactory } from "./unplugin.js";
3
+ export const paraglideVitePlugin = createVitePlugin(unpluginFactory);
@@ -0,0 +1,2 @@
1
+ export declare const paraglideWebpackPlugin: (options: import("../index.js").CompilerOptions) => import("unplugin").WebpackPluginInstance;
2
+ //# sourceMappingURL=webpack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/webpack.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,8FAAuC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createWebpackPlugin } from "unplugin";
2
+ import { unpluginFactory } from "./unplugin.js";
3
+ export const paraglideWebpackPlugin = createWebpackPlugin(unpluginFactory);
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/compile/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,eAAO,MAAM,cAAc,SAoDzB,CAAC"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/compile/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,cAAc,SAmDzB,CAAC"}
@@ -1,38 +1,37 @@
1
1
  import { Command } from "commander";
2
- import fs from "node:fs";
3
2
  import { resolve } from "node:path";
4
3
  import { Logger } from "../../../services/logger/index.js";
5
- import { runCompiler } from "../../steps/run-compiler.js";
6
- import { DEFAULT_OUTDIR } from "../../defaults.js";
7
- import { loadProjectFromDirectory } from "@inlang/sdk";
8
- import { ENV_VARIABLES } from "../../../services/env-variables/index.js";
4
+ import { DEFAULT_OUTDIR, DEFAULT_PROJECT_PATH } from "../../defaults.js";
5
+ import { compile } from "../../../compiler/compile.js";
6
+ import { defaultCompilerOptions, } from "../../../compiler/compiler-options.js";
9
7
  export const compileCommand = new Command()
10
8
  .name("compile")
11
9
  .summary("Compiles inlang Paraglide-JS")
12
- .requiredOption("--project <path>", 'The path to the inlang project. Example: "./project.inlang"')
10
+ .requiredOption("--project <path>", 'The path to the inlang project. Example: "./project.inlang"', DEFAULT_PROJECT_PATH)
13
11
  .requiredOption("--outdir <path>", 'The path to the output directory. Example: "./src/paraglide"', DEFAULT_OUTDIR)
12
+ .option("--strategy <items...>", [
13
+ "The strategy to be used.",
14
+ "",
15
+ "Example: --strategy cookie globalVariable baseLocale",
16
+ "Read more on https://inlang.com/m/gerre34r/library-inlang-paraglideJs/strategy",
17
+ ].join("\n"))
14
18
  .requiredOption("--silent", "Only log errors to the console", false)
15
19
  .action(async (options) => {
16
20
  const logger = new Logger({ silent: options.silent, prefix: true });
17
21
  const path = resolve(process.cwd(), options.project);
18
- logger.info(`Compiling inlang project at "${options.project}".`);
19
- const project = await loadProjectFromDirectory({
20
- path,
21
- fs,
22
- appId: ENV_VARIABLES.PARJS_APP_ID,
23
- });
24
- await runCompiler({
25
- project,
26
- fs: fs.promises,
27
- outdir: options.outdir,
28
- });
29
- logger.success("Successfully compiled the project.");
30
- const errors = await project.errors.get();
31
- if (errors.length > 0) {
32
- logger.warn(`But the project reported the following warnings and/or errors that might have influenced compilation:`);
33
- for (const error of errors) {
34
- logger.log(`${error}`);
35
- }
22
+ logger.info(`Compiling inlang project ...`);
23
+ try {
24
+ await compile({
25
+ project: path,
26
+ outdir: options.outdir,
27
+ strategy: options.strategy ?? defaultCompilerOptions.strategy,
28
+ });
36
29
  }
30
+ catch (e) {
31
+ logger.error("Error while compiling inlang project.");
32
+ logger.error(e);
33
+ process.exit(1);
34
+ }
35
+ logger.success(`Successfully compiled inlang project.`);
37
36
  process.exit(0);
38
37
  });
@@ -1,24 +1,3 @@
1
1
  import { Command } from "commander";
2
- import { Logger } from "../../../services/logger/index.js";
3
- import type { CliStep } from "../../utils.js";
4
- import type { NodeishFilesystem } from "../../../services/file-handling/types.js";
5
2
  export declare const initCommand: Command;
6
- export declare const addParaglideJsToDevDependencies: CliStep<{
7
- fs: NodeishFilesystem;
8
- logger: Logger;
9
- packageJsonPath: string;
10
- }, unknown>;
11
- export declare const enforcePackageJsonExists: CliStep<{
12
- logger: Logger;
13
- fs: NodeishFilesystem;
14
- }, {
15
- packageJsonPath: string;
16
- }>;
17
- export declare const addCompileStepToPackageJSON: CliStep<{
18
- fs: NodeishFilesystem;
19
- logger: Logger;
20
- projectPath: string;
21
- outdir: string;
22
- packageJsonPath: string;
23
- }, unknown>;
24
3
  //# sourceMappingURL=command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAS3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAGlF,eAAO,MAAM,WAAW,SA0DrB,CAAC;AAEJ,eAAO,MAAM,+BAA+B,EAAE,OAAO,CACpD;IACC,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACxB,EACD,OAAO,CAYP,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAC7C;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,iBAAiB,CAAA;CAAE,EACzC;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE,CAU3B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,OAAO,CAChD;IACC,EAAE,EAAE,iBAAiB,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACxB,EACD,OAAO,CAuDP,CAAC"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,eAAO,MAAM,WAAW,SAwDrB,CAAC"}
@@ -1,23 +1,25 @@
1
1
  import { Command } from "commander";
2
- import consola from "consola";
3
2
  import * as nodePath from "node:path";
4
3
  import { Logger } from "../../../services/logger/index.js";
5
4
  import { findPackageJson } from "../../../services/environment/package.js";
6
5
  import { checkForUncommittedChanges } from "../../steps/check-for-uncomitted-changes.js";
7
6
  import { initializeInlangProject } from "../../steps/initialize-inlang-project.js";
8
7
  import { maybeAddSherlock } from "../../steps/maybe-add-sherlock.js";
9
- import { maybeChangeTsConfig } from "../../steps/update-ts-config.js";
8
+ import { maybeUpdateTsConfig } from "../../steps/update-ts-config.js";
10
9
  import { promptForOutdir } from "../../steps/prompt-for-outdir.js";
11
10
  import { updatePackageJson } from "../../steps/update-package-json.js";
12
- import { runCompiler } from "../../steps/run-compiler.js";
13
11
  import nodeFs from "node:fs";
14
12
  import { ENV_VARIABLES } from "../../../services/env-variables/index.js";
13
+ import { detectBundler } from "../../steps/detect-bundler.js";
14
+ import { addVitePlugin } from "../../steps/add-vite-plugin.js";
15
+ import { compile } from "../../../compiler/compile.js";
16
+ import { maybeAddMachineTranslation } from "../../steps/maybe-add-machine-translation.js";
15
17
  export const initCommand = new Command()
16
18
  .name("init")
17
19
  .summary("Initializes inlang Paraglide-JS.")
18
20
  .action(async () => {
19
21
  const logger = new Logger({ silent: false, prefix: false });
20
- logger.box("Welcome to inlang Paraglide-JS 🪂");
22
+ logger.box("Welcome to inlang Paraglide JS 🪂");
21
23
  const ctx = {
22
24
  logger,
23
25
  fs: nodeFs.promises,
@@ -29,33 +31,40 @@ export const initCommand = new Command()
29
31
  const ctx3 = await initializeInlangProject(ctx2);
30
32
  const ctx4 = await promptForOutdir(ctx3);
31
33
  const ctx5 = await addParaglideJsToDevDependencies(ctx4);
32
- const ctx6 = await addCompileStepToPackageJSON(ctx5);
33
- const ctx7 = await maybeChangeTsConfig(ctx6);
34
+ const ctx6 = await detectBundler(ctx5);
35
+ if (ctx6.bundler === "vite") {
36
+ await addVitePlugin(ctx6);
37
+ }
38
+ else {
39
+ await addCompileStepToPackageJSON(ctx6);
40
+ }
41
+ const ctx7 = await maybeUpdateTsConfig(ctx6);
34
42
  const ctx8 = await maybeAddSherlock(ctx7);
43
+ const ctx9 = await maybeAddMachineTranslation(ctx8);
35
44
  try {
36
- await runCompiler(ctx8);
37
- ctx.logger.success("Run paraglide compiler");
45
+ await compile({
46
+ project: ctx9.projectPath,
47
+ outdir: ctx9.outdir,
48
+ });
49
+ ctx.logger.success("Ran the paraglide compiler");
38
50
  }
39
51
  catch {
40
52
  ctx.logger.warn("Failed to compile project automatically. You will need to run the compiler manually");
41
53
  }
42
- const absoluteSettingsPath = nodePath.resolve(ctx8.projectPath, "settings.json");
43
- const relativeSettingsFilePath = absoluteSettingsPath.replace(process.cwd(), ".");
44
54
  const successMessage = [
45
55
  `inlang Paraglide-JS has been set up sucessfully.`,
46
56
  "\n",
47
57
  `1. Run your install command (npm i, yarn install, etc)`,
48
- `2. Register all your languages in ${relativeSettingsFilePath}`,
49
- `3. Run the build script (npm run build, or similar.)`,
50
- `4. Done :) Happy paragliding 🪂`,
51
- "\n",
58
+ `2. Run the build script (npm run build, or similar.)`,
59
+ `3. Visit https://inlang.com/m/gerre34r/library-inlang-paraglideJs/basics to get started.`,
52
60
  "\n",
53
61
  `For questions and feedback, visit`,
54
62
  `https://github.com/opral/inlang-paraglide-js/issues`,
55
63
  ].join("\n");
56
64
  ctx.logger.box(successMessage);
65
+ process.exit(0);
57
66
  });
58
- export const addParaglideJsToDevDependencies = async (ctx) => {
67
+ const addParaglideJsToDevDependencies = async (ctx) => {
59
68
  const ctx1 = await updatePackageJson({
60
69
  devDependencies: async (devDeps) => ({
61
70
  ...devDeps,
@@ -65,7 +74,7 @@ export const addParaglideJsToDevDependencies = async (ctx) => {
65
74
  ctx.logger.success("Added @inlang/paraglide-js to the devDependencies in package.json.");
66
75
  return ctx1;
67
76
  };
68
- export const enforcePackageJsonExists = async (ctx) => {
77
+ const enforcePackageJsonExists = async (ctx) => {
69
78
  const packageJsonPath = await findPackageJson(ctx.fs, process.cwd());
70
79
  if (!packageJsonPath) {
71
80
  ctx.logger.warn("No package.json found in the current working directory. Please change the working directory to the directory with a package.json file.");
@@ -73,19 +82,11 @@ export const enforcePackageJsonExists = async (ctx) => {
73
82
  }
74
83
  return { ...ctx, packageJsonPath };
75
84
  };
76
- export const addCompileStepToPackageJSON = async (ctx) => {
85
+ const addCompileStepToPackageJSON = async (ctx) => {
77
86
  const projectPath = "./" + nodePath.relative(process.cwd(), ctx.projectPath);
78
87
  const outdir = "./" + nodePath.relative(process.cwd(), ctx.outdir);
79
- let shouldExit = false;
80
88
  ctx = await updatePackageJson({
81
89
  scripts: async (scripts) => {
82
- // add the compile command to the postinstall script
83
- // this isn't super important, so we won't interrupt the user if it fails
84
- if (!scripts.postinstall?.includes("paraglide-js compile")) {
85
- scripts.postinstall =
86
- `paraglide-js compile --project ${projectPath} --outdir ${outdir}` +
87
- (scripts.postinstall ? " && " + scripts.postinstall : "");
88
- }
89
90
  if (scripts.build === undefined) {
90
91
  scripts.build = `paraglide-js compile --project ${projectPath} --outdir ${outdir}`;
91
92
  }
@@ -93,30 +94,13 @@ export const addCompileStepToPackageJSON = async (ctx) => {
93
94
  scripts.build = `paraglide-js compile --project ${projectPath} --outdir ${outdir} && ${scripts.build}`;
94
95
  }
95
96
  else {
96
- ctx.logger
97
- .warn(`The "build" script in the \`package.json\` already contains a "paraglide-js compile" command.
98
-
99
- Please add the following command to your build script manually:
100
-
101
- \`paraglide-js compile --project ${ctx.projectPath}`);
102
- const response = await consola.prompt("Have you added the compile command to your build script?", {
103
- type: "confirm",
104
- initial: false,
105
- });
106
- if (response === false) {
107
- ctx.logger.log("Please add the paraglide-js compile to your build script and try again.");
108
- shouldExit = true;
109
- throw new Error("Skip write");
110
- }
111
- else {
112
- throw new Error("Skip write");
113
- }
97
+ return scripts;
114
98
  }
115
- ctx.logger.success("Successfully added the compile command to the build step in package.json.");
99
+ ctx.logger.success("Added the compile command to the build step in package.json.");
100
+ ctx.logger.info(`If you use a bundler like Vite, Rolldown, or Webpack, you can use a bundler plugin instead and remove the compile command from the build script.`);
101
+ ctx.logger.info(`Visit https://inlang.com/m/gerre34r/library-inlang-paraglideJs/compiling-messages for more information.`);
116
102
  return scripts;
117
103
  },
118
104
  })(ctx);
119
- if (shouldExit)
120
- process.exit(1);
121
105
  return ctx;
122
106
  };
@@ -5,7 +5,7 @@ export declare function getNewProjectTemplate(): {
5
5
  $schema: "https://inlang.com/schema/project-settings";
6
6
  baseLocale: string;
7
7
  locales: string[];
8
- modules: never[];
8
+ modules: string[];
9
9
  "plugin.inlang.messageFormat": {
10
10
  pathPattern: string;
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/cli/defaults.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,wBAAgB,qBAAqB;;;;;;;;EAapC;AAED,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/cli/defaults.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,wBAAgB,qBAAqB;;;;;;;;EAEpC;AAED,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,cAAc,oBAAoB,CAAC"}
@@ -5,8 +5,11 @@
5
5
  const defaultProjectSettings = {
6
6
  $schema: "https://inlang.com/schema/project-settings",
7
7
  baseLocale: "en",
8
- locales: ["en"],
9
- modules: [],
8
+ locales: ["en", "de"],
9
+ modules: [
10
+ "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
11
+ "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js",
12
+ ],
10
13
  "plugin.inlang.messageFormat": {
11
14
  pathPattern: "./messages/{locale}.json",
12
15
  },
@@ -15,14 +18,6 @@ const defaultProjectSettings = {
15
18
  * @returns A new copy of the default project template that is safe to mutate.
16
19
  */
17
20
  export function getNewProjectTemplate() {
18
- if (!("structuredClone" in globalThis)) {
19
- try {
20
- return JSON.parse(JSON.stringify(defaultProjectSettings));
21
- }
22
- catch {
23
- throw new Error("structuredClone is not supported in your Node Version. Please use version 17 or higher");
24
- }
25
- }
26
21
  return structuredClone(defaultProjectSettings);
27
22
  }
28
23
  export const DEFAULT_PROJECT_PATH = "./project.inlang";