@expo-harmony/template 55.0.0-harmony.2 → 55.0.0-harmony.4

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 CHANGED
@@ -23,4 +23,4 @@ npx expo-harmony prebuild
23
23
  **expo-harmony** © [Baoshuo](https://github.com/renbaoshuo), Released under the MIT License.<br>
24
24
  Authored and maintained by Baoshuo with help from [contributors](https://github.com/renbaoshuo/expo-harmony/contributors).
25
25
 
26
- > [Personal Website](https://baoshuo.ren) · [Blog](https://blog.baoshuo.ren) · GitHub [@renbaoshuo](https://github.com/renbaoshuo) · Twitter [@baoshuo](https://twitter.com/baoshuo)
26
+ > [Personal Website](https://baoshuo.ren) · [Blog](https://blog.baoshuo.ren) · GitHub [@renbaoshuo](https://github.com/renbaoshuo) · Twitter [@renbaoshuo](https://twitter.com/renbaoshuo)
@@ -22,9 +22,11 @@ if(NOT EXISTS "${EXPO_HARMONY_NATIVE_INPUTS_STAMP}")
22
22
  endif()
23
23
  include("${EXPO_HARMONY_NATIVE_INPUTS_STAMP}")
24
24
 
25
- if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED OHOS_SDK_NATIVE)
25
+ if((CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin"
26
+ OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
27
+ AND DEFINED OHOS_SDK_NATIVE)
26
28
  set(CMAKE_CXX_FLAGS
27
- "${CMAKE_CXX_FLAGS} -include ${OHOS_SDK_NATIVE}/sysroot/usr/include/assert.h")
29
+ "${CMAKE_CXX_FLAGS} -include \"${OHOS_SDK_NATIVE}/sysroot/usr/include/assert.h\"")
28
30
  endif()
29
31
 
30
32
  add_subdirectory("${RNOH_CPP_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/rnoh")
@@ -13,12 +13,6 @@
13
13
  "name": "ohos.permission.INTERNET"
14
14
  }
15
15
  ],
16
- "metadata": [
17
- {
18
- "name": "expo.harmony.userInterfaceStyle",
19
- "value": "light"
20
- }
21
- ],
22
16
  "abilities": [
23
17
  {
24
18
  "name": "EntryAbility",
@@ -20,21 +20,6 @@ const HermesMagic = 'c61fbc03c103191f';
20
20
  let restoreBundle: (() => void) | null = null;
21
21
 
22
22
  writeStamp(ProjectRoot, HarmonyRoot);
23
- hvigor.nodesEvaluated(async () => {
24
- await refreshExpoConstantsResource();
25
- });
26
-
27
- async function refreshExpoConstantsResource(): Promise<void> {
28
- let plugin: { refreshExpoConstantsResourceAsync?: (projectRoot: string, harmonyRoot: string) => Promise<string> };
29
- try {
30
- plugin = ProjectRequire('@expo-harmony/expo-constants/plugin/withConstants');
31
- } catch (error: unknown) {
32
- if (error && typeof error === 'object' && 'code' in error && error.code === 'MODULE_NOT_FOUND') return;
33
- throw error;
34
- }
35
-
36
- await plugin.refreshExpoConstantsResourceAsync?.(ProjectRoot, HarmonyRoot);
37
- }
38
23
 
39
24
  function findNodeModules(): string {
40
25
  let directory = ProjectRoot;
@@ -2,7 +2,7 @@ import crypto from 'node:crypto';
2
2
  import fs from 'node:fs';
3
3
  import path from 'node:path';
4
4
 
5
- import { fingerprintHarmonyNativeInputsSync } from '@expo-harmony/config-plugins/native-inputs';
5
+ import { fingerprintHarmonyNativeInputsSync } from '@expo-harmony/config-plugins/internal/native-inputs';
6
6
 
7
7
  const StampPath = '.hvigor/expo-harmony/native-inputs.cmake';
8
8
 
@@ -16,16 +16,16 @@ function readFileIfPresent(file: string): Buffer | null {
16
16
  }
17
17
  }
18
18
 
19
- export function writeStamp(projectRoot: string, harmonyRoot: string): void {
20
- const { artifactCount, fingerprint } = fingerprintHarmonyNativeInputsSync({
21
- lockfile: path.join(harmonyRoot, 'oh-package-lock.json5'),
22
- manifest: path.join(harmonyRoot, 'oh-package.json5'),
23
- projectRoot,
19
+ export function writeStamp(project: string, root: string): void {
20
+ const { artifactCount: count, fingerprint } = fingerprintHarmonyNativeInputsSync({
21
+ lockfile: path.join(root, 'oh-package-lock.json5'),
22
+ manifest: path.join(root, 'oh-package.json5'),
23
+ projectRoot: project,
24
24
  });
25
- const file = path.join(harmonyRoot, ...StampPath.split('/'));
25
+ const file = path.join(root, ...StampPath.split('/'));
26
26
  const content = [
27
27
  '# Generated by @expo-harmony/template. Do not edit.',
28
- `# Native HAR artifacts: ${artifactCount}`,
28
+ `# Native HAR artifacts: ${count}`,
29
29
  `add_compile_definitions(EXPO_HARMONY_NATIVE_INPUTS_SHA256_${fingerprint}=1)`,
30
30
  '',
31
31
  ].join('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo-harmony/template",
3
- "version": "55.0.0-harmony.2",
3
+ "version": "55.0.0-harmony.4",
4
4
  "keywords": [
5
5
  "react-native",
6
6
  "expo",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@babel/core": "7.29.7",
29
- "@expo-harmony/config-plugins": "55.0.10-harmony.2",
29
+ "@expo-harmony/config-plugins": "55.0.10-harmony.3",
30
30
  "@expo-harmony/expo-modules-core": "55.0.25-harmony.2",
31
31
  "@expo/metro-config": "55.0.26",
32
32
  "@expo/metro-runtime": "55.0.12",