@intlayer/config 7.6.0-canary.0 → 7.6.0-canary.1
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/client.cjs +2 -0
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/logger.cjs +11 -1
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/esm/client.mjs +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/logger.mjs +10 -2
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/types/client.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/logger.d.ts +3 -1
- package/dist/types/logger.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/cjs/client.cjs
CHANGED
|
@@ -26,11 +26,13 @@ exports.colorizeNumber = require_logger.colorizeNumber;
|
|
|
26
26
|
exports.colorizePath = require_logger.colorizePath;
|
|
27
27
|
exports.extractErrorMessage = require_utils_extractErrorMessage.extractErrorMessage;
|
|
28
28
|
exports.getAppLogger = require_logger.getAppLogger;
|
|
29
|
+
exports.getPrefix = require_logger.getPrefix;
|
|
29
30
|
exports.kebabCaseToCamelCase = require_utils_stringFormatter_kebabCaseToCamelCase.kebabCaseToCamelCase;
|
|
30
31
|
exports.logStack = require_utils_logStack.logStack;
|
|
31
32
|
exports.logger = require_logger.logger;
|
|
32
33
|
exports.normalizePath = require_utils_normalizePath.normalizePath;
|
|
33
34
|
exports.removeColor = require_logger.removeColor;
|
|
35
|
+
exports.setPrefix = require_logger.setPrefix;
|
|
34
36
|
exports.spinnerFrames = require_logger.spinnerFrames;
|
|
35
37
|
exports.toLowerCamelCase = require_utils_stringFormatter_toLowerCamelCase.toLowerCamelCase;
|
|
36
38
|
exports.v = require_logger.v;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -59,6 +59,7 @@ exports.getConfigurationAndFilePath = require_configFile_getConfiguration.getCon
|
|
|
59
59
|
exports.getEnvFilePath = require_loadEnvFile.getEnvFilePath;
|
|
60
60
|
exports.getExtension = require_utils_getExtension.getExtension;
|
|
61
61
|
exports.getPackageJsonPath = require_utils_getPackageJsonPath.getPackageJsonPath;
|
|
62
|
+
exports.getPrefix = require_logger.getPrefix;
|
|
62
63
|
exports.getProjectRequire = require_utils_ESMxCJSHelpers.getProjectRequire;
|
|
63
64
|
exports.isESModule = require_utils_ESMxCJSHelpers.isESModule;
|
|
64
65
|
exports.kebabCaseToCamelCase = require_utils_stringFormatter_kebabCaseToCamelCase.kebabCaseToCamelCase;
|
|
@@ -72,6 +73,7 @@ exports.parseFileContent = require_loadExternalFile_parseFileContent.parseFileCo
|
|
|
72
73
|
exports.removeColor = require_logger.removeColor;
|
|
73
74
|
exports.retryManager = require_retryManager.retryManager;
|
|
74
75
|
exports.searchConfigurationFile = require_configFile_searchConfigurationFile.searchConfigurationFile;
|
|
76
|
+
exports.setPrefix = require_logger.setPrefix;
|
|
75
77
|
exports.spinnerFrames = require_logger.spinnerFrames;
|
|
76
78
|
exports.toLowerCamelCase = require_utils_stringFormatter_toLowerCamelCase.toLowerCamelCase;
|
|
77
79
|
exports.v = require_logger.v;
|
package/dist/cjs/logger.cjs
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/logger.ts
|
|
3
|
+
let loggerPrefix;
|
|
4
|
+
const setPrefix = (prefix) => {
|
|
5
|
+
loggerPrefix = prefix;
|
|
6
|
+
};
|
|
7
|
+
const getPrefix = (configPrefix) => {
|
|
8
|
+
if (typeof loggerPrefix !== "undefined") return loggerPrefix;
|
|
9
|
+
return configPrefix;
|
|
10
|
+
};
|
|
3
11
|
const logger = (content, details) => {
|
|
4
12
|
const isVerbose = details?.isVerbose ?? false;
|
|
5
13
|
const mode = details?.config?.mode ?? "default";
|
|
6
14
|
const level = details?.level ?? "info";
|
|
7
|
-
const prefix = details?.config?.prefix
|
|
15
|
+
const prefix = getPrefix(details?.config?.prefix);
|
|
8
16
|
const log = details?.config?.log ?? console.log;
|
|
9
17
|
const info = details?.config?.info ?? console.info;
|
|
10
18
|
const warn = details?.config?.warn ?? console.warn;
|
|
@@ -132,8 +140,10 @@ exports.colorizeLocales = colorizeLocales;
|
|
|
132
140
|
exports.colorizeNumber = colorizeNumber;
|
|
133
141
|
exports.colorizePath = colorizePath;
|
|
134
142
|
exports.getAppLogger = getAppLogger;
|
|
143
|
+
exports.getPrefix = getPrefix;
|
|
135
144
|
exports.logger = logger;
|
|
136
145
|
exports.removeColor = removeColor;
|
|
146
|
+
exports.setPrefix = setPrefix;
|
|
137
147
|
exports.spinnerFrames = spinnerFrames;
|
|
138
148
|
exports.v = v;
|
|
139
149
|
exports.x = x;
|
package/dist/cjs/logger.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.cjs","names":["color","text"],"sources":["../../src/logger.ts"],"sourcesContent":["import type { CustomIntlayerConfig, Locale } from '@intlayer/types';\n\nexport type Details = {\n isVerbose?: boolean;\n level?: 'info' | 'warn' | 'error' | 'debug';\n config?: CustomIntlayerConfig['log'];\n};\n\nexport type Logger = (content: any, details?: Details) => void;\n\nexport const logger: Logger = (content, details) => {\n const isVerbose = details?.isVerbose ?? false;\n const mode = details?.config?.mode ?? 'default';\n const level = details?.level ?? 'info';\n const prefix = details?.config?.prefix
|
|
1
|
+
{"version":3,"file":"logger.cjs","names":["color","text"],"sources":["../../src/logger.ts"],"sourcesContent":["import type { CustomIntlayerConfig, Locale } from '@intlayer/types';\n\nexport type Details = {\n isVerbose?: boolean;\n level?: 'info' | 'warn' | 'error' | 'debug';\n config?: CustomIntlayerConfig['log'];\n};\n\nexport type Logger = (content: any, details?: Details) => void;\n\nlet loggerPrefix: string | undefined;\n\nexport const setPrefix = (prefix: string | undefined) => {\n loggerPrefix = prefix;\n};\n\nexport const getPrefix = (configPrefix?: string): string | undefined => {\n if (typeof loggerPrefix !== 'undefined') {\n return loggerPrefix;\n }\n\n return configPrefix;\n};\n\nexport const logger: Logger = (content, details) => {\n const isVerbose = details?.isVerbose ?? false;\n const mode = details?.config?.mode ?? 'default';\n const level = details?.level ?? 'info';\n const prefix = getPrefix(details?.config?.prefix);\n const log = details?.config?.log ?? console.log;\n const info = details?.config?.info ?? console.info;\n const warn = details?.config?.warn ?? console.warn;\n const error = details?.config?.error ?? console.error;\n const debug = details?.config?.debug ?? console.debug;\n\n if (mode === 'disabled') return;\n\n if (isVerbose && mode !== 'verbose') return;\n\n const flatContent = prefix ? [prefix, ...[content].flat()] : [content].flat();\n\n if (level === 'debug') {\n return debug(...flatContent);\n }\n\n if (level === 'info') {\n return info(...flatContent);\n }\n\n if (level === 'warn') {\n return warn(...flatContent);\n }\n\n if (level === 'error') {\n return error(...flatContent);\n }\n\n log(...flatContent);\n};\n\nexport enum ANSIColors {\n RESET = '\\x1b[0m',\n GREY = '\\x1b[90m',\n GREY_DARK = '\\x1b[38;5;239m',\n GREY_LIGHT = '\\x1b[38;5;252m',\n BLUE = '\\x1b[34m',\n RED = '\\x1b[31m',\n GREEN = '\\x1b[32m',\n YELLOW = '\\x1b[38;5;226m',\n MAGENTA = '\\x1b[35m',\n BEIGE = '\\x1b[38;5;3m',\n ORANGE = '\\x1b[38;5;208m',\n CYAN = '\\x1b[36m',\n WHITE = '\\x1b[37m',\n BOLD = '\\x1b[1m',\n}\n\nexport const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];\n\n/**\n * The appLogger function takes the logger and merges it with the configuration from the intlayer config file.\n * It allows overriding the default configuration by passing a config object in the details parameter.\n * The configuration is merged with the default configuration from the intlayer config file.\n */\nexport const getAppLogger =\n (configuration?: CustomIntlayerConfig, globalDetails?: Details) =>\n (content: any, details?: Details) =>\n logger(content, {\n ...(details ?? {}),\n config: {\n ...configuration?.log,\n ...globalDetails?.config,\n ...(details?.config ?? {}),\n },\n });\n\nexport const colorize = (\n s: string,\n color?: ANSIColors,\n reset?: boolean | ANSIColors\n): string =>\n color\n ? `${color}${s}${reset ? (typeof reset === 'boolean' ? ANSIColors.RESET : reset) : ANSIColors.RESET}`\n : s;\n\nexport const colorizeLocales = (\n locales: Locale | Locale[],\n color = ANSIColors.GREEN,\n reset: boolean | ANSIColors = ANSIColors.RESET\n) =>\n [locales]\n .flat()\n .map((locale) => colorize(locale, color, reset))\n .join(`, `);\n\nexport const colorizeKey = (\n keyPath: string | string[],\n color = ANSIColors.BEIGE,\n reset: boolean | ANSIColors = ANSIColors.RESET\n) =>\n [keyPath]\n .flat()\n .map((key) => colorize(key, color, reset))\n .join(`, `);\n\nexport const colorizePath = (\n path: string | string[],\n color = ANSIColors.GREY,\n reset: boolean | ANSIColors = ANSIColors.RESET\n) =>\n [path]\n .flat()\n .map((p) => colorize(p, color, reset))\n .join(`, `);\n\n/**\n * Colorize numeric value using Intl.NumberFormat and optional ANSI colors.\n *\n * Examples:\n * colorizeNumber(2, [{ pluralRule: 'one' , color: ANSIColors.GREEN}, { pluralRule: 'other' , color: ANSIColors.RED}]) // \"'\\x1b[31m2\\x1b[0m\"\n */\nexport const colorizeNumber = (\n number: number | string,\n options: Partial<Record<Intl.LDMLPluralRule, ANSIColors>> = {\n zero: ANSIColors.BLUE,\n one: ANSIColors.BLUE,\n two: ANSIColors.BLUE,\n few: ANSIColors.BLUE,\n many: ANSIColors.BLUE,\n other: ANSIColors.BLUE,\n }\n): string => {\n if (number === 0) {\n const color = options.zero ?? ANSIColors.GREEN;\n return colorize(number.toString(), color);\n }\n\n const rule = new Intl.PluralRules('en').select(Number(number));\n const color = options[rule];\n return colorize(number.toString(), color);\n};\n\nexport const removeColor = (text: string) =>\n // biome-ignore lint/suspicious/noControlCharactersInRegex: we need to remove the color codes\n text.replace(/\\x1b\\[[0-9;]*m/g, '');\n\nconst getLength = (length: number | number[] | string | string[]): number => {\n let value: number = 0;\n if (typeof length === 'number') {\n value = length;\n }\n if (typeof length === 'string') {\n value = length.length;\n }\n if (Array.isArray(length) && length.every((l) => typeof l === 'string')) {\n value = Math.max(...length.map((str) => str.length));\n }\n if (Array.isArray(length) && length.every((l) => typeof l === 'number')) {\n value = Math.max(...length);\n }\n return Math.max(value, 0);\n};\n\nconst defaultColonOptions = {\n colSize: 0,\n minSize: 0,\n maxSize: Infinity,\n pad: 'right',\n padChar: '0',\n};\n\n/**\n * Create a string of spaces of a given length.\n *\n * @param colSize - The length of the string to create.\n * @returns A string of spaces.\n */\nexport const colon = (\n text: string | string[],\n options?: {\n colSize?: number | number[] | string | string[];\n minSize?: number;\n maxSize?: number;\n pad?: 'left' | 'right';\n padChar?: string;\n }\n): string =>\n [text]\n .flat()\n .map((text) => {\n const { colSize, minSize, maxSize, pad, padChar } = {\n ...defaultColonOptions,\n ...(options ?? {}),\n };\n\n const length = getLength(colSize);\n const spacesLength = Math.max(\n minSize!,\n Math.min(maxSize!, length - removeColor(text).length)\n );\n\n if (pad === 'left') {\n return `${' '.repeat(spacesLength)}${text}`;\n }\n\n return `${text}${' '.repeat(spacesLength)}`;\n })\n .join('');\n\nexport const x = colorize('✗', ANSIColors.RED);\nexport const v = colorize('✓', ANSIColors.GREEN);\nexport const clock = colorize('⏲', ANSIColors.BLUE);\n"],"mappings":";;AAUA,IAAI;AAEJ,MAAa,aAAa,WAA+B;AACvD,gBAAe;;AAGjB,MAAa,aAAa,iBAA8C;AACtE,KAAI,OAAO,iBAAiB,YAC1B,QAAO;AAGT,QAAO;;AAGT,MAAa,UAAkB,SAAS,YAAY;CAClD,MAAM,YAAY,SAAS,aAAa;CACxC,MAAM,OAAO,SAAS,QAAQ,QAAQ;CACtC,MAAM,QAAQ,SAAS,SAAS;CAChC,MAAM,SAAS,UAAU,SAAS,QAAQ,OAAO;CACjD,MAAM,MAAM,SAAS,QAAQ,OAAO,QAAQ;CAC5C,MAAM,OAAO,SAAS,QAAQ,QAAQ,QAAQ;CAC9C,MAAM,OAAO,SAAS,QAAQ,QAAQ,QAAQ;CAC9C,MAAM,QAAQ,SAAS,QAAQ,SAAS,QAAQ;CAChD,MAAM,QAA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SAAS,UAAU,QAAQ;CACjC,MAAM,eAAe,KAAK,IACxB,SACA,KAAK,IAAI,SAAU,SAAS,YAAYC,OAAK,CAAC,OAAO,CACtD;AAED,KAAI,QAAQ,OACV,QAAO,GAAG,IAAI,OAAO,aAAa,GAAGA;AAGvC,QAAO,GAAGA,SAAO,IAAI,OAAO,aAAa;EACzC,CACD,KAAK,GAAG;AAEb,MAAa,IAAI,SAAS,KAAK,WAAW,IAAI;AAC9C,MAAa,IAAI,SAAS,KAAK,WAAW,MAAM;AAChD,MAAa,QAAQ,SAAS,KAAK,WAAW,KAAK"}
|
package/dist/esm/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizePath } from "./utils/normalizePath.mjs";
|
|
2
|
-
import { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x } from "./logger.mjs";
|
|
2
|
+
import { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x } from "./logger.mjs";
|
|
3
3
|
import { defaultValues_exports } from "./defaultValues/index.mjs";
|
|
4
4
|
import { extractErrorMessage } from "./utils/extractErrorMessage.mjs";
|
|
5
5
|
import { logStack } from "./utils/logStack.mjs";
|
|
@@ -8,4 +8,4 @@ import { camelCaseToSentence } from "./utils/stringFormatter/camelCaseToSentence
|
|
|
8
8
|
import { kebabCaseToCamelCase } from "./utils/stringFormatter/kebabCaseToCamelCase.mjs";
|
|
9
9
|
import { toLowerCamelCase } from "./utils/stringFormatter/toLowerCamelCase.mjs";
|
|
10
10
|
|
|
11
|
-
export { ANSIColors, defaultValues_exports as DefaultValues, camelCaseToKebabCase, camelCaseToSentence, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, extractErrorMessage, getAppLogger, kebabCaseToCamelCase, logStack, logger, normalizePath, removeColor, spinnerFrames, toLowerCamelCase, v, x };
|
|
11
|
+
export { ANSIColors, defaultValues_exports as DefaultValues, camelCaseToKebabCase, camelCaseToSentence, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, extractErrorMessage, getAppLogger, getPrefix, kebabCaseToCamelCase, logStack, logger, normalizePath, removeColor, setPrefix, spinnerFrames, toLowerCamelCase, v, x };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getExtension } from "./utils/getExtension.mjs";
|
|
2
2
|
import { normalizePath } from "./utils/normalizePath.mjs";
|
|
3
3
|
import { getAlias } from "./alias.mjs";
|
|
4
|
-
import { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x } from "./logger.mjs";
|
|
4
|
+
import { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x } from "./logger.mjs";
|
|
5
5
|
import { cacheMemory } from "./utils/cacheMemory.mjs";
|
|
6
6
|
import { getPackageJsonPath } from "./utils/getPackageJsonPath.mjs";
|
|
7
7
|
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.mjs";
|
|
@@ -25,4 +25,4 @@ import { toLowerCamelCase } from "./utils/stringFormatter/toLowerCamelCase.mjs";
|
|
|
25
25
|
import { loadExternalFile, loadExternalFileSync } from "./loadExternalFile/loadExternalFile.mjs";
|
|
26
26
|
import { getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.mjs";
|
|
27
27
|
|
|
28
|
-
export { ANSIColors, defaultValues_exports as DefaultValues, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, compareVersions, configESMxCJSRequire, configurationFilesCandidates, extractErrorMessage, getAlias, getAppLogger, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getPackageJsonPath, getProjectRequire, isESModule, kebabCaseToCamelCase, loadEnvFile, loadExternalFile, loadExternalFileSync, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, spinnerFrames, toLowerCamelCase, v, x };
|
|
28
|
+
export { ANSIColors, defaultValues_exports as DefaultValues, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, compareVersions, configESMxCJSRequire, configurationFilesCandidates, extractErrorMessage, getAlias, getAppLogger, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getPackageJsonPath, getPrefix, getProjectRequire, isESModule, kebabCaseToCamelCase, loadEnvFile, loadExternalFile, loadExternalFileSync, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, setPrefix, spinnerFrames, toLowerCamelCase, v, x };
|
package/dist/esm/logger.mjs
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
//#region src/logger.ts
|
|
2
|
+
let loggerPrefix;
|
|
3
|
+
const setPrefix = (prefix) => {
|
|
4
|
+
loggerPrefix = prefix;
|
|
5
|
+
};
|
|
6
|
+
const getPrefix = (configPrefix) => {
|
|
7
|
+
if (typeof loggerPrefix !== "undefined") return loggerPrefix;
|
|
8
|
+
return configPrefix;
|
|
9
|
+
};
|
|
2
10
|
const logger = (content, details) => {
|
|
3
11
|
const isVerbose = details?.isVerbose ?? false;
|
|
4
12
|
const mode = details?.config?.mode ?? "default";
|
|
5
13
|
const level = details?.level ?? "info";
|
|
6
|
-
const prefix = details?.config?.prefix
|
|
14
|
+
const prefix = getPrefix(details?.config?.prefix);
|
|
7
15
|
const log = details?.config?.log ?? console.log;
|
|
8
16
|
const info = details?.config?.info ?? console.info;
|
|
9
17
|
const warn = details?.config?.warn ?? console.warn;
|
|
@@ -122,5 +130,5 @@ const v = colorize("✓", ANSIColors.GREEN);
|
|
|
122
130
|
const clock = colorize("⏲", ANSIColors.BLUE);
|
|
123
131
|
|
|
124
132
|
//#endregion
|
|
125
|
-
export { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x };
|
|
133
|
+
export { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x };
|
|
126
134
|
//# sourceMappingURL=logger.mjs.map
|
package/dist/esm/logger.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.mjs","names":["color","text"],"sources":["../../src/logger.ts"],"sourcesContent":["import type { CustomIntlayerConfig, Locale } from '@intlayer/types';\n\nexport type Details = {\n isVerbose?: boolean;\n level?: 'info' | 'warn' | 'error' | 'debug';\n config?: CustomIntlayerConfig['log'];\n};\n\nexport type Logger = (content: any, details?: Details) => void;\n\nexport const logger: Logger = (content, details) => {\n const isVerbose = details?.isVerbose ?? false;\n const mode = details?.config?.mode ?? 'default';\n const level = details?.level ?? 'info';\n const prefix = details?.config?.prefix
|
|
1
|
+
{"version":3,"file":"logger.mjs","names":["color","text"],"sources":["../../src/logger.ts"],"sourcesContent":["import type { CustomIntlayerConfig, Locale } from '@intlayer/types';\n\nexport type Details = {\n isVerbose?: boolean;\n level?: 'info' | 'warn' | 'error' | 'debug';\n config?: CustomIntlayerConfig['log'];\n};\n\nexport type Logger = (content: any, details?: Details) => void;\n\nlet loggerPrefix: string | undefined;\n\nexport const setPrefix = (prefix: string | undefined) => {\n loggerPrefix = prefix;\n};\n\nexport const getPrefix = (configPrefix?: string): string | undefined => {\n if (typeof loggerPrefix !== 'undefined') {\n return loggerPrefix;\n }\n\n return configPrefix;\n};\n\nexport const logger: Logger = (content, details) => {\n const isVerbose = details?.isVerbose ?? false;\n const mode = details?.config?.mode ?? 'default';\n const level = details?.level ?? 'info';\n const prefix = getPrefix(details?.config?.prefix);\n const log = details?.config?.log ?? console.log;\n const info = details?.config?.info ?? console.info;\n const warn = details?.config?.warn ?? console.warn;\n const error = details?.config?.error ?? console.error;\n const debug = details?.config?.debug ?? console.debug;\n\n if (mode === 'disabled') return;\n\n if (isVerbose && mode !== 'verbose') return;\n\n const flatContent = prefix ? [prefix, ...[content].flat()] : [content].flat();\n\n if (level === 'debug') {\n return debug(...flatContent);\n }\n\n if (level === 'info') {\n return info(...flatContent);\n }\n\n if (level === 'warn') {\n return warn(...flatContent);\n }\n\n if (level === 'error') {\n return error(...flatContent);\n }\n\n log(...flatContent);\n};\n\nexport enum ANSIColors {\n RESET = '\\x1b[0m',\n GREY = '\\x1b[90m',\n GREY_DARK = '\\x1b[38;5;239m',\n GREY_LIGHT = '\\x1b[38;5;252m',\n BLUE = '\\x1b[34m',\n RED = '\\x1b[31m',\n GREEN = '\\x1b[32m',\n YELLOW = '\\x1b[38;5;226m',\n MAGENTA = '\\x1b[35m',\n BEIGE = '\\x1b[38;5;3m',\n ORANGE = '\\x1b[38;5;208m',\n CYAN = '\\x1b[36m',\n WHITE = '\\x1b[37m',\n BOLD = '\\x1b[1m',\n}\n\nexport const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];\n\n/**\n * The appLogger function takes the logger and merges it with the configuration from the intlayer config file.\n * It allows overriding the default configuration by passing a config object in the details parameter.\n * The configuration is merged with the default configuration from the intlayer config file.\n */\nexport const getAppLogger =\n (configuration?: CustomIntlayerConfig, globalDetails?: Details) =>\n (content: any, details?: Details) =>\n logger(content, {\n ...(details ?? {}),\n config: {\n ...configuration?.log,\n ...globalDetails?.config,\n ...(details?.config ?? {}),\n },\n });\n\nexport const colorize = (\n s: string,\n color?: ANSIColors,\n reset?: boolean | ANSIColors\n): string =>\n color\n ? `${color}${s}${reset ? (typeof reset === 'boolean' ? ANSIColors.RESET : reset) : ANSIColors.RESET}`\n : s;\n\nexport const colorizeLocales = (\n locales: Locale | Locale[],\n color = ANSIColors.GREEN,\n reset: boolean | ANSIColors = ANSIColors.RESET\n) =>\n [locales]\n .flat()\n .map((locale) => colorize(locale, color, reset))\n .join(`, `);\n\nexport const colorizeKey = (\n keyPath: string | string[],\n color = ANSIColors.BEIGE,\n reset: boolean | ANSIColors = ANSIColors.RESET\n) =>\n [keyPath]\n .flat()\n .map((key) => colorize(key, color, reset))\n .join(`, `);\n\nexport const colorizePath = (\n path: string | string[],\n color = ANSIColors.GREY,\n reset: boolean | ANSIColors = ANSIColors.RESET\n) =>\n [path]\n .flat()\n .map((p) => colorize(p, color, reset))\n .join(`, `);\n\n/**\n * Colorize numeric value using Intl.NumberFormat and optional ANSI colors.\n *\n * Examples:\n * colorizeNumber(2, [{ pluralRule: 'one' , color: ANSIColors.GREEN}, { pluralRule: 'other' , color: ANSIColors.RED}]) // \"'\\x1b[31m2\\x1b[0m\"\n */\nexport const colorizeNumber = (\n number: number | string,\n options: Partial<Record<Intl.LDMLPluralRule, ANSIColors>> = {\n zero: ANSIColors.BLUE,\n one: ANSIColors.BLUE,\n two: ANSIColors.BLUE,\n few: ANSIColors.BLUE,\n many: ANSIColors.BLUE,\n other: ANSIColors.BLUE,\n }\n): string => {\n if (number === 0) {\n const color = options.zero ?? ANSIColors.GREEN;\n return colorize(number.toString(), color);\n }\n\n const rule = new Intl.PluralRules('en').select(Number(number));\n const color = options[rule];\n return colorize(number.toString(), color);\n};\n\nexport const removeColor = (text: string) =>\n // biome-ignore lint/suspicious/noControlCharactersInRegex: we need to remove the color codes\n text.replace(/\\x1b\\[[0-9;]*m/g, '');\n\nconst getLength = (length: number | number[] | string | string[]): number => {\n let value: number = 0;\n if (typeof length === 'number') {\n value = length;\n }\n if (typeof length === 'string') {\n value = length.length;\n }\n if (Array.isArray(length) && length.every((l) => typeof l === 'string')) {\n value = Math.max(...length.map((str) => str.length));\n }\n if (Array.isArray(length) && length.every((l) => typeof l === 'number')) {\n value = Math.max(...length);\n }\n return Math.max(value, 0);\n};\n\nconst defaultColonOptions = {\n colSize: 0,\n minSize: 0,\n maxSize: Infinity,\n pad: 'right',\n padChar: '0',\n};\n\n/**\n * Create a string of spaces of a given length.\n *\n * @param colSize - The length of the string to create.\n * @returns A string of spaces.\n */\nexport const colon = (\n text: string | string[],\n options?: {\n colSize?: number | number[] | string | string[];\n minSize?: number;\n maxSize?: number;\n pad?: 'left' | 'right';\n padChar?: string;\n }\n): string =>\n [text]\n .flat()\n .map((text) => {\n const { colSize, minSize, maxSize, pad, padChar } = {\n ...defaultColonOptions,\n ...(options ?? {}),\n };\n\n const length = getLength(colSize);\n const spacesLength = Math.max(\n minSize!,\n Math.min(maxSize!, length - removeColor(text).length)\n );\n\n if (pad === 'left') {\n return `${' '.repeat(spacesLength)}${text}`;\n }\n\n return `${text}${' '.repeat(spacesLength)}`;\n })\n .join('');\n\nexport const x = colorize('✗', ANSIColors.RED);\nexport const v = colorize('✓', ANSIColors.GREEN);\nexport const clock = colorize('⏲', ANSIColors.BLUE);\n"],"mappings":";AAUA,IAAI;AAEJ,MAAa,aAAa,WAA+B;AACvD,gBAAe;;AAGjB,MAAa,aAAa,iBAA8C;AACtE,KAAI,OAAO,iBAAiB,YAC1B,QAAO;AAGT,QAAO;;AAGT,MAAa,UAAkB,SAAS,YAAY;CAClD,MAAM,YAAY,SAAS,aAAa;CACxC,MAAM,OAAO,SAAS,QAAQ,QAAQ;CACtC,MAAM,QAAQ,SAAS,SAAS;CAChC,MAAM,SAAS,UAAU,SAAS,QAAQ,OAAO;CACjD,MAAM,MAAM,SAAS,QAAQ,OAAO,QAAQ;CAC5C,MAAM,OAAO,SAAS,QAAQ,QAAQ,QAAQ;CAC9C,MAAM,OAAO,SAAS,QAAQ,QAAQ,QAAQ;CAC9C,MAAM,QAAQ,SAAS,QAAQ,SAAS,QAAQ;CAChD,MAAM,QAAQ,SAAS,QAAQ,SAAS,QAAQ;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,eAAe,KAAK,IACxB,SACA,KAAK,IAAI,SAAU,SAAS,YAAYC,OAAK,CAAC,OAAO,CACtD;AAED,KAAI,QAAQ,OACV,QAAO,GAAG,IAAI,OAAO,aAAa,GAAGA;AAGvC,QAAO,GAAGA,SAAO,IAAI,OAAO,aAAa;EACzC,CACD,KAAK,GAAG;AAEb,MAAa,IAAI,SAAS,KAAK,WAAW,IAAI;AAC9C,MAAa,IAAI,SAAS,KAAK,WAAW,MAAM;AAChD,MAAa,QAAQ,SAAS,KAAK,WAAW,KAAK"}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { index_d_exports } from "./defaultValues/index.js";
|
|
2
|
-
import { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x } from "./logger.js";
|
|
2
|
+
import { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x } from "./logger.js";
|
|
3
3
|
import { extractErrorMessage } from "./utils/extractErrorMessage.js";
|
|
4
4
|
import { logStack } from "./utils/logStack.js";
|
|
5
5
|
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 { ANSIColors, index_d_exports as DefaultValues, Details, Logger, camelCaseToKebabCase, camelCaseToSentence, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, extractErrorMessage, getAppLogger, kebabCaseToCamelCase, logStack, logger, normalizePath, removeColor, spinnerFrames, toLowerCamelCase, v, x };
|
|
10
|
+
export { ANSIColors, index_d_exports as DefaultValues, Details, Logger, camelCaseToKebabCase, camelCaseToSentence, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, extractErrorMessage, getAppLogger, getPrefix, kebabCaseToCamelCase, logStack, logger, normalizePath, removeColor, setPrefix, spinnerFrames, toLowerCamelCase, v, x };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAlias } from "./alias.js";
|
|
2
2
|
import { bundleJSFile } from "./bundleJSFile.js";
|
|
3
3
|
import { index_d_exports } from "./defaultValues/index.js";
|
|
4
|
-
import { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x } from "./logger.js";
|
|
4
|
+
import { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x } from "./logger.js";
|
|
5
5
|
import { extractErrorMessage } from "./utils/extractErrorMessage.js";
|
|
6
6
|
import { logStack } from "./utils/logStack.js";
|
|
7
7
|
import { normalizePath } from "./utils/normalizePath.js";
|
|
@@ -24,4 +24,4 @@ import { compareVersions } from "./utils/compareVersions.js";
|
|
|
24
24
|
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./utils/ESMxCJSHelpers.js";
|
|
25
25
|
import { getExtension } from "./utils/getExtension.js";
|
|
26
26
|
import { getPackageJsonPath } from "./utils/getPackageJsonPath.js";
|
|
27
|
-
export { ANSIColors, index_d_exports as DefaultValues, Details, type ESBuildPlugin, type GetConfigurationAndFilePathResult, type GetConfigurationOptions, Logger, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, compareVersions, configESMxCJSRequire, configurationFilesCandidates, extractErrorMessage, getAlias, getAppLogger, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getPackageJsonPath, getProjectRequire, isESModule, kebabCaseToCamelCase, loadEnvFile, loadExternalFile, loadExternalFileSync, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, spinnerFrames, toLowerCamelCase, v, x };
|
|
27
|
+
export { ANSIColors, index_d_exports as DefaultValues, Details, type ESBuildPlugin, type GetConfigurationAndFilePathResult, type GetConfigurationOptions, Logger, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, compareVersions, configESMxCJSRequire, configurationFilesCandidates, extractErrorMessage, getAlias, getAppLogger, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getPackageJsonPath, getPrefix, getProjectRequire, isESModule, kebabCaseToCamelCase, loadEnvFile, loadExternalFile, loadExternalFileSync, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, setPrefix, spinnerFrames, toLowerCamelCase, v, x };
|
package/dist/types/logger.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ type Details = {
|
|
|
7
7
|
config?: CustomIntlayerConfig['log'];
|
|
8
8
|
};
|
|
9
9
|
type Logger = (content: any, details?: Details) => void;
|
|
10
|
+
declare const setPrefix: (prefix: string | undefined) => void;
|
|
11
|
+
declare const getPrefix: (configPrefix?: string) => string | undefined;
|
|
10
12
|
declare const logger: Logger;
|
|
11
13
|
declare enum ANSIColors {
|
|
12
14
|
RESET = "\u001B[0m",
|
|
@@ -60,5 +62,5 @@ declare const x: string;
|
|
|
60
62
|
declare const v: string;
|
|
61
63
|
declare const clock: string;
|
|
62
64
|
//#endregion
|
|
63
|
-
export { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x };
|
|
65
|
+
export { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x };
|
|
64
66
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/logger.ts"],"sourcesContent":[],"mappings":";;;KAEY,OAAA;;EAAA,KAAA,CAAA,EAAA,MAAO,GAAA,MAGR,GAAA,OAAA,GAAA,OAAoB;EAGnB,MAAA,CAAA,EAHD,oBAG0C,CAAA,KAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/logger.ts"],"sourcesContent":[],"mappings":";;;KAEY,OAAA;;EAAA,KAAA,CAAA,EAAA,MAAO,GAAA,MAGR,GAAA,OAAA,GAAA,OAAoB;EAGnB,MAAA,CAAA,EAHD,oBAG0C,CAAA,KAAA,CAAA;AAIrD,CAAA;AAIa,KARD,MAAA,GAcX,CAAA,OAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAd6C,OAc7C,EAAA,GAAA,IAAA;AAEY,cAZA,SAYQ,EAkCpB,CAAA,MAAA,EAAA,MAAA,GAAA,SAAA,EAAA,GAAA,IAAA;AAEW,cA5CC,SA4CS,EAAA,CAAA,YAAA,CAAA,EAAA,MAAA,EAAA,GAAA,MAAA,GAAA,SAAA;AAiBT,cArDA,MAqDkE,EArD1D,MAqD0D;AAOlE,aAxBD,UAAA;EAyBO,KAAA,GAAA,WAAA;EAAsC,IAAA,GAAA,YAAA;EAC9B,SAAA,GAAA,kBAAA;EAAO,UAAA,GAAA,kBAAA;EAUrB,IAAA,GAAA,YAON;EAEM,GAAA,GAAA,YAQE;EAPJ,KAAA,GAAA,YAAA;EAAS,MAAA,GAAA,kBAAA;EAClB,OAAA,GAAA,YAAA;EACiB,KAAA,GAAA,gBAAA;EAA6B,MAAA,GAAA,kBAAA;EAOnC,IAAA,GAAA,YAQE;EAEF,KAAA,GAAA,YAQE;EAQF,IAAA,GAAA,WAmBZ;;AAjB8C,cAlElC,aAkEkC,EAAA,MAAA,EAAA;;;;AAmB/C;AAmCA;AAgCa,cAjJA,YAiJiC,EAAA,CAAA,aAAA,CAAA,EAhJ3B,oBAgJ2B,EAAA,aAAA,CAAA,EAhJW,OAgJX,EAAA,GAAA,CAAA,OAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EA/InB,OA+ImB,EAAA,GAAA,IAAA;AACjC,cAtIA,QAsImC,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,EApItC,UAoIsC,EAAA,KAAA,CAAA,EAAA,OAAA,GAnI5B,UAmI4B,EAAA,GAAA,MAAA;AACnC,cA9HA,eA8HsC,EAAA,CAAA,OAAA,EA7HxC,MA6HwC,GA7H/B,MA6H+B,EAAA,EAAA,KAAA,CAAA,EA5HjD,UA4HiD,EAAA,KAAA,CAAA,EAAA,OAAA,GA3HhC,UA2HgC,EAAA,GAAA,MAAA;cApHtC,kDAEX,8BACiB;cAON,gDAEX,8BACiB;;;;;;;cAaN,oDAEF,QAAQ,OAAO,IAAA,CAAK,gBAAgB;cAmBlC;;;;;;;cAmCA;;;;;;;cAgCA;cACA;cACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "7.6.0-canary.
|
|
3
|
+
"version": "7.6.0-canary.1",
|
|
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": [
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@intlayer/types": "7.6.0-canary.
|
|
99
|
+
"@intlayer/types": "7.6.0-canary.1",
|
|
100
100
|
"defu": "6.1.4",
|
|
101
101
|
"dotenv": "16.6.1",
|
|
102
102
|
"esbuild": "0.27.2",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"vitest": "4.0.17"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"intlayer": "7.6.0-canary.
|
|
116
|
+
"intlayer": "7.6.0-canary.1",
|
|
117
117
|
"react": ">=16.0.0"
|
|
118
118
|
},
|
|
119
119
|
"peerDependenciesMeta": {
|