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 CHANGED
@@ -52,7 +52,7 @@
52
52
  ```
53
53
  Can also run with Deno without installing
54
54
  ```
55
- deno run @unimonkiez/react-native-asset
55
+ deno run jsr:@unimonkiez/react-native-asset
56
56
  ```
57
57
 
58
58
  ## Explanation
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 = pathToFileURL(dntShim.Deno.realPathSync(process.argv[1])).href === globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).url;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-asset",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "Linking and unlinking of assets in your react-native app, works for fonts and sounds",
5
5
  "keywords": [
6
6
  "react-native",
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 = (0, node_url_1.pathToFileURL)(dntShim.Deno.realPathSync(node_process_1.default.argv[1])).href === globalThis[Symbol.for("import-meta-ponyfill-commonjs")](require, module).url;
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);