@vxrn/resolve 2.0.0-beta.33.1 → 2.0.0-beta.45.1

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.
@@ -5,75 +5,62 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
12
  };
13
13
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
21
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
30
25
  }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
27
  var index_exports = {};
35
- __export(index_exports, {
36
- resolvePath: () => resolvePath
37
- });
28
+ __export(index_exports, { resolvePath: () => resolvePath });
38
29
  module.exports = __toCommonJS(index_exports);
39
30
  var import_node_module = __toESM(require("node:module"), 1);
40
31
  var import_node_path = require("node:path");
41
32
  var import_node_fs = require("node:fs");
42
33
  var import_node_url = require("node:url");
43
34
  const resolvePath = (path, from = process.cwd()) => {
44
- if (process.platform === "win32" && from.startsWith("/")) {
45
- try {
46
- from = (0, import_node_url.fileURLToPath)("file://" + from);
47
- } catch {
48
- from = from.slice(1);
49
- }
50
- }
51
- from = (0, import_node_path.resolve)(from);
52
- const require2 = import_node_module.default.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
53
- const resolved = require2.resolve(path, {
54
- paths: [from]
55
- });
56
- const isRelative = path.startsWith("./") || path.startsWith("../");
57
- const isBuiltin = path.startsWith("node:");
58
- if (isRelative || isBuiltin) {
59
- return resolved;
60
- }
61
- try {
62
- const pkgJsonPath = require2.resolve(`${path}/package.json`, {
63
- paths: [from]
64
- });
65
- const pkgJson = JSON.parse((0, import_node_fs.readFileSync)(pkgJsonPath, "utf8"));
66
- const pkgDir = (0, import_node_path.dirname)(pkgJsonPath);
67
- const exportsImport = pkgJson.exports?.["."]?.import;
68
- if (exportsImport) {
69
- const importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
70
- if (importPath) {
71
- return (0, import_node_path.join)(pkgDir, importPath);
72
- }
73
- }
74
- if (pkgJson.module) {
75
- return (0, import_node_path.join)(pkgDir, pkgJson.module);
76
- }
77
- } catch {}
78
- return resolved;
79
- };
35
+ if (process.platform === "win32" && from.startsWith("/")) {
36
+ try {
37
+ from = (0, import_node_url.fileURLToPath)("file://" + from);
38
+ } catch {
39
+ from = from.slice(1);
40
+ }
41
+ }
42
+ from = (0, import_node_path.resolve)(from);
43
+ const require2 = import_node_module.default.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
44
+ const resolved = require2.resolve(path, { paths: [from] });
45
+ const isRelative = path.startsWith("./") || path.startsWith("../");
46
+ const isBuiltin = path.startsWith("node:");
47
+ if (isRelative || isBuiltin) {
48
+ return resolved;
49
+ }
50
+ try {
51
+ const pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });
52
+ const pkgJson = JSON.parse((0, import_node_fs.readFileSync)(pkgJsonPath, "utf8"));
53
+ const pkgDir = (0, import_node_path.dirname)(pkgJsonPath);
54
+ const exportsImport = pkgJson.exports?.["."]?.import;
55
+ if (exportsImport) {
56
+ const importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
57
+ if (importPath) {
58
+ return (0, import_node_path.join)(pkgDir, importPath);
59
+ }
60
+ }
61
+ if (pkgJson.module) {
62
+ return (0, import_node_path.join)(pkgDir, pkgJson.module);
63
+ }
64
+ } catch {}
65
+ return resolved;
66
+ };
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
27
+ }) : target, mod));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var index_exports = {};
30
+ __export(index_exports, { resolvePath: () => resolvePath });
31
+ module.exports = __toCommonJS(index_exports);
32
+ var import_module = __toESM(require("module"), 1);
33
+ var import_path = require("path");
34
+ var import_fs = require("fs");
35
+ var import_url = require("url");
36
+ var resolvePath = function(path) {
37
+ var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();
38
+ if (process.platform === "win32" && from.startsWith("/")) {
39
+ try {
40
+ from = (0, import_url.fileURLToPath)("file://" + from);
41
+ } catch (unused) {
42
+ from = from.slice(1);
43
+ }
44
+ }
45
+ from = (0, import_path.resolve)(from);
46
+ var require2 = import_module.default.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
47
+ var resolved = require2.resolve(path, { paths: [from] });
48
+ var isRelative = path.startsWith("./") || path.startsWith("../");
49
+ var isBuiltin = path.startsWith("node:");
50
+ if (isRelative || isBuiltin) {
51
+ return resolved;
52
+ }
53
+ try {
54
+ var _pkgJson_exports_, _pkgJson_exports;
55
+ var pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });
56
+ var pkgJson = JSON.parse((0, import_fs.readFileSync)(pkgJsonPath, "utf8"));
57
+ var pkgDir = (0, import_path.dirname)(pkgJsonPath);
58
+ var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports["."]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;
59
+ if (exportsImport) {
60
+ var importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
61
+ if (importPath) {
62
+ return (0, import_path.join)(pkgDir, importPath);
63
+ }
64
+ }
65
+ if (pkgJson.module) {
66
+ return (0, import_path.join)(pkgDir, pkgJson.module);
67
+ }
68
+ } catch (unused) {}
69
+ return resolved;
70
+ };
@@ -7,78 +7,66 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
14
  };
15
15
  var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
23
  };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
- // If the importer is in node compatibility mode or this is not an ESM
26
- // file that has been converted to a CommonJS file using a Babel-
27
- // compatible transform (i.e. "__esModule" has not been set), then set
28
- // "default" to the CommonJS "module.exports" for node compatibility.
29
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
- value: mod,
31
- enumerable: true
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
+ value: mod,
26
+ enumerable: true
32
27
  }) : target, mod));
33
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
- value: true
35
- }), mod);
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
29
  var index_exports = {};
37
- __export(index_exports, {
38
- resolvePath: () => resolvePath
39
- });
30
+ __export(index_exports, { resolvePath: () => resolvePath });
40
31
  module.exports = __toCommonJS(index_exports);
41
32
  var import_module = __toESM(require("module"), 1);
42
33
  var import_path = require("path");
43
34
  var import_fs = require("fs");
44
35
  var import_url = require("url");
45
- var resolvePath = function (path) {
46
- var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();
47
- if (process.platform === "win32" && from.startsWith("/")) {
48
- try {
49
- from = (0, import_url.fileURLToPath)("file://" + from);
50
- } catch (unused) {
51
- from = from.slice(1);
52
- }
53
- }
54
- from = (0, import_path.resolve)(from);
55
- var require2 = import_module.default.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
56
- var resolved = require2.resolve(path, {
57
- paths: [from]
58
- });
59
- var isRelative = path.startsWith("./") || path.startsWith("../");
60
- var isBuiltin = path.startsWith("node:");
61
- if (isRelative || isBuiltin) {
62
- return resolved;
63
- }
64
- try {
65
- var _pkgJson_exports_, _pkgJson_exports;
66
- var pkgJsonPath = require2.resolve(`${path}/package.json`, {
67
- paths: [from]
68
- });
69
- var pkgJson = JSON.parse((0, import_fs.readFileSync)(pkgJsonPath, "utf8"));
70
- var pkgDir = (0, import_path.dirname)(pkgJsonPath);
71
- var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports["."]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;
72
- if (exportsImport) {
73
- var importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
74
- if (importPath) {
75
- return (0, import_path.join)(pkgDir, importPath);
76
- }
77
- }
78
- if (pkgJson.module) {
79
- return (0, import_path.join)(pkgDir, pkgJson.module);
80
- }
81
- } catch (unused) {}
82
- return resolved;
36
+ var resolvePath = function(path) {
37
+ var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();
38
+ if (process.platform === "win32" && from.startsWith("/")) {
39
+ try {
40
+ from = (0, import_url.fileURLToPath)("file://" + from);
41
+ } catch (unused) {
42
+ from = from.slice(1);
43
+ }
44
+ }
45
+ from = (0, import_path.resolve)(from);
46
+ var require2 = import_module.default.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
47
+ var resolved = require2.resolve(path, { paths: [from] });
48
+ var isRelative = path.startsWith("./") || path.startsWith("../");
49
+ var isBuiltin = path.startsWith("node:");
50
+ if (isRelative || isBuiltin) {
51
+ return resolved;
52
+ }
53
+ try {
54
+ var _pkgJson_exports_, _pkgJson_exports;
55
+ var pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });
56
+ var pkgJson = JSON.parse((0, import_fs.readFileSync)(pkgJsonPath, "utf8"));
57
+ var pkgDir = (0, import_path.dirname)(pkgJsonPath);
58
+ var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports["."]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;
59
+ if (exportsImport) {
60
+ var importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
61
+ if (importPath) {
62
+ return (0, import_path.join)(pkgDir, importPath);
63
+ }
64
+ }
65
+ if (pkgJson.module) {
66
+ return (0, import_path.join)(pkgDir, pkgJson.module);
67
+ }
68
+ } catch (unused) {}
69
+ return resolved;
83
70
  };
71
+
84
72
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","index_exports","resolvePath","module","exports","import_module","require","import_path","import_fs","import_url","path","arguments","length","process","cwd","platform","startsWith","fileURLToPath","unused","slice","resolve","require2","default","createRequire","endsWith","resolved","paths","isRelative","isBuiltin","_pkgJson_exports_","_pkgJson_exports","pkgJsonPath","pkgJson","JSON","parse","readFileSync","pkgDir","dirname","exportsImport","import","importPath","join"],"sources":["index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n resolvePath: () => resolvePath\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_module = __toESM(require(\"module\"), 1);\nvar import_path = require(\"path\");\nvar import_fs = require(\"fs\");\nvar import_url = require(\"url\");\nvar resolvePath = function(path) {\n var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();\n if (process.platform === \"win32\" && from.startsWith(\"/\")) {\n try {\n from = (0, import_url.fileURLToPath)(\"file://\" + from);\n } catch (unused) {\n from = from.slice(1);\n }\n }\n from = (0, import_path.resolve)(from);\n var require2 = import_module.default.createRequire(from.endsWith(\"/\") || from.endsWith(\"\\\\\") ? from : from + \"/\");\n var resolved = require2.resolve(path, {\n paths: [\n from\n ]\n });\n var isRelative = path.startsWith(\"./\") || path.startsWith(\"../\");\n var isBuiltin = path.startsWith(\"node:\");\n if (isRelative || isBuiltin) {\n return resolved;\n }\n try {\n var _pkgJson_exports_, _pkgJson_exports;\n var pkgJsonPath = require2.resolve(`${path}/package.json`, {\n paths: [\n from\n ]\n });\n var pkgJson = JSON.parse((0, import_fs.readFileSync)(pkgJsonPath, \"utf8\"));\n var pkgDir = (0, import_path.dirname)(pkgJsonPath);\n var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports[\".\"]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;\n if (exportsImport) {\n var importPath = typeof exportsImport === \"string\" ? exportsImport : exportsImport.default;\n if (importPath) {\n return (0, import_path.join)(pkgDir, importPath);\n }\n }\n if (pkgJson.module) {\n return (0, import_path.join)(pkgDir, pkgJson.module);\n }\n } catch (unused) {\n }\n return resolved;\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,QAAQ,GAAGC,MAAM,CAACC,MAAM;AAC5B,IAAIC,SAAS,GAAGF,MAAM,CAACG,cAAc;AACrC,IAAIC,gBAAgB,GAAGJ,MAAM,CAACK,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGN,MAAM,CAACO,mBAAmB;AAClD,IAAIC,YAAY,GAAGR,MAAM,CAACS,cAAc;AACxC,IAAIC,YAAY,GAAGV,MAAM,CAACW,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,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IkB,UAAU,EAAE;QACd,OAAO,CAAC,CAAC,EAAEjC,WAAW,CAACkC,IAAI,EAAEL,MAAM,EAAEI,UAAU,CAAC;MAClD;IACF;IACA,IAAIR,OAAO,CAAC7B,MAAM,EAAE;MAClB,OAAO,CAAC,CAAC,EAAEI,WAAW,CAACkC,IAAI,EAAEL,MAAM,EAAEJ,OAAO,CAAC7B,MAAM,CAAC;IACtD;EACF,CAAC,CAAC,OAAOe,MAAM,EAAE,CACjB;EACA,OAAOO,QAAQ;AACjB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n resolvePath: () => resolvePath\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_module = __toESM(require(\"module\"), 1);\nvar import_path = require(\"path\");\nvar import_fs = require(\"fs\");\nvar import_url = require(\"url\");\nvar resolvePath = function(path) {\n var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();\n if (process.platform === \"win32\" && from.startsWith(\"/\")) {\n try {\n from = (0, import_url.fileURLToPath)(\"file://\" + from);\n } catch (unused) {\n from = from.slice(1);\n }\n }\n from = (0, import_path.resolve)(from);\n var require2 = import_module.default.createRequire(from.endsWith(\"/\") || from.endsWith(\"\\\\\") ? from : from + \"/\");\n var resolved = require2.resolve(path, {\n paths: [\n from\n ]\n });\n var isRelative = path.startsWith(\"./\") || path.startsWith(\"../\");\n var isBuiltin = path.startsWith(\"node:\");\n if (isRelative || isBuiltin) {\n return resolved;\n }\n try {\n var _pkgJson_exports_, _pkgJson_exports;\n var pkgJsonPath = require2.resolve(`${path}/package.json`, {\n paths: [\n from\n ]\n });\n var pkgJson = JSON.parse((0, import_fs.readFileSync)(pkgJsonPath, \"utf8\"));\n var pkgDir = (0, import_path.dirname)(pkgJsonPath);\n var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports[\".\"]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;\n if (exportsImport) {\n var importPath = typeof exportsImport === \"string\" ? exportsImport : exportsImport.default;\n if (importPath) {\n return (0, import_path.join)(pkgDir, importPath);\n }\n }\n if (pkgJson.module) {\n return (0, import_path.join)(pkgDir, pkgJson.module);\n }\n } catch (unused) {\n }\n return resolved;\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9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AO,KAAK,MAAM,CAAC;EACrB;CACF;CACA,QAAQ,GAAG,YAAY,QAAO,CAAE,IAAI;CACpC,IAAI,WAAW,cAAc,QAAQ,cAAc,KAAK,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,IAAI,OAAO,OAAO,GAAG;CAChH,IAAI,WAAW,SAAS,QAAQ,MAAM,EACpC,OAAO,CACL,IACF,EACF,CAAC;CACD,IAAI,aAAa,KAAK,WAAW,IAAI,KAAK,KAAK,WAAW,KAAK;CAC/D,IAAI,YAAY,KAAK,WAAW,OAAO;CACvC,IAAI,cAAc,WAAW;EAC3B,OAAO;CACT;CACA,IAAI;EACF,IAAI,mBAAmB;EACvB,IAAI,cAAc,SAAS,QAAQ,GAAG,KAAK,gBAAgB,EACzD,OAAO,CACL,IACF,EACF,CAAC;EACD,IAAI,UAAU,KAAK,OAAO,GAAG,UAAU,aAAY,CAAE,aAAa,MAAM,CAAC;EACzE,IAAI,UAAU,GAAG,YAAY,QAAO,CAAE,WAAW;EACjD,IAAI,iBAAiB,mBAAmB,QAAQ,aAAa,QAAQ,qBAAqB,KAAK,IAAI,KAAK,KAAK,oBAAoB,iBAAiB,UAAU,QAAQ,sBAAsB,KAAK,IAAI,KAAK,IAAI,kBAAkB;EAC9N,IAAI,eAAe;GACjB,IAAI,aAAa,OAAO,kBAAkB,WAAW,gBAAgB,cAAc;GACnF,IAAI,YAAY;IACd,QAAQ,GAAG,YAAY,KAAI,CAAE,QAAQ,UAAU;GACjD;EACF;EACA,IAAI,QAAQ,QAAQ;GAClB,QAAQ,GAAG,YAAY,KAAI,CAAE,QAAQ,QAAQ,MAAM;EACrD;CACF,SAAS,QAAQ,CACjB;CACA,OAAO;AACT"}
package/dist/esm/index.js CHANGED
@@ -2,42 +2,40 @@ import module from "node:module";
2
2
  import { dirname, join, resolve } from "node:path";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
+
5
6
  const resolvePath = (path, from = process.cwd()) => {
6
- if (process.platform === "win32" && from.startsWith("/")) {
7
- try {
8
- from = fileURLToPath("file://" + from);
9
- } catch {
10
- from = from.slice(1);
11
- }
12
- }
13
- from = resolve(from);
14
- const require2 = module.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
15
- const resolved = require2.resolve(path, {
16
- paths: [from]
17
- });
18
- const isRelative = path.startsWith("./") || path.startsWith("../");
19
- const isBuiltin = path.startsWith("node:");
20
- if (isRelative || isBuiltin) {
21
- return resolved;
22
- }
23
- try {
24
- const pkgJsonPath = require2.resolve(`${path}/package.json`, {
25
- paths: [from]
26
- });
27
- const pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
28
- const pkgDir = dirname(pkgJsonPath);
29
- const exportsImport = pkgJson.exports?.["."]?.import;
30
- if (exportsImport) {
31
- const importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
32
- if (importPath) {
33
- return join(pkgDir, importPath);
34
- }
35
- }
36
- if (pkgJson.module) {
37
- return join(pkgDir, pkgJson.module);
38
- }
39
- } catch {}
40
- return resolved;
7
+ if (process.platform === "win32" && from.startsWith("/")) {
8
+ try {
9
+ from = fileURLToPath("file://" + from);
10
+ } catch {
11
+ from = from.slice(1);
12
+ }
13
+ }
14
+ from = resolve(from);
15
+ const require2 = module.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
16
+ const resolved = require2.resolve(path, { paths: [from] });
17
+ const isRelative = path.startsWith("./") || path.startsWith("../");
18
+ const isBuiltin = path.startsWith("node:");
19
+ if (isRelative || isBuiltin) {
20
+ return resolved;
21
+ }
22
+ try {
23
+ const pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });
24
+ const pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
25
+ const pkgDir = dirname(pkgJsonPath);
26
+ const exportsImport = pkgJson.exports?.["."]?.import;
27
+ if (exportsImport) {
28
+ const importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
29
+ if (importPath) {
30
+ return join(pkgDir, importPath);
31
+ }
32
+ }
33
+ if (pkgJson.module) {
34
+ return join(pkgDir, pkgJson.module);
35
+ }
36
+ } catch {}
37
+ return resolved;
41
38
  };
39
+
42
40
  export { resolvePath };
43
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["module","dirname","join","resolve","readFileSync","fileURLToPath","resolvePath","path","from","process","cwd","platform","startsWith","slice","require","createRequire","endsWith","resolved","paths","isRelative","isBuiltin","pkgJsonPath","pkgJson","JSON","parse","pkgDir","exportsImport","exports","import","importPath","default"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,SAASC,OAAA,EAASC,IAAA,EAAMC,OAAA,QAAe;AACvC,SAASC,YAAA,QAAoB;AAC7B,SAASC,aAAA,QAAqB;AAMvB,MAAMC,WAAA,GAAcA,CAACC,IAAA,EAAcC,IAAA,GAAOC,OAAA,CAAQC,GAAA,CAAI,MAAc;EACzE,IAAID,OAAA,CAAQE,QAAA,KAAa,WAAWH,IAAA,CAAKI,UAAA,CAAW,GAAG,GAAG;IACxD,IAAI;MACFJ,IAAA,GAAOH,aAAA,CAAc,YAAYG,IAAI;IACvC,QAAQ;MACNA,IAAA,GAAOA,IAAA,CAAKK,KAAA,CAAM,CAAC;IACrB;EACF;EACAL,IAAA,GAAOL,OAAA,CAAQK,IAAI;EACnB,MAAMM,QAAA,GAAUd,MAAA,CAAOe,aAAA,CACrBP,IAAA,CAAKQ,QAAA,CAAS,GAAG,KAAKR,IAAA,CAAKQ,QAAA,CAAS,IAAI,IAAIR,IAAA,GAAOA,IAAA,GAAO,GAC5D;EACA,MAAMS,QAAA,GAAWH,QAAA,CAAQX,OAAA,CAAQI,IAAA,EAAM;IAAEW,KAAA,EAAO,CAACV,IAAI;EAAE,CAAC;EAGxD,MAAMW,UAAA,GAAaZ,IAAA,CAAKK,UAAA,CAAW,IAAI,KAAKL,IAAA,CAAKK,UAAA,CAAW,KAAK;EACjE,MAAMQ,SAAA,GAAYb,IAAA,CAAKK,UAAA,CAAW,OAAO;EACzC,IAAIO,UAAA,IAAcC,SAAA,EAAW;IAC3B,OAAOH,QAAA;EACT;EAGA,IAAI;IACF,MAAMI,WAAA,GAAcP,QAAA,CAAQX,OAAA,CAAQ,GAAGI,IAAI,iBAAiB;MAAEW,KAAA,EAAO,CAACV,IAAI;IAAE,CAAC;IAC7E,MAAMc,OAAA,GAAUC,IAAA,CAAKC,KAAA,CAAMpB,YAAA,CAAaiB,WAAA,EAAa,MAAM,CAAC;IAC5D,MAAMI,MAAA,GAASxB,OAAA,CAAQoB,WAAW;IAGlC,MAAMK,aAAA,GAAgBJ,OAAA,CAAQK,OAAA,GAAU,GAAG,GAAGC,MAAA;IAC9C,IAAIF,aAAA,EAAe;MAEjB,MAAMG,UAAA,GACJ,OAAOH,aAAA,KAAkB,WAAWA,aAAA,GAAgBA,aAAA,CAAcI,OAAA;MACpE,IAAID,UAAA,EAAY;QACd,OAAO3B,IAAA,CAAKuB,MAAA,EAAQI,UAAU;MAChC;IACF;IAGA,IAAIP,OAAA,CAAQtB,MAAA,EAAQ;MAClB,OAAOE,IAAA,CAAKuB,MAAA,EAAQH,OAAA,CAAQtB,MAAM;IACpC;EACF,QAAQ,CAER;EAEA,OAAOiB,QAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["esm/index.js"],"sourcesContent":["import module from \"node:module\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nconst resolvePath = (path, from = process.cwd()) => {\n if (process.platform === \"win32\" && from.startsWith(\"/\")) {\n try {\n from = fileURLToPath(\"file://\" + from);\n } catch {\n from = from.slice(1);\n }\n }\n from = resolve(from);\n const require2 = module.createRequire(\n from.endsWith(\"/\") || from.endsWith(\"\\\\\") ? from : from + \"/\"\n );\n const resolved = require2.resolve(path, { paths: [from] });\n const isRelative = path.startsWith(\"./\") || path.startsWith(\"../\");\n const isBuiltin = path.startsWith(\"node:\");\n if (isRelative || isBuiltin) {\n return resolved;\n }\n try {\n const pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });\n const pkgJson = JSON.parse(readFileSync(pkgJsonPath, \"utf8\"));\n const pkgDir = dirname(pkgJsonPath);\n const exportsImport = pkgJson.exports?.[\".\"]?.import;\n if (exportsImport) {\n const importPath = typeof exportsImport === \"string\" ? exportsImport : exportsImport.default;\n if (importPath) {\n return join(pkgDir, importPath);\n }\n }\n if (pkgJson.module) {\n return join(pkgDir, pkgJson.module);\n }\n } catch {\n }\n return resolved;\n};\nexport {\n resolvePath\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAIA,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,MAAM;CAClD,IAAI,QAAQ,aAAa,WAAW,KAAK,WAAW,GAAG,GAAG;EACxD,IAAI;GACF,OAAO,cAAc,YAAY,IAAI;EACvC,QAAQ;GACN,OAAO,KAAK,MAAM,CAAC;EACrB;CACF;CACA,OAAO,QAAQ,IAAI;CACnB,MAAM,WAAW,OAAO,cACtB,KAAK,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,IAAI,OAAO,OAAO,GAC5D;CACA,MAAM,WAAW,SAAS,QAAQ,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;CACzD,MAAM,aAAa,KAAK,WAAW,IAAI,KAAK,KAAK,WAAW,KAAK;CACjE,MAAM,YAAY,KAAK,WAAW,OAAO;CACzC,IAAI,cAAc,WAAW;EAC3B,OAAO;CACT;CACA,IAAI;EACF,MAAM,cAAc,SAAS,QAAQ,GAAG,KAAK,gBAAgB,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;EAC9E,MAAM,UAAU,KAAK,MAAM,aAAa,aAAa,MAAM,CAAC;EAC5D,MAAM,SAAS,QAAQ,WAAW;EAClC,MAAM,gBAAgB,QAAQ,UAAU,IAAI,EAAE;EAC9C,IAAI,eAAe;GACjB,MAAM,aAAa,OAAO,kBAAkB,WAAW,gBAAgB,cAAc;GACrF,IAAI,YAAY;IACd,OAAO,KAAK,QAAQ,UAAU;GAChC;EACF;EACA,IAAI,QAAQ,QAAQ;GAClB,OAAO,KAAK,QAAQ,QAAQ,MAAM;EACpC;CACF,QAAQ,CACR;CACA,OAAO;AACT"}
@@ -2,42 +2,40 @@ import module from "node:module";
2
2
  import { dirname, join, resolve } from "node:path";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
+
5
6
  const resolvePath = (path, from = process.cwd()) => {
6
- if (process.platform === "win32" && from.startsWith("/")) {
7
- try {
8
- from = fileURLToPath("file://" + from);
9
- } catch {
10
- from = from.slice(1);
11
- }
12
- }
13
- from = resolve(from);
14
- const require2 = module.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
15
- const resolved = require2.resolve(path, {
16
- paths: [from]
17
- });
18
- const isRelative = path.startsWith("./") || path.startsWith("../");
19
- const isBuiltin = path.startsWith("node:");
20
- if (isRelative || isBuiltin) {
21
- return resolved;
22
- }
23
- try {
24
- const pkgJsonPath = require2.resolve(`${path}/package.json`, {
25
- paths: [from]
26
- });
27
- const pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
28
- const pkgDir = dirname(pkgJsonPath);
29
- const exportsImport = pkgJson.exports?.["."]?.import;
30
- if (exportsImport) {
31
- const importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
32
- if (importPath) {
33
- return join(pkgDir, importPath);
34
- }
35
- }
36
- if (pkgJson.module) {
37
- return join(pkgDir, pkgJson.module);
38
- }
39
- } catch {}
40
- return resolved;
7
+ if (process.platform === "win32" && from.startsWith("/")) {
8
+ try {
9
+ from = fileURLToPath("file://" + from);
10
+ } catch {
11
+ from = from.slice(1);
12
+ }
13
+ }
14
+ from = resolve(from);
15
+ const require2 = module.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
16
+ const resolved = require2.resolve(path, { paths: [from] });
17
+ const isRelative = path.startsWith("./") || path.startsWith("../");
18
+ const isBuiltin = path.startsWith("node:");
19
+ if (isRelative || isBuiltin) {
20
+ return resolved;
21
+ }
22
+ try {
23
+ const pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });
24
+ const pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
25
+ const pkgDir = dirname(pkgJsonPath);
26
+ const exportsImport = pkgJson.exports?.["."]?.import;
27
+ if (exportsImport) {
28
+ const importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
29
+ if (importPath) {
30
+ return join(pkgDir, importPath);
31
+ }
32
+ }
33
+ if (pkgJson.module) {
34
+ return join(pkgDir, pkgJson.module);
35
+ }
36
+ } catch {}
37
+ return resolved;
41
38
  };
39
+
42
40
  export { resolvePath };
43
41
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"names":["module","dirname","join","resolve","readFileSync","fileURLToPath","resolvePath","path","from","process","cwd","platform","startsWith","slice","require","createRequire","endsWith","resolved","paths","isRelative","isBuiltin","pkgJsonPath","pkgJson","JSON","parse","pkgDir","exportsImport","exports","import","importPath","default"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,SAASC,OAAA,EAASC,IAAA,EAAMC,OAAA,QAAe;AACvC,SAASC,YAAA,QAAoB;AAC7B,SAASC,aAAA,QAAqB;AAMvB,MAAMC,WAAA,GAAcA,CAACC,IAAA,EAAcC,IAAA,GAAOC,OAAA,CAAQC,GAAA,CAAI,MAAc;EACzE,IAAID,OAAA,CAAQE,QAAA,KAAa,WAAWH,IAAA,CAAKI,UAAA,CAAW,GAAG,GAAG;IACxD,IAAI;MACFJ,IAAA,GAAOH,aAAA,CAAc,YAAYG,IAAI;IACvC,QAAQ;MACNA,IAAA,GAAOA,IAAA,CAAKK,KAAA,CAAM,CAAC;IACrB;EACF;EACAL,IAAA,GAAOL,OAAA,CAAQK,IAAI;EACnB,MAAMM,QAAA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import module from \"node:module\";\nimport { dirname, join, resolve } from \"node:path\";\nimport { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nconst resolvePath = (path, from = process.cwd()) => {\n if (process.platform === \"win32\" && from.startsWith(\"/\")) {\n try {\n from = fileURLToPath(\"file://\" + from);\n } catch {\n from = from.slice(1);\n }\n }\n from = resolve(from);\n const require2 = module.createRequire(\n from.endsWith(\"/\") || from.endsWith(\"\\\\\") ? from : from + \"/\"\n );\n const resolved = require2.resolve(path, { paths: [from] });\n const isRelative = path.startsWith(\"./\") || path.startsWith(\"../\");\n const isBuiltin = path.startsWith(\"node:\");\n if (isRelative || isBuiltin) {\n return resolved;\n }\n try {\n const pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });\n const pkgJson = JSON.parse(readFileSync(pkgJsonPath, \"utf8\"));\n const pkgDir = dirname(pkgJsonPath);\n const exportsImport = pkgJson.exports?.[\".\"]?.import;\n if (exportsImport) {\n const importPath = typeof exportsImport === \"string\" ? exportsImport : exportsImport.default;\n if (importPath) {\n return join(pkgDir, importPath);\n }\n }\n if (pkgJson.module) {\n return join(pkgDir, pkgJson.module);\n }\n } catch {\n }\n return resolved;\n};\nexport {\n resolvePath\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAIA,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,MAAM;CAClD,IAAI,QAAQ,aAAa,WAAW,KAAK,WAAW,GAAG,GAAG;EACxD,IAAI;GACF,OAAO,cAAc,YAAY,IAAI;EACvC,QAAQ;GACN,OAAO,KAAK,MAAM,CAAC;EACrB;CACF;CACA,OAAO,QAAQ,IAAI;CACnB,MAAM,WAAW,OAAO,cACtB,KAAK,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,IAAI,OAAO,OAAO,GAC5D;CACA,MAAM,WAAW,SAAS,QAAQ,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;CACzD,MAAM,aAAa,KAAK,WAAW,IAAI,KAAK,KAAK,WAAW,KAAK;CACjE,MAAM,YAAY,KAAK,WAAW,OAAO;CACzC,IAAI,cAAc,WAAW;EAC3B,OAAO;CACT;CACA,IAAI;EACF,MAAM,cAAc,SAAS,QAAQ,GAAG,KAAK,gBAAgB,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;EAC9E,MAAM,UAAU,KAAK,MAAM,aAAa,aAAa,MAAM,CAAC;EAC5D,MAAM,SAAS,QAAQ,WAAW;EAClC,MAAM,gBAAgB,QAAQ,UAAU,IAAI,EAAE;EAC9C,IAAI,eAAe;GACjB,MAAM,aAAa,OAAO,kBAAkB,WAAW,gBAAgB,cAAc;GACrF,IAAI,YAAY;IACd,OAAO,KAAK,QAAQ,UAAU;GAChC;EACF;EACA,IAAI,QAAQ,QAAQ;GAClB,OAAO,KAAK,QAAQ,QAAQ,MAAM;EACpC;CACF,QAAQ,CACR;CACA,OAAO;AACT"}
@@ -2,44 +2,42 @@ import module from "module";
2
2
  import { dirname, join, resolve } from "path";
3
3
  import { readFileSync } from "fs";
4
4
  import { fileURLToPath } from "url";
5
- var resolvePath = function (path) {
6
- var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();
7
- if (process.platform === "win32" && from.startsWith("/")) {
8
- try {
9
- from = fileURLToPath("file://" + from);
10
- } catch (unused) {
11
- from = from.slice(1);
12
- }
13
- }
14
- from = resolve(from);
15
- var require2 = module.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
16
- var resolved = require2.resolve(path, {
17
- paths: [from]
18
- });
19
- var isRelative = path.startsWith("./") || path.startsWith("../");
20
- var isBuiltin = path.startsWith("node:");
21
- if (isRelative || isBuiltin) {
22
- return resolved;
23
- }
24
- try {
25
- var _pkgJson_exports_, _pkgJson_exports;
26
- var pkgJsonPath = require2.resolve(`${path}/package.json`, {
27
- paths: [from]
28
- });
29
- var pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
30
- var pkgDir = dirname(pkgJsonPath);
31
- var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports["."]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;
32
- if (exportsImport) {
33
- var importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
34
- if (importPath) {
35
- return join(pkgDir, importPath);
36
- }
37
- }
38
- if (pkgJson.module) {
39
- return join(pkgDir, pkgJson.module);
40
- }
41
- } catch (unused) {}
42
- return resolved;
5
+
6
+ var resolvePath = function(path) {
7
+ var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();
8
+ if (process.platform === "win32" && from.startsWith("/")) {
9
+ try {
10
+ from = fileURLToPath("file://" + from);
11
+ } catch (unused) {
12
+ from = from.slice(1);
13
+ }
14
+ }
15
+ from = resolve(from);
16
+ var require2 = module.createRequire(from.endsWith("/") || from.endsWith("\\") ? from : from + "/");
17
+ var resolved = require2.resolve(path, { paths: [from] });
18
+ var isRelative = path.startsWith("./") || path.startsWith("../");
19
+ var isBuiltin = path.startsWith("node:");
20
+ if (isRelative || isBuiltin) {
21
+ return resolved;
22
+ }
23
+ try {
24
+ var _pkgJson_exports_, _pkgJson_exports;
25
+ var pkgJsonPath = require2.resolve(`${path}/package.json`, { paths: [from] });
26
+ var pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf8"));
27
+ var pkgDir = dirname(pkgJsonPath);
28
+ var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports["."]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;
29
+ if (exportsImport) {
30
+ var importPath = typeof exportsImport === "string" ? exportsImport : exportsImport.default;
31
+ if (importPath) {
32
+ return join(pkgDir, importPath);
33
+ }
34
+ }
35
+ if (pkgJson.module) {
36
+ return join(pkgDir, pkgJson.module);
37
+ }
38
+ } catch (unused) {}
39
+ return resolved;
43
40
  };
41
+
44
42
  export { resolvePath };
45
43
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["module","dirname","join","resolve","readFileSync","fileURLToPath","resolvePath","path","from","arguments","length","process","cwd","platform","startsWith","unused","slice","require2","createRequire","endsWith","resolved","paths","isRelative","isBuiltin","_pkgJson_exports_","_pkgJson_exports","pkgJsonPath","pkgJson","JSON","parse","pkgDir","exportsImport","exports","import","importPath","default"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,MAAA,MAAY;AACnB,SAASC,OAAA,EAASC,IAAA,EAAMC,OAAA,QAAe;AACvC,SAASC,YAAA,QAAoB;AAC7B,SAASC,aAAA,QAAqB;AAMvB,IAAAC,WAAM,YAAAA,CAA6BC,IAAA;EACxC,IAAIC,IAAA,GAAAC,SAAQ,CAAAC,MAAa,QAAAD,SAAgB,QAAW,KAAG,CAAG,GAAAA,SAAA,MAAAE,OAAA,CAAAC,GAAA;EACxD,IAAAD,OAAI,CAAAE,QAAA,gBAAAL,IAAA,CAAAM,UAAA;IACF;MACFN,IAAA,GAAQH,aAAA,aAAAG,IAAA;IACN,SAAOO,MAAK;MACdP,IAAA,GAAAA,IAAA,CAAAQ,KAAA;IACF;EACA;EACAR,IAAA,GAAML,OAAA,CAAAK,IAAU;EAAO,IACrBS,QAAK,GAAAjB,MAAY,CAAAkB,aAAU,CAAAV,IAAS,CAAAW,QAAQ,IAAO,KAAAX,IAAO,CAAAW,QAAA,SAAAX,IAAA,GAAAA,IAAA;EAC5D,IAAAY,QAAA,GAAAH,QAAA,CAAAd,OAAA,CAAAI,IAAA;IACAc,KAAM,GAGNb,IAAM;EAEN;EACE,IAAAc,UAAO,GAAAf,IAAA,CAAAO,UAAA,UAAAP,IAAA,CAAAO,UAAA;EACT,IAAAS,SAAA,GAAAhB,IAAA,CAAAO,UAAA;EAGA,IAAIQ,UAAA,IAAAC,SAAA;IACF,OAAMH,QAAA;EACN;EACA;IAGA,IAAAI,iBAAM,EAAgBC,gBAAQ;IAC9B,IAAIC,WAAA,GAAAT,QAAe,CAAAd,OAAA,IAAAI,IAAA;MAEjBc,KAAA,EAAM,CAENb,IAAI;IAC4B,EAChC;IACF,IAAAmB,OAAA,GAAAC,IAAA,CAAAC,KAAA,CAAAzB,YAAA,CAAAsB,WAAA;IAGA,IAAII,MAAA,GAAQ7B,OAAQ,CAAAyB,WAAA;IAClB,IAAAK,aAAY,IAAAN,gBAAsB,GAAAE,OAAA,CAAAK,OAAA,cAAAP,gBAAA,wBAAAD,iBAAA,GAAAC,gBAAA,mBAAAD,iBAAA,uBAAAA,iBAAA,CAAAS,MAAA;IACpC,IAAAF,aAAA;MACF,IAAQG,UAAA,UAAAH,aAAA,gBAAAA,aAAA,GAAAA,aAAA,CAAAI,OAAA;MAER,IAAAD,UAAA;QAEA,OAAOhC,IAAA,CAAA4B,MAAA,EAAAI,UAAA;MACT","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["esm/index.native.js"],"sourcesContent":["import module from \"module\";\nimport { dirname, join, resolve } from \"path\";\nimport { readFileSync } from \"fs\";\nimport { fileURLToPath } from \"url\";\nvar resolvePath = function(path) {\n var from = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : process.cwd();\n if (process.platform === \"win32\" && from.startsWith(\"/\")) {\n try {\n from = fileURLToPath(\"file://\" + from);\n } catch (unused) {\n from = from.slice(1);\n }\n }\n from = resolve(from);\n var require2 = module.createRequire(from.endsWith(\"/\") || from.endsWith(\"\\\\\") ? from : from + \"/\");\n var resolved = require2.resolve(path, {\n paths: [\n from\n ]\n });\n var isRelative = path.startsWith(\"./\") || path.startsWith(\"../\");\n var isBuiltin = path.startsWith(\"node:\");\n if (isRelative || isBuiltin) {\n return resolved;\n }\n try {\n var _pkgJson_exports_, _pkgJson_exports;\n var pkgJsonPath = require2.resolve(`${path}/package.json`, {\n paths: [\n from\n ]\n });\n var pkgJson = JSON.parse(readFileSync(pkgJsonPath, \"utf8\"));\n var pkgDir = dirname(pkgJsonPath);\n var exportsImport = (_pkgJson_exports = pkgJson.exports) === null || _pkgJson_exports === void 0 ? void 0 : (_pkgJson_exports_ = _pkgJson_exports[\".\"]) === null || _pkgJson_exports_ === void 0 ? void 0 : _pkgJson_exports_.import;\n if (exportsImport) {\n var importPath = typeof exportsImport === \"string\" ? exportsImport : exportsImport.default;\n if (importPath) {\n return join(pkgDir, importPath);\n }\n }\n if (pkgJson.module) {\n return join(pkgDir, pkgJson.module);\n }\n } catch (unused) {\n }\n return resolved;\n};\nexport {\n resolvePath\n};\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;;;AAIA,IAAI,cAAc,SAAS,MAAM;CAC/B,IAAI,OAAO,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,QAAQ,IAAI;CACxF,IAAI,QAAQ,aAAa,WAAW,KAAK,WAAW,GAAG,GAAG;EACxD,IAAI;GACF,OAAO,cAAc,YAAY,IAAI;EACvC,SAAS,QAAQ;GACf,OAAO,KAAK,MAAM,CAAC;EACrB;CACF;CACA,OAAO,QAAQ,IAAI;CACnB,IAAI,WAAW,OAAO,cAAc,KAAK,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,IAAI,OAAO,OAAO,GAAG;CACjG,IAAI,WAAW,SAAS,QAAQ,MAAM,EACpC,OAAO,CACL,IACF,EACF,CAAC;CACD,IAAI,aAAa,KAAK,WAAW,IAAI,KAAK,KAAK,WAAW,KAAK;CAC/D,IAAI,YAAY,KAAK,WAAW,OAAO;CACvC,IAAI,cAAc,WAAW;EAC3B,OAAO;CACT;CACA,IAAI;EACF,IAAI,mBAAmB;EACvB,IAAI,cAAc,SAAS,QAAQ,GAAG,KAAK,gBAAgB,EACzD,OAAO,CACL,IACF,EACF,CAAC;EACD,IAAI,UAAU,KAAK,MAAM,aAAa,aAAa,MAAM,CAAC;EAC1D,IAAI,SAAS,QAAQ,WAAW;EAChC,IAAI,iBAAiB,mBAAmB,QAAQ,aAAa,QAAQ,qBAAqB,KAAK,IAAI,KAAK,KAAK,oBAAoB,iBAAiB,UAAU,QAAQ,sBAAsB,KAAK,IAAI,KAAK,IAAI,kBAAkB;EAC9N,IAAI,eAAe;GACjB,IAAI,aAAa,OAAO,kBAAkB,WAAW,gBAAgB,cAAc;GACnF,IAAI,YAAY;IACd,OAAO,KAAK,QAAQ,UAAU;GAChC;EACF;EACA,IAAI,QAAQ,QAAQ;GAClB,OAAO,KAAK,QAAQ,QAAQ,MAAM;EACpC;CACF,SAAS,QAAQ,CACjB;CACA,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxrn/resolve",
3
- "version": "2.0.0-beta.33.1",
3
+ "version": "2.0.0-beta.45.1",
4
4
  "sideEffects": false,
5
5
  "source": "src/index.tsx",
6
6
  "type": "module",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "devDependencies": {
34
- "@tamagui/build": "2.6.2",
34
+ "@tamagui/build": "3.0.0-beta.1309.1",
35
35
  "vitest": "^4.1.0"
36
36
  },
37
37
  "publishConfig": {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,aAAoB,KAAG,MA+ChE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,oBAAyB,MA+ChE,CAAA"}
@@ -1,52 +0,0 @@
1
- var import_vitest = require("vitest");
2
- var import_index = require("./index.cjs");
3
- var import_node_fs = require("node:fs");
4
- var import_node_path = require("node:path");
5
- (0, import_vitest.describe)("resolvePath", () => {
6
- (0, import_vitest.describe)("basic resolution", () => {
7
- (0, import_vitest.it)("resolves node builtins", () => {
8
- (0, import_vitest.expect)((0, import_index.resolvePath)("node:path")).toBe("node:path");
9
- (0, import_vitest.expect)((0, import_index.resolvePath)("node:fs")).toBe("node:fs");
10
- });
11
- (0, import_vitest.it)("resolves npm packages", () => {
12
- const path = (0, import_index.resolvePath)("vitest");
13
- (0, import_vitest.expect)(path).toBeTruthy();
14
- (0, import_vitest.expect)((0, import_node_fs.existsSync)(path)).toBe(true);
15
- });
16
- (0, import_vitest.it)("resolves relative paths from cwd", () => {
17
- const path = (0, import_index.resolvePath)("./package.json");
18
- (0, import_vitest.expect)(path).toContain("package.json");
19
- (0, import_vitest.expect)((0, import_node_fs.existsSync)(path)).toBe(true);
20
- });
21
- });
22
- (0, import_vitest.describe)("respects from parameter", () => {
23
- (0, import_vitest.it)("resolves relative paths from specified directory", () => {
24
- const path = (0, import_index.resolvePath)("./package.json", process.cwd());
25
- (0, import_vitest.expect)(path).toBe((0, import_node_path.join)(process.cwd(), "package.json"));
26
- (0, import_vitest.expect)((0, import_node_fs.existsSync)(path)).toBe(true);
27
- });
28
- (0, import_vitest.it)("resolves npm packages from specified directory", () => {
29
- const path = (0, import_index.resolvePath)("vitest", process.cwd());
30
- (0, import_vitest.expect)(path).toContain("vitest");
31
- });
32
- });
33
- (0, import_vitest.describe)("ESM entry point detection", () => {
34
- (0, import_vitest.it)('returns ESM entry when exports["."].import is a string', () => {
35
- const path = (0, import_index.resolvePath)("@vxrn/resolve", process.cwd());
36
- (0, import_vitest.expect)(path).toBeTruthy();
37
- });
38
- (0, import_vitest.it)('returns ESM entry when exports["."].import.default exists', () => {
39
- const path = (0, import_index.resolvePath)("vitest", process.cwd());
40
- (0, import_vitest.expect)(path).toContain((0, import_node_path.join)("dist", "index.js"));
41
- (0, import_vitest.expect)(path).not.toContain(".cjs");
42
- });
43
- (0, import_vitest.it)("falls back to module field when exports not available", () => {
44
- const path = (0, import_index.resolvePath)("vitest", process.cwd());
45
- (0, import_vitest.expect)(path).toBeTruthy();
46
- });
47
- (0, import_vitest.it)("falls back to main/require.resolve when no ESM entry", () => {
48
- const path = (0, import_index.resolvePath)("resolve", process.cwd());
49
- (0, import_vitest.expect)(path).toContain("resolve");
50
- });
51
- });
52
- });
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- var import_vitest = require("vitest");
4
- var import_index = require("./index.native.js");
5
- var import_fs = require("fs");
6
- var import_path = require("path");
7
- (0, import_vitest.describe)("resolvePath", function () {
8
- (0, import_vitest.describe)("basic resolution", function () {
9
- (0, import_vitest.it)("resolves node builtins", function () {
10
- (0, import_vitest.expect)((0, import_index.resolvePath)("node:path")).toBe("node:path");
11
- (0, import_vitest.expect)((0, import_index.resolvePath)("node:fs")).toBe("node:fs");
12
- });
13
- (0, import_vitest.it)("resolves npm packages", function () {
14
- var path = (0, import_index.resolvePath)("vitest");
15
- (0, import_vitest.expect)(path).toBeTruthy();
16
- (0, import_vitest.expect)((0, import_fs.existsSync)(path)).toBe(true);
17
- });
18
- (0, import_vitest.it)("resolves relative paths from cwd", function () {
19
- var path = (0, import_index.resolvePath)("./package.json");
20
- (0, import_vitest.expect)(path).toContain("package.json");
21
- (0, import_vitest.expect)((0, import_fs.existsSync)(path)).toBe(true);
22
- });
23
- });
24
- (0, import_vitest.describe)("respects from parameter", function () {
25
- (0, import_vitest.it)("resolves relative paths from specified directory", function () {
26
- var path = (0, import_index.resolvePath)("./package.json", process.cwd());
27
- (0, import_vitest.expect)(path).toBe((0, import_path.join)(process.cwd(), "package.json"));
28
- (0, import_vitest.expect)((0, import_fs.existsSync)(path)).toBe(true);
29
- });
30
- (0, import_vitest.it)("resolves npm packages from specified directory", function () {
31
- var path = (0, import_index.resolvePath)("vitest", process.cwd());
32
- (0, import_vitest.expect)(path).toContain("vitest");
33
- });
34
- });
35
- (0, import_vitest.describe)("ESM entry point detection", function () {
36
- (0, import_vitest.it)('returns ESM entry when exports["."].import is a string', function () {
37
- var path = (0, import_index.resolvePath)("@vxrn/resolve", process.cwd());
38
- (0, import_vitest.expect)(path).toBeTruthy();
39
- });
40
- (0, import_vitest.it)('returns ESM entry when exports["."].import.default exists', function () {
41
- var path = (0, import_index.resolvePath)("vitest", process.cwd());
42
- (0, import_vitest.expect)(path).toContain((0, import_path.join)("dist", "index.js"));
43
- (0, import_vitest.expect)(path).not.toContain(".cjs");
44
- });
45
- (0, import_vitest.it)("falls back to module field when exports not available", function () {
46
- var path = (0, import_index.resolvePath)("vitest", process.cwd());
47
- (0, import_vitest.expect)(path).toBeTruthy();
48
- });
49
- (0, import_vitest.it)("falls back to main/require.resolve when no ESM entry", function () {
50
- var path = (0, import_index.resolvePath)("resolve", process.cwd());
51
- (0, import_vitest.expect)(path).toContain("resolve");
52
- });
53
- });
54
- });
55
- //# sourceMappingURL=index.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["import_vitest","require","import_index","import_fs","import_path","describe","it","expect","resolvePath","toBe","path","toBeTruthy","existsSync","toContain","process","cwd","join","not"],"sources":["index.test.native.js"],"sourcesContent":["\"use strict\";\nvar import_vitest = require(\"vitest\");\nvar import_index = require(\"./index\");\nvar import_fs = require(\"fs\");\nvar import_path = require(\"path\");\n(0, import_vitest.describe)(\"resolvePath\", function() {\n (0, import_vitest.describe)(\"basic resolution\", function() {\n (0, import_vitest.it)(\"resolves node builtins\", function() {\n (0, import_vitest.expect)((0, import_index.resolvePath)(\"node:path\")).toBe(\"node:path\");\n (0, import_vitest.expect)((0, import_index.resolvePath)(\"node:fs\")).toBe(\"node:fs\");\n });\n (0, import_vitest.it)(\"resolves npm packages\", function() {\n var path = (0, import_index.resolvePath)(\"vitest\");\n (0, import_vitest.expect)(path).toBeTruthy();\n (0, import_vitest.expect)((0, import_fs.existsSync)(path)).toBe(true);\n });\n (0, import_vitest.it)(\"resolves relative paths from cwd\", function() {\n var path = (0, import_index.resolvePath)(\"./package.json\");\n (0, import_vitest.expect)(path).toContain(\"package.json\");\n (0, import_vitest.expect)((0, import_fs.existsSync)(path)).toBe(true);\n });\n });\n (0, import_vitest.describe)(\"respects from parameter\", function() {\n (0, import_vitest.it)(\"resolves relative paths from specified directory\", function() {\n var path = (0, import_index.resolvePath)(\"./package.json\", process.cwd());\n (0, import_vitest.expect)(path).toBe((0, import_path.join)(process.cwd(), \"package.json\"));\n (0, import_vitest.expect)((0, import_fs.existsSync)(path)).toBe(true);\n });\n (0, import_vitest.it)(\"resolves npm packages from specified directory\", function() {\n var path = (0, import_index.resolvePath)(\"vitest\", process.cwd());\n (0, import_vitest.expect)(path).toContain(\"vitest\");\n });\n });\n (0, import_vitest.describe)(\"ESM entry point detection\", function() {\n (0, import_vitest.it)('returns ESM entry when exports[\".\"].import is a string', function() {\n var path = (0, import_index.resolvePath)(\"@vxrn/resolve\", process.cwd());\n (0, import_vitest.expect)(path).toBeTruthy();\n });\n (0, import_vitest.it)('returns ESM entry when exports[\".\"].import.default exists', function() {\n var path = (0, import_index.resolvePath)(\"vitest\", process.cwd());\n (0, import_vitest.expect)(path).toContain((0, import_path.join)(\"dist\", \"index.js\"));\n (0, import_vitest.expect)(path).not.toContain(\".cjs\");\n });\n (0, import_vitest.it)(\"falls back to module field when exports not available\", function() {\n var path = (0, import_index.resolvePath)(\"vitest\", process.cwd());\n (0, import_vitest.expect)(path).toBeTruthy();\n });\n (0, import_vitest.it)(\"falls back to main/require.resolve when no ESM entry\", function() {\n var path = (0, import_index.resolvePath)(\"resolve\", process.cwd());\n (0, import_vitest.expect)(path).toContain(\"resolve\");\n });\n });\n});\n//# sourceMappingURL=index.test.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,aAAa,GAAGC,OAAO,CAAC,QAAQ,CAAC;AACrC,IAAIC,YAAY,GAAGD,OAAO,CAAC,mBAAS,CAAC;AACrC,IAAIE,SAAS,GAAGF,OAAO,CAAC,IAAI,CAAC;AAC7B,IAAIG,WAAW,GAAGH,OAAO,CAAC,MAAM,CAAC;AACjC,CAAC,CAAC,EAAED,aAAa,CAACK,QAAQ,EAAE,aAAa,EAAE,YAAW;EACpD,CAAC,CAAC,EAAEL,a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AAU,CAAC,CAAC;IAC9C,CAAC,CAAC;IACF,CAAC,CAAC,EAAEX,aAAa,CAACM,EAAE,EAAE,2DAA2D,EAAE,YAAW;MAC5F,IAAII,IAAI,GAAG,CAAC,CAAC,EAAER,YAAY,CAACM,WAAW,EAAE,QAAQ,EAAEM,OAAO,CAACC,GAAG,CAAC,CAAC,CAAC;MACjE,CAAC,CAAC,EAAEf,aAAa,CAACO,MAAM,EAAEG,IAAI,CAAC,CAACG,SAAS,CAAC,CAAC,CAAC,EAAET,WAAW,CAACY,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;MACpF,CAAC,CAAC,EAAEhB,aAAa,CAACO,MAAM,EAAEG,IAAI,CAAC,CAACO,GAAG,CAACJ,SAAS,CAAC,MAAM,CAAC;IACvD,CAAC,CAAC;IACF,CAAC,CAAC,EAAEb,aAAa,CAACM,EAAE,EAAE,uDAAuD,EAAE,YAAW;MACxF,IAAII,IAAI,GAAG,CAAC,CAAC,EAAER,YAAY,CAACM,WAAW,EAAE,QAAQ,EAAEM,OAAO,CAACC,GAAG,CAAC,CAAC,CAAC;MACjE,CAAC,CAAC,EAAEf,aAAa,CAACO,MAAM,EAAEG,IAAI,CAAC,CAACC,UAAU,CAAC,CAAC;IAC9C,CAAC,CAAC;IACF,CAAC,CAAC,EAAEX,aAAa,CAACM,EAAE,EAAE,sDAAsD,EAAE,YAAW;MACvF,IAAII,IAAI,GAAG,CAAC,CAAC,EAAER,YAAY,CAACM,WAAW,EAAE,SAAS,EAAEM,OAAO,CAACC,GAAG,CAAC,CAAC,CAAC;MAClE,CAAC,CAAC,EAAEf,aAAa,CAACO,MAAM,EAAEG,IAAI,CAAC,CAACG,SAAS,CAAC,SAAS,CAAC;IACtD,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,53 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { resolvePath } from "./index.mjs";
3
- import { existsSync } from "node:fs";
4
- import { join } from "node:path";
5
- describe("resolvePath", () => {
6
- describe("basic resolution", () => {
7
- it("resolves node builtins", () => {
8
- expect(resolvePath("node:path")).toBe("node:path");
9
- expect(resolvePath("node:fs")).toBe("node:fs");
10
- });
11
- it("resolves npm packages", () => {
12
- const path = resolvePath("vitest");
13
- expect(path).toBeTruthy();
14
- expect(existsSync(path)).toBe(true);
15
- });
16
- it("resolves relative paths from cwd", () => {
17
- const path = resolvePath("./package.json");
18
- expect(path).toContain("package.json");
19
- expect(existsSync(path)).toBe(true);
20
- });
21
- });
22
- describe("respects from parameter", () => {
23
- it("resolves relative paths from specified directory", () => {
24
- const path = resolvePath("./package.json", process.cwd());
25
- expect(path).toBe(join(process.cwd(), "package.json"));
26
- expect(existsSync(path)).toBe(true);
27
- });
28
- it("resolves npm packages from specified directory", () => {
29
- const path = resolvePath("vitest", process.cwd());
30
- expect(path).toContain("vitest");
31
- });
32
- });
33
- describe("ESM entry point detection", () => {
34
- it('returns ESM entry when exports["."].import is a string', () => {
35
- const path = resolvePath("@vxrn/resolve", process.cwd());
36
- expect(path).toBeTruthy();
37
- });
38
- it('returns ESM entry when exports["."].import.default exists', () => {
39
- const path = resolvePath("vitest", process.cwd());
40
- expect(path).toContain(join("dist", "index.js"));
41
- expect(path).not.toContain(".cjs");
42
- });
43
- it("falls back to module field when exports not available", () => {
44
- const path = resolvePath("vitest", process.cwd());
45
- expect(path).toBeTruthy();
46
- });
47
- it("falls back to main/require.resolve when no ESM entry", () => {
48
- const path = resolvePath("resolve", process.cwd());
49
- expect(path).toContain("resolve");
50
- });
51
- });
52
- });
53
- //# sourceMappingURL=index.test.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["describe","expect","it","resolvePath","existsSync","join","toBe","path","toBeTruthy","toContain","process","cwd","not"],"sources":["../../src/index.test.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,EAAUC,MAAA,EAAQC,EAAA,QAAU;AACrC,SAASC,WAAA,QAAmB;AAC5B,SAASC,UA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CAAC;EACH,CAAC;EAEDT,QAAA,CAAS,6BAA6B,MAAM;IAC1CE,EAAA,CAAG,0DAA0D,MAAM;MAEjE,MAAMK,IAAA,GAAOJ,WAAA,CAAY,iBAAiBO,OAAA,CAAQC,GAAA,CAAI,CAAC;MAEvDV,MAAA,CAAOM,IAAI,EAAEC,UAAA,CAAW;IAC1B,CAAC;IAEDN,EAAA,CAAG,6DAA6D,MAAM;MAEpE,MAAMK,IAAA,GAAOJ,WAAA,CAAY,UAAUO,OAAA,CAAQC,GAAA,CAAI,CAAC;MAChDV,MAAA,CAAOM,IAAI,EAAEE,SAAA,CAAUJ,IAAA,CAAK,QAAQ,UAAU,CAAC;MAC/CJ,MAAA,CAAOM,IAAI,EAAEK,GAAA,CAAIH,SAAA,CAAU,MAAM;IACnC,CAAC;IAEDP,EAAA,CAAG,yDAAyD,MAAM;MAEhE,MAAMK,IAAA,GAAOJ,WAAA,CAAY,UAAUO,OAAA,CAAQC,GAAA,CAAI,CAAC;MAChDV,MAAA,CAAOM,IAAI,EAAEC,UAAA,CAAW;IAC1B,CAAC;IAEDN,EAAA,CAAG,wDAAwD,MAAM;MAE/D,MAAMK,IAAA,GAAOJ,WAAA,CAAY,WAAWO,OAAA,CAAQC,GAAA,CAAI,CAAC;MACjDV,MAAA,CAAOM,IAAI,EAAEE,SAAA,CAAU,SAAS;IAClC,CAAC;EACH,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,53 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { resolvePath } from "./index.native.js";
3
- import { existsSync } from "fs";
4
- import { join } from "path";
5
- describe("resolvePath", function () {
6
- describe("basic resolution", function () {
7
- it("resolves node builtins", function () {
8
- expect(resolvePath("node:path")).toBe("node:path");
9
- expect(resolvePath("node:fs")).toBe("node:fs");
10
- });
11
- it("resolves npm packages", function () {
12
- var path = resolvePath("vitest");
13
- expect(path).toBeTruthy();
14
- expect(existsSync(path)).toBe(true);
15
- });
16
- it("resolves relative paths from cwd", function () {
17
- var path = resolvePath("./package.json");
18
- expect(path).toContain("package.json");
19
- expect(existsSync(path)).toBe(true);
20
- });
21
- });
22
- describe("respects from parameter", function () {
23
- it("resolves relative paths from specified directory", function () {
24
- var path = resolvePath("./package.json", process.cwd());
25
- expect(path).toBe(join(process.cwd(), "package.json"));
26
- expect(existsSync(path)).toBe(true);
27
- });
28
- it("resolves npm packages from specified directory", function () {
29
- var path = resolvePath("vitest", process.cwd());
30
- expect(path).toContain("vitest");
31
- });
32
- });
33
- describe("ESM entry point detection", function () {
34
- it('returns ESM entry when exports["."].import is a string', function () {
35
- var path = resolvePath("@vxrn/resolve", process.cwd());
36
- expect(path).toBeTruthy();
37
- });
38
- it('returns ESM entry when exports["."].import.default exists', function () {
39
- var path = resolvePath("vitest", process.cwd());
40
- expect(path).toContain(join("dist", "index.js"));
41
- expect(path).not.toContain(".cjs");
42
- });
43
- it("falls back to module field when exports not available", function () {
44
- var path = resolvePath("vitest", process.cwd());
45
- expect(path).toBeTruthy();
46
- });
47
- it("falls back to main/require.resolve when no ESM entry", function () {
48
- var path = resolvePath("resolve", process.cwd());
49
- expect(path).toContain("resolve");
50
- });
51
- });
52
- });
53
- //# sourceMappingURL=index.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["describe","expect","it","resolvePath","existsSync","join","toBe","path","toBeTruthy","toContain","process","cwd","not"],"sources":["../../src/index.test.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,EAAUC,MAAA,EAAQC,EAAA,QAAU;AACrC,SAASC,WAAA,QAAmB;AAC5B,SAASC,UAAA,QAAkB;AAC3B,SAASC,IAAA,QAAY;AAErBL,QAAA,CAAS,eAAe,YAAM;EAC5BA,QAAA,CAAS,oBAAoB,YAAM;IACjCE,EAAA,CAAG,0BAA0B,YAAM;MACjCD,MAAA,CAAOE,WAAA,CAAY,WAAW,CAAC,EAAEG,IAAA,CAAK,WAAW;MACjDL,MAAA,CAAOE,WAAA,CAAY,SAAS,CAAC,EAAEG,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