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

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.40.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 +1 -1
@@ -1,27 +1,7 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
3
  exports.CodegenError = void 0;
19
- var core_1 = require("../../core");
20
- var CodegenError = /** @class */ (function (_super) {
21
- __extends(CodegenError, _super);
22
- function CodegenError() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- return CodegenError;
26
- }(core_1.DescriptiveError));
4
+ const core_1 = require("../../core");
5
+ class CodegenError extends core_1.DescriptiveError {
6
+ }
27
7
  exports.CodegenError = CodegenError;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createEventNameFromEventHandlerName = createEventNameFromEventHandlerName;
4
- var CodegenError_1 = require("./CodegenError");
4
+ const CodegenError_1 = require("./CodegenError");
5
5
  function createEventNameFromEventHandlerName(eventHandlerName) {
6
- var eventName = eventHandlerName.replace('on', '');
6
+ const eventName = eventHandlerName.replace('on', '');
7
7
  if (eventName.length === 0) {
8
8
  throw new CodegenError_1.CodegenError({
9
- whatHappened: "Received invalid event handler name: ".concat(eventHandlerName),
9
+ whatHappened: `Received invalid event handler name: ${eventHandlerName}`,
10
10
  whatCanUserDo: [
11
11
  'Change your event listener name to match naming convention "onEventName" e.g. "onPress"',
12
12
  ],
@@ -3,13 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TypeAnnotationToTS = void 0;
4
4
  exports.getStringifiedTSDefaultValueFromPropTypeAnnotation = getStringifiedTSDefaultValueFromPropTypeAnnotation;
5
5
  exports.wrapWithQuotes = wrapWithQuotes;
6
- var TypeAnnotationToTS = /** @class */ (function () {
7
- function TypeAnnotationToTS(aliasPrefix) {
8
- if (aliasPrefix === void 0) { aliasPrefix = ''; }
6
+ class TypeAnnotationToTS {
7
+ constructor(aliasPrefix = '') {
9
8
  this.aliasPrefix = aliasPrefix;
10
9
  }
11
- TypeAnnotationToTS.prototype.convert = function (typeAnnotation) {
12
- var _this = this;
10
+ convert(typeAnnotation) {
13
11
  if (!typeAnnotation) {
14
12
  return 'unknown';
15
13
  }
@@ -52,7 +50,7 @@ var TypeAnnotationToTS = /** @class */ (function () {
52
50
  }
53
51
  case 'StringEnumTypeAnnotation':
54
52
  return typeAnnotation.options
55
- .map(function (option) {
53
+ .map((option) => {
56
54
  if (typeof option !== 'string') {
57
55
  return option;
58
56
  }
@@ -62,11 +60,11 @@ var TypeAnnotationToTS = /** @class */ (function () {
62
60
  case 'StringTypeAnnotation':
63
61
  return 'string';
64
62
  case 'FunctionTypeAnnotation':
65
- var params = typeAnnotation.params, returnTypeAnnotation = typeAnnotation.returnTypeAnnotation;
66
- var stringifiedArgs = params
67
- .map(function (param) { return "".concat(param.name, ": ").concat(_this.convert(param.typeAnnotation)); })
63
+ const { params, returnTypeAnnotation } = typeAnnotation;
64
+ const stringifiedArgs = params
65
+ .map((param) => `${param.name}: ${this.convert(param.typeAnnotation)}`)
68
66
  .join(', ');
69
- return "(".concat(stringifiedArgs, ") => ").concat(this.convert(returnTypeAnnotation));
67
+ return `(${stringifiedArgs}) => ${this.convert(returnTypeAnnotation)}`;
70
68
  case 'EnumDeclaration':
71
69
  return typeAnnotation.name;
72
70
  case 'GenericObjectTypeAnnotation':
@@ -78,20 +76,20 @@ var TypeAnnotationToTS = /** @class */ (function () {
78
76
  case 'NumberTypeAnnotation':
79
77
  return 'number';
80
78
  case 'NullableTypeAnnotation':
81
- return "null | ".concat(this.convert(typeAnnotation.typeAnnotation));
79
+ return `null | ${this.convert(typeAnnotation.typeAnnotation)}`;
82
80
  case 'ObjectTypeAnnotation':
83
81
  return this.convertObjectTypeAnnotation(typeAnnotation);
84
82
  case 'PromiseTypeAnnotation':
85
- return "Promise<".concat(this.convert(typeAnnotation.elementType), ">");
83
+ return `Promise<${this.convert(typeAnnotation.elementType)}>`;
86
84
  case 'VoidTypeAnnotation':
87
85
  return 'void';
88
86
  case 'ArrayTypeAnnotation':
89
- return "".concat(this.convert(typeAnnotation.elementType), "[]");
87
+ return `${this.convert(typeAnnotation.elementType)}[]`;
90
88
  default:
91
89
  return 'unknown';
92
90
  }
93
- };
94
- TypeAnnotationToTS.prototype.convertUnionMemberAnnotation = function (memberAnnotation) {
91
+ }
92
+ convertUnionMemberAnnotation(memberAnnotation) {
95
93
  switch (memberAnnotation) {
96
94
  case 'NumberTypeAnnotation':
97
95
  return 'number';
@@ -100,22 +98,20 @@ var TypeAnnotationToTS = /** @class */ (function () {
100
98
  case 'StringTypeAnnotation':
101
99
  return 'string';
102
100
  }
103
- };
104
- TypeAnnotationToTS.prototype.convertObjectTypeAnnotation = function (objectTypeAnnotation) {
105
- var _this = this;
106
- var props = objectTypeAnnotation.properties
107
- .map(function (prop) {
108
- var maybeOptionalSymbol = prop.optional ? '?' : '';
109
- return "".concat(prop.name).concat(maybeOptionalSymbol, ": ").concat(_this.convert(prop.typeAnnotation));
101
+ }
102
+ convertObjectTypeAnnotation(objectTypeAnnotation) {
103
+ const props = objectTypeAnnotation.properties
104
+ .map((prop) => {
105
+ const maybeOptionalSymbol = prop.optional ? '?' : '';
106
+ return `${prop.name}${maybeOptionalSymbol}: ${this.convert(prop.typeAnnotation)}`;
110
107
  })
111
108
  .join(', ');
112
109
  if (props.length === 0) {
113
110
  return '{}';
114
111
  }
115
- return "{".concat(props, "}");
116
- };
117
- return TypeAnnotationToTS;
118
- }());
112
+ return `{${props}}`;
113
+ }
114
+ }
119
115
  exports.TypeAnnotationToTS = TypeAnnotationToTS;
120
116
  function getStringifiedTSDefaultValueFromPropTypeAnnotation(propTypeAnnotation) {
121
117
  if ('default' in propTypeAnnotation && propTypeAnnotation.default !== null) {
@@ -128,9 +124,9 @@ function getStringifiedTSDefaultValueFromPropTypeAnnotation(propTypeAnnotation)
128
124
  }
129
125
  function wrapWithQuotes(str) {
130
126
  if (str.includes("'")) {
131
- return "\"".concat(str, "\"");
127
+ return `"${str}"`;
132
128
  }
133
129
  else {
134
- return "'".concat(str, "'");
130
+ return `'${str}'`;
135
131
  }
136
132
  }
@@ -8,53 +8,23 @@ 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 __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
11
  Object.defineProperty(exports, "__esModule", { value: true });
39
12
  exports.UberSchema = void 0;
40
- var core_1 = require("../../core");
13
+ const core_1 = require("../../core");
41
14
  // @ts-expect-error
42
- var combine_js_to_schema_js_1 = require("@react-native/codegen/lib/cli/combine/combine-js-to-schema.js");
43
- var CodegenError_1 = require("./CodegenError");
15
+ const combine_js_to_schema_js_1 = require("@react-native/codegen/lib/cli/combine/combine-js-to-schema.js");
16
+ const CodegenError_1 = require("./CodegenError");
44
17
  function createRawUberSchemaFromSpecFilePaths(projectSourceFilePaths) {
45
- return (0, combine_js_to_schema_js_1.combineSchemas)(projectSourceFilePaths.map(function (p) { return p.getValue(); }));
18
+ return (0, combine_js_to_schema_js_1.combineSchemas)(projectSourceFilePaths.map((p) => p.getValue()));
46
19
  }
47
20
  /**
48
21
  * Contains component and turbo module (NativeModule) schemas. The "Uber" word is used here to highlight that SpecSchemas don't extend this class.
49
22
  */
50
- var UberSchema = /** @class */ (function () {
51
- function UberSchema(schemaValue) {
52
- this.schemaValue = schemaValue;
53
- }
54
- UberSchema.fromSpecFilePaths = function (specPaths) {
23
+ class UberSchema {
24
+ static fromSpecFilePaths(specPaths) {
55
25
  return new UberSchema(createRawUberSchemaFromSpecFilePaths(specPaths));
56
- };
57
- UberSchema.fromCodegenConfig = function (codegenConfig) {
26
+ }
27
+ static fromCodegenConfig(codegenConfig) {
58
28
  try {
59
29
  return new UberSchema(createRawUberSchemaFromSpecFilePaths(codegenConfig.getSpecFilePaths()));
60
30
  }
@@ -63,76 +33,64 @@ var UberSchema = /** @class */ (function () {
63
33
  throw new CodegenError_1.CodegenError({
64
34
  whatHappened: "Couldn't create the schema",
65
35
  whatCanUserDo: [
66
- "There's probably at least one spec file defined in your project or in a third-party package that breaks some code generation restrictions. Please check the message below. If it's ambiguous, debug the problem with divide and conquer strategy.\n\n".concat(err.message),
36
+ `There's probably at least one spec file defined in your project or in a third-party package that breaks some code generation restrictions. Please check the message below. If it's ambiguous, debug the problem with divide and conquer strategy.\n\n${err.message}`,
67
37
  ],
68
38
  });
69
39
  }
70
40
  throw err;
71
41
  }
72
- };
73
- UberSchema.fromProject = function (fs, projectRootPath, onShouldAcceptCodegenConfig) {
74
- return __awaiter(this, void 0, void 0, function () {
75
- var onShouldAcceptCodegenConfig_, packageJSON, acceptedCodegenConfigs, appCodegenConfigs, _i, appCodegenConfigs_1, codegenConfig;
76
- return __generator(this, function (_a) {
77
- switch (_a.label) {
78
- case 0:
79
- onShouldAcceptCodegenConfig_ = onShouldAcceptCodegenConfig !== null && onShouldAcceptCodegenConfig !== void 0 ? onShouldAcceptCodegenConfig : (function (x) { return true; });
80
- packageJSON = core_1.PackageJSON.fromProjectRootPath(fs, projectRootPath, projectRootPath);
81
- acceptedCodegenConfigs = [];
82
- appCodegenConfigs = packageJSON.getCodegenConfigs();
83
- for (_i = 0, appCodegenConfigs_1 = appCodegenConfigs; _i < appCodegenConfigs_1.length; _i++) {
84
- codegenConfig = appCodegenConfigs_1[_i];
85
- if (onShouldAcceptCodegenConfig_(codegenConfig.getVersion(), packageJSON.name)) {
86
- acceptedCodegenConfigs.push(codegenConfig);
87
- }
88
- }
89
- return [4 /*yield*/, new core_1.ProjectDependenciesManager(fs, projectRootPath).forEachAsync(function (dependency) {
90
- var codegenConfigs = dependency.getCodegenConfigs();
91
- for (var _i = 0, codegenConfigs_1 = codegenConfigs; _i < codegenConfigs_1.length; _i++) {
92
- var codegenConfig = codegenConfigs_1[_i];
93
- if (onShouldAcceptCodegenConfig_(codegenConfig.getVersion(), dependency.readPackageJSON().name)) {
94
- acceptedCodegenConfigs.push(codegenConfig);
95
- }
96
- }
97
- })];
98
- case 1:
99
- _a.sent();
100
- try {
101
- return [2 /*return*/, new UberSchema(createRawUberSchemaFromSpecFilePaths(acceptedCodegenConfigs.flatMap(function (codegenConfig) {
102
- return codegenConfig.getSpecFilePaths();
103
- })))];
104
- }
105
- catch (err) {
106
- if (err instanceof Error) {
107
- throw new CodegenError_1.CodegenError({
108
- whatHappened: "Couldn't create the schema",
109
- whatCanUserDo: [
110
- "There's probably at least one spec file defined in your project or in a third-party package that breaks some code generation restrictions. Please check the message below. If it's ambiguous, debug the problem with divide and conquer strategy.\n\n".concat(err.message),
111
- ],
112
- });
113
- }
114
- throw err;
115
- }
116
- return [2 /*return*/];
42
+ }
43
+ static fromProject(fs, projectRootPath, onShouldAcceptCodegenConfig) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const onShouldAcceptCodegenConfig_ = onShouldAcceptCodegenConfig !== null && onShouldAcceptCodegenConfig !== void 0 ? onShouldAcceptCodegenConfig : ((x) => true);
46
+ const packageJSON = core_1.PackageJSON.fromProjectRootPath(fs, projectRootPath, projectRootPath);
47
+ const acceptedCodegenConfigs = [];
48
+ const appCodegenConfigs = packageJSON.getCodegenConfigs();
49
+ for (const codegenConfig of appCodegenConfigs) {
50
+ if (onShouldAcceptCodegenConfig_(codegenConfig.getVersion(), packageJSON.name)) {
51
+ acceptedCodegenConfigs.push(codegenConfig);
52
+ }
53
+ }
54
+ yield new core_1.ProjectDependenciesManager(fs, projectRootPath).forEachAsync((dependency) => {
55
+ const codegenConfigs = dependency.getCodegenConfigs();
56
+ for (const codegenConfig of codegenConfigs) {
57
+ if (onShouldAcceptCodegenConfig_(codegenConfig.getVersion(), dependency.readPackageJSON().name)) {
58
+ acceptedCodegenConfigs.push(codegenConfig);
59
+ }
117
60
  }
118
61
  });
62
+ try {
63
+ return new UberSchema(createRawUberSchemaFromSpecFilePaths(acceptedCodegenConfigs.flatMap((codegenConfig) => codegenConfig.getSpecFilePaths())));
64
+ }
65
+ catch (err) {
66
+ if (err instanceof Error) {
67
+ throw new CodegenError_1.CodegenError({
68
+ whatHappened: "Couldn't create the schema",
69
+ whatCanUserDo: [
70
+ `There's probably at least one spec file defined in your project or in a third-party package that breaks some code generation restrictions. Please check the message below. If it's ambiguous, debug the problem with divide and conquer strategy.\n\n${err.message}`,
71
+ ],
72
+ });
73
+ }
74
+ throw err;
75
+ }
119
76
  });
120
- };
121
- UberSchema.prototype.getValue = function () {
77
+ }
78
+ constructor(schemaValue) {
79
+ this.schemaValue = schemaValue;
80
+ }
81
+ getValue() {
122
82
  return this.schemaValue;
123
- };
124
- UberSchema.prototype.findAllSpecSchemasByType = function (schemaType) {
83
+ }
84
+ findAllSpecSchemasByType(schemaType) {
125
85
  return Object.values(this.schemaValue.modules)
126
- .filter(function (module) { return module.type === schemaType; })
127
- .map(function (module) { return module; });
128
- };
129
- UberSchema.prototype.getSpecSchemaByFilenameMap = function () {
130
- return Object.entries(this.schemaValue.modules).reduce(function (acc, _a) {
131
- var moduleName = _a[0], moduleSchema = _a[1];
86
+ .filter((module) => module.type === schemaType)
87
+ .map((module) => module);
88
+ }
89
+ getSpecSchemaByFilenameMap() {
90
+ return Object.entries(this.schemaValue.modules).reduce((acc, [moduleName, moduleSchema]) => {
132
91
  acc.set(moduleName, moduleSchema);
133
92
  return acc;
134
93
  }, new Map());
135
- };
136
- return UberSchema;
137
- }());
94
+ }
95
+ }
138
96
  exports.UberSchema = UberSchema;
@@ -1,64 +1,52 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
4
  };
13
5
  Object.defineProperty(exports, "__esModule", { value: true });
14
6
  exports.AppBuildTimeGlueCodeGenerator = void 0;
15
- var case_1 = require("case");
16
- var templates_1 = require("../templates");
17
- var BasePackageHTemplate_1 = require("../templates/BasePackageHTemplate");
7
+ const case_1 = __importDefault(require("case"));
8
+ const templates_1 = require("../templates");
9
+ const BasePackageHTemplate_1 = require("../templates/BasePackageHTemplate");
18
10
  /**
19
11
  * Generates code based on UberGenerators results. If UberGenerators produce "leaves" (concrete turbo module or component classes),
20
12
  * this class generates "branches" (barrel files like index.ts) and "trunks" (package file or files).
21
13
  */
22
- var AppBuildTimeGlueCodeGenerator = /** @class */ (function () {
23
- function AppBuildTimeGlueCodeGenerator(cppOutputPath, etsOutputPath, codegenNoticeLines) {
14
+ class AppBuildTimeGlueCodeGenerator {
15
+ constructor(cppOutputPath, etsOutputPath, codegenNoticeLines) {
24
16
  this.cppOutputPath = cppOutputPath;
25
17
  this.etsOutputPath = etsOutputPath;
26
18
  this.codegenNoticeLines = codegenNoticeLines;
27
19
  }
28
- AppBuildTimeGlueCodeGenerator.prototype.generate = function (_a) {
29
- var _this = this;
30
- var v1 = _a.v1, v2 = _a.v2;
31
- var fileContentByPath = new Map();
32
- var generatedPackageH_v1 = new templates_1.RNOHGeneratedPackageHTemplate();
33
- var components_indexTS = new templates_1.IndexTSTemplate(this.codegenNoticeLines);
34
- var turboModules_indexTS = new templates_1.IndexTSTemplate(this.codegenNoticeLines);
35
- var generated_indexETS = new templates_1.IndexTSTemplate(this.codegenNoticeLines);
20
+ generate({ v1, v2 }) {
21
+ const fileContentByPath = new Map();
22
+ const generatedPackageH_v1 = new templates_1.RNOHGeneratedPackageHTemplate();
23
+ const components_indexTS = new templates_1.IndexTSTemplate(this.codegenNoticeLines);
24
+ const turboModules_indexTS = new templates_1.IndexTSTemplate(this.codegenNoticeLines);
25
+ const generated_indexETS = new templates_1.IndexTSTemplate(this.codegenNoticeLines);
36
26
  generated_indexETS.addReexport({ from: './ts' });
37
- v1.components.forEach(function (_a) {
38
- var name = _a.name, eventNames = _a.eventNames;
39
- components_indexTS.addReexport({ from: "./".concat(name) });
27
+ v1.components.forEach(({ name, eventNames }) => {
28
+ components_indexTS.addReexport({ from: `./${name}` });
40
29
  generatedPackageH_v1.addComponent({
41
- name: name,
30
+ name,
42
31
  supportedEventNames: eventNames,
43
32
  isArkTSComponent: true,
44
33
  });
45
34
  });
46
- v1.turboModules.forEach(function (turboModule) {
47
- turboModules_indexTS.addReexport({ from: "./".concat(turboModule.name) });
35
+ v1.turboModules.forEach((turboModule) => {
36
+ turboModules_indexTS.addReexport({ from: `./${turboModule.name}` });
48
37
  generatedPackageH_v1.addTurboModule(turboModule);
49
38
  });
50
- v2.forEach(function (_a, libraryName) {
51
- var components = _a.components, turboModules = _a.turboModules;
52
- var basePackageClassName = "Base".concat(case_1.default.pascal(libraryName), "Package");
53
- var generatedPackageH_v2 = new BasePackageHTemplate_1.BasePackageHTemplate(basePackageClassName, _this.codegenNoticeLines);
54
- components.forEach(function (component) {
55
- generatedPackageH_v2.addComponent(__assign(__assign({}, component), { isArkTSComponent: false }));
39
+ v2.forEach(({ components, turboModules }, libraryName) => {
40
+ const basePackageClassName = `Base${case_1.default.pascal(libraryName)}Package`;
41
+ const generatedPackageH_v2 = new BasePackageHTemplate_1.BasePackageHTemplate(basePackageClassName, this.codegenNoticeLines);
42
+ components.forEach((component) => {
43
+ generatedPackageH_v2.addComponent(Object.assign(Object.assign({}, component), { isArkTSComponent: false }));
56
44
  });
57
- turboModules.forEach(function (turboModule) {
58
- turboModules_indexTS.addReexport({ from: "./".concat(turboModule.name) });
45
+ turboModules.forEach((turboModule) => {
46
+ turboModules_indexTS.addReexport({ from: `./${turboModule.name}` });
59
47
  generatedPackageH_v2.addTurboModule(turboModule);
60
48
  });
61
- fileContentByPath.set(_this.cppOutputPath.copyWithNewSegment(libraryName, 'RNOH', 'generated', "".concat(basePackageClassName, ".h")), generatedPackageH_v2.build());
49
+ fileContentByPath.set(this.cppOutputPath.copyWithNewSegment(libraryName, 'RNOH', 'generated', `${basePackageClassName}.h`), generatedPackageH_v2.build());
62
50
  });
63
51
  fileContentByPath.set(this.cppOutputPath.copyWithNewSegment('RNOHGeneratedPackage.h'), generatedPackageH_v1.build());
64
52
  fileContentByPath.set(this.etsOutputPath.copyWithNewSegment('ts.ts'), new templates_1.IndexTSTemplate(this.codegenNoticeLines)
@@ -69,7 +57,6 @@ var AppBuildTimeGlueCodeGenerator = /** @class */ (function () {
69
57
  fileContentByPath.set(this.etsOutputPath.copyWithNewSegment('turboModules', 'ts.ts'), turboModules_indexTS.build());
70
58
  fileContentByPath.set(this.etsOutputPath.copyWithNewSegment('index.ets'), generated_indexETS.build());
71
59
  return fileContentByPath;
72
- };
73
- return AppBuildTimeGlueCodeGenerator;
74
- }());
60
+ }
61
+ }
75
62
  exports.AppBuildTimeGlueCodeGenerator = AppBuildTimeGlueCodeGenerator;
@@ -1,35 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ArkTSComponentCodeGeneratorArkTS = void 0;
4
- var core_1 = require("../core");
5
- var templates_1 = require("../templates");
6
- var ArkTSComponentCodeGeneratorArkTS = /** @class */ (function () {
7
- function ArkTSComponentCodeGeneratorArkTS(cppOutputPath, tsOutputPath, codegenNoticeLines, rnohImport) {
4
+ const core_1 = require("../core");
5
+ const templates_1 = require("../templates");
6
+ class ArkTSComponentCodeGeneratorArkTS {
7
+ constructor(cppOutputPath, tsOutputPath, codegenNoticeLines, rnohImport) {
8
8
  this.cppOutputPath = cppOutputPath;
9
9
  this.tsOutputPath = tsOutputPath;
10
10
  this.codegenNoticeLines = codegenNoticeLines;
11
11
  this.rnohImport = rnohImport;
12
12
  this.glueCodeDataItems = [];
13
13
  }
14
- ArkTSComponentCodeGeneratorArkTS.prototype.getGlueCodeData = function () {
14
+ getGlueCodeData() {
15
15
  return this.glueCodeDataItems;
16
- };
17
- ArkTSComponentCodeGeneratorArkTS.prototype.generate = function (schema) {
18
- var _this = this;
16
+ }
17
+ generate(schema) {
19
18
  if (schema.type !== 'Component') {
20
19
  throw new core_1.CodegenError({
21
- whatHappened: "ComponentCodeGenerator can't generate code for a module type: ".concat(schema.type),
20
+ whatHappened: `ComponentCodeGenerator can't generate code for a module type: ${schema.type}`,
22
21
  unexpected: true,
23
22
  });
24
23
  }
25
- var typeAnnotationToTS = new core_1.TypeAnnotationToTS();
26
- var result = new Map();
27
- Object.entries(schema.components).map(function (_a) {
28
- var name = _a[0], shape = _a[1];
29
- var componentDescriptorHTemplate = new templates_1.ComponentDescriptorHTemplate(name);
30
- var componentJSIBinderHTemplate = new templates_1.ComponentJSIBinderHTemplate(name, _this.codegenNoticeLines);
31
- var componentUtilsTSTemplate = new templates_1.ComponentUtilsTSTemplate(name, _this.codegenNoticeLines, _this.rnohImport);
32
- shape.props.forEach(function (prop) {
24
+ const typeAnnotationToTS = new core_1.TypeAnnotationToTS();
25
+ const result = new Map();
26
+ Object.entries(schema.components).map(([name, shape]) => {
27
+ const componentDescriptorHTemplate = new templates_1.ComponentDescriptorHTemplate(name);
28
+ const componentJSIBinderHTemplate = new templates_1.ComponentJSIBinderHTemplate(name, this.codegenNoticeLines);
29
+ const componentUtilsTSTemplate = new templates_1.ComponentUtilsTSTemplate(name, this.codegenNoticeLines, this.rnohImport);
30
+ shape.props.forEach((prop) => {
33
31
  componentJSIBinderHTemplate.addProp({
34
32
  name: prop.name,
35
33
  isObject: prop.typeAnnotation.type === 'ObjectTypeAnnotation',
@@ -41,7 +39,7 @@ var ArkTSComponentCodeGeneratorArkTS = /** @class */ (function () {
41
39
  isOptional: prop.optional,
42
40
  });
43
41
  });
44
- shape.commands.forEach(function (command) {
42
+ shape.commands.forEach((command) => {
45
43
  componentJSIBinderHTemplate.addCommand({
46
44
  name: command.name,
47
45
  });
@@ -49,15 +47,13 @@ var ArkTSComponentCodeGeneratorArkTS = /** @class */ (function () {
49
47
  name: command.name,
50
48
  argsTSType: '[' +
51
49
  command.typeAnnotation.params
52
- .map(function (param) {
53
- return typeAnnotationToTS.convert(param.typeAnnotation) +
54
- (param.optional ? '?' : '');
55
- })
50
+ .map((param) => typeAnnotationToTS.convert(param.typeAnnotation) +
51
+ (param.optional ? '?' : ''))
56
52
  .join(', ') +
57
53
  ']',
58
54
  });
59
55
  });
60
- shape.events.forEach(function (event) {
56
+ shape.events.forEach((event) => {
61
57
  componentUtilsTSTemplate.addEvent({
62
58
  name: (0, core_1.createEventNameFromEventHandlerName)(event.name),
63
59
  payloadTSType: event.typeAnnotation.argument
@@ -69,18 +65,15 @@ var ArkTSComponentCodeGeneratorArkTS = /** @class */ (function () {
69
65
  eventHandlerName: event.name,
70
66
  });
71
67
  });
72
- result.set(_this.cppOutputPath.copyWithNewSegment("".concat(name, "ComponentDescriptor.h")), componentDescriptorHTemplate.build());
73
- result.set(_this.cppOutputPath.copyWithNewSegment("".concat(name, "JSIBinder.h")), componentJSIBinderHTemplate.build());
74
- result.set(_this.tsOutputPath.copyWithNewSegment("".concat(name, ".ts")), componentUtilsTSTemplate.build());
75
- _this.glueCodeDataItems.push({
76
- name: name,
77
- eventNames: shape.events.map(function (e) {
78
- return (0, core_1.createEventNameFromEventHandlerName)(e.name);
79
- }),
68
+ result.set(this.cppOutputPath.copyWithNewSegment(`${name}ComponentDescriptor.h`), componentDescriptorHTemplate.build());
69
+ result.set(this.cppOutputPath.copyWithNewSegment(`${name}JSIBinder.h`), componentJSIBinderHTemplate.build());
70
+ result.set(this.tsOutputPath.copyWithNewSegment(`${name}.ts`), componentUtilsTSTemplate.build());
71
+ this.glueCodeDataItems.push({
72
+ name,
73
+ eventNames: shape.events.map((e) => (0, core_1.createEventNameFromEventHandlerName)(e.name)),
80
74
  });
81
75
  });
82
76
  return result;
83
- };
84
- return ArkTSComponentCodeGeneratorArkTS;
85
- }());
77
+ }
78
+ }
86
79
  exports.ArkTSComponentCodeGeneratorArkTS = ArkTSComponentCodeGeneratorArkTS;