@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.
@@ -11,17 +11,17 @@
11
11
  CLI Cleaning output folder
12
12
  CJS Build start
13
13
  ESM Build start
14
- ESM dist/files.js 141.00 B
15
- ESM dist/OKSMIGRA.js 1.61 KB
16
- ESM dist/index.js 1.09 KB
17
- ESM dist/files.js.map 69.00 B
18
- ESM dist/OKSMIGRA.js.map 3.46 KB
19
- ESM dist/index.js.map 2.04 KB
20
- ESM ⚡️ Build success in 147ms
21
14
  CJS dist/files.cjs 421.00 B
22
- CJS dist/index.cjs 1.99 KB
15
+ CJS dist/index.cjs 2.15 KB
23
16
  CJS dist/II2MVA6U.cjs 1.42 KB
24
17
  CJS dist/files.cjs.map 70.00 B
25
- CJS dist/index.cjs.map 2.08 KB
18
+ CJS dist/index.cjs.map 2.78 KB
26
19
  CJS dist/II2MVA6U.cjs.map 2.68 KB
27
- CJS ⚡️ Build success in 148ms
20
+ CJS ⚡️ Build success in 156ms
21
+ ESM dist/files.js 141.00 B
22
+ ESM dist/index.js 1.24 KB
23
+ ESM dist/OKSMIGRA.js 1.61 KB
24
+ ESM dist/files.js.map 69.00 B
25
+ ESM dist/index.js.map 2.75 KB
26
+ ESM dist/OKSMIGRA.js.map 3.46 KB
27
+ ESM ⚡️ Build success in 157ms
@@ -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:51835) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1770772122100 is not specified and it doesn't parse as CommonJS.
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
- _fullyQualifiedRepoRootPath = (async () => {
34
- let currentDir = __dirname;
35
- while (true) {
36
- const candidate = path__default.default.join(currentDir, "pnpm-workspace.yaml");
37
- try {
38
- await fs__namespace.access(candidate);
39
- return currentDir;
40
- } catch {
41
- const parent = path__default.default.dirname(currentDir);
42
- if (parent === currentDir) {
43
- throw new Error(`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`);
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");
@@ -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;AACxD,IAAMC,gDAAgCC,mBAAA,CAAA,MAAA;AACzC,EAAA,IAAI,CAACH,2BAAAA,EAA6B;AAC9BA,IAAAA,2BAAAA,GAAAA,CAA+B,YAAA;AAC3B,MAAA,IAAII,UAAAA,GAAaC,SAAAA;AACjB,MAAA,OAAO,IAAA,EAAM;AACT,QAAA,MAAMC,SAAAA,GAAYC,qBAAAA,CAAKC,IAAAA,CAAKJ,UAAAA,EAAY,qBAAA,CAAA;AACxC,QAAA,IAAI;AACA,UAAA,MAASK,qBAAOH,SAAAA,CAAAA;AAChB,UAAA,OAAOF,UAAAA;QACX,CAAA,CAAA,MAAQ;AACJ,UAAA,MAAMM,MAAAA,GAASH,qBAAAA,CAAKI,OAAAA,CAAQP,UAAAA,CAAAA;AAC5B,UAAA,IAAIM,WAAWN,UAAAA,EAAY;AACvB,YAAA,MAAM,IAAIQ,KAAAA,CACN,CAAA,oEAAA,EAAuEP,SAAAA,CAAAA,WAAAA,EAAuBD,UAAAA,CAAAA,CAAY,CAAA;AAElH,UAAA;AACAA,UAAAA,UAAAA,GAAaM,MAAAA;AACjB,QAAA;AACJ,MAAA;IACJ,CAAA,GAAA;AACJ,EAAA;AAEA,EAAA,OAAOV,2BAAAA;AACX,CAAA,EAvB6C,+BAAA","file":"index.cjs","sourcesContent":["import * as fs from 'fs/promises';\nimport path from 'path';\n\nlet _fullyQualifiedRepoRootPath: Promise<string> | undefined = undefined;\nexport const getFullyQualifiedRepoRootPath = (): Promise<string> => {\n if (!_fullyQualifiedRepoRootPath) {\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 return _fullyQualifiedRepoRootPath;\n};\n\nexport * from './files';\n"]}
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,6BAA6B,QAAO,OAAO,CAAC,MAAM,CAuB9D,CAAC;AAEF,cAAc,SAAS,CAAC"}
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
- _fullyQualifiedRepoRootPath = (async () => {
10
- let currentDir = __dirname$1;
11
- while (true) {
12
- const candidate = path.join(currentDir, "pnpm-workspace.yaml");
13
- try {
14
- await fs.access(candidate);
15
- return currentDir;
16
- } catch {
17
- const parent = path.dirname(currentDir);
18
- if (parent === currentDir) {
19
- throw new Error(`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname$1}, ended at ${currentDir}`);
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;AACxD,IAAMC,gDAAgC,MAAA,CAAA,MAAA;AACzC,EAAA,IAAI,CAACF,2BAAAA,EAA6B;AAC9BA,IAAAA,2BAAAA,GAAAA,CAA+B,YAAA;AAC3B,MAAA,IAAIG,UAAAA,GAAaC,WAAAA;AACjB,MAAA,OAAO,IAAA,EAAM;AACT,QAAA,MAAMC,SAAAA,GAAYC,IAAAA,CAAKC,IAAAA,CAAKJ,UAAAA,EAAY,qBAAA,CAAA;AACxC,QAAA,IAAI;AACA,UAAA,MAASK,UAAOH,SAAAA,CAAAA;AAChB,UAAA,OAAOF,UAAAA;QACX,CAAA,CAAA,MAAQ;AACJ,UAAA,MAAMM,MAAAA,GAASH,IAAAA,CAAKI,OAAAA,CAAQP,UAAAA,CAAAA;AAC5B,UAAA,IAAIM,WAAWN,UAAAA,EAAY;AACvB,YAAA,MAAM,IAAIQ,KAAAA,CACN,CAAA,oEAAA,EAAuEP,WAAAA,CAAAA,WAAAA,EAAuBD,UAAAA,CAAAA,CAAY,CAAA;AAElH,UAAA;AACAA,UAAAA,UAAAA,GAAaM,MAAAA;AACjB,QAAA;AACJ,MAAA;IACJ,CAAA,GAAA;AACJ,EAAA;AAEA,EAAA,OAAOT,2BAAAA;AACX,CAAA,EAvB6C,+BAAA","file":"index.js","sourcesContent":["import * as fs from 'fs/promises';\nimport path from 'path';\n\nlet _fullyQualifiedRepoRootPath: Promise<string> | undefined = undefined;\nexport const getFullyQualifiedRepoRootPath = (): Promise<string> => {\n if (!_fullyQualifiedRepoRootPath) {\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 return _fullyQualifiedRepoRootPath;\n};\n\nexport * from './files';\n"]}
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.23",
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.23",
20
- "@layerzerolabs/typescript-configuration": "0.2.23"
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
- _fullyQualifiedRepoRootPath = (async (): Promise<string> => {
8
- let currentDir = __dirname;
9
- while (true) {
10
- const candidate = path.join(currentDir, 'pnpm-workspace.yaml');
11
- try {
12
- await fs.access(candidate);
13
- return currentDir;
14
- } catch {
15
- const parent = path.dirname(currentDir);
16
- if (parent === currentDir) {
17
- throw new Error(
18
- `Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`,
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;