@intlayer/config 8.6.2 → 8.6.4
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/cjs/built.browser.cjs +26 -1
- package/dist/cjs/built.browser.cjs.map +1 -1
- package/dist/cjs/built.cjs +26 -1
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/client.cjs +2 -0
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs +1 -10
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs +0 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/envVars/envVars.cjs +8 -83
- package/dist/cjs/envVars/envVars.cjs.map +1 -1
- package/dist/cjs/envVars/index.cjs +0 -9
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/node.cjs +4 -0
- package/dist/cjs/utils/getStorageAttributes.cjs +13 -8
- package/dist/cjs/utils/getStorageAttributes.cjs.map +1 -1
- package/dist/cjs/utils/importMap.cjs +73 -0
- package/dist/cjs/utils/importMap.cjs.map +1 -0
- package/dist/cjs/utils/index.cjs +6 -0
- package/dist/cjs/utils/setIntlayerIdentifier.cjs +14 -0
- package/dist/cjs/utils/setIntlayerIdentifier.cjs.map +1 -0
- package/dist/esm/built.browser.mjs +13 -1
- package/dist/esm/built.browser.mjs.map +1 -1
- package/dist/esm/built.mjs +13 -1
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/client.mjs +2 -1
- package/dist/esm/configFile/buildBrowserConfiguration.mjs +1 -8
- package/dist/esm/configFile/buildBrowserConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs +0 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/envVars/envVars.mjs +9 -75
- package/dist/esm/envVars/envVars.mjs.map +1 -1
- package/dist/esm/envVars/index.mjs +2 -2
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/node.mjs +2 -1
- package/dist/esm/utils/cacheDisk.mjs +4 -4
- package/dist/esm/utils/cacheDisk.mjs.map +1 -1
- package/dist/esm/utils/getStorageAttributes.mjs +13 -8
- package/dist/esm/utils/getStorageAttributes.mjs.map +1 -1
- package/dist/esm/utils/importMap.mjs +70 -0
- package/dist/esm/utils/importMap.mjs.map +1 -0
- package/dist/esm/utils/index.mjs +3 -1
- package/dist/esm/utils/setIntlayerIdentifier.mjs +12 -0
- package/dist/esm/utils/setIntlayerIdentifier.mjs.map +1 -0
- package/dist/types/built.browser.d.ts +15 -1
- package/dist/types/built.browser.d.ts.map +1 -1
- package/dist/types/built.d.ts +15 -1
- package/dist/types/built.d.ts.map +1 -1
- package/dist/types/client.d.ts +2 -1
- package/dist/types/configFile/buildBrowserConfiguration.d.ts +0 -1
- package/dist/types/configFile/buildBrowserConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/configurationSchema.d.ts +2 -2
- package/dist/types/envVars/envVars.d.ts +2 -68
- package/dist/types/envVars/envVars.d.ts.map +1 -1
- package/dist/types/envVars/index.d.ts +2 -2
- package/dist/types/logger.d.ts +1 -1
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/node.d.ts +2 -1
- package/dist/types/utils/getStorageAttributes.d.ts.map +1 -1
- package/dist/types/utils/importMap.d.ts +85 -0
- package/dist/types/utils/importMap.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types/utils/setIntlayerIdentifier.d.ts +15 -0
- package/dist/types/utils/setIntlayerIdentifier.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -271,8 +271,8 @@ declare const buildSchema: z.ZodObject<{
|
|
|
271
271
|
}>>;
|
|
272
272
|
traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
273
273
|
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
274
|
-
cjs: "cjs";
|
|
275
274
|
esm: "esm";
|
|
275
|
+
cjs: "cjs";
|
|
276
276
|
}>>>;
|
|
277
277
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
278
278
|
require: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -465,8 +465,8 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
465
465
|
}>>;
|
|
466
466
|
traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
467
467
|
outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
468
|
-
cjs: "cjs";
|
|
469
468
|
esm: "esm";
|
|
469
|
+
cjs: "cjs";
|
|
470
470
|
}>>>;
|
|
471
471
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
472
472
|
require: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -1,72 +1,6 @@
|
|
|
1
1
|
import { IntlayerConfig } from "@intlayer/types/config";
|
|
2
2
|
|
|
3
3
|
//#region src/envVars/envVars.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* True when the build-time routing mode is known and is NOT 'no-prefix'.
|
|
6
|
-
* Use to guard no-prefix-specific code paths so bundlers can eliminate them.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* if (!TREE_SHAKE_NO_PREFIX && mode === 'no-prefix') { ... }
|
|
10
|
-
*/
|
|
11
|
-
declare const TREE_SHAKE_NO_PREFIX: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* True when the build-time routing mode is known and is NOT 'search-params'.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* if (!TREE_SHAKE_SEARCH_PARAMS && mode === 'search-params') { ... }
|
|
17
|
-
*/
|
|
18
|
-
declare const TREE_SHAKE_SEARCH_PARAMS: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* True when the build-time routing mode is known and is not a prefix-based
|
|
21
|
-
* mode (neither 'prefix-all' nor 'prefix-no-default').
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* if (!TREE_SHAKE_PREFIX_MODES && (mode === 'prefix-all' || mode === 'prefix-no-default')) { ... }
|
|
25
|
-
*/
|
|
26
|
-
declare const TREE_SHAKE_PREFIX_MODES: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* True when rewrite rules are explicitly disabled at build time
|
|
29
|
-
* (INTLAYER_ROUTING_REWRITE_RULES === 'false').
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* if (!TREE_SHAKE_REWRITE && rewrite) { ... }
|
|
33
|
-
*/
|
|
34
|
-
declare const TREE_SHAKE_REWRITE: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* True when cookie storage is explicitly disabled at build time.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* if (!TREE_SHAKE_STORAGE_COOKIES) { // cookie logic }
|
|
40
|
-
*/
|
|
41
|
-
declare const TREE_SHAKE_STORAGE_COOKIES: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* True when localStorage is explicitly disabled at build time.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* if (!TREE_SHAKE_STORAGE_LOCAL_STORAGE) { // localStorage logic }
|
|
47
|
-
*/
|
|
48
|
-
declare const TREE_SHAKE_STORAGE_LOCAL_STORAGE: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* True when sessionStorage is explicitly disabled at build time.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* if (!TREE_SHAKE_STORAGE_SESSION_STORAGE) { // sessionStorage logic }
|
|
54
|
-
*/
|
|
55
|
-
declare const TREE_SHAKE_STORAGE_SESSION_STORAGE: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* True when header storage is explicitly disabled at build time.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* if (!TREE_SHAKE_STORAGE_HEADERS) { // header logic }
|
|
61
|
-
*/
|
|
62
|
-
declare const TREE_SHAKE_STORAGE_HEADERS: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* True when the editor is explicitly disabled at build time.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* if (!TREE_SHAKE_EDITOR) { // editor logic }
|
|
68
|
-
*/
|
|
69
|
-
declare const TREE_SHAKE_EDITOR: boolean;
|
|
70
4
|
/**
|
|
71
5
|
* Converts a list of unused NodeType keys into env-var definitions.
|
|
72
6
|
* Set to `"false"` so bundlers can eliminate the corresponding plugin code.
|
|
@@ -91,7 +25,7 @@ declare const formatNodeTypeToEnvVar: (nodeTypes: string[], addProcessEnv?: bool
|
|
|
91
25
|
* getConfigEnvVars(config, true)
|
|
92
26
|
* // { 'process.env.INTLAYER_ROUTING_MODE': '"prefix-no-default"', ... }
|
|
93
27
|
*/
|
|
94
|
-
declare const getConfigEnvVars: (config: IntlayerConfig, addProcessEnv?: boolean) => Record<string, string>;
|
|
28
|
+
declare const getConfigEnvVars: (config: IntlayerConfig, addProcessEnv?: boolean, wrapValue?: (value: string) => string) => Record<string, string>;
|
|
95
29
|
//#endregion
|
|
96
|
-
export {
|
|
30
|
+
export { formatNodeTypeToEnvVar, getConfigEnvVars };
|
|
97
31
|
//# sourceMappingURL=envVars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envVars.d.ts","names":[],"sources":["../../../src/envVars/envVars.ts"],"mappings":";;;;;AAaA
|
|
1
|
+
{"version":3,"file":"envVars.d.ts","names":[],"sources":["../../../src/envVars/envVars.ts"],"mappings":";;;;;AAaA;;;;;;;;;cAAa,sBAAA,GACX,SAAA,YACA,aAAA,eACC,MAAA;;;;;;;;;;;;;cAyBU,gBAAA,GACX,MAAA,EAAQ,cAAA,EACR,aAAA,YACA,SAAA,IAAY,KAAA,wBACX,MAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { formatNodeTypeToEnvVar, getConfigEnvVars } from "./envVars.js";
|
|
2
|
+
export { formatNodeTypeToEnvVar, getConfigEnvVars };
|
package/dist/types/logger.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const spinnerFrames: string[];
|
|
|
19
19
|
* It allows overriding the default configuration by passing a config object in the details parameter.
|
|
20
20
|
* The configuration is merged with the default configuration from the intlayer config file.
|
|
21
21
|
*/
|
|
22
|
-
declare const getAppLogger: (configuration?: IntlayerConfig, globalDetails?: Details) => (content: any, details?: Details) => void;
|
|
22
|
+
declare const getAppLogger: (configuration?: Pick<IntlayerConfig, "log">, globalDetails?: Details) => (content: any, details?: Details) => void;
|
|
23
23
|
declare const colorize: (string: string, color?: ANSIColorsType, reset?: boolean | ANSIColorsType) => string;
|
|
24
24
|
declare const colorizeLocales: (locales: Locale | Locale[], color?: ANSIColorsType, reset?: boolean | ANSIColorsType) => string;
|
|
25
25
|
declare const colorizeKey: (keyPath: string | string[], color?: ANSIColorsType, reset?: boolean | ANSIColorsType) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/logger.ts"],"mappings":";;;;;KAQY,cAAA,WACF,gBAAA,eAA8B,gBAAA;AAAA,KAE5B,OAAA;EACV,SAAA;EACA,KAAA;EACA,MAAA,GAAS,oBAAA;AAAA;AAAA,KAGC,MAAA,IAAU,OAAA,OAAc,OAAA,GAAU,OAAA;AAAA,cAIjC,SAAA,GAAa,MAAA;AAAA,cAIb,SAAA,GAAa,YAAA;AAAA,cAQb,MAAA,EAAQ,MAAA;AAAA,cAgBR,aAAA;;;;;;cAOA,YAAA,GACV,aAAA,GAAgB,cAAA,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/logger.ts"],"mappings":";;;;;KAQY,cAAA,WACF,gBAAA,eAA8B,gBAAA;AAAA,KAE5B,OAAA;EACV,SAAA;EACA,KAAA;EACA,MAAA,GAAS,oBAAA;AAAA;AAAA,KAGC,MAAA,IAAU,OAAA,OAAc,OAAA,GAAU,OAAA;AAAA,cAIjC,SAAA,GAAa,MAAA;AAAA,cAIb,SAAA,GAAa,YAAA;AAAA,cAQb,MAAA,EAAQ,MAAA;AAAA,cAgBR,aAAA;;;;;;cAOA,YAAA,GACV,aAAA,GAAgB,IAAA,CAAK,cAAA,UAAwB,aAAA,GAAgB,OAAA,MAC7D,OAAA,OAAc,OAAA,GAAU,OAAA;AAAA,cAUd,QAAA,GACX,MAAA,UACA,KAAA,GAAQ,cAAA,EACR,KAAA,aAAkB,cAAA;AAAA,cAMP,eAAA,GACX,OAAA,EAAS,MAAA,GAAS,MAAA,IAClB,KAAA,GAAO,cAAA,EACP,KAAA,aAAiB,cAAA;AAAA,cAON,WAAA,GACX,OAAA,qBACA,KAAA,GAAO,cAAA,EACP,KAAA,aAAiB,cAAA;AAAA,cAON,YAAA,GACX,IAAA,qBACA,KAAA,GAAO,cAAA,EACP,KAAA,aAAiB,cAAA;AAAA,cAON,cAAA,GACX,MAAA,mBACA,OAAA,GAAS,OAAA,CAAQ,MAAA,CAAO,IAAA,CAAK,cAAA,EAAgB,cAAA;AAAA,cAqBlC,WAAA,GAAe,IAAA;;;;AA7G5B;;;cAsJa,KAAA,GACX,IAAA,qBACA,OAAA;EACE,OAAA;EACA,OAAA;EACA,OAAA;EACA,GAAA;EACA,OAAA;AAAA;AAAA,cAyBS,CAAA;AAAA,cACA,CAAA;AAAA,cACA,KAAA"}
|
package/dist/types/node.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import { buildConfigurationFields } from "./configFile/buildConfigurationFields.
|
|
|
3
3
|
import { aiSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configFile/configurationSchema.js";
|
|
4
4
|
import { GetConfigurationAndFilePathResult, GetConfigurationOptions, getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.js";
|
|
5
5
|
import { configurationFilesCandidates, searchConfigurationFile } from "./configFile/searchConfigurationFile.js";
|
|
6
|
-
|
|
6
|
+
import { GetImportMapOptions, ImportMap, getImportMap, getImportMapContent, getImportMapScript } from "./utils/importMap.js";
|
|
7
|
+
export { BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, GetImportMapOptions, ImportMap, aiSchema, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, getImportMap, getImportMapContent, getImportMapScript, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getStorageAttributes.d.ts","names":[],"sources":["../../../src/utils/getStorageAttributes.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getStorageAttributes.d.ts","names":[],"sources":["../../../src/utils/getStorageAttributes.ts"],"mappings":";;;;;AA6JA;;;;;cAAa,oBAAA,GACX,OAAA,EAAS,mBAAA,KACR,0BAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { IntlayerConfig } from "@intlayer/types/config";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/importMap.d.ts
|
|
4
|
+
type GetImportMapOptions = {
|
|
5
|
+
configuration: IntlayerConfig;
|
|
6
|
+
/**
|
|
7
|
+
* Extra module specifier → URL mappings to merge into the import map.
|
|
8
|
+
* Use this to add paths for top-level packages (e.g. `intlayer`, `vanilla-intlayer`)
|
|
9
|
+
* that are not generated by Intlayer's build step.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* {
|
|
14
|
+
* extraImports: {
|
|
15
|
+
* 'intlayer': './node_modules/intlayer/dist/index.mjs',
|
|
16
|
+
* 'vanilla-intlayer': './node_modules/vanilla-intlayer/dist/index.mjs',
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
extraImports?: Record<string, string>;
|
|
22
|
+
};
|
|
23
|
+
type ImportMap = {
|
|
24
|
+
imports: Record<string, string>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Generates a browser-native import map object from the Intlayer configuration.
|
|
28
|
+
*
|
|
29
|
+
* The import map resolves bare module specifiers (e.g. `@intlayer/dictionaries-entry`)
|
|
30
|
+
* to their physical `.mjs` file paths relative to the project root, replicating
|
|
31
|
+
* what a bundler's `alias` plugin would do.
|
|
32
|
+
*
|
|
33
|
+
* Paths are always forced to ESM (`.mjs`) and prefixed with `./` so they are
|
|
34
|
+
* valid relative URL references for the browser.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```json
|
|
38
|
+
* {
|
|
39
|
+
* "imports": {
|
|
40
|
+
* "@intlayer/dictionaries-entry": "./.intlayer/main/dictionaries.mjs",
|
|
41
|
+
* "@intlayer/unmerged-dictionaries-entry": "./.intlayer/main/unmerged_dictionaries.mjs",
|
|
42
|
+
* "@intlayer/remote-dictionaries-entry": "./.intlayer/main/remote_dictionaries.mjs",
|
|
43
|
+
* "@intlayer/dynamic-dictionaries-entry": "./.intlayer/main/dynamic_dictionaries.mjs",
|
|
44
|
+
* "@intlayer/fetch-dictionaries-entry": "./.intlayer/main/fetch_dictionaries.mjs",
|
|
45
|
+
* "@intlayer/config/built": "./.intlayer/config/configuration.mjs"
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare const getImportMap: ({
|
|
51
|
+
configuration,
|
|
52
|
+
extraImports
|
|
53
|
+
}: GetImportMapOptions) => ImportMap;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the JSON string representation of the import map.
|
|
56
|
+
*
|
|
57
|
+
* Can be embedded directly as the content of a `<script type="importmap">` tag,
|
|
58
|
+
* or written to a standalone `.importmap` file and referenced via
|
|
59
|
+
* `<script type="importmap" src="./importmap.json">`.
|
|
60
|
+
*/
|
|
61
|
+
declare const getImportMapContent: (options: GetImportMapOptions) => string;
|
|
62
|
+
/**
|
|
63
|
+
* Generates a complete `<script type="importmap">` HTML element string.
|
|
64
|
+
*
|
|
65
|
+
* Inject this into your HTML `<head>` **before** any `<script type="module">`
|
|
66
|
+
* tags to enable bare module specifier resolution without a bundler.
|
|
67
|
+
*
|
|
68
|
+
* Prerequisites:
|
|
69
|
+
* - Run `npx intlayer build` so the `.intlayer` folder is populated.
|
|
70
|
+
* - Your static server must serve the `.intlayer` directory.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```html
|
|
74
|
+
* <!DOCTYPE html>
|
|
75
|
+
* <html lang="en">
|
|
76
|
+
* <head>
|
|
77
|
+
* <!-- generated output goes here, before any module scripts -->
|
|
78
|
+
* <script type="module" src="./src/main.js"></script>
|
|
79
|
+
* </head>
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
declare const getImportMapScript: (options: GetImportMapOptions) => string;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { GetImportMapOptions, ImportMap, getImportMap, getImportMapContent, getImportMapScript };
|
|
85
|
+
//# sourceMappingURL=importMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importMap.d.ts","names":[],"sources":["../../../src/utils/importMap.ts"],"mappings":";;;KAGY,mBAAA;EACV,aAAA,EAAe,cAAA;EADL;;;;;;;;;;AAoBZ;;;;;EAHE,YAAA,GAAe,MAAA;AAAA;AAAA,KAGL,SAAA;EACV,OAAA,EAAS,MAAA;AAAA;;;;;;;;;;;;;AAoDX;;;;;AAuBA;;;;;;;cAhDa,YAAA;EAAgB,aAAA;EAAA;AAAA,GAG1B,mBAAA,KAAsB,SAAA;;;;;;;;cAsBZ,mBAAA,GAAuB,OAAA,EAAS,mBAAA;;;;;;;;;;;;;;;;;;;;;cAuBhC,kBAAA,GAAsB,OAAA,EAAS,mBAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { extractErrorMessage } from "./extractErrorMessage.js";
|
|
2
2
|
import { logStack } from "./logStack.js";
|
|
3
3
|
import { normalizePath } from "./normalizePath.js";
|
|
4
|
+
import { WindowsWithIntlayer, setIntlayerIdentifier } from "./setIntlayerIdentifier.js";
|
|
4
5
|
import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.js";
|
|
5
6
|
import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.js";
|
|
6
7
|
import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.js";
|
|
7
8
|
import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.js";
|
|
9
|
+
import { GetImportMapOptions, ImportMap, getImportMap, getImportMapContent, getImportMapScript } from "./importMap.js";
|
|
8
10
|
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./ESMxCJSHelpers.js";
|
|
9
11
|
import { GetAliasOptions, getAlias } from "./alias.js";
|
|
10
12
|
import { CacheKey, cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./cacheMemory.js";
|
|
@@ -17,4 +19,4 @@ import { getStorageAttributes } from "./getStorageAttributes.js";
|
|
|
17
19
|
import { PluginNodeType, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync } from "./getUsedNodeTypes.js";
|
|
18
20
|
import { parseFilePathPattern, parseStringPattern } from "./parseFilePathPattern.js";
|
|
19
21
|
import { RetryManagerOptions, retryManager } from "./retryManager.js";
|
|
20
|
-
export { CacheKey, GetAliasOptions, PluginNodeType, RetryManagerOptions, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, stableStringify, toLowerCamelCase };
|
|
22
|
+
export { CacheKey, GetAliasOptions, GetImportMapOptions, ImportMap, PluginNodeType, RetryManagerOptions, WindowsWithIntlayer, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getImportMap, getImportMapContent, getImportMapScript, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/utils/setIntlayerIdentifier.d.ts
|
|
2
|
+
type Meta = {
|
|
3
|
+
enabled: true;
|
|
4
|
+
};
|
|
5
|
+
type WindowsWithIntlayer = typeof window & {
|
|
6
|
+
intlayer?: Meta;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Sets the version of Intlayer in the window object.
|
|
10
|
+
* This is used for Intlayer detection in the browser.
|
|
11
|
+
*/
|
|
12
|
+
declare const setIntlayerIdentifier: () => void;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { WindowsWithIntlayer, setIntlayerIdentifier };
|
|
15
|
+
//# sourceMappingURL=setIntlayerIdentifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setIntlayerIdentifier.d.ts","names":[],"sources":["../../../src/utils/setIntlayerIdentifier.ts"],"mappings":";KAAK,IAAA;EACH,OAAA;AAAA;AAAA,KAGU,mBAAA,UAA6B,MAAA;EACvC,QAAA,GAAW,IAAA;AAAA;AADb;;;;AAAA,cAQa,qBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.",
|
|
6
6
|
"keywords": [
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
153
153
|
},
|
|
154
154
|
"dependencies": {
|
|
155
|
-
"@intlayer/types": "8.6.
|
|
155
|
+
"@intlayer/types": "8.6.4",
|
|
156
156
|
"defu": "6.1.4",
|
|
157
157
|
"dotenv": "17.3.1",
|
|
158
158
|
"esbuild": "0.27.4",
|