@intlayer/config 9.0.0-canary.14 → 9.0.0-canary.16
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.cjs +2 -0
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/bundle/index.cjs +1 -1
- package/dist/cjs/client.cjs +1 -0
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs +35 -0
- package/dist/cjs/configFile/buildBrowserConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/buildConfigurationFields.cjs +2 -0
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/configurationSchema.cjs +7 -0
- package/dist/cjs/configFile/configurationSchema.cjs.map +1 -1
- package/dist/cjs/configFile/index.cjs +2 -0
- package/dist/cjs/defaultValues/analytics.cjs +16 -0
- package/dist/cjs/defaultValues/analytics.cjs.map +1 -0
- package/dist/cjs/defaultValues/index.cjs +4 -0
- package/dist/cjs/envVars/envVars.cjs +2 -1
- package/dist/cjs/envVars/envVars.cjs.map +1 -1
- package/dist/cjs/node.cjs +2 -0
- package/dist/esm/built.mjs +2 -1
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/bundle/index.mjs +1 -1
- package/dist/esm/client.mjs +2 -2
- package/dist/esm/configFile/buildBrowserConfiguration.mjs +35 -1
- package/dist/esm/configFile/buildBrowserConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs +3 -2
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/configurationSchema.mjs +7 -1
- package/dist/esm/configFile/configurationSchema.mjs.map +1 -1
- package/dist/esm/configFile/index.mjs +3 -3
- package/dist/esm/defaultValues/analytics.mjs +12 -0
- package/dist/esm/defaultValues/analytics.mjs.map +1 -0
- package/dist/esm/defaultValues/index.mjs +2 -1
- package/dist/esm/envVars/envVars.mjs +2 -1
- package/dist/esm/envVars/envVars.mjs.map +1 -1
- package/dist/esm/node.mjs +3 -3
- package/dist/types/built.d.ts +2 -1
- package/dist/types/built.d.ts.map +1 -1
- package/dist/types/client.d.ts +2 -2
- package/dist/types/configFile/buildBrowserConfiguration.d.ts +14 -2
- package/dist/types/configFile/buildBrowserConfiguration.d.ts.map +1 -1
- package/dist/types/configFile/buildConfigurationFields.d.ts +2 -2
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/configFile/configurationSchema.d.ts +18 -8
- package/dist/types/configFile/configurationSchema.d.ts.map +1 -1
- package/dist/types/configFile/index.d.ts +3 -3
- package/dist/types/defaultValues/analytics.d.ts +11 -0
- package/dist/types/defaultValues/analytics.d.ts.map +1 -0
- package/dist/types/defaultValues/index.d.ts +2 -1
- package/dist/types/node.d.ts +3 -3
- package/package.json +3 -4
- package/dist/cjs/built.browser.cjs +0 -46
- package/dist/cjs/built.browser.cjs.map +0 -1
- package/dist/esm/built.browser.mjs +0 -32
- package/dist/esm/built.browser.mjs.map +0 -1
- package/dist/types/built.browser.d.ts +0 -27
- package/dist/types/built.browser.d.ts.map +0 -1
package/dist/esm/node.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./configFile/buildBrowserConfiguration.mjs";
|
|
2
|
-
import { aiSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configFile/configurationSchema.mjs";
|
|
1
|
+
import { buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./configFile/buildBrowserConfiguration.mjs";
|
|
2
|
+
import { aiSchema, analyticsSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configFile/configurationSchema.mjs";
|
|
3
3
|
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.mjs";
|
|
4
4
|
import { configurationFilesCandidates, searchConfigurationFile } from "./configFile/searchConfigurationFile.mjs";
|
|
5
5
|
import { getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.mjs";
|
|
6
6
|
|
|
7
|
-
export { aiSchema, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
7
|
+
export { aiSchema, analyticsSchema, buildAnalyticsFields, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
package/dist/types/built.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare const routing: any;
|
|
|
9
9
|
declare const content: any;
|
|
10
10
|
declare const system: any;
|
|
11
11
|
declare const editor: any;
|
|
12
|
+
declare const analytics: any;
|
|
12
13
|
declare const log: any;
|
|
13
14
|
declare const ai: any;
|
|
14
15
|
declare const build: any;
|
|
@@ -16,5 +17,5 @@ declare const compiler: any;
|
|
|
16
17
|
declare const schemas: any;
|
|
17
18
|
declare const plugins: any;
|
|
18
19
|
//#endregion
|
|
19
|
-
export { ai, build, compiler, content, dictionary, editor, internationalization, log, plugins, routing, schemas, system };
|
|
20
|
+
export { ai, analytics, build, compiler, content, dictionary, editor, internationalization, log, plugins, routing, schemas, system };
|
|
20
21
|
//# sourceMappingURL=built.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built.d.ts","names":[],"sources":["../../src/built.ts"],"mappings":";;AAYA;;;cAAa,oBAAA;AAAA,cACA,UAAA;AAAA,cACA,OAAA;AAAA,cACA,OAAA;AAAA,cACA,MAAA;AAAA,cACA,MAAA;AAAA,cACA,GAAA;AAAA,cACA,EAAA;AAAA,cACA,KAAA;AAAA,cACA,QAAA;AAAA,cACA,OAAA;AAAA,cACA,OAAA"}
|
|
1
|
+
{"version":3,"file":"built.d.ts","names":[],"sources":["../../src/built.ts"],"mappings":";;AAYA;;;cAAa,oBAAA;AAAA,cACA,UAAA;AAAA,cACA,OAAA;AAAA,cACA,OAAA;AAAA,cACA,MAAA;AAAA,cACA,MAAA;AAAA,cACA,SAAA;AAAA,cACA,GAAA;AAAA,cACA,EAAA;AAAA,cACA,KAAA;AAAA,cACA,QAAA;AAAA,cACA,OAAA;AAAA,cACA,OAAA"}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BrowserIntlayerConfig, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./configFile/buildBrowserConfiguration.js";
|
|
1
|
+
import { BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./configFile/buildBrowserConfiguration.js";
|
|
2
2
|
import { extractErrorMessage } from "./utils/extractErrorMessage.js";
|
|
3
3
|
import { logStack } from "./utils/logStack.js";
|
|
4
4
|
import { normalizePath } from "./utils/normalizePath.js";
|
|
@@ -7,4 +7,4 @@ import { camelCaseToKebabCase } from "./utils/stringFormatter/camelCaseToKebabCa
|
|
|
7
7
|
import { camelCaseToSentence } from "./utils/stringFormatter/camelCaseToSentence.js";
|
|
8
8
|
import { kebabCaseToCamelCase } from "./utils/stringFormatter/kebabCaseToCamelCase.js";
|
|
9
9
|
import { toLowerCamelCase } from "./utils/stringFormatter/toLowerCamelCase.js";
|
|
10
|
-
export { BrowserIntlayerConfig, WindowsWithIntlayer, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, camelCaseToKebabCase, camelCaseToSentence, extractBrowserConfiguration, extractErrorMessage, kebabCaseToCamelCase, logStack, normalizePath, setIntlayerIdentifier, toLowerCamelCase };
|
|
10
|
+
export { BrowserIntlayerConfig, WindowsWithIntlayer, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, camelCaseToKebabCase, camelCaseToSentence, extractBrowserConfiguration, extractErrorMessage, kebabCaseToCamelCase, logStack, normalizePath, setIntlayerIdentifier, toLowerCamelCase };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomIntlayerConfig, CustomRoutingConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, RoutingConfig } from "@intlayer/types/config";
|
|
1
|
+
import { AnalyticsConfig, CustomIntlayerConfig, CustomRoutingConfig, EditorConfig, InternationalizationConfig, IntlayerConfig, LogConfig, LogFunctions, RoutingConfig } from "@intlayer/types/config";
|
|
2
2
|
|
|
3
3
|
//#region src/configFile/buildBrowserConfiguration.d.ts
|
|
4
4
|
/**
|
|
@@ -12,6 +12,7 @@ type BrowserIntlayerConfig = {
|
|
|
12
12
|
internationalization: Pick<InternationalizationConfig, 'locales' | 'defaultLocale'>;
|
|
13
13
|
routing: RoutingConfig;
|
|
14
14
|
editor: Omit<EditorConfig, 'clientId' | 'clientSecret'>;
|
|
15
|
+
analytics: AnalyticsConfig;
|
|
15
16
|
log: Pick<LogConfig, 'mode' | 'prefix'>;
|
|
16
17
|
};
|
|
17
18
|
declare global {
|
|
@@ -54,6 +55,17 @@ declare const buildRoutingFields: (customConfiguration?: Partial<CustomRoutingCo
|
|
|
54
55
|
* @returns A fully-defaulted {@link EditorConfig}.
|
|
55
56
|
*/
|
|
56
57
|
declare const buildEditorFields: (customConfiguration?: Partial<EditorConfig>, env?: NodeJS.ProcessEnv) => EditorConfig;
|
|
58
|
+
/**
|
|
59
|
+
* Build the analytics section of the Intlayer configuration.
|
|
60
|
+
*
|
|
61
|
+
* Analytics is strictly opt-in: `enabled` defaults to `false` and, even when
|
|
62
|
+
* enabled, the runtime additionally requires a project key (`editor.clientId`)
|
|
63
|
+
* for attribution before collecting anything.
|
|
64
|
+
*
|
|
65
|
+
* @param customConfiguration - Partial user-supplied analytics config.
|
|
66
|
+
* @returns A fully-defaulted {@link AnalyticsConfig}.
|
|
67
|
+
*/
|
|
68
|
+
declare const buildAnalyticsFields: (customConfiguration?: Partial<AnalyticsConfig>) => AnalyticsConfig;
|
|
57
69
|
/**
|
|
58
70
|
* Build the log section of the Intlayer configuration.
|
|
59
71
|
*
|
|
@@ -98,5 +110,5 @@ declare const buildBrowserConfiguration: (customConfig?: CustomIntlayerConfig) =
|
|
|
98
110
|
*/
|
|
99
111
|
declare const extractBrowserConfiguration: (config: IntlayerConfig) => BrowserIntlayerConfig;
|
|
100
112
|
//#endregion
|
|
101
|
-
export { BrowserIntlayerConfig, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration };
|
|
113
|
+
export { BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration };
|
|
102
114
|
//# sourceMappingURL=buildBrowserConfiguration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBrowserConfiguration.d.ts","names":[],"sources":["../../../src/configFile/buildBrowserConfiguration.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"buildBrowserConfiguration.d.ts","names":[],"sources":["../../../src/configFile/buildBrowserConfiguration.ts"],"mappings":";;;;;AAqDA;;;;;KAAY,qBAAA;EACV,oBAAA,EAAsB,IAAA,CACpB,0BAAA;EAGF,OAAA,EAAS,aAAA;EACT,MAAA,EAAQ,IAAA,CAAK,YAAA;EACb,SAAA,EAAW,eAAA;EACX,GAAA,EAAK,IAAA,CAAK,SAAA;AAAA;AAAA,QAGJ,MAAA;EAAA,UACI,MAAA;IAXY;IAapB,eAAA,GAAkB,qBAAA;EAAA;AAAA;;;;;;;cAiBT,+BAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,0BAAA,MAC7B,0BAAA;;;;AAxBD;;;cAuEW,kBAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,mBAAA,MAC7B,aAAA;;;;;;;;AAnDH;;;;;;;;;;;;cA2Ka,iBAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,YAAA,GAC9B,GAAA,GAAK,MAAA,CAAO,UAAA,KACX,YAAA;;AA7HH;;;;;;;;;cAoQa,oBAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,eAAA,MAC7B,eAAA;;;;;AA5IH;;;cA0Ka,cAAA,GACX,mBAAA,GAAsB,OAAA,CAAQ,SAAA,GAC9B,YAAA,GAAe,YAAA,KACd,SAAA;;;;;;;;;;;;;;;AAnCH;;;;;;;;cA2Fa,yBAAA,GACX,YAAA,GAAe,oBAAA,KACd,qBAAA;;;;;;AA7DH;;;;;;cA8Fa,2BAAA,GACX,MAAA,EAAQ,cAAA,KACP,qBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BrowserIntlayerConfig, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./buildBrowserConfiguration.js";
|
|
1
|
+
import { BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./buildBrowserConfiguration.js";
|
|
2
2
|
import { CustomIntlayerConfig, IntlayerConfig, LogFunctions } from "@intlayer/types/config";
|
|
3
3
|
|
|
4
4
|
//#region src/configFile/buildConfigurationFields.d.ts
|
|
@@ -27,5 +27,5 @@ import { CustomIntlayerConfig, IntlayerConfig, LogFunctions } from "@intlayer/ty
|
|
|
27
27
|
*/
|
|
28
28
|
declare const buildConfigurationFields: (customConfiguration?: CustomIntlayerConfig, baseDir?: string, logFunctions?: LogFunctions, env?: NodeJS.ProcessEnv) => IntlayerConfig;
|
|
29
29
|
//#endregion
|
|
30
|
-
export { type BrowserIntlayerConfig, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration };
|
|
30
|
+
export { type BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration };
|
|
31
31
|
//# sourceMappingURL=buildConfigurationFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"buildConfigurationFields.d.ts","names":[],"sources":["../../../src/configFile/buildConfigurationFields.ts"],"mappings":";;;;;;AAivBA;;;;;;;;;;;;;;;;;;;;;cAAa,wBAAA,GACX,mBAAA,GAAsB,oBAAA,EACtB,OAAA,WACA,YAAA,GAAe,YAAA,EACf,GAAA,GAAK,MAAA,CAAO,UAAA,KACX,cAAA"}
|
|
@@ -20,9 +20,9 @@ declare const cookiesAttributesSchema: z.ZodObject<{
|
|
|
20
20
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
23
|
-
none: "none";
|
|
24
23
|
strict: "strict";
|
|
25
24
|
lax: "lax";
|
|
25
|
+
none: "none";
|
|
26
26
|
}>>;
|
|
27
27
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
28
28
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -48,9 +48,9 @@ declare const storageSchema: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodEnum
|
|
|
48
48
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
49
49
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
50
50
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
51
|
-
none: "none";
|
|
52
51
|
strict: "strict";
|
|
53
52
|
lax: "lax";
|
|
53
|
+
none: "none";
|
|
54
54
|
}>>;
|
|
55
55
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
56
56
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -74,9 +74,9 @@ declare const storageSchema: z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodEnum
|
|
|
74
74
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
75
75
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
76
76
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
77
|
-
none: "none";
|
|
78
77
|
strict: "strict";
|
|
79
78
|
lax: "lax";
|
|
79
|
+
none: "none";
|
|
80
80
|
}>>;
|
|
81
81
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
82
82
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -159,9 +159,9 @@ declare const routingSchema: z.ZodObject<{
|
|
|
159
159
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
160
160
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
161
161
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
162
|
-
none: "none";
|
|
163
162
|
strict: "strict";
|
|
164
163
|
lax: "lax";
|
|
164
|
+
none: "none";
|
|
165
165
|
}>>;
|
|
166
166
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
167
167
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -185,9 +185,9 @@ declare const routingSchema: z.ZodObject<{
|
|
|
185
185
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
186
186
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
187
187
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
188
|
-
none: "none";
|
|
189
188
|
strict: "strict";
|
|
190
189
|
lax: "lax";
|
|
190
|
+
none: "none";
|
|
191
191
|
}>>;
|
|
192
192
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
193
193
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -241,6 +241,11 @@ declare const editorSchema: z.ZodObject<{
|
|
|
241
241
|
liveSyncPort: z.ZodOptional<z.ZodNumber>;
|
|
242
242
|
liveSyncURL: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
243
243
|
}, z.core.$strip>;
|
|
244
|
+
declare const analyticsSchema: z.ZodObject<{
|
|
245
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
246
|
+
flushInterval: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
}, z.core.$strip>;
|
|
244
249
|
declare const logSchema: z.ZodObject<{
|
|
245
250
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
246
251
|
default: "default";
|
|
@@ -357,9 +362,9 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
357
362
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
358
363
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
359
364
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
360
|
-
none: "none";
|
|
361
365
|
strict: "strict";
|
|
362
366
|
lax: "lax";
|
|
367
|
+
none: "none";
|
|
363
368
|
}>>;
|
|
364
369
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
365
370
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -383,9 +388,9 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
383
388
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
384
389
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
385
390
|
sameSite: z.ZodOptional<z.ZodEnum<{
|
|
386
|
-
none: "none";
|
|
387
391
|
strict: "strict";
|
|
388
392
|
lax: "lax";
|
|
393
|
+
none: "none";
|
|
389
394
|
}>>;
|
|
390
395
|
expires: z.ZodOptional<z.ZodUnion<readonly [z.ZodCustom<Date, Date>, z.ZodNumber, z.ZodString]>>;
|
|
391
396
|
maxAge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -439,6 +444,11 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
439
444
|
liveSyncPort: z.ZodOptional<z.ZodNumber>;
|
|
440
445
|
liveSyncURL: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
|
|
441
446
|
}, z.core.$strip>>;
|
|
447
|
+
analytics: z.ZodOptional<z.ZodObject<{
|
|
448
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
449
|
+
flushInterval: z.ZodOptional<z.ZodNumber>;
|
|
450
|
+
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
451
|
+
}, z.core.$strip>>;
|
|
442
452
|
log: z.ZodOptional<z.ZodObject<{
|
|
443
453
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
444
454
|
default: "default";
|
|
@@ -512,5 +522,5 @@ declare const intlayerConfigSchema: z.ZodObject<{
|
|
|
512
522
|
}, z.core.$strip>>;
|
|
513
523
|
}, z.core.$strip>;
|
|
514
524
|
//#endregion
|
|
515
|
-
export { aiSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema };
|
|
525
|
+
export { aiSchema, analyticsSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema };
|
|
516
526
|
//# sourceMappingURL=configurationSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurationSchema.d.ts","names":[],"sources":["../../../src/configFile/configurationSchema.ts"],"mappings":";;;;cAGa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;cA+B1B,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAYvB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;cAKvB,aAAA,EAAa,CAAA,CAAA,QAAA,WAAA,CAAA,CAAA,UAAA,SAAA,CAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAcb,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;cAKjB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;cAIlB,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAMnB,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgBb,YAAA,EAAY,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAeZ,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;cASb,YAAA,EAAY,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAiBZ,SAAA,EAAS,CAAA,CAAA,SAAA;;;;;;;;;;;;cAST,QAAA,EAAQ,CAAA,CAAA,SAAA;;;;;;;;;;;;cAUR,WAAA,EAAW,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAWX,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;cAUd,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;cAiBhB,oBAAA,EAAoB,CAAA,CAAA,SAAA"}
|
|
1
|
+
{"version":3,"file":"configurationSchema.d.ts","names":[],"sources":["../../../src/configFile/configurationSchema.ts"],"mappings":";;;;cAGa,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;cA+B1B,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;cAYvB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;cAKvB,aAAA,EAAa,CAAA,CAAA,QAAA,WAAA,CAAA,CAAA,UAAA,SAAA,CAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAcb,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;cAKjB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;;;cAIlB,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAMnB,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgBb,YAAA,EAAY,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAeZ,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;;cASb,YAAA,EAAY,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;cAiBZ,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;cAMf,SAAA,EAAS,CAAA,CAAA,SAAA;;;;;;;;;;;;cAST,QAAA,EAAQ,CAAA,CAAA,SAAA;;;;;;;;;;;;cAUR,WAAA,EAAW,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAWX,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;cAUd,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;cAiBhB,oBAAA,EAAoB,CAAA,CAAA,SAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetConfigurationAndFilePathResult, GetConfigurationOptions, getConfiguration, getConfigurationAndFilePath } from "./getConfiguration.js";
|
|
2
|
-
import { BrowserIntlayerConfig, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./buildBrowserConfiguration.js";
|
|
2
|
+
import { BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./buildBrowserConfiguration.js";
|
|
3
3
|
import { buildConfigurationFields } from "./buildConfigurationFields.js";
|
|
4
|
-
import { aiSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configurationSchema.js";
|
|
4
|
+
import { aiSchema, analyticsSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configurationSchema.js";
|
|
5
5
|
import { configurationFilesCandidates, searchConfigurationFile } from "./searchConfigurationFile.js";
|
|
6
|
-
export { BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, aiSchema, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
6
|
+
export { BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, aiSchema, analyticsSchema, buildAnalyticsFields, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/defaultValues/analytics.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Default values for the `analytics` configuration block.
|
|
4
|
+
* Analytics is strictly opt-in — disabled unless the user enables it.
|
|
5
|
+
*/
|
|
6
|
+
declare const ANALYTICS_ENABLED = false;
|
|
7
|
+
declare const ANALYTICS_FLUSH_INTERVAL = 20000;
|
|
8
|
+
declare const ANALYTICS_SAMPLE_RATE = 1;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ANALYTICS_ENABLED, ANALYTICS_FLUSH_INTERVAL, ANALYTICS_SAMPLE_RATE };
|
|
11
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","names":[],"sources":["../../../src/defaultValues/analytics.ts"],"mappings":";;AAIA;;;cAAa,iBAAA;AAAA,cACA,wBAAA;AAAA,cACA,qBAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ANALYTICS_ENABLED, ANALYTICS_FLUSH_INTERVAL, ANALYTICS_SAMPLE_RATE } from "./analytics.js";
|
|
1
2
|
import { BUILD_MODE, CACHE, MINIFY, OPTIMIZE, OUTPUT_FORMAT, PURGE, TRAVERSE_PATTERN, TYPE_CHECKING } from "./build.js";
|
|
2
3
|
import { COMPILER_DICTIONARY_KEY_PREFIX, COMPILER_ENABLED, COMPILER_NO_METADATA, COMPILER_SAVE_COMPONENTS } from "./compiler.js";
|
|
3
4
|
import { CODE_DIR, CONTENT_DIR, EXCLUDED_PATHS, FILE_EXTENSIONS, I18NEXT_DICTIONARIES_DIR, REACT_INTL_MESSAGES_DIR, WATCH } from "./content.js";
|
|
@@ -7,4 +8,4 @@ import { DEFAULT_LOCALE, LOCALES, REQUIRED_LOCALES, STRICT_MODE } from "./intern
|
|
|
7
8
|
import { MODE, PREFIX } from "./log.js";
|
|
8
9
|
import { BASE_PATH, COOKIE_NAME, ENABLE_PROXY, HEADER_NAME, LOCALE_STORAGE_NAME, ROUTING_MODE, SERVER_SET_COOKIE, STORAGE } from "./routing.js";
|
|
9
10
|
import { CACHE_DIR, CONFIG_DIR, DICTIONARIES_DIR, DYNAMIC_DICTIONARIES_DIR, FETCH_DICTIONARIES_DIR, MAIN_DIR, MASKS_DIR, MODULE_AUGMENTATION_DIR, REMOTE_DICTIONARIES_DIR, TEMP_DIR, TYPES_DIR, UNMERGED_DICTIONARIES_DIR } from "./system.js";
|
|
10
|
-
export { APPLICATION_URL, BACKEND_URL, BASE_PATH, BUILD_MODE, CACHE, CACHE_DIR, CMS_URL, CODE_DIR, COMPILER_DICTIONARY_KEY_PREFIX, COMPILER_ENABLED, COMPILER_NO_METADATA, COMPILER_SAVE_COMPONENTS, CONFIG_DIR, CONTENT_AUTO_TRANSFORMATION, CONTENT_DIR, COOKIE_NAME, DEFAULT_LOCALE, DICTIONARIES_DIR, DICTIONARY_PRIORITY_STRATEGY, DYNAMIC_DICTIONARIES_DIR, EDITOR_URL, ENABLE_PROXY, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, FILL, HEADER_NAME, I18NEXT_DICTIONARIES_DIR, IMPORT_MODE, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, LOCALES, LOCALE_STORAGE_NAME, LOCATION, MAIN_DIR, MASKS_DIR, MINIFY, MODE, MODULE_AUGMENTATION_DIR, OPTIMIZE, OUTPUT_FORMAT, PORT, PREFIX, PURGE, REACT_INTL_MESSAGES_DIR, REMOTE_DICTIONARIES_DIR, REQUIRED_LOCALES, ROUTING_MODE, SERVER_SET_COOKIE, STORAGE, STRICT_MODE, TEMP_DIR, TRAVERSE_PATTERN, TYPES_DIR, TYPE_CHECKING, UNMERGED_DICTIONARIES_DIR, WATCH };
|
|
11
|
+
export { ANALYTICS_ENABLED, ANALYTICS_FLUSH_INTERVAL, ANALYTICS_SAMPLE_RATE, APPLICATION_URL, BACKEND_URL, BASE_PATH, BUILD_MODE, CACHE, CACHE_DIR, CMS_URL, CODE_DIR, COMPILER_DICTIONARY_KEY_PREFIX, COMPILER_ENABLED, COMPILER_NO_METADATA, COMPILER_SAVE_COMPONENTS, CONFIG_DIR, CONTENT_AUTO_TRANSFORMATION, CONTENT_DIR, COOKIE_NAME, DEFAULT_LOCALE, DICTIONARIES_DIR, DICTIONARY_PRIORITY_STRATEGY, DYNAMIC_DICTIONARIES_DIR, EDITOR_URL, ENABLE_PROXY, EXCLUDED_PATHS, FETCH_DICTIONARIES_DIR, FILE_EXTENSIONS, FILL, HEADER_NAME, I18NEXT_DICTIONARIES_DIR, IMPORT_MODE, IS_ENABLED, LIVE_SYNC, LIVE_SYNC_PORT, LOCALES, LOCALE_STORAGE_NAME, LOCATION, MAIN_DIR, MASKS_DIR, MINIFY, MODE, MODULE_AUGMENTATION_DIR, OPTIMIZE, OUTPUT_FORMAT, PORT, PREFIX, PURGE, REACT_INTL_MESSAGES_DIR, REMOTE_DICTIONARIES_DIR, REQUIRED_LOCALES, ROUTING_MODE, SERVER_SET_COOKIE, STORAGE, STRICT_MODE, TEMP_DIR, TRAVERSE_PATTERN, TYPES_DIR, TYPE_CHECKING, UNMERGED_DICTIONARIES_DIR, WATCH };
|
package/dist/types/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetConfigurationAndFilePathResult, GetConfigurationOptions, getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.js";
|
|
2
|
-
import { BrowserIntlayerConfig, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./configFile/buildBrowserConfiguration.js";
|
|
2
|
+
import { BrowserIntlayerConfig, buildAnalyticsFields, buildBrowserConfiguration, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, extractBrowserConfiguration } from "./configFile/buildBrowserConfiguration.js";
|
|
3
3
|
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.js";
|
|
4
|
-
import { aiSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configFile/configurationSchema.js";
|
|
4
|
+
import { aiSchema, analyticsSchema, buildSchema, compilerSchema, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, storageAttributesSchema, storageSchema, systemSchema } from "./configFile/configurationSchema.js";
|
|
5
5
|
import { configurationFilesCandidates, searchConfigurationFile } from "./configFile/searchConfigurationFile.js";
|
|
6
|
-
export { BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, aiSchema, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
|
6
|
+
export { BrowserIntlayerConfig, GetConfigurationAndFilePathResult, GetConfigurationOptions, aiSchema, analyticsSchema, buildAnalyticsFields, buildBrowserConfiguration, buildConfigurationFields, buildEditorFields, buildInternationalizationFields, buildLogFields, buildRoutingFields, buildSchema, compilerSchema, configurationFilesCandidates, contentSchema, cookiesAttributesSchema, dictionarySchema, editorSchema, extractBrowserConfiguration, getConfiguration, getConfigurationAndFilePath, internationalizationSchema, intlayerConfigSchema, logSchema, rewriteObjectSchema, rewriteRuleSchema, rewriteRulesSchema, routingSchema, searchConfigurationFile, storageAttributesSchema, storageSchema, systemSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "9.0.0-canary.
|
|
3
|
+
"version": "9.0.0-canary.16",
|
|
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": [
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"import": "./dist/esm/client.mjs"
|
|
49
49
|
},
|
|
50
50
|
"./built": {
|
|
51
|
-
"browser": "./dist/esm/built.browser.mjs",
|
|
52
51
|
"types": "./dist/types/built.d.ts",
|
|
53
52
|
"require": "./dist/cjs/built.cjs",
|
|
54
53
|
"import": "./dist/esm/built.mjs"
|
|
@@ -165,7 +164,7 @@
|
|
|
165
164
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
166
165
|
},
|
|
167
166
|
"dependencies": {
|
|
168
|
-
"@intlayer/types": "9.0.0-canary.
|
|
167
|
+
"@intlayer/types": "9.0.0-canary.16",
|
|
169
168
|
"defu": "6.1.7",
|
|
170
169
|
"dotenv": "17.4.2",
|
|
171
170
|
"esbuild": "0.28.1",
|
|
@@ -180,7 +179,7 @@
|
|
|
180
179
|
"rimraf": "6.1.3",
|
|
181
180
|
"tsdown": "0.21.10",
|
|
182
181
|
"typescript": "6.0.3",
|
|
183
|
-
"vitest": "4.1.
|
|
182
|
+
"vitest": "4.1.10"
|
|
184
183
|
},
|
|
185
184
|
"peerDependencies": {
|
|
186
185
|
"react": ">=16.0.0"
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
|
|
3
|
-
//#region src/built.browser.ts
|
|
4
|
-
/**
|
|
5
|
-
* Proxy that reads each top-level key from `window.INTLAYER_CONFIG` lazily.
|
|
6
|
-
* This avoids the module-evaluation timing issue: the proxy is safe to import
|
|
7
|
-
* at the top of any file because the actual `window.INTLAYER_CONFIG` value is
|
|
8
|
-
* only read when a property is first accessed.
|
|
9
|
-
*/
|
|
10
|
-
const configuration = new Proxy({}, {
|
|
11
|
-
get(_target, prop) {
|
|
12
|
-
return (typeof window !== "undefined" ? window.INTLAYER_CONFIG : void 0)?.[prop];
|
|
13
|
-
},
|
|
14
|
-
has(_target, prop) {
|
|
15
|
-
const config = typeof window !== "undefined" ? window.INTLAYER_CONFIG : void 0;
|
|
16
|
-
return config != null && prop in config;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const internationalization = configuration.internationalization;
|
|
20
|
-
const dictionary = configuration.dictionary;
|
|
21
|
-
const routing = configuration.routing;
|
|
22
|
-
const content = configuration.content;
|
|
23
|
-
const system = configuration.system;
|
|
24
|
-
const editor = configuration.editor;
|
|
25
|
-
const log = configuration.log;
|
|
26
|
-
const ai = configuration.ai;
|
|
27
|
-
const build = configuration.build;
|
|
28
|
-
const compiler = configuration.compiler;
|
|
29
|
-
const schemas = configuration.schemas;
|
|
30
|
-
const plugins = configuration.plugins;
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
exports.ai = ai;
|
|
34
|
-
exports.build = build;
|
|
35
|
-
exports.compiler = compiler;
|
|
36
|
-
exports.content = content;
|
|
37
|
-
exports.default = configuration;
|
|
38
|
-
exports.dictionary = dictionary;
|
|
39
|
-
exports.editor = editor;
|
|
40
|
-
exports.internationalization = internationalization;
|
|
41
|
-
exports.log = log;
|
|
42
|
-
exports.plugins = plugins;
|
|
43
|
-
exports.routing = routing;
|
|
44
|
-
exports.schemas = schemas;
|
|
45
|
-
exports.system = system;
|
|
46
|
-
//# sourceMappingURL=built.browser.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"built.browser.cjs","names":[],"sources":["../../src/built.browser.ts"],"sourcesContent":["/**\n * @intlayer/config/built — browser build\n *\n * In browser bundles this module is selected automatically via the `browser`\n * export condition in package.json (supported by Vite, webpack, Rollup, etc.).\n *\n * Configuration is resolved at *access time* (lazy) from `window.INTLAYER_CONFIG`\n * so that it works both when:\n *\n * - A build plugin (vite-intlayer / withIntlayer) injects the value via\n * bundler `define` (static replacement at build time), OR\n * - The application calls `installIntlayer(config)` at runtime before any\n * config field is first accessed.\n */\nimport type { IntlayerConfig } from '@intlayer/types/config';\n// This import brings in the `declare global { interface Window { INTLAYER_CONFIG } }` augmentation\nimport type {} from './configFile/buildBrowserConfiguration';\n\n/**\n * Proxy that reads each top-level key from `window.INTLAYER_CONFIG` lazily.\n * This avoids the module-evaluation timing issue: the proxy is safe to import\n * at the top of any file because the actual `window.INTLAYER_CONFIG` value is\n * only read when a property is first accessed.\n */\nconst configuration = new Proxy({} as IntlayerConfig, {\n get(_target, prop: string) {\n const config =\n typeof window !== 'undefined' ? window.INTLAYER_CONFIG : undefined;\n return (config as Record<string, unknown> | undefined)?.[prop];\n },\n has(_target, prop: string) {\n const config =\n typeof window !== 'undefined' ? window.INTLAYER_CONFIG : undefined;\n return config != null && prop in config;\n },\n});\n\nexport const internationalization = configuration.internationalization;\nexport const dictionary = configuration.dictionary;\nexport const routing = configuration.routing;\nexport const content = configuration.content;\nexport const system = configuration.system;\nexport const editor = configuration.editor;\nexport const log = configuration.log;\nexport const ai = configuration.ai;\nexport const build = configuration.build;\nexport const compiler = configuration.compiler;\nexport const schemas = configuration.schemas;\nexport const plugins = configuration.plugins;\n\nexport default configuration;\n"],"mappings":";;;;;;;;;AAwBA,MAAM,gBAAgB,IAAI,MAAM,EAAE,EAAoB;CACpD,IAAI,SAAS,MAAc;AAGzB,UADE,OAAO,WAAW,cAAc,OAAO,kBAAkB,UACF;;CAE3D,IAAI,SAAS,MAAc;EACzB,MAAM,SACJ,OAAO,WAAW,cAAc,OAAO,kBAAkB;AAC3D,SAAO,UAAU,QAAQ,QAAQ;;CAEpC,CAAC;AAEF,MAAa,uBAAuB,cAAc;AAClD,MAAa,aAAa,cAAc;AACxC,MAAa,UAAU,cAAc;AACrC,MAAa,UAAU,cAAc;AACrC,MAAa,SAAS,cAAc;AACpC,MAAa,SAAS,cAAc;AACpC,MAAa,MAAM,cAAc;AACjC,MAAa,KAAK,cAAc;AAChC,MAAa,QAAQ,cAAc;AACnC,MAAa,WAAW,cAAc;AACtC,MAAa,UAAU,cAAc;AACrC,MAAa,UAAU,cAAc"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//#region src/built.browser.ts
|
|
2
|
-
/**
|
|
3
|
-
* Proxy that reads each top-level key from `window.INTLAYER_CONFIG` lazily.
|
|
4
|
-
* This avoids the module-evaluation timing issue: the proxy is safe to import
|
|
5
|
-
* at the top of any file because the actual `window.INTLAYER_CONFIG` value is
|
|
6
|
-
* only read when a property is first accessed.
|
|
7
|
-
*/
|
|
8
|
-
const configuration = new Proxy({}, {
|
|
9
|
-
get(_target, prop) {
|
|
10
|
-
return (typeof window !== "undefined" ? window.INTLAYER_CONFIG : void 0)?.[prop];
|
|
11
|
-
},
|
|
12
|
-
has(_target, prop) {
|
|
13
|
-
const config = typeof window !== "undefined" ? window.INTLAYER_CONFIG : void 0;
|
|
14
|
-
return config != null && prop in config;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
const internationalization = configuration.internationalization;
|
|
18
|
-
const dictionary = configuration.dictionary;
|
|
19
|
-
const routing = configuration.routing;
|
|
20
|
-
const content = configuration.content;
|
|
21
|
-
const system = configuration.system;
|
|
22
|
-
const editor = configuration.editor;
|
|
23
|
-
const log = configuration.log;
|
|
24
|
-
const ai = configuration.ai;
|
|
25
|
-
const build = configuration.build;
|
|
26
|
-
const compiler = configuration.compiler;
|
|
27
|
-
const schemas = configuration.schemas;
|
|
28
|
-
const plugins = configuration.plugins;
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { ai, build, compiler, content, configuration as default, dictionary, editor, internationalization, log, plugins, routing, schemas, system };
|
|
32
|
-
//# sourceMappingURL=built.browser.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"built.browser.mjs","names":[],"sources":["../../src/built.browser.ts"],"sourcesContent":["/**\n * @intlayer/config/built — browser build\n *\n * In browser bundles this module is selected automatically via the `browser`\n * export condition in package.json (supported by Vite, webpack, Rollup, etc.).\n *\n * Configuration is resolved at *access time* (lazy) from `window.INTLAYER_CONFIG`\n * so that it works both when:\n *\n * - A build plugin (vite-intlayer / withIntlayer) injects the value via\n * bundler `define` (static replacement at build time), OR\n * - The application calls `installIntlayer(config)` at runtime before any\n * config field is first accessed.\n */\nimport type { IntlayerConfig } from '@intlayer/types/config';\n// This import brings in the `declare global { interface Window { INTLAYER_CONFIG } }` augmentation\nimport type {} from './configFile/buildBrowserConfiguration';\n\n/**\n * Proxy that reads each top-level key from `window.INTLAYER_CONFIG` lazily.\n * This avoids the module-evaluation timing issue: the proxy is safe to import\n * at the top of any file because the actual `window.INTLAYER_CONFIG` value is\n * only read when a property is first accessed.\n */\nconst configuration = new Proxy({} as IntlayerConfig, {\n get(_target, prop: string) {\n const config =\n typeof window !== 'undefined' ? window.INTLAYER_CONFIG : undefined;\n return (config as Record<string, unknown> | undefined)?.[prop];\n },\n has(_target, prop: string) {\n const config =\n typeof window !== 'undefined' ? window.INTLAYER_CONFIG : undefined;\n return config != null && prop in config;\n },\n});\n\nexport const internationalization = configuration.internationalization;\nexport const dictionary = configuration.dictionary;\nexport const routing = configuration.routing;\nexport const content = configuration.content;\nexport const system = configuration.system;\nexport const editor = configuration.editor;\nexport const log = configuration.log;\nexport const ai = configuration.ai;\nexport const build = configuration.build;\nexport const compiler = configuration.compiler;\nexport const schemas = configuration.schemas;\nexport const plugins = configuration.plugins;\n\nexport default configuration;\n"],"mappings":";;;;;;;AAwBA,MAAM,gBAAgB,IAAI,MAAM,EAAE,EAAoB;CACpD,IAAI,SAAS,MAAc;AAGzB,UADE,OAAO,WAAW,cAAc,OAAO,kBAAkB,UACF;;CAE3D,IAAI,SAAS,MAAc;EACzB,MAAM,SACJ,OAAO,WAAW,cAAc,OAAO,kBAAkB;AAC3D,SAAO,UAAU,QAAQ,QAAQ;;CAEpC,CAAC;AAEF,MAAa,uBAAuB,cAAc;AAClD,MAAa,aAAa,cAAc;AACxC,MAAa,UAAU,cAAc;AACrC,MAAa,UAAU,cAAc;AACrC,MAAa,SAAS,cAAc;AACpC,MAAa,SAAS,cAAc;AACpC,MAAa,MAAM,cAAc;AACjC,MAAa,KAAK,cAAc;AAChC,MAAa,QAAQ,cAAc;AACnC,MAAa,WAAW,cAAc;AACtC,MAAa,UAAU,cAAc;AACrC,MAAa,UAAU,cAAc"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as _$_intlayer_types_config0 from "@intlayer/types/config";
|
|
2
|
-
import { IntlayerConfig } from "@intlayer/types/config";
|
|
3
|
-
import * as _$_intlayer_types_plugin0 from "@intlayer/types/plugin";
|
|
4
|
-
|
|
5
|
-
//#region src/built.browser.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Proxy that reads each top-level key from `window.INTLAYER_CONFIG` lazily.
|
|
8
|
-
* This avoids the module-evaluation timing issue: the proxy is safe to import
|
|
9
|
-
* at the top of any file because the actual `window.INTLAYER_CONFIG` value is
|
|
10
|
-
* only read when a property is first accessed.
|
|
11
|
-
*/
|
|
12
|
-
declare const configuration: IntlayerConfig;
|
|
13
|
-
declare const internationalization: _$_intlayer_types_config0.InternationalizationConfig;
|
|
14
|
-
declare const dictionary: Partial<_$_intlayer_types_config0.DictionaryConfig>;
|
|
15
|
-
declare const routing: _$_intlayer_types_config0.RoutingConfig;
|
|
16
|
-
declare const content: _$_intlayer_types_config0.ContentConfig;
|
|
17
|
-
declare const system: _$_intlayer_types_config0.SystemConfig;
|
|
18
|
-
declare const editor: _$_intlayer_types_config0.EditorConfig;
|
|
19
|
-
declare const log: _$_intlayer_types_config0.LogConfig;
|
|
20
|
-
declare const ai: Partial<_$_intlayer_types_config0.AiConfig>;
|
|
21
|
-
declare const build: _$_intlayer_types_config0.BuildConfig;
|
|
22
|
-
declare const compiler: _$_intlayer_types_config0.CompilerConfig;
|
|
23
|
-
declare const schemas: Record<string, _$_intlayer_types_config0.ConfigSchema>;
|
|
24
|
-
declare const plugins: _$_intlayer_types_plugin0.Plugin[];
|
|
25
|
-
//#endregion
|
|
26
|
-
export { ai, build, compiler, content, configuration as default, dictionary, editor, internationalization, log, plugins, routing, schemas, system };
|
|
27
|
-
//# sourceMappingURL=built.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"built.browser.d.ts","names":[],"sources":["../../src/built.browser.ts"],"mappings":";;;;;AAsCA;;;;;AACA;AADA,cAdM,aAAA,EAAa,cAAA;AAAA,cAaN,oBAAA,EAAyD,yBAAA,CAArC,0BAAA;AAAA,cACpB,UAAA,EAAU,OAAA,CAA2B,yBAAA,CAA3B,gBAAA;AAAA,cACV,OAAA,EAA+B,yBAAA,CAAxB,aAAA;AAAA,cACP,OAAA,EAA+B,yBAAA,CAAxB,aAAA;AAAA,cACP,MAAA,EAA6B,yBAAA,CAAvB,YAAA;AAAA,cACN,MAAA,EAA6B,yBAAA,CAAvB,YAAA;AAAA,cACN,GAAA,EAAuB,yBAAA,CAApB,SAAA;AAAA,cACH,EAAA,EAAE,OAAA,CAAmB,yBAAA,CAAnB,QAAA;AAAA,cACF,KAAA,EAA2B,yBAAA,CAAtB,WAAA;AAAA,cACL,QAAA,EAAiC,yBAAA,CAAzB,cAAA;AAAA,cACR,OAAA,EAAO,MAAA,SAAwB,yBAAA,CAAxB,YAAA;AAAA,cACP,OAAA,EAA+B,yBAAA,CAAxB,MAAA"}
|