@layerzerolabs/common-node-utils 0.2.23 → 0.2.24
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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-lint.log +1 -1
- package/dist/index.cjs +18 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -14
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +26 -16
package/.turbo/turbo-build.log
CHANGED
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
13
|
[34mESM[39m Build start
|
|
14
|
-
[32mESM[39m [1mdist/files.js [22m[32m141.00 B[39m
|
|
15
|
-
[32mESM[39m [1mdist/OKSMIGRA.js [22m[32m1.61 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist/index.js [22m[32m1.09 KB[39m
|
|
17
|
-
[32mESM[39m [1mdist/files.js.map [22m[32m69.00 B[39m
|
|
18
|
-
[32mESM[39m [1mdist/OKSMIGRA.js.map [22m[32m3.46 KB[39m
|
|
19
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m2.04 KB[39m
|
|
20
|
-
[32mESM[39m ⚡️ Build success in 147ms
|
|
21
14
|
[32mCJS[39m [1mdist/files.cjs [22m[32m421.00 B[39m
|
|
22
|
-
[32mCJS[39m [1mdist/index.cjs [22m[
|
|
15
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m2.15 KB[39m
|
|
23
16
|
[32mCJS[39m [1mdist/II2MVA6U.cjs [22m[32m1.42 KB[39m
|
|
24
17
|
[32mCJS[39m [1mdist/files.cjs.map [22m[32m70.00 B[39m
|
|
25
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m2.
|
|
18
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m2.78 KB[39m
|
|
26
19
|
[32mCJS[39m [1mdist/II2MVA6U.cjs.map [22m[32m2.68 KB[39m
|
|
27
|
-
[32mCJS[39m ⚡️ Build success in
|
|
20
|
+
[32mCJS[39m ⚡️ Build success in 156ms
|
|
21
|
+
[32mESM[39m [1mdist/files.js [22m[32m141.00 B[39m
|
|
22
|
+
[32mESM[39m [1mdist/index.js [22m[32m1.24 KB[39m
|
|
23
|
+
[32mESM[39m [1mdist/OKSMIGRA.js [22m[32m1.61 KB[39m
|
|
24
|
+
[32mESM[39m [1mdist/files.js.map [22m[32m69.00 B[39m
|
|
25
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m2.75 KB[39m
|
|
26
|
+
[32mESM[39m [1mdist/OKSMIGRA.js.map [22m[32m3.46 KB[39m
|
|
27
|
+
[32mESM[39m ⚡️ Build success in 157ms
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
> @layerzerolabs/common-node-utils@0.0.0 lint /home/runner/work/monorepo-internal/monorepo-internal/packages/common/common-node-utils
|
|
3
3
|
> eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)
|
|
4
4
|
|
|
5
|
-
(node:
|
|
5
|
+
(node:54620) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1770955556851 is not specified and it doesn't parse as CommonJS.
|
|
6
6
|
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
|
|
7
7
|
To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
|
|
8
8
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
package/dist/index.cjs
CHANGED
|
@@ -30,22 +30,26 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
30
30
|
var _fullyQualifiedRepoRootPath = void 0;
|
|
31
31
|
var getFullyQualifiedRepoRootPath = /* @__PURE__ */ II2MVA6U_cjs.__name(() => {
|
|
32
32
|
if (!_fullyQualifiedRepoRootPath) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
if (process.env.REPO_ROOT) {
|
|
34
|
+
_fullyQualifiedRepoRootPath = Promise.resolve(process.env.REPO_ROOT);
|
|
35
|
+
} else {
|
|
36
|
+
_fullyQualifiedRepoRootPath = (async () => {
|
|
37
|
+
let currentDir = __dirname;
|
|
38
|
+
while (true) {
|
|
39
|
+
const candidate = path__default.default.join(currentDir, "pnpm-workspace.yaml");
|
|
40
|
+
try {
|
|
41
|
+
await fs__namespace.access(candidate);
|
|
42
|
+
return currentDir;
|
|
43
|
+
} catch {
|
|
44
|
+
const parent = path__default.default.dirname(currentDir);
|
|
45
|
+
if (parent === currentDir) {
|
|
46
|
+
throw new Error(`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`);
|
|
47
|
+
}
|
|
48
|
+
currentDir = parent;
|
|
44
49
|
}
|
|
45
|
-
currentDir = parent;
|
|
46
50
|
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
51
|
+
})();
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
return _fullyQualifiedRepoRootPath;
|
|
51
55
|
}, "getFullyQualifiedRepoRootPath");
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["_fullyQualifiedRepoRootPath","undefined","getFullyQualifiedRepoRootPath","__name","currentDir","__dirname","candidate","path","join","access","parent","dirname","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAIA,2BAAAA,GAA2DC,MAAAA;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["_fullyQualifiedRepoRootPath","undefined","getFullyQualifiedRepoRootPath","__name","process","env","REPO_ROOT","Promise","resolve","currentDir","__dirname","candidate","path","join","access","parent","dirname","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAIA,2BAAAA,GAA2DC,MAAAA;AAKxD,IAAMC,gDAAgCC,mBAAA,CAAA,MAAA;AACzC,EAAA,IAAI,CAACH,2BAAAA,EAA6B;AAE9B,IAAA,IAAII,OAAAA,CAAQC,IAAIC,SAAAA,EAAW;AAEvBN,MAAAA,2BAAAA,GAA8BO,OAAAA,CAAQC,OAAAA,CAAQJ,OAAAA,CAAQC,GAAAA,CAAIC,SAAS,CAAA;IACvE,CAAA,MAAO;AACHN,MAAAA,2BAAAA,GAAAA,CAA+B,YAAA;AAC3B,QAAA,IAAIS,UAAAA,GAAaC,SAAAA;AACjB,QAAA,OAAO,IAAA,EAAM;AACT,UAAA,MAAMC,SAAAA,GAAYC,qBAAAA,CAAKC,IAAAA,CAAKJ,UAAAA,EAAY,qBAAA,CAAA;AACxC,UAAA,IAAI;AACA,YAAA,MAASK,qBAAOH,SAAAA,CAAAA;AAChB,YAAA,OAAOF,UAAAA;UACX,CAAA,CAAA,MAAQ;AACJ,YAAA,MAAMM,MAAAA,GAASH,qBAAAA,CAAKI,OAAAA,CAAQP,UAAAA,CAAAA;AAC5B,YAAA,IAAIM,WAAWN,UAAAA,EAAY;AACvB,cAAA,MAAM,IAAIQ,KAAAA,CACN,CAAA,oEAAA,EAAuEP,SAAAA,CAAAA,WAAAA,EAAuBD,UAAAA,CAAAA,CAAY,CAAA;AAElH,YAAA;AACAA,YAAAA,UAAAA,GAAaM,MAAAA;AACjB,UAAA;AACJ,QAAA;MACJ,CAAA,GAAA;AACJ,IAAA;AACJ,EAAA;AAEA,EAAA,OAAOf,2BAAAA;AACX,CAAA,EA7B6C,+BAAA","file":"index.cjs","sourcesContent":["import * as fs from 'fs/promises';\nimport path from 'path';\n\nlet _fullyQualifiedRepoRootPath: Promise<string> | undefined = undefined;\n/**\n * Get the fully qualified path to the repository root by searching for pnpm-workspace.yaml\n * @returns The absolute path to the repository root\n */\nexport const getFullyQualifiedRepoRootPath = (): Promise<string> => {\n if (!_fullyQualifiedRepoRootPath) {\n // eslint-disable-next-line turbo/no-undeclared-env-vars\n if (process.env.REPO_ROOT) {\n // eslint-disable-next-line turbo/no-undeclared-env-vars\n _fullyQualifiedRepoRootPath = Promise.resolve(process.env.REPO_ROOT);\n } else {\n _fullyQualifiedRepoRootPath = (async (): Promise<string> => {\n let currentDir = __dirname;\n while (true) {\n const candidate = path.join(currentDir, 'pnpm-workspace.yaml');\n try {\n await fs.access(candidate);\n return currentDir;\n } catch {\n const parent = path.dirname(currentDir);\n if (parent === currentDir) {\n throw new Error(\n `Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`,\n );\n }\n currentDir = parent;\n }\n }\n })();\n }\n }\n\n return _fullyQualifiedRepoRootPath;\n};\n\nexport * from './files';\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the fully qualified path to the repository root by searching for pnpm-workspace.yaml
|
|
3
|
+
* @returns The absolute path to the repository root
|
|
4
|
+
*/
|
|
1
5
|
export declare const getFullyQualifiedRepoRootPath: () => Promise<string>;
|
|
2
6
|
export * from './files';
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B,QAAO,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,6BAA6B,QAAO,OAAO,CAAC,MAAM,CA6B9D,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,22 +6,26 @@ import path from 'path';
|
|
|
6
6
|
var _fullyQualifiedRepoRootPath = void 0;
|
|
7
7
|
var getFullyQualifiedRepoRootPath = /* @__PURE__ */ __name(() => {
|
|
8
8
|
if (!_fullyQualifiedRepoRootPath) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
if (process.env.REPO_ROOT) {
|
|
10
|
+
_fullyQualifiedRepoRootPath = Promise.resolve(process.env.REPO_ROOT);
|
|
11
|
+
} else {
|
|
12
|
+
_fullyQualifiedRepoRootPath = (async () => {
|
|
13
|
+
let currentDir = __dirname$1;
|
|
14
|
+
while (true) {
|
|
15
|
+
const candidate = path.join(currentDir, "pnpm-workspace.yaml");
|
|
16
|
+
try {
|
|
17
|
+
await fs.access(candidate);
|
|
18
|
+
return currentDir;
|
|
19
|
+
} catch {
|
|
20
|
+
const parent = path.dirname(currentDir);
|
|
21
|
+
if (parent === currentDir) {
|
|
22
|
+
throw new Error(`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname$1}, ended at ${currentDir}`);
|
|
23
|
+
}
|
|
24
|
+
currentDir = parent;
|
|
20
25
|
}
|
|
21
|
-
currentDir = parent;
|
|
22
26
|
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
27
|
+
})();
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
return _fullyQualifiedRepoRootPath;
|
|
27
31
|
}, "getFullyQualifiedRepoRootPath");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["_fullyQualifiedRepoRootPath","undefined","getFullyQualifiedRepoRootPath","currentDir","__dirname","candidate","path","join","access","parent","dirname","Error"],"mappings":";;;;;AAGA,IAAIA,2BAAAA,GAA2DC,MAAAA;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["_fullyQualifiedRepoRootPath","undefined","getFullyQualifiedRepoRootPath","process","env","REPO_ROOT","Promise","resolve","currentDir","__dirname","candidate","path","join","access","parent","dirname","Error"],"mappings":";;;;;AAGA,IAAIA,2BAAAA,GAA2DC,MAAAA;AAKxD,IAAMC,gDAAgC,MAAA,CAAA,MAAA;AACzC,EAAA,IAAI,CAACF,2BAAAA,EAA6B;AAE9B,IAAA,IAAIG,OAAAA,CAAQC,IAAIC,SAAAA,EAAW;AAEvBL,MAAAA,2BAAAA,GAA8BM,OAAAA,CAAQC,OAAAA,CAAQJ,OAAAA,CAAQC,GAAAA,CAAIC,SAAS,CAAA;IACvE,CAAA,MAAO;AACHL,MAAAA,2BAAAA,GAAAA,CAA+B,YAAA;AAC3B,QAAA,IAAIQ,UAAAA,GAAaC,WAAAA;AACjB,QAAA,OAAO,IAAA,EAAM;AACT,UAAA,MAAMC,SAAAA,GAAYC,IAAAA,CAAKC,IAAAA,CAAKJ,UAAAA,EAAY,qBAAA,CAAA;AACxC,UAAA,IAAI;AACA,YAAA,MAASK,UAAOH,SAAAA,CAAAA;AAChB,YAAA,OAAOF,UAAAA;UACX,CAAA,CAAA,MAAQ;AACJ,YAAA,MAAMM,MAAAA,GAASH,IAAAA,CAAKI,OAAAA,CAAQP,UAAAA,CAAAA;AAC5B,YAAA,IAAIM,WAAWN,UAAAA,EAAY;AACvB,cAAA,MAAM,IAAIQ,KAAAA,CACN,CAAA,oEAAA,EAAuEP,WAAAA,CAAAA,WAAAA,EAAuBD,UAAAA,CAAAA,CAAY,CAAA;AAElH,YAAA;AACAA,YAAAA,UAAAA,GAAaM,MAAAA;AACjB,UAAA;AACJ,QAAA;MACJ,CAAA,GAAA;AACJ,IAAA;AACJ,EAAA;AAEA,EAAA,OAAOd,2BAAAA;AACX,CAAA,EA7B6C,+BAAA","file":"index.js","sourcesContent":["import * as fs from 'fs/promises';\nimport path from 'path';\n\nlet _fullyQualifiedRepoRootPath: Promise<string> | undefined = undefined;\n/**\n * Get the fully qualified path to the repository root by searching for pnpm-workspace.yaml\n * @returns The absolute path to the repository root\n */\nexport const getFullyQualifiedRepoRootPath = (): Promise<string> => {\n if (!_fullyQualifiedRepoRootPath) {\n // eslint-disable-next-line turbo/no-undeclared-env-vars\n if (process.env.REPO_ROOT) {\n // eslint-disable-next-line turbo/no-undeclared-env-vars\n _fullyQualifiedRepoRootPath = Promise.resolve(process.env.REPO_ROOT);\n } else {\n _fullyQualifiedRepoRootPath = (async (): Promise<string> => {\n let currentDir = __dirname;\n while (true) {\n const candidate = path.join(currentDir, 'pnpm-workspace.yaml');\n try {\n await fs.access(candidate);\n return currentDir;\n } catch {\n const parent = path.dirname(currentDir);\n if (parent === currentDir) {\n throw new Error(\n `Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`,\n );\n }\n currentDir = parent;\n }\n }\n })();\n }\n }\n\n return _fullyQualifiedRepoRootPath;\n};\n\nexport * from './files';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/common-node-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"tsup": "^8.4.0",
|
|
18
18
|
"vitest": "^3.2.3",
|
|
19
|
-
"@layerzerolabs/tsup-configuration": "0.2.
|
|
20
|
-
"@layerzerolabs/typescript-configuration": "0.2.
|
|
19
|
+
"@layerzerolabs/tsup-configuration": "0.2.24",
|
|
20
|
+
"@layerzerolabs/typescript-configuration": "0.2.24"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "restricted",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"externalRepoConfig": {
|
|
27
27
|
"targets": [
|
|
28
|
-
"monorepo-external"
|
|
28
|
+
"monorepo-external",
|
|
29
|
+
"onesig-client"
|
|
29
30
|
]
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
package/src/index.ts
CHANGED
|
@@ -2,26 +2,36 @@ import * as fs from 'fs/promises';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
let _fullyQualifiedRepoRootPath: Promise<string> | undefined = undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Get the fully qualified path to the repository root by searching for pnpm-workspace.yaml
|
|
7
|
+
* @returns The absolute path to the repository root
|
|
8
|
+
*/
|
|
5
9
|
export const getFullyQualifiedRepoRootPath = (): Promise<string> => {
|
|
6
10
|
if (!_fullyQualifiedRepoRootPath) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
|
12
|
+
if (process.env.REPO_ROOT) {
|
|
13
|
+
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
|
14
|
+
_fullyQualifiedRepoRootPath = Promise.resolve(process.env.REPO_ROOT);
|
|
15
|
+
} else {
|
|
16
|
+
_fullyQualifiedRepoRootPath = (async (): Promise<string> => {
|
|
17
|
+
let currentDir = __dirname;
|
|
18
|
+
while (true) {
|
|
19
|
+
const candidate = path.join(currentDir, 'pnpm-workspace.yaml');
|
|
20
|
+
try {
|
|
21
|
+
await fs.access(candidate);
|
|
22
|
+
return currentDir;
|
|
23
|
+
} catch {
|
|
24
|
+
const parent = path.dirname(currentDir);
|
|
25
|
+
if (parent === currentDir) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`,
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
currentDir = parent;
|
|
20
31
|
}
|
|
21
|
-
currentDir = parent;
|
|
22
32
|
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
33
|
+
})();
|
|
34
|
+
}
|
|
25
35
|
}
|
|
26
36
|
|
|
27
37
|
return _fullyQualifiedRepoRootPath;
|