@intlayer/config 5.4.1 → 5.5.0-canary.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/dist/cjs/configFile/buildConfigurationFields.cjs +85 -196
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/defaultValues/content.cjs +27 -27
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/defaultValues/editor.cjs +0 -9
- package/dist/cjs/defaultValues/editor.cjs.map +1 -1
- package/dist/cjs/envVariables/extractEnvVariable/next.cjs +14 -18
- package/dist/cjs/envVariables/extractEnvVariable/next.cjs.map +1 -1
- package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs +12 -16
- package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs.map +1 -1
- package/dist/cjs/envVariables/extractEnvVariable/types.cjs.map +1 -1
- package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs +12 -16
- package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs.map +1 -1
- package/dist/cjs/envVariables/extractEnvVariable/vite.cjs +12 -16
- package/dist/cjs/envVariables/extractEnvVariable/vite.cjs.map +1 -1
- package/dist/cjs/envVariables/getConfiguration.cjs +13 -30
- package/dist/cjs/envVariables/getConfiguration.cjs.map +1 -1
- package/dist/cjs/index.cjs +9 -6
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/logger.cjs +6 -5
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/retryManager.cjs +52 -0
- package/dist/cjs/retryManager.cjs.map +1 -0
- package/dist/cjs/types/config.cjs.map +1 -1
- package/dist/esm/configFile/buildConfigurationFields.mjs +101 -215
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs +18 -18
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/defaultValues/editor.mjs +0 -6
- package/dist/esm/defaultValues/editor.mjs.map +1 -1
- package/dist/esm/envVariables/extractEnvVariable/next.mjs +14 -18
- package/dist/esm/envVariables/extractEnvVariable/next.mjs.map +1 -1
- package/dist/esm/envVariables/extractEnvVariable/react_app.mjs +12 -16
- package/dist/esm/envVariables/extractEnvVariable/react_app.mjs.map +1 -1
- package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs +12 -16
- package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs.map +1 -1
- package/dist/esm/envVariables/extractEnvVariable/vite.mjs +12 -16
- package/dist/esm/envVariables/extractEnvVariable/vite.mjs.map +1 -1
- package/dist/esm/envVariables/getConfiguration.mjs +13 -30
- package/dist/esm/envVariables/getConfiguration.mjs.map +1 -1
- package/dist/esm/index.mjs +9 -7
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/logger.mjs +6 -5
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/retryManager.mjs +28 -0
- package/dist/esm/retryManager.mjs.map +1 -0
- package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -1
- package/dist/types/defaultValues/content.d.ts +9 -9
- package/dist/types/defaultValues/content.d.ts.map +1 -1
- package/dist/types/defaultValues/editor.d.ts +0 -3
- package/dist/types/defaultValues/editor.d.ts.map +1 -1
- package/dist/types/envVariables/extractEnvVariable/next.d.ts.map +1 -1
- package/dist/types/envVariables/extractEnvVariable/react_app.d.ts.map +1 -1
- package/dist/types/envVariables/extractEnvVariable/types.d.ts +1 -1
- package/dist/types/envVariables/extractEnvVariable/types.d.ts.map +1 -1
- package/dist/types/envVariables/extractEnvVariable/undefined_platform.d.ts.map +1 -1
- package/dist/types/envVariables/extractEnvVariable/vite.d.ts.map +1 -1
- package/dist/types/envVariables/getConfiguration.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/retryManager.d.ts +17 -0
- package/dist/types/retryManager.d.ts.map +1 -0
- package/dist/types/types/config.d.ts +64 -106
- package/dist/types/types/config.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -29,17 +29,19 @@ __export(index_exports, {
|
|
|
29
29
|
getSandBoxContext: () => import_getSandboxContext.getSandBoxContext,
|
|
30
30
|
loadEnvFile: () => import_envVariables.loadEnvFile,
|
|
31
31
|
loadExternalFile: () => import_loadExternalFile.loadExternalFile,
|
|
32
|
-
logger: () => import_logger.logger
|
|
32
|
+
logger: () => import_logger.logger,
|
|
33
|
+
retryManager: () => import_retryManager.retryManager
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
var import_appLoggerServer = require('./appLoggerServer.cjs');
|
|
35
37
|
var import_getConfiguration = require('./configFile/getConfiguration.cjs');
|
|
36
|
-
var import_locales = require('./types/locales.cjs');
|
|
37
38
|
var import_envVariables = require('./envVariables/index.cjs');
|
|
38
|
-
var import_ESMxCJSRequire = require('./utils/ESMxCJSRequire.cjs');
|
|
39
|
-
var import_logger = require('./logger.cjs');
|
|
40
|
-
var import_appLoggerServer = require('./appLoggerServer.cjs');
|
|
41
39
|
var import_getSandboxContext = require('./getSandboxContext.cjs');
|
|
42
40
|
var import_loadExternalFile = require('./loadExternalFile.cjs');
|
|
41
|
+
var import_logger = require('./logger.cjs');
|
|
42
|
+
var import_retryManager = require('./retryManager.cjs');
|
|
43
|
+
var import_locales = require('./types/locales.cjs');
|
|
44
|
+
var import_ESMxCJSRequire = require('./utils/ESMxCJSRequire.cjs');
|
|
43
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
46
|
0 && (module.exports = {
|
|
45
47
|
ESMxCJSRequire,
|
|
@@ -53,6 +55,7 @@ var import_loadExternalFile = require('./loadExternalFile.cjs');
|
|
|
53
55
|
getSandBoxContext,
|
|
54
56
|
loadEnvFile,
|
|
55
57
|
loadExternalFile,
|
|
56
|
-
logger
|
|
58
|
+
logger,
|
|
59
|
+
retryManager
|
|
57
60
|
});
|
|
58
61
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getConfiguration,\n type GetConfigurationOptions,\n} from './configFile/getConfiguration';\
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export { appLogger } from './appLoggerServer';\nexport {\n getConfiguration,\n type GetConfigurationOptions,\n} from './configFile/getConfiguration';\nexport {\n formatEnvVariable,\n getConfiguration as getClientConfiguration,\n getEnvFilePath,\n getPlatform,\n loadEnvFile,\n} from './envVariables/index';\nexport { getSandBoxContext } from './getSandboxContext';\nexport { loadExternalFile } from './loadExternalFile';\nexport { logger } from './logger';\nexport { retryManager } from './retryManager';\nexport type {\n BaseContentConfig,\n BaseDerivedConfig,\n ContentConfig,\n CustomIntlayerConfig,\n InternationalizationConfig,\n IntlayerConfig,\n LogConfig,\n MiddlewareConfig,\n PatternsContentConfig,\n ResultDirDerivedConfig,\n ServerSetCookieRule,\n StrictMode,\n} from './types/config';\nexport { Locales } from './types/locales';\nexport type { LocalesValues } from './types/locales';\nexport { ESMxCJSRequire } from './utils/ESMxCJSRequire';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAA0B;AAC1B,8BAGO;AACP,0BAMO;AACP,+BAAkC;AAClC,8BAAiC;AACjC,oBAAuB;AACvB,0BAA6B;AAe7B,qBAAwB;AAExB,4BAA+B;","names":[]}
|
package/dist/cjs/logger.cjs
CHANGED
|
@@ -30,19 +30,20 @@ const logger = (content, details = {
|
|
|
30
30
|
const prefix = details.config?.prefix ?? "";
|
|
31
31
|
if (mode === "disabled") return;
|
|
32
32
|
if (details.isVerbose && mode !== "verbose") return;
|
|
33
|
+
const flatContent = [content].flat();
|
|
33
34
|
if (details.level === "debug") {
|
|
34
|
-
return console.debug(
|
|
35
|
+
return console.debug(prefix, ...flatContent);
|
|
35
36
|
}
|
|
36
37
|
if (details.level === "info") {
|
|
37
|
-
return console.info(
|
|
38
|
+
return console.info(prefix, ...flatContent);
|
|
38
39
|
}
|
|
39
40
|
if (details.level === "warn") {
|
|
40
|
-
return console.warn(
|
|
41
|
+
return console.warn(prefix, ...flatContent);
|
|
41
42
|
}
|
|
42
43
|
if (details.level === "error") {
|
|
43
|
-
return console.error(
|
|
44
|
+
return console.error(prefix, ...flatContent);
|
|
44
45
|
}
|
|
45
|
-
console.log(
|
|
46
|
+
console.log(prefix, ...flatContent);
|
|
46
47
|
};
|
|
47
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
49
|
0 && (module.exports = {
|
package/dist/cjs/logger.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/logger.ts"],"sourcesContent":["import type { IntlayerConfig } from './types/config';\n\nexport type Details = {\n isVerbose?: boolean;\n level?: 'info' | 'warn' | 'error' | 'debug';\n config?: Partial<IntlayerConfig['log']>;\n};\n\nexport type Logger = (content: any, details?: Details) => void;\n\nexport const logger: Logger = (\n content,\n details = {\n isVerbose: false,\n level: undefined,\n config: { mode: 'default', prefix: '' },\n }\n) => {\n const mode = details.config?.mode ?? 'default';\n const prefix = details.config?.prefix ?? '';\n\n if (mode === 'disabled') return;\n\n if (details.isVerbose && mode !== 'verbose') return;\n\n if (details.level === 'debug') {\n return console.debug(
|
|
1
|
+
{"version":3,"sources":["../../src/logger.ts"],"sourcesContent":["import type { IntlayerConfig } from './types/config';\n\nexport type Details = {\n isVerbose?: boolean;\n level?: 'info' | 'warn' | 'error' | 'debug';\n config?: Partial<IntlayerConfig['log']>;\n};\n\nexport type Logger = (content: any, details?: Details) => void;\n\nexport const logger: Logger = (\n content,\n details = {\n isVerbose: false,\n level: undefined,\n config: { mode: 'default', prefix: '' },\n }\n) => {\n const mode = details.config?.mode ?? 'default';\n const prefix = details.config?.prefix ?? '';\n\n if (mode === 'disabled') return;\n\n if (details.isVerbose && mode !== 'verbose') return;\n\n const flatContent = [content].flat();\n\n if (details.level === 'debug') {\n return console.debug(prefix, ...flatContent);\n }\n\n if (details.level === 'info') {\n return console.info(prefix, ...flatContent);\n }\n\n if (details.level === 'warn') {\n return console.warn(prefix, ...flatContent);\n }\n\n if (details.level === 'error') {\n return console.error(prefix, ...flatContent);\n }\n\n console.log(prefix, ...flatContent);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,SAAiB,CAC5B,SACA,UAAU;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ,EAAE,MAAM,WAAW,QAAQ,GAAG;AACxC,MACG;AACH,QAAM,OAAO,QAAQ,QAAQ,QAAQ;AACrC,QAAM,SAAS,QAAQ,QAAQ,UAAU;AAEzC,MAAI,SAAS,WAAY;AAEzB,MAAI,QAAQ,aAAa,SAAS,UAAW;AAE7C,QAAM,cAAc,CAAC,OAAO,EAAE,KAAK;AAEnC,MAAI,QAAQ,UAAU,SAAS;AAC7B,WAAO,QAAQ,MAAM,QAAQ,GAAG,WAAW;AAAA,EAC7C;AAEA,MAAI,QAAQ,UAAU,QAAQ;AAC5B,WAAO,QAAQ,KAAK,QAAQ,GAAG,WAAW;AAAA,EAC5C;AAEA,MAAI,QAAQ,UAAU,QAAQ;AAC5B,WAAO,QAAQ,KAAK,QAAQ,GAAG,WAAW;AAAA,EAC5C;AAEA,MAAI,QAAQ,UAAU,SAAS;AAC7B,WAAO,QAAQ,MAAM,QAAQ,GAAG,WAAW;AAAA,EAC7C;AAEA,UAAQ,IAAI,QAAQ,GAAG,WAAW;AACpC;","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var retryManager_exports = {};
|
|
20
|
+
__export(retryManager_exports, {
|
|
21
|
+
retryManager: () => retryManager
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(retryManager_exports);
|
|
24
|
+
var import_logger = require('./logger.cjs');
|
|
25
|
+
const DEFAULT_MAX_RETRY = 3;
|
|
26
|
+
const DEFAULT_DELAY = 6e4;
|
|
27
|
+
const retryManager = (fn, {
|
|
28
|
+
maxRetry = DEFAULT_MAX_RETRY,
|
|
29
|
+
delay = DEFAULT_DELAY,
|
|
30
|
+
onError
|
|
31
|
+
} = {}) => (
|
|
32
|
+
// ───────────────────────────────^ returned wrapper function
|
|
33
|
+
async (...args) => {
|
|
34
|
+
for (let attempt = 0; ; attempt++) {
|
|
35
|
+
try {
|
|
36
|
+
return await fn(...args);
|
|
37
|
+
} catch (err) {
|
|
38
|
+
onError?.(err);
|
|
39
|
+
(0, import_logger.logger)(["Request failed", err], {
|
|
40
|
+
level: "error"
|
|
41
|
+
});
|
|
42
|
+
if (attempt >= maxRetry) throw err;
|
|
43
|
+
if (delay > 0) await new Promise((res) => setTimeout(res, delay));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
retryManager
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=retryManager.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/retryManager.ts"],"sourcesContent":["import { logger } from './logger';\n\nexport type RetryManagerOptions = {\n /** maximum number of retries before giving up */\n maxRetry?: number;\n /** delay between attempts, in milliseconds */\n delay?: number;\n /** function to call when an error occurs */\n onError?: (err: Error) => void;\n};\n\nconst DEFAULT_MAX_RETRY = 3;\nconst DEFAULT_DELAY = 60_000; // 60 seconds\n\n/**\n * Wrap an async function `fn` so it’s retried on failure.\n *\n * @param fn The async function to wrap\n * @param options { maxRetry, delay }\n * @returns A new function with the same signature as `fn`\n */\nexport const retryManager =\n <Args extends any[], R>(\n fn: (...args: Args) => Promise<R>,\n {\n maxRetry = DEFAULT_MAX_RETRY,\n delay = DEFAULT_DELAY,\n onError,\n }: RetryManagerOptions = {}\n ): ((...args: Args) => Promise<R>) =>\n // ───────────────────────────────^ returned wrapper function\n async (...args: Args): Promise<R> => {\n for (let attempt = 0; ; attempt++) {\n try {\n return await fn(...args);\n } catch (err) {\n onError?.(err as Error);\n logger(['Request failed', err], {\n level: 'error',\n });\n if (attempt >= maxRetry) throw err; // out of retries\n if (delay > 0) await new Promise((res) => setTimeout(res, delay));\n }\n }\n };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAWvB,MAAM,oBAAoB;AAC1B,MAAM,gBAAgB;AASf,MAAM,eACX,CACE,IACA;AAAA,EACE,WAAW;AAAA,EACX,QAAQ;AAAA,EACR;AACF,IAAyB,CAAC;AAAA;AAAA,EAG5B,UAAU,SAA2B;AACnC,aAAS,UAAU,KAAK,WAAW;AACjC,UAAI;AACF,eAAO,MAAM,GAAG,GAAG,IAAI;AAAA,MACzB,SAAS,KAAK;AACZ,kBAAU,GAAY;AACtB,kCAAO,CAAC,kBAAkB,GAAG,GAAG;AAAA,UAC9B,OAAO;AAAA,QACT,CAAC;AACD,YAAI,WAAW,SAAU,OAAM;AAC/B,YAAI,QAAQ,EAAG,OAAM,IAAI,QAAQ,CAAC,QAAQ,WAAW,KAAK,KAAK,CAAC;AAAA,MAClE;AAAA,IACF;AAAA,EACF;AAAA;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/types/config.ts"],"sourcesContent":["import type { Locales } from './locales';\n\nexport type StrictMode = 'strict' | 'inclusive' | 'loose';\n\n/**\n * Configuration for internationalization settings\n */\nexport type InternationalizationConfig = {\n /**\n * Locales available in the application\n *\n * Default: [Locales.ENGLISH]\n *\n * You can define a list of available locales to support in the application.\n */\n locales: Locales[];\n\n /**\n * Locales required by TypeScript to ensure strong implementations of internationalized content using typescript.\n *\n * Default: []\n *\n * If empty, all locales are required in `strict` mode.\n *\n * Ensure required locales are also defined in the `locales` field.\n */\n requiredLocales: Locales[];\n\n /**\n * Ensure strong implementations of internationalized content using typescript.\n * - If set to \"strict\", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.\n * - If set to \"inclusive\", the translation `t` function will require each declared locales to be defined. If one locale is missing, it will throw a warning. But will accept if a locale is not declared in your config, but exist.\n * - If set to \"loose\", the translation `t` function will accept any existing locale.\n *\n * Default: \"inclusive\"\n */\n strictMode: StrictMode;\n\n /**\n * Default locale of the application for fallback\n *\n * Default: Locales.ENGLISH\n *\n * Used to specify a fallback locale in case no other locale is set.\n */\n defaultLocale: Locales;\n};\n\nexport type ServerSetCookieRule = 'always' | 'never';\n\n/**\n * Configuration for middleware behaviors\n */\nexport type MiddlewareConfig = {\n /**\n * Header name to get the locale from the request\n *\n * Default: 'x-intlayer-locale'\n *\n * The HTTP header key used to determine the current locale.\n */\n headerName: string;\n\n /**\n * Cookie name to store the locale information\n *\n * Default: 'INTLAYER_LOCALE'\n *\n * The cookie key where the locale information is stored.\n */\n cookieName: string;\n\n /**\n * Prefix default prefix the default locale to the path as other locales.\n *\n * Example with prefixDefault = true and defaultLocale = 'en':\n * path = /en/dashboard or /fr/dashboard\n *\n * Example with prefixDefault = false and defaultLocale = 'en':\n * path = /dashboard or /fr/dashboard\n *\n *\n * Default: false\n */\n prefixDefault: boolean;\n\n /**\n * Base path for application URLs\n *\n * Default: ''\n *\n * Defines the base path where the application is accessible from.\n */\n basePath: string;\n\n /**\n * Strategy for setting the locale cookie on the server\n *\n * Default: 'always'\n *\n * This setting controls when the server sets the locale cookie. It can either set the cookie on every request or never set it.\n */\n serverSetCookie: ServerSetCookieRule;\n\n /**\n * Indicates if no prefix should be used in the URL for locale\n *\n * Default: false\n *\n * If true, no locale-based prefix is used in the URL.\n */\n noPrefix: boolean;\n};\n\n/**\n * Configuration for intlayer editor\n */\nexport type EditorConfig = {\n /**\n * URL of the application. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n applicationURL: string;\n\n /**\n * URL of the editor server. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: 'http://localhost:8000'\n */\n editorURL: string;\n\n /**\n * URL of the CMS server. Used to restrict the origin of the editor for security reasons.\n *\n * Default: 'https://intlayer.org'\n */\n cmsURL: string;\n\n /**\n * URL of the backend\n *\n * Default: 'https://back.intlayer.org'\n *\n * The URL of the backend server.\n */\n backendURL: string;\n\n /**\n * Indicates if the application interact with the visual editor\n *\n * Default: true;\n *\n * If true, the editor will be able to interact with the application.\n * If false, the editor will not be able to interact with the application.\n * In any case, the editor can only be enabled by the visual editor.\n * Disabling the editor for specific environments is a way to enforce the security.\n *\n * Usage:\n * ```js\n * {\n * // Other configurations\n * editor: {\n * enabled: process.env.NODE_ENV !== 'production',\n * }\n * };\n * ```\n *\n */\n enabled: boolean;\n\n /** Port of the editor server\n *\n * Default: 8000\n */\n port: number;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientId?: string;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientSecret?: string;\n\n /**\n * Strategy for prioritizing dictionaries. If a dictionary is both present online and locally, the content will be merge.\n * However, is a field is defined in both dictionary, this setting determines which fields takes the priority over the other.\n *\n * Default: 'local_first'\n *\n * The strategy for prioritizing dictionaries. It can be either 'local_first' or 'distant_first'.\n * - 'local_first': The first dictionary found in the locale is used.\n * - 'distant_first': The first dictionary found in the distant locales is used.\n */\n dictionaryPriorityStrategy: 'local_first' | 'distant_first';\n\n /**\n * Indicates if the application should hot reload the locale configurations when a change is detected.\n * For example, when a new dictionary is added or updated, the application will update the content tu display in the page.\n *\n * The hot reload is only available for clients of the `enterprise` plan.\n *\n * Default: false\n */\n hotReload: boolean;\n\n /**\n * OpenAI API key\n *\n * Use your own OpenAI API key to use the AI features of Intlayer.\n * If you don't have an OpenAI API key, you can get one for free at https://openai.com/api/.\n *\n * Default: ''\n */\n openAiApiKey: string;\n\n /**\n * OpenAI API model\n *\n * The model to use for the AI features of Intlayer.\n *\n * Default: 'gpt-4o-2024-11-20'\n *\n * > Necessitate to define openAiApiKey to use this model\n */\n openAiApiModel: string;\n\n /**\n * OpenAI API temperature\n *\n * The temperature to use for the AI features of Intlayer.\n * The temperature controls the randomness of the AI's responses.\n * A higher temperature will make the AI more creative and less predictable.\n *\n * Default: 0.1\n */\n openAiApiTemperature: number;\n};\n\n/**\n * Custom configuration that can be provided to override default settings\n */\nexport type CustomIntlayerConfig = {\n /**\n * Custom internationalization configuration\n */\n internationalization?: Partial<InternationalizationConfig>;\n\n /**\n * Custom middleware configuration\n */\n middleware?: Partial<MiddlewareConfig>;\n\n /**\n * Custom content configuration\n */\n content?: Partial<ContentConfig>;\n\n /**\n * Custom editor configuration\n */\n editor?: Partial<EditorConfig>;\n\n /**\n * Custom middleware configuration\n */\n log?: Partial<LogConfig>;\n};\n\n/**\n * Combined configuration for internationalization, middleware, and content\n */\nexport type IntlayerConfig = {\n /**\n * Internationalization configuration\n */\n internationalization: InternationalizationConfig;\n\n /**\n * Middleware configuration\n */\n middleware: MiddlewareConfig;\n\n /**\n * Content configuration\n */\n content: ContentConfig;\n\n /**\n * Intlayer editor configuration\n */\n editor: EditorConfig;\n\n /**\n * Logger configuration\n */\n log: LogConfig;\n};\n\n/**\n * Base configuration for content handling\n */\nexport type BaseContentConfig = {\n /**\n * File extensions of content to look for\n *\n * Default: ['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.tsx', '.content.jsx']\n *\n * List of file extensions to scan for content.\n */\n fileExtensions: string[];\n\n /**\n * Absolute path of the project's base directory\n *\n * Default: process.cwd()\n *\n * The root directory of the project, typically used for resolving other paths.\n */\n baseDir: string;\n\n /**\n * Name of the directory where the content is stored\n *\n * Default: 'src'\n *\n * Specifies the directory where the primary content is stored.\n */\n contentDirName: string;\n\n /**\n * Directories to be excluded from content processing\n *\n * Default: ['node_modules']\n *\n * A list of directories to exclude from content processing.\n */\n excludedPath: string[];\n\n /**\n * Name of the directory where results are stored\n *\n * Default: '.intlayer'\n *\n * The directory for storing intermediate or output results.\n */\n resultDirName: string;\n\n /**\n * Name of the directory for module augmentation\n *\n * Default: 'types'\n *\n * Defines the directory for additional module types.\n */\n moduleAugmentationDirName: string;\n\n /**\n * Name of the directory where dictionaries are stored\n *\n * Default: 'dictionary'\n *\n * The directory for storing localization dictionaries.\n *\n * Note:\n * - Ensure the dictionaries output includes intlayer to build the dictionaries for intlayer\n */\n dictionariesDirName: string;\n\n /**\n * Name of the directory where dictionaries are stored\n *\n * Default: 'i18next_dictionary'\n *\n * The directory for storing localization dictionaries.\n *\n * Note:\n * - Ensure the dictionaries output includes 'i18next' to build the dictionaries for i18next\n */\n i18nextResourcesDirName: string;\n\n /**\n * Name of the directory where dictionaries are stored\n *\n * Default: 'react-intl_dictionary'\n *\n * The directory for storing localization dictionaries.\n *\n * Note:\n * - Ensure the dictionaries output includes 'react-intl' to build the dictionaries for react-intl\n */\n reactIntlMessagesDirName: string;\n\n /**\n * Name of the directory where dictionary types are stored\n *\n * Default: 'types'\n *\n * The directory for storing dictionary type definitions.\n */\n typeDirName: string;\n\n /**\n * Name of the directory where the main files are stored\n *\n * Default: 'main'\n *\n * Specifies the directory for storing main application files.\n */\n mainDirName: string;\n\n /**\n * Name of the directory where the configuration files are stored\n *\n * Default: 'config'\n *\n * Specifies the directory for storing configuration files.\n */\n configDirName: string;\n\n /**\n * Indicates if Intlayer should watch for changes in the content declaration files in the app to rebuild the related dictionaries.\n *\n * Default: process.env.NODE_ENV === 'development'\n */\n watch: boolean;\n};\n\nexport type DictionaryOutput = 'intlayer' | 'i18next' | 'react-intl';\n\n/**\n * Configuration derived based on the base content configuration\n */\nexport type BaseDerivedConfig = {\n /**\n * Directory where the content is stored, relative to the base directory\n *\n * Default: {{baseDir}} / {{contentDirName}}\n *\n * Derived content directory based on the base configuration.\n */\n contentDir: string;\n\n /**\n * Directory where the results are stored, relative to the base directory\n *\n * Default: {{baseDir}} / {{resultDirName}}\n *\n * Derived results directory based on the base configuration.\n */\n resultDir: string;\n\n /**\n * Directory for module augmentation, relative to the base directory\n *\n * Default: {{baseDir}} / {{moduleAugmentationDirName}}\n *\n * Defines the derived path for module augmentation.\n */\n moduleAugmentationDir: string;\n\n /**\n * Type of dictionary to use as an output\n *\n * Default: ['intlayer']\n *\n * The type of dictionary to use as an output. It can be either 'intlayer' or 'i18next'.\n *\n * Note:\n * - 'i18next' is not yet ensure a 1:1 mapping with the i18next library.\n * - Removing 'intlayer' will break the compatibility with react-intlayer or next-intlayer\n *\n */\n dictionaryOutput: DictionaryOutput[];\n};\n\n/**\n * Configuration derived based on the result directory\n */\nexport type ResultDirDerivedConfig = {\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{dictionariesDirName}}\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n */\n dictionariesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{i18nextResourcesDirName}}\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the i18n dictionaries output includes i18next to build the dictionaries for i18next\n */\n i18nextResourcesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{reactIntlMessagesDirName}}\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the dictionaries output includes 'react-intl' to build the dictionaries for react-intl\n */\n reactIntlMessagesDir: string;\n\n /**\n * Directory where dictionary types are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{typeDirName}}\n *\n * Specifies the derived path for dictionary types relative to the result directory.\n */\n typesDir: string;\n\n /**\n * Directory where the main files are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{mainDirName}}\n *\n * Specifies the derived path for the main files relative to the result directory.\n */\n mainDir: string;\n\n /**\n * Directory where the configuration files are stored, relative to the result directory\n *\n * Default: {{resultDir}} / {{configDirName}}\n *\n * Specifies the derived path for the configuration files relative to the result directory.\n */\n configDir: string;\n};\n\n/**\n * Configuration for content patterns\n */\nexport type PatternsContentConfig = {\n /**\n * Patterns of files to watch for changes\n *\n * Default: ['/**\\/*.content.ts', '/**\\/*.content.js', '/**\\/*.content.json', '/**\\/*.content.cjs', '/**\\/*.content.mjs', '/**\\/*.content.tsx', '/**\\/*.content.jsx']\n *\n * Defines file patterns for content to watch for changes.\n */\n watchedFilesPattern: string[];\n\n /**\n * Patterns of files to watch for changes including the relative path\n *\n * Default: ['{{contentDir}}/**\\/*.content.ts', '{{contentDir}}/**\\/*.content.js', '{{contentDir}}/**\\/*.content.json', '{{contentDir}}/**\\/*.content.cjs', '{{contentDir}}/**\\/*.content.mjs', '{{contentDir}}/**\\/*.content.tsx', '{{contentDir}}/**\\/*.content.jsx']\n *\n * Specifies the file patterns for content to watch, including relative paths.\n */\n watchedFilesPatternWithPath: string[];\n\n /**\n * Pattern for output files including the relative path\n *\n * Default: '{{dictionariesDir}}/**\\/*.json'\n *\n * Defines the pattern for output files, including the relative path.\n */\n outputFilesPatternWithPath: string;\n};\n\n// @TODO: Implement exclusion of non configurable fields, to not allow them to be set in the config\n/**\n * General configuration derived from the config file\n */\nexport type ContentConfig = BaseContentConfig &\n BaseDerivedConfig &\n ResultDirDerivedConfig &\n PatternsContentConfig;\n\nexport type LogConfig = {\n /**\n * Indicates if the logger is enabled\n *\n * Default: true\n *\n * If 'default', the logger is enabled and can be used.\n * If 'verbose', the logger will be enabled and can be used, but will log more information.\n * If 'disabled', the logger is disabled and cannot be used.\n */\n mode: 'default' | 'verbose' | 'disabled';\n\n /**\n * Prefix of the logger\n *\n * Default: '[intlayer]'\n *\n * The prefix of the logger.\n */\n prefix: string;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/types/config.ts"],"sourcesContent":["import type { Locales } from './locales';\n\nexport type StrictMode = 'strict' | 'inclusive' | 'loose';\n\n/**\n * Configuration for internationalization settings\n */\nexport type InternationalizationConfig = {\n /**\n * Locales available in the application\n *\n * Default: [Locales.ENGLISH]\n *\n * You can define a list of available locales to support in the application.\n */\n locales: Locales[];\n\n /**\n * Locales required by TypeScript to ensure strong implementations of internationalized content using typescript.\n *\n * Default: []\n *\n * If empty, all locales are required in `strict` mode.\n *\n * Ensure required locales are also defined in the `locales` field.\n */\n requiredLocales: Locales[];\n\n /**\n * Ensure strong implementations of internationalized content using typescript.\n * - If set to \"strict\", the translation `t` function will require each declared locales to be defined. If one locale is missing, or if a locale is not declared in your config, it will throw an error.\n * - If set to \"inclusive\", the translation `t` function will require each declared locales to be defined. If one locale is missing, it will throw a warning. But will accept if a locale is not declared in your config, but exist.\n * - If set to \"loose\", the translation `t` function will accept any existing locale.\n *\n * Default: \"inclusive\"\n */\n strictMode: StrictMode;\n\n /**\n * Default locale of the application for fallback\n *\n * Default: Locales.ENGLISH\n *\n * Used to specify a fallback locale in case no other locale is set.\n */\n defaultLocale: Locales;\n};\n\nexport type ServerSetCookieRule = 'always' | 'never';\n\n/**\n * Configuration for middleware behaviors\n */\nexport type MiddlewareConfig = {\n /**\n * Header name to get the locale from the request\n *\n * Default: 'x-intlayer-locale'\n *\n * The HTTP header key used to determine the current locale.\n */\n headerName: string;\n\n /**\n * Cookie name to store the locale information\n *\n * Default: 'INTLAYER_LOCALE'\n *\n * The cookie key where the locale information is stored.\n */\n cookieName: string;\n\n /**\n * Prefix default prefix the default locale to the path as other locales.\n *\n * Example with prefixDefault = true and defaultLocale = 'en':\n * path = /en/dashboard or /fr/dashboard\n *\n * Example with prefixDefault = false and defaultLocale = 'en':\n * path = /dashboard or /fr/dashboard\n *\n *\n * Default: false\n */\n prefixDefault: boolean;\n\n /**\n * Base path for application URLs\n *\n * Default: ''\n *\n * Defines the base path where the application is accessible from.\n */\n basePath: string;\n\n /**\n * Strategy for setting the locale cookie on the server\n *\n * Default: 'always'\n *\n * This setting controls when the server sets the locale cookie. It can either set the cookie on every request or never set it.\n */\n serverSetCookie: ServerSetCookieRule;\n\n /**\n * Indicates if no prefix should be used in the URL for locale\n *\n * Default: false\n *\n * If true, no locale-based prefix is used in the URL.\n */\n noPrefix: boolean;\n};\n\n/**\n * Configuration for intlayer editor\n */\nexport type EditorConfig = {\n /**\n * URL of the application. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: '*'\n */\n applicationURL: string;\n\n /**\n * URL of the editor server. Used to restrict the origin of the editor for security reasons.\n *\n * > '*' means that the editor is accessible from any origin\n *\n * Default: 'http://localhost:8000'\n */\n editorURL: string;\n\n /**\n * URL of the CMS server. Used to restrict the origin of the editor for security reasons.\n *\n * Default: 'https://intlayer.org'\n */\n cmsURL: string;\n\n /**\n * URL of the backend\n *\n * Default: 'https://back.intlayer.org'\n *\n * The URL of the backend server.\n */\n backendURL: string;\n\n /**\n * Indicates if the application interact with the visual editor\n *\n * Default: true;\n *\n * If true, the editor will be able to interact with the application.\n * If false, the editor will not be able to interact with the application.\n * In any case, the editor can only be enabled by the visual editor.\n * Disabling the editor for specific environments is a way to enforce the security.\n *\n * Usage:\n * ```js\n * {\n * // Other configurations\n * editor: {\n * enabled: process.env.NODE_ENV !== 'production',\n * }\n * };\n * ```\n *\n */\n enabled: boolean;\n\n /** Port of the editor server\n *\n * Default: 8000\n */\n port: number;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientId?: string;\n\n /**\n * clientId and clientSecret allow the intlayer packages to authenticate with the backend using oAuth2 authentication.\n * An access token is use to authenticate the user related to the project.\n * To get an access token, go to https://intlayer.org/dashboard/project and create an account.\n *\n * Default: undefined\n *\n * > Important: The clientId and clientSecret should be kept secret and not shared publicly. Please ensure to keep them in a secure location, such as environment variables.\n */\n clientSecret?: string;\n\n /**\n * Strategy for prioritizing dictionaries. If a dictionary is both present online and locally, the content will be merge.\n * However, is a field is defined in both dictionary, this setting determines which fields takes the priority over the other.\n *\n * Default: 'local_first'\n *\n * The strategy for prioritizing dictionaries. It can be either 'local_first' or 'distant_first'.\n * - 'local_first': The first dictionary found in the locale is used.\n * - 'distant_first': The first dictionary found in the distant locales is used.\n */\n dictionaryPriorityStrategy: 'local_first' | 'distant_first';\n\n /**\n * Indicates if the application should hot reload the locale configurations when a change is detected.\n * For example, when a new dictionary is added or updated, the application will update the content tu display in the page.\n *\n * The hot reload is only available for clients of the `enterprise` plan.\n *\n * Default: false\n */\n hotReload: boolean;\n};\n\nexport type AiConfig = {\n /**\n * Provider\n *\n * The provider to use for the AI features of Intlayer.\n *\n * Available providers:\n * - 'openai'\n * - 'anthropic'\n * - 'mistral'\n * - 'deepseek'\n * - 'gemini'\n *\n * Default: 'openai'\n */\n provider?: string;\n\n /**\n * API model\n *\n * The model to use for the AI features of Intlayer.\n *\n * Example: 'gpt-4o-2024-11-20'\n *\n */\n model?: string;\n\n /**\n * temperature\n *\n * The temperature to use for the AI features of Intlayer.\n * The temperature controls the randomness of the AI's responses.\n * A higher temperature will make the AI more creative and less predictable.\n *\n * Example: 0.1\n */\n temperature?: number;\n\n /**\n * API key\n *\n * Use your own OpenAI API key to use the AI features of Intlayer.\n * If you don't have an OpenAI API key, you can get one for free at https://openai.com/api/.\n *\n */\n apiKey?: string;\n\n /**\n * Application context\n *\n * The context of the application to use for the AI features of Intlayer.\n *\n * Example: 'This is a website for a company that sells products online.'\n */\n applicationContext?: string;\n};\n\n/**\n * Custom configuration that can be provided to override default settings\n */\nexport type CustomIntlayerConfig = {\n /**\n * Custom internationalization configuration\n */\n internationalization?: Partial<InternationalizationConfig>;\n\n /**\n * Custom middleware configuration\n */\n middleware?: Partial<MiddlewareConfig>;\n\n /**\n * Custom content configuration\n */\n content?: Partial<ContentConfig>;\n\n /**\n * Custom editor configuration\n */\n editor?: Partial<EditorConfig>;\n\n /**\n * Custom middleware configuration\n */\n log?: Partial<LogConfig>;\n\n /**\n * Custom AI configuration\n */\n ai?: Partial<AiConfig>;\n};\n\n/**\n * Combined configuration for internationalization, middleware, and content\n */\nexport type IntlayerConfig = {\n /**\n * Internationalization configuration\n */\n internationalization: InternationalizationConfig;\n\n /**\n * Middleware configuration\n */\n middleware: MiddlewareConfig;\n\n /**\n * Content configuration\n */\n content: ContentConfig;\n\n /**\n * Intlayer editor configuration\n */\n editor: EditorConfig;\n\n /**\n * Logger configuration\n */\n log: LogConfig;\n\n /**\n * AI configuration\n */\n ai?: Partial<AiConfig>;\n};\n\n/**\n * Base configuration for content handling\n */\nexport type BaseContentConfig = {\n /**\n * File extensions of content to look for\n *\n * Default: ['.content.ts', '.content.js', '.content.cjs', '.content.mjs', '.content.json', '.content.tsx', '.content.jsx']\n *\n * List of file extensions to scan for content.\n */\n fileExtensions: string[];\n\n /**\n * Absolute path of the project's base directory\n *\n * Default: process.cwd()\n *\n * The root directory of the project, typically used for resolving other paths.\n */\n baseDir: string;\n\n /**\n * Directories to be excluded from content processing\n *\n * Default: ['node_modules']\n *\n * A list of directories to exclude from content processing.\n */\n excludedPath: string[];\n\n /**\n * Indicates if Intlayer should watch for changes in the content declaration files in the app to rebuild the related dictionaries.\n *\n * Default: process.env.NODE_ENV === 'development'\n */\n watch: boolean;\n};\n\nexport type DictionaryOutput = 'intlayer' | 'i18next' | 'react-intl';\n\n/**\n * Configuration derived based on the base content configuration\n */\nexport type BaseDerivedConfig = {\n /**\n * Directory where the content is stored, relative to the base directory\n *\n * Default: ['src']\n *\n * Derived content directory based on the base configuration.\n */\n contentDir: string[];\n\n /**\n * Directory where the results are stored, relative to the base directory\n *\n * Default: .intlayer/dictionary\n *\n * Derived results directory based on the base configuration.\n */\n dictionariesDir: string;\n\n /**\n * Directory for module augmentation, relative to the base directory\n *\n * Default: .intlayer/types\n *\n * Defines the derived path for module augmentation.\n */\n moduleAugmentationDir: string;\n\n /**\n * Type of dictionary to use as an output\n *\n * Default: ['intlayer']\n *\n * The type of dictionary to use as an output. It can be either 'intlayer' or 'i18next'.\n *\n * Note:\n * - 'i18next' is not yet ensure a 1:1 mapping with the i18next library.\n * - Removing 'intlayer' will break the compatibility with react-intlayer or next-intlayer\n *\n */\n dictionaryOutput: DictionaryOutput[];\n};\n\n/**\n * Configuration derived based on the result directory\n */\nexport type ResultDirDerivedConfig = {\n /**\n * Directory where unmerged dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/unmerged_dictionary\n *\n * Specifies the derived path for unmerged dictionaries relative to the result directory.\n */\n unmergedDictionariesDir: string;\n\n /**\n * Directory where final dictionaries are stored, relative to the result directory\n *\n * Default: .intlayer/dictionary\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n */\n dictionariesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: i18next_resources\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the i18n dictionaries output includes i18next to build the dictionaries for i18next\n */\n i18nextResourcesDir: string;\n\n /**\n * Directory where dictionaries are stored, relative to the result directory\n *\n * Default: intl_messages\n *\n * Specifies the derived path for dictionaries relative to the result directory.\n *\n * Note:\n * - Ensure the dictionaries output includes 'react-intl' to build the dictionaries for react-intl\n */\n reactIntlMessagesDir: string;\n\n /**\n * Directory where dictionary types are stored, relative to the result directory\n *\n * Default: .intlayer/types\n *\n * Specifies the derived path for dictionary types relative to the result directory.\n */\n typesDir: string;\n\n /**\n * Directory where the main files are stored, relative to the result directory\n *\n * Default: .intlayer/main\n *\n * Specifies the derived path for the main files relative to the result directory.\n */\n mainDir: string;\n\n /**\n * Directory where the configuration files are stored, relative to the result directory\n *\n * Default: .intlayer/config\n *\n * Specifies the derived path for the configuration files relative to the result directory.\n */\n configDir: string;\n};\n\n/**\n * Configuration for content patterns\n */\nexport type PatternsContentConfig = {\n /**\n * Patterns of files to watch for changes\n *\n * Default: ['/**\\/*.content.ts', '/**\\/*.content.js', '/**\\/*.content.json', '/**\\/*.content.cjs', '/**\\/*.content.mjs', '/**\\/*.content.tsx', '/**\\/*.content.jsx']\n *\n * Defines file patterns for content to watch for changes.\n */\n watchedFilesPattern: string[];\n\n /**\n * Patterns of files to watch for changes including the relative path\n *\n * Default: ['src/**\\/*.content.ts', 'src/**\\/*.content.js', 'src/**\\/*.content.json', 'src/**\\/*.content.cjs', 'src/**\\/*.content.mjs', 'src/**\\/*.content.tsx', 'src/**\\/*.content.jsx']\n *\n * Specifies the file patterns for content to watch, including relative paths.\n */\n watchedFilesPatternWithPath: string[];\n\n /**\n * Pattern for output files including the relative path\n *\n * Default: '{{dictionariesDir}}/**\\/*.json'\n *\n * Defines the pattern for output files, including the relative path.\n */\n outputFilesPatternWithPath: string;\n};\n\n// @TODO: Implement exclusion of non configurable fields, to not allow them to be set in the config\n/**\n * General configuration derived from the config file\n */\nexport type ContentConfig = BaseContentConfig &\n BaseDerivedConfig &\n ResultDirDerivedConfig &\n PatternsContentConfig;\n\nexport type LogConfig = {\n /**\n * Indicates if the logger is enabled\n *\n * Default: true\n *\n * If 'default', the logger is enabled and can be used.\n * If 'verbose', the logger will be enabled and can be used, but will log more information.\n * If 'disabled', the logger is disabled and cannot be used.\n */\n mode: 'default' | 'verbose' | 'disabled';\n\n /**\n * Prefix of the logger\n *\n * Default: '[intlayer]'\n *\n * The prefix of the logger.\n */\n prefix: string;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|