@intlayer/config 7.0.3 → 7.0.4-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/configFile/getConfiguration.cjs +1 -1
- package/dist/cjs/index.cjs +6 -6
- package/dist/cjs/loadExternalFile/parseFileContent.cjs +3 -3
- package/dist/cjs/loadExternalFile/transpileTSToMJS.cjs +1 -1
- package/dist/cjs/package.cjs +1 -1
- package/dist/cjs/package.cjs.map +1 -1
- package/dist/cjs/utils/getPackageJsonPath.cjs +0 -2
- package/dist/cjs/utils/getPackageJsonPath.cjs.map +1 -1
- package/dist/esm/configFile/getConfiguration.mjs +1 -1
- package/dist/esm/index.mjs +6 -6
- package/dist/esm/loadExternalFile/parseFileContent.mjs +2 -2
- package/dist/esm/loadExternalFile/transpileTSToMJS.mjs +1 -1
- package/dist/esm/package.mjs +1 -1
- package/dist/esm/package.mjs.map +1 -1
- package/dist/esm/utils/getPackageJsonPath.mjs +0 -2
- package/dist/esm/utils/getPackageJsonPath.mjs.map +1 -1
- package/dist/types/utils/getPackageJsonPath.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_logger = require('../logger.cjs');
|
|
3
3
|
const require_utils_cache = require('../utils/cache.cjs');
|
|
4
|
+
const require_utils_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
|
|
4
5
|
const require_configFile_buildConfigurationFields = require('./buildConfigurationFields.cjs');
|
|
5
6
|
const require_configFile_searchConfigurationFile = require('./searchConfigurationFile.cjs');
|
|
6
|
-
const require_utils_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
|
|
7
7
|
const require_configFile_loadConfigurationFile = require('./loadConfigurationFile.cjs');
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,20 +3,20 @@ const require_utils_normalizePath = require('./utils/normalizePath.cjs');
|
|
|
3
3
|
const require_alias = require('./alias.cjs');
|
|
4
4
|
const require_logger = require('./logger.cjs');
|
|
5
5
|
const require_utils_cache = require('./utils/cache.cjs');
|
|
6
|
-
const
|
|
6
|
+
const require_utils_getPackageJsonPath = require('./utils/getPackageJsonPath.cjs');
|
|
7
7
|
const require_configFile_buildConfigurationFields = require('./configFile/buildConfigurationFields.cjs');
|
|
8
|
+
const require_utils_ESMxCJSHelpers = require('./utils/ESMxCJSHelpers.cjs');
|
|
9
|
+
const require_loadEnvFile = require('./loadEnvFile.cjs');
|
|
10
|
+
const require_loadExternalFile_parseFileContent = require('./loadExternalFile/parseFileContent.cjs');
|
|
11
|
+
const require_bundleJSFile = require('./bundleJSFile.cjs');
|
|
8
12
|
const require_configFile_searchConfigurationFile = require('./configFile/searchConfigurationFile.cjs');
|
|
9
13
|
const require_defaultValues_index = require('./defaultValues/index.cjs');
|
|
10
|
-
const require_loadEnvFile = require('./loadEnvFile.cjs');
|
|
11
14
|
const require_loadExternalFile_bundleFile = require('./loadExternalFile/bundleFile.cjs');
|
|
12
|
-
const require_utils_ESMxCJSHelpers = require('./utils/ESMxCJSHelpers.cjs');
|
|
13
|
-
const require_loadExternalFile_parseFileContent = require('./loadExternalFile/parseFileContent.cjs');
|
|
14
|
-
const require_loadExternalFile_loadExternalFile = require('./loadExternalFile/loadExternalFile.cjs');
|
|
15
15
|
const require_utils_extractErrorMessage = require('./utils/extractErrorMessage.cjs');
|
|
16
16
|
const require_retryManager = require('./retryManager.cjs');
|
|
17
17
|
const require_utils_clearModuleCache = require('./utils/clearModuleCache.cjs');
|
|
18
18
|
const require_utils_logStack = require('./utils/logStack.cjs');
|
|
19
|
-
const
|
|
19
|
+
const require_loadExternalFile_loadExternalFile = require('./loadExternalFile/loadExternalFile.cjs');
|
|
20
20
|
const require_configFile_getConfiguration = require('./configFile/getConfiguration.cjs');
|
|
21
21
|
|
|
22
22
|
exports.ANSIColors = require_logger.ANSIColors;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_loadEnvFile = require('../loadEnvFile.cjs');
|
|
3
2
|
const require_utils_ESMxCJSHelpers = require('../utils/ESMxCJSHelpers.cjs');
|
|
4
|
-
|
|
5
|
-
esbuild = require_rolldown_runtime.__toESM(esbuild);
|
|
3
|
+
const require_loadEnvFile = require('../loadEnvFile.cjs');
|
|
6
4
|
let node_vm = require("node:vm");
|
|
7
5
|
node_vm = require_rolldown_runtime.__toESM(node_vm);
|
|
6
|
+
let esbuild = require("esbuild");
|
|
7
|
+
esbuild = require_rolldown_runtime.__toESM(esbuild);
|
|
8
8
|
|
|
9
9
|
//#region src/loadExternalFile/parseFileContent.ts
|
|
10
10
|
const getSandBoxContext = (options) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_loadExternalFile_bundleFile = require('./bundleFile.cjs');
|
|
3
2
|
const require_utils_getPackageJsonPath = require('../utils/getPackageJsonPath.cjs');
|
|
3
|
+
const require_loadExternalFile_bundleFile = require('./bundleFile.cjs');
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
6
6
|
let esbuild = require("esbuild");
|
package/dist/cjs/package.cjs
CHANGED
package/dist/cjs/package.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.cjs","names":[],"sources":["../../package.json"],"sourcesContent":["{\n \"name\": \"@intlayer/config\",\n \"version\": \"7.0.
|
|
1
|
+
{"version":3,"file":"package.cjs","names":[],"sources":["../../package.json"],"sourcesContent":["{\n \"name\": \"@intlayer/config\",\n \"version\": \"7.0.4-canary.0\",\n \"private\": false,\n \"description\": \"Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.\",\n \"keywords\": [\n \"intlayer\",\n \"layer\",\n \"abstraction\",\n \"data\",\n \"internationalization\",\n \"i18n\",\n \"typescript\",\n \"javascript\",\n \"json\",\n \"file\"\n ],\n \"homepage\": \"https://intlayer.org\",\n \"bugs\": {\n \"url\": \"https://github.com/aymericzip/intlayer/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/aymericzip/intlayer.git\"\n },\n \"license\": \"Apache-2.0\",\n \"author\": {\n \"name\": \"Aymeric PINEAU\",\n \"url\": \"https://github.com/aymericzip\"\n },\n \"contributors\": [\n {\n \"name\": \"Aymeric Pineau\",\n \"email\": \"ay.pineau@gmail.com\",\n \"url\": \"https://github.com/aymericzip\"\n }\n ],\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"browser\": \"./dist/esm/client.mjs\",\n \"require\": \"./dist/cjs/index.cjs\",\n \"import\": \"./dist/esm/index.mjs\"\n },\n \"./client\": {\n \"types\": \"./dist/types/client.d.ts\",\n \"require\": \"./dist/cjs/client.cjs\",\n \"import\": \"./dist/esm/client.mjs\"\n },\n \"./built\": {\n \"types\": \"./dist/types/built.d.ts\",\n \"require\": \"./dist/cjs/built.cjs\",\n \"import\": \"./dist/esm/built.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"dist/cjs/index.cjs\",\n \"module\": \"dist/esm/index.mjs\",\n \"types\": \"dist/types/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \".\": [\n \"./dist/types/index.d.ts\"\n ],\n \"client\": [\n \"./dist/types/client.d.ts\"\n ],\n \"built\": [\n \"./dist/types/built.d.ts\"\n ],\n \"package.json\": [\n \"./package.json\"\n ]\n }\n },\n \"files\": [\n \"./dist\",\n \"./package.json\"\n ],\n \"scripts\": {\n \"build\": \"tsdown --config tsdown.config.ts\",\n \"build:ci\": \"tsdown --config tsdown.config.ts\",\n \"clean\": \"rimraf ./dist .turbo\",\n \"dev\": \"tsdown --config tsdown.config.ts --watch\",\n \"format\": \"biome format . --check\",\n \"format:fix\": \"biome format --write .\",\n \"lint\": \"biome lint .\",\n \"lint:fix\": \"biome lint --write .\",\n \"prepublish\": \"cp -f ../../../README.md ./README.md\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"typecheck\": \"tsc --noEmit --project tsconfig.types.json\"\n },\n \"dependencies\": {\n \"@intlayer/types\": \"workspace:*\",\n \"deepmerge\": \"4.3.1\",\n \"dotenv\": \"16.6.1\",\n \"esbuild\": \"0.25.2\"\n },\n \"devDependencies\": {\n \"@types/node\": \"24.9.2\",\n \"@utils/ts-config\": \"workspace:*\",\n \"@utils/ts-config-types\": \"workspace:*\",\n \"@utils/tsdown-config\": \"workspace:*\",\n \"rimraf\": \"6.0.1\",\n \"tsdown\": \"0.15.11\",\n \"typescript\": \"5.9.3\",\n \"vitest\": \"4.0.5\"\n },\n \"peerDependencies\": {\n \"intlayer\": \"workspace:*\",\n \"react\": \">=16.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"intlayer\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n }\n },\n \"engines\": {\n \"node\": \">=14.18\"\n },\n \"bug\": {\n \"url\": \"https://github.com/aymericzip/intlayer/issues\"\n }\n}\n"],"mappings":";;cAEa"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_utils_cache = require('./cache.cjs');
|
|
3
|
-
const require_utils_logStack = require('./logStack.cjs');
|
|
4
3
|
let node_path = require("node:path");
|
|
5
4
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
6
5
|
let node_fs = require("node:fs");
|
|
@@ -29,7 +28,6 @@ const getPackageJsonPath = (startDir = process.cwd()) => {
|
|
|
29
28
|
if (parentDir === currentDir) break;
|
|
30
29
|
currentDir = parentDir;
|
|
31
30
|
}
|
|
32
|
-
require_utils_logStack.logStack("test");
|
|
33
31
|
throw new Error(`Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`);
|
|
34
32
|
};
|
|
35
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackageJsonPath.cjs","names":["cache"],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport {
|
|
1
|
+
{"version":3,"file":"getPackageJsonPath.cjs","names":["cache"],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { cache } from './cache';\n\nexport const isESModule = typeof import.meta.url === 'string';\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 = cache.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 cache.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":";;;;;;;;AAIA,MAAa,aAAa,yDAA2B;AAErD,MAAM,aAAa;AAOnB,MAAa,sBACX,WAAmB,QAAQ,KAAK,KACP;CACzB,MAAM,eAAeA,0BAAM,IACzB,mBACA,SACD;AAED,KAAI,aAAc,QAAO;CAEzB,IAAI,aAAa;AAEjB,MAAK,IAAI,QAAQ,GAAG,QAAQ,YAAY,SAAS;EAC/C,MAAM,sCAAuB,YAAY,eAAe;AAExD,8BAAe,gBAAgB,EAAE;AAC/B,6BAAM,IAAI,mBAAmB,UAAU;IACrC;IACA,SAAS;IACV,CAAC;AAEF,UAAO;IAAE;IAAiB,SAAS;IAAY;;EAGjD,MAAM,mCAAoB,WAAW;AAGrC,MAAI,cAAc,WAChB;AAGF,eAAa;;AAGf,OAAM,IAAI,MACR,kEAAkE,WAAW,sCAAsC,WACpH"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { logger } from "../logger.mjs";
|
|
2
2
|
import { cache } from "../utils/cache.mjs";
|
|
3
|
+
import { getPackageJsonPath } from "../utils/getPackageJsonPath.mjs";
|
|
3
4
|
import { buildConfigurationFields } from "./buildConfigurationFields.mjs";
|
|
4
5
|
import { searchConfigurationFile } from "./searchConfigurationFile.mjs";
|
|
5
|
-
import { getPackageJsonPath } from "../utils/getPackageJsonPath.mjs";
|
|
6
6
|
import { loadConfigurationFile } from "./loadConfigurationFile.mjs";
|
|
7
7
|
import { relative } from "node:path";
|
|
8
8
|
import merge from "deepmerge";
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,20 +3,20 @@ import { normalizePath } from "./utils/normalizePath.mjs";
|
|
|
3
3
|
import { getAlias } from "./alias.mjs";
|
|
4
4
|
import { ANSIColors, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, getAppLogger, logger, removeColor, spinnerFrames, v, x } from "./logger.mjs";
|
|
5
5
|
import { cache, clearCache, getCache, localCache, setCache } from "./utils/cache.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { getPackageJsonPath } from "./utils/getPackageJsonPath.mjs";
|
|
7
7
|
import { buildConfigurationFields } from "./configFile/buildConfigurationFields.mjs";
|
|
8
|
+
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./utils/ESMxCJSHelpers.mjs";
|
|
9
|
+
import { getEnvFilePath, loadEnvFile } from "./loadEnvFile.mjs";
|
|
10
|
+
import { parseFileContent } from "./loadExternalFile/parseFileContent.mjs";
|
|
11
|
+
import { bundleJSFile } from "./bundleJSFile.mjs";
|
|
8
12
|
import { searchConfigurationFile } from "./configFile/searchConfigurationFile.mjs";
|
|
9
13
|
import { defaultValues_exports } from "./defaultValues/index.mjs";
|
|
10
|
-
import { getEnvFilePath, loadEnvFile } from "./loadEnvFile.mjs";
|
|
11
14
|
import { bundleFile, bundleFileSync } from "./loadExternalFile/bundleFile.mjs";
|
|
12
|
-
import { configESMxCJSRequire, getProjectRequire, isESModule } from "./utils/ESMxCJSHelpers.mjs";
|
|
13
|
-
import { parseFileContent } from "./loadExternalFile/parseFileContent.mjs";
|
|
14
|
-
import { loadExternalFile, loadExternalFileSync } from "./loadExternalFile/loadExternalFile.mjs";
|
|
15
15
|
import { extractErrorMessage } from "./utils/extractErrorMessage.mjs";
|
|
16
16
|
import { retryManager } from "./retryManager.mjs";
|
|
17
17
|
import { clearModuleCache } from "./utils/clearModuleCache.mjs";
|
|
18
18
|
import { logStack } from "./utils/logStack.mjs";
|
|
19
|
-
import {
|
|
19
|
+
import { loadExternalFile, loadExternalFileSync } from "./loadExternalFile/loadExternalFile.mjs";
|
|
20
20
|
import { getConfiguration, getConfigurationAndFilePath } from "./configFile/getConfiguration.mjs";
|
|
21
21
|
|
|
22
22
|
export { ANSIColors, defaultValues_exports as DefaultValues, buildConfigurationFields, bundleFile, bundleFileSync, bundleJSFile, cache, clearCache, clearModuleCache, clock, colon, colorize, colorizeKey, colorizeLocales, colorizeNumber, colorizePath, configESMxCJSRequire, extractErrorMessage, getAlias, getAppLogger, getCache, getConfiguration, getConfigurationAndFilePath, getEnvFilePath, getExtension, getPackageJsonPath, getProjectRequire, isESModule, loadEnvFile, loadExternalFile, loadExternalFileSync, localCache, logStack, logger, normalizePath, parseFileContent, removeColor, retryManager, searchConfigurationFile, setCache, spinnerFrames, v, x };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { loadEnvFile } from "../loadEnvFile.mjs";
|
|
2
1
|
import { getProjectRequire } from "../utils/ESMxCJSHelpers.mjs";
|
|
3
|
-
import
|
|
2
|
+
import { loadEnvFile } from "../loadEnvFile.mjs";
|
|
4
3
|
import { runInNewContext } from "node:vm";
|
|
4
|
+
import * as esbuild from "esbuild";
|
|
5
5
|
|
|
6
6
|
//#region src/loadExternalFile/parseFileContent.ts
|
|
7
7
|
const getSandBoxContext = (options) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getLoader } from "./bundleFile.mjs";
|
|
2
1
|
import { getPackageJsonPath } from "../utils/getPackageJsonPath.mjs";
|
|
2
|
+
import { getLoader } from "./bundleFile.mjs";
|
|
3
3
|
import { dirname, extname, join } from "node:path";
|
|
4
4
|
import { build, buildSync } from "esbuild";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
package/dist/esm/package.mjs
CHANGED
package/dist/esm/package.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.mjs","names":[],"sources":["../../package.json"],"sourcesContent":["{\n \"name\": \"@intlayer/config\",\n \"version\": \"7.0.
|
|
1
|
+
{"version":3,"file":"package.mjs","names":[],"sources":["../../package.json"],"sourcesContent":["{\n \"name\": \"@intlayer/config\",\n \"version\": \"7.0.4-canary.0\",\n \"private\": false,\n \"description\": \"Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.\",\n \"keywords\": [\n \"intlayer\",\n \"layer\",\n \"abstraction\",\n \"data\",\n \"internationalization\",\n \"i18n\",\n \"typescript\",\n \"javascript\",\n \"json\",\n \"file\"\n ],\n \"homepage\": \"https://intlayer.org\",\n \"bugs\": {\n \"url\": \"https://github.com/aymericzip/intlayer/issues\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/aymericzip/intlayer.git\"\n },\n \"license\": \"Apache-2.0\",\n \"author\": {\n \"name\": \"Aymeric PINEAU\",\n \"url\": \"https://github.com/aymericzip\"\n },\n \"contributors\": [\n {\n \"name\": \"Aymeric Pineau\",\n \"email\": \"ay.pineau@gmail.com\",\n \"url\": \"https://github.com/aymericzip\"\n }\n ],\n \"sideEffects\": false,\n \"exports\": {\n \".\": {\n \"types\": \"./dist/types/index.d.ts\",\n \"browser\": \"./dist/esm/client.mjs\",\n \"require\": \"./dist/cjs/index.cjs\",\n \"import\": \"./dist/esm/index.mjs\"\n },\n \"./client\": {\n \"types\": \"./dist/types/client.d.ts\",\n \"require\": \"./dist/cjs/client.cjs\",\n \"import\": \"./dist/esm/client.mjs\"\n },\n \"./built\": {\n \"types\": \"./dist/types/built.d.ts\",\n \"require\": \"./dist/cjs/built.cjs\",\n \"import\": \"./dist/esm/built.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"dist/cjs/index.cjs\",\n \"module\": \"dist/esm/index.mjs\",\n \"types\": \"dist/types/index.d.ts\",\n \"typesVersions\": {\n \"*\": {\n \".\": [\n \"./dist/types/index.d.ts\"\n ],\n \"client\": [\n \"./dist/types/client.d.ts\"\n ],\n \"built\": [\n \"./dist/types/built.d.ts\"\n ],\n \"package.json\": [\n \"./package.json\"\n ]\n }\n },\n \"files\": [\n \"./dist\",\n \"./package.json\"\n ],\n \"scripts\": {\n \"build\": \"tsdown --config tsdown.config.ts\",\n \"build:ci\": \"tsdown --config tsdown.config.ts\",\n \"clean\": \"rimraf ./dist .turbo\",\n \"dev\": \"tsdown --config tsdown.config.ts --watch\",\n \"format\": \"biome format . --check\",\n \"format:fix\": \"biome format --write .\",\n \"lint\": \"biome lint .\",\n \"lint:fix\": \"biome lint --write .\",\n \"prepublish\": \"cp -f ../../../README.md ./README.md\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"typecheck\": \"tsc --noEmit --project tsconfig.types.json\"\n },\n \"dependencies\": {\n \"@intlayer/types\": \"workspace:*\",\n \"deepmerge\": \"4.3.1\",\n \"dotenv\": \"16.6.1\",\n \"esbuild\": \"0.25.2\"\n },\n \"devDependencies\": {\n \"@types/node\": \"24.9.2\",\n \"@utils/ts-config\": \"workspace:*\",\n \"@utils/ts-config-types\": \"workspace:*\",\n \"@utils/tsdown-config\": \"workspace:*\",\n \"rimraf\": \"6.0.1\",\n \"tsdown\": \"0.15.11\",\n \"typescript\": \"5.9.3\",\n \"vitest\": \"4.0.5\"\n },\n \"peerDependencies\": {\n \"intlayer\": \"workspace:*\",\n \"react\": \">=16.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"intlayer\": {\n \"optional\": true\n },\n \"react\": {\n \"optional\": true\n }\n },\n \"engines\": {\n \"node\": \">=14.18\"\n },\n \"bug\": {\n \"url\": \"https://github.com/aymericzip/intlayer/issues\"\n }\n}\n"],"mappings":";cAEa"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { cache } from "./cache.mjs";
|
|
2
|
-
import { logStack } from "./logStack.mjs";
|
|
3
2
|
import { dirname, join } from "node:path";
|
|
4
3
|
import { existsSync } from "node:fs";
|
|
5
4
|
|
|
@@ -26,7 +25,6 @@ const getPackageJsonPath = (startDir = process.cwd()) => {
|
|
|
26
25
|
if (parentDir === currentDir) break;
|
|
27
26
|
currentDir = parentDir;
|
|
28
27
|
}
|
|
29
|
-
logStack("test");
|
|
30
28
|
throw new Error(`Could not find package.json in current directory or any of the ${MAX_LEVELS} parent directories. Searched from: ${startDir}`);
|
|
31
29
|
};
|
|
32
30
|
|
|
@@ -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 {
|
|
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 { cache } from './cache';\n\nexport const isESModule = typeof import.meta.url === 'string';\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 = cache.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 cache.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":";;;;;AAIA,MAAa,aAAa,OAAO,OAAO,KAAK,QAAQ;AAErD,MAAM,aAAa;AAOnB,MAAa,sBACX,WAAmB,QAAQ,KAAK,KACP;CACzB,MAAM,eAAe,MAAM,IACzB,mBACA,SACD;AAED,KAAI,aAAc,QAAO;CAEzB,IAAI,aAAa;AAEjB,MAAK,IAAI,QAAQ,GAAG,QAAQ,YAAY,SAAS;EAC/C,MAAM,kBAAkB,KAAK,YAAY,eAAe;AAExD,MAAI,WAAW,gBAAgB,EAAE;AAC/B,SAAM,IAAI,mBAAmB,UAAU;IACrC;IACA,SAAS;IACV,CAAC;AAEF,UAAO;IAAE;IAAiB,SAAS;IAAY;;EAGjD,MAAM,YAAY,QAAQ,WAAW;AAGrC,MAAI,cAAc,WAChB;AAGF,eAAa;;AAGf,OAAM,IAAI,MACR,kEAAkE,WAAW,sCAAsC,WACpH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPackageJsonPath.d.ts","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"getPackageJsonPath.d.ts","names":[],"sources":["../../../src/utils/getPackageJsonPath.ts"],"sourcesContent":[],"mappings":";cAIa;AAAb,KAIK,oBAAA,GAJwD;EAIxD,eAAA,EAAA,MAAoB;EAKZ,OAAA,EAAA,MAAA;;cAAA,2CAEV"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/config",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4-canary.0",
|
|
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": [
|
|
@@ -93,23 +93,23 @@
|
|
|
93
93
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@intlayer/types": "
|
|
96
|
+
"@intlayer/types": "workspace:*",
|
|
97
97
|
"deepmerge": "4.3.1",
|
|
98
98
|
"dotenv": "16.6.1",
|
|
99
99
|
"esbuild": "0.25.2"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/node": "24.9.2",
|
|
103
|
-
"@utils/ts-config": "
|
|
104
|
-
"@utils/ts-config-types": "
|
|
105
|
-
"@utils/tsdown-config": "
|
|
103
|
+
"@utils/ts-config": "workspace:*",
|
|
104
|
+
"@utils/ts-config-types": "workspace:*",
|
|
105
|
+
"@utils/tsdown-config": "workspace:*",
|
|
106
106
|
"rimraf": "6.0.1",
|
|
107
107
|
"tsdown": "0.15.11",
|
|
108
108
|
"typescript": "5.9.3",
|
|
109
109
|
"vitest": "4.0.5"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
|
-
"intlayer": "
|
|
112
|
+
"intlayer": "workspace:*",
|
|
113
113
|
"react": ">=16.0.0"
|
|
114
114
|
},
|
|
115
115
|
"peerDependenciesMeta": {
|