@intlayer/config 8.1.2 → 8.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -43
- package/dist/cjs/built.cjs +1 -7
- package/dist/cjs/built.cjs.map +1 -1
- package/dist/cjs/client.cjs +1 -40
- package/dist/cjs/configFile/buildConfigurationFields.cjs +1 -188
- package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
- package/dist/cjs/configFile/getConfiguration.cjs +1 -70
- package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
- package/dist/cjs/configFile/index.cjs +1 -10
- package/dist/cjs/configFile/loadConfigurationFile.cjs +1 -33
- package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
- package/dist/cjs/configFile/searchConfigurationFile.cjs +1 -51
- package/dist/cjs/configFile/searchConfigurationFile.cjs.map +1 -1
- package/dist/cjs/defaultValues/build.cjs +1 -29
- package/dist/cjs/defaultValues/build.cjs.map +1 -1
- package/dist/cjs/defaultValues/compiler.cjs +1 -24
- package/dist/cjs/defaultValues/compiler.cjs.map +1 -1
- package/dist/cjs/defaultValues/content.cjs +1 -56
- package/dist/cjs/defaultValues/content.cjs.map +1 -1
- package/dist/cjs/defaultValues/dictionary.cjs +1 -26
- package/dist/cjs/defaultValues/dictionary.cjs.map +1 -1
- package/dist/cjs/defaultValues/editor.cjs +1 -41
- package/dist/cjs/defaultValues/editor.cjs.map +1 -1
- package/dist/cjs/defaultValues/index.cjs +1 -78
- package/dist/cjs/defaultValues/internationalization.cjs +1 -27
- package/dist/cjs/defaultValues/internationalization.cjs.map +1 -1
- package/dist/cjs/defaultValues/log.cjs +1 -21
- package/dist/cjs/defaultValues/log.cjs.map +1 -1
- package/dist/cjs/defaultValues/routing.cjs +1 -35
- package/dist/cjs/defaultValues/routing.cjs.map +1 -1
- package/dist/cjs/defaultValues/system.cjs +1 -47
- package/dist/cjs/defaultValues/system.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -81
- package/dist/cjs/loadEnvFile.cjs +1 -36
- package/dist/cjs/loadEnvFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleFile.cjs +1 -71
- package/dist/cjs/loadExternalFile/bundleFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs +2 -0
- package/dist/cjs/loadExternalFile/bundleJSFile.cjs.map +1 -0
- package/dist/cjs/loadExternalFile/index.cjs +1 -0
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs +1 -79
- package/dist/cjs/loadExternalFile/loadExternalFile.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +1 -77
- package/dist/cjs/loadExternalFile/parseFileContent.cjs.map +1 -1
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs +1 -63
- package/dist/cjs/loadExternalFile/transpileTSToCJS.cjs.map +1 -1
- package/dist/cjs/logger.cjs +1 -150
- package/dist/cjs/logger.cjs.map +1 -1
- package/dist/cjs/node.cjs +1 -0
- package/dist/cjs/utils/ESMxCJSHelpers.cjs +1 -27
- package/dist/cjs/utils/ESMxCJSHelpers.cjs.map +1 -1
- package/dist/cjs/utils/alias.cjs +2 -0
- package/dist/cjs/utils/alias.cjs.map +1 -0
- package/dist/cjs/utils/cacheDisk.cjs +1 -162
- package/dist/cjs/utils/cacheDisk.cjs.map +1 -1
- package/dist/cjs/utils/cacheMemory.cjs +1 -269
- package/dist/cjs/utils/cacheMemory.cjs.map +1 -1
- package/dist/cjs/utils/clearModuleCache.cjs +1 -26
- package/dist/cjs/utils/clearModuleCache.cjs.map +1 -1
- package/dist/cjs/utils/compareVersions.cjs +1 -38
- package/dist/cjs/utils/compareVersions.cjs.map +1 -1
- package/dist/cjs/utils/extractErrorMessage.cjs +1 -95
- package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -1
- package/dist/cjs/utils/getExtension.cjs +1 -14
- package/dist/cjs/utils/getExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs +1 -35
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -1
- package/dist/cjs/utils/index.cjs +1 -0
- package/dist/cjs/utils/logStack.cjs +1 -16
- package/dist/cjs/utils/logStack.cjs.map +1 -1
- package/dist/cjs/utils/normalizePath.cjs +1 -17
- package/dist/cjs/utils/normalizePath.cjs.map +1 -1
- package/dist/cjs/utils/retryManager.cjs +2 -0
- package/dist/cjs/utils/retryManager.cjs.map +1 -0
- package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs +1 -13
- package/dist/cjs/utils/stringFormatter/camelCaseToKebabCase.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs +1 -16
- package/dist/cjs/utils/stringFormatter/camelCaseToSentence.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/index.cjs +1 -10
- package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs +1 -14
- package/dist/cjs/utils/stringFormatter/kebabCaseToCamelCase.cjs.map +1 -1
- package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs +1 -19
- package/dist/cjs/utils/stringFormatter/toLowerCamelCase.cjs.map +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -22
- package/dist/esm/built.mjs +1 -7
- package/dist/esm/built.mjs.map +1 -1
- package/dist/esm/client.mjs +1 -11
- package/dist/esm/configFile/buildConfigurationFields.mjs +1 -186
- package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.mjs +1 -67
- package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
- package/dist/esm/configFile/index.mjs +1 -5
- package/dist/esm/configFile/loadConfigurationFile.mjs +1 -32
- package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
- package/dist/esm/configFile/searchConfigurationFile.mjs +1 -48
- package/dist/esm/configFile/searchConfigurationFile.mjs.map +1 -1
- package/dist/esm/defaultValues/build.mjs +1 -18
- package/dist/esm/defaultValues/build.mjs.map +1 -1
- package/dist/esm/defaultValues/compiler.mjs +1 -19
- package/dist/esm/defaultValues/compiler.mjs.map +1 -1
- package/dist/esm/defaultValues/content.mjs +1 -43
- package/dist/esm/defaultValues/content.mjs.map +1 -1
- package/dist/esm/defaultValues/dictionary.mjs +1 -16
- package/dist/esm/defaultValues/dictionary.mjs.map +1 -1
- package/dist/esm/defaultValues/editor.mjs +1 -26
- package/dist/esm/defaultValues/editor.mjs.map +1 -1
- package/dist/esm/defaultValues/index.mjs +1 -24
- package/dist/esm/defaultValues/internationalization.mjs +1 -17
- package/dist/esm/defaultValues/internationalization.mjs.map +1 -1
- package/dist/esm/defaultValues/log.mjs +1 -13
- package/dist/esm/defaultValues/log.mjs.map +1 -1
- package/dist/esm/defaultValues/routing.mjs +1 -22
- package/dist/esm/defaultValues/routing.mjs.map +1 -1
- package/dist/esm/defaultValues/system.mjs +1 -30
- package/dist/esm/defaultValues/system.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -28
- package/dist/esm/loadEnvFile.mjs +1 -32
- package/dist/esm/loadEnvFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleFile.mjs +1 -67
- package/dist/esm/loadExternalFile/bundleFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/bundleJSFile.mjs +2 -0
- package/dist/esm/loadExternalFile/bundleJSFile.mjs.map +1 -0
- package/dist/esm/loadExternalFile/index.mjs +1 -0
- package/dist/esm/loadExternalFile/loadExternalFile.mjs +1 -75
- package/dist/esm/loadExternalFile/loadExternalFile.mjs.map +1 -1
- package/dist/esm/loadExternalFile/parseFileContent.mjs +1 -73
- package/dist/esm/loadExternalFile/parseFileContent.mjs.map +1 -1
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs +1 -60
- package/dist/esm/loadExternalFile/transpileTSToCJS.mjs.map +1 -1
- package/dist/esm/logger.mjs +1 -133
- package/dist/esm/logger.mjs.map +1 -1
- package/dist/esm/node.mjs +1 -0
- package/dist/esm/utils/ESMxCJSHelpers.mjs +1 -24
- package/dist/esm/utils/ESMxCJSHelpers.mjs.map +1 -1
- package/dist/esm/utils/alias.mjs +2 -0
- package/dist/esm/utils/alias.mjs.map +1 -0
- package/dist/esm/utils/cacheDisk.mjs +1 -159
- package/dist/esm/utils/cacheDisk.mjs.map +1 -1
- package/dist/esm/utils/cacheMemory.mjs +1 -261
- package/dist/esm/utils/cacheMemory.mjs.map +1 -1
- package/dist/esm/utils/clearModuleCache.mjs +1 -25
- package/dist/esm/utils/clearModuleCache.mjs.map +1 -1
- package/dist/esm/utils/compareVersions.mjs +1 -36
- package/dist/esm/utils/compareVersions.mjs.map +1 -1
- package/dist/esm/utils/extractErrorMessage.mjs +1 -93
- package/dist/esm/utils/extractErrorMessage.mjs.map +1 -1
- package/dist/esm/utils/getExtension.mjs +1 -12
- package/dist/esm/utils/getExtension.mjs.map +1 -1
- package/dist/esm/utils/getPackageJsonPath.mjs +1 -32
- package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +1 -0
- package/dist/esm/utils/logStack.mjs +1 -15
- package/dist/esm/utils/logStack.mjs.map +1 -1
- package/dist/esm/utils/normalizePath.mjs +1 -15
- package/dist/esm/utils/normalizePath.mjs.map +1 -1
- package/dist/esm/utils/retryManager.mjs +2 -0
- package/dist/esm/utils/retryManager.mjs.map +1 -0
- package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs +1 -11
- package/dist/esm/utils/stringFormatter/camelCaseToKebabCase.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs +1 -14
- package/dist/esm/utils/stringFormatter/camelCaseToSentence.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/index.mjs +1 -6
- package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs +1 -12
- package/dist/esm/utils/stringFormatter/kebabCaseToCamelCase.mjs.map +1 -1
- package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs +1 -17
- package/dist/esm/utils/stringFormatter/toLowerCamelCase.mjs.map +1 -1
- package/dist/types/index.d.ts +15 -9
- package/dist/types/{bundleJSFile.d.ts → loadExternalFile/bundleJSFile.d.ts} +1 -1
- package/dist/types/loadExternalFile/bundleJSFile.d.ts.map +1 -0
- package/dist/types/loadExternalFile/index.d.ts +6 -0
- package/dist/types/loadExternalFile/loadExternalFile.d.ts +2 -3
- package/dist/types/loadExternalFile/loadExternalFile.d.ts.map +1 -1
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts +2 -3
- package/dist/types/loadExternalFile/transpileTSToCJS.d.ts.map +1 -1
- package/dist/types/node.d.ts +5 -0
- package/dist/types/{alias.d.ts → utils/alias.d.ts} +1 -1
- package/dist/types/utils/alias.d.ts.map +1 -0
- package/dist/types/utils/getPackageJsonPath.d.ts +1 -2
- package/dist/types/utils/getPackageJsonPath.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +17 -0
- package/dist/types/{retryManager.d.ts → utils/retryManager.d.ts} +1 -1
- package/dist/types/utils/retryManager.d.ts.map +1 -0
- package/package.json +42 -10
- package/dist/cjs/alias.cjs +0 -30
- package/dist/cjs/alias.cjs.map +0 -1
- package/dist/cjs/bundleJSFile.cjs +0 -34
- package/dist/cjs/bundleJSFile.cjs.map +0 -1
- package/dist/cjs/retryManager.cjs +0 -46
- package/dist/cjs/retryManager.cjs.map +0 -1
- package/dist/esm/alias.mjs +0 -28
- package/dist/esm/alias.mjs.map +0 -1
- package/dist/esm/bundleJSFile.mjs +0 -32
- package/dist/esm/bundleJSFile.mjs.map +0 -1
- package/dist/esm/retryManager.mjs +0 -45
- package/dist/esm/retryManager.mjs.map +0 -1
- package/dist/types/alias.d.ts.map +0 -1
- package/dist/types/bundleJSFile.d.ts.map +0 -1
- package/dist/types/retryManager.d.ts.map +0 -1
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
4
|
-
|
|
5
|
-
//#region src/utils/getPackageJsonPath.ts
|
|
6
|
-
const isESModule = typeof import.meta.url === "string";
|
|
7
|
-
const MAX_LEVELS = 15;
|
|
8
|
-
const getPackageJsonPath = (startDir = process.cwd()) => {
|
|
9
|
-
const checkedCache = cacheMemory.get("packageJsonPath", startDir);
|
|
10
|
-
if (checkedCache) return checkedCache;
|
|
11
|
-
let currentDir = startDir;
|
|
12
|
-
for (let level = 0; level < MAX_LEVELS; level++) {
|
|
13
|
-
const packageJsonPath = join(currentDir, "package.json");
|
|
14
|
-
if (existsSync(packageJsonPath)) {
|
|
15
|
-
cacheMemory.set("packageJsonPath", startDir, {
|
|
16
|
-
packageJsonPath,
|
|
17
|
-
baseDir: currentDir
|
|
18
|
-
});
|
|
19
|
-
return {
|
|
20
|
-
packageJsonPath,
|
|
21
|
-
baseDir: currentDir
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
const parentDir = dirname(currentDir);
|
|
25
|
-
if (parentDir === currentDir) break;
|
|
26
|
-
currentDir = parentDir;
|
|
27
|
-
}
|
|
28
|
-
throw new Error(`Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//#endregion
|
|
32
|
-
export { getPackageJsonPath, isESModule };
|
|
1
|
+
import{cacheMemory as e}from"./cacheMemory.mjs";import{dirname as t,join as n}from"node:path";import{existsSync as r}from"node:fs";const i=(i=process.cwd())=>{let a=e.get(`packageJsonPath`,i);if(a)return a;let o=i;for(let a=0;a<15;a++){let a=n(o,`package.json`);if(r(a))return e.set(`packageJsonPath`,i,{packageJsonPath:a,baseDir:o}),{packageJsonPath:a,baseDir:o};let s=t(o);if(s===o)break;o=s}throw Error(`Could not find package.json in current directory or any of the 15 parent directories. Searched from: ${i}`)};export{i as getPackageJsonPath};
|
|
33
2
|
//# sourceMappingURL=getPackageJsonPath.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackageJsonPath.mjs","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cacheMemory } from './cacheMemory';\n\
|
|
1
|
+
{"version":3,"file":"getPackageJsonPath.mjs","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cacheMemory } from './cacheMemory';\n\nconst MAX_LEVELS = 15;\n\ntype PackageJsonPathCache = {\n packageJsonPath: string;\n baseDir: string;\n};\n\nexport const getPackageJsonPath = (\n startDir: string = process.cwd()\n): PackageJsonPathCache => {\n const checkedCache = cacheMemory.get<PackageJsonPathCache>(\n 'packageJsonPath',\n startDir\n );\n\n if (checkedCache) return checkedCache;\n\n let currentDir = startDir;\n\n for (let level = 0; level < MAX_LEVELS; level++) {\n const packageJsonPath = join(currentDir, 'package.json');\n\n if (existsSync(packageJsonPath)) {\n cacheMemory.set('packageJsonPath', startDir, {\n packageJsonPath,\n baseDir: currentDir,\n });\n\n return { packageJsonPath, baseDir: currentDir };\n }\n\n const parentDir = dirname(currentDir);\n\n // If we've reached the root directory, stop\n if (parentDir === currentDir) {\n break;\n }\n\n currentDir = parentDir;\n }\n\n throw new Error(\n `Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`\n );\n};\n"],"mappings":"mIAIA,MAOa,GACX,EAAmB,QAAQ,KAAK,GACP,CACzB,IAAM,EAAe,EAAY,IAC/B,kBACA,EACD,CAED,GAAI,EAAc,OAAO,EAEzB,IAAI,EAAa,EAEjB,IAAK,IAAI,EAAQ,EAAG,EAAQ,GAAY,IAAS,CAC/C,IAAM,EAAkB,EAAK,EAAY,eAAe,CAExD,GAAI,EAAW,EAAgB,CAM7B,OALA,EAAY,IAAI,kBAAmB,EAAU,CAC3C,kBACA,QAAS,EACV,CAAC,CAEK,CAAE,kBAAiB,QAAS,EAAY,CAGjD,IAAM,EAAY,EAAQ,EAAW,CAGrC,GAAI,IAAc,EAChB,MAGF,EAAa,EAGf,MAAU,MACR,wGAAmH,IACpH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cacheMemory as e,clearAllCache as t,clearCache as n,computeKeyId as r,getCache as i,setCache as a,stableStringify as o}from"./cacheMemory.mjs";import{getPackageJsonPath as s}from"./getPackageJsonPath.mjs";import{normalizePath as c}from"./normalizePath.mjs";import{configESMxCJSRequire as l,getProjectRequire as u,isESModule as d}from"./ESMxCJSHelpers.mjs";import{extractErrorMessage as f}from"./extractErrorMessage.mjs";import{logStack as p}from"./logStack.mjs";import{camelCaseToKebabCase as m}from"./stringFormatter/camelCaseToKebabCase.mjs";import{camelCaseToSentence as h}from"./stringFormatter/camelCaseToSentence.mjs";import{kebabCaseToCamelCase as g}from"./stringFormatter/kebabCaseToCamelCase.mjs";import{toLowerCamelCase as _}from"./stringFormatter/toLowerCamelCase.mjs";import{getExtension as v}from"./getExtension.mjs";import{getAlias as y}from"./alias.mjs";import{cacheDisk as b}from"./cacheDisk.mjs";import{clearModuleCache as x}from"./clearModuleCache.mjs";import{compareVersions as S}from"./compareVersions.mjs";import{retryManager as C}from"./retryManager.mjs";export{b as cacheDisk,e as cacheMemory,m as camelCaseToKebabCase,h as camelCaseToSentence,t as clearAllCache,n as clearCache,x as clearModuleCache,S as compareVersions,r as computeKeyId,l as configESMxCJSRequire,f as extractErrorMessage,y as getAlias,i as getCache,v as getExtension,s as getPackageJsonPath,u as getProjectRequire,d as isESModule,g as kebabCaseToCamelCase,p as logStack,c as normalizePath,C as retryManager,a as setCache,o as stableStringify,_ as toLowerCamelCase};
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
//#region src/utils/logStack.ts
|
|
4
|
-
const logStack = (message, options = { limit: 50 }) => {
|
|
5
|
-
Error.stackTraceLimit = options.limit;
|
|
6
|
-
try {
|
|
7
|
-
throw new Error("test");
|
|
8
|
-
} catch (error) {
|
|
9
|
-
console.log(colorize(message, ANSIColors.YELLOW));
|
|
10
|
-
console.log(colorize(error.stack ?? "", ANSIColors.BLUE));
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { logStack };
|
|
1
|
+
import{ANSIColors as e,colorize as t}from"../logger.mjs";const n=(n,r={limit:50})=>{Error.stackTraceLimit=r.limit;try{throw Error(`test`)}catch(r){console.log(t(n,e.YELLOW)),console.log(t(r.stack??``,e.BLUE))}};export{n as logStack};
|
|
16
2
|
//# sourceMappingURL=logStack.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logStack.mjs","names":[],"sources":["../../../src/utils/logStack.ts"],"sourcesContent":["import { ANSIColors, colorize } from '../logger';\n\nexport const logStack = (\n message: string,\n options: { limit: number } = { limit: 50 }\n) => {\n Error.stackTraceLimit = options.limit;\n\n try {\n throw new Error('test');\n } catch (error) {\n console.log(colorize(message, ANSIColors.YELLOW));\n console.log(colorize((error as Error).stack ?? '', ANSIColors.BLUE));\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logStack.mjs","names":[],"sources":["../../../src/utils/logStack.ts"],"sourcesContent":["import { ANSIColors, colorize } from '../logger';\n\nexport const logStack = (\n message: string,\n options: { limit: number } = { limit: 50 }\n) => {\n Error.stackTraceLimit = options.limit;\n\n try {\n throw new Error('test');\n } catch (error) {\n console.log(colorize(message, ANSIColors.YELLOW));\n console.log(colorize((error as Error).stack ?? '', ANSIColors.BLUE));\n }\n};\n"],"mappings":"yDAEA,MAAa,GACX,EACA,EAA6B,CAAE,MAAO,GAAI,GACvC,CACH,MAAM,gBAAkB,EAAQ,MAEhC,GAAI,CACF,MAAU,MAAM,OAAO,OAChB,EAAO,CACd,QAAQ,IAAI,EAAS,EAAS,EAAW,OAAO,CAAC,CACjD,QAAQ,IAAI,EAAU,EAAgB,OAAS,GAAI,EAAW,KAAK,CAAC"}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Normalize a path for glob by replacing backslashes with forward slashes
|
|
4
|
-
*
|
|
5
|
-
* Utils for Windows compatibility, as Glob pattern as `**\\*.js` is not supported
|
|
6
|
-
*
|
|
7
|
-
* C:\\Users\\John\\Desktop\\test.txt -> C:/Users/John/Desktop/test.txt
|
|
8
|
-
*
|
|
9
|
-
* @param path - The path to normalize
|
|
10
|
-
* @returns The normalized path
|
|
11
|
-
*/
|
|
12
|
-
const normalizePath = (path) => path.replace(/\\/g, "/");
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { normalizePath };
|
|
1
|
+
const e=e=>e.replace(/\\/g,`/`);export{e as normalizePath};
|
|
16
2
|
//# sourceMappingURL=normalizePath.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePath.mjs","names":[],"sources":["../../../src/utils/normalizePath.ts"],"sourcesContent":["/**\n * Normalize a path for glob by replacing backslashes with forward slashes\n *\n * Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n *\n * C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n *\n * @param path - The path to normalize\n * @returns The normalized path\n */\nexport const normalizePath = (path: string): string => path.replace(/\\\\/g, '/');\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"normalizePath.mjs","names":[],"sources":["../../../src/utils/normalizePath.ts"],"sourcesContent":["/**\n * Normalize a path for glob by replacing backslashes with forward slashes\n *\n * Utils for Windows compatibility, as Glob pattern as `**\\\\*.js` is not supported\n *\n * C:\\\\Users\\\\John\\\\Desktop\\\\test.txt -> C:/Users/John/Desktop/test.txt\n *\n * @param path - The path to normalize\n * @returns The normalized path\n */\nexport const normalizePath = (path: string): string => path.replace(/\\\\/g, '/');\n"],"mappings":"AAUA,MAAa,EAAiB,GAAyB,EAAK,QAAQ,MAAO,IAAI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{logger as e}from"../logger.mjs";import{extractErrorMessage as t}from"./extractErrorMessage.mjs";const n=(n,{maxRetry:r=3,delay:i=0,onError:a,onMaxTryReached:o}={})=>async(...s)=>{let c;for(let l=0;l<=r;l++)try{return await n(...s)}catch(n){c=n;let s=t(n);if(l>=r){if(o)return o?.({error:s,attempt:l,maxRetry:r}),null;throw n}a?a?.({error:s,attempt:l,maxRetry:r}):e(s,{level:`error`}),i>0&&await new Promise(e=>setTimeout(e,i))}throw c??Error(`Unexpected: retry loop completed without result`)};export{n as retryManager};
|
|
2
|
+
//# sourceMappingURL=retryManager.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retryManager.mjs","names":[],"sources":["../../../src/utils/retryManager.ts"],"sourcesContent":["import { logger } from '../logger';\nimport { extractErrorMessage } from './extractErrorMessage';\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?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n /** function to call when the maximum number of retries is reached */\n onMaxTryReached?: (details: {\n error: string;\n attempt: number;\n maxRetry: number;\n }) => void;\n};\n\nconst DEFAULT_MAX_RETRY = 3;\nconst DEFAULT_DELAY = 0;\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 onMaxTryReached,\n }: RetryManagerOptions = {}\n ): ((...args: Args) => Promise<R>) =>\n // ───────────────────────────────^ returned wrapper function\n async (...args: Args): Promise<R> => {\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= maxRetry; attempt++) {\n try {\n return await fn(...args);\n } catch (err) {\n lastError = err;\n const error = extractErrorMessage(err);\n\n // If this was the last attempt, handle max retry reached\n if (attempt >= maxRetry) {\n if (onMaxTryReached) {\n onMaxTryReached?.({ error, attempt, maxRetry });\n return null as R;\n }\n\n // Otherwise, throw the error\n throw err;\n }\n\n if (onError) {\n onError?.({ error, attempt, maxRetry });\n } else {\n logger(error, {\n level: 'error',\n });\n }\n\n // Wait before retrying\n if (delay > 0) {\n await new Promise((res) => setTimeout(res, delay));\n }\n }\n }\n\n // This should never be reached, but TypeScript needs it\n throw (\n lastError ?? new Error('Unexpected: retry loop completed without result')\n );\n };\n"],"mappings":"uGAsBA,MAUa,GAET,EACA,CACE,WAAW,EACX,QAAQ,EACR,UACA,mBACuB,EAAE,GAG7B,MAAO,GAAG,IAA2B,CACnC,IAAI,EAEJ,IAAK,IAAI,EAAU,EAAG,GAAW,EAAU,IACzC,GAAI,CACF,OAAO,MAAM,EAAG,GAAG,EAAK,OACjB,EAAK,CACZ,EAAY,EACZ,IAAM,EAAQ,EAAoB,EAAI,CAGtC,GAAI,GAAW,EAAU,CACvB,GAAI,EAEF,OADA,IAAkB,CAAE,QAAO,UAAS,WAAU,CAAC,CACxC,KAIT,MAAM,EAGJ,EACF,IAAU,CAAE,QAAO,UAAS,WAAU,CAAC,CAEvC,EAAO,EAAO,CACZ,MAAO,QACR,CAAC,CAIA,EAAQ,GACV,MAAM,IAAI,QAAS,GAAQ,WAAW,EAAK,EAAM,CAAC,CAMxD,MACE,GAAiB,MAAM,kDAAkD"}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Convert a string to kebab-case
|
|
4
|
-
* e.g. "MyNewComponent" => "my-new-component"
|
|
5
|
-
*/
|
|
6
|
-
const camelCaseToKebabCase = (str) => {
|
|
7
|
-
return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z])([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { camelCaseToKebabCase };
|
|
1
|
+
const e=e=>e.replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/([A-Z])([A-Z][a-z])/g,`$1-$2`).toLowerCase();export{e as camelCaseToKebabCase};
|
|
12
2
|
//# sourceMappingURL=camelCaseToKebabCase.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelCaseToKebabCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToKebabCase.ts"],"sourcesContent":["/**\n * Convert a string to kebab-case\n * e.g. \"MyNewComponent\" => \"my-new-component\"\n */\nexport const camelCaseToKebabCase = (str: string): string => {\n // Split on transition from lower->upper: \"MyNewComponent\" => [\"My\", \"New\", \"Component\"]\n // Then lowercase each chunk and join by \"-\"\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .toLowerCase();\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"camelCaseToKebabCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToKebabCase.ts"],"sourcesContent":["/**\n * Convert a string to kebab-case\n * e.g. \"MyNewComponent\" => \"my-new-component\"\n */\nexport const camelCaseToKebabCase = (str: string): string => {\n // Split on transition from lower->upper: \"MyNewComponent\" => [\"My\", \"New\", \"Component\"]\n // Then lowercase each chunk and join by \"-\"\n return str\n .replace(/([a-z])([A-Z])/g, '$1-$2')\n .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')\n .toLowerCase();\n};\n"],"mappings":"AAIA,MAAa,EAAwB,GAG5B,EACJ,QAAQ,kBAAmB,QAAQ,CACnC,QAAQ,uBAAwB,QAAQ,CACxC,aAAa"}
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Convert a string to sentence case
|
|
4
|
-
* e.g. 'my-new-component' → 'My new component'
|
|
5
|
-
*/
|
|
6
|
-
const camelCaseToSentence = (value) => {
|
|
7
|
-
if (!value) return "";
|
|
8
|
-
if (typeof value !== "string") return "";
|
|
9
|
-
const withSpaces = value.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2");
|
|
10
|
-
return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { camelCaseToSentence };
|
|
1
|
+
const e=e=>{if(!e||typeof e!=`string`)return``;let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()};export{e as camelCaseToSentence};
|
|
15
2
|
//# sourceMappingURL=camelCaseToSentence.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelCaseToSentence.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToSentence.ts"],"sourcesContent":["/**\n * Convert a string to sentence case\n * e.g. 'my-new-component' → 'My new component'\n */\nexport const camelCaseToSentence = (value: string): string => {\n if (!value) return '';\n if (typeof value !== 'string') return '';\n\n // Insert space before all caps that follow lowercase letters\n const withSpaces = value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n // Insert space between sequences like \"XMLParser\" → \"XML Parser\"\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');\n\n // Lowercase everything except the first character\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"camelCaseToSentence.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/camelCaseToSentence.ts"],"sourcesContent":["/**\n * Convert a string to sentence case\n * e.g. 'my-new-component' → 'My new component'\n */\nexport const camelCaseToSentence = (value: string): string => {\n if (!value) return '';\n if (typeof value !== 'string') return '';\n\n // Insert space before all caps that follow lowercase letters\n const withSpaces = value\n .replace(/([a-z])([A-Z])/g, '$1 $2')\n // Insert space between sequences like \"XMLParser\" → \"XML Parser\"\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2');\n\n // Lowercase everything except the first character\n return withSpaces.charAt(0).toUpperCase() + withSpaces.slice(1).toLowerCase();\n};\n"],"mappings":"AAIA,MAAa,EAAuB,GAA0B,CAE5D,GADI,CAAC,GACD,OAAO,GAAU,SAAU,MAAO,GAGtC,IAAM,EAAa,EAChB,QAAQ,kBAAmB,QAAQ,CAEnC,QAAQ,wBAAyB,QAAQ,CAG5C,OAAO,EAAW,OAAO,EAAE,CAAC,aAAa,CAAG,EAAW,MAAM,EAAE,CAAC,aAAa"}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { camelCaseToSentence } from "./camelCaseToSentence.mjs";
|
|
3
|
-
import { kebabCaseToCamelCase } from "./kebabCaseToCamelCase.mjs";
|
|
4
|
-
import { toLowerCamelCase } from "./toLowerCamelCase.mjs";
|
|
5
|
-
|
|
6
|
-
export { camelCaseToKebabCase, camelCaseToSentence, kebabCaseToCamelCase, toLowerCamelCase };
|
|
1
|
+
import{camelCaseToKebabCase as e}from"./camelCaseToKebabCase.mjs";import{camelCaseToSentence as t}from"./camelCaseToSentence.mjs";import{kebabCaseToCamelCase as n}from"./kebabCaseToCamelCase.mjs";import{toLowerCamelCase as r}from"./toLowerCamelCase.mjs";export{e as camelCaseToKebabCase,t as camelCaseToSentence,n as kebabCaseToCamelCase,r as toLowerCamelCase};
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
const kebabCaseToCamelCase = (name) => {
|
|
3
|
-
return name.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((word) => {
|
|
4
|
-
const lowerWord = word.toLowerCase();
|
|
5
|
-
let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);
|
|
6
|
-
capitalized = capitalized.replace(/(\d)([a-z])/g, (_, number, char) => number + char.toUpperCase());
|
|
7
|
-
return capitalized;
|
|
8
|
-
}).join("");
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { kebabCaseToCamelCase };
|
|
1
|
+
const e=e=>e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>{let t=e.toLowerCase(),n=t.charAt(0).toUpperCase()+t.slice(1);return n=n.replace(/(\d)([a-z])/g,(e,t,n)=>t+n.toUpperCase()),n}).join(``);export{e as kebabCaseToCamelCase};
|
|
13
2
|
//# sourceMappingURL=kebabCaseToCamelCase.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kebabCaseToCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/kebabCaseToCamelCase.ts"],"sourcesContent":["export const kebabCaseToCamelCase = (name: string): string => {\n return name\n .split(/[^a-zA-Z0-9]+/) // Split on any non-alphanumeric character\n .filter(Boolean) // Remove any empty strings\n .map((word) => {\n // Convert the entire word to lowercase first\n const lowerWord = word.toLowerCase();\n\n // Capitalize the first character\n let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);\n\n // Capitalize any letter that follows a number\n capitalized = capitalized.replace(\n /(\\d)([a-z])/g,\n (_, number, char) => number + char.toUpperCase()\n );\n\n return capitalized;\n })\n .join(''); // Concatenate all parts into a single string\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"kebabCaseToCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/kebabCaseToCamelCase.ts"],"sourcesContent":["export const kebabCaseToCamelCase = (name: string): string => {\n return name\n .split(/[^a-zA-Z0-9]+/) // Split on any non-alphanumeric character\n .filter(Boolean) // Remove any empty strings\n .map((word) => {\n // Convert the entire word to lowercase first\n const lowerWord = word.toLowerCase();\n\n // Capitalize the first character\n let capitalized = lowerWord.charAt(0).toUpperCase() + lowerWord.slice(1);\n\n // Capitalize any letter that follows a number\n capitalized = capitalized.replace(\n /(\\d)([a-z])/g,\n (_, number, char) => number + char.toUpperCase()\n );\n\n return capitalized;\n })\n .join(''); // Concatenate all parts into a single string\n};\n"],"mappings":"AAAA,MAAa,EAAwB,GAC5B,EACJ,MAAM,gBAAgB,CACtB,OAAO,QAAQ,CACf,IAAK,GAAS,CAEb,IAAM,EAAY,EAAK,aAAa,CAGhC,EAAc,EAAU,OAAO,EAAE,CAAC,aAAa,CAAG,EAAU,MAAM,EAAE,CAQxE,MALA,GAAc,EAAY,QACxB,gBACC,EAAG,EAAQ,IAAS,EAAS,EAAK,aAAa,CACjD,CAEM,GACP,CACD,KAAK,GAAG"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Convert a string to lowerCamelCase
|
|
4
|
-
* e.g. "MyComponent" => "myComponent"
|
|
5
|
-
* e.g. "auth-middleware" => "authMiddleware"
|
|
6
|
-
*/
|
|
7
|
-
const toLowerCamelCase = (str) => {
|
|
8
|
-
if (!str) return "";
|
|
9
|
-
if (str.includes("-")) return str.split("-").map((word, index) => {
|
|
10
|
-
if (index === 0) return word.toLowerCase();
|
|
11
|
-
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
12
|
-
}).join("");
|
|
13
|
-
return str.charAt(0).toLowerCase() + str.slice(1);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
export { toLowerCamelCase };
|
|
1
|
+
const e=e=>e?e.includes(`-`)?e.split(`-`).map((e,t)=>t===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(``):e.charAt(0).toLowerCase()+e.slice(1):``;export{e as toLowerCamelCase};
|
|
18
2
|
//# sourceMappingURL=toLowerCamelCase.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toLowerCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/toLowerCamelCase.ts"],"sourcesContent":["/**\n * Convert a string to lowerCamelCase\n * e.g. \"MyComponent\" => \"myComponent\"\n * e.g. \"auth-middleware\" => \"authMiddleware\"\n */\nexport const toLowerCamelCase = (str: string): string => {\n if (!str) {\n return '';\n }\n\n // Handle kebab-case: \"auth-middleware\" => \"authMiddleware\"\n if (str.includes('-')) {\n return str\n .split('-')\n .map((word, index) => {\n if (index === 0) {\n return word.toLowerCase();\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n\n // Handle PascalCase: \"MyComponent\" => \"myComponent\"\n return str.charAt(0).toLowerCase() + str.slice(1);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toLowerCamelCase.mjs","names":[],"sources":["../../../../src/utils/stringFormatter/toLowerCamelCase.ts"],"sourcesContent":["/**\n * Convert a string to lowerCamelCase\n * e.g. \"MyComponent\" => \"myComponent\"\n * e.g. \"auth-middleware\" => \"authMiddleware\"\n */\nexport const toLowerCamelCase = (str: string): string => {\n if (!str) {\n return '';\n }\n\n // Handle kebab-case: \"auth-middleware\" => \"authMiddleware\"\n if (str.includes('-')) {\n return str\n .split('-')\n .map((word, index) => {\n if (index === 0) {\n return word.toLowerCase();\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n }\n\n // Handle PascalCase: \"MyComponent\" => \"myComponent\"\n return str.charAt(0).toLowerCase() + str.slice(1);\n};\n"],"mappings":"AAKA,MAAa,EAAoB,GAC1B,EAKD,EAAI,SAAS,IAAI,CACZ,EACJ,MAAM,IAAI,CACV,KAAK,EAAM,IACN,IAAU,EACL,EAAK,aAAa,CAEpB,EAAK,OAAO,EAAE,CAAC,aAAa,CAAG,EAAK,MAAM,EAAE,CAAC,aAAa,CACjE,CACD,KAAK,GAAG,CAIN,EAAI,OAAO,EAAE,CAAC,aAAa,CAAG,EAAI,MAAM,EAAE,CAjBxC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { bundleJSFile } from "./bundleJSFile.js";
|
|
1
|
+
import "./built.js";
|
|
3
2
|
import { index_d_exports } from "./defaultValues/index.js";
|
|
4
3
|
import { ANSIColors, Details, Logger, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, getPrefix, logger, removeColor, setPrefix, spinnerFrames, v, x } from "./logger.js";
|
|
5
4
|
import { extractErrorMessage } from "./utils/extractErrorMessage.js";
|
|
@@ -9,19 +8,26 @@ import { camelCaseToKebabCase } from "./utils/stringFormatter/camelCaseToKebabCa
|
|
|
9
8
|
import { camelCaseToSentence } from "./utils/stringFormatter/camelCaseToSentence.js";
|
|
10
9
|
import { kebabCaseToCamelCase } from "./utils/stringFormatter/kebabCaseToCamelCase.js";
|
|
11
10
|
import { toLowerCamelCase } from "./utils/stringFormatter/toLowerCamelCase.js";
|
|
11
|
+
import "./client.js";
|
|
12
12
|
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.js";
|
|
13
|
-
import { getEnvFilePath, loadEnvFile } from "./loadEnvFile.js";
|
|
14
|
-
import { parseFileContent } from "./loadExternalFile/parseFileContent.js";
|
|
13
|
+
import { LoadEnvFileOptions, getEnvFilePath, loadEnvFile } from "./loadEnvFile.js";
|
|
14
|
+
import { SandBoxContextOptions, getSandBoxContext, parseFileContent } from "./loadExternalFile/parseFileContent.js";
|
|
15
15
|
import { GetConfigurationAndFilePathResult, GetConfigurationOptions, getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.js";
|
|
16
16
|
import { configurationFilesCandidates, searchConfigurationFile } from "./configFile/searchConfigurationFile.js";
|
|
17
|
-
import {
|
|
18
|
-
import { bundleFile, bundleFileSync } from "./loadExternalFile/bundleFile.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
17
|
+
import { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync } from "./loadExternalFile/loadExternalFile.js";
|
|
18
|
+
import { ESBuildPlugin, bundleFile, bundleFileSync, getLoader } from "./loadExternalFile/bundleFile.js";
|
|
19
|
+
import { bundleJSFile } from "./loadExternalFile/bundleJSFile.js";
|
|
20
|
+
import { transpileTSToCJS, transpileTSToCJSSync } from "./loadExternalFile/transpileTSToCJS.js";
|
|
21
|
+
import "./loadExternalFile/index.js";
|
|
22
|
+
import "./node.js";
|
|
23
|
+
import { GetAliasOptions, getAlias } from "./utils/alias.js";
|
|
24
|
+
import { CacheKey, cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./utils/cacheMemory.js";
|
|
21
25
|
import { cacheDisk } from "./utils/cacheDisk.js";
|
|
22
26
|
import { clearModuleCache } from "./utils/clearModuleCache.js";
|
|
23
27
|
import { compareVersions } from "./utils/compareVersions.js";
|
|
24
28
|
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./utils/ESMxCJSHelpers.js";
|
|
25
29
|
import { getExtension } from "./utils/getExtension.js";
|
|
26
30
|
import { getPackageJsonPath } from "./utils/getPackageJsonPath.js";
|
|
27
|
-
|
|
31
|
+
import { RetryManagerOptions, retryManager } from "./utils/retryManager.js";
|
|
32
|
+
import "./utils/index.js";
|
|
33
|
+
export { ANSIColors, CacheKey, index_d_exports as DefaultValues, Details, ESBuildPlugin, GetAliasOptions, GetConfigurationAndFilePathResult, GetConfigurationOptions, LoadEnvFileOptions, LoadExternalFileOptions, Logger, RetryManagerOptions, SandBoxContextOptions, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, compareVersions, computeKeyId, configESMxCJSRequire, configurationFilesCandidates, extractErrorMessage, getAlias, getAppLogger, getCache, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getLoader, getPackageJsonPath, getPrefix, getProjectRequire, getSandBoxContext, isESModule, kebabCaseToCamelCase, loadEnvFile, loadExternalFile, loadExternalFileSync, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, setCache, setPrefix, spinnerFrames, stableStringify, toLowerCamelCase, transpileTSToCJS, transpileTSToCJSSync, v, x };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as esbuild from "esbuild";
|
|
2
2
|
import { BuildOptions } from "esbuild";
|
|
3
3
|
|
|
4
|
-
//#region src/bundleJSFile.d.ts
|
|
4
|
+
//#region src/loadExternalFile/bundleJSFile.d.ts
|
|
5
5
|
declare const bundleJSFile: (buildOptions: BuildOptions) => Promise<esbuild.BuildResult<{
|
|
6
6
|
bundle: boolean;
|
|
7
7
|
splitting?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundleJSFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/bundleJSFile.ts"],"mappings":";;;;cAyBa,YAAA,GAAsB,YAAA,EAAc,YAAA,KAAY,OAAA,SAAA,WAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SandBoxContextOptions, getSandBoxContext, parseFileContent } from "./parseFileContent.js";
|
|
2
|
+
import { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync } from "./loadExternalFile.js";
|
|
3
|
+
import { ESBuildPlugin, bundleFile, bundleFileSync, getLoader } from "./bundleFile.js";
|
|
4
|
+
import { bundleJSFile } from "./bundleJSFile.js";
|
|
5
|
+
import { transpileTSToCJS, transpileTSToCJSSync } from "./transpileTSToCJS.js";
|
|
6
|
+
export { ESBuildPlugin, LoadExternalFileOptions, SandBoxContextOptions, bundleFile, bundleFileSync, bundleJSFile, getLoader, getSandBoxContext, loadExternalFile, loadExternalFileSync, parseFileContent, transpileTSToCJS, transpileTSToCJSSync };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SandBoxContextOptions } from "./parseFileContent.js";
|
|
2
2
|
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
-
import { BuildOptions
|
|
3
|
+
import { BuildOptions } from "esbuild";
|
|
4
4
|
|
|
5
5
|
//#region src/loadExternalFile/loadExternalFile.d.ts
|
|
6
|
-
type ESBuildPlugin = Plugin;
|
|
7
6
|
type LoadExternalFileOptions = {
|
|
8
7
|
configuration?: IntlayerConfig;
|
|
9
8
|
buildOptions?: BuildOptions;
|
|
@@ -21,5 +20,5 @@ declare const loadExternalFileSync: (filePath: string, options?: LoadExternalFil
|
|
|
21
20
|
*/
|
|
22
21
|
declare const loadExternalFile: (filePath: string, options?: LoadExternalFileOptions) => Promise<any | undefined>;
|
|
23
22
|
//#endregion
|
|
24
|
-
export {
|
|
23
|
+
export { LoadExternalFileOptions, loadExternalFile, loadExternalFileSync };
|
|
25
24
|
//# sourceMappingURL=loadExternalFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadExternalFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/loadExternalFile.ts"],"mappings":";;;;;KAaY,
|
|
1
|
+
{"version":3,"file":"loadExternalFile.d.ts","names":[],"sources":["../../../src/loadExternalFile/loadExternalFile.ts"],"mappings":";;;;;KAaY,uBAAA;EACV,aAAA,GAAgB,cAAA;EAChB,YAAA,GAAe,YAAA;AAAA,IACb,qBAAA;;;;;;cAOS,oBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA;;;;;;cA2DC,gBAAA,GACX,QAAA,UACA,OAAA,GAAU,uBAAA,KACT,OAAA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { BuildOptions
|
|
1
|
+
import { BuildOptions } from "esbuild";
|
|
2
2
|
|
|
3
3
|
//#region src/loadExternalFile/transpileTSToCJS.d.ts
|
|
4
|
-
type ESBuildPlugin = Plugin;
|
|
5
4
|
declare const transpileTSToCJSSync: (code: string, filePath: string, options?: BuildOptions) => string | undefined;
|
|
6
5
|
declare const transpileTSToCJS: (code: string, filePath: string, options?: BuildOptions) => Promise<string | undefined>;
|
|
7
6
|
//#endregion
|
|
8
|
-
export {
|
|
7
|
+
export { transpileTSToCJS, transpileTSToCJSSync };
|
|
9
8
|
//# sourceMappingURL=transpileTSToCJS.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transpileTSToCJS.d.ts","names":[],"sources":["../../../src/loadExternalFile/transpileTSToCJS.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"transpileTSToCJS.d.ts","names":[],"sources":["../../../src/loadExternalFile/transpileTSToCJS.ts"],"mappings":";;;cAyCa,oBAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,YAAA;AAAA,cAqBC,gBAAA,GACX,IAAA,UACA,QAAA,UACA,OAAA,GAAU,YAAA,KACT,OAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { index_d_exports } from "./defaultValues/index.js";
|
|
2
|
+
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.js";
|
|
3
|
+
import { GetConfigurationAndFilePathResult, GetConfigurationOptions, getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.js";
|
|
4
|
+
import { configurationFilesCandidates, searchConfigurationFile } from "./configFile/searchConfigurationFile.js";
|
|
5
|
+
export { index_d_exports as DefaultValues, GetConfigurationAndFilePathResult, GetConfigurationOptions, buildConfigurationFields, configurationFilesCandidates, getConfiguration, getConfigurationAndFilePath, searchConfigurationFile };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.d.ts","names":[],"sources":["../../../src/utils/alias.ts"],"mappings":";;;KAKY,eAAA;EACV,aAAA,EAAe,cAAA;EACf,MAAA;EACA,SAAA,IAAa,KAAA;AAAA;AAAA,cAGF,QAAA;EAAY,aAAA;EAAA,MAAA;EAAA;AAAA,GAItB,eAAA;EAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
//#region src/utils/getPackageJsonPath.d.ts
|
|
2
|
-
declare const isESModule: boolean;
|
|
3
2
|
type PackageJsonPathCache = {
|
|
4
3
|
packageJsonPath: string;
|
|
5
4
|
baseDir: string;
|
|
6
5
|
};
|
|
7
6
|
declare const getPackageJsonPath: (startDir?: string) => PackageJsonPathCache;
|
|
8
7
|
//#endregion
|
|
9
|
-
export { getPackageJsonPath
|
|
8
|
+
export { getPackageJsonPath };
|
|
10
9
|
//# sourceMappingURL=getPackageJsonPath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackageJsonPath.d.ts","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"getPackageJsonPath.d.ts","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"mappings":";KAMK,oBAAA;EACH,eAAA;EACA,OAAA;AAAA;AAAA,cAGW,kBAAA,GACX,QAAA,cACC,oBAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { extractErrorMessage } from "./extractErrorMessage.js";
|
|
2
|
+
import { logStack } from "./logStack.js";
|
|
3
|
+
import { normalizePath } from "./normalizePath.js";
|
|
4
|
+
import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.js";
|
|
5
|
+
import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.js";
|
|
6
|
+
import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.js";
|
|
7
|
+
import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.js";
|
|
8
|
+
import { GetAliasOptions, getAlias } from "./alias.js";
|
|
9
|
+
import { CacheKey, cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify } from "./cacheMemory.js";
|
|
10
|
+
import { cacheDisk } from "./cacheDisk.js";
|
|
11
|
+
import { clearModuleCache } from "./clearModuleCache.js";
|
|
12
|
+
import { compareVersions } from "./compareVersions.js";
|
|
13
|
+
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./ESMxCJSHelpers.js";
|
|
14
|
+
import { getExtension } from "./getExtension.js";
|
|
15
|
+
import { getPackageJsonPath } from "./getPackageJsonPath.js";
|
|
16
|
+
import { RetryManagerOptions, retryManager } from "./retryManager.js";
|
|
17
|
+
export { CacheKey, GetAliasOptions, RetryManagerOptions, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, isESModule, kebabCaseToCamelCase, logStack, normalizePath, retryManager, setCache, stableStringify, toLowerCamelCase };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/retryManager.d.ts
|
|
1
|
+
//#region src/utils/retryManager.d.ts
|
|
2
2
|
type RetryManagerOptions = {
|
|
3
3
|
/** maximum number of retries before giving up */maxRetry?: number; /** delay between attempts, in milliseconds */
|
|
4
4
|
delay?: number; /** function to call when an error occurs */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retryManager.d.ts","names":[],"sources":["../../../src/utils/retryManager.ts"],"mappings":";KAGY,mBAAA;EAAA,iDAEV,QAAA;EAEA,KAAA,WAFA;EAIA,OAAA,IAAW,OAAA;IACT,KAAA;IACA,OAAA;IACA,QAAA;EAAA,YAHS;EAMX,eAAA,IAAmB,OAAA;IACjB,KAAA;IACA,OAAA;IACA,QAAA;EAAA;AAAA;;AAcJ;;;;;;cAAa,YAAA,0BAET,EAAA,MAAQ,IAAA,EAAM,IAAA,KAAS,OAAA,CAAQ,CAAA;EAC/B,QAAA;EAAA,KAAA;EAAA,OAAA;EAAA;AAAA,IAKG,mBAAA,UACG,IAAA,EAAM,IAAA,KAAS,OAAA,CAAQ,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.3",
|
|
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": [
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
],
|
|
38
38
|
"sideEffects": false,
|
|
39
39
|
"exports": {
|
|
40
|
-
"
|
|
41
|
-
"types": "./dist/types/
|
|
42
|
-
"require": "./dist/cjs/
|
|
43
|
-
"import": "./dist/esm/
|
|
40
|
+
"./node": {
|
|
41
|
+
"types": "./dist/types/node.d.ts",
|
|
42
|
+
"require": "./dist/cjs/node.cjs",
|
|
43
|
+
"import": "./dist/esm/node.mjs"
|
|
44
44
|
},
|
|
45
45
|
"./client": {
|
|
46
46
|
"types": "./dist/types/client.d.ts",
|
|
@@ -52,6 +52,26 @@
|
|
|
52
52
|
"require": "./dist/cjs/built.cjs",
|
|
53
53
|
"import": "./dist/esm/built.mjs"
|
|
54
54
|
},
|
|
55
|
+
"./utils": {
|
|
56
|
+
"types": "./dist/types/utils/index.d.ts",
|
|
57
|
+
"require": "./dist/cjs/utils/index.cjs",
|
|
58
|
+
"import": "./dist/esm/utils/index.mjs"
|
|
59
|
+
},
|
|
60
|
+
"./file": {
|
|
61
|
+
"types": "./dist/types/loadExternalFile/index.d.ts",
|
|
62
|
+
"require": "./dist/cjs/loadExternalFile/index.cjs",
|
|
63
|
+
"import": "./dist/esm/loadExternalFile/index.mjs"
|
|
64
|
+
},
|
|
65
|
+
"./env": {
|
|
66
|
+
"types": "./dist/types/loadEnvFile.d.ts",
|
|
67
|
+
"require": "./dist/cjs/loadEnvFile.cjs",
|
|
68
|
+
"import": "./dist/esm/loadEnvFile.mjs"
|
|
69
|
+
},
|
|
70
|
+
"./logger": {
|
|
71
|
+
"types": "./dist/types/logger.d.ts",
|
|
72
|
+
"require": "./dist/cjs/logger.cjs",
|
|
73
|
+
"import": "./dist/esm/logger.mjs"
|
|
74
|
+
},
|
|
55
75
|
"./package.json": "./package.json"
|
|
56
76
|
},
|
|
57
77
|
"main": "dist/cjs/index.cjs",
|
|
@@ -59,15 +79,27 @@
|
|
|
59
79
|
"types": "dist/types/index.d.ts",
|
|
60
80
|
"typesVersions": {
|
|
61
81
|
"*": {
|
|
62
|
-
".": [
|
|
63
|
-
"./dist/types/index.d.ts"
|
|
64
|
-
],
|
|
65
82
|
"client": [
|
|
66
83
|
"./dist/types/client.d.ts"
|
|
67
84
|
],
|
|
68
85
|
"built": [
|
|
69
86
|
"./dist/types/built.d.ts"
|
|
70
87
|
],
|
|
88
|
+
"node": [
|
|
89
|
+
"./dist/types/node.d.ts"
|
|
90
|
+
],
|
|
91
|
+
"utils": [
|
|
92
|
+
"./dist/types/utils/index.d.ts"
|
|
93
|
+
],
|
|
94
|
+
"file": [
|
|
95
|
+
"./dist/types/loadExternalFile/index.d.ts"
|
|
96
|
+
],
|
|
97
|
+
"env": [
|
|
98
|
+
"./dist/types/loadEnvFile.d.ts"
|
|
99
|
+
],
|
|
100
|
+
"logger": [
|
|
101
|
+
"./dist/types/logger.d.ts"
|
|
102
|
+
],
|
|
71
103
|
"package.json": [
|
|
72
104
|
"./package.json"
|
|
73
105
|
]
|
|
@@ -96,7 +128,7 @@
|
|
|
96
128
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
97
129
|
},
|
|
98
130
|
"dependencies": {
|
|
99
|
-
"@intlayer/types": "8.1.
|
|
131
|
+
"@intlayer/types": "8.1.3",
|
|
100
132
|
"defu": "6.1.4",
|
|
101
133
|
"dotenv": "17.3.1",
|
|
102
134
|
"esbuild": "0.27.2",
|
|
@@ -113,7 +145,7 @@
|
|
|
113
145
|
"vitest": "4.0.18"
|
|
114
146
|
},
|
|
115
147
|
"peerDependencies": {
|
|
116
|
-
"intlayer": "8.1.
|
|
148
|
+
"intlayer": "8.1.3",
|
|
117
149
|
"react": ">=16.0.0"
|
|
118
150
|
},
|
|
119
151
|
"peerDependenciesMeta": {
|
package/dist/cjs/alias.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_utils_getExtension = require('./utils/getExtension.cjs');
|
|
4
|
-
const require_utils_normalizePath = require('./utils/normalizePath.cjs');
|
|
5
|
-
let node_path = require("node:path");
|
|
6
|
-
|
|
7
|
-
//#region src/alias.ts
|
|
8
|
-
const getAlias = ({ configuration, format, formatter = (value) => value }) => {
|
|
9
|
-
const extension = require_utils_getExtension.getExtension(configuration, format ?? configuration.build.outputFormat[0] ?? "esm");
|
|
10
|
-
const { baseDir } = configuration.content;
|
|
11
|
-
const { mainDir, configDir } = configuration.system;
|
|
12
|
-
const fixedDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `dictionaries.${extension}`))));
|
|
13
|
-
const fixedUnmergedDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `unmerged_dictionaries.${extension}`))));
|
|
14
|
-
const fixedRemoteDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `remote_dictionaries.${extension}`))));
|
|
15
|
-
const fixedDynamicDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `dynamic_dictionaries.${extension}`))));
|
|
16
|
-
const fixedFetchDictionariesPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(mainDir, `fetch_dictionaries.${extension}`))));
|
|
17
|
-
const fixedConfigurationPath = formatter(require_utils_normalizePath.normalizePath((0, node_path.relative)(baseDir, (0, node_path.join)(configDir, `configuration.json`))));
|
|
18
|
-
return {
|
|
19
|
-
"@intlayer/dictionaries-entry": fixedDictionariesPath,
|
|
20
|
-
"@intlayer/unmerged-dictionaries-entry": fixedUnmergedDictionariesPath,
|
|
21
|
-
"@intlayer/remote-dictionaries-entry": fixedRemoteDictionariesPath,
|
|
22
|
-
"@intlayer/dynamic-dictionaries-entry": fixedDynamicDictionariesPath,
|
|
23
|
-
"@intlayer/fetch-dictionaries-entry": fixedFetchDictionariesPath,
|
|
24
|
-
"@intlayer/config/built": fixedConfigurationPath
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
exports.getAlias = getAlias;
|
|
30
|
-
//# sourceMappingURL=alias.cjs.map
|
package/dist/cjs/alias.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alias.cjs","names":["getExtension","normalizePath"],"sources":["../../src/alias.ts"],"sourcesContent":["import { join, relative } from 'node:path';\nimport type { IntlayerConfig } from '@intlayer/types';\nimport { getExtension } from './utils/getExtension';\nimport { normalizePath } from './utils/normalizePath';\n\nexport type GetAliasOptions = {\n configuration: IntlayerConfig;\n format?: 'esm' | 'cjs';\n formatter?: (value: string) => string;\n};\n\nexport const getAlias = ({\n configuration,\n format,\n formatter = (value: string) => value,\n}: GetAliasOptions) => {\n const extension = getExtension(\n configuration,\n format ?? configuration.build.outputFormat[0] ?? 'esm'\n );\n\n const { baseDir } = configuration.content;\n const { mainDir, configDir } = configuration.system;\n\n /**\n * Dictionaries\n */\n const dictionariesPath = join(mainDir, `dictionaries.${extension}`);\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n const fixedDictionariesPath = formatter(\n normalizePath(relativeDictionariesPath)\n );\n\n /**\n * Unmerged dictionaries\n */\n const unmergedDictionariesPath = join(\n mainDir,\n `unmerged_dictionaries.${extension}`\n );\n const relativeUnmergedDictionariesPath = relative(\n baseDir,\n unmergedDictionariesPath\n );\n const fixedUnmergedDictionariesPath = formatter(\n normalizePath(relativeUnmergedDictionariesPath)\n );\n\n /**\n * Remote dictionaries\n */\n const remoteDictionariesPath = join(\n mainDir,\n `remote_dictionaries.${extension}`\n );\n const relativeRemoteDictionariesPath = relative(\n baseDir,\n remoteDictionariesPath\n );\n const fixedRemoteDictionariesPath = formatter(\n normalizePath(relativeRemoteDictionariesPath)\n );\n\n /**\n * Dynamic dictionaries\n */\n const dynamicDictionariesPath = join(\n mainDir,\n `dynamic_dictionaries.${extension}`\n );\n const relativeDynamicDictionariesPath = relative(\n baseDir,\n dynamicDictionariesPath\n );\n const fixedDynamicDictionariesPath = formatter(\n normalizePath(relativeDynamicDictionariesPath)\n );\n\n /**\n * Fetch dictionaries\n */\n const fetchDictionariesPath = join(\n mainDir,\n `fetch_dictionaries.${extension}`\n );\n const relativeFetchDictionariesPath = relative(\n baseDir,\n fetchDictionariesPath\n );\n const fixedFetchDictionariesPath = formatter(\n normalizePath(relativeFetchDictionariesPath)\n );\n\n /**\n * Configuration\n */\n const configurationPath = join(configDir, `configuration.json`);\n const relativeConfigurationPath = relative(baseDir, configurationPath);\n const fixedConfigurationPath = formatter(\n normalizePath(relativeConfigurationPath)\n );\n\n return {\n '@intlayer/dictionaries-entry': fixedDictionariesPath,\n '@intlayer/unmerged-dictionaries-entry': fixedUnmergedDictionariesPath,\n '@intlayer/remote-dictionaries-entry': fixedRemoteDictionariesPath,\n '@intlayer/dynamic-dictionaries-entry': fixedDynamicDictionariesPath,\n '@intlayer/fetch-dictionaries-entry': fixedFetchDictionariesPath,\n '@intlayer/config/built': fixedConfigurationPath,\n } as const;\n};\n"],"mappings":";;;;;;;AAWA,MAAa,YAAY,EACvB,eACA,QACA,aAAa,UAAkB,YACV;CACrB,MAAM,YAAYA,wCAChB,eACA,UAAU,cAAc,MAAM,aAAa,MAAM,MAClD;CAED,MAAM,EAAE,YAAY,cAAc;CAClC,MAAM,EAAE,SAAS,cAAc,cAAc;CAO7C,MAAM,wBAAwB,UAC5BC,kEAFwC,6BADZ,SAAS,gBAAgB,YAAY,CACC,CAE3B,CACxC;CAaD,MAAM,gCAAgC,UACpCA,kEAJA,6BAJA,SACA,yBAAyB,YAC1B,CAIA,CAEgD,CAChD;CAaD,MAAM,8BAA8B,UAClCA,kEAJA,6BAJA,SACA,uBAAuB,YACxB,CAIA,CAE8C,CAC9C;CAaD,MAAM,+BAA+B,UACnCA,kEAJA,6BAJA,SACA,wBAAwB,YACzB,CAIA,CAE+C,CAC/C;CAaD,MAAM,6BAA6B,UACjCA,kEAJA,6BAJA,SACA,sBAAsB,YACvB,CAIA,CAE6C,CAC7C;CAOD,MAAM,yBAAyB,UAC7BA,kEAFyC,6BADZ,WAAW,qBAAqB,CACO,CAE5B,CACzC;AAED,QAAO;EACL,gCAAgC;EAChC,yCAAyC;EACzC,uCAAuC;EACvC,wCAAwC;EACxC,sCAAsC;EACtC,0BAA0B;EAC3B"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let esbuild = require("esbuild");
|
|
4
|
-
|
|
5
|
-
//#region src/bundleJSFile.ts
|
|
6
|
-
const commonBuildOptions = {
|
|
7
|
-
bundle: true,
|
|
8
|
-
format: "cjs",
|
|
9
|
-
platform: "node",
|
|
10
|
-
target: "es2019",
|
|
11
|
-
sourcemap: false,
|
|
12
|
-
logLevel: "silent",
|
|
13
|
-
write: true,
|
|
14
|
-
packages: "external",
|
|
15
|
-
loader: {
|
|
16
|
-
".js": "js",
|
|
17
|
-
".jsx": "jsx",
|
|
18
|
-
".mjs": "js",
|
|
19
|
-
".ts": "ts",
|
|
20
|
-
".tsx": "tsx",
|
|
21
|
-
".cjs": "js",
|
|
22
|
-
".json": "json",
|
|
23
|
-
".md": "text",
|
|
24
|
-
".mdx": "text"
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const bundleJSFile = async (buildOptions) => await (0, esbuild.build)({
|
|
28
|
-
...commonBuildOptions,
|
|
29
|
-
...buildOptions
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
|
-
exports.bundleJSFile = bundleJSFile;
|
|
34
|
-
//# sourceMappingURL=bundleJSFile.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundleJSFile.cjs","names":[],"sources":["../../src/bundleJSFile.ts"],"sourcesContent":["import { type BuildOptions, build } from 'esbuild';\n\nconst commonBuildOptions = {\n bundle: true,\n format: 'cjs',\n platform: 'node',\n target: 'es2019',\n sourcemap: false,\n logLevel: 'silent',\n write: true,\n // Bundle relative/local files, but keep bare module imports external\n packages: 'external',\n loader: {\n '.js': 'js',\n '.jsx': 'jsx',\n '.mjs': 'js',\n '.ts': 'ts',\n '.tsx': 'tsx',\n '.cjs': 'js',\n '.json': 'json',\n '.md': 'text',\n '.mdx': 'text',\n },\n} as const;\n\nexport const bundleJSFile = async (buildOptions: BuildOptions) =>\n await build({\n ...commonBuildOptions,\n ...buildOptions,\n });\n"],"mappings":";;;;;AAEA,MAAM,qBAAqB;CACzB,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,WAAW;CACX,UAAU;CACV,OAAO;CAEP,UAAU;CACV,QAAQ;EACN,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,OAAO;EACP,QAAQ;EACT;CACF;AAED,MAAa,eAAe,OAAO,iBACjC,yBAAY;CACV,GAAG;CACH,GAAG;CACJ,CAAC"}
|