@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.
- package/README.md +7 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/commands/build/buildHarmony.d.ts +21 -0
- package/dist/src/lib/commands/build/buildHarmony.js +69 -0
- package/dist/src/lib/commands/build/buildHarmony.js.map +1 -0
- package/dist/src/lib/commands/build/command.d.ts +3 -0
- package/dist/src/lib/commands/build/command.js +15 -0
- package/dist/src/lib/commands/build/command.js.map +1 -0
- package/dist/src/lib/commands/getValidProjectConfig.d.ts +10 -0
- package/dist/src/lib/commands/getValidProjectConfig.js +39 -0
- package/dist/src/lib/commands/getValidProjectConfig.js.map +1 -0
- package/dist/src/lib/commands/run/command.d.ts +3 -0
- package/dist/src/lib/commands/run/command.js +15 -0
- package/dist/src/lib/commands/run/command.js.map +1 -0
- package/dist/src/lib/commands/run/findOutputFile.d.ts +2 -0
- package/dist/src/lib/commands/run/findOutputFile.js +14 -0
- package/dist/src/lib/commands/run/findOutputFile.js.map +1 -0
- package/dist/src/lib/commands/run/hdc.d.ts +11 -0
- package/dist/src/lib/commands/run/hdc.js +35 -0
- package/dist/src/lib/commands/run/hdc.js.map +1 -0
- package/dist/src/lib/commands/run/listHarmonyDevices.d.ts +7 -0
- package/dist/src/lib/commands/run/listHarmonyDevices.js +17 -0
- package/dist/src/lib/commands/run/listHarmonyDevices.js.map +1 -0
- package/dist/src/lib/commands/run/runHarmony.d.ts +24 -0
- package/dist/src/lib/commands/run/runHarmony.js +148 -0
- package/dist/src/lib/commands/run/runHarmony.js.map +1 -0
- package/dist/src/lib/commands/run/tryInstallAppOnDevice.d.ts +3 -0
- package/dist/src/lib/commands/run/tryInstallAppOnDevice.js +42 -0
- package/dist/src/lib/commands/run/tryInstallAppOnDevice.js.map +1 -0
- package/dist/src/lib/commands/run/tryLaunchAppOnDevice.d.ts +7 -0
- package/dist/src/lib/commands/run/tryLaunchAppOnDevice.js +43 -0
- package/dist/src/lib/commands/run/tryLaunchAppOnDevice.js.map +1 -0
- package/dist/src/lib/commands/run/tryRunHdcReverse.d.ts +1 -0
- package/dist/src/lib/commands/run/tryRunHdcReverse.js +21 -0
- package/dist/src/lib/commands/run/tryRunHdcReverse.js.map +1 -0
- package/dist/src/lib/commands/runHvigor.d.ts +11 -0
- package/dist/src/lib/commands/runHvigor.js +56 -0
- package/dist/src/lib/commands/runHvigor.js.map +1 -0
- package/dist/src/lib/commands/toPascalCase.d.ts +1 -0
- package/dist/src/lib/commands/toPascalCase.js +4 -0
- package/dist/src/lib/commands/toPascalCase.js.map +1 -0
- package/dist/src/lib/paths.d.ts +2 -0
- package/dist/src/lib/paths.js +12 -0
- package/dist/src/lib/paths.js.map +1 -0
- package/dist/src/lib/platformHarmony.d.ts +5 -0
- package/dist/src/lib/platformHarmony.js +19 -0
- package/dist/src/lib/platformHarmony.js.map +1 -0
- package/package.json +42 -0
- package/react-native.config.ts +31 -0
- package/template/harmony/AppScope/app.json5 +10 -0
- package/template/harmony/AppScope/resources/base/element/string.json +8 -0
- package/template/harmony/AppScope/resources/base/media/app_icon.png +0 -0
- package/template/harmony/build-profile.json5 +36 -0
- package/template/harmony/codelinter.json +32 -0
- package/template/harmony/entry/build-profile.json5 +18 -0
- package/template/harmony/entry/hvigorfile.ts +13 -0
- package/template/harmony/entry/oh-package.json5 +8 -0
- package/template/harmony/entry/src/main/cpp/CMakeLists.txt +27 -0
- package/template/harmony/entry/src/main/cpp/PackageProvider.cpp +13 -0
- package/template/harmony/entry/src/main/ets/PackageProvider.ets +8 -0
- package/template/harmony/entry/src/main/ets/entryability/EntryAbility.ets +11 -0
- package/template/harmony/entry/src/main/ets/pages/Index.ets +42 -0
- package/template/harmony/entry/src/main/ets/workers/RNOHWorker.ets +16 -0
- package/template/harmony/entry/src/main/module.json5 +65 -0
- package/template/harmony/entry/src/main/resources/base/element/color.json +8 -0
- package/template/harmony/entry/src/main/resources/base/element/string.json +16 -0
- package/template/harmony/entry/src/main/resources/base/media/background.png +0 -0
- package/template/harmony/entry/src/main/resources/base/media/foreground.png +0 -0
- package/template/harmony/entry/src/main/resources/base/media/layered_image.json +7 -0
- package/template/harmony/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/template/harmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/template/harmony/entry/src/ohosTest/ets/test/List.test.ets +2 -0
- package/template/harmony/entry/src/ohosTest/module.json5 +13 -0
- package/template/harmony/gitignore +19 -0
- package/template/harmony/hvigor/hvigor-config.json5 +23 -0
- package/template/harmony/hvigorfile.ts +7 -0
- package/template/harmony/oh-package.json5 +17 -0
- package/template/metro.config.js +20 -0
- package/template/package.json +20 -0
- 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,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
|
+
};
|