@rock-js/platform-harmony 0.11.6

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 (82) hide show
  1. package/README.md +7 -0
  2. package/dist/src/index.d.ts +1 -0
  3. package/dist/src/index.js +2 -0
  4. package/dist/src/index.js.map +1 -0
  5. package/dist/src/lib/commands/build/buildHarmony.d.ts +21 -0
  6. package/dist/src/lib/commands/build/buildHarmony.js +69 -0
  7. package/dist/src/lib/commands/build/buildHarmony.js.map +1 -0
  8. package/dist/src/lib/commands/build/command.d.ts +3 -0
  9. package/dist/src/lib/commands/build/command.js +15 -0
  10. package/dist/src/lib/commands/build/command.js.map +1 -0
  11. package/dist/src/lib/commands/getValidProjectConfig.d.ts +10 -0
  12. package/dist/src/lib/commands/getValidProjectConfig.js +39 -0
  13. package/dist/src/lib/commands/getValidProjectConfig.js.map +1 -0
  14. package/dist/src/lib/commands/run/command.d.ts +3 -0
  15. package/dist/src/lib/commands/run/command.js +15 -0
  16. package/dist/src/lib/commands/run/command.js.map +1 -0
  17. package/dist/src/lib/commands/run/findOutputFile.d.ts +2 -0
  18. package/dist/src/lib/commands/run/findOutputFile.js +14 -0
  19. package/dist/src/lib/commands/run/findOutputFile.js.map +1 -0
  20. package/dist/src/lib/commands/run/hdc.d.ts +11 -0
  21. package/dist/src/lib/commands/run/hdc.js +35 -0
  22. package/dist/src/lib/commands/run/hdc.js.map +1 -0
  23. package/dist/src/lib/commands/run/listHarmonyDevices.d.ts +7 -0
  24. package/dist/src/lib/commands/run/listHarmonyDevices.js +17 -0
  25. package/dist/src/lib/commands/run/listHarmonyDevices.js.map +1 -0
  26. package/dist/src/lib/commands/run/runHarmony.d.ts +24 -0
  27. package/dist/src/lib/commands/run/runHarmony.js +148 -0
  28. package/dist/src/lib/commands/run/runHarmony.js.map +1 -0
  29. package/dist/src/lib/commands/run/tryInstallAppOnDevice.d.ts +3 -0
  30. package/dist/src/lib/commands/run/tryInstallAppOnDevice.js +42 -0
  31. package/dist/src/lib/commands/run/tryInstallAppOnDevice.js.map +1 -0
  32. package/dist/src/lib/commands/run/tryLaunchAppOnDevice.d.ts +7 -0
  33. package/dist/src/lib/commands/run/tryLaunchAppOnDevice.js +43 -0
  34. package/dist/src/lib/commands/run/tryLaunchAppOnDevice.js.map +1 -0
  35. package/dist/src/lib/commands/run/tryRunHdcReverse.d.ts +1 -0
  36. package/dist/src/lib/commands/run/tryRunHdcReverse.js +21 -0
  37. package/dist/src/lib/commands/run/tryRunHdcReverse.js.map +1 -0
  38. package/dist/src/lib/commands/runHvigor.d.ts +11 -0
  39. package/dist/src/lib/commands/runHvigor.js +56 -0
  40. package/dist/src/lib/commands/runHvigor.js.map +1 -0
  41. package/dist/src/lib/commands/toPascalCase.d.ts +1 -0
  42. package/dist/src/lib/commands/toPascalCase.js +4 -0
  43. package/dist/src/lib/commands/toPascalCase.js.map +1 -0
  44. package/dist/src/lib/paths.d.ts +2 -0
  45. package/dist/src/lib/paths.js +12 -0
  46. package/dist/src/lib/paths.js.map +1 -0
  47. package/dist/src/lib/platformHarmony.d.ts +5 -0
  48. package/dist/src/lib/platformHarmony.js +19 -0
  49. package/dist/src/lib/platformHarmony.js.map +1 -0
  50. package/package.json +42 -0
  51. package/react-native.config.ts +31 -0
  52. package/template/harmony/AppScope/app.json5 +10 -0
  53. package/template/harmony/AppScope/resources/base/element/string.json +8 -0
  54. package/template/harmony/AppScope/resources/base/media/app_icon.png +0 -0
  55. package/template/harmony/build-profile.json5 +36 -0
  56. package/template/harmony/codelinter.json +32 -0
  57. package/template/harmony/entry/build-profile.json5 +18 -0
  58. package/template/harmony/entry/hvigorfile.ts +13 -0
  59. package/template/harmony/entry/oh-package.json5 +8 -0
  60. package/template/harmony/entry/src/main/cpp/CMakeLists.txt +27 -0
  61. package/template/harmony/entry/src/main/cpp/PackageProvider.cpp +13 -0
  62. package/template/harmony/entry/src/main/ets/PackageProvider.ets +8 -0
  63. package/template/harmony/entry/src/main/ets/entryability/EntryAbility.ets +11 -0
  64. package/template/harmony/entry/src/main/ets/pages/Index.ets +42 -0
  65. package/template/harmony/entry/src/main/ets/workers/RNOHWorker.ets +16 -0
  66. package/template/harmony/entry/src/main/module.json5 +65 -0
  67. package/template/harmony/entry/src/main/resources/base/element/color.json +8 -0
  68. package/template/harmony/entry/src/main/resources/base/element/string.json +16 -0
  69. package/template/harmony/entry/src/main/resources/base/media/background.png +0 -0
  70. package/template/harmony/entry/src/main/resources/base/media/foreground.png +0 -0
  71. package/template/harmony/entry/src/main/resources/base/media/layered_image.json +7 -0
  72. package/template/harmony/entry/src/main/resources/base/media/startIcon.png +0 -0
  73. package/template/harmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
  74. package/template/harmony/entry/src/ohosTest/ets/test/List.test.ets +2 -0
  75. package/template/harmony/entry/src/ohosTest/module.json5 +13 -0
  76. package/template/harmony/gitignore +19 -0
  77. package/template/harmony/hvigor/hvigor-config.json5 +23 -0
  78. package/template/harmony/hvigorfile.ts +7 -0
  79. package/template/harmony/oh-package.json5 +17 -0
  80. package/template/metro.config.js +20 -0
  81. package/template/package.json +20 -0
  82. package/template/react-native.config.js +11 -0
@@ -0,0 +1,19 @@
1
+ local.properties
2
+ .idea
3
+ .hvigor
4
+ .cxx
5
+ .clangd
6
+ .clang-format
7
+ .clang-tidy
8
+ oh_modules
9
+ hvigorw
10
+ hvigorw.bat
11
+ hvigor/hvigor-wrapper.js
12
+ .preview
13
+ **/build
14
+ **/cpp/generated/
15
+ **/cpp/RNOHPackagesFactory.h
16
+ **/cpp/autolinking.cmake
17
+ **/ets/RNOHPackagesFactory.ets
18
+ **/ets/codegen
19
+ *.bundle
@@ -0,0 +1,23 @@
1
+ {
2
+ modelVersion: '5.0.0',
3
+ dependencies: {
4
+ /* @rnoh/hvigor-plugin is not available in npm */
5
+ "@rnoh/hvigor-plugin": "file:../../node_modules/@react-native-oh/react-native-harmony-cli/harmony/rnoh-hvigor-plugin-0.77.18.tgz"
6
+ },
7
+ execution: {
8
+ // "analyze": "default", /* Define the build analyze mode. Value: [ "default" | "verbose" | false ]. Default: "default" */
9
+ // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */
10
+ // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */
11
+ // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */
12
+ // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */
13
+ },
14
+ logging: {
15
+ // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */
16
+ },
17
+ debugging: {
18
+ // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */
19
+ },
20
+ nodeOptions: {
21
+ // "maxOldSpaceSize": 4096 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process */
22
+ },
23
+ }
@@ -0,0 +1,7 @@
1
+ import { appTasks } from '@ohos/hvigor-ohos-plugin';
2
+ import { createRNOHProjectPlugin } from '@rnoh/hvigor-plugin';
3
+
4
+ export default {
5
+ system: appTasks,
6
+ plugins: [createRNOHProjectPlugin()],
7
+ };
@@ -0,0 +1,17 @@
1
+ {
2
+ name: "helloworld",
3
+ description: "",
4
+ version: "1.0.0",
5
+ modelVersion: "5.0.0",
6
+ license: "ISC",
7
+ repository: {},
8
+ dependencies: {
9
+ "@rnoh/react-native-openharmony": "file:../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
10
+ },
11
+ devDependencies: {
12
+ "@ohos/hypium": "1.0.6",
13
+ },
14
+ overrides: {
15
+ "@rnoh/react-native-openharmony": "file:../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
16
+ },
17
+ }
@@ -0,0 +1,20 @@
1
+ const {
2
+ createHarmonyMetroConfig,
3
+ } = require('@react-native-oh/react-native-harmony/metro.config');
4
+ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
5
+
6
+ /**
7
+ * Metro configuration
8
+ * https://reactnative.dev/docs/metro
9
+ *
10
+ * @type {import('@react-native/metro-config').MetroConfig}
11
+ */
12
+ const config = {};
13
+
14
+ module.exports = mergeConfig(
15
+ getDefaultConfig(__dirname),
16
+ createHarmonyMetroConfig({
17
+ reactNativeHarmonyPackageName: '@react-native-oh/react-native-harmony',
18
+ }),
19
+ config,
20
+ );
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "rock-platform-harmony-template",
3
+ "scripts": {
4
+ "harmony": "rock run:harmony",
5
+ "bundle:harmony": "rock bundle --platform harmony --dev false --entry-file ./index.js --bundle-output ./harmony/entry/src/main/resources/rawfile/hermes_bundle --hermes && mv ./harmony/entry/src/main/resources/rawfile/hermes_bundle ./harmony/entry/src/main/resources/rawfile/hermes_bundle.hbc"
6
+ },
7
+ "dependencies": {
8
+ "react": "18.3.1",
9
+ "react-native": "^0.77.1"
10
+ },
11
+ "devDependencies": {
12
+ "@react-native-community/cli": "^15.0.1",
13
+ "@rock-js/platform-harmony": "^0.11.6",
14
+ "@react-native-oh/react-native-harmony": "0.77.18-1",
15
+ "@react-native-oh/react-native-harmony-cli": "0.77.18-1",
16
+ "@types/react": "^18.3.1",
17
+ "@types/react-test-renderer": "^18.3.1",
18
+ "react-test-renderer": "18.3.1"
19
+ }
20
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line no-undef
2
+ module.exports = {
3
+ commands: [
4
+ // eslint-disable-next-line @typescript-eslint/no-require-imports,no-undef
5
+ require('@react-native-oh/react-native-harmony-cli/dist/commands/link-harmony.js')
6
+ .commandLinkHarmony,
7
+ // eslint-disable-next-line @typescript-eslint/no-require-imports,no-undef
8
+ require('@react-native-oh/react-native-harmony-cli/dist/commands/codegen-harmony.js')
9
+ .commandCodegenHarmony,
10
+ ],
11
+ };