@ohos-cpf/3rdloop 0.0.8 → 0.0.10

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 (220) hide show
  1. package/README.md +43 -0
  2. package/lib/cli.js +38 -5
  3. package/lib/doctor.js +111 -10
  4. package/lib/knowledge.js +440 -0
  5. package/lib/mcp.js +498 -0
  6. package/package.json +6 -2
  7. package/vendor/Archive/data/.index/meta.json +7 -0
  8. package/vendor/Archive/data/.index/search.db +0 -0
  9. package/vendor/Archive/data/docs/experiences/arkts-check-tool-pitfalls-baseline-comparison.md +13 -0
  10. package/vendor/Archive/data/docs/experiences/arkts-deep-path-import-recognition.md +31 -0
  11. package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-entry-file-case-mismatch.md +25 -0
  12. package/vendor/Archive/data/docs/experiences/arkts-demo-coverage-import-trailing-slash.md +20 -0
  13. package/vendor/Archive/data/docs/experiences/arkts-library-source-files-may-be-ts.md +18 -0
  14. package/vendor/Archive/data/docs/experiences/arkts-typedarray-buffer-interface-cast-compile-fixes.md +36 -0
  15. package/vendor/Archive/data/docs/experiences/arkts-xts-compile-error-clustering-fix.md +24 -0
  16. package/vendor/Archive/data/docs/experiences/arkts-xts-doc-expected-value-runtime-probe.md +35 -0
  17. package/vendor/Archive/data/docs/experiences/arkts-xts-fixture-rawfile-testability-injection.md +33 -0
  18. package/vendor/Archive/data/docs/experiences/code-linter-chinese-comment-false-positive.md +16 -0
  19. package/vendor/Archive/data/docs/experiences/esobject-new-expression-variable-tracking.md +33 -0
  20. package/vendor/Archive/data/docs/experiences/filesystem-case-sensitivity-module-resolution.md +31 -0
  21. package/vendor/Archive/data/docs/experiences/gitcode-clone-redirect-warning-normal.md +13 -0
  22. package/vendor/Archive/data/docs/experiences/kn_msgvq1w585ec8319.md +77 -0
  23. package/vendor/Archive/data/docs/experiences/kn_msovnm6rd46de72c.md +98 -0
  24. package/vendor/Archive/data/docs/experiences/kn_mspt8vntfe708576.md +87 -0
  25. package/vendor/Archive/data/docs/experiences/kn_mspu1ei77adbbb48.md +133 -0
  26. package/vendor/Archive/data/docs/experiences/kn_mspubgak8d30bfce.md +128 -0
  27. package/vendor/Archive/data/docs/experiences/kn_mspug2de3cb1f7c3.md +115 -0
  28. package/vendor/Archive/data/docs/experiences/kn_skill_opt_001.md +38 -0
  29. package/vendor/Archive/data/docs/experiences/loop-artifacts-verification-evidence-triangle.md +19 -0
  30. package/vendor/Archive/data/docs/experiences/macos-bash-replace-build-ps1.md +19 -0
  31. package/vendor/Archive/data/docs/experiences/macos-bsd-diff-q-illegal-option.md +15 -0
  32. package/vendor/Archive/data/docs/experiences/migrate-cjs-compatible-api-version-map-limit.md +17 -0
  33. package/vendor/Archive/data/docs/experiences/mp3agic-arkts-library-behavior-quirks.md +21 -0
  34. package/vendor/Archive/data/docs/experiences/ohos-face-detection-scan-api-mapping.md +15 -0
  35. package/vendor/Archive/data/docs/experiences/pr-metadata-and-diff-integrity-verification.md +12 -0
  36. package/vendor/Archive/data/docs/experiences/rn-coverage-index-signature-pseudo-member-false-negative.md +32 -0
  37. package/vendor/Archive/data/docs/experiences/rn-memory-check-severity-calibration.md +21 -0
  38. package/vendor/Archive/data/docs/experiences/rn-platform-specific-api-exclusion-evidence.md +24 -0
  39. package/vendor/Archive/data/docs/experiences/rn-upstream-version-diff-pitfalls.md +17 -0
  40. package/vendor/Archive/data/docs/experiences/rn-version-gap-risk-rating-rules.md +13 -0
  41. package/vendor/Archive/data/docs/experiences/rn-view-lib-native-contract-diff-fabric-spec.md +16 -0
  42. package/vendor/Archive/data/docs/experiences/rnoh-adapter-package-version-field-semantics.md +18 -0
  43. package/vendor/Archive/data/docs/experiences/rnoh-arkts-sqlite-rows-array-format.md +18 -0
  44. package/vendor/Archive/data/docs/experiences/rnoh-dependency-residue-scan-strategy.md +18 -0
  45. package/vendor/Archive/data/docs/experiences/rnoh-example-local-lib-dep-use-tgz.md +53 -0
  46. package/vendor/Archive/data/docs/experiences/rnoh-example-prereserve-rntesterlist.md +17 -0
  47. package/vendor/Archive/data/docs/experiences/rnoh-example-template-compatiblesdkversion-upgrade.md +29 -0
  48. package/vendor/Archive/data/docs/experiences/rnoh-example-turbomodule-shell-adaptation-checklist.md +41 -0
  49. package/vendor/Archive/data/docs/experiences/rnoh-mcp-build-project-tool-risk.md +18 -0
  50. package/vendor/Archive/data/docs/experiences/rnoh-npm-devdependencies-version-precheck.md +29 -0
  51. package/vendor/Archive/data/docs/experiences/rnoh-repo-baseline-version-verification.md +13 -0
  52. package/vendor/Archive/data/docs/experiences/rnoh-repo-upstream-directory-mapping.md +18 -0
  53. package/vendor/Archive/data/docs/experiences/rnoh-stateless-library-zero-leak-verification.md +31 -0
  54. package/vendor/Archive/data/docs/experiences/rnoh-template-npmrc-credential-removal.md +15 -0
  55. package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-codegen-wiring-verification.md +19 -0
  56. package/vendor/Archive/data/docs/experiences/rnoh-turbomodule-cpp-methodmap-compatibility-check.md +20 -0
  57. package/vendor/Archive/data/docs/experiences/scenario-doc-vs-source-signature-diff-four-patterns.md +24 -0
  58. package/vendor/Archive/data/docs/experiences/static-analysis-grep-cross-validation.md +29 -0
  59. package/vendor/Archive/demo.js +489 -0
  60. package/vendor/Archive/index.js +43 -0
  61. package/vendor/Archive/package.json +16 -0
  62. package/vendor/Archive/src/constants.js +83 -0
  63. package/vendor/Archive/src/data/stopwords.txt +110 -0
  64. package/vendor/Archive/src/data/synonyms.json +25 -0
  65. package/vendor/Archive/src/data/terms.txt +59 -0
  66. package/vendor/Archive/src/db/sqlite-backend.js +312 -0
  67. package/vendor/Archive/src/db/sqlite-schema.js +64 -0
  68. package/vendor/Archive/src/engine.js +501 -0
  69. package/vendor/Archive/src/index/index-manager.js +203 -0
  70. package/vendor/Archive/src/index/index-state.js +94 -0
  71. package/vendor/Archive/src/index/search-text-builder.js +106 -0
  72. package/vendor/Archive/src/index.js +22 -0
  73. package/vendor/Archive/src/parser/api-identifiers.js +121 -0
  74. package/vendor/Archive/src/parser/api-suffixes.js +48 -0
  75. package/vendor/Archive/src/parser/heading-normalize.js +40 -0
  76. package/vendor/Archive/src/parser/markdown-splitter.js +215 -0
  77. package/vendor/Archive/src/search/catalog-routing.js +87 -0
  78. package/vendor/Archive/src/search/fts-search.js +289 -0
  79. package/vendor/Archive/src/search/query-normalizer.js +159 -0
  80. package/vendor/Archive/src/search/query-rewriter.js +72 -0
  81. package/vendor/Archive/src/search/search-engine.js +72 -0
  82. package/vendor/Archive/src/search/snippet.js +64 -0
  83. package/vendor/Archive/src/store/dir-store.js +103 -0
  84. package/vendor/Archive/src/store/doc-store.js +36 -0
  85. package/vendor/Archive/src/tokenizer/lexicon.js +151 -0
  86. package/vendor/Archive/src/tokenizer/tokenizer.js +167 -0
  87. package/vendor/Archive/src/types.js +86 -0
  88. package/vendor/Archive/src/utils/hash.js +16 -0
  89. package/vendor/Archive/src/utils/lock.js +73 -0
  90. package/vendor/Archive/src/utils/path-safety.js +96 -0
  91. package/vendor/Archive/src/utils/paths.js +39 -0
  92. package/vendor/BadCase/rn/INDEX.md +127 -0
  93. package/vendor/BadCase/rn/cases/KI-001-webview/350/247/206/351/242/221/346/227/240/346/263/225/346/250/252/345/261/217.md +52 -0
  94. package/vendor/BadCase/rn/cases/KI-002-fastImage/347/203/255/346/233/264/346/226/260/345/233/276/347/211/207/345/244/261/350/264/245.md +37 -0
  95. package/vendor/BadCase/rn/cases/KI-003-wechat/347/274/251/347/225/245/345/233/276/346/234/254/345/234/260/345/233/276/347/211/207.md +62 -0
  96. package/vendor/BadCase/rn/cases/KI-004-wechat/345/233/236/350/260/203/346/227/266/345/272/217.md +47 -0
  97. package/vendor/BadCase/rn/cases/KI-005-geolocation/345/257/274/345/205/245/350/267/257/345/276/204/345/220/216/347/274/200.md +31 -0
  98. package/vendor/BadCase/rn/cases/KI-006-SmartRefreshLayout/346/231/272/350/203/275/346/214/207/351/222/210/345/264/251/346/272/203.md +55 -0
  99. package/vendor/BadCase/rn/cases/KI-007-orientation-locker/344/274/240/346/204/237/345/231/250/345/210/235/345/247/213/345/214/226.md +58 -0
  100. package/vendor/BadCase/rn/cases/KI-008-orientation-locker/344/274/240/346/204/237/345/231/250/345/274/225/347/224/250/350/256/241/346/225/260.md +47 -0
  101. package/vendor/BadCase/rn/cases/KI-009-pager-view/345/265/214/345/245/227/346/273/221/345/212/250.md +38 -0
  102. package/vendor/BadCase/rn/cases/KI-010-screens/346/211/213/345/212/277/345/206/262/347/252/201.md +48 -0
  103. package/vendor/BadCase/rn/cases/KI-011-spring-scrollview/346/211/213/345/212/277/351/207/215/345/244/215/347/273/221/345/256/232.md +49 -0
  104. package/vendor/BadCase/rn/cases/KI-012-qr-camera/346/250/252/345/261/217/351/200/202/351/205/215.md +59 -0
  105. package/vendor/BadCase/rn/cases/KI-013-webview/346/267/261/350/211/262/346/250/241/345/274/217/350/203/214/346/231/257/350/211/262.md +37 -0
  106. package/vendor/BadCase/rn/cases/KI-014-amap-geolocation/345/233/236/350/260/203/347/274/272/345/244/261.md +42 -0
  107. package/vendor/BadCase/rn/cases/KI-015-reanimated/350/277/220/350/241/214/346/227/266/346/236/220/346/236/204/345/264/251/346/272/203.md +54 -0
  108. package/vendor/BadCase/rn/cases/KI-016-fs/346/226/207/344/273/266/350/257/273/345/217/226/347/274/226/347/240/201.md +58 -0
  109. package/vendor/BadCase/rn/cases/KI-017-blob-util/345/217/202/346/225/260/347/274/226/347/240/201/351/224/231/350/257/257.md +39 -0
  110. package/vendor/BadCase/rn/cases/KI-018-modal/345/274/271/347/252/227/351/227/252/347/203/201.md +53 -0
  111. package/vendor/BadCase/rn/cases/KI-019-code-push/351/207/215/345/220/257/351/200/273/350/276/221/345/244/261/346/225/210.md +79 -0
  112. package/vendor/BadCase/rn/cases/KI-020-netinfo/346/225/217/346/204/237/344/277/241/346/201/257/346/263/204/351/234/262.md +60 -0
  113. package/vendor/BadCase/rn/cases/KI-021-video/346/234/254/345/234/260/350/247/206/351/242/221/346/222/255/346/224/276/345/274/202/345/270/270.md +79 -0
  114. package/vendor/BadCase/rn/cases/KI-022-audio-recorder-player/346/236/232/344/270/276/347/274/272/345/244/261.md +38 -0
  115. package/vendor/BadCase/rn/cases/KI-023-svg/346/270/220/345/217/230/347/273/247/346/211/277/345/244/261/346/225/210.md +62 -0
  116. package/vendor/BadCase/rn/generalization-log.md +55 -0
  117. package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.json +328 -0
  118. package/vendor/BadCase/rn/pr-info/rntpc_react-native-SmartRefreshLayout-32.md +382 -0
  119. package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.json +1351 -0
  120. package/vendor/BadCase/rn/pr-info/rntpc_react-native-amap-geolocation-27.md +1176 -0
  121. package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.json +538 -0
  122. package/vendor/BadCase/rn/pr-info/rntpc_react-native-audio-recorder-player-22.md +1488 -0
  123. package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.json +211 -0
  124. package/vendor/BadCase/rn/pr-info/rntpc_react-native-blob-util-23.md +35 -0
  125. package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.json +2048 -0
  126. package/vendor/BadCase/rn/pr-info/rntpc_react-native-code-push-17.md +3866 -0
  127. package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.json +198 -0
  128. package/vendor/BadCase/rn/pr-info/rntpc_react-native-fast-image-102.md +40 -0
  129. package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.json +751 -0
  130. package/vendor/BadCase/rn/pr-info/rntpc_react-native-fs-38.md +883 -0
  131. package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.json +1544 -0
  132. package/vendor/BadCase/rn/pr-info/rntpc_react-native-geolocation-24.md +2598 -0
  133. package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.json +246 -0
  134. package/vendor/BadCase/rn/pr-info/rntpc_react-native-modal-20.md +554 -0
  135. package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.json +211 -0
  136. package/vendor/BadCase/rn/pr-info/rntpc_react-native-netinfo-31.md +54 -0
  137. package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.json +1626 -0
  138. package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-45.md +2213 -0
  139. package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.json +208 -0
  140. package/vendor/BadCase/rn/pr-info/rntpc_react-native-orientation-locker-51.md +77 -0
  141. package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.json +377 -0
  142. package/vendor/BadCase/rn/pr-info/rntpc_react-native-pager-view-32.md +174 -0
  143. package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.json +232 -0
  144. package/vendor/BadCase/rn/pr-info/rntpc_react-native-qr-decode-image-camera-37.md +194 -0
  145. package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.json +198 -0
  146. package/vendor/BadCase/rn/pr-info/rntpc_react-native-reanimated-82.md +67 -0
  147. package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.json +198 -0
  148. package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-87.md +38 -0
  149. package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.json +208 -0
  150. package/vendor/BadCase/rn/pr-info/rntpc_react-native-screens-93.md +34 -0
  151. package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.json +222 -0
  152. package/vendor/BadCase/rn/pr-info/rntpc_react-native-spring-scrollview-38.md +56 -0
  153. package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.json +463 -0
  154. package/vendor/BadCase/rn/pr-info/rntpc_react-native-svg-117.md +383 -0
  155. package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.json +464 -0
  156. package/vendor/BadCase/rn/pr-info/rntpc_react-native-video-66.md +565 -0
  157. package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.json +198 -0
  158. package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-112.md +47 -0
  159. package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.json +232 -0
  160. package/vendor/BadCase/rn/pr-info/rntpc_react-native-webview-121.md +422 -0
  161. package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.json +295 -0
  162. package/vendor/BadCase/rn/pr-info/rntpc_react-native-wechat-lib-15.md +1038 -0
  163. package/vendor/BadCase/rn/rules/R-01-/345/205/250/345/261/217/347/252/227/345/217/243/347/212/266/346/200/201/347/256/241/347/220/206/345/256/214/346/225/264/346/200/247.md +20 -0
  164. package/vendor/BadCase/rn/rules/R-02-/350/265/204/346/272/220URI/345/275/242/346/200/201/345/210/206/346/224/257/350/246/206/347/233/226.md +21 -0
  165. package/vendor/BadCase/rn/rules/R-03-/351/231/204/345/261/236/346/223/215/344/275/234/345/244/261/350/264/245/351/230/273/346/226/255/344/270/273/346/265/201/347/250/213.md +20 -0
  166. package/vendor/BadCase/rn/rules/R-04-/345/274/202/346/255/245/345/233/236/350/260/203/346/263/250/345/206/214/346/227/266/345/272/217.md +20 -0
  167. package/vendor/BadCase/rn/rules/R-05-/346/250/241/345/235/227/345/257/274/345/205/245/350/267/257/345/276/204/350/247/204/350/214/203.md +19 -0
  168. package/vendor/BadCase/rn/rules/R-06-/344/274/240/346/204/237/345/231/250/347/241/254/344/273/266/346/235/203/351/231/220/346/214/211/351/234/200/350/216/267/345/217/226.md +21 -0
  169. package/vendor/BadCase/rn/rules/R-07-/346/231/272/350/203/275/346/214/207/351/222/210/347/224/237/345/221/275/345/221/250/346/234/237/347/256/241/347/220/206.md +20 -0
  170. package/vendor/BadCase/rn/rules/R-08-/346/211/213/345/212/277/344/272/213/344/273/266/346/263/250/345/206/214/344/270/216/345/206/262/347/252/201/345/244/204/347/220/206.md +22 -0
  171. package/vendor/BadCase/rn/rules/R-09-/346/250/252/347/253/226/345/261/217/345/244/232/345/275/242/346/200/201/345/270/203/345/261/200/351/200/202/351/205/215.md +20 -0
  172. package/vendor/BadCase/rn/rules/R-10-/346/267/261/350/211/262/346/250/241/345/274/217/344/270/273/351/242/230/351/242/234/350/211/262/351/200/202/351/205/215.md +19 -0
  173. package/vendor/BadCase/rn/rules/R-11-/346/216/245/345/217/243/345/233/236/350/260/203/345/256/236/347/216/260/345/256/214/346/225/264/346/200/247.md +20 -0
  174. package/vendor/BadCase/rn/rules/R-12-/345/216/237/347/224/237/350/277/220/350/241/214/346/227/266/350/265/204/346/272/220/346/236/220/346/236/204/346/227/266/345/272/217.md +20 -0
  175. package/vendor/BadCase/rn/rules/R-13-/346/226/207/344/273/266/346/225/260/346/215/256/347/274/226/347/240/201/344/270/216/346/240/274/345/274/217/345/205/274/345/256/271.md +21 -0
  176. package/vendor/BadCase/rn/rules/R-14-/345/212/250/347/224/273/345/210/235/345/247/213/345/214/226/346/227/266/345/272/217/344/270/216/347/212/266/346/200/201/345/220/214/346/255/245.md +20 -0
  177. package/vendor/BadCase/rn/rules/R-15-/347/212/266/346/200/201/346/214/201/344/271/205/345/214/226/344/270/216/351/207/215/345/220/257/351/200/273/350/276/221/344/270/200/350/207/264/346/200/247.md +20 -0
  178. package/vendor/BadCase/rn/rules/R-16-/346/225/217/346/204/237/344/277/241/346/201/257/346/227/245/345/277/227/346/263/204/351/234/262.md +19 -0
  179. package/vendor/BadCase/rn/rules/R-17-/345/252/222/344/275/223/350/265/204/346/272/220/347/224/237/345/221/275/345/221/250/346/234/237/344/270/216/351/224/231/350/257/257/345/244/204/347/220/206.md +21 -0
  180. package/vendor/BadCase/rn/rules/R-18-/350/203/275/345/212/233/346/236/232/344/270/276/351/205/215/347/275/256/345/256/214/346/225/264/346/200/247.md +19 -0
  181. package/vendor/BadCase/rn/rules/R-19-/345/233/276/345/275/242/346/270/262/346/237/223/345/261/236/346/200/247/347/273/247/346/211/277/344/270/216/351/207/215/347/275/256.md +19 -0
  182. package/vendor/MCP/README.md +490 -0
  183. package/vendor/MCP/config.json +29 -0
  184. package/vendor/MCP/package.json +23 -0
  185. package/vendor/MCP/scripts/analyze-demo-coverage.cjs +1203 -0
  186. package/vendor/MCP/scripts/analyze-xts-coverage.cjs +1245 -0
  187. package/vendor/MCP/scripts/deveco_docs.js +247 -0
  188. package/vendor/MCP/scripts/extract-interfaces.cjs +1487 -0
  189. package/vendor/MCP/scripts/flutter-analyze-demo-coverage.cjs +666 -0
  190. package/vendor/MCP/scripts/flutter-analyze-xts-coverage.cjs +684 -0
  191. package/vendor/MCP/scripts/flutter-extract-interfaces.cjs +1251 -0
  192. package/vendor/MCP/scripts/flutter-render-spec-doc.cjs +351 -0
  193. package/vendor/MCP/scripts/render-spec-doc.cjs +347 -0
  194. package/vendor/MCP/scripts/rn-analyze-demo-coverage.cjs +645 -0
  195. package/vendor/MCP/scripts/rn-analyze-test-coverage.cjs +614 -0
  196. package/vendor/MCP/scripts/rn-extract-interfaces.cjs +1462 -0
  197. package/vendor/MCP/scripts/rn-render-spec-doc.cjs +327 -0
  198. package/vendor/MCP/scripts/rn-scan-exports.cjs +1336 -0
  199. package/vendor/MCP/src/client/MCPClientPool.js +220 -0
  200. package/vendor/MCP/src/config/ConfigLoader.js +189 -0
  201. package/vendor/MCP/src/executor/ScriptExecutor.js +110 -0
  202. package/vendor/MCP/src/gateway/Gateway.js +451 -0
  203. package/vendor/MCP/src/index.js +87 -0
  204. package/vendor/MCP/src/library/KBToolProvider.js +229 -0
  205. package/vendor/MCP/src/library/logger.js +60 -0
  206. package/vendor/MCP/src/registry/ScriptRegistry.js +238 -0
  207. package/vendor/MCP/src/registry/ToolRegistry.js +111 -0
  208. package/vendor/MCP/src/types.js +115 -0
  209. package/vendor/Server/Skills/arkts-library-test-coverage-check/references/MCP_TOOL_USAGE.md +4 -2
  210. package/vendor/Server/Skills/arkts-library-xts-coverage/SKILL.md +3 -3
  211. package/vendor/Server/Skills/knowledge-import/SKILL.md +1 -1
  212. package/vendor/Server/Skills/knowledge-import/references/MCP_TOOL_USAGE.md +12 -4
  213. package/vendor/Server/Skills/ohos-lib-pr-push/SKILL.md +5 -4
  214. package/vendor/Server/Skills/rn-library-issue-generalizer/SKILL.md +2 -2
  215. package/vendor/Server/Skills/rn-library-known-issue-check/SKILL.md +2 -2
  216. package/vendor/Server/Skills/rnoh-lib-demo-coverage/SKILL.md +1 -2
  217. package/vendor/Server/Skills/rnoh-lib-test-align/references/port-test-demo-guide.md +1 -1
  218. package/vendor/Server/Skills/rnoh-lib-xts-coverage/SKILL.md +1 -2
  219. package/vendor/Server/package.json +5 -1
  220. package/vendor/VERSION +3 -3
@@ -0,0 +1,883 @@
1
+ # PR #38: fix:解决read接口读取其他格式的文件失败
2
+
3
+ - **状态**: merged
4
+ - **作者**: chenbaodi123
5
+ - **创建时间**: 2026-06-25T20:49:29+08:00
6
+ - **分支**: br_rnoh0.72 → br_rnoh0.72
7
+ - **变更文件数**: 24
8
+
9
+ ## PR 描述
10
+
11
+ 问题原因:read接口以前只能读取text的文件,无法读取其他文件,底层使用readText
12
+ 解决方案:read接口底层使用readSync
13
+
14
+ ## 变更文件
15
+
16
+ | 文件 | 变更 | +行 | -行 |
17
+ |------|------|-----|-----|
18
+ | `OAT.xml` | ? | +4 | -0 |
19
+ | `buildEnv.sh` | added | +8 | -0 |
20
+ | `example/harmony/build-profile.template.json5` | ? | +1 | -2 |
21
+ | `example/harmony/entry/oh-package.json5` | ? | +1 | -2 |
22
+ | `example/harmony/entry/src/main/ets/entryability/EntryAbility.ets` | ? | +22 | -4 |
23
+ | `example/harmony/entry/src/main/ets/pages/Index.ets` | ? | +22 | -4 |
24
+ | `example/harmony/entry/src/main/ets/pages/SurfaceDeadlockTest.ets` | ? | +22 | -4 |
25
+ | `example/harmony/oh-package.json5` | ? | +1 | -1 |
26
+ | `example/package.json` | ? | +4 | -3 |
27
+ | `harmony/fs/BuildProfile.ets` | ? | +22 | -4 |
28
+ | `harmony/fs/hvigorfile.ts` | ? | +22 | -4 |
29
+ | `harmony/fs/index.ets` | ? | +22 | -4 |
30
+ | `harmony/fs/src/main/cpp/RNFSPackage.h` | ? | +22 | -4 |
31
+ | `harmony/fs/src/main/ets/FsPackage.ets` | ? | +22 | -4 |
32
+ | `harmony/fs/src/main/ets/FsTurboModule.ts` | ? | +56 | -18 |
33
+ | `harmony/fs/src/ohosTest/ets/test/Ability.test.ets` | ? | +22 | -4 |
34
+ | `harmony/fs/src/ohosTest/ets/test/List.test.ets` | ? | +22 | -4 |
35
+ | `harmony/fs/src/ohosTest/ets/testability/TestAbility.ets` | ? | +22 | -4 |
36
+ | `harmony/fs/src/ohosTest/ets/testability/pages/Index.ets` | ? | +22 | -4 |
37
+ | `harmony/fs/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets` | ? | +22 | -4 |
38
+ | `harmony/fs/src/test/List.test.ets` | ? | +22 | -4 |
39
+ | `harmony/fs/src/test/LocalUnit.test.ets` | ? | +22 | -4 |
40
+ | `harmony/fs/ts.ets` | ? | +22 | -4 |
41
+ | `src/NativeReactNativeFs.ts` | ? | +22 | -4 |
42
+
43
+ ## Diff
44
+
45
+ ### `OAT.xml`
46
+
47
+ ```diff
48
+ @@ -34,6 +34,8 @@
49
+ <filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
50
+ <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
51
+ <filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
52
+ + <filteritem type="filepath" name=".jshintrc" desc="工程模板,不修改版权头,以防有修改版权风险"/>
53
+ + <filteritem type="filepath" name="buildEnv.sh" desc="工程模板,不添加许可证头"/>
54
+ </filefilter>
55
+ <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
56
+ <filteritem type="filepath" name="example/.*" desc="示例工程,不添加版权头"/>
57
+ @@ -54,6 +56,8 @@
58
+ <filteritem type="filepath" name="index.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
59
+ <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
60
+ <filteritem type="filepath" name="hvigor/hvigor-config.json5" desc="工程模板,不修改版权头,以防有修改版权风险"/>
61
+ + <filteritem type="filepath" name=".jshintrc" desc="工程模板,不修改版权头,以防有修改版权风险"/>
62
+ + <filteritem type="filepath" name="buildEnv.sh" desc="工程模板,不添加许可证头"/>
63
+ </filefilter>
64
+
65
+ <filefilter name="binaryFileTypePolicyFilter" desc="Filters for copyright header policies">
66
+
67
+ ```
68
+
69
+ ### `buildEnv.sh`
70
+
71
+ ```diff
72
+ @@ -0,0 +1,8 @@
73
+ +#!/bin/bash
74
+ +BUILD_PKG_DIR=example
75
+ +BUILD_SAMPLE_DIR=example/harmony
76
+ +BUILD_THIRD_PARTY_DIR=harmony/
77
+ +
78
+ +# BUILD_PKG_DIR: 用来打 tgz 包的工程目录
79
+ +# BUILD_SAMPLE_DIR:用来打 har 包的目录
80
+ +# BUILD_THIRD_PARTY_DIR:库模块源码目录
81
+
82
+ ```
83
+
84
+ ### `example/harmony/build-profile.template.json5`
85
+
86
+ ```diff
87
+ @@ -4,8 +4,7 @@
88
+ {
89
+ "name": 'default',
90
+ "signingConfig": 'default',
91
+ - "compileSdkVersion": '5.0.1(13)',
92
+ - "compatibleSdkVersion": '5.0.1(13)',
93
+ + compatibleSdkVersion: '5.0.0(12)',
94
+ "runtimeOS": 'HarmonyOS'
95
+ },
96
+ ],
97
+
98
+ ```
99
+
100
+ ### `example/harmony/entry/oh-package.json5`
101
+
102
+ ```diff
103
+ @@ -5,8 +5,7 @@
104
+ "description": "example description",
105
+ "version": "1.0.0",
106
+ "dependencies": {
107
+ - "@rnoh/react-native-openharmony": "0.72.38",
108
+ -// "@react-native-ohos/react-native-fs": "file:../fs"
109
+ + "@rnoh/react-native-openharmony": "file:../../node_modules/react-native-harmony/react_native_openharmony.har",
110
+ "@react-native-ohos/react-native-fs": "file:../../node_modules/@react-native-ohos/react-native-fs/harmony/fs.har",
111
+ }
112
+ }
113
+
114
+
115
+ ```
116
+
117
+ ### `example/harmony/entry/src/main/ets/entryability/EntryAbility.ets`
118
+
119
+ ```diff
120
+ @@ -1,7 +1,25 @@
121
+ -/*
122
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
123
+ - * Use of this source code is governed by a MIT license that can be
124
+ - * found in the LICENSE file.
125
+ +/**
126
+ + * MIT License
127
+ + *
128
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
129
+ + *
130
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
131
+ + * of this software and associated documentation files (the "Software"), to deal
132
+ + * in the Software without restriction, including without limitation the rights
133
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
134
+ + * copies of the Software, and to permit persons to whom the Software is
135
+ + * furnished to do so, subject to the following conditions:
136
+ + *
137
+ + * The above copyright notice and this permission notice shall be included in all
138
+ + * copies or substantial portions of the Software.
139
+ + *
140
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
141
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
142
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
143
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
144
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
145
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
146
+ + * SOFTWARE.
147
+ */
148
+
149
+ import {RNAbility} from '@rnoh/react-native-openharmony';
150
+
151
+ ```
152
+
153
+ ### `example/harmony/entry/src/main/ets/pages/Index.ets`
154
+
155
+ ```diff
156
+ @@ -1,7 +1,25 @@
157
+ -/*
158
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
159
+ - * Use of this source code is governed by a MIT license that can be
160
+ - * found in the LICENSE file.
161
+ +/**
162
+ + * MIT License
163
+ + *
164
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
165
+ + *
166
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
167
+ + * of this software and associated documentation files (the "Software"), to deal
168
+ + * in the Software without restriction, including without limitation the rights
169
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
170
+ + * copies of the Software, and to permit persons to whom the Software is
171
+ + * furnished to do so, subject to the following conditions:
172
+ + *
173
+ + * The above copyright notice and this permission notice shall be included in all
174
+ + * copies or substantial portions of the Software.
175
+ + *
176
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
177
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
178
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
179
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
180
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
181
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
182
+ + * SOFTWARE.
183
+ */
184
+
185
+ import {
186
+
187
+ ```
188
+
189
+ ### `example/harmony/entry/src/main/ets/pages/SurfaceDeadlockTest.ets`
190
+
191
+ ```diff
192
+ @@ -1,7 +1,25 @@
193
+ -/*
194
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
195
+ - * Use of this source code is governed by a MIT license that can be
196
+ - * found in the LICENSE file.
197
+ +/**
198
+ + * MIT License
199
+ + *
200
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
201
+ + *
202
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
203
+ + * of this software and associated documentation files (the "Software"), to deal
204
+ + * in the Software without restriction, including without limitation the rights
205
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
206
+ + * copies of the Software, and to permit persons to whom the Software is
207
+ + * furnished to do so, subject to the following conditions:
208
+ + *
209
+ + * The above copyright notice and this permission notice shall be included in all
210
+ + * copies or substantial portions of the Software.
211
+ + *
212
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
213
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
214
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
215
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
216
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
217
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
218
+ + * SOFTWARE.
219
+ */
220
+ import { RNInstance, JSBundleProvider, RNAbility, RNSurface } from '@rnoh/react-native-openharmony'
221
+ import { CustomComponentBuilder } from "@rnoh/react-native-openharmony/src/main/ets/RNOHCorePackage"
222
+
223
+ ```
224
+
225
+ ### `example/harmony/oh-package.json5`
226
+
227
+ ```diff
228
+ @@ -6,7 +6,7 @@
229
+ "repository": {},
230
+ "version": "1.0.0",
231
+ "overrides": {
232
+ - "@rnoh/react-native-openharmony": "0.72.38"
233
+ + "@rnoh/react-native-openharmony": "file:./../node_modules/react-native-harmony/react_native_openharmony.har"
234
+ },
235
+ "dynamicDependencies": {}
236
+ }
237
+
238
+
239
+ ```
240
+
241
+ ### `example/package.json`
242
+
243
+ ```diff
244
+ @@ -8,15 +8,16 @@
245
+ "start": "hdc rport tcp:8081 tcp:8081 && react-native start",
246
+ "codegen": "react-native codegen-harmony --rnoh-module-path ./harmony/entry/oh_modules/@rnoh/react-native-openharmony",
247
+ "pack:pkg": "cd ../ && npm run pack && cd ./example",
248
+ - "install:pkg": "npm uninstall @react-native-ohos/react-native-fs && npm run pack:pkg && npm i @react-native-ohos/react-native-fs@file:../react-native-ohos-react-native-fs-2.20.1-rc.2.tgz",
249
+ + "install:pkg": "npm uninstall @react-native-ohos/react-native-fs && npm run pack:pkg && npm i @react-native-ohos/react-native-fs@file:../react-native-ohos-react-native-fs-2.20.1-1.tgz",
250
+ "dev": "npm run codegen && react-native bundle-harmony --dev --minify=false",
251
+ "prod": "npm run codegen && react-native bundle-harmony --dev=false --minify=true",
252
+ "postinstall": "node ./scripts/create-build-profile",
253
+ - "fast:pkg": "cd ../ && npm i --legacy-peer-deps && npm pack && cd ./example && npm i && npm run dev"
254
+ + "fast-install-project": "cd ../ && npm i --force && npm run pack && rm -r node_modules && cd ./example && npm i --force",
255
+ + "fast:pkg": "npm run fast-install-project && npm run dev"
256
+ },
257
+ "dependencies": {
258
+ "@gorhom/portal": "^1.0.14",
259
+ - "@react-native-ohos/react-native-fs": "file:../react-native-ohos-react-native-fs-2.20.1-rc.2.tgz",
260
+ + "@react-native-ohos/react-native-fs": "file:../react-native-ohos-react-native-fs-2.20.1-1.tgz",
261
+ "@rnoh/testerino": "npm:@react-native-oh-tpl/testerino@0.0.9",
262
+ "react": "18.2.0",
263
+ "react-native": "0.72.5",
264
+
265
+ ```
266
+
267
+ ### `harmony/fs/BuildProfile.ets`
268
+
269
+ ```diff
270
+ @@ -1,7 +1,25 @@
271
+ -/*
272
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
273
+ - * Use of this source code is governed by a MIT license that can be
274
+ - * found in the LICENSE file.
275
+ +/**
276
+ + * MIT License
277
+ + *
278
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
279
+ + *
280
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
281
+ + * of this software and associated documentation files (the "Software"), to deal
282
+ + * in the Software without restriction, including without limitation the rights
283
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
284
+ + * copies of the Software, and to permit persons to whom the Software is
285
+ + * furnished to do so, subject to the following conditions:
286
+ + *
287
+ + * The above copyright notice and this permission notice shall be included in all
288
+ + * copies or substantial portions of the Software.
289
+ + *
290
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
291
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
292
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
293
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
294
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
295
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
296
+ + * SOFTWARE.
297
+ */
298
+
299
+ /**
300
+
301
+ ```
302
+
303
+ ### `harmony/fs/hvigorfile.ts`
304
+
305
+ ```diff
306
+ @@ -1,6 +1,24 @@
307
+ -/*
308
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
309
+ - * Use of this source code is governed by a MIT license that can be
310
+ - * found in the LICENSE file.
311
+ +/**
312
+ + * MIT License
313
+ + *
314
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
315
+ + *
316
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
317
+ + * of this software and associated documentation files (the "Software"), to deal
318
+ + * in the Software without restriction, including without limitation the rights
319
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
320
+ + * copies of the Software, and to permit persons to whom the Software is
321
+ + * furnished to do so, subject to the following conditions:
322
+ + *
323
+ + * The above copyright notice and this permission notice shall be included in all
324
+ + * copies or substantial portions of the Software.
325
+ + *
326
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
327
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
328
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
329
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
330
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
331
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
332
+ + * SOFTWARE.
333
+ */
334
+ export { harTasks } from '@ohos/hvigor-ohos-plugin';
335
+
336
+
337
+ ```
338
+
339
+ ### `harmony/fs/index.ets`
340
+
341
+ ```diff
342
+ @@ -1,7 +1,25 @@
343
+ -/*
344
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
345
+ - * Use of this source code is governed by a MIT license that can be
346
+ - * found in the LICENSE file.
347
+ +/**
348
+ + * MIT License
349
+ + *
350
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
351
+ + *
352
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
353
+ + * of this software and associated documentation files (the "Software"), to deal
354
+ + * in the Software without restriction, including without limitation the rights
355
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
356
+ + * copies of the Software, and to permit persons to whom the Software is
357
+ + * furnished to do so, subject to the following conditions:
358
+ + *
359
+ + * The above copyright notice and this permission notice shall be included in all
360
+ + * copies or substantial portions of the Software.
361
+ + *
362
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
363
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
364
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
365
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
366
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
367
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
368
+ + * SOFTWARE.
369
+ */
370
+ import { FsPackage } from './src/main/ets/FsPackage'
371
+ export * from './ts'
372
+
373
+ ```
374
+
375
+ ### `harmony/fs/src/main/cpp/RNFSPackage.h`
376
+
377
+ ```diff
378
+ @@ -1,7 +1,25 @@
379
+ -/*
380
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
381
+ - * Use of this source code is governed by a MIT license that can be
382
+ - * found in the LICENSE file.
383
+ +/**
384
+ + * MIT License
385
+ + *
386
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
387
+ + *
388
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
389
+ + * of this software and associated documentation files (the "Software"), to deal
390
+ + * in the Software without restriction, including without limitation the rights
391
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
392
+ + * copies of the Software, and to permit persons to whom the Software is
393
+ + * furnished to do so, subject to the following conditions:
394
+ + *
395
+ + * The above copyright notice and this permission notice shall be included in all
396
+ + * copies or substantial portions of the Software.
397
+ + *
398
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
399
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
400
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
401
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
402
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
403
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
404
+ + * SOFTWARE.
405
+ */
406
+ #ifndef FSPACKAGE_H
407
+ #define FSPACKAGE_H
408
+
409
+ ```
410
+
411
+ ### `harmony/fs/src/main/ets/FsPackage.ets`
412
+
413
+ ```diff
414
+ @@ -1,7 +1,25 @@
415
+ -/*
416
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
417
+ - * Use of this source code is governed by a MIT license that can be
418
+ - * found in the LICENSE file.
419
+ +/**
420
+ + * MIT License
421
+ + *
422
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
423
+ + *
424
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
425
+ + * of this software and associated documentation files (the "Software"), to deal
426
+ + * in the Software without restriction, including without limitation the rights
427
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
428
+ + * copies of the Software, and to permit persons to whom the Software is
429
+ + * furnished to do so, subject to the following conditions:
430
+ + *
431
+ + * The above copyright notice and this permission notice shall be included in all
432
+ + * copies or substantial portions of the Software.
433
+ + *
434
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
435
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
436
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
437
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
438
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
439
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
440
+ + * SOFTWARE.
441
+ */
442
+
443
+ import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts';
444
+
445
+ ```
446
+
447
+ ### `harmony/fs/src/main/ets/FsTurboModule.ts`
448
+
449
+ ```diff
450
+ @@ -1,7 +1,25 @@
451
+ -/*
452
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
453
+ - * Use of this source code is governed by a MIT license that can be
454
+ - * found in the LICENSE file.
455
+ +/**
456
+ + * MIT License
457
+ + *
458
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
459
+ + *
460
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
461
+ + * of this software and associated documentation files (the "Software"), to deal
462
+ + * in the Software without restriction, including without limitation the rights
463
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
464
+ + * copies of the Software, and to permit persons to whom the Software is
465
+ + * furnished to do so, subject to the following conditions:
466
+ + *
467
+ + * The above copyright notice and this permission notice shall be included in all
468
+ + * copies or substantial portions of the Software.
469
+ + *
470
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
471
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
472
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
473
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
474
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
475
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
476
+ + * SOFTWARE.
477
+ */
478
+
479
+ import { TurboModule, RNOHError, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
480
+ @@ -482,8 +500,9 @@ export class FsTurboModule extends TurboModule implements TM.ReactNativeFs.Spec
481
+ readFile(path: string): Promise<string> {
482
+ this.logger.info('readFile')
483
+ return new Promise((resolve, reject) => {
484
+ + let file: fs.File | null = null;
485
+ try {
486
+ - let file = fs.openSync(path);
487
+ + file = fs.openSync(path);
488
+ let bufSize = this.FOUR_ZERO_NINE_SIX;
489
+ let readSize = this.ZERO;
490
+ let buf = new ArrayBuffer(bufSize);
491
+ @@ -499,7 +518,6 @@ export class FsTurboModule extends TurboModule implements TM.ReactNativeFs.Spec
492
+ buffers.push(buffer.from(buf.slice(this.ZERO, readLen)))
493
+ readLen = fs.readSync(file.fd, buf, readOptions);
494
+ }
495
+ - fs.closeSync(file);
496
+ let finalBuf: ArrayBuffer = buffer.concat(buffers).buffer;
497
+ let base64Helper = new util.Base64Helper;
498
+ let result = base64Helper.encodeToStringSync(new Uint8Array(finalBuf));
499
+ @@ -507,6 +525,14 @@ export class FsTurboModule extends TurboModule implements TM.ReactNativeFs.Spec
500
+ } catch (e) {
501
+ this.logger.error(`readFile error: ${e?.message}`)
502
+ reject(e);
503
+ + } finally {
504
+ + if (file) {
505
+ + try {
506
+ + fs.closeSync(file);
507
+ + } catch (closeErr: any) {
508
+ + this.logger.error(`readFile close error: ${closeErr?.message}`);
509
+ + }
510
+ + }
511
+ }
512
+ })
513
+ };
514
+ @@ -682,19 +708,31 @@ export class FsTurboModule extends TurboModule implements TM.ReactNativeFs.Spec
515
+ // 文件内容部分读
516
+ read(path: string, length: number, position: number): Promise<string> {
517
+ return new Promise((resolve, reject) => {
518
+ - let readTextOption: ReadTextOptions = {
519
+ - offset: position,
520
+ - length: length,
521
+ - encoding: this.UTF_8
522
+ - };
523
+ - fs.readText(path, readTextOption, (err: BusinessError, str: string) => {
524
+ - if (err) {
525
+ - reject('readText failed with error message: ' + err.message + ', error code: ' + err.code);
526
+ - } else {
527
+ - let result = buffer.from(str, this.UTF8).toString(this.BASE64);
528
+ - resolve(result);
529
+ + let file: fs.File | null = null;
530
+ + try {
531
+ + file = fs.openSync(path);
532
+ + let buf = new ArrayBuffer(length);
533
+ + let readOptions: ReadOptions = {
534
+ + offset: position,
535
+ + length: length
536
+ + };
537
+ + let readLen = fs.readSync(file.fd, buf, readOptions);
538
+ + let actualBuf = buf.slice(0, readLen);
539
+ + let base64Helper = new util.Base64Helper();
540
+ + let result = base64Helper.encodeToStringSync(new Uint8Array(actualBuf));
541
+ + resolve(result);
542
+ + } catch (e) {
543
+ + this.logger.error(`read error: ${e?.message}`)
544
+ + reject(e);
545
+ + } finally {
546
+ + if (file) {
547
+ + try {
548
+ + fs.closeSync(file);
549
+ + } catch (closeErr: any) {
550
+ + this.logger.error(`read close error: ${closeErr?.message}`);
551
+ + }
552
+ }
553
+ - });
554
+ + }
555
+ })
556
+ }
557
+
558
+
559
+ ```
560
+
561
+ ### `harmony/fs/src/ohosTest/ets/test/Ability.test.ets`
562
+
563
+ ```diff
564
+ @@ -1,7 +1,25 @@
565
+ -/*
566
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
567
+ - * Use of this source code is governed by a MIT license that can be
568
+ - * found in the LICENSE file.
569
+ +/**
570
+ + * MIT License
571
+ + *
572
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
573
+ + *
574
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
575
+ + * of this software and associated documentation files (the "Software"), to deal
576
+ + * in the Software without restriction, including without limitation the rights
577
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
578
+ + * copies of the Software, and to permit persons to whom the Software is
579
+ + * furnished to do so, subject to the following conditions:
580
+ + *
581
+ + * The above copyright notice and this permission notice shall be included in all
582
+ + * copies or substantial portions of the Software.
583
+ + *
584
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
585
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
586
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
587
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
588
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
589
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
590
+ + * SOFTWARE.
591
+ */
592
+
593
+ import hilog from '@ohos.hilog';
594
+
595
+ ```
596
+
597
+ ### `harmony/fs/src/ohosTest/ets/test/List.test.ets`
598
+
599
+ ```diff
600
+ @@ -1,7 +1,25 @@
601
+ -/*
602
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
603
+ - * Use of this source code is governed by a MIT license that can be
604
+ - * found in the LICENSE file.
605
+ +/**
606
+ + * MIT License
607
+ + *
608
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
609
+ + *
610
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
611
+ + * of this software and associated documentation files (the "Software"), to deal
612
+ + * in the Software without restriction, including without limitation the rights
613
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
614
+ + * copies of the Software, and to permit persons to whom the Software is
615
+ + * furnished to do so, subject to the following conditions:
616
+ + *
617
+ + * The above copyright notice and this permission notice shall be included in all
618
+ + * copies or substantial portions of the Software.
619
+ + *
620
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
621
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
622
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
623
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
624
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
625
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
626
+ + * SOFTWARE.
627
+ */
628
+
629
+ import abilityTest from './Ability.test';
630
+
631
+ ```
632
+
633
+ ### `harmony/fs/src/ohosTest/ets/testability/TestAbility.ets`
634
+
635
+ ```diff
636
+ @@ -1,7 +1,25 @@
637
+ -/*
638
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
639
+ - * Use of this source code is governed by a MIT license that can be
640
+ - * found in the LICENSE file.
641
+ +/**
642
+ + * MIT License
643
+ + *
644
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
645
+ + *
646
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
647
+ + * of this software and associated documentation files (the "Software"), to deal
648
+ + * in the Software without restriction, including without limitation the rights
649
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
650
+ + * copies of the Software, and to permit persons to whom the Software is
651
+ + * furnished to do so, subject to the following conditions:
652
+ + *
653
+ + * The above copyright notice and this permission notice shall be included in all
654
+ + * copies or substantial portions of the Software.
655
+ + *
656
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
657
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
658
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
659
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
660
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
661
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
662
+ + * SOFTWARE.
663
+ */
664
+
665
+ import UIAbility from '@ohos.app.ability.UIAbility';
666
+
667
+ ```
668
+
669
+ ### `harmony/fs/src/ohosTest/ets/testability/pages/Index.ets`
670
+
671
+ ```diff
672
+ @@ -1,7 +1,25 @@
673
+ -/*
674
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
675
+ - * Use of this source code is governed by a MIT license that can be
676
+ - * found in the LICENSE file.
677
+ +/**
678
+ + * MIT License
679
+ + *
680
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
681
+ + *
682
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
683
+ + * of this software and associated documentation files (the "Software"), to deal
684
+ + * in the Software without restriction, including without limitation the rights
685
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
686
+ + * copies of the Software, and to permit persons to whom the Software is
687
+ + * furnished to do so, subject to the following conditions:
688
+ + *
689
+ + * The above copyright notice and this permission notice shall be included in all
690
+ + * copies or substantial portions of the Software.
691
+ + *
692
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
693
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
694
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
695
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
696
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
697
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
698
+ + * SOFTWARE.
699
+ */
700
+
701
+ @Entry
702
+
703
+ ```
704
+
705
+ ### `harmony/fs/src/ohosTest/ets/testrunner/OpenHarmonyTestRunner.ets`
706
+
707
+ ```diff
708
+ @@ -1,7 +1,25 @@
709
+ -/*
710
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
711
+ - * Use of this source code is governed by a MIT license that can be
712
+ - * found in the LICENSE file.
713
+ +/**
714
+ + * MIT License
715
+ + *
716
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
717
+ + *
718
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
719
+ + * of this software and associated documentation files (the "Software"), to deal
720
+ + * in the Software without restriction, including without limitation the rights
721
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
722
+ + * copies of the Software, and to permit persons to whom the Software is
723
+ + * furnished to do so, subject to the following conditions:
724
+ + *
725
+ + * The above copyright notice and this permission notice shall be included in all
726
+ + * copies or substantial portions of the Software.
727
+ + *
728
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
729
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
730
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
731
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
732
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
733
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
734
+ + * SOFTWARE.
735
+ */
736
+
737
+ import hilog from '@ohos.hilog';
738
+
739
+ ```
740
+
741
+ ### `harmony/fs/src/test/List.test.ets`
742
+
743
+ ```diff
744
+ @@ -1,7 +1,25 @@
745
+ -/*
746
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
747
+ - * Use of this source code is governed by a MIT license that can be
748
+ - * found in the LICENSE file.
749
+ +/**
750
+ + * MIT License
751
+ + *
752
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
753
+ + *
754
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
755
+ + * of this software and associated documentation files (the "Software"), to deal
756
+ + * in the Software without restriction, including without limitation the rights
757
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
758
+ + * copies of the Software, and to permit persons to whom the Software is
759
+ + * furnished to do so, subject to the following conditions:
760
+ + *
761
+ + * The above copyright notice and this permission notice shall be included in all
762
+ + * copies or substantial portions of the Software.
763
+ + *
764
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
765
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
766
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
767
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
768
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
769
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
770
+ + * SOFTWARE.
771
+ */
772
+
773
+ import localUnitTest from './LocalUnit.test';
774
+
775
+ ```
776
+
777
+ ### `harmony/fs/src/test/LocalUnit.test.ets`
778
+
779
+ ```diff
780
+ @@ -1,7 +1,25 @@
781
+ -/*
782
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
783
+ - * Use of this source code is governed by a MIT license that can be
784
+ - * found in the LICENSE file.
785
+ +/**
786
+ + * MIT License
787
+ + *
788
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
789
+ + *
790
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
791
+ + * of this software and associated documentation files (the "Software"), to deal
792
+ + * in the Software without restriction, including without limitation the rights
793
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
794
+ + * copies of the Software, and to permit persons to whom the Software is
795
+ + * furnished to do so, subject to the following conditions:
796
+ + *
797
+ + * The above copyright notice and this permission notice shall be included in all
798
+ + * copies or substantial portions of the Software.
799
+ + *
800
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
801
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
802
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
803
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
804
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
805
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
806
+ + * SOFTWARE.
807
+ */
808
+
809
+ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
810
+
811
+ ```
812
+
813
+ ### `harmony/fs/ts.ets`
814
+
815
+ ```diff
816
+ @@ -1,7 +1,25 @@
817
+ -/*
818
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
819
+ - * Use of this source code is governed by a MIT license that can be
820
+ - * found in the LICENSE file.
821
+ +/**
822
+ + * MIT License
823
+ + *
824
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
825
+ + *
826
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
827
+ + * of this software and associated documentation files (the "Software"), to deal
828
+ + * in the Software without restriction, including without limitation the rights
829
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
830
+ + * copies of the Software, and to permit persons to whom the Software is
831
+ + * furnished to do so, subject to the following conditions:
832
+ + *
833
+ + * The above copyright notice and this permission notice shall be included in all
834
+ + * copies or substantial portions of the Software.
835
+ + *
836
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
837
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
838
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
839
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
840
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
841
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
842
+ + * SOFTWARE.
843
+ */
844
+
845
+ export * from "./src/main/ets/FsPackage"
846
+
847
+ ```
848
+
849
+ ### `src/NativeReactNativeFs.ts`
850
+
851
+ ```diff
852
+ @@ -1,7 +1,25 @@
853
+ -/*
854
+ - * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
855
+ - * Use of this source code is governed by a MIT license that can be
856
+ - * found in the LICENSE file.
857
+ +/**
858
+ + * MIT License
859
+ + *
860
+ + * Copyright (C) 2024 Huawei Device Co., Ltd.
861
+ + *
862
+ + * Permission is hereby granted, free of charge, to any person obtaining a copy
863
+ + * of this software and associated documentation files (the "Software"), to deal
864
+ + * in the Software without restriction, including without limitation the rights
865
+ + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
866
+ + * copies of the Software, and to permit persons to whom the Software is
867
+ + * furnished to do so, subject to the following conditions:
868
+ + *
869
+ + * The above copyright notice and this permission notice shall be included in all
870
+ + * copies or substantial portions of the Software.
871
+ + *
872
+ + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
873
+ + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
874
+ + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
875
+ + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
876
+ + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
877
+ + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
878
+ + * SOFTWARE.
879
+ */
880
+
881
+ import type { TurboModule } from 'react-native';
882
+
883
+ ```