@expo-harmony/cli 55.0.26-harmony.7 → 55.0.26-harmony.9

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 (117) hide show
  1. package/README.md +74 -46
  2. package/build/bin/expo-harmony.js +1 -1
  3. package/build/buildHap/build.d.ts +3 -10
  4. package/build/buildHap/build.js +11 -69
  5. package/build/buildHap/index.d.ts +2 -0
  6. package/build/buildHap/index.js +19 -0
  7. package/build/cli.d.ts +3 -3
  8. package/build/cli.js +21 -187
  9. package/build/command.d.ts +9 -0
  10. package/build/command.js +20 -0
  11. package/build/doctor/doctor.d.ts +1 -1
  12. package/build/doctor/doctor.js +64 -56
  13. package/build/doctor/index.d.ts +2 -0
  14. package/build/doctor/index.js +16 -0
  15. package/build/exportEmbed/export.d.ts +2 -2
  16. package/build/exportEmbed/export.js +53 -49
  17. package/build/exportEmbed/index.d.ts +2 -0
  18. package/build/exportEmbed/index.js +19 -0
  19. package/build/file.d.ts +2 -1
  20. package/build/file.js +18 -8
  21. package/build/help.d.ts +1 -0
  22. package/build/help.js +36 -0
  23. package/build/index.d.ts +5 -3
  24. package/build/index.js +6 -5
  25. package/build/internal/prebuild.d.ts +3 -0
  26. package/build/internal/prebuild.js +9 -0
  27. package/build/log.d.ts +4 -0
  28. package/build/log.js +6 -0
  29. package/build/modules/index.d.ts +2 -0
  30. package/build/modules/index.js +16 -0
  31. package/build/native/bare.d.ts +4 -0
  32. package/build/native/bare.js +130 -0
  33. package/build/native/build.d.ts +15 -0
  34. package/build/native/build.js +67 -0
  35. package/build/{run → native}/cache.d.ts +2 -2
  36. package/build/{run → native}/cache.js +8 -8
  37. package/build/native/hvigor.d.ts +2 -0
  38. package/build/native/hvigor.js +77 -0
  39. package/build/native/install.d.ts +5 -0
  40. package/build/native/install.js +13 -0
  41. package/build/native/prepareProject.d.ts +11 -0
  42. package/build/native/prepareProject.js +68 -0
  43. package/build/native/project.d.ts +8 -0
  44. package/build/native/project.js +58 -0
  45. package/build/native/toolchain.d.ts +16 -0
  46. package/build/{tools.js → native/toolchain.js} +1 -57
  47. package/build/native/types.d.ts +47 -0
  48. package/build/native/types.js +2 -0
  49. package/build/prebuild/check.d.ts +7 -3
  50. package/build/prebuild/check.js +26 -20
  51. package/build/prebuild/clean.js +5 -5
  52. package/build/prebuild/index.d.ts +2 -0
  53. package/build/prebuild/index.js +51 -0
  54. package/build/prebuild/prebuild.js +11 -3
  55. package/build/prebuild/template.js +2 -2
  56. package/build/process.d.ts +11 -1
  57. package/build/process.js +16 -0
  58. package/build/profile.d.ts +1 -0
  59. package/build/profile.js +12 -0
  60. package/build/projectLock.js +7 -2
  61. package/build/run/devices.d.ts +1 -1
  62. package/build/run/devices.js +15 -10
  63. package/build/run/emulators.d.ts +1 -1
  64. package/build/run/emulators.js +2 -5
  65. package/build/run/index.d.ts +2 -0
  66. package/build/run/index.js +25 -0
  67. package/build/run/metro.js +1 -1
  68. package/build/run/run.d.ts +4 -10
  69. package/build/run/run.js +45 -90
  70. package/build/start/index.d.ts +2 -0
  71. package/build/start/index.js +33 -0
  72. package/package.json +14 -4
  73. package/src/bin/expo-harmony.ts +2 -2
  74. package/src/buildHap/build.ts +13 -105
  75. package/src/buildHap/index.ts +19 -0
  76. package/src/cli.ts +24 -227
  77. package/src/command.ts +24 -0
  78. package/src/doctor/doctor.ts +63 -61
  79. package/src/doctor/index.ts +16 -0
  80. package/src/exportEmbed/export.ts +64 -55
  81. package/src/exportEmbed/index.ts +17 -0
  82. package/src/file.ts +20 -11
  83. package/src/help.ts +33 -0
  84. package/src/index.ts +5 -3
  85. package/src/internal/prebuild.ts +3 -0
  86. package/src/log.ts +5 -0
  87. package/src/modules/index.ts +16 -0
  88. package/src/native/bare.ts +145 -0
  89. package/src/native/build.ts +81 -0
  90. package/src/{run → native}/cache.ts +10 -9
  91. package/src/native/hvigor.ts +81 -0
  92. package/src/native/install.ts +17 -0
  93. package/src/native/prepareProject.ts +99 -0
  94. package/src/native/project.ts +88 -0
  95. package/src/{tools.ts → native/toolchain.ts} +11 -118
  96. package/src/native/types.ts +44 -0
  97. package/src/prebuild/check.ts +30 -19
  98. package/src/prebuild/clean.ts +3 -3
  99. package/src/prebuild/index.ts +56 -0
  100. package/src/prebuild/prebuild.ts +11 -1
  101. package/src/prebuild/template.ts +2 -2
  102. package/src/process.ts +38 -1
  103. package/src/profile.ts +13 -0
  104. package/src/projectLock.ts +9 -1
  105. package/src/run/devices.ts +16 -11
  106. package/src/run/emulators.ts +4 -6
  107. package/src/run/index.ts +25 -0
  108. package/src/run/metro.ts +1 -1
  109. package/src/run/run.ts +56 -129
  110. package/src/start/index.ts +31 -0
  111. package/build/buildHap/common.d.ts +0 -24
  112. package/build/buildHap/common.js +0 -92
  113. package/build/run/install.d.ts +0 -7
  114. package/build/run/install.js +0 -26
  115. package/build/tools.d.ts +0 -39
  116. package/src/buildHap/common.ts +0 -145
  117. package/src/run/install.ts +0 -41
@@ -1,41 +0,0 @@
1
- import { HarmonyCliError } from '../errors';
2
- import type { HarmonyBuildPlan, HarmonyToolchain } from '../tools';
3
- import { formatDiagnostics, spawnAsync, type ProcessResult } from '../process';
4
-
5
- interface InstallOptions {
6
- timeoutMs?: number;
7
- }
8
-
9
- function installMessage(result: ProcessResult): string {
10
- const diagnostics = formatDiagnostics(result);
11
- return `OHPM install exited with code ${result.code}${result.timedOut ? ' after timing out' : ''}.`
12
- + `${diagnostics ? `\n${diagnostics}` : ''}`;
13
- }
14
-
15
- /** Runs OHPM against the generated project without rewriting its manifest. */
16
- async function installHarmonyDependenciesAsync(
17
- plan: HarmonyBuildPlan,
18
- toolchain: HarmonyToolchain,
19
- options: InstallOptions = {}
20
- ): Promise<void> {
21
- const result = await spawnAsync(
22
- toolchain.ohpm.command,
23
- [...toolchain.ohpm.args, 'install', '--all'],
24
- {
25
- capture: true,
26
- cwd: plan.harmonyRoot,
27
- operation: 'ohpm-install',
28
- outputLimit: 2 * 1024 * 1024,
29
- timeoutMs: options.timeoutMs || 5 * 60_000,
30
- }
31
- );
32
-
33
- if (result.code !== 0 || result.timedOut) {
34
- throw new HarmonyCliError('ERR_HARMONY_OHPM_FAILED', installMessage(result), {
35
- exitCode: result.code || 1,
36
- operation: 'ohpm-install',
37
- });
38
- }
39
- }
40
-
41
- export { installHarmonyDependenciesAsync };