@react-native-oh/react-native-harmony-cli 0.77.44 → 0.82.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/dist/codegen/generators/NativeModuleCodeGenerator.js +3 -3
- package/dist/commands/bundle-harmony.js +23 -19
- package/dist/commands/init.js +0 -0
- package/dist/init/templates/harmony/build-profile.json5 +1 -0
- package/harmony/rnoh-hvigor-plugin-0.82.7.tgz +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/00a68392 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0544a6cc +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0f36b2db +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/12f23f1e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/13d95d98 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1629e86b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/180c8379 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1a697147 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1a8271b1 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1b7fa689 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/255a9f13 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/268d155b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/27db9aa4 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/28db79ed +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2dc2bbcb +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2df5f8c5 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2f88aedb +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/31b3a7ea +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/36335b1c +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/38fca641 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/397722eb +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{d64bff57 → 397b6432} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/3b17421f +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/454f5e18 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/45ec6cce +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/482d51b1 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4ac5cd67 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4d40499a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4dcad919 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4fc31929 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/54edc8f5 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/558a5405 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/58d2b670 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5ec7feca +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/62180f3e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/63981360 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/64096c89 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/64af560b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6585e783 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{8e83cbe1 → 6954304f} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{1184678c → 69fd6235} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6d3a0478 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6e131db7 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/778cd8f1 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/788206b6 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7882dc26 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7b3c14f7 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7cdfe667 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8048c487 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8332d9a3 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/84e5b603 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/854d8127 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/88c97376 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/90d5f644 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/967e25ac +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/969896c2 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9790193e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{c342b18e → 97ae40c5} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9a5bf482 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a07adeb9 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a427f355 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{cf039161 → a9dd7eb7} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a9e9d79e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ab920855 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ab9e3038 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/af054988 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/afe03e51 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b3b83913 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b4db7b4d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b5225355 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b8c00f06 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b917a081 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b9e2f3bd +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{5c2aafe7 → bd70db0e} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/bdbda648 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/be1e5469 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/{333648cc → c9462295} +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ca6e5efa +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/caf52beb +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cb268960 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cca16b15 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cfc1c937 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d10e6e05 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d172fc04 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d4e94e50 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d59f8d2c +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/da964053 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e0bb712a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e3e6ca34 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e50f7385 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f1a1d282 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f2514c3c +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f66207cf +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f8d129ce +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/fb1e9558 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ff7e3608 +0 -0
- package/package.json +4 -4
- package/src/codegen/generators/NativeModuleCodeGenerator.ts +3 -3
- package/src/commands/bundle-harmony.ts +24 -32
- package/src/init/templates/harmony/build-profile.json5 +1 -0
- package/tsconfig.json +5 -0
- package/harmony/rnoh-hvigor-plugin-0.77.44.tgz +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0271b9dd +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/07ba0208 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/082dd09d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0a9e1b0b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0c3d528a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1014d3ff +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/12621366 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/126d3e66 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/19262852 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/203fac53 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/237b660a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2528002d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2587d041 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2893bd11 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2af6ff9d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2bf31f33 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/386f6df0 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/3b8c270e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/3bcc34ba +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/444808bd +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/44a775e2 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/46da3ccd +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/51f80e35 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5203a2ca +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/52795646 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/577f8208 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5c69bcfe +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/62695b92 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/62698102 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6411ab00 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6569ba92 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/65e5133c +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/66029655 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/69e85d0d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6afcb99e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6de07367 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/72498307 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7babd1de +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7fe56d21 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/810cbd72 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/812386d2 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8448897d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/84ab0a41 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/853825e2 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/862ad93a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/86b14da6 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/87f0fe62 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/88ee8f74 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8c5237c9 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8c725800 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8f4085b9 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/931f0b2e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/940c8f92 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/968191a3 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/970780c0 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/98bc4394 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/99a3b0b0 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9c0ffa6b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9d9b42c2 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a04266ef +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a18f78c5 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a642fb0e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a97edf40 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/aa672a20 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ae25c61a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b2bebae6 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ba492422 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/bd3e6c21 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/be9e564e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c3993e7e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c52ffd54 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c7079ad4 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c8eb01c1 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/caee5d30 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d0377c40 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d262bc85 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d287cb5c +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d716a608 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d751012b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e0873711 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e1fcf77b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e8548d8a +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/eaedd71d +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/eca0019e +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f7189953 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f75cb201 +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f888164b +0 -0
- package/node-compile-cache/v22.14.0-x64-efe9a9df-0/fdb9eb5a +0 -0
|
@@ -41,9 +41,9 @@ class NativeModuleCodeGenerator {
|
|
|
41
41
|
name,
|
|
42
42
|
members: enumSpec.members.map((member) => ({
|
|
43
43
|
name: member.name,
|
|
44
|
-
value:
|
|
45
|
-
? (0, core_1.wrapWithQuotes)(member.value)
|
|
46
|
-
: member.value.toString(),
|
|
44
|
+
value: member.value.type === 'StringLiteralTypeAnnotation'
|
|
45
|
+
? (0, core_1.wrapWithQuotes)(member.value.value)
|
|
46
|
+
: member.value.value.toString(),
|
|
47
47
|
})),
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -8,16 +8,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
11
22
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
24
|
};
|
|
25
|
+
var _a;
|
|
14
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
27
|
exports.commandBundleHarmony = void 0;
|
|
16
28
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
17
29
|
const os_1 = __importDefault(require("os"));
|
|
18
30
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
19
|
-
const metro_1 =
|
|
20
|
-
const Server_1 = __importDefault(require("metro/src/Server"));
|
|
31
|
+
const metro_1 = require("metro");
|
|
21
32
|
const path_1 = __importDefault(require("path"));
|
|
22
33
|
const assetResolver_1 = require("../assetResolver");
|
|
23
34
|
const child_process_1 = require("child_process");
|
|
@@ -29,7 +40,8 @@ const HERMESC_BIN_PATH = {
|
|
|
29
40
|
linux: path_1.default.normalize('linux64-bin/hermesc'),
|
|
30
41
|
win32: path_1.default.normalize('win64-bin/hermesc.exe'),
|
|
31
42
|
};
|
|
32
|
-
const
|
|
43
|
+
const isHermesV1Enabled = ((_a = process.env.HERMES_V1_ENABLED) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'true';
|
|
44
|
+
const HERMESC_PATH_PREFIX = path_1.default.normalize(isHermesV1Enabled ? './node_modules/hermes-compiler/hermesc' : './node_modules/react-native/sdks/hermesc/');
|
|
33
45
|
const HARMONY_RESOURCE_PATH = path_1.default.normalize('./harmony/entry/src/main/resources/rawfile');
|
|
34
46
|
const ASSETS_DEFAULT_DEST_PATH = path_1.default.normalize('./harmony/entry/src/main/resources/rawfile/assets');
|
|
35
47
|
exports.commandBundleHarmony = {
|
|
@@ -115,6 +127,7 @@ exports.commandBundleHarmony = {
|
|
|
115
127
|
const assetsDest = args.assetsDest;
|
|
116
128
|
yield fs_extra_1.default.ensureDir(assetsDest);
|
|
117
129
|
const buildOptions = {
|
|
130
|
+
assets: true,
|
|
118
131
|
entry: args.entryFile,
|
|
119
132
|
platform: 'harmony',
|
|
120
133
|
minify: args.minify !== undefined ? args.minify : !args.dev,
|
|
@@ -126,8 +139,7 @@ exports.commandBundleHarmony = {
|
|
|
126
139
|
config: args.config,
|
|
127
140
|
resetCache: args.resetCache,
|
|
128
141
|
});
|
|
129
|
-
const
|
|
130
|
-
const assets = yield retrieveAssetsData(metroConfig, buildOptions);
|
|
142
|
+
const _b = yield createBundle(metroConfig, buildOptions), { assets } = _b, bundle = __rest(_b, ["assets"]);
|
|
131
143
|
if (shouldGenerateHbcBundle) {
|
|
132
144
|
yield saveHbcBundle(logger, bundle.code, bundleOutput, args.hermescDir, args.hermescOptions);
|
|
133
145
|
}
|
|
@@ -135,7 +147,9 @@ exports.commandBundleHarmony = {
|
|
|
135
147
|
yield saveJSBundle(logger, bundle, bundleOutput);
|
|
136
148
|
}
|
|
137
149
|
maybeSaveSourceMap(logger, bundle, args.sourcemapOutput);
|
|
138
|
-
|
|
150
|
+
if (assets) {
|
|
151
|
+
yield (0, assetResolver_1.copyAssets)(logger, assets, assetsDest);
|
|
152
|
+
}
|
|
139
153
|
}
|
|
140
154
|
catch (err) {
|
|
141
155
|
if (err instanceof core_1.DescriptiveError) {
|
|
@@ -153,14 +167,15 @@ function loadMetroConfig(options) {
|
|
|
153
167
|
if (!options.config) {
|
|
154
168
|
delete options.config;
|
|
155
169
|
}
|
|
156
|
-
return yield metro_1.
|
|
170
|
+
return yield (0, metro_1.loadConfig)(options);
|
|
157
171
|
});
|
|
158
172
|
}
|
|
159
173
|
function createBundle(metroConfig, buildOptions) {
|
|
160
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
175
|
// casting needed as Metro.runBuild returns Promise<{code: string, map: string}>
|
|
162
176
|
// despite being typed as Promise<void>
|
|
163
|
-
|
|
177
|
+
// TODO: adjust if https://github.com/facebook/metro/pull/1621 is merged
|
|
178
|
+
return yield (0, metro_1.runBuild)(metroConfig, buildOptions);
|
|
164
179
|
});
|
|
165
180
|
}
|
|
166
181
|
function saveHbcBundle(logger, bundleCode, bundleOutput, hermescPath, hermescOptions) {
|
|
@@ -204,14 +219,3 @@ function maybeSaveSourceMap(logger, bundle, sourceMapOutput) {
|
|
|
204
219
|
logger.info((s) => `Created ${sourceMapOutput}`);
|
|
205
220
|
}
|
|
206
221
|
}
|
|
207
|
-
function retrieveAssetsData(metroConfig, buildOptions) {
|
|
208
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
-
const metroServer = new Server_1.default(metroConfig);
|
|
210
|
-
try {
|
|
211
|
-
return yield metroServer.getAssets(Object.assign(Object.assign(Object.assign({}, Server_1.default.DEFAULT_BUNDLE_OPTIONS), buildOptions), { entryFile: buildOptions.entry, bundleType: 'todo' }));
|
|
212
|
-
}
|
|
213
|
-
finally {
|
|
214
|
-
metroServer.end();
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
package/dist/commands/init.js
CHANGED
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-oh/react-native-harmony-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"metro": "^0.
|
|
28
|
+
"metro": "^0.83.1"
|
|
29
29
|
},
|
|
30
30
|
"main": "dist/index.js",
|
|
31
31
|
"devDependencies": {
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"directory-tree": "^3.5.1",
|
|
41
41
|
"execa": "npm:@esm2cjs/execa@^6.1.1-cjs.1",
|
|
42
42
|
"jest": "^29.5.0",
|
|
43
|
-
"react-native": "
|
|
43
|
+
"react-native": "0.82.1",
|
|
44
44
|
"ts-jest": "^29.1.0",
|
|
45
45
|
"typescript": "^5.0.4"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@react-native-community/cli-tools": "^13.6.5",
|
|
49
|
-
"@react-native/codegen": "0.
|
|
49
|
+
"@react-native/codegen": "0.82.1",
|
|
50
50
|
"@tsconfig/recommended": "^1.0.2",
|
|
51
51
|
"case": "^1.6.3",
|
|
52
52
|
"chalk": "^4",
|
|
@@ -70,9 +70,9 @@ export class NativeModuleCodeGenerator implements SpecCodeGenerator {
|
|
|
70
70
|
members: enumSpec.members.map((member) => ({
|
|
71
71
|
name: member.name,
|
|
72
72
|
value:
|
|
73
|
-
|
|
74
|
-
? wrapWithQuotes(member.value)
|
|
75
|
-
: member.value.toString(),
|
|
73
|
+
member.value.type === 'StringLiteralTypeAnnotation'
|
|
74
|
+
? wrapWithQuotes(member.value.value)
|
|
75
|
+
: member.value.value.toString(),
|
|
76
76
|
})),
|
|
77
77
|
});
|
|
78
78
|
});
|
|
@@ -2,9 +2,7 @@ import { Command } from './types';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import os from 'os';
|
|
4
4
|
import fse from 'fs-extra';
|
|
5
|
-
import
|
|
6
|
-
import { RunBuildOptions as BuildOptions } from 'metro';
|
|
7
|
-
import MetroServer from 'metro/src/Server';
|
|
5
|
+
import {runBuild, loadConfig, AssetData, RunBuildOptions as BuildOptions} from 'metro';
|
|
8
6
|
import pathUtils from 'path';
|
|
9
7
|
import { copyAssets } from '../assetResolver';
|
|
10
8
|
import { execSync } from 'child_process';
|
|
@@ -12,15 +10,16 @@ import { Logger } from '../io';
|
|
|
12
10
|
import { DescriptiveError } from '../core';
|
|
13
11
|
import { randomUUID } from 'node:crypto';
|
|
14
12
|
|
|
15
|
-
type MetroConfig = Awaited<ReturnType<typeof
|
|
13
|
+
type MetroConfig = Awaited<ReturnType<typeof loadConfig>>;
|
|
16
14
|
|
|
17
15
|
const HERMESC_BIN_PATH = {
|
|
18
16
|
darwin: pathUtils.normalize('osx-bin/hermesc'),
|
|
19
17
|
linux: pathUtils.normalize('linux64-bin/hermesc'),
|
|
20
18
|
win32: pathUtils.normalize('win64-bin/hermesc.exe'),
|
|
21
19
|
};
|
|
20
|
+
const isHermesV1Enabled = process.env.HERMES_V1_ENABLED?.toLowerCase() === 'true';
|
|
22
21
|
const HERMESC_PATH_PREFIX = pathUtils.normalize(
|
|
23
|
-
'./node_modules/react-native/sdks/hermesc/'
|
|
22
|
+
isHermesV1Enabled ? './node_modules/hermes-compiler/hermesc' : './node_modules/react-native/sdks/hermesc/'
|
|
24
23
|
);
|
|
25
24
|
const HARMONY_RESOURCE_PATH = pathUtils.normalize(
|
|
26
25
|
'./harmony/entry/src/main/resources/rawfile'
|
|
@@ -29,8 +28,15 @@ const ASSETS_DEFAULT_DEST_PATH = pathUtils.normalize(
|
|
|
29
28
|
'./harmony/entry/src/main/resources/rawfile/assets'
|
|
30
29
|
);
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
type Bundle = {
|
|
31
|
+
// TODO: adjust if https://github.com/facebook/metro/pull/1621 is merged
|
|
32
|
+
type Bundle = {
|
|
33
|
+
code: string;
|
|
34
|
+
map: string;
|
|
35
|
+
}
|
|
36
|
+
type RunBuildResult = Bundle & {
|
|
37
|
+
assets?: ReadonlyArray<AssetData>;
|
|
38
|
+
}
|
|
39
|
+
type RunBuildOptions = BuildOptions & {assets?: boolean};
|
|
34
40
|
type Path = string;
|
|
35
41
|
type OSType = 'darwin' | 'linux' | 'win32';
|
|
36
42
|
|
|
@@ -127,7 +133,8 @@ export const commandBundleHarmony: Command = {
|
|
|
127
133
|
await fse.ensureDir(pathUtils.dirname(bundleOutput));
|
|
128
134
|
const assetsDest: Path = args.assetsDest;
|
|
129
135
|
await fse.ensureDir(assetsDest);
|
|
130
|
-
const buildOptions:
|
|
136
|
+
const buildOptions: RunBuildOptions = {
|
|
137
|
+
assets: true,
|
|
131
138
|
entry: args.entryFile,
|
|
132
139
|
platform: 'harmony',
|
|
133
140
|
minify: args.minify !== undefined ? args.minify : !args.dev,
|
|
@@ -140,8 +147,7 @@ export const commandBundleHarmony: Command = {
|
|
|
140
147
|
resetCache: args.resetCache,
|
|
141
148
|
});
|
|
142
149
|
|
|
143
|
-
const bundle
|
|
144
|
-
const assets = await retrieveAssetsData(metroConfig, buildOptions);
|
|
150
|
+
const {assets, ...bundle}= await createBundle(metroConfig, buildOptions);
|
|
145
151
|
|
|
146
152
|
if (shouldGenerateHbcBundle) {
|
|
147
153
|
await saveHbcBundle(
|
|
@@ -155,7 +161,9 @@ export const commandBundleHarmony: Command = {
|
|
|
155
161
|
await saveJSBundle(logger, bundle, bundleOutput);
|
|
156
162
|
}
|
|
157
163
|
maybeSaveSourceMap(logger, bundle, args.sourcemapOutput);
|
|
158
|
-
|
|
164
|
+
if(assets){
|
|
165
|
+
await copyAssets(logger, assets, assetsDest);
|
|
166
|
+
}
|
|
159
167
|
} catch (err) {
|
|
160
168
|
if (err instanceof DescriptiveError) {
|
|
161
169
|
logger.descriptiveError(err);
|
|
@@ -174,16 +182,17 @@ async function loadMetroConfig(options: {
|
|
|
174
182
|
if (!options.config) {
|
|
175
183
|
delete options.config;
|
|
176
184
|
}
|
|
177
|
-
return await
|
|
185
|
+
return await loadConfig(options);
|
|
178
186
|
}
|
|
179
187
|
|
|
180
188
|
async function createBundle(
|
|
181
189
|
metroConfig: MetroConfig,
|
|
182
|
-
buildOptions:
|
|
183
|
-
)
|
|
190
|
+
buildOptions: RunBuildOptions
|
|
191
|
+
) {
|
|
184
192
|
// casting needed as Metro.runBuild returns Promise<{code: string, map: string}>
|
|
185
193
|
// despite being typed as Promise<void>
|
|
186
|
-
|
|
194
|
+
// TODO: adjust if https://github.com/facebook/metro/pull/1621 is merged
|
|
195
|
+
return await runBuild(metroConfig, buildOptions) as unknown as RunBuildResult;
|
|
187
196
|
}
|
|
188
197
|
|
|
189
198
|
async function saveHbcBundle(
|
|
@@ -250,20 +259,3 @@ function maybeSaveSourceMap(
|
|
|
250
259
|
logger.info((s) => `Created ${sourceMapOutput}`);
|
|
251
260
|
}
|
|
252
261
|
}
|
|
253
|
-
|
|
254
|
-
async function retrieveAssetsData(
|
|
255
|
-
metroConfig: MetroConfig,
|
|
256
|
-
buildOptions: BuildOptions
|
|
257
|
-
): Promise<readonly AssetData[]> {
|
|
258
|
-
const metroServer = new MetroServer(metroConfig);
|
|
259
|
-
try {
|
|
260
|
-
return await metroServer.getAssets({
|
|
261
|
-
...MetroServer.DEFAULT_BUNDLE_OPTIONS,
|
|
262
|
-
...buildOptions,
|
|
263
|
-
entryFile: buildOptions.entry,
|
|
264
|
-
bundleType: 'todo',
|
|
265
|
-
});
|
|
266
|
-
} finally {
|
|
267
|
-
metroServer.end();
|
|
268
|
-
}
|
|
269
|
-
}
|
package/tsconfig.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|