vite-intlayer 9.9.3-canary.1 → 9.9.3
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/dist/esm/IntlayerCompilerPlugin.mjs +2 -2
- package/dist/esm/intlayerChunkPlugin.mjs +2 -2
- package/dist/esm/intlayerDictionaryHmrPlugin.mjs +1 -1
- package/dist/esm/intlayerNitroHandler.mjs +1 -1
- package/dist/esm/intlayerOptimizePlugin.mjs +5 -5
- package/dist/esm/intlayerPlugin.mjs +4 -4
- package/dist/esm/intlayerPreloadPlugin.mjs +1 -1
- package/dist/esm/intlayerProxyPlugin.mjs +2 -2
- package/dist/types/IntlayerCompilerPlugin.d.ts +1 -1
- package/dist/types/intlayerPlugin.d.ts +1 -1
- package/dist/types/intlayerProxyHandler.d.ts +1 -1
- package/dist/types/intlayerProxyPlugin.d.ts +2 -2
- package/package.json +9 -9
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createPrimaryInstanceGuard } from "./dedupePlugin.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { normalizePath } from "@intlayer/config/utils";
|
|
3
3
|
import { dirname, relative } from "node:path";
|
|
4
4
|
import { detectPackageName, extractContent, getExtractPluginOptions, writeContentHelper } from "@intlayer/babel";
|
|
5
5
|
import * as ANSIColors from "@intlayer/config/colors";
|
|
6
6
|
import { colorize, colorizeKey, colorizeNumber, colorizePath, getAppLogger, x } from "@intlayer/config/logger";
|
|
7
7
|
import { getConfiguration } from "@intlayer/config/node";
|
|
8
|
-
import {
|
|
8
|
+
import { readFile } from "node:fs/promises";
|
|
9
9
|
|
|
10
10
|
// src/IntlayerCompilerPlugin.ts
|
|
11
11
|
const COMPILER_PLUGIN_NAME = "vite-intlayer-compiler";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
2
|
-
import { normalizePath } from "@intlayer/config/utils";
|
|
3
1
|
import { DYNAMIC_DICTIONARIES_JSON_SUBDIR } from "@intlayer/config/defaultValues";
|
|
2
|
+
import { normalizePath } from "@intlayer/config/utils";
|
|
3
|
+
import { colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
4
4
|
import { readdirSync } from "node:fs";
|
|
5
5
|
|
|
6
6
|
// src/intlayerChunkPlugin.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createProxyHandler, isPrerenderProcess } from "./intlayerProxyHandler.mjs";
|
|
2
2
|
import { runProxyOnWebRequest } from "./intlayerWebProxyHandler.mjs";
|
|
3
|
+
import { formatProxyEnabledMessage } from "@intlayer/core/localization";
|
|
3
4
|
import { getAppLogger } from "@intlayer/config/logger";
|
|
4
5
|
import * as builtConfiguration from "@intlayer/config/built";
|
|
5
|
-
import { formatProxyEnabledMessage } from "@intlayer/core/localization";
|
|
6
6
|
|
|
7
7
|
// src/intlayerNitroHandler.ts
|
|
8
8
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { intlayerVueAsyncPlugin } from "./intlayerVueAsyncPlugin.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { IMPORT_MODE } from "@intlayer/config/defaultValues";
|
|
3
|
+
import { normalizePath } from "@intlayer/config/utils";
|
|
3
4
|
import { join } from "node:path";
|
|
4
5
|
import { INTLAYER_USAGE_REGEX, SOURCE_FILE_REGEX, analyzeFieldUsageInFile, buildNestedRenameMapFromContent, buildUsageCheckRegex, getDictionaryFieldNames, getNestedRenameEntryAtPath, optimizeSourceFile, preserveFallbackNamespaceFields, preserveNestedDictionaryFields } from "@intlayer/babel";
|
|
5
6
|
import * as ANSIColors from "@intlayer/config/colors";
|
|
6
7
|
import { colorize, colorizeKey, colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
7
|
-
import { normalizePath } from "@intlayer/config/utils";
|
|
8
|
-
import { requiresDictionaryRegistry } from "@intlayer/config/callers";
|
|
9
|
-
import { IMPORT_MODE } from "@intlayer/config/defaultValues";
|
|
10
|
-
import { getNestedDictionaryGraph, getNestedDictionaryReferences } from "@intlayer/core/dictionaryManipulator";
|
|
11
8
|
import { getDictionaries } from "@intlayer/dictionaries-entry";
|
|
12
9
|
import { buildComponentFilesList, formatPath, runOnce } from "@intlayer/engine/utils";
|
|
10
|
+
import { readFile, readdir } from "node:fs/promises";
|
|
11
|
+
import { requiresDictionaryRegistry } from "@intlayer/config/callers";
|
|
12
|
+
import { getNestedDictionaryGraph, getNestedDictionaryReferences } from "@intlayer/core/dictionaryManipulator";
|
|
13
13
|
|
|
14
14
|
// src/intlayerOptimizePlugin.ts
|
|
15
15
|
/**
|
|
@@ -6,17 +6,17 @@ import { intlayerOptimize } from "./intlayerOptimizePlugin.mjs";
|
|
|
6
6
|
import { intlayerPreload } from "./intlayerPreloadPlugin.mjs";
|
|
7
7
|
import { intlayerProxy } from "./intlayerProxyPlugin.mjs";
|
|
8
8
|
import { intlayerPrune } from "./intlayerPrunePlugin.mjs";
|
|
9
|
+
import { resolveProxyMode } from "@intlayer/core/localization";
|
|
10
|
+
import { getAlias, getHasDictionarySelector, getUnusedNodeTypesAsync } from "@intlayer/config/utils";
|
|
9
11
|
import { resolve } from "node:path";
|
|
10
12
|
import { createPruneContext } from "@intlayer/babel";
|
|
11
13
|
import { BLUE } from "@intlayer/config/colors";
|
|
14
|
+
import { formatDictionarySelectorEnvVar, formatNodeTypeToEnvVar, formatOptimizedNestingEnvVar, getConfigEnvVars } from "@intlayer/config/envVars";
|
|
12
15
|
import { colorize, getAppLogger } from "@intlayer/config/logger";
|
|
13
16
|
import { getConfiguration } from "@intlayer/config/node";
|
|
14
|
-
import { getAlias, getHasDictionarySelector, getUnusedNodeTypesAsync } from "@intlayer/config/utils";
|
|
15
17
|
import { getDictionaries } from "@intlayer/dictionaries-entry";
|
|
16
|
-
import { startContentWatcher } from "@intlayer/engine/utils";
|
|
17
|
-
import { resolveProxyMode } from "@intlayer/core/localization";
|
|
18
|
-
import { formatDictionarySelectorEnvVar, formatNodeTypeToEnvVar, formatOptimizedNestingEnvVar, getConfigEnvVars } from "@intlayer/config/envVars";
|
|
19
18
|
import { logConfigDetails } from "@intlayer/engine/logConfigDetails";
|
|
19
|
+
import { startContentWatcher } from "@intlayer/engine/utils";
|
|
20
20
|
|
|
21
21
|
// src/intlayerPlugin.ts
|
|
22
22
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
2
1
|
import { normalizePath } from "@intlayer/config/utils";
|
|
2
|
+
import { colorizeNumber, getAppLogger } from "@intlayer/config/logger";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { DYNAMIC_ENTRY_PATTERN, addDynamicEntryPreload, resolvePreloadModuleId } from "@intlayer/config/dictionaryPreload";
|
|
5
5
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createPrimaryInstanceGuard } from "./dedupePlugin.mjs";
|
|
2
2
|
import { createProxyHandler } from "./intlayerProxyHandler.mjs";
|
|
3
|
+
import { formatProxyEnabledMessage, isProxyStorageLocaleEnabled, resolveProxyMode } from "@intlayer/core/localization";
|
|
4
|
+
import { normalizePath } from "@intlayer/config/utils";
|
|
3
5
|
import { getAppLogger } from "@intlayer/config/logger";
|
|
4
6
|
import { getConfiguration } from "@intlayer/config/node";
|
|
5
|
-
import { normalizePath } from "@intlayer/config/utils";
|
|
6
|
-
import { formatProxyEnabledMessage, isProxyStorageLocaleEnabled, resolveProxyMode } from "@intlayer/core/localization";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
9
|
// src/intlayerProxyPlugin.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
2
1
|
import { CompilerConfig } from "@intlayer/types/config";
|
|
3
2
|
import { PluginOption } from "vite";
|
|
3
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
4
4
|
/**
|
|
5
5
|
* Splits a Vite module id into its file path and query. Returns `undefined`
|
|
6
6
|
* for ids that must not be compiled. Other queries (e.g. TanStack Router
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IntlayerProxyPluginOptions } from "./intlayerProxyPlugin.js";
|
|
2
|
-
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
3
2
|
import { PluginOption } from "vite";
|
|
4
3
|
import { CompatCallerConfig } from "@intlayer/babel";
|
|
4
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
5
5
|
/**
|
|
6
6
|
* Packages that must go through Vite's transform pipeline instead of being
|
|
7
7
|
* loaded natively by Node.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* loader transpiles `intlayer.config.ts` with `esbuild` at runtime, which makes
|
|
7
7
|
* the built server depend on `esbuild` being resolvable next to it.
|
|
8
8
|
*/
|
|
9
|
-
import { IntlayerConfig } from "@intlayer/types/config";
|
|
10
9
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
10
|
+
import { IntlayerConfig } from "@intlayer/types/config";
|
|
11
11
|
/**
|
|
12
12
|
* Detects a process that only exists to prerender pages: a TanStack Start
|
|
13
13
|
* build (flag set on the build process, which loads the server in-process) or
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NodeMiddleware } from "./intlayerProxyHandler.js";
|
|
2
|
-
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
3
|
-
import { Plugin } from "vite";
|
|
4
2
|
import { IncomingMessage } from "node:http";
|
|
3
|
+
import { Plugin } from "vite";
|
|
4
|
+
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
5
5
|
/**
|
|
6
6
|
* Restricts a proxy middleware to its redirects: a request the proxy lets
|
|
7
7
|
* through continues with the URL the browser sent, any internal rewrite
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-intlayer",
|
|
3
|
-
"version": "9.9.3
|
|
3
|
+
"version": "9.9.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Vite plugin for seamless internationalization (i18n), providing locale detection, redirection, and environment-based configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@intlayer/babel": "9.9.3
|
|
91
|
-
"@intlayer/config": "9.9.3
|
|
92
|
-
"@intlayer/core": "9.9.3
|
|
93
|
-
"@intlayer/dictionaries-entry": "9.9.3
|
|
94
|
-
"@intlayer/engine": "9.9.3
|
|
95
|
-
"@intlayer/types": "9.9.3
|
|
90
|
+
"@intlayer/babel": "9.9.3",
|
|
91
|
+
"@intlayer/config": "9.9.3",
|
|
92
|
+
"@intlayer/core": "9.9.3",
|
|
93
|
+
"@intlayer/dictionaries-entry": "9.9.3",
|
|
94
|
+
"@intlayer/engine": "9.9.3",
|
|
95
|
+
"@intlayer/types": "9.9.3"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@types/node": "^26",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"@babel/core": ">=6.0.0",
|
|
109
|
-
"@intlayer/svelte-compiler": "9.9.3
|
|
110
|
-
"@intlayer/vue-compiler": "9.9.3
|
|
109
|
+
"@intlayer/svelte-compiler": "9.9.3",
|
|
110
|
+
"@intlayer/vue-compiler": "9.9.3",
|
|
111
111
|
"h3": ">=1.0.0",
|
|
112
112
|
"vite": ">=4.0.0"
|
|
113
113
|
},
|