@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.
- package/LICENSE +21 -0
- package/README.md +7 -70
- package/dist/bundler-plugins/esbuild.d.ts +2 -0
- package/dist/bundler-plugins/esbuild.d.ts.map +1 -0
- package/dist/bundler-plugins/esbuild.js +3 -0
- package/dist/bundler-plugins/index.d.ts +7 -0
- package/dist/bundler-plugins/index.d.ts.map +1 -0
- package/dist/bundler-plugins/index.js +6 -0
- package/dist/bundler-plugins/rolldown.d.ts +2 -0
- package/dist/bundler-plugins/rolldown.d.ts.map +1 -0
- package/dist/bundler-plugins/rolldown.js +3 -0
- package/dist/bundler-plugins/rollup.d.ts +2 -0
- package/dist/bundler-plugins/rollup.d.ts.map +1 -0
- package/dist/bundler-plugins/rollup.js +3 -0
- package/dist/bundler-plugins/rspack.d.ts +2 -0
- package/dist/bundler-plugins/rspack.d.ts.map +1 -0
- package/dist/bundler-plugins/rspack.js +3 -0
- package/dist/bundler-plugins/unplugin.d.ts +4 -0
- package/dist/bundler-plugins/unplugin.d.ts.map +1 -0
- package/dist/bundler-plugins/unplugin.js +131 -0
- package/dist/bundler-plugins/vite.d.ts +2 -0
- package/dist/bundler-plugins/vite.d.ts.map +1 -0
- package/dist/bundler-plugins/vite.js +3 -0
- package/dist/bundler-plugins/webpack.d.ts +2 -0
- package/dist/bundler-plugins/webpack.d.ts.map +1 -0
- package/dist/bundler-plugins/webpack.js +3 -0
- package/dist/cli/commands/compile/command.d.ts.map +1 -1
- package/dist/cli/commands/compile/command.js +23 -24
- package/dist/cli/commands/init/command.d.ts +0 -21
- package/dist/cli/commands/init/command.d.ts.map +1 -1
- package/dist/cli/commands/init/command.js +30 -46
- package/dist/cli/defaults.d.ts +1 -1
- package/dist/cli/defaults.d.ts.map +1 -1
- package/dist/cli/defaults.js +5 -10
- package/dist/cli/index.d.ts +0 -9
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -9
- package/dist/cli/steps/add-vite-plugin.d.ts +10 -0
- package/dist/cli/steps/add-vite-plugin.d.ts.map +1 -0
- package/dist/cli/steps/add-vite-plugin.js +61 -0
- package/dist/cli/steps/add-vite-plugin.test.d.ts +2 -0
- package/dist/cli/steps/add-vite-plugin.test.d.ts.map +1 -0
- package/dist/cli/steps/add-vite-plugin.test.js +69 -0
- package/dist/cli/steps/detect-bundler.d.ts +11 -0
- package/dist/cli/steps/detect-bundler.d.ts.map +1 -0
- package/dist/cli/steps/detect-bundler.js +21 -0
- package/dist/cli/steps/detect-bundler.test.d.ts +2 -0
- package/dist/cli/steps/detect-bundler.test.d.ts.map +1 -0
- package/dist/cli/steps/detect-bundler.test.js +28 -0
- package/dist/cli/steps/initialize-inlang-project.d.ts +1 -11
- package/dist/cli/steps/initialize-inlang-project.d.ts.map +1 -1
- package/dist/cli/steps/initialize-inlang-project.js +145 -121
- package/dist/cli/steps/maybe-add-machine-translation.d.ts +16 -0
- package/dist/cli/steps/maybe-add-machine-translation.d.ts.map +1 -0
- package/dist/cli/steps/maybe-add-machine-translation.js +48 -0
- package/dist/cli/steps/maybe-add-sherlock.d.ts +1 -2
- package/dist/cli/steps/maybe-add-sherlock.d.ts.map +1 -1
- package/dist/cli/steps/maybe-add-sherlock.js +13 -13
- package/dist/cli/steps/update-package-json.d.ts +1 -2
- package/dist/cli/steps/update-package-json.d.ts.map +1 -1
- package/dist/cli/steps/update-ts-config.d.ts +4 -15
- package/dist/cli/steps/update-ts-config.d.ts.map +1 -1
- package/dist/cli/steps/update-ts-config.js +100 -78
- package/dist/compiler/{compileBundle.d.ts → compile-bundle.d.ts} +4 -5
- package/dist/compiler/compile-bundle.d.ts.map +1 -0
- package/dist/compiler/compile-bundle.js +60 -0
- package/dist/compiler/compile-bundle.test.d.ts +2 -0
- package/dist/compiler/compile-bundle.test.d.ts.map +1 -0
- package/dist/compiler/compile-bundle.test.js +97 -0
- package/dist/compiler/compile-local-variable.d.ts +17 -0
- package/dist/compiler/compile-local-variable.d.ts.map +1 -0
- package/dist/compiler/compile-local-variable.js +38 -0
- package/dist/compiler/compile-local-variable.test.d.ts +2 -0
- package/dist/compiler/compile-local-variable.test.d.ts.map +1 -0
- package/dist/compiler/compile-local-variable.test.js +71 -0
- package/dist/compiler/compile-message.d.ts +8 -0
- package/dist/compiler/compile-message.d.ts.map +1 -0
- package/dist/compiler/compile-message.js +89 -0
- package/dist/compiler/compile-message.test.d.ts +2 -0
- package/dist/compiler/compile-message.test.d.ts.map +1 -0
- package/dist/compiler/compile-message.test.js +308 -0
- package/dist/compiler/compile-pattern.d.ts +20 -0
- package/dist/compiler/compile-pattern.d.ts.map +1 -0
- package/dist/compiler/compile-pattern.js +40 -0
- package/dist/compiler/compile-pattern.test.d.ts +2 -0
- package/dist/compiler/compile-pattern.test.d.ts.map +1 -0
- package/dist/compiler/compile-pattern.test.js +75 -0
- package/dist/compiler/{compileProject.d.ts → compile-project.d.ts} +3 -28
- package/dist/compiler/compile-project.d.ts.map +1 -0
- package/dist/compiler/compile-project.js +92 -0
- package/dist/compiler/compile-project.test.d.ts +2 -0
- package/dist/compiler/compile-project.test.d.ts.map +1 -0
- package/dist/compiler/compile-project.test.js +867 -0
- package/dist/compiler/compile.bench.d.ts +2 -0
- package/dist/compiler/compile.bench.d.ts.map +1 -0
- package/dist/compiler/compile.bench.js +39 -0
- package/dist/compiler/compile.d.ts +8 -8
- package/dist/compiler/compile.d.ts.map +1 -1
- package/dist/compiler/compile.js +56 -14
- package/dist/compiler/compile.test.js +234 -3
- package/dist/compiler/compiler-options.d.ts +232 -0
- package/dist/compiler/compiler-options.d.ts.map +1 -0
- package/dist/compiler/compiler-options.js +13 -0
- package/dist/compiler/create-paraglide.d.ts +37 -0
- package/dist/compiler/create-paraglide.d.ts.map +1 -0
- package/dist/compiler/create-paraglide.js +97 -0
- package/dist/compiler/create-paraglide.test.d.ts +2 -0
- package/dist/compiler/create-paraglide.test.d.ts.map +1 -0
- package/dist/compiler/create-paraglide.test.js +75 -0
- package/dist/compiler/index.d.ts +9 -4
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js +6 -4
- package/dist/compiler/jsdoc-types.d.ts +15 -0
- package/dist/compiler/jsdoc-types.d.ts.map +1 -0
- package/dist/compiler/jsdoc-types.js +26 -0
- package/dist/compiler/output-structure/locale-modules.d.ts +5 -0
- package/dist/compiler/output-structure/locale-modules.d.ts.map +1 -0
- package/dist/compiler/output-structure/locale-modules.js +47 -0
- package/dist/compiler/output-structure/locale-modules.test.d.ts +2 -0
- package/dist/compiler/output-structure/locale-modules.test.d.ts.map +1 -0
- package/dist/compiler/output-structure/locale-modules.test.js +61 -0
- package/dist/compiler/output-structure/message-modules.d.ts +5 -0
- package/dist/compiler/output-structure/message-modules.d.ts.map +1 -0
- package/dist/compiler/output-structure/message-modules.js +71 -0
- package/dist/compiler/output-structure/message-modules.test.d.ts +2 -0
- package/dist/compiler/output-structure/message-modules.test.d.ts.map +1 -0
- package/dist/compiler/output-structure/message-modules.test.js +77 -0
- package/dist/compiler/registry.d.ts +10 -10
- package/dist/compiler/registry.d.ts.map +1 -1
- package/dist/compiler/registry.js +23 -34
- package/dist/compiler/runtime/assert-is-locale.d.ts +9 -0
- package/dist/compiler/runtime/assert-is-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/assert-is-locale.js +15 -0
- package/dist/compiler/runtime/assert-is-locale.test.d.ts +2 -0
- package/dist/compiler/runtime/assert-is-locale.test.d.ts.map +1 -0
- package/dist/compiler/runtime/assert-is-locale.test.js +39 -0
- package/dist/compiler/runtime/create-runtime.d.ts +18 -0
- package/dist/compiler/runtime/create-runtime.d.ts.map +1 -0
- package/dist/compiler/runtime/create-runtime.js +103 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.d.ts +10 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.js +21 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.test.d.ts +2 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.test.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.test.js +58 -0
- package/dist/compiler/runtime/extract-locale-from-request.d.ts +17 -0
- package/dist/compiler/runtime/extract-locale-from-request.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request.js +91 -0
- package/dist/compiler/runtime/extract-locale-from-request.test.d.ts +2 -0
- package/dist/compiler/runtime/extract-locale-from-request.test.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request.test.js +260 -0
- package/dist/compiler/runtime/extract-locale-from-url.d.ts +8 -0
- package/dist/compiler/runtime/extract-locale-from-url.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-url.js +47 -0
- package/dist/compiler/runtime/extract-locale-from-url.test.d.ts +2 -0
- package/dist/compiler/runtime/extract-locale-from-url.test.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-url.test.js +137 -0
- package/dist/compiler/runtime/generate-static-localized-urls.d.ts +24 -0
- package/dist/compiler/runtime/generate-static-localized-urls.d.ts.map +1 -0
- package/dist/compiler/runtime/generate-static-localized-urls.js +91 -0
- package/dist/compiler/runtime/generate-static-localized-urls.test.d.ts +2 -0
- package/dist/compiler/runtime/generate-static-localized-urls.test.d.ts.map +1 -0
- package/dist/compiler/runtime/generate-static-localized-urls.test.js +190 -0
- package/dist/compiler/runtime/get-locale.d.ts +30 -0
- package/dist/compiler/runtime/get-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/get-locale.js +120 -0
- package/dist/compiler/runtime/get-locale.test.d.ts +2 -0
- package/dist/compiler/runtime/get-locale.test.d.ts.map +1 -0
- package/dist/compiler/runtime/get-locale.test.js +200 -0
- package/dist/compiler/runtime/get-url-origin.d.ts +20 -0
- package/dist/compiler/runtime/get-url-origin.d.ts.map +1 -0
- package/dist/compiler/runtime/get-url-origin.js +30 -0
- package/dist/compiler/runtime/get-url-origin.test.d.ts +2 -0
- package/dist/compiler/runtime/get-url-origin.test.d.ts.map +1 -0
- package/dist/compiler/runtime/get-url-origin.test.js +28 -0
- package/dist/compiler/runtime/is-locale.d.ts +15 -0
- package/dist/compiler/runtime/is-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/is-locale.js +17 -0
- package/dist/compiler/runtime/localize-href.d.ts +82 -0
- package/dist/compiler/runtime/localize-href.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-href.js +108 -0
- package/dist/compiler/runtime/localize-href.test.d.ts +2 -0
- package/dist/compiler/runtime/localize-href.test.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-href.test.js +160 -0
- package/dist/compiler/runtime/localize-url.d.ts +85 -0
- package/dist/compiler/runtime/localize-url.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-url.js +311 -0
- package/dist/compiler/runtime/localize-url.test.d.ts +2 -0
- package/dist/compiler/runtime/localize-url.test.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-url.test.js +617 -0
- package/dist/compiler/runtime/set-locale.d.ts +21 -0
- package/dist/compiler/runtime/set-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/set-locale.js +107 -0
- package/dist/compiler/runtime/set-locale.test.d.ts +2 -0
- package/dist/compiler/runtime/set-locale.test.d.ts.map +1 -0
- package/dist/compiler/runtime/set-locale.test.js +215 -0
- package/dist/compiler/runtime/track-message-call.d.ts +6 -0
- package/dist/compiler/runtime/track-message-call.d.ts.map +1 -0
- package/dist/compiler/runtime/track-message-call.js +13 -0
- package/dist/compiler/runtime/track-message-call.test.d.ts +2 -0
- package/dist/compiler/runtime/track-message-call.test.d.ts.map +1 -0
- package/dist/compiler/runtime/track-message-call.test.js +26 -0
- package/dist/compiler/runtime/type.d.ts +33 -0
- package/dist/compiler/runtime/type.d.ts.map +1 -0
- package/dist/compiler/runtime/type.test.d.ts +2 -0
- package/dist/compiler/runtime/type.test.d.ts.map +1 -0
- package/dist/compiler/runtime/type.test.js +91 -0
- package/dist/compiler/runtime/variables.d.ts +88 -0
- package/dist/compiler/runtime/variables.d.ts.map +1 -0
- package/dist/compiler/runtime/variables.js +74 -0
- package/dist/compiler/safe-module-id.d.ts +8 -0
- package/dist/compiler/safe-module-id.d.ts.map +1 -0
- package/dist/{services/valid-js-identifier/reservedWords.js → compiler/safe-module-id.js} +22 -1
- package/dist/compiler/safe-module-id.test.d.ts +2 -0
- package/dist/compiler/safe-module-id.test.d.ts.map +1 -0
- package/dist/compiler/safe-module-id.test.js +30 -0
- package/dist/compiler/server/create-server-file.d.ts +12 -0
- package/dist/compiler/server/create-server-file.d.ts.map +1 -0
- package/dist/compiler/server/create-server-file.js +47 -0
- package/dist/compiler/server/middleware.d.ts +66 -0
- package/dist/compiler/server/middleware.d.ts.map +1 -0
- package/dist/compiler/server/middleware.js +185 -0
- package/dist/compiler/server/middleware.test.d.ts +2 -0
- package/dist/compiler/server/middleware.test.d.ts.map +1 -0
- package/dist/compiler/server/middleware.test.js +435 -0
- package/dist/compiler/server/type.d.ts +7 -0
- package/dist/compiler/server/type.d.ts.map +1 -0
- package/dist/compiler/types.d.ts +17 -2
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/compiler/types.js +1 -28
- package/dist/index.d.ts +2 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/services/account/index.d.ts +15 -0
- package/dist/services/account/index.d.ts.map +1 -0
- package/dist/services/account/index.js +42 -0
- package/dist/services/env-variables/create-index-file.d.ts +2 -0
- package/dist/services/env-variables/create-index-file.d.ts.map +1 -0
- package/dist/services/env-variables/create-index-file.js +29 -0
- package/dist/services/env-variables/index.js +1 -1
- package/dist/services/file-handling/write-output.d.ts +7 -1
- package/dist/services/file-handling/write-output.d.ts.map +1 -1
- package/dist/services/file-handling/write-output.js +103 -27
- package/dist/services/file-handling/write-output.test.js +153 -45
- package/dist/services/logger/index.d.ts +0 -4
- package/dist/services/logger/index.d.ts.map +1 -1
- package/dist/services/logger/index.js +11 -14
- package/dist/services/telemetry/capture.d.ts +1 -2
- package/dist/services/telemetry/capture.d.ts.map +1 -1
- package/dist/services/telemetry/stack-detection.d.ts +1 -1
- package/dist/services/telemetry/stack-detection.d.ts.map +1 -1
- package/dist/services/telemetry/stack-detection.js +3 -8
- package/dist/services/telemetry/stack-detection.test.js +9 -12
- package/dist/urlpattern-polyfill/index.d.ts +2 -0
- package/dist/urlpattern-polyfill/index.d.ts.map +1 -0
- package/dist/urlpattern-polyfill/index.js +1 -0
- package/dist/utilities/node-normalize-path.d.ts +2 -0
- package/dist/utilities/node-normalize-path.d.ts.map +1 -0
- package/dist/utilities/node-normalize-path.js +9 -0
- package/package.json +43 -51
- package/default/why.txt +0 -3
- package/dist/adapter-utils/index.d.ts +0 -6
- package/dist/adapter-utils/index.d.ts.map +0 -1
- package/dist/adapter-utils/index.js +0 -5
- package/dist/adapter-utils/negotiation/language.d.ts +0 -10
- package/dist/adapter-utils/negotiation/language.d.ts.map +0 -1
- package/dist/adapter-utils/negotiation/language.js +0 -137
- package/dist/adapter-utils/negotiation/language.test.d.ts +0 -2
- package/dist/adapter-utils/negotiation/language.test.d.ts.map +0 -1
- package/dist/adapter-utils/negotiation/language.test.js +0 -24
- package/dist/adapter-utils/routing/detectLanguage.d.ts +0 -25
- package/dist/adapter-utils/routing/detectLanguage.d.ts.map +0 -1
- package/dist/adapter-utils/routing/detectLanguage.js +0 -32
- package/dist/adapter-utils/routing/detectLanguage.test.d.ts +0 -2
- package/dist/adapter-utils/routing/detectLanguage.test.d.ts.map +0 -1
- package/dist/adapter-utils/routing/detectLanguage.test.js +0 -37
- package/dist/adapter-utils/routing/resolveUserPathDefinition.test.d.ts +0 -2
- package/dist/adapter-utils/routing/resolveUserPathDefinition.test.d.ts.map +0 -1
- package/dist/adapter-utils/routing/resolveUserPathDefinition.test.js +0 -35
- package/dist/adapter-utils/routing/resolveUserPathDefinitions.d.ts +0 -40
- package/dist/adapter-utils/routing/resolveUserPathDefinitions.d.ts.map +0 -1
- package/dist/adapter-utils/routing/resolveUserPathDefinitions.js +0 -22
- package/dist/adapter-utils/routing/routeDefinitions.d.ts +0 -48
- package/dist/adapter-utils/routing/routeDefinitions.d.ts.map +0 -1
- package/dist/adapter-utils/routing/routeDefinitions.js +0 -224
- package/dist/adapter-utils/routing/routeDefinitions.test.d.ts +0 -2
- package/dist/adapter-utils/routing/routeDefinitions.test.d.ts.map +0 -1
- package/dist/adapter-utils/routing/routeDefinitions.test.js +0 -234
- package/dist/adapter-utils/routing/sortRoutes.d.ts +0 -2
- package/dist/adapter-utils/routing/sortRoutes.d.ts.map +0 -1
- package/dist/adapter-utils/routing/sortRoutes.js +0 -135
- package/dist/adapter-utils/routing/validatePathTranslations.d.ts +0 -15
- package/dist/adapter-utils/routing/validatePathTranslations.d.ts.map +0 -1
- package/dist/adapter-utils/routing/validatePathTranslations.js +0 -98
- package/dist/adapter-utils/routing/validatePathTranslations.test.d.ts +0 -2
- package/dist/adapter-utils/routing/validatePathTranslations.test.d.ts.map +0 -1
- package/dist/adapter-utils/routing/validatePathTranslations.test.js +0 -121
- package/dist/cli/steps/run-compiler.d.ts +0 -9
- package/dist/cli/steps/run-compiler.d.ts.map +0 -1
- package/dist/cli/steps/run-compiler.js +0 -13
- package/dist/compiler/compileBundle.d.ts.map +0 -1
- package/dist/compiler/compileBundle.js +0 -55
- package/dist/compiler/compileExpression.d.ts +0 -5
- package/dist/compiler/compileExpression.d.ts.map +0 -1
- package/dist/compiler/compileExpression.js +0 -41
- package/dist/compiler/compileMessage.d.ts +0 -12
- package/dist/compiler/compileMessage.d.ts.map +0 -1
- package/dist/compiler/compileMessage.js +0 -64
- package/dist/compiler/compileMessage.test.d.ts +0 -2
- package/dist/compiler/compileMessage.test.d.ts.map +0 -1
- package/dist/compiler/compileMessage.test.js +0 -74
- package/dist/compiler/compilePattern.d.ts +0 -12
- package/dist/compiler/compilePattern.d.ts.map +0 -1
- package/dist/compiler/compilePattern.js +0 -28
- package/dist/compiler/compilePattern.test.d.ts +0 -2
- package/dist/compiler/compilePattern.test.d.ts.map +0 -1
- package/dist/compiler/compilePattern.test.js +0 -67
- package/dist/compiler/compileProject.d.ts.map +0 -1
- package/dist/compiler/compileProject.js +0 -204
- package/dist/compiler/compileProject.test.d.ts +0 -2
- package/dist/compiler/compileProject.test.d.ts.map +0 -1
- package/dist/compiler/compileProject.test.js +0 -638
- package/dist/compiler/emit-dts.d.ts +0 -6
- package/dist/compiler/emit-dts.d.ts.map +0 -1
- package/dist/compiler/emit-dts.js +0 -50
- package/dist/compiler/emit-dts.test.d.ts +0 -2
- package/dist/compiler/emit-dts.test.d.ts.map +0 -1
- package/dist/compiler/emit-dts.test.js +0 -40
- package/dist/compiler/jsDocComment.d.ts +0 -9
- package/dist/compiler/jsDocComment.d.ts.map +0 -1
- package/dist/compiler/jsDocComment.js +0 -29
- package/dist/compiler/runtime.d.ts +0 -6
- package/dist/compiler/runtime.d.ts.map +0 -1
- package/dist/compiler/runtime.js +0 -199
- package/dist/services/codegen/identifier.d.ts +0 -6
- package/dist/services/codegen/identifier.d.ts.map +0 -1
- package/dist/services/codegen/identifier.js +0 -11
- package/dist/services/codegen/indentifier.test.d.ts +0 -2
- package/dist/services/codegen/indentifier.test.d.ts.map +0 -1
- package/dist/services/codegen/indentifier.test.js +0 -8
- package/dist/services/telemetry/events.d.ts +0 -7
- package/dist/services/telemetry/events.d.ts.map +0 -1
- package/dist/services/telemetry/events.js +0 -1
- package/dist/services/valid-js-identifier/index.d.ts +0 -6
- package/dist/services/valid-js-identifier/index.d.ts.map +0 -1
- package/dist/services/valid-js-identifier/index.js +0 -24
- package/dist/services/valid-js-identifier/index.test.d.ts +0 -2
- package/dist/services/valid-js-identifier/index.test.d.ts.map +0 -1
- package/dist/services/valid-js-identifier/index.test.js +0 -30
- package/dist/services/valid-js-identifier/reservedWords.d.ts +0 -2
- package/dist/services/valid-js-identifier/reservedWords.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/LICENSE +0 -201
- package/node_modules/@inlang/sdk/README.md +0 -16
- package/node_modules/@inlang/sdk/dist/database/initDb.d.ts +0 -7
- package/node_modules/@inlang/sdk/dist/database/initDb.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/initDb.js +0 -36
- package/node_modules/@inlang/sdk/dist/database/initDb.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.js +0 -110
- package/node_modules/@inlang/sdk/dist/database/initDbAndSchema.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.d.ts +0 -20
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.js +0 -183
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.js +0 -119
- package/node_modules/@inlang/sdk/dist/database/jsonbPlugin.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/schema.d.ts +0 -74
- package/node_modules/@inlang/sdk/dist/database/schema.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/database/schema.js +0 -45
- package/node_modules/@inlang/sdk/dist/database/schema.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/helper.d.ts +0 -71
- package/node_modules/@inlang/sdk/dist/helper.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/helper.js +0 -91
- package/node_modules/@inlang/sdk/dist/helper.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/human-id/human-id.d.ts +0 -3
- package/node_modules/@inlang/sdk/dist/human-id/human-id.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/human-id/human-id.js +0 -12
- package/node_modules/@inlang/sdk/dist/human-id/human-id.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/human-id/words.d.ts +0 -5
- package/node_modules/@inlang/sdk/dist/human-id/words.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/human-id/words.js +0 -1036
- package/node_modules/@inlang/sdk/dist/human-id/words.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/human-id/words.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/human-id/words.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/human-id/words.test.js +0 -29
- package/node_modules/@inlang/sdk/dist/human-id/words.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/exportFiles.d.ts +0 -11
- package/node_modules/@inlang/sdk/dist/import-export/exportFiles.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/exportFiles.js +0 -26
- package/node_modules/@inlang/sdk/dist/import-export/exportFiles.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.d.ts +0 -13
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.js +0 -124
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.js +0 -179
- package/node_modules/@inlang/sdk/dist/import-export/importFiles.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.js +0 -273
- package/node_modules/@inlang/sdk/dist/import-export/roundtrip.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.d.ts +0 -4
- package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.js +0 -58
- package/node_modules/@inlang/sdk/dist/import-export/upsertBundleNestedMatchByProperties.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/index.d.ts +0 -24
- package/node_modules/@inlang/sdk/dist/index.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/index.js +0 -22
- package/node_modules/@inlang/sdk/dist/index.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.d.ts +0 -9
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.js +0 -84
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.js +0 -85
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/fromMessageV1.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.d.ts +0 -86
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.js +0 -35
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/schemaV1.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.d.ts +0 -9
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.js +0 -67
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.js +0 -85
- package/node_modules/@inlang/sdk/dist/json-schema/old-v1-message/toMessageV1.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/pattern.d.ts +0 -190
- package/node_modules/@inlang/sdk/dist/json-schema/pattern.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/pattern.js +0 -43
- package/node_modules/@inlang/sdk/dist/json-schema/pattern.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/settings.d.ts +0 -31
- package/node_modules/@inlang/sdk/dist/json-schema/settings.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/settings.js +0 -96
- package/node_modules/@inlang/sdk/dist/json-schema/settings.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.js +0 -20
- package/node_modules/@inlang/sdk/dist/json-schema/settings.test-d.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.d.ts +0 -3
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.js +0 -127
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.js +0 -135
- package/node_modules/@inlang/sdk/dist/lix-plugin/applyChanges.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.d.ts +0 -3
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.js +0 -47
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.js +0 -251
- package/node_modules/@inlang/sdk/dist/lix-plugin/detectConflicts.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.d.ts +0 -8
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.js +0 -109
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.js +0 -418
- package/node_modules/@inlang/sdk/dist/lix-plugin/inlangLixPluginV1.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.js +0 -120
- package/node_modules/@inlang/sdk/dist/lix-plugin/merge.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.js +0 -176
- package/node_modules/@inlang/sdk/dist/lix-plugin/resolveConflictBySelecting.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.d.ts +0 -28
- package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.js +0 -31
- package/node_modules/@inlang/sdk/dist/migrations/v2/createMessageV1.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.d.ts +0 -9
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.js +0 -31
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js +0 -45
- package/node_modules/@inlang/sdk/dist/migrations/v2/withLanguageTagToLocaleMigration.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/cache.d.ts +0 -6
- package/node_modules/@inlang/sdk/dist/plugin/cache.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/cache.js +0 -59
- package/node_modules/@inlang/sdk/dist/plugin/cache.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/cache.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/plugin/cache.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/cache.test.js +0 -61
- package/node_modules/@inlang/sdk/dist/plugin/cache.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/errors.d.ts +0 -41
- package/node_modules/@inlang/sdk/dist/plugin/errors.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/errors.js +0 -48
- package/node_modules/@inlang/sdk/dist/plugin/errors.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.d.ts +0 -19
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.js +0 -43
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.js +0 -95
- package/node_modules/@inlang/sdk/dist/plugin/importPlugins.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.d.ts +0 -54
- package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.js +0 -5
- package/node_modules/@inlang/sdk/dist/plugin/meta/ideExtension.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/schema.d.ts +0 -152
- package/node_modules/@inlang/sdk/dist/plugin/schema.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/plugin/schema.js +0 -5
- package/node_modules/@inlang/sdk/dist/plugin/schema.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/api.d.ts +0 -78
- package/node_modules/@inlang/sdk/dist/project/api.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/api.js +0 -5
- package/node_modules/@inlang/sdk/dist/project/api.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.d.ts +0 -14
- package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.js +0 -81
- package/node_modules/@inlang/sdk/dist/project/initHandleSaveToLixOnChange.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProject.d.ts +0 -43
- package/node_modules/@inlang/sdk/dist/project/loadProject.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProject.js +0 -105
- package/node_modules/@inlang/sdk/dist/project/loadProject.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProject.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/loadProject.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProject.test.js +0 -123
- package/node_modules/@inlang/sdk/dist/project/loadProject.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.d.ts +0 -87
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.js +0 -593
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.js +0 -642
- package/node_modules/@inlang/sdk/dist/project/loadProjectFromDirectory.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.d.ts +0 -8
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.js +0 -31
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.js +0 -27
- package/node_modules/@inlang/sdk/dist/project/loadProjectInMemory.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.d.ts +0 -9
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.js +0 -46
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.js +0 -60
- package/node_modules/@inlang/sdk/dist/project/maybeCaptureTelemetry.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/newProject.d.ts +0 -17
- package/node_modules/@inlang/sdk/dist/project/newProject.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/newProject.js +0 -70
- package/node_modules/@inlang/sdk/dist/project/newProject.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/newProject.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/newProject.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/newProject.test.js +0 -37
- package/node_modules/@inlang/sdk/dist/project/newProject.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.d.ts +0 -8
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.js +0 -86
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.js +0 -245
- package/node_modules/@inlang/sdk/dist/project/saveProjectToDirectory.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/id$.d.ts +0 -6
- package/node_modules/@inlang/sdk/dist/project/state/id$.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/id$.js +0 -19
- package/node_modules/@inlang/sdk/dist/project/state/id$.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/id$.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/state/id$.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/id$.test.js +0 -36
- package/node_modules/@inlang/sdk/dist/project/state/id$.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.d.ts +0 -7
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.js +0 -16
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.js +0 -58
- package/node_modules/@inlang/sdk/dist/project/state/setSettings.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/settings$.d.ts +0 -7
- package/node_modules/@inlang/sdk/dist/project/state/settings$.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/settings$.js +0 -21
- package/node_modules/@inlang/sdk/dist/project/state/settings$.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/settings$.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/state/settings$.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/settings$.test.js +0 -51
- package/node_modules/@inlang/sdk/dist/project/state/settings$.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/state.d.ts +0 -58
- package/node_modules/@inlang/sdk/dist/project/state/state.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/state.js +0 -67
- package/node_modules/@inlang/sdk/dist/project/state/state.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/state.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/project/state/state.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/project/state/state.test.js +0 -103
- package/node_modules/@inlang/sdk/dist/project/state/state.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/index.d.ts +0 -6
- package/node_modules/@inlang/sdk/dist/query-utilities/index.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/index.js +0 -9
- package/node_modules/@inlang/sdk/dist/query-utilities/index.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.d.ts +0 -4
- package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.js +0 -39
- package/node_modules/@inlang/sdk/dist/query-utilities/insertBundleNested.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.d.ts +0 -14
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.js +0 -22
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.js +0 -67
- package/node_modules/@inlang/sdk/dist/query-utilities/pollQuery.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.d.ts +0 -107
- package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.js +0 -43
- package/node_modules/@inlang/sdk/dist/query-utilities/selectBundleNested.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.d.ts +0 -12
- package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.js +0 -25
- package/node_modules/@inlang/sdk/dist/query-utilities/updateBundleNested.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.d.ts +0 -4
- package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.js +0 -50
- package/node_modules/@inlang/sdk/dist/query-utilities/upsertBundleNested.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/env-variables/index.d.ts +0 -6
- package/node_modules/@inlang/sdk/dist/services/env-variables/index.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/env-variables/index.js +0 -9
- package/node_modules/@inlang/sdk/dist/services/env-variables/index.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/error-reporting/index.d.ts +0 -15
- package/node_modules/@inlang/sdk/dist/services/error-reporting/index.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/error-reporting/index.js +0 -30
- package/node_modules/@inlang/sdk/dist/services/error-reporting/index.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.d.ts +0 -23
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.js +0 -77
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.js +0 -44
- package/node_modules/@inlang/sdk/dist/services/telemetry/capture.test.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.d.ts +0 -11
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.js +0 -83
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.js.map +0 -1
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.d.ts +0 -2
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.d.ts.map +0 -1
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.js +0 -33
- package/node_modules/@inlang/sdk/dist/utilities/detectJsonFormatting.test.js.map +0 -1
- package/node_modules/@inlang/sdk/package.json +0 -64
- package/node_modules/@inlang/sdk/src/database/initDb.ts +0 -34
- package/node_modules/@inlang/sdk/src/database/initDbAndSchema.test.ts +0 -125
- package/node_modules/@inlang/sdk/src/database/jsonbPlugin.test.ts +0 -154
- package/node_modules/@inlang/sdk/src/database/jsonbPlugin.ts +0 -215
- package/node_modules/@inlang/sdk/src/database/schema.ts +0 -127
- package/node_modules/@inlang/sdk/src/helper.ts +0 -113
- package/node_modules/@inlang/sdk/src/human-id/human-id.ts +0 -14
- package/node_modules/@inlang/sdk/src/human-id/words.test.ts +0 -27
- package/node_modules/@inlang/sdk/src/human-id/words.ts +0 -1035
- package/node_modules/@inlang/sdk/src/import-export/exportFiles.ts +0 -36
- package/node_modules/@inlang/sdk/src/import-export/importFiles.test.ts +0 -211
- package/node_modules/@inlang/sdk/src/import-export/importFiles.ts +0 -142
- package/node_modules/@inlang/sdk/src/import-export/roundtrip.test.ts +0 -313
- package/node_modules/@inlang/sdk/src/import-export/upsertBundleNestedMatchByProperties.ts +0 -74
- package/node_modules/@inlang/sdk/src/index.ts +0 -32
- package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/README.md +0 -1
- package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/fromMessageV1.test.ts +0 -87
- package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/fromMessageV1.ts +0 -99
- package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/schemaV1.ts +0 -66
- package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/toMessageV1.test.ts +0 -87
- package/node_modules/@inlang/sdk/src/json-schema/old-v1-message/toMessageV1.ts +0 -79
- package/node_modules/@inlang/sdk/src/json-schema/pattern.ts +0 -59
- package/node_modules/@inlang/sdk/src/json-schema/settings.test-d.ts +0 -21
- package/node_modules/@inlang/sdk/src/json-schema/settings.ts +0 -138
- package/node_modules/@inlang/sdk/src/lix-plugin/applyChanges.test.ts +0 -150
- package/node_modules/@inlang/sdk/src/lix-plugin/applyChanges.ts +0 -171
- package/node_modules/@inlang/sdk/src/lix-plugin/detectConflicts.test.ts +0 -286
- package/node_modules/@inlang/sdk/src/lix-plugin/detectConflicts.ts +0 -62
- package/node_modules/@inlang/sdk/src/lix-plugin/inlangLixPluginV1.test.ts +0 -439
- package/node_modules/@inlang/sdk/src/lix-plugin/inlangLixPluginV1.ts +0 -132
- package/node_modules/@inlang/sdk/src/lix-plugin/merge.test.ts +0 -133
- package/node_modules/@inlang/sdk/src/lix-plugin/resolveConflictBySelecting.test.ts +0 -188
- package/node_modules/@inlang/sdk/src/migrations/v2/createMessageV1.ts +0 -37
- package/node_modules/@inlang/sdk/src/migrations/v2/withLanguageTagToLocaleMigration.test.ts +0 -51
- package/node_modules/@inlang/sdk/src/migrations/v2/withLanguageTagToLocaleMigration.ts +0 -31
- package/node_modules/@inlang/sdk/src/plugin/cache.test.ts +0 -83
- package/node_modules/@inlang/sdk/src/plugin/cache.ts +0 -79
- package/node_modules/@inlang/sdk/src/plugin/errors.ts +0 -67
- package/node_modules/@inlang/sdk/src/plugin/importPlugins.test.ts +0 -107
- package/node_modules/@inlang/sdk/src/plugin/importPlugins.ts +0 -60
- package/node_modules/@inlang/sdk/src/plugin/meta/ideExtension.ts +0 -56
- package/node_modules/@inlang/sdk/src/plugin/schema.ts +0 -165
- package/node_modules/@inlang/sdk/src/project/api.ts +0 -81
- package/node_modules/@inlang/sdk/src/project/initHandleSaveToLixOnChange.ts +0 -88
- package/node_modules/@inlang/sdk/src/project/loadProject.test.ts +0 -148
- package/node_modules/@inlang/sdk/src/project/loadProject.ts +0 -153
- package/node_modules/@inlang/sdk/src/project/loadProjectFromDirectory.test.ts +0 -819
- package/node_modules/@inlang/sdk/src/project/loadProjectFromDirectory.ts +0 -767
- package/node_modules/@inlang/sdk/src/project/loadProjectInMemory.test.ts +0 -29
- package/node_modules/@inlang/sdk/src/project/loadProjectInMemory.ts +0 -35
- package/node_modules/@inlang/sdk/src/project/maybeCaptureTelemetry.test.ts +0 -65
- package/node_modules/@inlang/sdk/src/project/maybeCaptureTelemetry.ts +0 -51
- package/node_modules/@inlang/sdk/src/project/newProject.test.ts +0 -36
- package/node_modules/@inlang/sdk/src/project/newProject.ts +0 -77
- package/node_modules/@inlang/sdk/src/project/saveProjectToDirectory.test.ts +0 -310
- package/node_modules/@inlang/sdk/src/project/saveProjectToDirectory.ts +0 -100
- package/node_modules/@inlang/sdk/src/project/state/README.md +0 -22
- package/node_modules/@inlang/sdk/src/project/state/id$.test.ts +0 -40
- package/node_modules/@inlang/sdk/src/project/state/id$.ts +0 -21
- package/node_modules/@inlang/sdk/src/project/state/setSettings.test.ts +0 -73
- package/node_modules/@inlang/sdk/src/project/state/setSettings.ts +0 -19
- package/node_modules/@inlang/sdk/src/project/state/settings$.test.ts +0 -63
- package/node_modules/@inlang/sdk/src/project/state/settings$.ts +0 -26
- package/node_modules/@inlang/sdk/src/project/state/state.test.ts +0 -128
- package/node_modules/@inlang/sdk/src/project/state/state.ts +0 -94
- package/node_modules/@inlang/sdk/src/query-utilities/index.ts +0 -5
- package/node_modules/@inlang/sdk/src/query-utilities/insertBundleNested.ts +0 -46
- package/node_modules/@inlang/sdk/src/query-utilities/pollQuery.test.ts +0 -88
- package/node_modules/@inlang/sdk/src/query-utilities/pollQuery.ts +0 -26
- package/node_modules/@inlang/sdk/src/query-utilities/selectBundleNested.ts +0 -46
- package/node_modules/@inlang/sdk/src/query-utilities/updateBundleNested.ts +0 -35
- package/node_modules/@inlang/sdk/src/query-utilities/upsertBundleNested.ts +0 -61
- package/node_modules/@inlang/sdk/src/services/env-variables/createIndexFile.js +0 -40
- package/node_modules/@inlang/sdk/src/services/env-variables/index.d.ts +0 -16
- package/node_modules/@inlang/sdk/src/services/env-variables/index.ts +0 -6
- package/node_modules/@inlang/sdk/src/services/error-reporting/index.ts +0 -28
- package/node_modules/@inlang/sdk/src/services/telemetry/capture.test.ts +0 -48
- package/node_modules/@inlang/sdk/src/services/telemetry/capture.ts +0 -98
- package/node_modules/@inlang/sdk/src/utilities/detectJsonFormatting.test.ts +0 -38
- package/node_modules/@inlang/sdk/src/utilities/detectJsonFormatting.ts +0 -109
- /package/{default/index.d.ts → dist/compiler/runtime/type.js} +0 -0
- /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
|
[](https://inlang.com)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@inlang/paraglide-js)
|
|
4
|
+
[](https://github.com/opral/inlang-paraglide-js/issues)
|
|
5
|
+
[](https://github.com/opral/monorepo/graphs/contributors)
|
|
4
6
|
|
|
5
|
-
To use Paraglide standalone without a framework, run the following command:
|
|
6
7
|
|
|
7
|
-
|
|
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
|
-
|
|
10
|
+
Visit https://inlang.com/m/gerre34r/library-inlang-paraglideJs to learn more.
|
|
12
11
|
|
|
13
|
-
|
|
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
|
-
|
|
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 @@
|
|
|
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,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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../src/bundler-plugins/webpack.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,sBAAsB,8FAAuC,CAAC"}
|
|
@@ -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;
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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;
|
|
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 {
|
|
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
|
|
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
|
|
33
|
-
|
|
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
|
|
37
|
-
|
|
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.
|
|
49
|
-
`3.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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("
|
|
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
|
};
|
package/dist/cli/defaults.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/cli/defaults.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/cli/defaults.js
CHANGED
|
@@ -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";
|