@intlayer/cli 7.0.4 → 7.0.6

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.
@@ -17,7 +17,7 @@ const hereDirname = () => {
17
17
  const findDistRoot = (startDir) => {
18
18
  let dir = startDir;
19
19
  for (let i = 0; i < 12; i++) {
20
- if ((dir.split("/").pop() || dir.split("\\\\").pop()) === "dist") return dir;
20
+ if ((0, node_path.basename)(dir) === "dist") return dir;
21
21
  const parent = (0, node_path.resolve)(dir, "..");
22
22
  if (parent === dir) break;
23
23
  dir = parent;
@@ -73,14 +73,11 @@ const readAsset = (relPath, encoding = "utf8") => {
73
73
  const assetsRoot = (0, node_path.join)(distRoot, "assets");
74
74
  const tried = [];
75
75
  /**
76
- * Transform ./dist/esm/my/file.ts to my/file.ts for make resolution easier
76
+ * Transform dist/(esm|cjs)/... and _virtual/ prefix to clean subpath (Windows-safe)
77
77
  */
78
- const callerSubpath = (0, node_path.relative)(distRoot, getCallerDir()).split("\\").join("/").replace(/^esm\//, "").replace(/^cjs\//, "").replace(/^_virtual\//, "");
78
+ const callerSubpath = (0, node_path.relative)(distRoot, getCallerDir()).split("\\").join("/").replace(/^(?:dist\/)?(?:esm|cjs)\//, "").replace(/^_virtual\//, "");
79
79
  if (relPath.startsWith("./") || relPath.startsWith("../")) {
80
80
  const fromCallerAbs = (0, node_path.resolve)(assetsRoot, callerSubpath, relPath);
81
- const fromCallerAbsToVirtual = fromCallerAbs.replace(/^dist\/esm\//, "/dist/assets/").replace(/^dist\/cjs\//, "/dist/assets/");
82
- tried.push(fromCallerAbsToVirtual);
83
- if ((0, node_fs.existsSync)(fromCallerAbsToVirtual)) return (0, node_fs.readFileSync)(fromCallerAbsToVirtual, encoding);
84
81
  tried.push(fromCallerAbs);
85
82
  if ((0, node_fs.existsSync)(fromCallerAbs)) return (0, node_fs.readFileSync)(fromCallerAbs, encoding);
86
83
  }
@@ -1,4 +1,4 @@
1
- import { dirname, join, relative, resolve, sep } from "node:path";
1
+ import { basename, dirname, join, relative, resolve, sep } from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
 
@@ -13,7 +13,7 @@ const hereDirname = () => {
13
13
  const findDistRoot = (startDir) => {
14
14
  let dir = startDir;
15
15
  for (let i = 0; i < 12; i++) {
16
- if ((dir.split("/").pop() || dir.split("\\\\").pop()) === "dist") return dir;
16
+ if (basename(dir) === "dist") return dir;
17
17
  const parent = resolve(dir, "..");
18
18
  if (parent === dir) break;
19
19
  dir = parent;
@@ -69,14 +69,11 @@ const readAsset = (relPath, encoding = "utf8") => {
69
69
  const assetsRoot = join(distRoot, "assets");
70
70
  const tried = [];
71
71
  /**
72
- * Transform ./dist/esm/my/file.ts to my/file.ts for make resolution easier
72
+ * Transform dist/(esm|cjs)/... and _virtual/ prefix to clean subpath (Windows-safe)
73
73
  */
74
- const callerSubpath = relative(distRoot, getCallerDir()).split("\\").join("/").replace(/^esm\//, "").replace(/^cjs\//, "").replace(/^_virtual\//, "");
74
+ const callerSubpath = relative(distRoot, getCallerDir()).split("\\").join("/").replace(/^(?:dist\/)?(?:esm|cjs)\//, "").replace(/^_virtual\//, "");
75
75
  if (relPath.startsWith("./") || relPath.startsWith("../")) {
76
76
  const fromCallerAbs = resolve(assetsRoot, callerSubpath, relPath);
77
- const fromCallerAbsToVirtual = fromCallerAbs.replace(/^dist\/esm\//, "/dist/assets/").replace(/^dist\/cjs\//, "/dist/assets/");
78
- tried.push(fromCallerAbsToVirtual);
79
- if (existsSync(fromCallerAbsToVirtual)) return readFileSync(fromCallerAbsToVirtual, encoding);
80
77
  tried.push(fromCallerAbs);
81
78
  if (existsSync(fromCallerAbs)) return readFileSync(fromCallerAbs, encoding);
82
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config.ts"],"sourcesContent":[],"mappings":";;;KAMK,aAAA;kBACa;AAHQ,CAAA;AAMb,cAAA,SAAuB,EAAA,CAAA,OAAa,CAAA,EAAb,aAAa,EAAA,GAAA,IAAA"}
1
+ {"version":3,"file":"config.d.ts","names":[],"sources":["../../src/config.ts"],"sourcesContent":[],"mappings":";;;KAMK,aAAA;kBACa;AAHQ,CAAA;AAMb,cAAA,SAAuB,EAAA,CAAA,OAAa,CAAb,EAAA,aAAa,EAAA,GAAA,IAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/cli",
3
- "version": "7.0.4",
3
+ "version": "7.0.6",
4
4
  "private": false,
5
5
  "description": "Provides uniform command-line interface scripts for Intlayer, used in packages like intlayer-cli and intlayer.",
6
6
  "keywords": [
@@ -63,36 +63,36 @@
63
63
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
64
64
  },
65
65
  "dependencies": {
66
- "@intlayer/api": "7.0.4",
67
- "@intlayer/chokidar": "7.0.4",
68
- "@intlayer/config": "7.0.4",
69
- "@intlayer/dictionaries-entry": "7.0.4",
70
- "@intlayer/remote-dictionaries-entry": "7.0.4",
71
- "@intlayer/types": "7.0.4",
72
- "@intlayer/unmerged-dictionaries-entry": "7.0.4",
66
+ "@intlayer/api": "7.0.6",
67
+ "@intlayer/chokidar": "7.0.6",
68
+ "@intlayer/config": "7.0.6",
69
+ "@intlayer/dictionaries-entry": "7.0.6",
70
+ "@intlayer/remote-dictionaries-entry": "7.0.6",
71
+ "@intlayer/types": "7.0.6",
72
+ "@intlayer/unmerged-dictionaries-entry": "7.0.6",
73
73
  "commander": "14.0.1",
74
74
  "eventsource": "3.0.7",
75
75
  "fast-glob": "3.3.3"
76
76
  },
77
77
  "devDependencies": {
78
- "@intlayer/core": "7.0.4",
78
+ "@intlayer/core": "7.0.6",
79
79
  "@types/node": "24.9.2",
80
- "@utils/ts-config": "7.0.4",
81
- "@utils/ts-config-types": "7.0.4",
82
- "@utils/tsdown-config": "7.0.4",
80
+ "@utils/ts-config": "7.0.6",
81
+ "@utils/ts-config-types": "7.0.6",
82
+ "@utils/tsdown-config": "7.0.6",
83
83
  "rimraf": "6.0.1",
84
84
  "tsdown": "0.15.11",
85
85
  "typescript": "5.9.3",
86
86
  "vitest": "4.0.5"
87
87
  },
88
88
  "peerDependencies": {
89
- "@intlayer/api": "7.0.4",
90
- "@intlayer/chokidar": "7.0.4",
91
- "@intlayer/config": "7.0.4",
92
- "@intlayer/dictionaries-entry": "7.0.4",
93
- "@intlayer/remote-dictionaries-entry": "7.0.4",
94
- "@intlayer/types": "7.0.4",
95
- "@intlayer/unmerged-dictionaries-entry": "7.0.4"
89
+ "@intlayer/api": "7.0.6",
90
+ "@intlayer/chokidar": "7.0.6",
91
+ "@intlayer/config": "7.0.6",
92
+ "@intlayer/dictionaries-entry": "7.0.6",
93
+ "@intlayer/remote-dictionaries-entry": "7.0.6",
94
+ "@intlayer/types": "7.0.6",
95
+ "@intlayer/unmerged-dictionaries-entry": "7.0.6"
96
96
  },
97
97
  "bug": {
98
98
  "url": "https://github.com/aymericzip/intlayer/issues"