@react-native-oh/react-native-harmony-cli 0.77.33 → 0.77.44

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 (192) hide show
  1. package/dist/assetResolver.js +43 -74
  2. package/dist/autolinking/Autolinking.js +178 -179
  3. package/dist/codegen/core/CodegenError.js +3 -23
  4. package/dist/codegen/core/EventUtils.js +3 -3
  5. package/dist/codegen/core/TypeAnnotationToTS.js +24 -28
  6. package/dist/codegen/core/UberSchema.js +55 -97
  7. package/dist/codegen/generators/AppBuildTimeGlueCodeGenerator.js +28 -41
  8. package/dist/codegen/generators/ArkTSComponentCodeGeneratorArkTS.js +27 -34
  9. package/dist/codegen/generators/ArkTSComponentCodeGeneratorCAPI.js +25 -33
  10. package/dist/codegen/generators/CppComponentCodeGenerator.js +23 -28
  11. package/dist/codegen/generators/LibGlueCodeGenerator.js +26 -29
  12. package/dist/codegen/generators/NativeModuleCodeGenerator.js +25 -30
  13. package/dist/codegen/generators/SharedComponentCodeGenerator.js +15 -15
  14. package/dist/codegen/generators/UberGeneratorV1.js +24 -23
  15. package/dist/codegen/generators/UberGeneratorV2.js +34 -35
  16. package/dist/codegen/templates/BaseComponentInstanceHTemplate.js +50 -24
  17. package/dist/codegen/templates/BasePackageHTemplate.js +120 -21
  18. package/dist/codegen/templates/ComponentDescriptorHTemplate.js +54 -8
  19. package/dist/codegen/templates/ComponentJSIBinderHTemplate.js +75 -27
  20. package/dist/codegen/templates/ComponentUtilsTSTemplate.js +162 -29
  21. package/dist/codegen/templates/IndexTSTemplate.js +37 -17
  22. package/dist/codegen/templates/RNOHGeneratedPackageHTemplate.js +119 -24
  23. package/dist/codegen/templates/TurboModuleCppTemplate.js +38 -15
  24. package/dist/codegen/templates/TurboModuleHTemplate.js +32 -11
  25. package/dist/codegen/templates/TurboModuleSpecTSTemplate.js +52 -19
  26. package/dist/commands/bundle-harmony.js +118 -221
  27. package/dist/commands/clean-harmony.js +58 -63
  28. package/dist/commands/codegen-harmony.js +105 -165
  29. package/dist/commands/codegen-lib-harmony.js +76 -116
  30. package/dist/commands/init-harmony.js +151 -196
  31. package/dist/commands/init.js +537 -961
  32. package/dist/commands/link-harmony.js +35 -82
  33. package/dist/commands/run-harmony.js +372 -518
  34. package/dist/commands/verify-package-harmony.js +54 -117
  35. package/dist/core/AbsolutePath.js +33 -49
  36. package/dist/core/CodegenConfig.js +24 -22
  37. package/dist/core/DescriptiveError.js +18 -37
  38. package/dist/core/FileSystem.js +14 -18
  39. package/dist/core/OHPackageJSON5.js +17 -23
  40. package/dist/core/PackageJSON.js +26 -42
  41. package/dist/core/ProjectDependenciesManager.js +40 -92
  42. package/dist/core/ValidationError.js +2 -22
  43. package/dist/core/fs.js +10 -7
  44. package/dist/index.js +1 -1
  45. package/dist/init/templates/AppScopeAppJSON5Template.js +21 -8
  46. package/dist/init/templates/AppScopeStringVarTemplate.js +19 -8
  47. package/dist/init/templates/EntryIndexTemplate.js +56 -8
  48. package/dist/init/templates/EntryStringVarTemplate.js +27 -8
  49. package/dist/init/templates/HvigorConfigJson5Template.js +33 -8
  50. package/dist/init/templates/MetroConfigTemplate.js +38 -8
  51. package/dist/init/templates/OhPackageJson5Template.js +28 -8
  52. package/dist/init/templates/harmony/AppScope/app.json5 +10 -0
  53. package/dist/init/templates/harmony/AppScope/resources/base/element/string.json +8 -0
  54. package/dist/init/templates/harmony/AppScope/resources/base/media/app_icon.png +0 -0
  55. package/dist/init/templates/harmony/build-profile.json5 +36 -0
  56. package/dist/init/templates/harmony/codelinter.json +32 -0
  57. package/dist/init/templates/harmony/entry/build-profile.json5 +18 -0
  58. package/dist/init/templates/harmony/entry/gitignore +7 -0
  59. package/dist/init/templates/harmony/entry/hvigorfile.ts +13 -0
  60. package/dist/init/templates/harmony/entry/oh-package.json5 +9 -0
  61. package/dist/init/templates/harmony/entry/src/main/cpp/CMakeLists.txt +27 -0
  62. package/dist/init/templates/harmony/entry/src/main/cpp/PackageProvider.cpp +13 -0
  63. package/dist/init/templates/harmony/entry/src/main/cpp/gitignore +4 -0
  64. package/dist/init/templates/harmony/entry/src/main/ets/PackageProvider.ets +8 -0
  65. package/dist/init/templates/harmony/entry/src/main/ets/codegen/gitignore +2 -0
  66. package/dist/init/templates/harmony/entry/src/main/ets/entryability/EntryAbility.ets +11 -0
  67. package/dist/init/templates/harmony/entry/src/main/ets/gitignore +1 -0
  68. package/dist/init/templates/harmony/entry/src/main/ets/pages/.gitkeep +0 -0
  69. package/dist/init/templates/harmony/entry/src/main/ets/workers/RNOHWorker.ets +16 -0
  70. package/dist/init/templates/harmony/entry/src/main/module.json5 +65 -0
  71. package/dist/init/templates/harmony/entry/src/main/resources/base/element/color.json +8 -0
  72. package/dist/init/templates/harmony/entry/src/main/resources/base/element/string.json +16 -0
  73. package/dist/init/templates/harmony/entry/src/main/resources/base/media/background.png +0 -0
  74. package/dist/init/templates/harmony/entry/src/main/resources/base/media/foreground.png +0 -0
  75. package/dist/init/templates/harmony/entry/src/main/resources/base/media/layered_image.json +7 -0
  76. package/dist/init/templates/harmony/entry/src/main/resources/base/media/startIcon.png +0 -0
  77. package/dist/init/templates/harmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
  78. package/dist/init/templates/harmony/entry/src/main/resources/gitignore +1 -0
  79. package/dist/init/templates/harmony/entry/src/ohosTest/ets/test/List.test.ets +2 -0
  80. package/dist/init/templates/harmony/entry/src/ohosTest/module.json5 +13 -0
  81. package/dist/init/templates/harmony/gitignore +16 -0
  82. package/dist/init/templates/harmony/hvigor/hvigor-config.json5 +22 -0
  83. package/dist/init/templates/harmony/hvigorfile.ts +7 -0
  84. package/dist/io/CliExecutor.js +46 -98
  85. package/dist/io/Logger.js +40 -46
  86. package/dist/io/RealFS.js +43 -100
  87. package/dist/io/TarGz.js +11 -8
  88. package/dist/io/__fixtures__.js +79 -141
  89. package/dist/io/fsUtils.js +13 -12
  90. package/dist/package-verifier/checks/HarmonyDirContainsOnlyHarsCheck.js +19 -47
  91. package/dist/package-verifier/checks/HarmonyDirExistsCheck.js +13 -41
  92. package/dist/package-verifier/checks/NpmAnAndOhPackageVersionsAreEqual.js +8 -38
  93. package/dist/package-verifier/checks/OhPackageNameFollowsNamingConventionCheck.js +22 -54
  94. package/dist/package-verifier/verify-package.js +56 -133
  95. package/dist/simulator/LaunchSimulator.js +224 -301
  96. package/harmony/rnoh-hvigor-plugin-0.77.44.tgz +0 -0
  97. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0271b9dd +0 -0
  98. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/07ba0208 +0 -0
  99. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/082dd09d +0 -0
  100. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0a9e1b0b +0 -0
  101. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/0c3d528a +0 -0
  102. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1014d3ff +0 -0
  103. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/1184678c +0 -0
  104. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/12621366 +0 -0
  105. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/126d3e66 +0 -0
  106. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/19262852 +0 -0
  107. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/203fac53 +0 -0
  108. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/237b660a +0 -0
  109. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2528002d +0 -0
  110. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2587d041 +0 -0
  111. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2893bd11 +0 -0
  112. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2af6ff9d +0 -0
  113. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/2bf31f33 +0 -0
  114. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/333648cc +0 -0
  115. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/386f6df0 +0 -0
  116. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/3b8c270e +0 -0
  117. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/3bcc34ba +0 -0
  118. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/444808bd +0 -0
  119. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/44a775e2 +0 -0
  120. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/46da3ccd +0 -0
  121. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/51f80e35 +0 -0
  122. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5203a2ca +0 -0
  123. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/52795646 +0 -0
  124. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/577f8208 +0 -0
  125. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5c2aafe7 +0 -0
  126. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/5c69bcfe +0 -0
  127. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/62695b92 +0 -0
  128. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/62698102 +0 -0
  129. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6411ab00 +0 -0
  130. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6569ba92 +0 -0
  131. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/65e5133c +0 -0
  132. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/66029655 +0 -0
  133. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/69e85d0d +0 -0
  134. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6afcb99e +0 -0
  135. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/6de07367 +0 -0
  136. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/72498307 +0 -0
  137. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7babd1de +0 -0
  138. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/7fe56d21 +0 -0
  139. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/810cbd72 +0 -0
  140. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/812386d2 +0 -0
  141. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8448897d +0 -0
  142. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/84ab0a41 +0 -0
  143. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/853825e2 +0 -0
  144. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/862ad93a +0 -0
  145. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/86b14da6 +0 -0
  146. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/87f0fe62 +0 -0
  147. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/88ee8f74 +0 -0
  148. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8c5237c9 +0 -0
  149. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8c725800 +0 -0
  150. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8e83cbe1 +0 -0
  151. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/8f4085b9 +0 -0
  152. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/931f0b2e +0 -0
  153. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/940c8f92 +0 -0
  154. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/968191a3 +0 -0
  155. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/970780c0 +0 -0
  156. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/98bc4394 +0 -0
  157. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/99a3b0b0 +0 -0
  158. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9c0ffa6b +0 -0
  159. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/9d9b42c2 +0 -0
  160. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a04266ef +0 -0
  161. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a18f78c5 +0 -0
  162. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a642fb0e +0 -0
  163. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/a97edf40 +0 -0
  164. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/aa672a20 +0 -0
  165. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ae25c61a +0 -0
  166. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/b2bebae6 +0 -0
  167. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/ba492422 +0 -0
  168. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/bd3e6c21 +0 -0
  169. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/be9e564e +0 -0
  170. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c342b18e +0 -0
  171. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c3993e7e +0 -0
  172. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c52ffd54 +0 -0
  173. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c7079ad4 +0 -0
  174. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/c8eb01c1 +0 -0
  175. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/caee5d30 +0 -0
  176. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/cf039161 +0 -0
  177. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d0377c40 +0 -0
  178. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d262bc85 +0 -0
  179. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d287cb5c +0 -0
  180. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d64bff57 +0 -0
  181. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d716a608 +0 -0
  182. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/d751012b +0 -0
  183. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e0873711 +0 -0
  184. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e1fcf77b +0 -0
  185. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/e8548d8a +0 -0
  186. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/eaedd71d +0 -0
  187. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/eca0019e +0 -0
  188. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f7189953 +0 -0
  189. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f75cb201 +0 -0
  190. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/f888164b +0 -0
  191. package/node-compile-cache/v22.14.0-x64-efe9a9df-0/fdb9eb5a +0 -0
  192. package/package.json +5 -1
@@ -1,11 +1,146 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.ComponentUtilsTSTemplate = void 0;
4
- var mustache_1 = require("mustache");
5
- var TEMPLATE = "\n/**\n{{#codegenNoticeLines}}\n * {{{line}}}\n{{/codegenNoticeLines}}\n */\n\nimport {\n Descriptor as ComponentDescriptor,\n ViewBaseProps,\n ViewRawProps,\n ViewDescriptorWrapperBase,\n ColorValue,\n Color,\n RNInstance,\n Tag,\n RNComponentCommandReceiver,\n ViewPropsSelector,\n} from '{{{rnohImport}}}';\n\n\nexport namespace {{name}} {\n export const NAME = \"{{name}}\" as const\n\n export interface DirectRawProps {\n {{#props}}\n {{name}}{{optionalityMarker}}: {{{type}}};\n {{/props}}\n }\n \n export interface Props extends ViewBaseProps {}\n \n export interface State {}\n \n export interface RawProps extends ViewRawProps, DirectRawProps {}\n \n export class PropsSelector extends ViewPropsSelector<Props, RawProps> {\n {{#simpleProps}}\n get {{name}}() {\n return this.rawProps.{{name}}{{{orDefaultValue}}};\n }\n \n {{/simpleProps}}\n \n {{#complexProps}}\n get {{name}}() {\n{{{implementation}}}\n }\n \n {{/complexProps}}\n }\n\n export type Descriptor = ComponentDescriptor<\n typeof NAME,\n Props,\n State,\n RawProps\n >;\n \n export class DescriptorWrapper extends ViewDescriptorWrapperBase<\n typeof NAME,\n Props,\n State,\n RawProps,\n PropsSelector\n > {\n protected createPropsSelector() {\n return new PropsSelector(this.descriptor.props, this.descriptor.rawProps)\n }\n }\n \n export interface EventPayloadByName {\n {{#events}}\n \"{{name}}\": {{{payloadTSType}}}\n {{/events}}\n }\n \n export class EventEmitter {\n constructor(private rnInstance: RNInstance, private tag: Tag) {}\n \n emit<TEventName extends keyof EventPayloadByName>(eventName: TEventName, payload: EventPayloadByName[TEventName]) {\n this.rnInstance.emitComponentEvent(this.tag, eventName, payload)\n }\n }\n \n export interface CommandArgvByName {\n {{#commands}}\n \"{{name}}\": {{{argsTSType}}}\n {{/commands}}\n }\n \n export class CommandReceiver {\n private listenersByCommandName = new Map<string, Set<(...args: any[]) => void>>()\n private cleanUp: (() => void) | undefined = undefined\n \n constructor(private componentCommandReceiver: RNComponentCommandReceiver, private tag: Tag) {\n }\n \n subscribe<TCommandName extends keyof CommandArgvByName>(commandName: TCommandName, listener: (argv: CommandArgvByName[TCommandName]) => void) {\n if (!this.listenersByCommandName.has(commandName)) {\n this.listenersByCommandName.set(commandName, new Set())\n }\n this.listenersByCommandName.get(commandName)!.add(listener)\n const hasRegisteredCommandReceiver = !!this.cleanUp\n if (!hasRegisteredCommandReceiver) {\n this.cleanUp = this.componentCommandReceiver.registerCommandCallback(this.tag, (commandName: string, argv: any[]) => {\n if (this.listenersByCommandName.has(commandName)) {\n const listeners = this.listenersByCommandName.get(commandName)!\n listeners.forEach(listener => {\n listener(argv)\n })\n }\n })\n }\n \n return () => {\n this.listenersByCommandName.get(commandName)?.delete(listener)\n if (this.listenersByCommandName.get(commandName)?.size ?? 0 === 0) {\n this.listenersByCommandName.delete(commandName)\n }\n if (this.listenersByCommandName.size === 0) {\n this.cleanUp?.()\n }\n }\n }\n }\n\n}\n";
6
- var COLOR_VALUE_GETTER_TEMPLATE = " if (this.rawProps.{{name}}) {\n return Color.fromColorValue(this.rawProps.{{name}})\n } else {\n return new Color({ r: 0, g: 0, b: 0, a: 255})\n }";
7
- var ComponentUtilsTSTemplate = /** @class */ (function () {
8
- function ComponentUtilsTSTemplate(name, codegenNoticeLines, rnohImport) {
7
+ const mustache_1 = __importDefault(require("mustache"));
8
+ const TEMPLATE = `
9
+ /**
10
+ {{#codegenNoticeLines}}
11
+ * {{{line}}}
12
+ {{/codegenNoticeLines}}
13
+ */
14
+
15
+ import {
16
+ Descriptor as ComponentDescriptor,
17
+ ViewBaseProps,
18
+ ViewRawProps,
19
+ ViewDescriptorWrapperBase,
20
+ ColorValue,
21
+ Color,
22
+ RNInstance,
23
+ Tag,
24
+ RNComponentCommandReceiver,
25
+ ViewPropsSelector,
26
+ } from '{{{rnohImport}}}';
27
+
28
+
29
+ export namespace {{name}} {
30
+ export const NAME = "{{name}}" as const
31
+
32
+ export interface DirectRawProps {
33
+ {{#props}}
34
+ {{name}}{{optionalityMarker}}: {{{type}}};
35
+ {{/props}}
36
+ }
37
+
38
+ export interface Props extends ViewBaseProps {}
39
+
40
+ export interface State {}
41
+
42
+ export interface RawProps extends ViewRawProps, DirectRawProps {}
43
+
44
+ export class PropsSelector extends ViewPropsSelector<Props, RawProps> {
45
+ {{#simpleProps}}
46
+ get {{name}}() {
47
+ return this.rawProps.{{name}}{{{orDefaultValue}}};
48
+ }
49
+
50
+ {{/simpleProps}}
51
+
52
+ {{#complexProps}}
53
+ get {{name}}() {
54
+ {{{implementation}}}
55
+ }
56
+
57
+ {{/complexProps}}
58
+ }
59
+
60
+ export type Descriptor = ComponentDescriptor<
61
+ typeof NAME,
62
+ Props,
63
+ State,
64
+ RawProps
65
+ >;
66
+
67
+ export class DescriptorWrapper extends ViewDescriptorWrapperBase<
68
+ typeof NAME,
69
+ Props,
70
+ State,
71
+ RawProps,
72
+ PropsSelector
73
+ > {
74
+ protected createPropsSelector() {
75
+ return new PropsSelector(this.descriptor.props, this.descriptor.rawProps)
76
+ }
77
+ }
78
+
79
+ export interface EventPayloadByName {
80
+ {{#events}}
81
+ "{{name}}": {{{payloadTSType}}}
82
+ {{/events}}
83
+ }
84
+
85
+ export class EventEmitter {
86
+ constructor(private rnInstance: RNInstance, private tag: Tag) {}
87
+
88
+ emit<TEventName extends keyof EventPayloadByName>(eventName: TEventName, payload: EventPayloadByName[TEventName]) {
89
+ this.rnInstance.emitComponentEvent(this.tag, eventName, payload)
90
+ }
91
+ }
92
+
93
+ export interface CommandArgvByName {
94
+ {{#commands}}
95
+ "{{name}}": {{{argsTSType}}}
96
+ {{/commands}}
97
+ }
98
+
99
+ export class CommandReceiver {
100
+ private listenersByCommandName = new Map<string, Set<(...args: any[]) => void>>()
101
+ private cleanUp: (() => void) | undefined = undefined
102
+
103
+ constructor(private componentCommandReceiver: RNComponentCommandReceiver, private tag: Tag) {
104
+ }
105
+
106
+ subscribe<TCommandName extends keyof CommandArgvByName>(commandName: TCommandName, listener: (argv: CommandArgvByName[TCommandName]) => void) {
107
+ if (!this.listenersByCommandName.has(commandName)) {
108
+ this.listenersByCommandName.set(commandName, new Set())
109
+ }
110
+ this.listenersByCommandName.get(commandName)!.add(listener)
111
+ const hasRegisteredCommandReceiver = !!this.cleanUp
112
+ if (!hasRegisteredCommandReceiver) {
113
+ this.cleanUp = this.componentCommandReceiver.registerCommandCallback(this.tag, (commandName: string, argv: any[]) => {
114
+ if (this.listenersByCommandName.has(commandName)) {
115
+ const listeners = this.listenersByCommandName.get(commandName)!
116
+ listeners.forEach(listener => {
117
+ listener(argv)
118
+ })
119
+ }
120
+ })
121
+ }
122
+
123
+ return () => {
124
+ this.listenersByCommandName.get(commandName)?.delete(listener)
125
+ if (this.listenersByCommandName.get(commandName)?.size ?? 0 === 0) {
126
+ this.listenersByCommandName.delete(commandName)
127
+ }
128
+ if (this.listenersByCommandName.size === 0) {
129
+ this.cleanUp?.()
130
+ }
131
+ }
132
+ }
133
+ }
134
+
135
+ }
136
+ `;
137
+ const COLOR_VALUE_GETTER_TEMPLATE = ` if (this.rawProps.{{name}}) {
138
+ return Color.fromColorValue(this.rawProps.{{name}})
139
+ } else {
140
+ return new Color({ r: 0, g: 0, b: 0, a: 255})
141
+ }`;
142
+ class ComponentUtilsTSTemplate {
143
+ constructor(name, codegenNoticeLines, rnohImport) {
9
144
  this.name = name;
10
145
  this.codegenNoticeLines = codegenNoticeLines;
11
146
  this.rnohImport = rnohImport;
@@ -15,45 +150,43 @@ var ComponentUtilsTSTemplate = /** @class */ (function () {
15
150
  this.getterTemplateByTSType = new Map();
16
151
  this.getterTemplateByTSType.set('ColorValue', COLOR_VALUE_GETTER_TEMPLATE);
17
152
  }
18
- ComponentUtilsTSTemplate.prototype.addProp = function (prop) {
153
+ addProp(prop) {
19
154
  this.props.push(prop);
20
- };
21
- ComponentUtilsTSTemplate.prototype.addEvent = function (event) {
155
+ }
156
+ addEvent(event) {
22
157
  this.events.push(event);
23
- };
24
- ComponentUtilsTSTemplate.prototype.addCommand = function (command) {
158
+ }
159
+ addCommand(command) {
25
160
  this.commands.push(command);
26
- };
27
- ComponentUtilsTSTemplate.prototype.build = function () {
28
- var _this = this;
161
+ }
162
+ build() {
29
163
  return mustache_1.default.render(TEMPLATE.trimStart(), {
30
- codegenNoticeLines: this.codegenNoticeLines.map(function (line) { return ({
31
- line: line,
32
- }); }),
164
+ codegenNoticeLines: this.codegenNoticeLines.map((line) => ({
165
+ line,
166
+ })),
33
167
  name: this.name,
34
168
  rnohImport: this.rnohImport,
35
- props: this.props.map(function (prop) { return ({
169
+ props: this.props.map((prop) => ({
36
170
  name: prop.name,
37
171
  type: prop.tsType,
38
172
  optionalityMarker: prop.isOptional ? '?' : '',
39
- }); }),
173
+ })),
40
174
  events: this.events,
41
175
  commands: this.commands,
42
176
  simpleProps: this.props
43
- .filter(function (prop) { return !_this.getterTemplateByTSType.has(prop.tsType); })
44
- .map(function (prop) { return ({
177
+ .filter((prop) => !this.getterTemplateByTSType.has(prop.tsType))
178
+ .map((prop) => ({
45
179
  name: prop.name,
46
180
  type: prop.tsType,
47
- orDefaultValue: prop.defaultValue ? " ?? ".concat(prop.defaultValue) : '',
48
- }); }),
181
+ orDefaultValue: prop.defaultValue ? ` ?? ${prop.defaultValue}` : '',
182
+ })),
49
183
  complexProps: this.props
50
- .filter(function (prop) { return _this.getterTemplateByTSType.has(prop.tsType); })
51
- .map(function (prop) { return ({
184
+ .filter((prop) => this.getterTemplateByTSType.has(prop.tsType))
185
+ .map((prop) => ({
52
186
  name: prop.name,
53
- implementation: mustache_1.default.render(_this.getterTemplateByTSType.get(prop.tsType), { name: prop.name }, {}),
54
- }); }),
187
+ implementation: mustache_1.default.render(this.getterTemplateByTSType.get(prop.tsType), { name: prop.name }, {}),
188
+ })),
55
189
  });
56
- };
57
- return ComponentUtilsTSTemplate;
58
- }());
190
+ }
191
+ }
59
192
  exports.ComponentUtilsTSTemplate = ComponentUtilsTSTemplate;
@@ -1,32 +1,52 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.IndexTSTemplate = void 0;
4
- var mustache_1 = require("mustache");
5
- var TEMPLATE = "\n/**\n{{#codegenNoticeLines}}\n * {{{line}}}\n{{/codegenNoticeLines}}\n */\n\n{{#reexports}}\nexport * {{as}}from \"{{{from}}}\"\n{{/reexports}}\n";
6
- var TEMPLATE_EMPTY = "\n/**\n{{#codegenNoticeLines}}\n * {{{line}}}\n{{/codegenNoticeLines}}\n */\n\nexport {}\n";
7
- var IndexTSTemplate = /** @class */ (function () {
8
- function IndexTSTemplate(codegenNoticeLines) {
7
+ const mustache_1 = __importDefault(require("mustache"));
8
+ const TEMPLATE = `
9
+ /**
10
+ {{#codegenNoticeLines}}
11
+ * {{{line}}}
12
+ {{/codegenNoticeLines}}
13
+ */
14
+
15
+ {{#reexports}}
16
+ export * {{as}}from "{{{from}}}"
17
+ {{/reexports}}
18
+ `;
19
+ const TEMPLATE_EMPTY = `
20
+ /**
21
+ {{#codegenNoticeLines}}
22
+ * {{{line}}}
23
+ {{/codegenNoticeLines}}
24
+ */
25
+
26
+ export {}
27
+ `;
28
+ class IndexTSTemplate {
29
+ constructor(codegenNoticeLines) {
9
30
  this.codegenNoticeLines = codegenNoticeLines;
10
31
  this.reexports = [];
11
32
  }
12
- IndexTSTemplate.prototype.addReexport = function (reexport) {
33
+ addReexport(reexport) {
13
34
  this.reexports.push(reexport);
14
35
  return this;
15
- };
16
- IndexTSTemplate.prototype.build = function () {
36
+ }
37
+ build() {
17
38
  if (this.reexports.length === 0) {
18
39
  return mustache_1.default.render(TEMPLATE_EMPTY, {});
19
40
  }
20
41
  return mustache_1.default.render(TEMPLATE.trimStart(), {
21
- codegenNoticeLines: this.codegenNoticeLines.map(function (line) { return ({
22
- line: line,
23
- }); }),
24
- reexports: this.reexports.map(function (reexport) { return ({
42
+ codegenNoticeLines: this.codegenNoticeLines.map((line) => ({
43
+ line,
44
+ })),
45
+ reexports: this.reexports.map((reexport) => ({
25
46
  from: reexport.from,
26
- as: reexport.as ? "as ".concat(reexport.as, " ") : '',
27
- }); }),
47
+ as: reexport.as ? `as ${reexport.as} ` : '',
48
+ })),
28
49
  });
29
- };
30
- return IndexTSTemplate;
31
- }());
50
+ }
51
+ }
32
52
  exports.IndexTSTemplate = IndexTSTemplate;
@@ -1,40 +1,135 @@
1
1
  "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
4
  };
11
5
  Object.defineProperty(exports, "__esModule", { value: true });
12
6
  exports.RNOHGeneratedPackageHTemplate = void 0;
13
- var mustache_1 = require("mustache");
14
- var TEMPLATE = "\n/**\n * This code was generated by \"react-native codegen-harmony\"\n *\n * Do not edit this file as changes may cause incorrect behavior and will be\n * lost once the code is regenerated.\n *\n * @generatorVersion: 1\n */\n\n#pragma once\n\n#include \"RNOH/Package.h\"\n#include \"RNOH/ArkTSTurboModule.h\"\n{{#turboModules}}\n#include \"generated/{{name}}.h\"\n{{/turboModules}}\n{{#components}}\n#include \"generated/{{name}}ComponentDescriptor.h\"\n{{/components}}\n{{#components}}\n#include \"generated/{{name}}JSIBinder.h\"\n{{/components}}\n\nnamespace rnoh {\n\nclass RNOHGeneratedPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {\n public:\n SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {\n {{#turboModules}}\n if (name == \"{{name}}\") {\n return std::make_shared<{{name}}>(ctx, name);\n }\n {{/turboModules}}\n return nullptr;\n };\n};\n\nclass GeneratedEventEmitRequestHandler : public EventEmitRequestHandler {\n public:\n void handleEvent(Context const &ctx) override {\n auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);\n auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);\n\n if (eventEmitter == nullptr) {\n return;\n }\n\n std::vector<std::string> supportedComponentNames = {\n {{#arkTSComponents}}\n \"{{name}}\",\n {{/arkTSComponents}}\n };\n\n std::vector<std::string> supportedEventNames = {\n {{#supportedEvents}}\n \"{{name}}\",\n {{/supportedEvents}}\n };\n\n if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&\n std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {\n eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));\n } \n }\n};\n\nclass RNOHGeneratedPackage : public Package {\n public:\n RNOHGeneratedPackage(Package::Context ctx) : Package(ctx){};\n\n std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {\n return std::make_unique<RNOHGeneratedPackageTurboModuleFactoryDelegate>();\n }\n\n std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {\n return {\n {{#components}}\n facebook::react::concreteComponentDescriptorProvider<facebook::react::{{name}}ComponentDescriptor>(),\n {{/components}}\n };\n }\n\n ComponentJSIBinderByString createComponentJSIBinderByName() override {\n return {\n {{#components}}\n {\"{{name}}\", std::make_shared<{{name}}JSIBinder>()},\n {{/components}}\n };\n };\n\n EventEmitRequestHandlers createEventEmitRequestHandlers() override {\n return {\n std::make_shared<GeneratedEventEmitRequestHandler>(),\n };\n }\n};\n\n} // namespace rnoh\n";
15
- var RNOHGeneratedPackageHTemplate = /** @class */ (function () {
16
- function RNOHGeneratedPackageHTemplate() {
7
+ const mustache_1 = __importDefault(require("mustache"));
8
+ const TEMPLATE = `
9
+ /**
10
+ * This code was generated by "react-native codegen-harmony"
11
+ *
12
+ * Do not edit this file as changes may cause incorrect behavior and will be
13
+ * lost once the code is regenerated.
14
+ *
15
+ * @generatorVersion: 1
16
+ */
17
+
18
+ #pragma once
19
+
20
+ #include "RNOH/Package.h"
21
+ #include "RNOH/ArkTSTurboModule.h"
22
+ {{#turboModules}}
23
+ #include "generated/{{name}}.h"
24
+ {{/turboModules}}
25
+ {{#components}}
26
+ #include "generated/{{name}}ComponentDescriptor.h"
27
+ {{/components}}
28
+ {{#components}}
29
+ #include "generated/{{name}}JSIBinder.h"
30
+ {{/components}}
31
+
32
+ namespace rnoh {
33
+
34
+ class RNOHGeneratedPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
35
+ public:
36
+ SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
37
+ {{#turboModules}}
38
+ if (name == "{{name}}") {
39
+ return std::make_shared<{{name}}>(ctx, name);
40
+ }
41
+ {{/turboModules}}
42
+ return nullptr;
43
+ };
44
+ };
45
+
46
+ class GeneratedEventEmitRequestHandler : public EventEmitRequestHandler {
47
+ public:
48
+ void handleEvent(Context const &ctx) override {
49
+ auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
50
+ auto componentName = ctx.shadowViewRegistry->getComponentName(ctx.tag);
51
+
52
+ if (eventEmitter == nullptr) {
53
+ return;
54
+ }
55
+
56
+ std::vector<std::string> supportedComponentNames = {
57
+ {{#arkTSComponents}}
58
+ "{{name}}",
59
+ {{/arkTSComponents}}
60
+ };
61
+
62
+ std::vector<std::string> supportedEventNames = {
63
+ {{#supportedEvents}}
64
+ "{{name}}",
65
+ {{/supportedEvents}}
66
+ };
67
+
68
+ if (std::find(supportedComponentNames.begin(), supportedComponentNames.end(), componentName) != supportedComponentNames.end() &&
69
+ std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
70
+ eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
71
+ }
72
+ }
73
+ };
74
+
75
+ class RNOHGeneratedPackage : public Package {
76
+ public:
77
+ RNOHGeneratedPackage(Package::Context ctx) : Package(ctx){};
78
+
79
+ std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
80
+ return std::make_unique<RNOHGeneratedPackageTurboModuleFactoryDelegate>();
81
+ }
82
+
83
+ std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
84
+ return {
85
+ {{#components}}
86
+ facebook::react::concreteComponentDescriptorProvider<facebook::react::{{name}}ComponentDescriptor>(),
87
+ {{/components}}
88
+ };
89
+ }
90
+
91
+ ComponentJSIBinderByString createComponentJSIBinderByName() override {
92
+ return {
93
+ {{#components}}
94
+ {"{{name}}", std::make_shared<{{name}}JSIBinder>()},
95
+ {{/components}}
96
+ };
97
+ };
98
+
99
+ EventEmitRequestHandlers createEventEmitRequestHandlers() override {
100
+ return {
101
+ std::make_shared<GeneratedEventEmitRequestHandler>(),
102
+ };
103
+ }
104
+ };
105
+
106
+ } // namespace rnoh
107
+ `;
108
+ class RNOHGeneratedPackageHTemplate {
109
+ constructor() {
17
110
  this.turboModules = [];
18
111
  this.components = [];
19
112
  this.supportedEventNames = [];
20
113
  }
21
- RNOHGeneratedPackageHTemplate.prototype.addTurboModule = function (turboModule) {
114
+ addTurboModule(turboModule) {
22
115
  this.turboModules.push(turboModule);
23
- };
24
- RNOHGeneratedPackageHTemplate.prototype.addComponent = function (component) {
116
+ }
117
+ addComponent(component) {
25
118
  this.components.push(component);
26
- this.supportedEventNames = __spreadArray(__spreadArray([], this.supportedEventNames, true), component.supportedEventNames, true);
27
- };
28
- RNOHGeneratedPackageHTemplate.prototype.build = function () {
119
+ this.supportedEventNames = [
120
+ ...this.supportedEventNames,
121
+ ...component.supportedEventNames,
122
+ ];
123
+ }
124
+ build() {
29
125
  return mustache_1.default.render(TEMPLATE.trimStart(), {
30
126
  turboModules: this.turboModules,
31
127
  components: this.components,
32
- arkTSComponents: this.components.filter(function (component) { return component.isArkTSComponent; }),
33
- supportedEvents: this.supportedEventNames.map(function (eventName) { return ({
128
+ arkTSComponents: this.components.filter((component) => component.isArkTSComponent),
129
+ supportedEvents: this.supportedEventNames.map((eventName) => ({
34
130
  name: eventName,
35
- }); }),
131
+ })),
36
132
  });
37
- };
38
- return RNOHGeneratedPackageHTemplate;
39
- }());
133
+ }
134
+ }
40
135
  exports.RNOHGeneratedPackageHTemplate = RNOHGeneratedPackageHTemplate;
@@ -1,30 +1,53 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.TurboModuleCppTemplate = void 0;
4
- var mustache_1 = require("mustache");
5
- var TEMPLATE = "\n/**\n{{#codegenNoticeLines}}\n * {{{line}}}\n{{/codegenNoticeLines}}\n */\n\n#include \"{{className}}.h\"\n\nnamespace rnoh {\nusing namespace facebook;\n\n{{className}}::{{className}}(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {\n methodMap_ = {\n {{#methods}}\n ARK_{{asyncMarker}}METHOD_METADATA({{name}}, {{argsCount}}),\n {{/methods}}\n };\n}\n\n} // namespace rnoh\n";
6
- var TurboModuleCppTemplate = /** @class */ (function () {
7
- function TurboModuleCppTemplate(name, codegenNoticeLines) {
7
+ const mustache_1 = __importDefault(require("mustache"));
8
+ const TEMPLATE = `
9
+ /**
10
+ {{#codegenNoticeLines}}
11
+ * {{{line}}}
12
+ {{/codegenNoticeLines}}
13
+ */
14
+
15
+ #include "{{className}}.h"
16
+
17
+ namespace rnoh {
18
+ using namespace facebook;
19
+
20
+ {{className}}::{{className}}(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
21
+ methodMap_ = {
22
+ {{#methods}}
23
+ ARK_{{asyncMarker}}METHOD_METADATA({{name}}, {{argsCount}}),
24
+ {{/methods}}
25
+ };
26
+ }
27
+
28
+ } // namespace rnoh
29
+ `;
30
+ class TurboModuleCppTemplate {
31
+ constructor(name, codegenNoticeLines) {
8
32
  this.name = name;
9
33
  this.codegenNoticeLines = codegenNoticeLines;
10
34
  this.methods = [];
11
35
  }
12
- TurboModuleCppTemplate.prototype.addMethod = function (method) {
36
+ addMethod(method) {
13
37
  this.methods.push(method);
14
- };
15
- TurboModuleCppTemplate.prototype.build = function () {
38
+ }
39
+ build() {
16
40
  return mustache_1.default.render(TEMPLATE.trimStart(), {
17
- codegenNoticeLines: this.codegenNoticeLines.map(function (line) { return ({
18
- line: line,
19
- }); }),
41
+ codegenNoticeLines: this.codegenNoticeLines.map((line) => ({
42
+ line,
43
+ })),
20
44
  className: this.name,
21
- methods: this.methods.map(function (method) { return ({
45
+ methods: this.methods.map((method) => ({
22
46
  name: method.name,
23
47
  argsCount: method.argsCount,
24
48
  asyncMarker: method.isAsync ? 'ASYNC_' : undefined,
25
- }); }),
49
+ })),
26
50
  });
27
- };
28
- return TurboModuleCppTemplate;
29
- }());
51
+ }
52
+ }
30
53
  exports.TurboModuleCppTemplate = TurboModuleCppTemplate;
@@ -1,21 +1,42 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.TurboModuleHTemplate = void 0;
4
- var mustache_1 = require("mustache");
5
- var TEMPLATE = "\n/**\n{{#codegenNoticeLines}}\n * {{{line}}}\n{{/codegenNoticeLines}}\n */\n\n#pragma once\n\n#include \"RNOH/ArkTSTurboModule.h\"\n\nnamespace rnoh {\n\nclass JSI_EXPORT {{className}} : public ArkTSTurboModule {\n public:\n {{className}}(const ArkTSTurboModule::Context ctx, const std::string name);\n};\n\n} // namespace rnoh\n";
6
- var TurboModuleHTemplate = /** @class */ (function () {
7
- function TurboModuleHTemplate(name, codegenNoticeLines) {
7
+ const mustache_1 = __importDefault(require("mustache"));
8
+ const TEMPLATE = `
9
+ /**
10
+ {{#codegenNoticeLines}}
11
+ * {{{line}}}
12
+ {{/codegenNoticeLines}}
13
+ */
14
+
15
+ #pragma once
16
+
17
+ #include "RNOH/ArkTSTurboModule.h"
18
+
19
+ namespace rnoh {
20
+
21
+ class JSI_EXPORT {{className}} : public ArkTSTurboModule {
22
+ public:
23
+ {{className}}(const ArkTSTurboModule::Context ctx, const std::string name);
24
+ };
25
+
26
+ } // namespace rnoh
27
+ `;
28
+ class TurboModuleHTemplate {
29
+ constructor(name, codegenNoticeLines) {
8
30
  this.name = name;
9
31
  this.codegenNoticeLines = codegenNoticeLines;
10
32
  }
11
- TurboModuleHTemplate.prototype.build = function () {
33
+ build() {
12
34
  return mustache_1.default.render(TEMPLATE.trimStart(), {
13
35
  className: this.name,
14
- codegenNoticeLines: this.codegenNoticeLines.map(function (line) { return ({
15
- line: line,
16
- }); }),
36
+ codegenNoticeLines: this.codegenNoticeLines.map((line) => ({
37
+ line,
38
+ })),
17
39
  });
18
- };
19
- return TurboModuleHTemplate;
20
- }());
40
+ }
41
+ }
21
42
  exports.TurboModuleHTemplate = TurboModuleHTemplate;