react-native-asset 2.2.6 → 2.2.7
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/README.md +1 -1
- package/esm/mod.js +4 -1
- package/package.json +1 -1
- package/script/mod.js +4 -1
package/README.md
CHANGED
package/esm/mod.js
CHANGED
|
@@ -6,7 +6,10 @@ export { linkAssets } from "./main.js";
|
|
|
6
6
|
import { runCli } from "./cli.js";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
8
|
import process from "node:process";
|
|
9
|
-
const isMain =
|
|
9
|
+
const isMain = globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).main ||
|
|
10
|
+
(typeof dntShim.Deno === "undefined" &&
|
|
11
|
+
pathToFileURL(dntShim.Deno.realPathSync(process.argv[1])).href ===
|
|
12
|
+
globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url);
|
|
10
13
|
if (isMain) {
|
|
11
14
|
runCli().catch((e) => {
|
|
12
15
|
console.error("Error running CLI:", e);
|
package/package.json
CHANGED
package/script/mod.js
CHANGED
|
@@ -46,7 +46,10 @@ Object.defineProperty(exports, "linkAssets", { enumerable: true, get: function (
|
|
|
46
46
|
const cli_js_1 = require("./cli.js");
|
|
47
47
|
const node_url_1 = require("node:url");
|
|
48
48
|
const node_process_1 = __importDefault(require("node:process"));
|
|
49
|
-
const isMain =
|
|
49
|
+
const isMain = globalThis[Symbol.for("import-meta-ponyfill-commonjs")](require, module).main ||
|
|
50
|
+
(typeof dntShim.Deno === "undefined" &&
|
|
51
|
+
(0, node_url_1.pathToFileURL)(dntShim.Deno.realPathSync(node_process_1.default.argv[1])).href ===
|
|
52
|
+
globalThis[Symbol.for("import-meta-ponyfill-commonjs")](require, module).url);
|
|
50
53
|
if (isMain) {
|
|
51
54
|
(0, cli_js_1.runCli)().catch((e) => {
|
|
52
55
|
console.error("Error running CLI:", e);
|