@react-native-oh/react-native-harmony-cli 0.82.31 → 0.84.2

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.
Files changed (265) hide show
  1. package/README.md +4 -4
  2. package/dist/codegen/core/CodeGenerator.js +1 -1
  3. package/dist/codegen/core/CodegenError.js +1 -1
  4. package/dist/codegen/core/EventUtils.js +1 -1
  5. package/dist/codegen/core/TypeAnnotationToTS.js +15 -6
  6. package/dist/codegen/core/UberSchema.js +1 -1
  7. package/dist/codegen/core/index.js +1 -1
  8. package/dist/codegen/generators/AppBuildTimeGlueCodeGenerator.js +1 -1
  9. package/dist/codegen/generators/ArkTSComponentCodeGeneratorArkTS.js +1 -1
  10. package/dist/codegen/generators/ArkTSComponentCodeGeneratorCAPI.js +1 -1
  11. package/dist/codegen/generators/CppComponentCodeGenerator.js +1 -1
  12. package/dist/codegen/generators/LibGlueCodeGenerator.js +17 -7
  13. package/dist/codegen/generators/NativeModuleCodeGenerator.js +1 -1
  14. package/dist/codegen/generators/SharedComponentCodeGenerator.js +1 -1
  15. package/dist/codegen/generators/UberGeneratorV1.js +1 -1
  16. package/dist/codegen/generators/UberGeneratorV2.js +1 -1
  17. package/dist/codegen/generators/index.js +1 -1
  18. package/dist/codegen/index.js +1 -1
  19. package/dist/codegen/templates/BaseComponentInstanceHTemplate.js +1 -1
  20. package/dist/codegen/templates/BasePackageHTemplate.js +1 -1
  21. package/dist/codegen/templates/ComponentDescriptorHTemplate.js +1 -1
  22. package/dist/codegen/templates/ComponentJSIBinderHTemplate.js +1 -1
  23. package/dist/codegen/templates/ComponentUtilsTSTemplate.js +1 -1
  24. package/dist/codegen/templates/IndexTSTemplate.js +1 -1
  25. package/dist/codegen/templates/RNOHGeneratedPackageHTemplate.js +1 -1
  26. package/dist/codegen/templates/TurboModuleCppTemplate.js +1 -1
  27. package/dist/codegen/templates/TurboModuleHTemplate.js +1 -1
  28. package/dist/codegen/templates/TurboModuleSpecTSTemplate.js +1 -1
  29. package/dist/codegen/templates/index.js +1 -1
  30. package/dist/commands/bundle-harmony.js +1 -1
  31. package/dist/commands/clean-harmony.js +1 -1
  32. package/dist/commands/codegen-harmony.js +1 -1
  33. package/dist/commands/codegen-lib-harmony.js +79 -41
  34. package/dist/commands/index.js +1 -1
  35. package/dist/commands/init-harmony.js +1 -1
  36. package/dist/commands/link-harmony.js +1 -1
  37. package/dist/commands/types.js +1 -1
  38. package/dist/commands/verify-package-harmony.js +1 -1
  39. package/dist/core/AbsolutePath.js +2 -2
  40. package/dist/core/CodegenConfig.js +2 -2
  41. package/dist/core/DescriptiveError.js +2 -2
  42. package/dist/core/FileSystem.js +2 -2
  43. package/dist/core/OHPackageJSON5.js +2 -2
  44. package/dist/core/ValidationError.js +2 -2
  45. package/dist/core/ValueObject.js +2 -2
  46. package/dist/core/fs.js +2 -2
  47. package/dist/core/index.js +1 -1
  48. package/dist/index.js +1 -1
  49. package/dist/init/templates/AppScopeAppJSON5Template.js +1 -1
  50. package/dist/init/templates/AppScopeStringVarTemplate.js +1 -1
  51. package/dist/init/templates/EntryIndexTemplate.js +1 -1
  52. package/dist/init/templates/EntryStringVarTemplate.js +1 -1
  53. package/dist/init/templates/HvigorConfigJson5Template.js +1 -1
  54. package/dist/init/templates/MetroConfigTemplate.js +1 -1
  55. package/dist/init/templates/OhPackageJson5Template.js +1 -1
  56. package/dist/init/templates/harmony/entry/gitignore +1 -1
  57. package/dist/init/templates/harmony/entry/src/main/cpp/gitignore +1 -1
  58. package/dist/init/templates/harmony/entry/src/main/ets/PackageProvider.ets +1 -1
  59. package/dist/init/templates/harmony/entry/src/main/ets/codegen/gitignore +1 -1
  60. package/dist/init/templates/harmony/entry/src/main/ets/entryability/EntryAbility.ets +1 -1
  61. package/dist/init/templates/harmony/entry/src/main/ets/gitignore +1 -1
  62. package/dist/init/templates/harmony/entry/src/main/ets/workers/RNOHWorker.ets +1 -1
  63. package/dist/init/templates/harmony/entry/src/main/resources/gitignore +1 -1
  64. package/dist/init/templates/harmony/entry/src/ohosTest/ets/test/List.test.ets +1 -1
  65. package/dist/init/templates/harmony/gitignore +13 -1
  66. package/dist/init/templates/index.js +1 -1
  67. package/dist/io/CliExecutor.js +1 -1
  68. package/dist/io/Logger.js +1 -1
  69. package/dist/io/RealFS.js +1 -1
  70. package/dist/io/TarGz.js +1 -1
  71. package/dist/io/__fixtures__.js +1 -1
  72. package/dist/io/fsUtils.js +1 -1
  73. package/dist/io/index.js +1 -1
  74. package/dist/package-verifier/checks/HarmonyDirContainsOnlyHarsCheck.js +1 -1
  75. package/dist/package-verifier/checks/HarmonyDirExistsCheck.js +1 -1
  76. package/dist/package-verifier/checks/NpmAnAndOhPackageVersionsAreEqual.js +1 -1
  77. package/dist/package-verifier/checks/OhPackageNameFollowsNamingConventionCheck.js +1 -1
  78. package/dist/package-verifier/checks/index.js +1 -1
  79. package/dist/package-verifier/index.js +1 -1
  80. package/dist/package-verifier/types.js +1 -1
  81. package/dist/package-verifier/verify-package.js +1 -1
  82. package/harmony/rnoh-hvigor-plugin-0.84.2.tgz +0 -0
  83. package/jest.config.js +1 -1
  84. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/00a68392 +0 -0
  85. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0544a6cc +0 -0
  86. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0f36b2db +0 -0
  87. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/12f23f1e +0 -0
  88. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/13d95d98 +0 -0
  89. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1629e86b +0 -0
  90. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/180c8379 +0 -0
  91. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1a697147 +0 -0
  92. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1a8271b1 +0 -0
  93. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1b7fa689 +0 -0
  94. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/255a9f13 +0 -0
  95. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/268d155b +0 -0
  96. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/27db9aa4 +0 -0
  97. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/28db79ed +0 -0
  98. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2dc2bbcb +0 -0
  99. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2df5f8c5 +0 -0
  100. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2f88aedb +0 -0
  101. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/31b3a7ea +0 -0
  102. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/36335b1c +0 -0
  103. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/38fca641 +0 -0
  104. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/397722eb +0 -0
  105. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/397b6432 +0 -0
  106. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/3b17421f +0 -0
  107. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/454f5e18 +0 -0
  108. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/45ec6cce +0 -0
  109. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/482d51b1 +0 -0
  110. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4ac5cd67 +0 -0
  111. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4d40499a +0 -0
  112. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4dcad919 +0 -0
  113. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/4fc31929 +0 -0
  114. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/54edc8f5 +0 -0
  115. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/558a5405 +0 -0
  116. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/58d2b670 +0 -0
  117. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5ec7feca +0 -0
  118. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/62180f3e +0 -0
  119. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/63981360 +0 -0
  120. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/64096c89 +0 -0
  121. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/64af560b +0 -0
  122. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6585e783 +0 -0
  123. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6954304f +0 -0
  124. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/69fd6235 +0 -0
  125. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6d3a0478 +0 -0
  126. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6e131db7 +0 -0
  127. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/778cd8f1 +0 -0
  128. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/788206b6 +0 -0
  129. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7882dc26 +0 -0
  130. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7b3c14f7 +0 -0
  131. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7cdfe667 +0 -0
  132. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8048c487 +0 -0
  133. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8332d9a3 +0 -0
  134. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/84e5b603 +0 -0
  135. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/854d8127 +0 -0
  136. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/88c97376 +0 -0
  137. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/90d5f644 +0 -0
  138. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/967e25ac +0 -0
  139. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/969896c2 +0 -0
  140. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9790193e +0 -0
  141. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/97ae40c5 +0 -0
  142. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9a5bf482 +0 -0
  143. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a07adeb9 +0 -0
  144. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a427f355 +0 -0
  145. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a9dd7eb7 +0 -0
  146. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a9e9d79e +0 -0
  147. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ab920855 +0 -0
  148. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ab9e3038 +0 -0
  149. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/af054988 +0 -0
  150. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/afe03e51 +0 -0
  151. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b3b83913 +0 -0
  152. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b4db7b4d +0 -0
  153. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b5225355 +0 -0
  154. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b8c00f06 +0 -0
  155. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b917a081 +0 -0
  156. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b9e2f3bd +0 -0
  157. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/bd70db0e +0 -0
  158. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/bdbda648 +0 -0
  159. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/be1e5469 +0 -0
  160. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c9462295 +0 -0
  161. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ca6e5efa +0 -0
  162. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/caf52beb +0 -0
  163. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cb268960 +0 -0
  164. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cca16b15 +0 -0
  165. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cfc1c937 +0 -0
  166. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d10e6e05 +0 -0
  167. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d172fc04 +0 -0
  168. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d4e94e50 +0 -0
  169. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d59f8d2c +0 -0
  170. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/da964053 +0 -0
  171. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e0bb712a +0 -0
  172. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e3e6ca34 +0 -0
  173. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e50f7385 +0 -0
  174. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f1a1d282 +0 -0
  175. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f2514c3c +0 -0
  176. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f66207cf +0 -0
  177. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f8d129ce +0 -0
  178. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/fb1e9558 +0 -0
  179. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ff7e3608 +0 -0
  180. package/package.json +3 -3
  181. package/react-native.config.js +1 -1
  182. package/scripts/copy-template.js +1 -1
  183. package/scripts/sync-hvigor.js +1 -3
  184. package/src/codegen/core/CodeGenerator.ts +1 -1
  185. package/src/codegen/core/CodegenError.ts +1 -1
  186. package/src/codegen/core/EventUtils.ts +1 -1
  187. package/src/codegen/core/TypeAnnotationToTS.test.ts +1 -1
  188. package/src/codegen/core/TypeAnnotationToTS.ts +33 -26
  189. package/src/codegen/core/UberSchema.ts +1 -1
  190. package/src/codegen/core/index.ts +1 -1
  191. package/src/codegen/generators/AppBuildTimeGlueCodeGenerator.ts +1 -1
  192. package/src/codegen/generators/ArkTSComponentCodeGeneratorArkTS.ts +1 -1
  193. package/src/codegen/generators/ArkTSComponentCodeGeneratorCAPI.ts +1 -1
  194. package/src/codegen/generators/CppComponentCodeGenerator.ts +1 -1
  195. package/src/codegen/generators/LibGlueCodeGenerator.ts +24 -13
  196. package/src/codegen/generators/NativeModuleCodeGenerator.ts +1 -1
  197. package/src/codegen/generators/SharedComponentCodeGenerator.ts +1 -1
  198. package/src/codegen/generators/UberGeneratorV1.ts +1 -1
  199. package/src/codegen/generators/UberGeneratorV2.ts +1 -1
  200. package/src/codegen/generators/index.ts +1 -1
  201. package/src/codegen/index.ts +1 -1
  202. package/src/codegen/templates/BaseComponentInstanceHTemplate.ts +1 -1
  203. package/src/codegen/templates/BasePackageHTemplate.ts +1 -1
  204. package/src/codegen/templates/ComponentDescriptorHTemplate.ts +1 -1
  205. package/src/codegen/templates/ComponentJSIBinderHTemplate.ts +1 -1
  206. package/src/codegen/templates/ComponentUtilsTSTemplate.ts +1 -1
  207. package/src/codegen/templates/IndexTSTemplate.ts +1 -1
  208. package/src/codegen/templates/RNOHGeneratedPackageHTemplate.ts +1 -1
  209. package/src/codegen/templates/TurboModuleCppTemplate.ts +1 -1
  210. package/src/codegen/templates/TurboModuleHTemplate.ts +1 -1
  211. package/src/codegen/templates/TurboModuleSpecTSTemplate.ts +1 -1
  212. package/src/codegen/templates/index.ts +1 -1
  213. package/src/commands/bundle-harmony.ts +1 -1
  214. package/src/commands/clean-harmony.ts +1 -1
  215. package/src/commands/codegen-harmony.ts +1 -1
  216. package/src/commands/codegen-lib-harmony.ts +111 -57
  217. package/src/commands/index.ts +1 -1
  218. package/src/commands/init-harmony.ts +1 -1
  219. package/src/commands/link-harmony.ts +1 -1
  220. package/src/commands/types.ts +1 -1
  221. package/src/commands/verify-package-harmony.ts +1 -1
  222. package/src/core/AbsolutePath.ts +2 -2
  223. package/src/core/CodegenConfig.ts +2 -2
  224. package/src/core/DescriptiveError.ts +2 -2
  225. package/src/core/FileSystem.ts +2 -2
  226. package/src/core/OHPackageJSON5.ts +2 -2
  227. package/src/core/ValidationError.ts +2 -2
  228. package/src/core/ValueObject.ts +2 -2
  229. package/src/core/fs.ts +2 -2
  230. package/src/core/index.ts +1 -1
  231. package/src/index.ts +1 -1
  232. package/src/init/templates/AppScopeAppJSON5Template.ts +1 -1
  233. package/src/init/templates/AppScopeStringVarTemplate.ts +1 -1
  234. package/src/init/templates/EntryIndexTemplate.ts +1 -1
  235. package/src/init/templates/EntryStringVarTemplate.ts +1 -1
  236. package/src/init/templates/HvigorConfigJson5Template.ts +1 -1
  237. package/src/init/templates/MetroConfigTemplate.ts +1 -1
  238. package/src/init/templates/OhPackageJson5Template.ts +1 -1
  239. package/src/init/templates/harmony/entry/gitignore +1 -1
  240. package/src/init/templates/harmony/entry/src/main/cpp/gitignore +1 -1
  241. package/src/init/templates/harmony/entry/src/main/ets/PackageProvider.ets +1 -1
  242. package/src/init/templates/harmony/entry/src/main/ets/codegen/gitignore +1 -1
  243. package/src/init/templates/harmony/entry/src/main/ets/entryability/EntryAbility.ets +1 -1
  244. package/src/init/templates/harmony/entry/src/main/ets/gitignore +1 -1
  245. package/src/init/templates/harmony/entry/src/main/ets/workers/RNOHWorker.ets +1 -1
  246. package/src/init/templates/harmony/entry/src/main/resources/gitignore +1 -1
  247. package/src/init/templates/harmony/entry/src/ohosTest/ets/test/List.test.ets +1 -1
  248. package/src/init/templates/harmony/gitignore +13 -1
  249. package/src/init/templates/index.ts +1 -1
  250. package/src/io/CliExecutor.ts +1 -1
  251. package/src/io/Logger.ts +1 -1
  252. package/src/io/RealFS.ts +1 -1
  253. package/src/io/TarGz.ts +1 -1
  254. package/src/io/__fixtures__.ts +1 -1
  255. package/src/io/fsUtils.ts +1 -1
  256. package/src/io/index.ts +1 -1
  257. package/src/package-verifier/checks/HarmonyDirContainsOnlyHarsCheck.ts +1 -1
  258. package/src/package-verifier/checks/HarmonyDirExistsCheck.ts +1 -1
  259. package/src/package-verifier/checks/NpmAnAndOhPackageVersionsAreEqual.ts +1 -1
  260. package/src/package-verifier/checks/OhPackageNameFollowsNamingConventionCheck.ts +1 -1
  261. package/src/package-verifier/checks/index.ts +1 -1
  262. package/src/package-verifier/index.ts +1 -1
  263. package/src/package-verifier/types.ts +1 -1
  264. package/src/package-verifier/verify-package.ts +1 -1
  265. package/harmony/rnoh-hvigor-plugin-0.82.31.tgz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-oh/react-native-harmony-cli",
3
- "version": "0.82.31",
3
+ "version": "0.84.2",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -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": "0.82.1",
43
+ "react-native": "0.84.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.82.1",
49
+ "@react-native/codegen": "0.84.1",
50
50
  "@tsconfig/recommended": "^1.0.2",
51
51
  "case": "^1.6.3",
52
52
  "chalk": "^4",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -21,7 +21,5 @@ async function sync(configFilePaths = []) {
21
21
  }
22
22
 
23
23
  sync([
24
- '../tester/harmony/hvigor/hvigor-config.json5',
25
- '../tester-ecosystem/harmony/hvigor/hvigor-config.json5',
26
- '../react-native-harmony-61-interop-tester/rnoh-entry/harmony/hvigor/hvigor-config.json5'
24
+ '../tester/harmony/hvigor/hvigor-config.json5'
27
25
  ]).catch(console.error);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,24 +1,27 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
8
  import {
9
+ ArrayTypeAnnotation,
10
+ BooleanLiteralTypeAnnotation,
9
11
  BooleanTypeAnnotation,
10
12
  DoubleTypeAnnotation,
11
13
  FloatTypeAnnotation,
12
14
  Int32TypeAnnotation,
13
15
  MixedTypeAnnotation,
16
+ NativeModuleTypeAnnotation,
17
+ Nullable,
18
+ NumberLiteralTypeAnnotation,
14
19
  ObjectTypeAnnotation,
15
20
  PropTypeAnnotation,
16
21
  ReservedPropTypeAnnotation,
17
22
  ReservedTypeAnnotation,
23
+ StringLiteralTypeAnnotation,
18
24
  StringTypeAnnotation,
19
- Nullable,
20
- NativeModuleTypeAnnotation,
21
- UnionTypeAnnotationMemberType,
22
25
  UnsafeAnyTypeAnnotation,
23
26
  } from '@react-native/codegen/lib/CodegenSchema';
24
27
 
@@ -32,23 +35,21 @@ type Int32EnumTypeAnnotation = {
32
35
  readonly options: readonly number[];
33
36
  };
34
37
 
35
- type ArrayTypeAnnotation = {
36
- readonly type: 'ArrayTypeAnnotation';
37
- readonly elementType: TypeAnnotation;
38
- };
39
-
40
38
  export type TypeAnnotation =
41
39
  | BooleanTypeAnnotation
40
+ | BooleanLiteralTypeAnnotation
42
41
  | StringTypeAnnotation
42
+ | StringLiteralTypeAnnotation
43
43
  | DoubleTypeAnnotation
44
44
  | FloatTypeAnnotation
45
45
  | Int32TypeAnnotation
46
+ | NumberLiteralTypeAnnotation
46
47
  | ReservedPropTypeAnnotation
47
48
  | ReservedTypeAnnotation
48
49
  | StringEnumTypeAnnotation
49
50
  | Int32EnumTypeAnnotation
50
51
  | MixedTypeAnnotation
51
- | ArrayTypeAnnotation
52
+ | ArrayTypeAnnotation<TypeAnnotation>
52
53
  | NativeModuleTypeAnnotation
53
54
  | Nullable<NativeModuleTypeAnnotation>
54
55
  | ObjectTypeAnnotation<TypeAnnotation>
@@ -113,10 +114,11 @@ export class TypeAnnotationToTS {
113
114
  const { params, returnTypeAnnotation } = typeAnnotation;
114
115
  const stringifiedArgs = params
115
116
  .map(
116
- (param) => `${param.name}: ${this.convert(param.typeAnnotation)}`
117
+ (param) =>
118
+ `${param.name}: ${this.convert(param.typeAnnotation as TypeAnnotation)}`
117
119
  )
118
120
  .join(', ');
119
- return `(${stringifiedArgs}) => ${this.convert(returnTypeAnnotation)}`;
121
+ return `(${stringifiedArgs}) => ${this.convert(returnTypeAnnotation as TypeAnnotation)}`;
120
122
 
121
123
  case 'EnumDeclaration':
122
124
  return typeAnnotation.name;
@@ -125,47 +127,52 @@ export class TypeAnnotationToTS {
125
127
  case 'TypeAliasTypeAnnotation':
126
128
  return this.aliasPrefix + typeAnnotation.name;
127
129
  case 'UnionTypeAnnotation':
128
- return this.convertUnionMemberAnnotation(typeAnnotation.memberType);
130
+ return this.convertUnionMemberAnnotation(typeAnnotation.types as TypeAnnotation[]);
129
131
  case 'NumberTypeAnnotation':
130
132
  return 'number';
131
133
  case 'NullableTypeAnnotation':
132
- return `null | ${this.convert(typeAnnotation.typeAnnotation)}`;
134
+ return `null | ${this.convert(typeAnnotation.typeAnnotation as TypeAnnotation)}`;
133
135
  case 'ObjectTypeAnnotation':
134
136
  return this.convertObjectTypeAnnotation(typeAnnotation);
135
137
  case 'PromiseTypeAnnotation':
136
- return `Promise<${this.convert(typeAnnotation.elementType)}>`;
138
+ return `Promise<${this.convert(typeAnnotation.elementType as TypeAnnotation)}>`;
137
139
  case 'VoidTypeAnnotation':
138
140
  return 'void';
139
141
  case 'ArrayTypeAnnotation':
140
- return `${this.convert(typeAnnotation.elementType)}[]`;
142
+ return `${this.convert(typeAnnotation.elementType as TypeAnnotation)}[]`;
143
+ case 'AnyTypeAnnotation':
144
+ return 'unknown';
145
+ case 'StringLiteralTypeAnnotation':
146
+ return wrapWithQuotes(typeAnnotation.value);
147
+ case 'NumberLiteralTypeAnnotation':
148
+ return String(typeAnnotation.value);
149
+ case 'BooleanLiteralTypeAnnotation':
150
+ return typeAnnotation.value ? 'true' : 'false';
141
151
  default:
142
152
  return 'unknown';
143
153
  }
144
154
  }
145
155
 
146
- private convertUnionMemberAnnotation(
147
- memberAnnotation: UnionTypeAnnotationMemberType
148
- ) {
149
- switch (memberAnnotation) {
150
- case 'NumberTypeAnnotation':
156
+ private convertUnionMemberAnnotation(typeAnnotations: TypeAnnotation[]) : string {
157
+ switch (typeAnnotations[0].type) {
158
+ case 'NumberLiteralTypeAnnotation':
151
159
  return 'number';
152
160
  case 'ObjectTypeAnnotation':
153
161
  return 'Object';
154
- case 'StringTypeAnnotation':
162
+ case 'StringLiteralTypeAnnotation':
155
163
  return 'string';
156
164
  }
165
+ return 'unknown';
157
166
  }
158
167
 
159
168
  private convertObjectTypeAnnotation(
160
- objectTypeAnnotation: ObjectTypeAnnotation<
161
- TypeAnnotation | Nullable<NativeModuleTypeAnnotation>
162
- >
169
+ objectTypeAnnotation: ObjectTypeAnnotation<TypeAnnotation>
163
170
  ): string {
164
171
  const props = objectTypeAnnotation.properties
165
172
  .map((prop) => {
166
173
  const maybeOptionalSymbol = prop.optional ? '?' : '';
167
174
  return `${prop.name}${maybeOptionalSymbol}: ${this.convert(
168
- prop.typeAnnotation
175
+ prop.typeAnnotation as TypeAnnotation
169
176
  )}`;
170
177
  })
171
178
  .join(', ');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2024-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -73,20 +73,31 @@ export class LibGlueCodeGenerator implements CodeGenerator<LibGlueCodeData> {
73
73
  ),
74
74
  basePackageTemplate.build()
75
75
  );
76
- fileContentByPath.set(
77
- this.etsOutputPath.copyWithNewSegment('components', 'ts.ts'),
78
- components_indexTS.build()
79
- );
80
- fileContentByPath.set(
81
- this.etsOutputPath.copyWithNewSegment('turboModules', 'ts.ts'),
82
- turboModules_indexTS.build()
83
- );
76
+ const hasFabricComponents =
77
+ arkTSComponents.length > 0 || cppComponents.length > 0;
78
+ const hasTurboModules = turboModules.length > 0;
79
+ if (hasFabricComponents) {
80
+ fileContentByPath.set(
81
+ this.etsOutputPath.copyWithNewSegment('components', 'ts.ts'),
82
+ components_indexTS.build()
83
+ );
84
+ }
85
+ if (hasTurboModules) {
86
+ fileContentByPath.set(
87
+ this.etsOutputPath.copyWithNewSegment('turboModules', 'ts.ts'),
88
+ turboModules_indexTS.build()
89
+ );
90
+ }
91
+ const rootTS = new IndexTSTemplate(this.codegenNoticeLines);
92
+ if (hasFabricComponents) {
93
+ rootTS.addReexport({ from: './components/ts', as: 'RNC' });
94
+ }
95
+ if (hasTurboModules) {
96
+ rootTS.addReexport({ from: './turboModules/ts', as: 'TM' });
97
+ }
84
98
  fileContentByPath.set(
85
99
  this.etsOutputPath.copyWithNewSegment('ts.ts'),
86
- new IndexTSTemplate(this.codegenNoticeLines)
87
- .addReexport({ from: './components/ts', as: 'RNC' })
88
- .addReexport({ from: './turboModules/ts', as: 'TM' })
89
- .build()
100
+ rootTS.build()
90
101
  );
91
102
  generated_indexETS.addReexport({ from: './ts' });
92
103
  fileContentByPath.set(
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2024-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2024-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2024-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
2
+ * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.