@sebbro/paraglide-lite 0.1.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 +67 -0
- package/bin/run.js +4 -0
- package/dist/bundler-plugins/esbuild.d.ts +1 -0
- package/dist/bundler-plugins/esbuild.d.ts.map +1 -0
- package/dist/bundler-plugins/esbuild.js +4 -0
- package/dist/bundler-plugins/esbuild.js.map +1 -0
- package/dist/bundler-plugins/index.d.ts +6 -0
- package/dist/bundler-plugins/index.d.ts.map +1 -0
- package/dist/bundler-plugins/index.js +7 -0
- package/dist/bundler-plugins/index.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.d.ts +19 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.js +85 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.test.d.ts +2 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.test.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.test.js +53 -0
- package/dist/bundler-plugins/lazy-modules/scan-message-keys.test.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/ssr.d.ts +31 -0
- package/dist/bundler-plugins/lazy-modules/ssr.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/ssr.js +42 -0
- package/dist/bundler-plugins/lazy-modules/ssr.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/ssr.test.d.ts +2 -0
- package/dist/bundler-plugins/lazy-modules/ssr.test.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/ssr.test.js +48 -0
- package/dist/bundler-plugins/lazy-modules/ssr.test.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/virtual-ids.d.ts +7 -0
- package/dist/bundler-plugins/lazy-modules/virtual-ids.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/virtual-ids.js +30 -0
- package/dist/bundler-plugins/lazy-modules/virtual-ids.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/virtual.d.ts +86 -0
- package/dist/bundler-plugins/lazy-modules/virtual.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/virtual.js +2 -0
- package/dist/bundler-plugins/lazy-modules/virtual.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.d.ts +18 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.js +328 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.js.map +1 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.test.d.ts +2 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.test.d.ts.map +1 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.test.js +45 -0
- package/dist/bundler-plugins/lazy-modules/vite-plugin.test.js.map +1 -0
- package/dist/bundler-plugins/per-locale-build/constants.d.ts +2 -0
- package/dist/bundler-plugins/per-locale-build/constants.d.ts.map +1 -0
- package/dist/bundler-plugins/per-locale-build/constants.js +3 -0
- package/dist/bundler-plugins/per-locale-build/constants.js.map +1 -0
- package/dist/bundler-plugins/per-locale-build/index.d.ts +6 -0
- package/dist/bundler-plugins/per-locale-build/index.d.ts.map +1 -0
- package/dist/bundler-plugins/per-locale-build/index.js +43 -0
- package/dist/bundler-plugins/per-locale-build/index.js.map +1 -0
- package/dist/bundler-plugins/per-locale-build/locale-id.d.ts +8 -0
- package/dist/bundler-plugins/per-locale-build/locale-id.d.ts.map +1 -0
- package/dist/bundler-plugins/per-locale-build/locale-id.js +13 -0
- package/dist/bundler-plugins/per-locale-build/locale-id.js.map +1 -0
- package/dist/bundler-plugins/per-locale-build/types.d.ts +4 -0
- package/dist/bundler-plugins/per-locale-build/types.d.ts.map +1 -0
- package/dist/bundler-plugins/per-locale-build/types.js +2 -0
- package/dist/bundler-plugins/per-locale-build/types.js.map +1 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.d.ts +51 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.d.ts.map +1 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.js +250 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.js.map +1 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.test.d.ts +1 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.test.d.ts.map +1 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.test.js +250 -0
- package/dist/bundler-plugins/per-locale-build/vite-environments.test.js.map +1 -0
- package/dist/bundler-plugins/plugin-core.d.ts +74 -0
- package/dist/bundler-plugins/plugin-core.d.ts.map +1 -0
- package/dist/bundler-plugins/plugin-core.js +292 -0
- package/dist/bundler-plugins/plugin-core.js.map +1 -0
- package/dist/bundler-plugins/rolldown.d.ts +10 -0
- package/dist/bundler-plugins/rolldown.d.ts.map +1 -0
- package/dist/bundler-plugins/rolldown.js +36 -0
- package/dist/bundler-plugins/rolldown.js.map +1 -0
- package/dist/bundler-plugins/rolldown.test.d.ts +1 -0
- package/dist/bundler-plugins/rolldown.test.d.ts.map +1 -0
- package/dist/bundler-plugins/rolldown.test.js +72 -0
- package/dist/bundler-plugins/rolldown.test.js.map +1 -0
- package/dist/bundler-plugins/rollup.d.ts +1 -0
- package/dist/bundler-plugins/rollup.d.ts.map +1 -0
- package/dist/bundler-plugins/rollup.js +4 -0
- package/dist/bundler-plugins/rollup.js.map +1 -0
- package/dist/bundler-plugins/rspack.d.ts +1 -0
- package/dist/bundler-plugins/rspack.d.ts.map +1 -0
- package/dist/bundler-plugins/rspack.js +4 -0
- package/dist/bundler-plugins/rspack.js.map +1 -0
- package/dist/bundler-plugins/unplugin.d.ts +3 -0
- package/dist/bundler-plugins/unplugin.d.ts.map +1 -0
- package/dist/bundler-plugins/unplugin.js +62 -0
- package/dist/bundler-plugins/unplugin.js.map +1 -0
- package/dist/bundler-plugins/unplugin.test.d.ts +1 -0
- package/dist/bundler-plugins/unplugin.test.d.ts.map +1 -0
- package/dist/bundler-plugins/unplugin.test.js +256 -0
- package/dist/bundler-plugins/unplugin.test.js.map +1 -0
- package/dist/bundler-plugins/virtual-modules.test.d.ts +1 -0
- package/dist/bundler-plugins/virtual-modules.test.d.ts.map +1 -0
- package/dist/bundler-plugins/virtual-modules.test.js +77 -0
- package/dist/bundler-plugins/virtual-modules.test.js.map +1 -0
- package/dist/bundler-plugins/vite.d.ts +17 -0
- package/dist/bundler-plugins/vite.d.ts.map +1 -0
- package/dist/bundler-plugins/vite.js +15 -0
- package/dist/bundler-plugins/vite.js.map +1 -0
- package/dist/bundler-plugins/vite.test.d.ts +1 -0
- package/dist/bundler-plugins/vite.test.d.ts.map +1 -0
- package/dist/bundler-plugins/vite.test.js +61 -0
- package/dist/bundler-plugins/vite.test.js.map +1 -0
- package/dist/bundler-plugins/webpack.d.ts +1 -0
- package/dist/bundler-plugins/webpack.d.ts.map +1 -0
- package/dist/bundler-plugins/webpack.js +4 -0
- package/dist/bundler-plugins/webpack.js.map +1 -0
- package/dist/cli/commands/compile/command.d.ts +2 -0
- package/dist/cli/commands/compile/command.d.ts.map +1 -0
- package/dist/cli/commands/compile/command.js +225 -0
- package/dist/cli/commands/compile/command.js.map +1 -0
- package/dist/cli/commands/compile/command.test.d.ts +1 -0
- package/dist/cli/commands/compile/command.test.d.ts.map +1 -0
- package/dist/cli/commands/compile/command.test.js +69 -0
- package/dist/cli/commands/compile/command.test.js.map +1 -0
- package/dist/cli/commands/init/command.d.ts +2 -0
- package/dist/cli/commands/init/command.d.ts.map +1 -0
- package/dist/cli/commands/init/command.js +90 -0
- package/dist/cli/commands/init/command.js.map +1 -0
- package/dist/cli/defaults.d.ts +11 -0
- package/dist/cli/defaults.d.ts.map +1 -0
- package/dist/cli/defaults.js +13 -0
- package/dist/cli/defaults.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +11 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/steps/add-vite-plugin.d.ts +31 -0
- package/dist/cli/steps/add-vite-plugin.d.ts.map +1 -0
- package/dist/cli/steps/add-vite-plugin.js +65 -0
- package/dist/cli/steps/add-vite-plugin.js.map +1 -0
- package/dist/cli/steps/add-vite-plugin.test.d.ts +1 -0
- package/dist/cli/steps/add-vite-plugin.test.d.ts.map +1 -0
- package/dist/cli/steps/add-vite-plugin.test.js +74 -0
- package/dist/cli/steps/add-vite-plugin.test.js.map +1 -0
- package/dist/cli/steps/check-for-uncomitted-changes.d.ts +5 -0
- package/dist/cli/steps/check-for-uncomitted-changes.d.ts.map +1 -0
- package/dist/cli/steps/check-for-uncomitted-changes.js +37 -0
- package/dist/cli/steps/check-for-uncomitted-changes.js.map +1 -0
- package/dist/cli/steps/detect-bundler.d.ts +10 -0
- package/dist/cli/steps/detect-bundler.d.ts.map +1 -0
- package/dist/cli/steps/detect-bundler.js +22 -0
- package/dist/cli/steps/detect-bundler.js.map +1 -0
- package/dist/cli/steps/detect-bundler.test.d.ts +1 -0
- package/dist/cli/steps/detect-bundler.test.d.ts.map +1 -0
- package/dist/cli/steps/detect-bundler.test.js +29 -0
- package/dist/cli/steps/detect-bundler.test.js.map +1 -0
- package/dist/cli/steps/initialize-messages.d.ts +11 -0
- package/dist/cli/steps/initialize-messages.d.ts.map +1 -0
- package/dist/cli/steps/initialize-messages.js +31 -0
- package/dist/cli/steps/initialize-messages.js.map +1 -0
- package/dist/cli/steps/prompt-for-outdir.d.ts +8 -0
- package/dist/cli/steps/prompt-for-outdir.d.ts.map +1 -0
- package/dist/cli/steps/prompt-for-outdir.js +19 -0
- package/dist/cli/steps/prompt-for-outdir.js.map +1 -0
- package/dist/cli/steps/update-package-json.d.ts +11 -0
- package/dist/cli/steps/update-package-json.d.ts.map +1 -0
- package/dist/cli/steps/update-package-json.js +34 -0
- package/dist/cli/steps/update-package-json.js.map +1 -0
- package/dist/cli/steps/update-ts-config.d.ts +26 -0
- package/dist/cli/steps/update-ts-config.d.ts.map +1 -0
- package/dist/cli/steps/update-ts-config.js +270 -0
- package/dist/cli/steps/update-ts-config.js.map +1 -0
- package/dist/cli/steps/update-ts-config.test.d.ts +1 -0
- package/dist/cli/steps/update-ts-config.test.d.ts.map +1 -0
- package/dist/cli/steps/update-ts-config.test.js +60 -0
- package/dist/cli/steps/update-ts-config.test.js.map +1 -0
- package/dist/cli/utils.d.ts +36 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +20 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/compiler/assert-url-pattern-available.d.ts +7 -0
- package/dist/compiler/assert-url-pattern-available.d.ts.map +1 -0
- package/dist/compiler/assert-url-pattern-available.js +17 -0
- package/dist/compiler/assert-url-pattern-available.js.map +1 -0
- package/dist/compiler/compile-annotation.d.ts +12 -0
- package/dist/compiler/compile-annotation.d.ts.map +1 -0
- package/dist/compiler/compile-annotation.js +136 -0
- package/dist/compiler/compile-annotation.js.map +1 -0
- package/dist/compiler/compile-bundle.d.ts +28 -0
- package/dist/compiler/compile-bundle.d.ts.map +1 -0
- package/dist/compiler/compile-bundle.js +431 -0
- package/dist/compiler/compile-bundle.js.map +1 -0
- package/dist/compiler/compile-bundle.test.d.ts +1 -0
- package/dist/compiler/compile-bundle.test.d.ts.map +1 -0
- package/dist/compiler/compile-bundle.test.js +399 -0
- package/dist/compiler/compile-bundle.test.js.map +1 -0
- package/dist/compiler/compile-local-variable.d.ts +16 -0
- package/dist/compiler/compile-local-variable.d.ts.map +1 -0
- package/dist/compiler/compile-local-variable.js +28 -0
- package/dist/compiler/compile-local-variable.js.map +1 -0
- package/dist/compiler/compile-local-variable.test.d.ts +1 -0
- package/dist/compiler/compile-local-variable.test.d.ts.map +1 -0
- package/dist/compiler/compile-local-variable.test.js +359 -0
- package/dist/compiler/compile-local-variable.test.js.map +1 -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 +174 -0
- package/dist/compiler/compile-message.js.map +1 -0
- package/dist/compiler/compile-message.test.d.ts +1 -0
- package/dist/compiler/compile-message.test.d.ts.map +1 -0
- package/dist/compiler/compile-message.test.js +1060 -0
- package/dist/compiler/compile-message.test.js.map +1 -0
- package/dist/compiler/compile-pattern.d.ts +29 -0
- package/dist/compiler/compile-pattern.d.ts.map +1 -0
- package/dist/compiler/compile-pattern.js +143 -0
- package/dist/compiler/compile-pattern.js.map +1 -0
- package/dist/compiler/compile-pattern.test.d.ts +1 -0
- package/dist/compiler/compile-pattern.test.d.ts.map +1 -0
- package/dist/compiler/compile-pattern.test.js +255 -0
- package/dist/compiler/compile-pattern.test.js.map +1 -0
- package/dist/compiler/compile-project.d.ts +21 -0
- package/dist/compiler/compile-project.d.ts.map +1 -0
- package/dist/compiler/compile-project.js +147 -0
- package/dist/compiler/compile-project.js.map +1 -0
- package/dist/compiler/compile-project.test.d.ts +1 -0
- package/dist/compiler/compile-project.test.d.ts.map +1 -0
- package/dist/compiler/compile-project.test.js +1709 -0
- package/dist/compiler/compile-project.test.js.map +1 -0
- package/dist/compiler/compile.bench.d.ts +1 -0
- package/dist/compiler/compile.bench.d.ts.map +1 -0
- package/dist/compiler/compile.bench.js +89 -0
- package/dist/compiler/compile.bench.js.map +1 -0
- package/dist/compiler/compile.d.ts +24 -0
- package/dist/compiler/compile.d.ts.map +1 -0
- package/dist/compiler/compile.js +106 -0
- package/dist/compiler/compile.js.map +1 -0
- package/dist/compiler/compile.test.d.ts +1 -0
- package/dist/compiler/compile.test.d.ts.map +1 -0
- package/dist/compiler/compile.test.js +66 -0
- package/dist/compiler/compile.test.js.map +1 -0
- package/dist/compiler/compiler-options.d.ts +466 -0
- package/dist/compiler/compiler-options.d.ts.map +1 -0
- package/dist/compiler/compiler-options.js +22 -0
- package/dist/compiler/compiler-options.js.map +1 -0
- package/dist/compiler/create-paraglide.d.ts +21 -0
- package/dist/compiler/create-paraglide.d.ts.map +1 -0
- package/dist/compiler/create-paraglide.js +69 -0
- package/dist/compiler/create-paraglide.js.map +1 -0
- package/dist/compiler/create-paraglide.test.d.ts +1 -0
- package/dist/compiler/create-paraglide.test.d.ts.map +1 -0
- package/dist/compiler/create-paraglide.test.js +55 -0
- package/dist/compiler/create-paraglide.test.js.map +1 -0
- package/dist/compiler/create-readme.d.ts +9 -0
- package/dist/compiler/create-readme.d.ts.map +1 -0
- package/dist/compiler/create-readme.js +127 -0
- package/dist/compiler/create-readme.js.map +1 -0
- package/dist/compiler/emit-files.d.ts +15 -0
- package/dist/compiler/emit-files.d.ts.map +1 -0
- package/dist/compiler/emit-files.js +58 -0
- package/dist/compiler/emit-files.js.map +1 -0
- package/dist/compiler/emit-files.test.d.ts +1 -0
- package/dist/compiler/emit-files.test.d.ts.map +1 -0
- package/dist/compiler/emit-files.test.js +43 -0
- package/dist/compiler/emit-files.test.js.map +1 -0
- package/dist/compiler/emit-ts-declarations.d.ts +11 -0
- package/dist/compiler/emit-ts-declarations.d.ts.map +1 -0
- package/dist/compiler/emit-ts-declarations.interop.test.d.ts +1 -0
- package/dist/compiler/emit-ts-declarations.interop.test.d.ts.map +1 -0
- package/dist/compiler/emit-ts-declarations.interop.test.js +33 -0
- package/dist/compiler/emit-ts-declarations.interop.test.js.map +1 -0
- package/dist/compiler/emit-ts-declarations.js +353 -0
- package/dist/compiler/emit-ts-declarations.js.map +1 -0
- package/dist/compiler/emit-ts-declarations.test.d.ts +1 -0
- package/dist/compiler/emit-ts-declarations.test.d.ts.map +1 -0
- package/dist/compiler/emit-ts-declarations.test.js +161 -0
- package/dist/compiler/emit-ts-declarations.test.js.map +1 -0
- package/dist/compiler/index.d.ts +13 -0
- package/dist/compiler/index.d.ts.map +1 -0
- package/dist/compiler/index.js +11 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/jsdoc-types.d.ts +21 -0
- package/dist/compiler/jsdoc-types.d.ts.map +1 -0
- package/dist/compiler/jsdoc-types.js +59 -0
- package/dist/compiler/jsdoc-types.js.map +1 -0
- package/dist/compiler/jsdoc-types.test.d.ts +1 -0
- package/dist/compiler/jsdoc-types.test.d.ts.map +1 -0
- package/dist/compiler/jsdoc-types.test.js +100 -0
- package/dist/compiler/jsdoc-types.test.js.map +1 -0
- package/dist/compiler/lazy-modules/compile-cache.d.ts +37 -0
- package/dist/compiler/lazy-modules/compile-cache.d.ts.map +1 -0
- package/dist/compiler/lazy-modules/compile-cache.js +34 -0
- package/dist/compiler/lazy-modules/compile-cache.js.map +1 -0
- package/dist/compiler/lazy-modules/compile-project.lazy.test.d.ts +2 -0
- package/dist/compiler/lazy-modules/compile-project.lazy.test.d.ts.map +1 -0
- package/dist/compiler/lazy-modules/compile-project.lazy.test.js +65 -0
- package/dist/compiler/lazy-modules/compile-project.lazy.test.js.map +1 -0
- package/dist/compiler/lazy-modules/create-loader.d.ts +18 -0
- package/dist/compiler/lazy-modules/create-loader.d.ts.map +1 -0
- package/dist/compiler/lazy-modules/create-loader.js +182 -0
- package/dist/compiler/lazy-modules/create-loader.js.map +1 -0
- package/dist/compiler/lazy-modules/create-loader.test.d.ts +2 -0
- package/dist/compiler/lazy-modules/create-loader.test.d.ts.map +1 -0
- package/dist/compiler/lazy-modules/create-loader.test.js +82 -0
- package/dist/compiler/lazy-modules/create-loader.test.js.map +1 -0
- package/dist/compiler/lazy-modules/manifest.d.ts +32 -0
- package/dist/compiler/lazy-modules/manifest.d.ts.map +1 -0
- package/dist/compiler/lazy-modules/manifest.js +11 -0
- package/dist/compiler/lazy-modules/manifest.js.map +1 -0
- package/dist/compiler/match-literals.d.ts +2 -0
- package/dist/compiler/match-literals.d.ts.map +1 -0
- package/dist/compiler/match-literals.js +42 -0
- package/dist/compiler/match-literals.js.map +1 -0
- package/dist/compiler/output-structure/lazy-modules.d.ts +27 -0
- package/dist/compiler/output-structure/lazy-modules.d.ts.map +1 -0
- package/dist/compiler/output-structure/lazy-modules.js +157 -0
- package/dist/compiler/output-structure/lazy-modules.js.map +1 -0
- package/dist/compiler/output-structure/lazy-modules.test.d.ts +2 -0
- package/dist/compiler/output-structure/lazy-modules.test.d.ts.map +1 -0
- package/dist/compiler/output-structure/lazy-modules.test.js +128 -0
- package/dist/compiler/output-structure/lazy-modules.test.js.map +1 -0
- package/dist/compiler/output-structure/locale-modules.d.ts +4 -0
- package/dist/compiler/output-structure/locale-modules.d.ts.map +1 -0
- package/dist/compiler/output-structure/locale-modules.js +81 -0
- package/dist/compiler/output-structure/locale-modules.js.map +1 -0
- package/dist/compiler/output-structure/locale-modules.test.d.ts +1 -0
- package/dist/compiler/output-structure/locale-modules.test.d.ts.map +1 -0
- package/dist/compiler/output-structure/locale-modules.test.js +163 -0
- package/dist/compiler/output-structure/locale-modules.test.js.map +1 -0
- package/dist/compiler/output-structure/message-modules.d.ts +4 -0
- package/dist/compiler/output-structure/message-modules.d.ts.map +1 -0
- package/dist/compiler/output-structure/message-modules.js +100 -0
- package/dist/compiler/output-structure/message-modules.js.map +1 -0
- package/dist/compiler/output-structure/message-modules.test.d.ts +1 -0
- package/dist/compiler/output-structure/message-modules.test.d.ts.map +1 -0
- package/dist/compiler/output-structure/message-modules.test.js +148 -0
- package/dist/compiler/output-structure/message-modules.test.js.map +1 -0
- package/dist/compiler/per-locale-build.d.ts +2 -0
- package/dist/compiler/per-locale-build.d.ts.map +1 -0
- package/dist/compiler/per-locale-build.js +3 -0
- package/dist/compiler/per-locale-build.js.map +1 -0
- package/dist/compiler/registry.d.ts +13 -0
- package/dist/compiler/registry.d.ts.map +1 -0
- package/dist/compiler/registry.js +60 -0
- package/dist/compiler/registry.js.map +1 -0
- package/dist/compiler/resolve-tsc-js-path.d.ts +9 -0
- package/dist/compiler/resolve-tsc-js-path.d.ts.map +1 -0
- package/dist/compiler/resolve-tsc-js-path.js +23 -0
- package/dist/compiler/resolve-tsc-js-path.js.map +1 -0
- package/dist/compiler/runtime/check-locale.d.ts +31 -0
- package/dist/compiler/runtime/check-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/check-locale.js +51 -0
- package/dist/compiler/runtime/check-locale.js.map +1 -0
- package/dist/compiler/runtime/check-locale.test.d.ts +1 -0
- package/dist/compiler/runtime/check-locale.test.d.ts.map +1 -0
- package/dist/compiler/runtime/check-locale.test.js +84 -0
- package/dist/compiler/runtime/check-locale.test.js.map +1 -0
- package/dist/compiler/runtime/create-runtime.d.ts +35 -0
- package/dist/compiler/runtime/create-runtime.d.ts.map +1 -0
- package/dist/compiler/runtime/create-runtime.js +196 -0
- package/dist/compiler/runtime/create-runtime.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.d.ts +13 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.js +43 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.test.d.ts +1 -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 +149 -0
- package/dist/compiler/runtime/extract-locale-from-cookie.test.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-header.d.ts +13 -0
- package/dist/compiler/runtime/extract-locale-from-header.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-header.js +45 -0
- package/dist/compiler/runtime/extract-locale-from-header.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-header.test.d.ts +1 -0
- package/dist/compiler/runtime/extract-locale-from-header.test.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-header.test.js +55 -0
- package/dist/compiler/runtime/extract-locale-from-header.test.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.d.ts +12 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.js +33 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.test.d.ts +1 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.test.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.test.js +45 -0
- package/dist/compiler/runtime/extract-locale-from-navigator.test.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.d.ts +34 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.js +70 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.test.d.ts +1 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.test.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.test.js +119 -0
- package/dist/compiler/runtime/extract-locale-from-request-async.test.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request.d.ts +41 -0
- package/dist/compiler/runtime/extract-locale-from-request.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request.js +96 -0
- package/dist/compiler/runtime/extract-locale-from-request.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-request.test.d.ts +1 -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 +351 -0
- package/dist/compiler/runtime/extract-locale-from-request.test.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-url.d.ts +11 -0
- package/dist/compiler/runtime/extract-locale-from-url.d.ts.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-url.js +68 -0
- package/dist/compiler/runtime/extract-locale-from-url.js.map +1 -0
- package/dist/compiler/runtime/extract-locale-from-url.test.d.ts +1 -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 +127 -0
- package/dist/compiler/runtime/extract-locale-from-url.test.js.map +1 -0
- package/dist/compiler/runtime/generate-static-localized-urls.d.ts +44 -0
- package/dist/compiler/runtime/generate-static-localized-urls.d.ts.map +1 -0
- package/dist/compiler/runtime/generate-static-localized-urls.js +133 -0
- package/dist/compiler/runtime/generate-static-localized-urls.js.map +1 -0
- package/dist/compiler/runtime/generate-static-localized-urls.test.d.ts +1 -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 +159 -0
- package/dist/compiler/runtime/generate-static-localized-urls.test.js.map +1 -0
- package/dist/compiler/runtime/get-locale.d.ts +42 -0
- package/dist/compiler/runtime/get-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/get-locale.js +158 -0
- package/dist/compiler/runtime/get-locale.js.map +1 -0
- package/dist/compiler/runtime/get-locale.test.d.ts +1 -0
- package/dist/compiler/runtime/get-locale.test.d.ts.map +1 -0
- package/dist/compiler/runtime/get-locale.test.js +295 -0
- package/dist/compiler/runtime/get-locale.test.js.map +1 -0
- package/dist/compiler/runtime/get-text-direction.d.ts +15 -0
- package/dist/compiler/runtime/get-text-direction.d.ts.map +1 -0
- package/dist/compiler/runtime/get-text-direction.js +46 -0
- package/dist/compiler/runtime/get-text-direction.js.map +1 -0
- package/dist/compiler/runtime/get-text-direction.test.d.ts +1 -0
- package/dist/compiler/runtime/get-text-direction.test.d.ts.map +1 -0
- package/dist/compiler/runtime/get-text-direction.test.js +40 -0
- package/dist/compiler/runtime/get-text-direction.test.js.map +1 -0
- package/dist/compiler/runtime/get-url-origin.d.ts +19 -0
- package/dist/compiler/runtime/get-url-origin.d.ts.map +1 -0
- package/dist/compiler/runtime/get-url-origin.js +31 -0
- package/dist/compiler/runtime/get-url-origin.js.map +1 -0
- package/dist/compiler/runtime/get-url-origin.test.d.ts +1 -0
- package/dist/compiler/runtime/get-url-origin.test.d.ts.map +1 -0
- package/dist/compiler/runtime/get-url-origin.test.js +18 -0
- package/dist/compiler/runtime/get-url-origin.test.js.map +1 -0
- package/dist/compiler/runtime/host-routing.d.ts +28 -0
- package/dist/compiler/runtime/host-routing.d.ts.map +1 -0
- package/dist/compiler/runtime/host-routing.js +79 -0
- package/dist/compiler/runtime/host-routing.js.map +1 -0
- package/dist/compiler/runtime/host-routing.test.d.ts +1 -0
- package/dist/compiler/runtime/host-routing.test.d.ts.map +1 -0
- package/dist/compiler/runtime/host-routing.test.js +128 -0
- package/dist/compiler/runtime/host-routing.test.js.map +1 -0
- package/dist/compiler/runtime/localize-href.d.ts +84 -0
- package/dist/compiler/runtime/localize-href.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-href.js +115 -0
- package/dist/compiler/runtime/localize-href.js.map +1 -0
- package/dist/compiler/runtime/localize-href.test.d.ts +1 -0
- package/dist/compiler/runtime/localize-href.test.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-href.test.js +139 -0
- package/dist/compiler/runtime/localize-href.test.js.map +1 -0
- package/dist/compiler/runtime/localize-url.d.ts +95 -0
- package/dist/compiler/runtime/localize-url.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-url.js +327 -0
- package/dist/compiler/runtime/localize-url.js.map +1 -0
- package/dist/compiler/runtime/localize-url.test.d.ts +1 -0
- package/dist/compiler/runtime/localize-url.test.d.ts.map +1 -0
- package/dist/compiler/runtime/localize-url.test.js +533 -0
- package/dist/compiler/runtime/localize-url.test.js.map +1 -0
- package/dist/compiler/runtime/route-strategy.d.ts +32 -0
- package/dist/compiler/runtime/route-strategy.d.ts.map +1 -0
- package/dist/compiler/runtime/route-strategy.js +72 -0
- package/dist/compiler/runtime/route-strategy.js.map +1 -0
- package/dist/compiler/runtime/set-locale.d.ts +46 -0
- package/dist/compiler/runtime/set-locale.d.ts.map +1 -0
- package/dist/compiler/runtime/set-locale.js +172 -0
- package/dist/compiler/runtime/set-locale.js.map +1 -0
- package/dist/compiler/runtime/set-locale.test.d.ts +1 -0
- package/dist/compiler/runtime/set-locale.test.d.ts.map +1 -0
- package/dist/compiler/runtime/set-locale.test.js +555 -0
- package/dist/compiler/runtime/set-locale.test.js.map +1 -0
- package/dist/compiler/runtime/should-redirect.d.ts +100 -0
- package/dist/compiler/runtime/should-redirect.d.ts.map +1 -0
- package/dist/compiler/runtime/should-redirect.js +155 -0
- package/dist/compiler/runtime/should-redirect.js.map +1 -0
- package/dist/compiler/runtime/should-redirect.test.d.ts +1 -0
- package/dist/compiler/runtime/should-redirect.test.d.ts.map +1 -0
- package/dist/compiler/runtime/should-redirect.test.js +270 -0
- package/dist/compiler/runtime/should-redirect.test.js.map +1 -0
- package/dist/compiler/runtime/strategy.d.ts +63 -0
- package/dist/compiler/runtime/strategy.d.ts.map +1 -0
- package/dist/compiler/runtime/strategy.js +65 -0
- package/dist/compiler/runtime/strategy.js.map +1 -0
- package/dist/compiler/runtime/strategy.test.d.ts +1 -0
- package/dist/compiler/runtime/strategy.test.d.ts.map +1 -0
- package/dist/compiler/runtime/strategy.test.js +90 -0
- package/dist/compiler/runtime/strategy.test.js.map +1 -0
- package/dist/compiler/runtime/track-message-call.d.ts +5 -0
- package/dist/compiler/runtime/track-message-call.d.ts.map +1 -0
- package/dist/compiler/runtime/track-message-call.js +14 -0
- package/dist/compiler/runtime/track-message-call.js.map +1 -0
- package/dist/compiler/runtime/track-message-call.test.d.ts +1 -0
- package/dist/compiler/runtime/track-message-call.test.d.ts.map +1 -0
- package/dist/compiler/runtime/track-message-call.test.js +22 -0
- package/dist/compiler/runtime/track-message-call.test.js.map +1 -0
- package/dist/compiler/runtime/type-definitions.d.ts +197 -0
- package/dist/compiler/runtime/type-definitions.d.ts.map +1 -0
- package/dist/compiler/runtime/type-definitions.js +150 -0
- package/dist/compiler/runtime/type-definitions.js.map +1 -0
- package/dist/compiler/runtime/type.d.ts +47 -0
- package/dist/compiler/runtime/type.d.ts.map +1 -0
- package/dist/compiler/runtime/type.js +2 -0
- package/dist/compiler/runtime/type.js.map +1 -0
- package/dist/compiler/runtime/type.test.d.ts +1 -0
- package/dist/compiler/runtime/type.test.d.ts.map +1 -0
- package/dist/compiler/runtime/type.test.js +153 -0
- package/dist/compiler/runtime/type.test.js.map +1 -0
- package/dist/compiler/runtime/url-pattern.d.ts +12 -0
- package/dist/compiler/runtime/url-pattern.d.ts.map +1 -0
- package/dist/compiler/runtime/url-pattern.js +35 -0
- package/dist/compiler/runtime/url-pattern.js.map +1 -0
- package/dist/compiler/runtime/variables.d.ts +128 -0
- package/dist/compiler/runtime/variables.d.ts.map +1 -0
- package/dist/compiler/runtime/variables.js +111 -0
- package/dist/compiler/runtime/variables.js.map +1 -0
- package/dist/compiler/safe-module-id.d.ts +7 -0
- package/dist/compiler/safe-module-id.d.ts.map +1 -0
- package/dist/compiler/safe-module-id.js +78 -0
- package/dist/compiler/safe-module-id.js.map +1 -0
- package/dist/compiler/safe-module-id.test.d.ts +1 -0
- package/dist/compiler/safe-module-id.test.d.ts.map +1 -0
- package/dist/compiler/safe-module-id.test.js +36 -0
- package/dist/compiler/safe-module-id.test.js.map +1 -0
- package/dist/compiler/seed-previous-compilation.d.ts +7 -0
- package/dist/compiler/seed-previous-compilation.d.ts.map +1 -0
- package/dist/compiler/seed-previous-compilation.js +9 -0
- package/dist/compiler/seed-previous-compilation.js.map +1 -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 +91 -0
- package/dist/compiler/server/create-server-file.js.map +1 -0
- package/dist/compiler/server/create-server-file.test.d.ts +1 -0
- package/dist/compiler/server/create-server-file.test.d.ts.map +1 -0
- package/dist/compiler/server/create-server-file.test.js +48 -0
- package/dist/compiler/server/create-server-file.test.js.map +1 -0
- package/dist/compiler/server/middleware.d.ts +98 -0
- package/dist/compiler/server/middleware.d.ts.map +1 -0
- package/dist/compiler/server/middleware.js +278 -0
- package/dist/compiler/server/middleware.js.map +1 -0
- package/dist/compiler/server/middleware.test.d.ts +1 -0
- package/dist/compiler/server/middleware.test.d.ts.map +1 -0
- package/dist/compiler/server/middleware.test.js +1001 -0
- package/dist/compiler/server/middleware.test.js.map +1 -0
- package/dist/compiler/server/type.d.ts +6 -0
- package/dist/compiler/server/type.d.ts.map +1 -0
- package/dist/compiler/server/type.js +2 -0
- package/dist/compiler/server/type.js.map +1 -0
- package/dist/compiler/test-helpers.d.ts +30 -0
- package/dist/compiler/test-helpers.d.ts.map +1 -0
- package/dist/compiler/test-helpers.js +50 -0
- package/dist/compiler/test-helpers.js.map +1 -0
- package/dist/compiler/types.d.ts +7 -0
- package/dist/compiler/types.d.ts.map +1 -0
- package/dist/compiler/types.js +2 -0
- package/dist/compiler/types.js.map +1 -0
- package/dist/compiler/variable-access.d.ts +3 -0
- package/dist/compiler/variable-access.d.ts.map +1 -0
- package/dist/compiler/variable-access.js +15 -0
- package/dist/compiler/variable-access.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/messages/ast.d.ts +102 -0
- package/dist/messages/ast.d.ts.map +1 -0
- package/dist/messages/ast.js +8 -0
- package/dist/messages/ast.js.map +1 -0
- package/dist/messages/create-bundle-nested.d.ts +16 -0
- package/dist/messages/create-bundle-nested.d.ts.map +1 -0
- package/dist/messages/create-bundle-nested.js +22 -0
- package/dist/messages/create-bundle-nested.js.map +1 -0
- package/dist/messages/index.d.ts +5 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/messages/index.js +5 -0
- package/dist/messages/index.js.map +1 -0
- package/dist/messages/load-messages.d.ts +19 -0
- package/dist/messages/load-messages.d.ts.map +1 -0
- package/dist/messages/load-messages.js +49 -0
- package/dist/messages/load-messages.js.map +1 -0
- package/dist/messages/message-format/flatten.d.ts +9 -0
- package/dist/messages/message-format/flatten.d.ts.map +1 -0
- package/dist/messages/message-format/flatten.js +32 -0
- package/dist/messages/message-format/flatten.js.map +1 -0
- package/dist/messages/message-format/import-files.d.ts +32 -0
- package/dist/messages/message-format/import-files.d.ts.map +1 -0
- package/dist/messages/message-format/import-files.js +53 -0
- package/dist/messages/message-format/import-files.js.map +1 -0
- package/dist/messages/message-format/import-files.test.d.ts +1 -0
- package/dist/messages/message-format/import-files.test.d.ts.map +1 -0
- package/dist/messages/message-format/import-files.test.js +145 -0
- package/dist/messages/message-format/import-files.test.js.map +1 -0
- package/dist/messages/message-format/index.d.ts +6 -0
- package/dist/messages/message-format/index.d.ts.map +1 -0
- package/dist/messages/message-format/index.js +7 -0
- package/dist/messages/message-format/index.js.map +1 -0
- package/dist/messages/message-format/parse-bundle.d.ts +31 -0
- package/dist/messages/message-format/parse-bundle.d.ts.map +1 -0
- package/dist/messages/message-format/parse-bundle.js +169 -0
- package/dist/messages/message-format/parse-bundle.js.map +1 -0
- package/dist/messages/message-format/parse-declaration.d.ts +2 -0
- package/dist/messages/message-format/parse-declaration.d.ts.map +1 -0
- package/dist/messages/message-format/parse-declaration.js +56 -0
- package/dist/messages/message-format/parse-declaration.js.map +1 -0
- package/dist/messages/message-format/parse-markup.d.ts +4 -0
- package/dist/messages/message-format/parse-markup.d.ts.map +1 -0
- package/dist/messages/message-format/parse-markup.js +167 -0
- package/dist/messages/message-format/parse-markup.js.map +1 -0
- package/dist/messages/message-format/parse-matches.d.ts +5 -0
- package/dist/messages/message-format/parse-matches.d.ts.map +1 -0
- package/dist/messages/message-format/parse-matches.js +31 -0
- package/dist/messages/message-format/parse-matches.js.map +1 -0
- package/dist/messages/message-format/parse-pattern.d.ts +5 -0
- package/dist/messages/message-format/parse-pattern.d.ts.map +1 -0
- package/dist/messages/message-format/parse-pattern.js +120 -0
- package/dist/messages/message-format/parse-pattern.js.map +1 -0
- package/dist/messages/message-format/unique.d.ts +2 -0
- package/dist/messages/message-format/unique.d.ts.map +1 -0
- package/dist/messages/message-format/unique.js +5 -0
- package/dist/messages/message-format/unique.js.map +1 -0
- package/dist/messages/nest-bundles.d.ts +19 -0
- package/dist/messages/nest-bundles.d.ts.map +1 -0
- package/dist/messages/nest-bundles.js +49 -0
- package/dist/messages/nest-bundles.js.map +1 -0
- package/dist/services/account/index.d.ts +14 -0
- package/dist/services/account/index.d.ts.map +1 -0
- package/dist/services/account/index.js +43 -0
- package/dist/services/account/index.js.map +1 -0
- package/dist/services/account/types.d.ts +4 -0
- package/dist/services/account/types.d.ts.map +1 -0
- package/dist/services/account/types.js +2 -0
- package/dist/services/account/types.js.map +1 -0
- package/dist/services/codegen/escape.d.ts +9 -0
- package/dist/services/codegen/escape.d.ts.map +1 -0
- package/dist/services/codegen/escape.js +19 -0
- package/dist/services/codegen/escape.js.map +1 -0
- package/dist/services/codegen/quotes.d.ts +4 -0
- package/dist/services/codegen/quotes.d.ts.map +1 -0
- package/dist/services/codegen/quotes.js +5 -0
- package/dist/services/codegen/quotes.js.map +1 -0
- package/dist/services/env-variables/create-index-file.d.ts +9 -0
- package/dist/services/env-variables/create-index-file.d.ts.map +1 -0
- package/dist/services/env-variables/create-index-file.js +28 -0
- package/dist/services/env-variables/create-index-file.js.map +1 -0
- package/dist/services/env-variables/index.d.ts +3 -0
- package/dist/services/env-variables/index.d.ts.map +1 -0
- package/dist/services/env-variables/index.js +4 -0
- package/dist/services/env-variables/index.js.map +1 -0
- package/dist/services/environment/package.d.ts +9 -0
- package/dist/services/environment/package.d.ts.map +1 -0
- package/dist/services/environment/package.js +31 -0
- package/dist/services/environment/package.js.map +1 -0
- package/dist/services/environment/package.test.d.ts +1 -0
- package/dist/services/environment/package.test.d.ts.map +1 -0
- package/dist/services/environment/package.test.js +21 -0
- package/dist/services/environment/package.test.js.map +1 -0
- package/dist/services/error-handling.d.ts +12 -0
- package/dist/services/error-handling.d.ts.map +1 -0
- package/dist/services/error-handling.js +27 -0
- package/dist/services/error-handling.js.map +1 -0
- package/dist/services/error-handling.test.d.ts +1 -0
- package/dist/services/error-handling.test.d.ts.map +1 -0
- package/dist/services/error-handling.test.js +10 -0
- package/dist/services/error-handling.test.js.map +1 -0
- package/dist/services/file-handling/content-hash.d.ts +9 -0
- package/dist/services/file-handling/content-hash.js +19 -0
- package/dist/services/file-handling/content-hash.js.map +1 -0
- package/dist/services/file-handling/exists.d.ts +7 -0
- package/dist/services/file-handling/exists.d.ts.map +1 -0
- package/dist/services/file-handling/exists.js +24 -0
- package/dist/services/file-handling/exists.js.map +1 -0
- package/dist/services/file-handling/exists.test.d.ts +1 -0
- package/dist/services/file-handling/exists.test.d.ts.map +1 -0
- package/dist/services/file-handling/exists.test.js +27 -0
- package/dist/services/file-handling/exists.test.js.map +1 -0
- package/dist/services/file-handling/types.d.ts +4 -0
- package/dist/services/file-handling/types.d.ts.map +1 -0
- package/dist/services/file-handling/types.js +2 -0
- package/dist/services/file-handling/types.js.map +1 -0
- package/dist/services/file-handling/write-output.d.ts +21 -0
- package/dist/services/file-handling/write-output.d.ts.map +1 -0
- package/dist/services/file-handling/write-output.js +157 -0
- package/dist/services/file-handling/write-output.js.map +1 -0
- package/dist/services/file-handling/write-output.test.d.ts +1 -0
- package/dist/services/file-handling/write-output.test.d.ts.map +1 -0
- package/dist/services/file-handling/write-output.test.js +217 -0
- package/dist/services/file-handling/write-output.test.js.map +1 -0
- package/dist/services/file-watching/tracked-fs.d.ts +25 -0
- package/dist/services/file-watching/tracked-fs.d.ts.map +1 -0
- package/dist/services/file-watching/tracked-fs.js +94 -0
- package/dist/services/file-watching/tracked-fs.js.map +1 -0
- package/dist/services/file-watching/tracked-fs.test.d.ts +1 -0
- package/dist/services/file-watching/tracked-fs.test.d.ts.map +1 -0
- package/dist/services/file-watching/tracked-fs.test.js +87 -0
- package/dist/services/file-watching/tracked-fs.test.js.map +1 -0
- package/dist/services/logger/index.d.ts +17 -0
- package/dist/services/logger/index.d.ts.map +1 -0
- package/dist/services/logger/index.js +58 -0
- package/dist/services/logger/index.js.map +1 -0
- package/dist/services/lookup.d.ts +14 -0
- package/dist/services/lookup.d.ts.map +1 -0
- package/dist/services/lookup.js +24 -0
- package/dist/services/lookup.js.map +1 -0
- 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 +2 -0
- package/dist/urlpattern-polyfill/index.js.map +1 -0
- package/dist/utilities/detect-json-formatting.d.ts +10 -0
- package/dist/utilities/detect-json-formatting.d.ts.map +1 -0
- package/dist/utilities/detect-json-formatting.js +80 -0
- package/dist/utilities/detect-json-formatting.js.map +1 -0
- package/dist/utilities/node-normalize-path.d.ts +1 -0
- package/dist/utilities/node-normalize-path.d.ts.map +1 -0
- package/dist/utilities/node-normalize-path.js +10 -0
- package/dist/utilities/node-normalize-path.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { test, expect, vi } from "vitest";
|
|
2
|
+
import { createLoaderFile } from "./create-loader.js";
|
|
3
|
+
import { diffLocaleKeys, moduleCacheKey, emptyCompileCache } from "./compile-cache.js";
|
|
4
|
+
const manifest = {
|
|
5
|
+
version: 1,
|
|
6
|
+
catalogHash: "abc",
|
|
7
|
+
locales: ["en", "se"],
|
|
8
|
+
baseLocale: "en",
|
|
9
|
+
messages: {
|
|
10
|
+
hello: {
|
|
11
|
+
en: { module: "messages/en/hello.js", hash: "111" },
|
|
12
|
+
se: { module: "messages/se/hello.js", hash: "222" },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
routes: {},
|
|
16
|
+
};
|
|
17
|
+
test("createLoaderFile emits relative import map by default", () => {
|
|
18
|
+
const source = createLoaderFile({ manifest });
|
|
19
|
+
expect(source).toContain('./messages/en/hello.js');
|
|
20
|
+
expect(source).toContain('./runtime.js');
|
|
21
|
+
expect(source).toContain("export const m");
|
|
22
|
+
expect(source).toContain("prefetchMessages");
|
|
23
|
+
});
|
|
24
|
+
test("createLoaderFile emits virtual import map when requested", () => {
|
|
25
|
+
const source = createLoaderFile({ manifest, importStyle: "virtual" });
|
|
26
|
+
expect(source).toContain("virtual:paraglide/messages/en/hello.js");
|
|
27
|
+
expect(source).toContain("virtual:paraglide/runtime.js");
|
|
28
|
+
expect(source).not.toContain('./messages/en/hello.js');
|
|
29
|
+
});
|
|
30
|
+
test("diffLocaleKeys reports updates and removals", () => {
|
|
31
|
+
const diff = diffLocaleKeys({
|
|
32
|
+
locale: "en",
|
|
33
|
+
previous: { a: "1", b: "2", c: "3" },
|
|
34
|
+
next: { a: "1", b: "9", d: "4" },
|
|
35
|
+
});
|
|
36
|
+
expect(diff.updated).toEqual(["b", "d"]);
|
|
37
|
+
expect(diff.removed).toEqual(["c"]);
|
|
38
|
+
});
|
|
39
|
+
test("moduleCacheKey and emptyCompileCache helpers", () => {
|
|
40
|
+
expect(moduleCacheKey("en", "hello")).toBe("en:hello");
|
|
41
|
+
expect(emptyCompileCache()).toEqual({
|
|
42
|
+
localeFileHashes: {},
|
|
43
|
+
moduleHashes: {},
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
test("loader sync call works after prefetch (mocked modules)", async () => {
|
|
47
|
+
const enHello = vi.fn((_inputs) => "Hello");
|
|
48
|
+
const seHello = vi.fn((_inputs) => "Hej");
|
|
49
|
+
const importers = {
|
|
50
|
+
hello: {
|
|
51
|
+
en: async () => ({ default: enHello }),
|
|
52
|
+
se: async () => ({ default: seHello }),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
const moduleCache = new Map();
|
|
56
|
+
async function loadMessageModule(locale, key) {
|
|
57
|
+
const id = `${locale}:${key}`;
|
|
58
|
+
if (moduleCache.has(id))
|
|
59
|
+
return moduleCache.get(id);
|
|
60
|
+
const mod = await importers[key][locale]();
|
|
61
|
+
moduleCache.set(id, mod.default);
|
|
62
|
+
return mod.default;
|
|
63
|
+
}
|
|
64
|
+
async function prefetchMessages(args) {
|
|
65
|
+
await Promise.all(args.keys.map((key) => loadMessageModule(args.locale, key)));
|
|
66
|
+
}
|
|
67
|
+
function createMessageFn(key) {
|
|
68
|
+
return (inputs = {}, options = {}) => {
|
|
69
|
+
const locale = options.locale ?? "en";
|
|
70
|
+
const loaded = moduleCache.get(`${locale}:${key}`);
|
|
71
|
+
if (!loaded)
|
|
72
|
+
throw new Error("not prefetched");
|
|
73
|
+
return loaded(inputs);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const m = { hello: createMessageFn("hello") };
|
|
77
|
+
expect(() => m.hello()).toThrow(/not prefetched/);
|
|
78
|
+
await prefetchMessages({ locale: "se", keys: ["hello"] });
|
|
79
|
+
expect(m.hello({}, { locale: "se" })).toBe("Hej");
|
|
80
|
+
expect(seHello).toHaveBeenCalled();
|
|
81
|
+
});
|
|
82
|
+
//# sourceMappingURL=create-loader.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-loader.test.js","sourceRoot":"","sources":["../../../src/compiler/lazy-modules/create-loader.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvF,MAAM,QAAQ,GAAwB;IACrC,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE;QACT,KAAK,EAAE;YACN,EAAE,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,IAAI,EAAE,KAAK,EAAE;YACnD,EAAE,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,IAAI,EAAE,KAAK,EAAE;SACnD;KACD;IACD,MAAM,EAAE,EAAE;CACV,CAAC;AAEF,IAAI,CAAC,uDAAuD,EAAE,GAAG,EAAE;IAClE,MAAM,MAAM,GAAG,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9C,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACnD,MAAM,CAAC,MAAM,CA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C,GAAG,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAC3D,CAAC;IACH,CAAC;IAED,SAAS,eAAe,CAAC,GAAW;QACnC,OAAO,CACN,MAAM,GAA4B,EAAE,EACpC,OAAO,GAAwB,EAAE,EAChC,EAAE;YACH,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC;YACtC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC;IACH,CAAC;IAED,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;IAE9C,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAElD,MAAM,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC1D,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifest for lazy per-(locale, key) message modules.
|
|
3
|
+
*
|
|
4
|
+
* Module paths are compiler-relative (`messages/{locale}/{key}.js`).
|
|
5
|
+
* Vite owns final chunk URLs / content hashes in the client build output
|
|
6
|
+
* (e.g. SvelteKit `_app/immutable/chunks/`).
|
|
7
|
+
*/
|
|
8
|
+
export type LazyMessageModuleEntry = {
|
|
9
|
+
/** Path relative to the compile output root */
|
|
10
|
+
module: string;
|
|
11
|
+
/** Short content hash of the compiled module source */
|
|
12
|
+
hash: string;
|
|
13
|
+
/**
|
|
14
|
+
* Final URL after Vite emit (filled by the bundler plugin).
|
|
15
|
+
* Absent in pure compiler output.
|
|
16
|
+
*/
|
|
17
|
+
url?: string;
|
|
18
|
+
};
|
|
19
|
+
export type LazyMessageManifest = {
|
|
20
|
+
version: 1;
|
|
21
|
+
catalogHash: string;
|
|
22
|
+
locales: string[];
|
|
23
|
+
baseLocale: string;
|
|
24
|
+
messages: Record<string, Record<string, LazyMessageModuleEntry>>;
|
|
25
|
+
/**
|
|
26
|
+
* Route file → message keys used (static analysis).
|
|
27
|
+
* Filled by the Vite plugin; empty from the compiler alone.
|
|
28
|
+
*/
|
|
29
|
+
routes: Record<string, string[]>;
|
|
30
|
+
};
|
|
31
|
+
export declare function createEmptyManifest(locales: string[], baseLocale: string): LazyMessageManifest;
|
|
32
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/compiler/lazy-modules/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,CAAC,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;IACjE;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACjC,CAAC;AAEF,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,GAChB,mBAAmB,CASrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/compiler/lazy-modules/manifest.ts"],"names":[],"mappings":"AAgCA,MAAM,UAAU,mBAAmB,CAClC,OAAiB,EACjB,UAAkB;IAElB,OAAO;QACN,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,EAAE;QACf,OAAO;QACP,UAAU;QACV,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;KACV,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-literals.d.ts","sourceRoot":"","sources":["../../src/compiler/match-literals.ts"],"names":[],"mappings":"AAGA,wBAAgB,yBAAyB,CACxC,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,GAClB,MAAM,CAUR;AAED,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAe3E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const UNSUPPORTED_NUMERIC_MATCH_PREFIX = /^(0[bBoOxX]|NaN$)/;
|
|
2
|
+
const INFINITY_MATCH_LITERAL = /^[+]?Infinity$/;
|
|
3
|
+
export function renderInputMatchCondition(inputExpression, literalValue) {
|
|
4
|
+
const numericLiteral = parseNumericMatchLiteral(literalValue);
|
|
5
|
+
if (numericLiteral === undefined) {
|
|
6
|
+
return `${inputExpression} === ${JSON.stringify(literalValue)}`;
|
|
7
|
+
}
|
|
8
|
+
return `(${inputExpression} === ${numericLiteral} || ${inputExpression} === ${JSON.stringify(literalValue)})`;
|
|
9
|
+
}
|
|
10
|
+
export function renderInputMatchTypeVariants(literalValue) {
|
|
11
|
+
const numericLiteral = parseNumericMatchLiteral(literalValue);
|
|
12
|
+
const variants = new Set();
|
|
13
|
+
if (numericLiteral !== undefined) {
|
|
14
|
+
variants.add(numericLiteral === "Infinity" || numericLiteral === "-Infinity"
|
|
15
|
+
? "number"
|
|
16
|
+
: numericLiteral);
|
|
17
|
+
}
|
|
18
|
+
variants.add(JSON.stringify(literalValue));
|
|
19
|
+
return Array.from(variants);
|
|
20
|
+
}
|
|
21
|
+
function parseNumericMatchLiteral(literalValue) {
|
|
22
|
+
if (literalValue.length === 0 ||
|
|
23
|
+
literalValue.trim() !== literalValue ||
|
|
24
|
+
UNSUPPORTED_NUMERIC_MATCH_PREFIX.test(literalValue)) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
if (INFINITY_MATCH_LITERAL.test(literalValue)) {
|
|
28
|
+
return "Infinity";
|
|
29
|
+
}
|
|
30
|
+
if (literalValue === "-Infinity") {
|
|
31
|
+
return "-Infinity";
|
|
32
|
+
}
|
|
33
|
+
const parsed = Number(literalValue);
|
|
34
|
+
if (!Number.isFinite(parsed)) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (Number.isInteger(parsed) && !Number.isSafeInteger(parsed)) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return String(parsed);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=match-literals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match-literals.js","sourceRoot":"","sources":["../../src/compiler/match-literals.ts"],"names":[],"mappings":"AAAA,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AAC7D,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEhD,MAAM,UAAU,yBAAyB,CACxC,eAAuB,EACvB,YAAoB;IAEpB,MAAM,cAAc,GAAG,wBAAwB,CAAC,YAAY,CAAC,CAAC;IAE9D,IAAI,cAAc,KAAK,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AC;IAClB,CAAC;IAED,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC/D,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACvB,CAAC","sourcesContent":["const UNSUPPORTED_NUMERIC_MATCH_PREFIX = /^(0[bBoOxX]|NaN$)/;\nconst INFINITY_MATCH_LITERAL = /^[+]?Infinity$/;\n\nexport function renderInputMatchCondition(\n\tinputExpression: string,\n\tliteralValue: string\n): string {\n\tconst numericLiteral = parseNumericMatchLiteral(literalValue);\n\n\tif (numericLiteral === undefined) {\n\t\treturn `${inputExpression} === ${JSON.stringify(literalValue)}`;\n\t}\n\n\treturn `(${inputExpression} === ${numericLiteral} || ${inputExpression} === ${JSON.stringify(\n\t\tliteralValue\n\t)})`;\n}\n\nexport function renderInputMatchTypeVariants(literalValue: string): string[] {\n\tconst numericLiteral = parseNumericMatchLiteral(literalValue);\n\tconst variants = new Set<string>();\n\n\tif (numericLiteral !== undefined) {\n\t\tvariants.add(\n\t\t\tnumericLiteral === \"Infinity\" || numericLiteral === \"-Infinity\"\n\t\t\t\t? \"number\"\n\t\t\t\t: numericLiteral\n\t\t);\n\t}\n\n\tvariants.add(JSON.stringify(literalValue));\n\n\treturn Array.from(variants);\n}\n\nfunction parseNumericMatchLiteral(literalValue: string): string | undefined {\n\tif (\n\t\tliteralValue.length === 0 ||\n\t\tliteralValue.trim() !== literalValue ||\n\t\tUNSUPPORTED_NUMERIC_MATCH_PREFIX.test(literalValue)\n\t) {\n\t\treturn undefined;\n\t}\n\n\tif (INFINITY_MATCH_LITERAL.test(literalValue)) {\n\t\treturn \"Infinity\";\n\t}\n\n\tif (literalValue === \"-Infinity\") {\n\t\treturn \"-Infinity\";\n\t}\n\n\tconst parsed = Number(literalValue);\n\n\tif (!Number.isFinite(parsed)) {\n\t\treturn undefined;\n\t}\n\n\tif (Number.isInteger(parsed) && !Number.isSafeInteger(parsed)) {\n\t\treturn undefined;\n\t}\n\n\treturn String(parsed);\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ParaglideSettings } from "../../messages/ast.js";
|
|
2
|
+
import type { CompiledBundleWithMessages } from "../compile-bundle.js";
|
|
3
|
+
import { type LazyMessageManifest } from "../lazy-modules/manifest.js";
|
|
4
|
+
/**
|
|
5
|
+
* Unused by lazy-modules (no sync dispatcher), but required by the
|
|
6
|
+
* output-structure contract used in `compileBundle`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function messageReferenceExpression(locale: string, bundleId: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Emit one ESM module per (locale, message key), a content-addressed
|
|
11
|
+
* manifest, a Proxy-based loader, and a TypeScript `Messages` interface.
|
|
12
|
+
*
|
|
13
|
+
* Fallback translations are **duplicated** into the missing-locale module
|
|
14
|
+
* (no cross-locale imports) so each module is independently cacheable.
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateOutput(compiledBundles: CompiledBundleWithMessages[], settings: Pick<ParaglideSettings, "locales" | "baseLocale">, fallbackMap: Record<string, string | undefined>, _experimentalMiddlewareLocaleSplitting?: boolean, options?: {
|
|
17
|
+
importStyle?: "relative" | "virtual";
|
|
18
|
+
}): Record<string, string>;
|
|
19
|
+
/**
|
|
20
|
+
* Same as `generateOutput` but loader/message imports use `virtual:paraglide/…`
|
|
21
|
+
* specifiers for the Vite plugin.
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateOutputForVite(compiledBundles: CompiledBundleWithMessages[], settings: Pick<ParaglideSettings, "locales" | "baseLocale">, fallbackMap: Record<string, string | undefined>): {
|
|
24
|
+
output: Record<string, string>;
|
|
25
|
+
manifest: LazyMessageManifest;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=lazy-modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-modules.d.ts","sourceRoot":"","sources":["../../../src/compiler/output-structure/lazy-modules.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAMvE,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,6BAA6B,CAAC;AAGrC;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC7B,eAAe,EAAE,0BAA0B,EAAE,EAC7C,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,YAAY,CAAC,EAC3D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAC/C,sCAAsC,UAAQ,EAC9C,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;CAAE,GAChD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA+DxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,eAAe,EAAE,0BAA0B,EAAE,EAC7C,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,YAAY,CAAC,EAC3D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAC7C;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAE,CAUnE"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { escapeForSingleQuoteString } from "../../services/codegen/escape.js";
|
|
3
|
+
import { toSafeModuleId } from "../safe-module-id.js";
|
|
4
|
+
import { inputsType } from "../jsdoc-types.js";
|
|
5
|
+
import { toBundleInputTypeAliasName } from "../compile-bundle.js";
|
|
6
|
+
import { isValidIdentifier, quotePropertyKey } from "../variable-access.js";
|
|
7
|
+
import { createEmptyManifest, } from "../lazy-modules/manifest.js";
|
|
8
|
+
import { createLoaderFile } from "../lazy-modules/create-loader.js";
|
|
9
|
+
/**
|
|
10
|
+
* Unused by lazy-modules (no sync dispatcher), but required by the
|
|
11
|
+
* output-structure contract used in `compileBundle`.
|
|
12
|
+
*/
|
|
13
|
+
export function messageReferenceExpression(locale, bundleId) {
|
|
14
|
+
return `${toSafeModuleId(locale)}_${toSafeModuleId(bundleId)}`;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Emit one ESM module per (locale, message key), a content-addressed
|
|
18
|
+
* manifest, a Proxy-based loader, and a TypeScript `Messages` interface.
|
|
19
|
+
*
|
|
20
|
+
* Fallback translations are **duplicated** into the missing-locale module
|
|
21
|
+
* (no cross-locale imports) so each module is independently cacheable.
|
|
22
|
+
*/
|
|
23
|
+
export function generateOutput(compiledBundles, settings, fallbackMap, _experimentalMiddlewareLocaleSplitting = false, options) {
|
|
24
|
+
void _experimentalMiddlewareLocaleSplitting;
|
|
25
|
+
const importStyle = options?.importStyle ?? "relative";
|
|
26
|
+
const output = {};
|
|
27
|
+
const manifest = createEmptyManifest(settings.locales, settings.baseLocale);
|
|
28
|
+
const hashParts = [];
|
|
29
|
+
for (const compiledBundle of compiledBundles) {
|
|
30
|
+
const bundleId = compiledBundle.bundle.node.id;
|
|
31
|
+
const safeModuleId = toSafeModuleId(bundleId);
|
|
32
|
+
const inputs = compiledBundle.bundle.node.declarations?.filter((decl) => decl.type === "input-variable") ?? [];
|
|
33
|
+
const matchTypes = compiledBundle.matchTypes;
|
|
34
|
+
const inputTypeAliasName = compiledBundle.inputTypeAliasName ??
|
|
35
|
+
toBundleInputTypeAliasName(safeModuleId);
|
|
36
|
+
const inputTypeDefinition = inputsType(inputs, matchTypes);
|
|
37
|
+
manifest.messages[bundleId] = {};
|
|
38
|
+
for (const locale of settings.locales) {
|
|
39
|
+
const messageCode = resolveMessageCode({
|
|
40
|
+
locale,
|
|
41
|
+
bundleId,
|
|
42
|
+
compiledBundle,
|
|
43
|
+
fallbackMap,
|
|
44
|
+
inputTypeAliasName,
|
|
45
|
+
});
|
|
46
|
+
const modulePath = `messages/${locale}/${safeModuleId}.js`;
|
|
47
|
+
const source = wrapMessageModule({
|
|
48
|
+
messageCode,
|
|
49
|
+
inputTypeAliasName,
|
|
50
|
+
inputTypeDefinition,
|
|
51
|
+
importStyle,
|
|
52
|
+
});
|
|
53
|
+
const hash = shortHash(source);
|
|
54
|
+
output[modulePath] = source;
|
|
55
|
+
manifest.messages[bundleId][locale] = {
|
|
56
|
+
module: modulePath,
|
|
57
|
+
hash,
|
|
58
|
+
};
|
|
59
|
+
hashParts.push(`${locale}:${bundleId}:${hash}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
manifest.catalogHash = shortHash(hashParts.sort().join("|"));
|
|
63
|
+
output["manifest.json"] = JSON.stringify(manifest, undefined, "\t") + "\n";
|
|
64
|
+
output["loader.js"] = createLoaderFile({
|
|
65
|
+
manifest,
|
|
66
|
+
importStyle,
|
|
67
|
+
});
|
|
68
|
+
output["messages.d.ts"] = createMessagesDts({
|
|
69
|
+
compiledBundles,
|
|
70
|
+
locales: settings.locales,
|
|
71
|
+
});
|
|
72
|
+
return output;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Same as `generateOutput` but loader/message imports use `virtual:paraglide/…`
|
|
76
|
+
* specifiers for the Vite plugin.
|
|
77
|
+
*/
|
|
78
|
+
export function generateOutputForVite(compiledBundles, settings, fallbackMap) {
|
|
79
|
+
const output = generateOutput(compiledBundles, settings, fallbackMap, false, { importStyle: "virtual" });
|
|
80
|
+
const manifest = JSON.parse(output["manifest.json"]);
|
|
81
|
+
return { output, manifest };
|
|
82
|
+
}
|
|
83
|
+
function resolveMessageCode(args) {
|
|
84
|
+
let current = args.locale;
|
|
85
|
+
const seen = new Set();
|
|
86
|
+
while (current && !seen.has(current)) {
|
|
87
|
+
seen.add(current);
|
|
88
|
+
const compiled = args.compiledBundle.messages[current];
|
|
89
|
+
if (compiled) {
|
|
90
|
+
return compiled.code;
|
|
91
|
+
}
|
|
92
|
+
current = args.fallbackMap[current];
|
|
93
|
+
}
|
|
94
|
+
return `/** @type {(inputs: ${args.inputTypeAliasName}) => LocalizedString} */ () => /** @type {LocalizedString} */ ('${escapeForSingleQuoteString(args.bundleId)}')`;
|
|
95
|
+
}
|
|
96
|
+
function wrapMessageModule(args) {
|
|
97
|
+
const usesRegistry = args.messageCode.includes("registry.");
|
|
98
|
+
const registrySpecifier = args.importStyle === "virtual"
|
|
99
|
+
? "virtual:paraglide/registry.js"
|
|
100
|
+
: "../../registry.js";
|
|
101
|
+
const runtimeSpecifier = args.importStyle === "virtual"
|
|
102
|
+
? "virtual:paraglide/runtime.js"
|
|
103
|
+
: "../../runtime.js";
|
|
104
|
+
const lines = [];
|
|
105
|
+
if (usesRegistry) {
|
|
106
|
+
lines.push(`import * as registry from ${JSON.stringify(registrySpecifier)};`);
|
|
107
|
+
}
|
|
108
|
+
lines.push(`/** @typedef {import(${JSON.stringify(runtimeSpecifier)}).LocalizedString} LocalizedString */`);
|
|
109
|
+
lines.push(`/** @typedef {${args.inputTypeDefinition}} ${args.inputTypeAliasName} */`);
|
|
110
|
+
lines.push("");
|
|
111
|
+
lines.push(`export default ${args.messageCode}`);
|
|
112
|
+
return lines.join("\n");
|
|
113
|
+
}
|
|
114
|
+
function createMessagesDts(args) {
|
|
115
|
+
const localesUnion = args.locales.length === 0
|
|
116
|
+
? "never"
|
|
117
|
+
: args.locales.map((l) => JSON.stringify(l)).join(" | ");
|
|
118
|
+
const messageProps = [];
|
|
119
|
+
for (const compiled of args.compiledBundles) {
|
|
120
|
+
const bundleId = compiled.bundle.node.id;
|
|
121
|
+
const inputs = compiled.bundle.node.declarations?.filter((decl) => decl.type === "input-variable") ?? [];
|
|
122
|
+
const inputTypeDefinition = inputsType(inputs, compiled.matchTypes);
|
|
123
|
+
const key = isValidIdentifier(bundleId)
|
|
124
|
+
? bundleId
|
|
125
|
+
: quotePropertyKey(bundleId);
|
|
126
|
+
const inputsParam = inputs.length === 0
|
|
127
|
+
? `inputs?: ${inputTypeDefinition}`
|
|
128
|
+
: `inputs: ${inputTypeDefinition}`;
|
|
129
|
+
messageProps.push(`\t${key}: (${inputsParam}, options?: { locale?: ${localesUnion} }) => import("./runtime.js").LocalizedString;`);
|
|
130
|
+
}
|
|
131
|
+
return [
|
|
132
|
+
`/* eslint-disable */`,
|
|
133
|
+
`export interface Messages {`,
|
|
134
|
+
...messageProps,
|
|
135
|
+
`}`,
|
|
136
|
+
``,
|
|
137
|
+
`export declare const m: Messages;`,
|
|
138
|
+
``,
|
|
139
|
+
`export declare function prefetchMessages(args: {`,
|
|
140
|
+
`\tlocale: string;`,
|
|
141
|
+
`\tkeys: string[];`,
|
|
142
|
+
`}): Promise<void>;`,
|
|
143
|
+
``,
|
|
144
|
+
`export declare function loadMessageModule(`,
|
|
145
|
+
`\tlocale: string,`,
|
|
146
|
+
`\tkey: string`,
|
|
147
|
+
`): Promise<`,
|
|
148
|
+
`\t| ((inputs?: Record<string, unknown>, options?: { locale?: string }) => import("./runtime.js").LocalizedString)`,
|
|
149
|
+
`\t| undefined`,
|
|
150
|
+
`>;`,
|
|
151
|
+
``,
|
|
152
|
+
].join("\n");
|
|
153
|
+
}
|
|
154
|
+
function shortHash(content) {
|
|
155
|
+
return createHash("sha256").update(content).digest("hex").slice(0, 8);
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=lazy-modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-modules.js","sourceRoot":"","sources":["../../../src/compiler/output-structure/lazy-modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E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-modules.test.d.ts","sourceRoot":"","sources":["../../../src/compiler/output-structure/lazy-modules.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { test, expect } from "vitest";
|
|
2
|
+
import { generateOutput } from "./lazy-modules.js";
|
|
3
|
+
function fixture(args) {
|
|
4
|
+
const compiledMessages = {};
|
|
5
|
+
for (const [locale, code] of Object.entries(args.messages)) {
|
|
6
|
+
compiledMessages[locale] = {
|
|
7
|
+
code,
|
|
8
|
+
node: {},
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
bundle: {
|
|
13
|
+
code: "/* unused dispatcher */",
|
|
14
|
+
node: { id: args.id },
|
|
15
|
+
},
|
|
16
|
+
messages: compiledMessages,
|
|
17
|
+
matchTypes: new Map(),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
test("emits one module per locale and key", () => {
|
|
21
|
+
const output = generateOutput([
|
|
22
|
+
fixture({
|
|
23
|
+
id: "hello",
|
|
24
|
+
messages: {
|
|
25
|
+
en: '() => /** @type {LocalizedString} */ ("Hello")',
|
|
26
|
+
de: '() => /** @type {LocalizedString} */ ("Hallo")',
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
], { locales: ["en", "de"], baseLocale: "en" }, { en: undefined, de: "en" });
|
|
30
|
+
expect(output).toHaveProperty("messages/en/hello.js");
|
|
31
|
+
expect(output).toHaveProperty("messages/de/hello.js");
|
|
32
|
+
expect(output).toHaveProperty("manifest.json");
|
|
33
|
+
expect(output).toHaveProperty("loader.js");
|
|
34
|
+
expect(output).toHaveProperty("messages.d.ts");
|
|
35
|
+
expect(output["messages/en/hello.js"]).toContain("export default");
|
|
36
|
+
expect(output["messages/de/hello.js"]).toContain("Hallo");
|
|
37
|
+
});
|
|
38
|
+
test("duplicates fallback locale body into missing locale modules", () => {
|
|
39
|
+
const output = generateOutput([
|
|
40
|
+
fixture({
|
|
41
|
+
id: "greeting",
|
|
42
|
+
messages: {
|
|
43
|
+
en: '() => /** @type {LocalizedString} */ ("Hi")',
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
], { locales: ["en", "se"], baseLocale: "en" }, { en: undefined, se: "en" });
|
|
47
|
+
expect(output["messages/se/greeting.js"]).toContain("Hi");
|
|
48
|
+
expect(output["messages/se/greeting.js"]).not.toContain("from ");
|
|
49
|
+
expect(output["messages/en/greeting.js"]).toContain("Hi");
|
|
50
|
+
});
|
|
51
|
+
test("manifest is stable for identical content and lists module paths", () => {
|
|
52
|
+
const settings = {
|
|
53
|
+
locales: ["en", "de"],
|
|
54
|
+
baseLocale: "en",
|
|
55
|
+
};
|
|
56
|
+
const fallback = { en: undefined, de: "en" };
|
|
57
|
+
const bundles = [
|
|
58
|
+
fixture({
|
|
59
|
+
id: "mymessage",
|
|
60
|
+
messages: {
|
|
61
|
+
en: '() => /** @type {LocalizedString} */ ("A")',
|
|
62
|
+
de: '() => /** @type {LocalizedString} */ ("B")',
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
];
|
|
66
|
+
const a = generateOutput(bundles, settings, fallback);
|
|
67
|
+
const b = generateOutput(bundles, settings, fallback);
|
|
68
|
+
const manifestA = JSON.parse(a["manifest.json"]);
|
|
69
|
+
const manifestB = JSON.parse(b["manifest.json"]);
|
|
70
|
+
expect(manifestA).toEqual(manifestB);
|
|
71
|
+
expect(manifestA.version).toBe(1);
|
|
72
|
+
expect(manifestA.catalogHash).toMatch(/^[a-f0-9]{8}$/);
|
|
73
|
+
expect(manifestA.messages.mymessage?.en?.module).toBe("messages/en/mymessage.js");
|
|
74
|
+
expect(manifestA.messages.mymessage?.en?.hash).toMatch(/^[a-f0-9]{8}$/);
|
|
75
|
+
expect(manifestA.routes).toEqual({});
|
|
76
|
+
});
|
|
77
|
+
test("changing message content changes hash", () => {
|
|
78
|
+
const settings = { locales: ["en"], baseLocale: "en" };
|
|
79
|
+
const fallback = { en: undefined };
|
|
80
|
+
const first = generateOutput([
|
|
81
|
+
fixture({
|
|
82
|
+
id: "x",
|
|
83
|
+
messages: {
|
|
84
|
+
en: '() => /** @type {LocalizedString} */ ("one")',
|
|
85
|
+
},
|
|
86
|
+
}),
|
|
87
|
+
], settings, fallback);
|
|
88
|
+
const second = generateOutput([
|
|
89
|
+
fixture({
|
|
90
|
+
id: "x",
|
|
91
|
+
messages: {
|
|
92
|
+
en: '() => /** @type {LocalizedString} */ ("two")',
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
], settings, fallback);
|
|
96
|
+
const m1 = JSON.parse(first["manifest.json"]);
|
|
97
|
+
const m2 = JSON.parse(second["manifest.json"]);
|
|
98
|
+
expect(m1.messages.x?.en?.hash).not.toBe(m2.messages.x?.en?.hash);
|
|
99
|
+
expect(m1.catalogHash).not.toBe(m2.catalogHash);
|
|
100
|
+
});
|
|
101
|
+
test("loader exports m and prefetchMessages with relative imports", () => {
|
|
102
|
+
const output = generateOutput([
|
|
103
|
+
fixture({
|
|
104
|
+
id: "hello",
|
|
105
|
+
messages: {
|
|
106
|
+
en: '() => /** @type {LocalizedString} */ ("Hello")',
|
|
107
|
+
},
|
|
108
|
+
}),
|
|
109
|
+
], { locales: ["en"], baseLocale: "en" }, { en: undefined });
|
|
110
|
+
expect(output["loader.js"]).toContain("export const m");
|
|
111
|
+
expect(output["loader.js"]).toContain("export async function prefetchMessages");
|
|
112
|
+
expect(output["loader.js"]).toContain('./messages/en/hello.js');
|
|
113
|
+
});
|
|
114
|
+
test("messages.d.ts declares Messages interface", () => {
|
|
115
|
+
const output = generateOutput([
|
|
116
|
+
fixture({
|
|
117
|
+
id: "hello",
|
|
118
|
+
messages: {
|
|
119
|
+
en: '() => /** @type {LocalizedString} */ ("Hello")',
|
|
120
|
+
},
|
|
121
|
+
}),
|
|
122
|
+
], { locales: ["en"], baseLocale: "en" }, { en: undefined });
|
|
123
|
+
expect(output["messages.d.ts"]).toContain("export interface Messages");
|
|
124
|
+
expect(output["messages.d.ts"]).toContain("hello:");
|
|
125
|
+
expect(output["messages.d.ts"]).toContain("export declare const m: Messages");
|
|
126
|
+
expect(output["messages.d.ts"]).toContain("prefetchMessages");
|
|
127
|
+
});
|
|
128
|
+
//# sourceMappingURL=lazy-modules.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-modules.test.js","sourceRoot":"","sources":["../../../src/compiler/output-structure/lazy-modules.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKnD,SAAS,OAAO,CAAC,IAGhB;IACA,MAAM,gBAAgB,GAA2C,EAAE,CAAC;IACpE,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5D,gBAAgB,CAAC,MAAM,CAAC,GAAG;YAC1B,IAAI;YACJ,IAAI,EAAE,EAAwB;SAC9B,CAAC;IACH,CAAC;IACD,OAAO;QACN,MAAM,EAAE;YACP,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAuB;SAC1C;QACD,QAAQ,EAAE,gBAAgB;QAC1B,UAAU,EAAE,IAAI,GAAG,EAAE;KACrB,CAAC;AACH,CAAC;AAED,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAChD,MAAM,MAAM,GAAG,cAAc,CAC5B;QACC,OAAO,CAAC;YACP,EAAE,EAAE,OAAO;YACX,QAAQ,EAAE;gBACT,EAAE,EAAE,gDAAgD;gBACpD,EAAE,EAAE,gDAAgD;aACpD;SACD,CAAC;KACF,EACD,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,EAC3C,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,I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
|
3
|
+
export declare function messageReferenceExpression(locale: string, bundleId: string): string;
|
|
4
|
+
export declare function generateOutput(compiledBundles: CompiledBundleWithMessages[], settings: Pick<ParaglideSettings, "locales" | "baseLocale">, fallbackMap: Record<string, string | undefined>, experimentalMiddlewareLocaleSplitting?: boolean): Record<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-modules.d.ts","sourceRoot":"","sources":["../../../src/compiler/output-structure/locale-modules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAOvE,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAE1E;AAED,wBAAgB,cAAc,CAC7B,eAAe,EAAE,0BAA0B,EAAE,EAC7C,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,YAAY,CAAC,EAC3D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAC/C,qCAAqC,UAAQ,GAC3C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4FxB"}
|