@intlayer/config 8.9.4 → 8.9.6-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.
@@ -240,7 +240,7 @@ const buildEditorFields = (customConfiguration) => {
240
240
  *
241
241
  * Default: false
242
242
  */
243
- liveSync: customConfiguration?.liveSync ?? true,
243
+ liveSync: customConfiguration?.liveSync ?? false,
244
244
  /**
245
245
  * Port of the live sync server
246
246
  *
@@ -7,7 +7,7 @@ const CMS_URL = "https://app.intlayer.org";
7
7
  const BACKEND_URL = "https://back.intlayer.org";
8
8
  const PORT = 8e3;
9
9
  const IS_ENABLED = false;
10
- const LIVE_SYNC = true;
10
+ const LIVE_SYNC = false;
11
11
  const DICTIONARY_PRIORITY_STRATEGY = "local_first";
12
12
  const LIVE_SYNC_PORT = 4e3;
13
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"editor.cjs","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":["export const APPLICATION_URL = undefined;\nexport const EDITOR_URL = 'http://localhost:8000';\nexport const CMS_URL = 'https://app.intlayer.org';\nexport const BACKEND_URL = 'https://back.intlayer.org';\nexport const PORT = 8000;\nexport const IS_ENABLED = false;\nexport const LIVE_SYNC = true;\nexport const DICTIONARY_PRIORITY_STRATEGY = 'local_first';\nexport const LIVE_SYNC_PORT = 4000;\n"],"mappings":";;;AAAA,MAAa,kBAAkB;AAC/B,MAAa,aAAa;AAC1B,MAAa,UAAU;AACvB,MAAa,cAAc;AAC3B,MAAa,OAAO;AACpB,MAAa,aAAa;AAC1B,MAAa,YAAY;AACzB,MAAa,+BAA+B;AAC5C,MAAa,iBAAiB"}
1
+ {"version":3,"file":"editor.cjs","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":["export const APPLICATION_URL = undefined;\nexport const EDITOR_URL = 'http://localhost:8000';\nexport const CMS_URL = 'https://app.intlayer.org';\nexport const BACKEND_URL = 'https://back.intlayer.org';\nexport const PORT = 8000;\nexport const IS_ENABLED = false;\nexport const LIVE_SYNC = false;\nexport const DICTIONARY_PRIORITY_STRATEGY = 'local_first';\nexport const LIVE_SYNC_PORT = 4000;\n"],"mappings":";;;AAAA,MAAa,kBAAkB;AAC/B,MAAa,aAAa;AAC1B,MAAa,UAAU;AACvB,MAAa,cAAc;AAC3B,MAAa,OAAO;AACpB,MAAa,aAAa;AAC1B,MAAa,YAAY;AACzB,MAAa,+BAA+B;AAC5C,MAAa,iBAAiB"}
@@ -13,6 +13,7 @@ const require_utils_getStorageAttributes = require('./getStorageAttributes.cjs')
13
13
  const require_utils_getUsedNodeTypes = require('./getUsedNodeTypes.cjs');
14
14
  const require_utils_logStack = require('./logStack.cjs');
15
15
  const require_utils_parseFilePathPattern = require('./parseFilePathPattern.cjs');
16
+ const require_utils_pathSecurity = require('./pathSecurity.cjs');
16
17
  const require_utils_retryManager = require('./retryManager.cjs');
17
18
  const require_utils_setIntlayerIdentifier = require('./setIntlayerIdentifier.cjs');
18
19
  const require_utils_stringFormatter_camelCaseToKebabCase = require('./stringFormatter/camelCaseToKebabCase.cjs');
@@ -20,6 +21,7 @@ const require_utils_stringFormatter_camelCaseToSentence = require('./stringForma
20
21
  const require_utils_stringFormatter_kebabCaseToCamelCase = require('./stringFormatter/kebabCaseToCamelCase.cjs');
21
22
  const require_utils_stringFormatter_toLowerCamelCase = require('./stringFormatter/toLowerCamelCase.cjs');
22
23
 
24
+ exports.assertPathWithin = require_utils_pathSecurity.assertPathWithin;
23
25
  exports.cacheDisk = require_utils_cacheDisk.cacheDisk;
24
26
  exports.cacheMemory = require_utils_cacheMemory.cacheMemory;
25
27
  exports.camelCaseToKebabCase = require_utils_stringFormatter_camelCaseToKebabCase.camelCaseToKebabCase;
@@ -0,0 +1,20 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let node_path = require("node:path");
4
+
5
+ //#region src/utils/pathSecurity.ts
6
+ /**
7
+ * Throws if `resolvedPath` escapes `baseDir`.
8
+ * Use this before any file operation whose path is derived from user-controlled
9
+ * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent
10
+ * path-traversal attacks.
11
+ */
12
+ const assertPathWithin = (resolvedPath, baseDir) => {
13
+ const normalizedBase = (0, node_path.resolve)(baseDir);
14
+ const normalizedPath = (0, node_path.resolve)(resolvedPath);
15
+ if (normalizedPath !== normalizedBase && !normalizedPath.startsWith(normalizedBase + node_path.sep)) throw new Error(`Path traversal detected: "${resolvedPath}" escapes the base directory "${baseDir}"`);
16
+ };
17
+
18
+ //#endregion
19
+ exports.assertPathWithin = assertPathWithin;
20
+ //# sourceMappingURL=pathSecurity.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathSecurity.cjs","names":["sep"],"sources":["../../../src/utils/pathSecurity.ts"],"sourcesContent":["import { resolve, sep } from 'node:path';\n\n/**\n * Throws if `resolvedPath` escapes `baseDir`.\n * Use this before any file operation whose path is derived from user-controlled\n * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent\n * path-traversal attacks.\n */\nexport const assertPathWithin = (\n resolvedPath: string,\n baseDir: string\n): void => {\n const normalizedBase = resolve(baseDir);\n const normalizedPath = resolve(resolvedPath);\n if (\n normalizedPath !== normalizedBase &&\n !normalizedPath.startsWith(normalizedBase + sep)\n ) {\n throw new Error(\n `Path traversal detected: \"${resolvedPath}\" escapes the base directory \"${baseDir}\"`\n );\n }\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,oBACX,cACA,YACS;CACT,MAAM,wCAAyB,QAAQ;CACvC,MAAM,wCAAyB,aAAa;CAC5C,IACE,mBAAmB,kBACnB,CAAC,eAAe,WAAW,iBAAiBA,cAAI,EAEhD,MAAM,IAAI,MACR,6BAA6B,aAAa,gCAAgC,QAAQ,GACnF"}
@@ -239,7 +239,7 @@ const buildEditorFields = (customConfiguration) => {
239
239
  *
240
240
  * Default: false
241
241
  */
242
- liveSync: customConfiguration?.liveSync ?? true,
242
+ liveSync: customConfiguration?.liveSync ?? false,
243
243
  /**
244
244
  * Port of the live sync server
245
245
  *
@@ -5,7 +5,7 @@ const CMS_URL = "https://app.intlayer.org";
5
5
  const BACKEND_URL = "https://back.intlayer.org";
6
6
  const PORT = 8e3;
7
7
  const IS_ENABLED = false;
8
- const LIVE_SYNC = true;
8
+ const LIVE_SYNC = false;
9
9
  const DICTIONARY_PRIORITY_STRATEGY = "local_first";
10
10
  const LIVE_SYNC_PORT = 4e3;
11
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"editor.mjs","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":["export const APPLICATION_URL = undefined;\nexport const EDITOR_URL = 'http://localhost:8000';\nexport const CMS_URL = 'https://app.intlayer.org';\nexport const BACKEND_URL = 'https://back.intlayer.org';\nexport const PORT = 8000;\nexport const IS_ENABLED = false;\nexport const LIVE_SYNC = true;\nexport const DICTIONARY_PRIORITY_STRATEGY = 'local_first';\nexport const LIVE_SYNC_PORT = 4000;\n"],"mappings":";AAAA,MAAa,kBAAkB;AAC/B,MAAa,aAAa;AAC1B,MAAa,UAAU;AACvB,MAAa,cAAc;AAC3B,MAAa,OAAO;AACpB,MAAa,aAAa;AAC1B,MAAa,YAAY;AACzB,MAAa,+BAA+B;AAC5C,MAAa,iBAAiB"}
1
+ {"version":3,"file":"editor.mjs","names":[],"sources":["../../../src/defaultValues/editor.ts"],"sourcesContent":["export const APPLICATION_URL = undefined;\nexport const EDITOR_URL = 'http://localhost:8000';\nexport const CMS_URL = 'https://app.intlayer.org';\nexport const BACKEND_URL = 'https://back.intlayer.org';\nexport const PORT = 8000;\nexport const IS_ENABLED = false;\nexport const LIVE_SYNC = false;\nexport const DICTIONARY_PRIORITY_STRATEGY = 'local_first';\nexport const LIVE_SYNC_PORT = 4000;\n"],"mappings":";AAAA,MAAa,kBAAkB;AAC/B,MAAa,aAAa;AAC1B,MAAa,UAAU;AACvB,MAAa,cAAc;AAC3B,MAAa,OAAO;AACpB,MAAa,aAAa;AAC1B,MAAa,YAAY;AACzB,MAAa,+BAA+B;AAC5C,MAAa,iBAAiB"}
@@ -12,6 +12,7 @@ import { getStorageAttributes } from "./getStorageAttributes.mjs";
12
12
  import { getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync } from "./getUsedNodeTypes.mjs";
13
13
  import { logStack } from "./logStack.mjs";
14
14
  import { parseFilePathPattern, parseStringPattern } from "./parseFilePathPattern.mjs";
15
+ import { assertPathWithin } from "./pathSecurity.mjs";
15
16
  import { retryManager } from "./retryManager.mjs";
16
17
  import { setIntlayerIdentifier } from "./setIntlayerIdentifier.mjs";
17
18
  import { camelCaseToKebabCase } from "./stringFormatter/camelCaseToKebabCase.mjs";
@@ -19,4 +20,4 @@ import { camelCaseToSentence } from "./stringFormatter/camelCaseToSentence.mjs";
19
20
  import { kebabCaseToCamelCase } from "./stringFormatter/kebabCaseToCamelCase.mjs";
20
21
  import { toLowerCamelCase } from "./stringFormatter/toLowerCamelCase.mjs";
21
22
 
22
- export { cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
23
+ export { assertPathWithin, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
@@ -0,0 +1,18 @@
1
+ import { resolve, sep } from "node:path";
2
+
3
+ //#region src/utils/pathSecurity.ts
4
+ /**
5
+ * Throws if `resolvedPath` escapes `baseDir`.
6
+ * Use this before any file operation whose path is derived from user-controlled
7
+ * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent
8
+ * path-traversal attacks.
9
+ */
10
+ const assertPathWithin = (resolvedPath, baseDir) => {
11
+ const normalizedBase = resolve(baseDir);
12
+ const normalizedPath = resolve(resolvedPath);
13
+ if (normalizedPath !== normalizedBase && !normalizedPath.startsWith(normalizedBase + sep)) throw new Error(`Path traversal detected: "${resolvedPath}" escapes the base directory "${baseDir}"`);
14
+ };
15
+
16
+ //#endregion
17
+ export { assertPathWithin };
18
+ //# sourceMappingURL=pathSecurity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathSecurity.mjs","names":[],"sources":["../../../src/utils/pathSecurity.ts"],"sourcesContent":["import { resolve, sep } from 'node:path';\n\n/**\n * Throws if `resolvedPath` escapes `baseDir`.\n * Use this before any file operation whose path is derived from user-controlled\n * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent\n * path-traversal attacks.\n */\nexport const assertPathWithin = (\n resolvedPath: string,\n baseDir: string\n): void => {\n const normalizedBase = resolve(baseDir);\n const normalizedPath = resolve(resolvedPath);\n if (\n normalizedPath !== normalizedBase &&\n !normalizedPath.startsWith(normalizedBase + sep)\n ) {\n throw new Error(\n `Path traversal detected: \"${resolvedPath}\" escapes the base directory \"${baseDir}\"`\n );\n }\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,oBACX,cACA,YACS;CACT,MAAM,iBAAiB,QAAQ,QAAQ;CACvC,MAAM,iBAAiB,QAAQ,aAAa;CAC5C,IACE,mBAAmB,kBACnB,CAAC,eAAe,WAAW,iBAAiB,IAAI,EAEhD,MAAM,IAAI,MACR,6BAA6B,aAAa,gCAAgC,QAAQ,GACnF"}
@@ -272,8 +272,8 @@ declare const buildSchema: z.ZodObject<{
272
272
  }>>;
273
273
  traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
274
274
  outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
275
- esm: "esm";
276
275
  cjs: "cjs";
276
+ esm: "esm";
277
277
  }>>>;
278
278
  cache: z.ZodOptional<z.ZodBoolean>;
279
279
  require: z.ZodOptional<z.ZodUnknown>;
@@ -467,8 +467,8 @@ declare const intlayerConfigSchema: z.ZodObject<{
467
467
  }>>;
468
468
  traversePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
469
469
  outputFormat: z.ZodOptional<z.ZodArray<z.ZodEnum<{
470
- esm: "esm";
471
470
  cjs: "cjs";
471
+ esm: "esm";
472
472
  }>>>;
473
473
  cache: z.ZodOptional<z.ZodBoolean>;
474
474
  require: z.ZodOptional<z.ZodUnknown>;
@@ -5,7 +5,7 @@ declare const CMS_URL = "https://app.intlayer.org";
5
5
  declare const BACKEND_URL = "https://back.intlayer.org";
6
6
  declare const PORT = 8000;
7
7
  declare const IS_ENABLED = false;
8
- declare const LIVE_SYNC = true;
8
+ declare const LIVE_SYNC = false;
9
9
  declare const DICTIONARY_PRIORITY_STRATEGY = "local_first";
10
10
  declare const LIVE_SYNC_PORT = 4000;
11
11
  //#endregion
@@ -17,5 +17,6 @@ import { getPackageJsonPath } from "./getPackageJsonPath.js";
17
17
  import { getStorageAttributes } from "./getStorageAttributes.js";
18
18
  import { PluginNodeType, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync } from "./getUsedNodeTypes.js";
19
19
  import { parseFilePathPattern, parseStringPattern } from "./parseFilePathPattern.js";
20
+ import { assertPathWithin } from "./pathSecurity.js";
20
21
  import { RetryManagerOptions, retryManager } from "./retryManager.js";
21
- export { CacheKey, GetAliasOptions, PluginNodeType, RetryManagerOptions, WindowsWithIntlayer, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
22
+ export { CacheKey, GetAliasOptions, PluginNodeType, RetryManagerOptions, WindowsWithIntlayer, assertPathWithin, cacheDisk, cacheMemory, camelCaseToKebabCase, camelCaseToSentence, clearAllCache, clearCache, clearDiskCacheMemory, clearModuleCache, compareVersions, computeKeyId, configESMxCJSRequire, extractErrorMessage, getAlias, getCache, getExtension, getPackageJsonPath, getProjectRequire, getStorageAttributes, getUnusedNodeTypes, getUnusedNodeTypesAsync, getUsedNodeTypes, getUsedNodeTypesAsync, isESModule, kebabCaseToCamelCase, logStack, normalizePath, parseFilePathPattern, parseStringPattern, retryManager, setCache, setIntlayerIdentifier, stableStringify, toLowerCamelCase };
@@ -0,0 +1,11 @@
1
+ //#region src/utils/pathSecurity.d.ts
2
+ /**
3
+ * Throws if `resolvedPath` escapes `baseDir`.
4
+ * Use this before any file operation whose path is derived from user-controlled
5
+ * input (e.g. dictionary keys, filePath fields from dictionary data) to prevent
6
+ * path-traversal attacks.
7
+ */
8
+ declare const assertPathWithin: (resolvedPath: string, baseDir: string) => void;
9
+ //#endregion
10
+ export { assertPathWithin };
11
+ //# sourceMappingURL=pathSecurity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathSecurity.d.ts","names":[],"sources":["../../../src/utils/pathSecurity.ts"],"mappings":";;AAQA;;;;;cAAa,gBAAA,GACX,YAAA,UACA,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/config",
3
- "version": "8.9.4",
3
+ "version": "8.9.6-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": [
@@ -160,7 +160,7 @@
160
160
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
161
161
  },
162
162
  "dependencies": {
163
- "@intlayer/types": "8.9.4",
163
+ "@intlayer/types": "8.9.6-canary.0",
164
164
  "defu": "6.1.7",
165
165
  "dotenv": "17.4.2",
166
166
  "esbuild": "0.28.0",
@@ -168,14 +168,14 @@
168
168
  "zod": "4.4.3"
169
169
  },
170
170
  "devDependencies": {
171
- "@types/node": "25.6.2",
171
+ "@types/node": "25.8.0",
172
172
  "@utils/ts-config": "1.0.4",
173
173
  "@utils/ts-config-types": "1.0.4",
174
174
  "@utils/tsdown-config": "1.0.4",
175
175
  "rimraf": "6.1.3",
176
176
  "tsdown": "0.22.00",
177
177
  "typescript": "6.0.3",
178
- "vitest": "4.1.5"
178
+ "vitest": "4.1.6"
179
179
  },
180
180
  "peerDependencies": {
181
181
  "react": ">=16.0.0"