react-native-asset 2.2.0-rc0 → 2.2.0-rc2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/clean-assets/ios.ts"],"names":[],"mappings":"AAOA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAgC9B"}
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/clean-assets/ios.ts"],"names":[],"mappings":"AAQA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAgC9B"}
@@ -1,5 +1,6 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import * as path from "../deps/jsr.io/@std/path/1.1.3/mod.js";
3
+ /// <reference types="../xcode.d.ts" />
3
4
  import * as xcode from "xcode";
4
5
  import createGroupWithMessage from "../react-native-lib/ios/createGroupWithMessage.js";
5
6
  import getPlist from "../react-native-lib/ios/getPlist.js";
@@ -17,6 +18,6 @@ export default async function cleanAssetsIos(filePaths, platformConfig, options)
17
18
  const allFonts = existingFonts.filter((file) => removedFiles.indexOf(file) === -1);
18
19
  plist.UIAppFonts = Array.from(new Set(allFonts)); // use Set to dedupe w/existing
19
20
  }
20
- await dntShim.Deno.writeFile(platformConfig.pbxprojPath, project.writeSync());
21
+ await dntShim.Deno.writeTextFile(platformConfig.pbxprojPath, project.writeSync());
21
22
  writePlist(project, platformConfig.path, plist);
22
23
  }
package/esm/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,qBAoElB,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,qBAwElB,CAAC"}
package/esm/cli.js CHANGED
@@ -31,7 +31,7 @@ export const runCli = async () => {
31
31
  }
32
32
  }
33
33
  const reactNativeConfig = reactNativeConfigExists
34
- ? (await import(path.join(args.path, `react-native-config.js`)))
34
+ ? (await import(path.join(args.path, `react-native.config.js`))).default
35
35
  : {};
36
36
  const merged = {
37
37
  assets: args.assets.length !== 0
@@ -1 +1 @@
1
- {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/copy-assets/ios.ts"],"names":[],"mappings":"AAQA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAwC9B"}
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/copy-assets/ios.ts"],"names":[],"mappings":"AAUA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAwC9B"}
@@ -1,6 +1,8 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import * as path from "../deps/jsr.io/@std/path/1.1.3/mod.js";
3
+ /// <reference types="../xcode.d.ts" />
3
4
  import * as xcode from "xcode";
5
+ /// <reference types="../xcode.d.ts" />
4
6
  import * as xcodeParser from "xcode/lib/parser/pbxproj.js";
5
7
  import createGroupWithMessage from "../react-native-lib/ios/createGroupWithMessage.js";
6
8
  import getPlist from "../react-native-lib/ios/getPlist.js";
package/esm/mod.d.ts CHANGED
@@ -1,4 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import "./_dnt.polyfills.js";
1
3
  import "./_dnt.polyfills.js";
2
4
  export { linkAssets } from "./main.js";
3
- import "./xcode";
4
5
  //# sourceMappingURL=mod.d.ts.map
package/esm/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,SAAS,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":";AACA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
package/esm/mod.js CHANGED
@@ -1,8 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import "./_dnt.polyfills.js";
1
3
  import "./_dnt.polyfills.js";
2
4
  import * as dntShim from "./_dnt.shims.js";
3
5
  export { linkAssets } from "./main.js";
4
6
  import { runCli } from "./cli.js";
5
- import "./xcode";
6
7
  if (globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).main) {
7
8
  runCli().catch((e) => {
8
9
  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.0-rc0",
3
+ "version": "2.2.0-rc2",
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",
@@ -24,7 +24,7 @@
24
24
  "main": "./script/mod.js",
25
25
  "module": "./esm/mod.js",
26
26
  "exports": {
27
- ".": {
27
+ "react-native-asset": {
28
28
  "import": "./esm/mod.js",
29
29
  "require": "./script/mod.js"
30
30
  }
@@ -32,6 +32,9 @@
32
32
  "scripts": {
33
33
  "test": "node test_runner.js"
34
34
  },
35
+ "bin": {
36
+ "react-native-asset": "./esm/mod.js"
37
+ },
35
38
  "dependencies": {
36
39
  "plist": "^3.1.0",
37
40
  "xcode": "^3.0.1",
@@ -1 +1 @@
1
- {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/clean-assets/ios.ts"],"names":[],"mappings":"AAOA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAgC9B"}
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/clean-assets/ios.ts"],"names":[],"mappings":"AAQA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAgC9B"}
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.default = cleanAssetsIos;
40
40
  const dntShim = __importStar(require("../_dnt.shims.js"));
41
41
  const path = __importStar(require("../deps/jsr.io/@std/path/1.1.3/mod.js"));
42
+ /// <reference types="../xcode.d.ts" />
42
43
  const xcode = __importStar(require("xcode"));
43
44
  const createGroupWithMessage_js_1 = __importDefault(require("../react-native-lib/ios/createGroupWithMessage.js"));
44
45
  const getPlist_js_1 = __importDefault(require("../react-native-lib/ios/getPlist.js"));
@@ -56,6 +57,6 @@ async function cleanAssetsIos(filePaths, platformConfig, options) {
56
57
  const allFonts = existingFonts.filter((file) => removedFiles.indexOf(file) === -1);
57
58
  plist.UIAppFonts = Array.from(new Set(allFonts)); // use Set to dedupe w/existing
58
59
  }
59
- await dntShim.Deno.writeFile(platformConfig.pbxprojPath, project.writeSync());
60
+ await dntShim.Deno.writeTextFile(platformConfig.pbxprojPath, project.writeSync());
60
61
  (0, writePlist_js_1.default)(project, platformConfig.path, plist);
61
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,qBAoElB,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,qBAwElB,CAAC"}
package/script/cli.js CHANGED
@@ -67,7 +67,7 @@ const runCli = async () => {
67
67
  }
68
68
  }
69
69
  const reactNativeConfig = reactNativeConfigExists
70
- ? (await Promise.resolve(`${path.join(args.path, `react-native-config.js`)}`).then(s => __importStar(require(s))))
70
+ ? (await Promise.resolve(`${path.join(args.path, `react-native.config.js`)}`).then(s => __importStar(require(s)))).default
71
71
  : {};
72
72
  const merged = {
73
73
  assets: args.assets.length !== 0
@@ -1 +1 @@
1
- {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/copy-assets/ios.ts"],"names":[],"mappings":"AAQA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAwC9B"}
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../src/copy-assets/ios.ts"],"names":[],"mappings":"AAUA,wBAA8B,cAAc,CAC1C,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EACrD,OAAO,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBAwC9B"}
@@ -39,7 +39,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.default = cleanAssetsIos;
40
40
  const dntShim = __importStar(require("../_dnt.shims.js"));
41
41
  const path = __importStar(require("../deps/jsr.io/@std/path/1.1.3/mod.js"));
42
+ /// <reference types="../xcode.d.ts" />
42
43
  const xcode = __importStar(require("xcode"));
44
+ /// <reference types="../xcode.d.ts" />
43
45
  const xcodeParser = __importStar(require("xcode/lib/parser/pbxproj.js"));
44
46
  const createGroupWithMessage_js_1 = __importDefault(require("../react-native-lib/ios/createGroupWithMessage.js"));
45
47
  const getPlist_js_1 = __importDefault(require("../react-native-lib/ios/getPlist.js"));
package/script/mod.d.ts CHANGED
@@ -1,4 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import "./_dnt.polyfills.js";
1
3
  import "./_dnt.polyfills.js";
2
4
  export { linkAssets } from "./main.js";
3
- import "./xcode";
4
5
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,SAAS,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":";AACA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
package/script/mod.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";
2
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
4
  if (k2 === undefined) k2 = k;
@@ -35,11 +36,11 @@ var __importStar = (this && this.__importStar) || (function () {
35
36
  Object.defineProperty(exports, "__esModule", { value: true });
36
37
  exports.linkAssets = void 0;
37
38
  require("./_dnt.polyfills.js");
39
+ require("./_dnt.polyfills.js");
38
40
  const dntShim = __importStar(require("./_dnt.shims.js"));
39
41
  var main_js_1 = require("./main.js");
40
42
  Object.defineProperty(exports, "linkAssets", { enumerable: true, get: function () { return main_js_1.linkAssets; } });
41
43
  const cli_js_1 = require("./cli.js");
42
- require("./xcode");
43
44
  if (globalThis[Symbol.for("import-meta-ponyfill-commonjs")](require, module).main) {
44
45
  (0, cli_js_1.runCli)().catch((e) => {
45
46
  console.error("Error running CLI:", e);