@ohos-ports/nx 19.8.4-beta.2 → 20.8.4-beta.1

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 (367) hide show
  1. package/.eslintrc.json +146 -0
  2. package/LICENSE +1 -1
  3. package/bin/init-local.js +0 -39
  4. package/bin/nx.js +28 -15
  5. package/bin/post-install.js +7 -5
  6. package/migrations.json +11 -37
  7. package/ohos-build/build-Cargo.toml.patch +12 -0
  8. package/ohos-build/build-cargo-config.patch +20 -0
  9. package/ohos-build/index.js.patch +18 -0
  10. package/ohos-build/native-bindings.js.patch +25 -0
  11. package/ohos-build/nix-0.25.1-ohos.patch +539 -0
  12. package/ohos-build/nix-0.27.1-ohos.patch +436 -0
  13. package/package.json +25 -62
  14. package/plugins/package-json.d.ts +5 -1
  15. package/plugins/package-json.js +27 -2
  16. package/release/changelog-renderer/index.d.ts +102 -0
  17. package/release/changelog-renderer/index.js +339 -0
  18. package/release/index.d.ts +4 -0
  19. package/release/index.js +13 -0
  20. package/schemas/nx-schema.json +964 -0
  21. package/schemas/project-schema.json +331 -0
  22. package/schemas/workspace-schema.json +185 -0
  23. package/src/adapter/angular-json.js +2 -8
  24. package/src/adapter/compat.d.ts +1 -1
  25. package/src/adapter/compat.js +3 -1
  26. package/src/adapter/ngcli-adapter.js +7 -7
  27. package/src/command-line/add/add.js +21 -48
  28. package/src/command-line/affected/affected.js +3 -3
  29. package/src/command-line/connect/view-logs.js +1 -1
  30. package/src/command-line/examples.js +0 -4
  31. package/src/command-line/exec/exec.js +3 -3
  32. package/src/command-line/format/command-object.js +9 -0
  33. package/src/command-line/format/format.js +10 -6
  34. package/src/command-line/generate/command-object.js +1 -2
  35. package/src/command-line/generate/generate.d.ts +1 -1
  36. package/src/command-line/generate/generate.js +3 -1
  37. package/src/command-line/generate/generator-utils.js +10 -5
  38. package/src/command-line/graph/graph.js +6 -9
  39. package/src/command-line/import/import.js +110 -71
  40. package/src/command-line/init/command-object.js +25 -9
  41. package/src/command-line/init/configure-plugins.d.ts +34 -0
  42. package/src/command-line/init/configure-plugins.js +203 -0
  43. package/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
  44. package/src/command-line/init/implementation/add-nx-to-turborepo.js +49 -0
  45. package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -1
  46. package/src/command-line/init/implementation/angular/legacy-angular-versions.js +4 -3
  47. package/src/command-line/init/implementation/angular/standalone-workspace.js +8 -5
  48. package/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -0
  49. package/src/command-line/init/implementation/check-compatible-with-plugins.js +134 -0
  50. package/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
  51. package/src/command-line/init/implementation/deduce-default-base.js +53 -0
  52. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +1 -1
  53. package/src/command-line/init/implementation/dot-nx/nxw.js +1 -1
  54. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +6 -4
  55. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -1
  56. package/src/command-line/init/implementation/react/index.d.ts +1 -1
  57. package/src/command-line/init/implementation/react/index.js +33 -186
  58. package/src/command-line/init/implementation/react/write-vite-config.js +19 -3
  59. package/src/command-line/init/implementation/utils.d.ts +6 -2
  60. package/src/command-line/init/implementation/utils.js +116 -37
  61. package/src/command-line/init/init-v1.js +2 -2
  62. package/src/command-line/init/init-v2.d.ts +2 -2
  63. package/src/command-line/init/init-v2.js +73 -55
  64. package/src/command-line/login/login.js +3 -0
  65. package/src/command-line/logout/logout.js +3 -0
  66. package/src/command-line/migrate/command-object.js +2 -96
  67. package/src/command-line/migrate/migrate.d.ts +1 -0
  68. package/src/command-line/migrate/migrate.js +111 -19
  69. package/src/command-line/nx-commands.js +20 -6
  70. package/src/command-line/register/command-object.d.ts +6 -0
  71. package/src/command-line/{activate-powerpack → register}/command-object.js +9 -9
  72. package/src/command-line/register/register.d.ts +2 -0
  73. package/src/command-line/register/register.js +9 -0
  74. package/src/command-line/release/changelog.d.ts +5 -4
  75. package/src/command-line/release/changelog.js +64 -79
  76. package/src/command-line/release/command-object.d.ts +7 -4
  77. package/src/command-line/release/command-object.js +24 -13
  78. package/src/command-line/release/config/config.d.ts +8 -7
  79. package/src/command-line/release/config/config.js +173 -43
  80. package/src/command-line/release/config/conventional-commits.js +7 -0
  81. package/src/command-line/release/config/filter-release-groups.d.ts +4 -0
  82. package/src/command-line/release/config/filter-release-groups.js +10 -3
  83. package/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
  84. package/src/command-line/release/config/use-legacy-versioning.js +9 -0
  85. package/src/command-line/release/config/version-plans.js +1 -1
  86. package/src/command-line/release/index.d.ts +9 -2
  87. package/src/command-line/release/index.js +6 -1
  88. package/src/command-line/release/plan-check.js +6 -3
  89. package/src/command-line/release/plan.js +8 -4
  90. package/src/command-line/release/publish.d.ts +6 -1
  91. package/src/command-line/release/publish.js +50 -27
  92. package/src/command-line/release/release.js +33 -20
  93. package/src/command-line/release/utils/batch-projects-by-generator-config.js +6 -3
  94. package/src/command-line/release/utils/exec-command.js +1 -1
  95. package/src/command-line/release/utils/git.d.ts +3 -2
  96. package/src/command-line/release/utils/git.js +104 -19
  97. package/src/command-line/release/utils/github.d.ts +1 -0
  98. package/src/command-line/release/utils/github.js +6 -2
  99. package/src/command-line/release/utils/launch-editor.js +2 -2
  100. package/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -2
  101. package/src/command-line/release/utils/resolve-changelog-renderer.js +3 -3
  102. package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
  103. package/src/command-line/release/utils/resolve-semver-specifier.js +2 -1
  104. package/src/command-line/release/utils/semver.d.ts +8 -0
  105. package/src/command-line/release/utils/semver.js +8 -0
  106. package/src/command-line/release/utils/shared-legacy.d.ts +25 -0
  107. package/src/command-line/release/utils/shared-legacy.js +2 -0
  108. package/src/command-line/release/utils/shared.d.ts +11 -17
  109. package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +7 -0
  110. package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +47 -0
  111. package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
  112. package/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
  113. package/src/command-line/release/version/project-logger.d.ts +8 -0
  114. package/src/command-line/release/version/project-logger.js +45 -0
  115. package/src/command-line/release/version/release-group-processor.d.ts +251 -0
  116. package/src/command-line/release/version/release-group-processor.js +1048 -0
  117. package/src/command-line/release/version/resolve-current-version.d.ts +32 -0
  118. package/src/command-line/release/version/resolve-current-version.js +241 -0
  119. package/src/command-line/release/version/test-utils.d.ts +95 -0
  120. package/src/command-line/release/version/test-utils.js +416 -0
  121. package/src/command-line/release/version/topological-sort.d.ts +9 -0
  122. package/src/command-line/release/version/topological-sort.js +41 -0
  123. package/src/command-line/release/version/version-actions.d.ts +170 -0
  124. package/src/command-line/release/version/version-actions.js +183 -0
  125. package/src/command-line/release/version-legacy.d.ts +46 -0
  126. package/src/command-line/release/version-legacy.js +453 -0
  127. package/src/command-line/release/version.d.ts +0 -40
  128. package/src/command-line/release/version.js +93 -255
  129. package/src/command-line/report/report.d.ts +7 -3
  130. package/src/command-line/report/report.js +52 -16
  131. package/src/command-line/run/executor-utils.js +4 -4
  132. package/src/command-line/run/run-one.js +37 -15
  133. package/src/command-line/run/run.js +1 -2
  134. package/src/command-line/run-many/run-many.js +1 -4
  135. package/src/command-line/show/project.js +25 -3
  136. package/src/command-line/show/projects.js +4 -0
  137. package/src/command-line/sync/sync.js +3 -3
  138. package/src/command-line/watch/watch.js +1 -1
  139. package/src/command-line/yargs-utils/shared-options.d.ts +4 -0
  140. package/src/command-line/yargs-utils/shared-options.js +26 -0
  141. package/src/config/misc-interfaces.d.ts +3 -15
  142. package/src/config/nx-json.d.ts +145 -19
  143. package/src/config/project-graph.d.ts +4 -4
  144. package/src/config/project-graph.js +8 -0
  145. package/src/config/schema-utils.d.ts +4 -3
  146. package/src/config/schema-utils.js +71 -4
  147. package/src/config/workspace-json-project-json.d.ts +23 -2
  148. package/src/core/graph/main.js +1 -1
  149. package/src/core/graph/runtime.js +1 -1
  150. package/src/core/graph/styles.css +2 -2
  151. package/src/core/graph/styles.js +1 -1
  152. package/src/daemon/client/client.d.ts +5 -0
  153. package/src/daemon/client/client.js +42 -4
  154. package/src/daemon/client/generate-help-output.js +1 -1
  155. package/src/daemon/message-types/glob.d.ts +7 -0
  156. package/src/daemon/message-types/glob.js +9 -1
  157. package/src/daemon/message-types/hash-glob.d.ts +6 -0
  158. package/src/daemon/message-types/hash-glob.js +9 -1
  159. package/src/daemon/message-types/run-tasks-execution-hooks.d.ts +13 -0
  160. package/src/daemon/message-types/run-tasks-execution-hooks.js +19 -0
  161. package/src/daemon/server/handle-glob.d.ts +1 -0
  162. package/src/daemon/server/handle-glob.js +8 -0
  163. package/src/daemon/server/handle-hash-glob.d.ts +1 -0
  164. package/src/daemon/server/handle-hash-glob.js +8 -0
  165. package/src/daemon/server/handle-hash-tasks.js +1 -1
  166. package/src/daemon/server/handle-tasks-execution-hooks.d.ts +19 -0
  167. package/src/daemon/server/handle-tasks-execution-hooks.js +35 -0
  168. package/src/daemon/server/logger.js +2 -1
  169. package/src/daemon/server/project-graph-incremental-recomputation.js +5 -5
  170. package/src/daemon/server/server.js +26 -2
  171. package/src/daemon/server/shutdown-utils.js +4 -2
  172. package/src/devkit-exports.d.ts +10 -7
  173. package/src/devkit-exports.js +4 -6
  174. package/src/devkit-internals.d.ts +4 -2
  175. package/src/devkit-internals.js +8 -3
  176. package/src/executors/run-commands/run-commands.impl.d.ts +1 -0
  177. package/src/executors/run-commands/run-commands.impl.js +11 -4
  178. package/src/executors/run-commands/schema.json +14 -0
  179. package/src/executors/run-script/run-script.impl.js +1 -1
  180. package/src/executors/utils/convert-nx-executor.js +2 -4
  181. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +8 -0
  182. package/src/generators/testing-utils/create-tree.js +5 -1
  183. package/src/generators/utils/nx-json.d.ts +1 -1
  184. package/src/generators/utils/project-configuration.js +15 -4
  185. package/src/hasher/create-task-hasher.js +1 -1
  186. package/src/hasher/file-hasher.d.ts +1 -0
  187. package/src/hasher/file-hasher.js +5 -0
  188. package/src/hasher/hash-task.js +1 -1
  189. package/src/hasher/task-hasher.d.ts +2 -6
  190. package/src/hasher/task-hasher.js +6 -32
  191. package/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
  192. package/src/migrations/update-20-0-0/move-use-daemon-process.js +25 -0
  193. package/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
  194. package/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
  195. package/src/native/index.d.ts +49 -20
  196. package/src/native/index.js +18 -3
  197. package/src/native/native-bindings.js +12 -2
  198. package/src/native/nx.openharmony-arm64.node +0 -0
  199. package/src/native/nx.wasi-browser.js +11 -8
  200. package/src/native/nx.wasi.cjs +11 -8
  201. package/src/native/nx.wasm32-wasi.wasm +0 -0
  202. package/src/native/tests/__fixtures__/file-lock.fixture.js +20 -0
  203. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -2
  204. package/src/nx-cloud/update-manager.js +13 -1
  205. package/src/plugins/js/index.js +2 -2
  206. package/src/plugins/js/lock-file/lock-file.js +28 -13
  207. package/src/plugins/js/lock-file/utils/package-json.d.ts +1 -1
  208. package/src/plugins/js/lock-file/utils/package-json.js +3 -1
  209. package/src/plugins/js/lock-file/yarn-parser.js +102 -44
  210. package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
  211. package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +2 -2
  212. package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +6 -20
  213. package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -1
  214. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +14 -2
  215. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +81 -19
  216. package/src/plugins/js/utils/config.js +2 -9
  217. package/src/plugins/js/utils/packages.d.ts +8 -0
  218. package/src/plugins/js/utils/packages.js +91 -0
  219. package/src/plugins/js/utils/register.d.ts +5 -1
  220. package/src/plugins/js/utils/register.js +2 -1
  221. package/src/plugins/js/utils/typescript.d.ts +1 -0
  222. package/src/plugins/js/utils/typescript.js +4 -3
  223. package/src/plugins/js/versions.d.ts +1 -1
  224. package/src/plugins/js/versions.js +1 -1
  225. package/src/plugins/package-json/create-nodes.d.ts +7 -8
  226. package/src/plugins/package-json/create-nodes.js +34 -12
  227. package/src/project-graph/affected/affected-project-graph.js +3 -0
  228. package/src/project-graph/affected/locators/project-glob-changes.js +16 -4
  229. package/src/project-graph/build-project-graph.d.ts +2 -1
  230. package/src/project-graph/build-project-graph.js +66 -43
  231. package/src/project-graph/error-types.d.ts +15 -12
  232. package/src/project-graph/error-types.js +109 -23
  233. package/src/project-graph/file-utils.d.ts +3 -3
  234. package/src/project-graph/file-utils.js +8 -7
  235. package/src/project-graph/nx-deps-cache.d.ts +6 -3
  236. package/src/project-graph/nx-deps-cache.js +66 -11
  237. package/src/project-graph/plugins/get-plugins.d.ts +4 -0
  238. package/src/project-graph/plugins/get-plugins.js +144 -0
  239. package/src/project-graph/plugins/in-process-loader.d.ts +10 -0
  240. package/src/project-graph/plugins/in-process-loader.js +60 -0
  241. package/src/project-graph/plugins/index.d.ts +2 -1
  242. package/src/project-graph/plugins/index.js +5 -3
  243. package/src/project-graph/plugins/isolation/enabled.d.ts +1 -0
  244. package/src/project-graph/plugins/isolation/enabled.js +19 -0
  245. package/src/project-graph/plugins/isolation/index.d.ts +2 -2
  246. package/src/project-graph/plugins/isolation/index.js +1 -7
  247. package/src/project-graph/plugins/isolation/messaging.d.ts +39 -21
  248. package/src/project-graph/plugins/isolation/messaging.js +5 -1
  249. package/src/project-graph/plugins/isolation/plugin-pool.d.ts +1 -1
  250. package/src/project-graph/plugins/isolation/plugin-pool.js +58 -49
  251. package/src/project-graph/plugins/isolation/plugin-worker.js +79 -29
  252. package/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
  253. package/src/project-graph/plugins/load-resolved-plugin.js +22 -0
  254. package/src/project-graph/plugins/loaded-nx-plugin.d.ts +20 -0
  255. package/src/project-graph/plugins/loaded-nx-plugin.js +80 -0
  256. package/src/project-graph/plugins/public-api.d.ts +32 -13
  257. package/src/project-graph/plugins/resolve-plugin.d.ts +15 -0
  258. package/src/project-graph/plugins/resolve-plugin.js +134 -0
  259. package/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -0
  260. package/src/project-graph/plugins/tasks-execution-hooks.js +65 -0
  261. package/src/project-graph/plugins/transpiler.d.ts +8 -0
  262. package/src/project-graph/plugins/transpiler.js +47 -0
  263. package/src/project-graph/plugins/utils.d.ts +2 -8
  264. package/src/project-graph/plugins/utils.js +2 -39
  265. package/src/project-graph/project-graph.d.ts +3 -1
  266. package/src/project-graph/project-graph.js +86 -20
  267. package/src/project-graph/utils/project-configuration-utils.d.ts +2 -2
  268. package/src/project-graph/utils/project-configuration-utils.js +55 -25
  269. package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -7
  270. package/src/project-graph/utils/retrieve-workspace-files.js +17 -23
  271. package/src/tasks-runner/batch/batch-messages.d.ts +2 -0
  272. package/src/tasks-runner/batch/run-batch.js +2 -4
  273. package/src/tasks-runner/cache.d.ts +22 -4
  274. package/src/tasks-runner/cache.js +160 -18
  275. package/src/tasks-runner/create-task-graph.d.ts +13 -1
  276. package/src/tasks-runner/create-task-graph.js +50 -22
  277. package/src/tasks-runner/default-tasks-runner.d.ts +1 -0
  278. package/src/tasks-runner/default-tasks-runner.js +20 -2
  279. package/src/tasks-runner/forked-process-task-runner.d.ts +4 -1
  280. package/src/tasks-runner/forked-process-task-runner.js +62 -40
  281. package/src/tasks-runner/init-tasks-runner.js +0 -2
  282. package/src/tasks-runner/life-cycle.d.ts +7 -0
  283. package/src/tasks-runner/run-command.d.ts +2 -4
  284. package/src/tasks-runner/run-command.js +51 -18
  285. package/src/tasks-runner/task-graph-utils.d.ts +11 -0
  286. package/src/tasks-runner/task-graph-utils.js +23 -0
  287. package/src/tasks-runner/task-orchestrator.js +14 -4
  288. package/src/tasks-runner/utils.js +2 -0
  289. package/src/utils/ab-testing.js +1 -1
  290. package/src/utils/assert-workspace-validity.js +4 -0
  291. package/src/utils/child-process.d.ts +4 -0
  292. package/src/utils/child-process.js +23 -30
  293. package/src/utils/command-line-utils.d.ts +5 -3
  294. package/src/utils/command-line-utils.js +37 -57
  295. package/src/utils/db-connection.d.ts +2 -1
  296. package/src/utils/db-connection.js +7 -0
  297. package/src/utils/default-base.js +1 -1
  298. package/src/utils/delayed-spinner.d.ts +42 -0
  299. package/src/utils/delayed-spinner.js +80 -0
  300. package/src/utils/find-matching-projects.js +13 -1
  301. package/src/utils/git-utils.index-filter.js +2 -2
  302. package/src/utils/git-utils.js +4 -4
  303. package/src/utils/git-utils.tree-filter.js +1 -1
  304. package/src/utils/handle-errors.js +24 -13
  305. package/src/utils/is-ci.js +4 -1
  306. package/src/utils/is-using-prettier.d.ts +3 -0
  307. package/src/utils/is-using-prettier.js +62 -0
  308. package/src/utils/nx-cloud-utils.js +3 -0
  309. package/src/utils/nx-key.d.ts +7 -0
  310. package/src/utils/nx-key.js +52 -0
  311. package/src/utils/package-json.d.ts +5 -1
  312. package/src/utils/package-json.js +9 -3
  313. package/src/utils/package-manager.d.ts +14 -0
  314. package/src/utils/package-manager.js +89 -3
  315. package/src/utils/path.js +1 -1
  316. package/src/utils/plugins/core-plugins.js +4 -0
  317. package/src/utils/plugins/plugin-capabilities.js +4 -5
  318. package/src/utils/print-help.js +3 -9
  319. package/src/utils/require-nx-key.d.ts +1 -0
  320. package/src/utils/require-nx-key.js +22 -0
  321. package/src/utils/sync-generators.js +9 -14
  322. package/src/utils/task-history.d.ts +1 -1
  323. package/src/utils/task-history.js +2 -2
  324. package/src/utils/workspace-context.d.ts +2 -0
  325. package/src/utils/workspace-context.js +16 -0
  326. package/tasks-runners/default.d.ts +1 -0
  327. package/tasks-runners/default.js +5 -0
  328. package/src/command-line/activate-powerpack/activate-powerpack.d.ts +0 -2
  329. package/src/command-line/activate-powerpack/activate-powerpack.js +0 -34
  330. package/src/command-line/activate-powerpack/command-object.d.ts +0 -6
  331. package/src/command-line/import/utils/needs-install.d.ts +0 -3
  332. package/src/command-line/import/utils/needs-install.js +0 -31
  333. package/src/command-line/init/implementation/react/write-craco-config.d.ts +0 -1
  334. package/src/command-line/init/implementation/react/write-craco-config.js +0 -61
  335. package/src/daemon/server/plugins.d.ts +0 -3
  336. package/src/daemon/server/plugins.js +0 -32
  337. package/src/hasher/node-task-hasher-impl.d.ts +0 -48
  338. package/src/hasher/node-task-hasher-impl.js +0 -449
  339. package/src/migrations/update-15-0-0/migrate-to-inputs.d.ts +0 -2
  340. package/src/migrations/update-15-0-0/migrate-to-inputs.js +0 -102
  341. package/src/migrations/update-15-0-0/prefix-outputs.d.ts +0 -2
  342. package/src/migrations/update-15-0-0/prefix-outputs.js +0 -49
  343. package/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +0 -2
  344. package/src/migrations/update-16-0-0/remove-nrwl-cli.js +0 -16
  345. package/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +0 -2
  346. package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +0 -97
  347. package/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +0 -2
  348. package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +0 -29
  349. package/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +0 -2
  350. package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +0 -45
  351. package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +0 -12
  352. package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +0 -67
  353. package/src/migrations/update-16-9-0/remove-project-name-and-root-format.d.ts +0 -2
  354. package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +0 -21
  355. package/src/native/nx.ohos-arm64.node +0 -0
  356. package/src/project-graph/plugins/internal-api.d.ts +0 -29
  357. package/src/project-graph/plugins/internal-api.js +0 -134
  358. package/src/project-graph/plugins/loader.d.ts +0 -24
  359. package/src/project-graph/plugins/loader.js +0 -220
  360. package/src/utils/app-root.d.ts +0 -8
  361. package/src/utils/app-root.js +0 -12
  362. package/src/utils/nx-plugin.deprecated.d.ts +0 -31
  363. package/src/utils/nx-plugin.deprecated.js +0 -20
  364. package/src/utils/powerpack.d.ts +0 -5
  365. package/src/utils/powerpack.js +0 -33
  366. package/src/utils/workspace-configuration-check.d.ts +0 -1
  367. package/src/utils/workspace-configuration-check.js +0 -36
@@ -0,0 +1,539 @@
1
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/fcntl.rs b/patched-crates/nix-0.25.1/src/fcntl.rs
2
+ --- a/patched-crates/nix-0.25.1/src/fcntl.rs 2006-07-24 09:21:28.000000000 +0800
3
+ +++ b/patched-crates/nix-0.25.1/src/fcntl.rs 2026-11-13 17:29:02.340100781 +0800
4
+ @@ -104,7 +104,7 @@
5
+ #[cfg(any(target_os = "dragonfly",
6
+ target_os = "freebsd",
7
+ target_os = "ios",
8
+ - all(target_os = "linux", not(target_env = "musl")),
9
+ + all(target_os = "linux", not(any(target_env = "musl", target_env = "ohos"))),
10
+ target_os = "macos",
11
+ target_os = "netbsd",
12
+ target_os = "openbsd",
13
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/lib.rs b/patched-crates/nix-0.25.1/src/lib.rs
14
+ --- a/patched-crates/nix-0.25.1/src/lib.rs 2006-07-24 09:21:28.000000000 +0800
15
+ +++ b/patched-crates/nix-0.25.1/src/lib.rs 2026-11-13 17:29:07.368103906 +0800
16
+ @@ -117,6 +117,10 @@
17
+ target_os = "linux",
18
+ target_os = "netbsd"
19
+ ))]
20
+ +// OpenHarmony libc does not provide POSIX mqueue (mq_open etc. absent
21
+ +// from the ohos sysroot libc.so; the rust libc crate gates them behind
22
+ +// `not(target_env = "ohos")`), so exclude the mqueue module there.
23
+ +#[cfg(not(target_env = "ohos"))]
24
+ feature! {
25
+ #![feature = "mqueue"]
26
+ pub mod mqueue;
27
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/ioctl/linux.rs b/patched-crates/nix-0.25.1/src/sys/ioctl/linux.rs
28
+ --- a/patched-crates/nix-0.25.1/src/sys/ioctl/linux.rs 2006-07-24 09:21:28.000000000 +0800
29
+ +++ b/patched-crates/nix-0.25.1/src/sys/ioctl/linux.rs 2026-11-13 17:29:02.368098750 +0800
30
+ @@ -1,8 +1,8 @@
31
+ /// The datatype used for the ioctl number
32
+ -#[cfg(any(target_os = "android", target_env = "musl"))]
33
+ +#[cfg(any(target_os = "android", any(target_env = "musl", target_env = "ohos")))]
34
+ #[doc(hidden)]
35
+ pub type ioctl_num_type = ::libc::c_int;
36
+ -#[cfg(not(any(target_os = "android", target_env = "musl")))]
37
+ +#[cfg(not(any(target_os = "android", any(target_env = "musl", target_env = "ohos"))))]
38
+ #[doc(hidden)]
39
+ pub type ioctl_num_type = ::libc::c_ulong;
40
+ /// The datatype used for the 3rd argument
41
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/mman.rs b/patched-crates/nix-0.25.1/src/sys/mman.rs
42
+ --- a/patched-crates/nix-0.25.1/src/sys/mman.rs 2006-07-24 09:21:28.000000000 +0800
43
+ +++ b/patched-crates/nix-0.25.1/src/sys/mman.rs 2026-11-13 17:29:02.356100781 +0800
44
+ @@ -59,7 +59,7 @@
45
+ /// Put the mapping into the first 2GB of the process address space.
46
+ #[cfg(any(all(any(target_os = "android", target_os = "linux"),
47
+ any(target_arch = "x86", target_arch = "x86_64")),
48
+ - all(target_os = "linux", target_env = "musl", any(target_arch = "x86", target_arch = "x86_64")),
49
+ + all(target_os = "linux", any(target_env = "musl", target_env = "ohos"), any(target_arch = "x86", target_arch = "x86_64")),
50
+ all(target_os = "freebsd", target_pointer_width = "64")))]
51
+ #[cfg_attr(docsrs, doc(cfg(all())))]
52
+ MAP_32BIT;
53
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/mod.rs b/patched-crates/nix-0.25.1/src/sys/mod.rs
54
+ --- a/patched-crates/nix-0.25.1/src/sys/mod.rs 2006-07-24 09:21:28.000000000 +0800
55
+ +++ b/patched-crates/nix-0.25.1/src/sys/mod.rs 2026-11-13 17:33:53.856102187 +0800
56
+ @@ -1,9 +1,12 @@
57
+ //! Mostly platform-specific functionality
58
+ +// OpenHarmony libc does not provide POSIX AIO (aio_read/aio_write etc. are
59
+ +// absent from the ohos sysroot libc.so; the rust libc crate gates them behind
60
+ +// `not(target_env = "ohos")`), so exclude the aio module there.
61
+ #[cfg(any(
62
+ target_os = "dragonfly",
63
+ target_os = "freebsd",
64
+ target_os = "ios",
65
+ - all(target_os = "linux", not(target_env = "uclibc")),
66
+ + all(target_os = "linux", not(any(target_env = "uclibc", target_env = "ohos"))),
67
+ target_os = "macos",
68
+ target_os = "netbsd"
69
+ ))]
70
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/personality.rs b/patched-crates/nix-0.25.1/src/sys/personality.rs
71
+ --- a/patched-crates/nix-0.25.1/src/sys/personality.rs 2006-07-24 09:21:28.000000000 +0800
72
+ +++ b/patched-crates/nix-0.25.1/src/sys/personality.rs 2026-11-13 17:29:02.388101406 +0800
73
+ @@ -20,7 +20,7 @@
74
+ /// [`mmap(2)`]: https://man7.org/linux/man-pages/man2/mmap.2.html
75
+ ADDR_LIMIT_3GB;
76
+ /// User-space function pointers to signal handlers point to descriptors.
77
+ - #[cfg(not(any(target_env = "musl", target_env = "uclibc")))]
78
+ + #[cfg(not(any(any(target_env = "musl", target_env = "ohos"), target_env = "uclibc")))]
79
+ #[cfg_attr(docsrs, doc(cfg(all())))]
80
+ FDPIC_FUNCPTRS;
81
+ /// Map page 0 as read-only.
82
+ @@ -42,7 +42,7 @@
83
+ /// version number.
84
+ ///
85
+ /// [`uname(2)`]: https://man7.org/linux/man-pages/man2/uname.2.html
86
+ - #[cfg(not(any(target_env = "musl", target_env = "uclibc")))]
87
+ + #[cfg(not(any(any(target_env = "musl", target_env = "ohos"), target_env = "uclibc")))]
88
+ #[cfg_attr(docsrs, doc(cfg(all())))]
89
+ UNAME26;
90
+ /// No effects.
91
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/ptrace/linux.rs b/patched-crates/nix-0.25.1/src/sys/ptrace/linux.rs
92
+ --- a/patched-crates/nix-0.25.1/src/sys/ptrace/linux.rs 2006-07-24 09:21:28.000000000 +0800
93
+ +++ b/patched-crates/nix-0.25.1/src/sys/ptrace/linux.rs 2026-11-13 17:29:02.384099218 +0800
94
+ @@ -13,7 +13,7 @@
95
+ #[cfg(all(
96
+ target_os = "linux",
97
+ any(all(target_arch = "x86_64",
98
+ - any(target_env = "gnu", target_env = "musl")),
99
+ + any(target_env = "gnu", any(target_env = "musl", target_env = "ohos"))),
100
+ all(target_arch = "x86", target_env = "gnu"))
101
+ ))]
102
+ use libc::user_regs_struct;
103
+ @@ -31,8 +31,8 @@
104
+ }
105
+
106
+ libc_enum!{
107
+ - #[cfg_attr(not(any(target_env = "musl", target_env = "uclibc", target_os = "android")), repr(u32))]
108
+ - #[cfg_attr(any(target_env = "musl", target_env = "uclibc", target_os = "android"), repr(i32))]
109
+ + #[cfg_attr(not(any(any(target_env = "musl", target_env = "ohos"), target_env = "uclibc", target_os = "android")), repr(u32))]
110
+ + #[cfg_attr(any(any(target_env = "musl", target_env = "ohos"), target_env = "uclibc", target_os = "android"), repr(i32))]
111
+ /// Ptrace Request enum defining the action to be taken.
112
+ #[non_exhaustive]
113
+ pub enum Request {
114
+ @@ -47,28 +47,28 @@
115
+ PTRACE_KILL,
116
+ PTRACE_SINGLESTEP,
117
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
118
+ - all(target_os = "linux", any(target_env = "musl",
119
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"),
120
+ target_arch = "mips",
121
+ target_arch = "mips64",
122
+ target_arch = "x86_64",
123
+ target_pointer_width = "32"))))]
124
+ PTRACE_GETREGS,
125
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
126
+ - all(target_os = "linux", any(target_env = "musl",
127
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"),
128
+ target_arch = "mips",
129
+ target_arch = "mips64",
130
+ target_arch = "x86_64",
131
+ target_pointer_width = "32"))))]
132
+ PTRACE_SETREGS,
133
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
134
+ - all(target_os = "linux", any(target_env = "musl",
135
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"),
136
+ target_arch = "mips",
137
+ target_arch = "mips64",
138
+ target_arch = "x86_64",
139
+ target_pointer_width = "32"))))]
140
+ PTRACE_GETFPREGS,
141
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
142
+ - all(target_os = "linux", any(target_env = "musl",
143
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"),
144
+ target_arch = "mips",
145
+ target_arch = "mips64",
146
+ target_arch = "x86_64",
147
+ @@ -76,13 +76,13 @@
148
+ PTRACE_SETFPREGS,
149
+ PTRACE_ATTACH,
150
+ PTRACE_DETACH,
151
+ - #[cfg(all(target_os = "linux", any(target_env = "musl",
152
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"),
153
+ target_arch = "mips",
154
+ target_arch = "mips64",
155
+ target_arch = "x86",
156
+ target_arch = "x86_64")))]
157
+ PTRACE_GETFPXREGS,
158
+ - #[cfg(all(target_os = "linux", any(target_env = "musl",
159
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"),
160
+ target_arch = "mips",
161
+ target_arch = "mips64",
162
+ target_arch = "x86",
163
+ @@ -193,7 +193,7 @@
164
+ #[cfg(all(
165
+ target_os = "linux",
166
+ any(all(target_arch = "x86_64",
167
+ - any(target_env = "gnu", target_env = "musl")),
168
+ + any(target_env = "gnu", any(target_env = "musl", target_env = "ohos"))),
169
+ all(target_arch = "x86", target_env = "gnu"))
170
+ ))]
171
+ pub fn getregs(pid: Pid) -> Result<user_regs_struct> {
172
+ @@ -204,7 +204,7 @@
173
+ #[cfg(all(
174
+ target_os = "linux",
175
+ any(all(target_arch = "x86_64",
176
+ - any(target_env = "gnu", target_env = "musl")),
177
+ + any(target_env = "gnu", any(target_env = "musl", target_env = "ohos"))),
178
+ all(target_arch = "x86", target_env = "gnu"))
179
+ ))]
180
+ pub fn setregs(pid: Pid, regs: user_regs_struct) -> Result<()> {
181
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/signal.rs b/patched-crates/nix-0.25.1/src/sys/signal.rs
182
+ --- a/patched-crates/nix-0.25.1/src/sys/signal.rs 2006-07-24 09:21:28.000000000 +0800
183
+ +++ b/patched-crates/nix-0.25.1/src/sys/signal.rs 2026-11-13 17:29:02.400099843 +0800
184
+ @@ -1068,7 +1068,7 @@
185
+ SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID,
186
+ #[cfg(all(target_os = "linux", target_env = "uclibc"))]
187
+ SigevNotify::SigevThreadId{..} => libc::SIGEV_THREAD_ID,
188
+ - #[cfg(any(all(target_os = "linux", target_env = "musl"), target_arch = "mips"))]
189
+ + #[cfg(any(all(target_os = "linux", any(target_env = "musl", target_env = "ohos")), target_arch = "mips"))]
190
+ SigevNotify::SigevThreadId{..} => 4 // No SIGEV_THREAD_ID defined
191
+ };
192
+ sev.sigev_signo = match sigev_notify {
193
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/socket/mod.rs b/patched-crates/nix-0.25.1/src/sys/socket/mod.rs
194
+ --- a/patched-crates/nix-0.25.1/src/sys/socket/mod.rs 2006-07-24 09:21:28.000000000 +0800
195
+ +++ b/patched-crates/nix-0.25.1/src/sys/socket/mod.rs 2026-11-13 17:29:02.436100937 +0800
196
+ @@ -1181,13 +1181,13 @@
197
+ /// The value of CMSG_LEN on this message.
198
+ /// Safe because CMSG_LEN is always safe
199
+ #[cfg(any(target_os = "android",
200
+ - all(target_os = "linux", not(target_env = "musl"))))]
201
+ + all(target_os = "linux", not(any(target_env = "musl", target_env = "ohos")))))]
202
+ fn cmsg_len(&self) -> usize {
203
+ unsafe{CMSG_LEN(self.len() as libc::c_uint) as usize}
204
+ }
205
+
206
+ #[cfg(not(any(target_os = "android",
207
+ - all(target_os = "linux", not(target_env = "musl")))))]
208
+ + all(target_os = "linux", not(any(target_env = "musl", target_env = "ohos"))))))]
209
+ fn cmsg_len(&self) -> libc::c_uint {
210
+ unsafe{CMSG_LEN(self.len() as libc::c_uint)}
211
+ }
212
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/statfs.rs b/patched-crates/nix-0.25.1/src/sys/statfs.rs
213
+ --- a/patched-crates/nix-0.25.1/src/sys/statfs.rs 2006-07-24 09:21:28.000000000 +0800
214
+ +++ b/patched-crates/nix-0.25.1/src/sys/statfs.rs 2026-11-13 17:29:02.408098750 +0800
215
+ @@ -29,11 +29,11 @@
216
+ type fs_type_t = libc::c_ulong;
217
+ #[cfg(all(target_os = "linux", target_arch = "s390x"))]
218
+ type fs_type_t = libc::c_uint;
219
+ -#[cfg(all(target_os = "linux", target_env = "musl"))]
220
+ +#[cfg(all(target_os = "linux", any(target_env = "musl", target_env = "ohos")))]
221
+ type fs_type_t = libc::c_ulong;
222
+ #[cfg(all(target_os = "linux", target_env = "uclibc"))]
223
+ type fs_type_t = libc::c_int;
224
+ -#[cfg(all(target_os = "linux", not(any(target_arch = "s390x", target_env = "musl", target_env = "uclibc"))))]
225
+ +#[cfg(all(target_os = "linux", not(any(target_arch = "s390x", any(target_env = "musl", target_env = "ohos"), target_env = "uclibc"))))]
226
+ type fs_type_t = libc::__fsword_t;
227
+
228
+ /// Describes the file system type as known by the operating system.
229
+ @@ -41,8 +41,8 @@
230
+ target_os = "freebsd",
231
+ target_os = "android",
232
+ all(target_os = "linux", target_arch = "s390x"),
233
+ - all(target_os = "linux", target_env = "musl"),
234
+ - all(target_os = "linux", not(any(target_arch = "s390x", target_env = "musl"))),
235
+ + all(target_os = "linux", any(target_env = "musl", target_env = "ohos")),
236
+ + all(target_os = "linux", not(any(target_arch = "s390x", any(target_env = "musl", target_env = "ohos")))),
237
+ ))]
238
+ #[derive(Eq, Copy, Clone, PartialEq, Debug)]
239
+ pub struct FsType(pub fs_type_t);
240
+ @@ -252,7 +252,7 @@
241
+ /// Optimal transfer block size
242
+ #[cfg(any(
243
+ target_os = "android",
244
+ - all(target_os = "linux", target_env = "musl")
245
+ + all(target_os = "linux", any(target_env = "musl", target_env = "ohos"))
246
+ ))]
247
+ #[cfg_attr(docsrs, doc(cfg(all())))]
248
+ pub fn optimal_transfer_size(&self) -> libc::c_ulong {
249
+ @@ -260,7 +260,7 @@
250
+ }
251
+
252
+ /// Optimal transfer block size
253
+ - #[cfg(all(target_os = "linux", not(any(target_arch = "s390x", target_env = "musl", target_env = "uclibc"))))]
254
+ + #[cfg(all(target_os = "linux", not(any(target_arch = "s390x", any(target_env = "musl", target_env = "ohos"), target_env = "uclibc"))))]
255
+ #[cfg_attr(docsrs, doc(cfg(all())))]
256
+ pub fn optimal_transfer_size(&self) -> libc::__fsword_t {
257
+ self.0.f_bsize
258
+ @@ -304,7 +304,7 @@
259
+
260
+ /// Size of a block
261
+ // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
262
+ - #[cfg(all(target_os = "linux", target_env = "musl"))]
263
+ + #[cfg(all(target_os = "linux", any(target_env = "musl", target_env = "ohos")))]
264
+ #[cfg_attr(docsrs, doc(cfg(all())))]
265
+ pub fn block_size(&self) -> libc::c_ulong {
266
+ self.0.f_bsize
267
+ @@ -320,7 +320,7 @@
268
+
269
+ /// Size of a block
270
+ // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
271
+ - #[cfg(all(target_os = "linux", not(any(target_arch = "s390x", target_env = "musl", target_env = "uclibc"))))]
272
+ + #[cfg(all(target_os = "linux", not(any(target_arch = "s390x", any(target_env = "musl", target_env = "ohos"), target_env = "uclibc"))))]
273
+ #[cfg_attr(docsrs, doc(cfg(all())))]
274
+ pub fn block_size(&self) -> libc::__fsword_t {
275
+ self.0.f_bsize
276
+ @@ -362,7 +362,7 @@
277
+ }
278
+
279
+ /// Maximum length of filenames
280
+ - #[cfg(all(target_os = "linux", target_env = "musl"))]
281
+ + #[cfg(all(target_os = "linux", any(target_env = "musl", target_env = "ohos")))]
282
+ #[cfg_attr(docsrs, doc(cfg(all())))]
283
+ pub fn maximum_name_length(&self) -> libc::c_ulong {
284
+ self.0.f_namelen
285
+ @@ -376,7 +376,7 @@
286
+ }
287
+
288
+ /// Maximum length of filenames
289
+ - #[cfg(all(target_os = "linux", not(any(target_arch = "s390x", target_env = "musl", target_env = "uclibc"))))]
290
+ + #[cfg(all(target_os = "linux", not(any(target_arch = "s390x", any(target_env = "musl", target_env = "ohos"), target_env = "uclibc"))))]
291
+ #[cfg_attr(docsrs, doc(cfg(all())))]
292
+ pub fn maximum_name_length(&self) -> libc::__fsword_t {
293
+ self.0.f_namelen
294
+ @@ -410,7 +410,7 @@
295
+ }
296
+
297
+ /// Total data blocks in filesystem
298
+ - #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
299
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
300
+ #[cfg_attr(docsrs, doc(cfg(all())))]
301
+ pub fn blocks(&self) -> u64 {
302
+ self.0.f_blocks
303
+ @@ -424,7 +424,7 @@
304
+ target_os = "freebsd",
305
+ target_os = "openbsd",
306
+ target_os = "dragonfly",
307
+ - all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
308
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
309
+ )))]
310
+ #[cfg_attr(docsrs, doc(cfg(all())))]
311
+ pub fn blocks(&self) -> libc::c_ulong {
312
+ @@ -452,7 +452,7 @@
313
+ }
314
+
315
+ /// Free blocks in filesystem
316
+ - #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
317
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
318
+ #[cfg_attr(docsrs, doc(cfg(all())))]
319
+ pub fn blocks_free(&self) -> u64 {
320
+ self.0.f_bfree
321
+ @@ -466,7 +466,7 @@
322
+ target_os = "freebsd",
323
+ target_os = "openbsd",
324
+ target_os = "dragonfly",
325
+ - all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
326
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
327
+ )))]
328
+ #[cfg_attr(docsrs, doc(cfg(all())))]
329
+ pub fn blocks_free(&self) -> libc::c_ulong {
330
+ @@ -495,7 +495,7 @@
331
+ }
332
+
333
+ /// Free blocks available to unprivileged user
334
+ - #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
335
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
336
+ #[cfg_attr(docsrs, doc(cfg(all())))]
337
+ pub fn blocks_available(&self) -> u64 {
338
+ self.0.f_bavail
339
+ @@ -509,7 +509,7 @@
340
+ target_os = "freebsd",
341
+ target_os = "openbsd",
342
+ target_os = "dragonfly",
343
+ - all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
344
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
345
+ )))]
346
+ #[cfg_attr(docsrs, doc(cfg(all())))]
347
+ pub fn blocks_available(&self) -> libc::c_ulong {
348
+ @@ -537,7 +537,7 @@
349
+ }
350
+
351
+ /// Total file nodes in filesystem
352
+ - #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
353
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
354
+ #[cfg_attr(docsrs, doc(cfg(all())))]
355
+ pub fn files(&self) -> libc::fsfilcnt_t {
356
+ self.0.f_files
357
+ @@ -551,7 +551,7 @@
358
+ target_os = "freebsd",
359
+ target_os = "openbsd",
360
+ target_os = "dragonfly",
361
+ - all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
362
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
363
+ )))]
364
+ #[cfg_attr(docsrs, doc(cfg(all())))]
365
+ pub fn files(&self) -> libc::c_ulong {
366
+ @@ -585,7 +585,7 @@
367
+ }
368
+
369
+ /// Free file nodes in filesystem
370
+ - #[cfg(all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
371
+ + #[cfg(all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32"))))]
372
+ #[cfg_attr(docsrs, doc(cfg(all())))]
373
+ pub fn files_free(&self) -> libc::fsfilcnt_t {
374
+ self.0.f_ffree
375
+ @@ -599,7 +599,7 @@
376
+ target_os = "freebsd",
377
+ target_os = "openbsd",
378
+ target_os = "dragonfly",
379
+ - all(target_os = "linux", any(target_env = "musl", target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
380
+ + all(target_os = "linux", any(any(target_env = "musl", target_env = "ohos"), target_arch = "riscv32", all(target_arch = "x86_64", target_pointer_width = "32")))
381
+ )))]
382
+ #[cfg_attr(docsrs, doc(cfg(all())))]
383
+ pub fn files_free(&self) -> libc::c_ulong {
384
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/statvfs.rs b/patched-crates/nix-0.25.1/src/sys/statvfs.rs
385
+ --- a/patched-crates/nix-0.25.1/src/sys/statvfs.rs 2006-07-24 09:21:28.000000000 +0800
386
+ +++ b/patched-crates/nix-0.25.1/src/sys/statvfs.rs 2026-11-13 17:29:02.408098750 +0800
387
+ @@ -58,7 +58,7 @@
388
+ #[cfg_attr(docsrs, doc(cfg(all())))]
389
+ ST_NODIRATIME;
390
+ /// Update access time relative to modify/change time
391
+ - #[cfg(any(target_os = "android", all(target_os = "linux", not(target_env = "musl"))))]
392
+ + #[cfg(any(target_os = "android", all(target_os = "linux", not(any(target_env = "musl", target_env = "ohos")))))]
393
+ #[cfg_attr(docsrs, doc(cfg(all())))]
394
+ ST_RELATIME;
395
+ }
396
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/sys/time.rs b/patched-crates/nix-0.25.1/src/sys/time.rs
397
+ --- a/patched-crates/nix-0.25.1/src/sys/time.rs 2006-07-24 09:21:28.000000000 +0800
398
+ +++ b/patched-crates/nix-0.25.1/src/sys/time.rs 2026-11-13 17:29:02.352099218 +0800
399
+ @@ -1,4 +1,4 @@
400
+ -#[cfg_attr(target_env = "musl", allow(deprecated))]
401
+ +#[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
402
+ // https://github.com/rust-lang/libc/issues/1848
403
+ pub use libc::{suseconds_t, time_t};
404
+ use libc::{timespec, timeval};
405
+ @@ -253,7 +253,7 @@
406
+
407
+ impl TimeValLike for TimeSpec {
408
+ #[inline]
409
+ - #[cfg_attr(target_env = "musl", allow(deprecated))]
410
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
411
+ // https://github.com/rust-lang/libc/issues/1848
412
+ fn seconds(seconds: i64) -> TimeSpec {
413
+ assert!(
414
+ @@ -288,7 +288,7 @@
415
+
416
+ /// Makes a new `TimeSpec` with given number of nanoseconds.
417
+ #[inline]
418
+ - #[cfg_attr(target_env = "musl", allow(deprecated))]
419
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
420
+ // https://github.com/rust-lang/libc/issues/1848
421
+ fn nanoseconds(nanoseconds: i64) -> TimeSpec {
422
+ let (secs, nanos) = div_mod_floor_64(nanoseconds, NANOS_PER_SEC);
423
+ @@ -331,7 +331,7 @@
424
+
425
+ impl TimeSpec {
426
+ /// Construct a new `TimeSpec` from its components
427
+ - #[cfg_attr(target_env = "musl", allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
428
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
429
+ pub const fn new(seconds: time_t, nanoseconds: timespec_tv_nsec_t) -> Self {
430
+ let mut ts = TIMESPEC_ZERO;
431
+ ts.tv_sec = seconds;
432
+ @@ -347,7 +347,7 @@
433
+ }
434
+ }
435
+
436
+ - #[cfg_attr(target_env = "musl", allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
437
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
438
+ pub const fn tv_sec(&self) -> time_t {
439
+ self.0.tv_sec
440
+ }
441
+ @@ -356,7 +356,7 @@
442
+ self.0.tv_nsec
443
+ }
444
+
445
+ - #[cfg_attr(target_env = "musl", allow(deprecated))]
446
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
447
+ // https://github.com/rust-lang/libc/issues/1848
448
+ pub const fn from_duration(duration: Duration) -> Self {
449
+ let mut ts = TIMESPEC_ZERO;
450
+ @@ -498,7 +498,7 @@
451
+ "TimeVal out of bounds; seconds={}",
452
+ seconds
453
+ );
454
+ - #[cfg_attr(target_env = "musl", allow(deprecated))]
455
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
456
+ // https://github.com/rust-lang/libc/issues/1848
457
+ TimeVal(timeval {
458
+ tv_sec: seconds as time_t,
459
+ @@ -523,7 +523,7 @@
460
+ (TV_MIN_SECONDS..=TV_MAX_SECONDS).contains(&secs),
461
+ "TimeVal out of bounds"
462
+ );
463
+ - #[cfg_attr(target_env = "musl", allow(deprecated))]
464
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
465
+ // https://github.com/rust-lang/libc/issues/1848
466
+ TimeVal(timeval {
467
+ tv_sec: secs as time_t,
468
+ @@ -541,7 +541,7 @@
469
+ (TV_MIN_SECONDS..=TV_MAX_SECONDS).contains(&secs),
470
+ "TimeVal out of bounds"
471
+ );
472
+ - #[cfg_attr(target_env = "musl", allow(deprecated))]
473
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))]
474
+ // https://github.com/rust-lang/libc/issues/1848
475
+ TimeVal(timeval {
476
+ tv_sec: secs as time_t,
477
+ @@ -578,7 +578,7 @@
478
+
479
+ impl TimeVal {
480
+ /// Construct a new `TimeVal` from its components
481
+ - #[cfg_attr(target_env = "musl", allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
482
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
483
+ pub const fn new(seconds: time_t, microseconds: suseconds_t) -> Self {
484
+ Self(timeval {
485
+ tv_sec: seconds,
486
+ @@ -594,7 +594,7 @@
487
+ }
488
+ }
489
+
490
+ - #[cfg_attr(target_env = "musl", allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
491
+ + #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // https://github.com/rust-lang/libc/issues/1848
492
+ pub const fn tv_sec(&self) -> time_t {
493
+ self.0.tv_sec
494
+ }
495
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/time.rs b/patched-crates/nix-0.25.1/src/time.rs
496
+ --- a/patched-crates/nix-0.25.1/src/time.rs 2006-07-24 09:21:28.000000000 +0800
497
+ +++ b/patched-crates/nix-0.25.1/src/time.rs 2026-11-13 17:29:02.460099062 +0800
498
+ @@ -154,7 +154,7 @@
499
+ #[cfg(any(
500
+ target_os = "emscripten",
501
+ target_os = "fuchsia",
502
+ - all(target_os = "linux", target_env = "musl")
503
+ + all(target_os = "linux", any(target_env = "musl", target_env = "ohos"))
504
+ ))]
505
+ #[cfg_attr(docsrs, doc(cfg(all())))]
506
+ pub const CLOCK_SGI_CYCLE: ClockId = ClockId(libc::CLOCK_SGI_CYCLE);
507
+ diff -ruN '--exclude=.cargo' '--exclude=Cargo.lock' a/patched-crates/nix-0.25.1/src/ucontext.rs b/patched-crates/nix-0.25.1/src/ucontext.rs
508
+ --- a/patched-crates/nix-0.25.1/src/ucontext.rs 2006-07-24 09:21:28.000000000 +0800
509
+ +++ b/patched-crates/nix-0.25.1/src/ucontext.rs 2026-11-13 17:29:02.460099062 +0800
510
+ @@ -1,8 +1,8 @@
511
+ -#[cfg(not(target_env = "musl"))]
512
+ +#[cfg(not(any(target_env = "musl", target_env = "ohos")))]
513
+ use crate::Result;
514
+ -#[cfg(not(target_env = "musl"))]
515
+ +#[cfg(not(any(target_env = "musl", target_env = "ohos")))]
516
+ use crate::errno::Errno;
517
+ -#[cfg(not(target_env = "musl"))]
518
+ +#[cfg(not(any(target_env = "musl", target_env = "ohos")))]
519
+ use std::mem;
520
+ use crate::sys::signal::SigSet;
521
+
522
+ @@ -12,7 +12,7 @@
523
+ }
524
+
525
+ impl UContext {
526
+ - #[cfg(not(target_env = "musl"))]
527
+ + #[cfg(not(any(target_env = "musl", target_env = "ohos")))]
528
+ pub fn get() -> Result<UContext> {
529
+ let mut context = mem::MaybeUninit::<libc::ucontext_t>::uninit();
530
+ let res = unsafe { libc::getcontext(context.as_mut_ptr()) };
531
+ @@ -21,7 +21,7 @@
532
+ })
533
+ }
534
+
535
+ - #[cfg(not(target_env = "musl"))]
536
+ + #[cfg(not(any(target_env = "musl", target_env = "ohos")))]
537
+ pub fn set(&self) -> Result<()> {
538
+ let res = unsafe {
539
+ libc::setcontext(&self.context as *const libc::ucontext_t)