@omega.js/desktop 0.52.0 → 0.54.0

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 (345) hide show
  1. package/README.md +53 -48
  2. package/dist/assets/css/core/_initialize.scss +1 -1
  3. package/dist/assets/js/core/app-shell.js +14 -15
  4. package/dist/assets/themes/_template/_theme.js +6 -6
  5. package/dist/assets/themes/base/_includes/global/sections/account.html +4 -4
  6. package/dist/assets/themes/base/_includes/global/sections/app-sidebar.html +5 -5
  7. package/dist/assets/themes/base/_layouts/frontend/pages/account/index.html +3 -3
  8. package/dist/assets/themes/base/_layouts/frontend/pages/alternatives/index.html +1 -1
  9. package/dist/assets/themes/base/_layouts/frontend/pages/blog/tags/tag.html +1 -1
  10. package/dist/assets/themes/base/_layouts/frontend/pages/payment/confirmation.html +1 -1
  11. package/dist/assets/themes/base/_sections/marketing/newsletter-cta/section.js +2 -3
  12. package/dist/assets/themes/base/_sections/verts/unit/section.html +1 -1
  13. package/dist/assets/themes/base/_sections/verts/unit/section.js +3 -4
  14. package/dist/assets/themes/base/_theme.js +4 -3
  15. package/dist/assets/themes/bootstrap/_theme.js +2 -2
  16. package/dist/assets/themes/bootstrap/overrides/_links.scss +1 -1
  17. package/dist/assets/themes/classy/_theme.js +8 -6
  18. package/dist/assets/themes/classy/css/marketing/_sections.scss +1 -2
  19. package/dist/assets/themes/classy/js/hero-demo-form.js +3 -2
  20. package/dist/assets/themes/neobrutalism/_theme.js +5 -5
  21. package/dist/assets/themes/neobrutalism/js/pages/test/libraries/layers/index.js +1 -1
  22. package/dist/assets/themes/newsflash/_theme.js +6 -6
  23. package/dist/assets/themes/newsflash/js/pages/test/libraries/layers/index.js +1 -1
  24. package/dist/build.js +87 -111
  25. package/dist/cli-run.js +4 -1
  26. package/dist/cli.js +3 -3
  27. package/dist/commands/build.js +2 -2
  28. package/dist/commands/cdp/capture.js +2 -2
  29. package/dist/commands/cdp/client.js +1 -1
  30. package/dist/commands/cdp/quit.js +2 -2
  31. package/dist/commands/cdp/relaunch.js +2 -2
  32. package/dist/commands/cdp/theme.js +1 -1
  33. package/dist/commands/cdp.js +1 -1
  34. package/dist/commands/clean.js +4 -5
  35. package/dist/commands/deploy.js +4 -4
  36. package/dist/commands/dev.js +25 -0
  37. package/dist/commands/finalize-release.js +4 -4
  38. package/dist/commands/launch.js +2 -2
  39. package/dist/commands/lib/deploy-precheck.js +3 -3
  40. package/dist/commands/lib/ensure-target.js +18 -23
  41. package/dist/commands/lib/migrate.js +17 -0
  42. package/dist/commands/logs.js +1 -1
  43. package/dist/commands/package.js +2 -2
  44. package/dist/commands/publish.js +2 -2
  45. package/dist/commands/release.js +4 -4
  46. package/dist/commands/runner.js +11 -11
  47. package/dist/commands/sign-windows.js +5 -5
  48. package/dist/commands/test.js +8 -8
  49. package/dist/commands/update.js +7 -6
  50. package/dist/commands/validate-certs.js +4 -4
  51. package/dist/commands/version.js +3 -3
  52. package/dist/defaults/.github/workflows/build.yml +18 -18
  53. package/dist/defaults/_.gitignore +0 -2
  54. package/dist/defaults/_mas/README.md +3 -3
  55. package/dist/defaults/config/certs/README.md +1 -1
  56. package/dist/defaults/config/omega.json5 +43 -43
  57. package/dist/defaults/docs/README.md +3 -3
  58. package/dist/defaults/gulpfile.js +1 -1
  59. package/dist/defaults/hooks/build/post.js +2 -2
  60. package/dist/defaults/hooks/build/pre.js +2 -2
  61. package/dist/defaults/hooks/deploy/pre.js +1 -1
  62. package/dist/defaults/hooks/notarize/post.js +2 -2
  63. package/dist/defaults/hooks/release/post.js +2 -2
  64. package/dist/defaults/hooks/release/pre.js +2 -2
  65. package/dist/defaults/src/assets/js/components/about/index.js +3 -5
  66. package/dist/defaults/src/assets/js/components/main/index.js +3 -5
  67. package/dist/defaults/src/assets/js/components/settings/index.js +3 -5
  68. package/dist/defaults/src/assets/scss/pages/about.scss +1 -1
  69. package/dist/defaults/src/assets/scss/pages/main.scss +1 -1
  70. package/dist/defaults/src/assets/scss/pages/settings.scss +1 -1
  71. package/dist/defaults/src/integrations/context-menu/index.js +13 -13
  72. package/dist/defaults/src/integrations/menu/index.js +8 -8
  73. package/dist/defaults/src/integrations/tray/index.js +12 -12
  74. package/dist/defaults/src/main.js +5 -7
  75. package/dist/defaults/src/preload.js +4 -6
  76. package/dist/defaults/test/README.md +5 -5
  77. package/dist/defaults/test/_init.js +1 -1
  78. package/dist/gulp/main.js +9 -10
  79. package/dist/gulp/tasks/audit.js +11 -14
  80. package/dist/gulp/tasks/build-config.js +8 -8
  81. package/dist/gulp/tasks/bundle.js +16 -16
  82. package/dist/gulp/tasks/defaults.js +3 -3
  83. package/dist/gulp/tasks/distribute.js +2 -2
  84. package/dist/gulp/tasks/html.js +9 -9
  85. package/dist/gulp/tasks/package-quick.js +3 -3
  86. package/dist/gulp/tasks/package.js +3 -3
  87. package/dist/gulp/tasks/release.js +3 -3
  88. package/dist/gulp/tasks/sass.js +6 -6
  89. package/dist/gulp/tasks/serve.js +4 -4
  90. package/dist/hooks/notarize-artifacts.js +1 -1
  91. package/dist/hooks/notarize.js +1 -1
  92. package/dist/index.js +5 -8
  93. package/dist/lib/_environment-mixin.js +50 -0
  94. package/dist/lib/_lifecycle-mixin.js +45 -0
  95. package/dist/lib/analytics.js +33 -35
  96. package/dist/lib/app-state.js +14 -14
  97. package/dist/lib/auth-flow.js +18 -18
  98. package/dist/lib/auth-persistence.js +12 -12
  99. package/dist/lib/auth.js +421 -0
  100. package/dist/lib/auto-updater.js +49 -49
  101. package/dist/lib/context-menu.js +13 -13
  102. package/dist/lib/context.js +19 -19
  103. package/dist/lib/deep-link.js +34 -34
  104. package/dist/lib/fontawesome.js +5 -5
  105. package/dist/lib/ipc.js +4 -4
  106. package/dist/lib/menu.js +25 -25
  107. package/dist/lib/protocol.js +5 -5
  108. package/dist/lib/remote-config.js +22 -22
  109. package/dist/lib/remote-scripts.js +21 -21
  110. package/dist/lib/restart-manager/index.js +29 -29
  111. package/dist/lib/restart-manager/install.js +1 -1
  112. package/dist/lib/restart-manager/protocol.js +1 -1
  113. package/dist/lib/sign-helpers/exec-with-limit.js +1 -1
  114. package/dist/lib/sign-helpers/sign-events.js +1 -1
  115. package/dist/lib/startup.js +18 -13
  116. package/dist/lib/storage.js +10 -10
  117. package/dist/lib/templating.js +16 -16
  118. package/dist/lib/theme.js +10 -10
  119. package/dist/lib/tray.js +27 -27
  120. package/dist/lib/usage.js +11 -11
  121. package/dist/lib/window-manager.js +26 -26
  122. package/dist/main.js +399 -483
  123. package/dist/preload.js +236 -176
  124. package/dist/renderer.js +417 -391
  125. package/dist/test/fixtures/consumer-app/config/omega.json5 +1 -1
  126. package/dist/test/fixtures/consumer-app/src/assets/js/components/main/index.js +8 -11
  127. package/dist/test/fixtures/consumer-app/src/main.js +5 -7
  128. package/dist/test/fixtures/consumer-app/src/preload.js +2 -2
  129. package/dist/test/harness/boot-entry.js +22 -20
  130. package/dist/test/harness/main-entry.js +31 -30
  131. package/dist/test/harness/renderer-entry.js +5 -5
  132. package/dist/test/harness/renderer-preload.js +137 -141
  133. package/dist/test/index.js +10 -10
  134. package/dist/test/runner.js +2 -2
  135. package/dist/test/runners/boot.js +7 -6
  136. package/dist/test/runners/electron.js +3 -2
  137. package/dist/test/runners/render-event.js +2 -2
  138. package/dist/test/suites/boot/consumer-app-boots.test.js +57 -26
  139. package/dist/test/suites/boot/restart-manager.test.js +2 -2
  140. package/dist/test/suites/boot/storage-bundled.test.js +5 -5
  141. package/dist/test/suites/boot/theme.test.js +13 -13
  142. package/dist/test/suites/build/audit.test.js +21 -8
  143. package/dist/test/suites/build/auth-persistence-resolve.test.js +6 -6
  144. package/dist/test/suites/build/boot-fixture.test.js +2 -2
  145. package/dist/test/suites/build/boot-runner-timeout.test.js +6 -5
  146. package/dist/test/suites/build/brand-scss.test.js +1 -1
  147. package/dist/test/suites/build/build-json-bake.test.js +1 -1
  148. package/dist/test/suites/build/build-workflow-jobs.test.js +2 -2
  149. package/dist/test/suites/build/cli.test.js +30 -2
  150. package/dist/test/suites/build/config-schema.test.js +5 -5
  151. package/dist/test/suites/build/defaults-em-dash.test.js +22 -0
  152. package/dist/test/suites/build/defaults-scaffold.test.js +21 -7
  153. package/dist/test/suites/build/deploy-direct.test.js +7 -5
  154. package/dist/test/suites/build/deploy-dispatch.test.js +2 -1
  155. package/dist/test/suites/build/deploy-hook.test.js +7 -5
  156. package/dist/test/suites/build/dev-verb.test.js +67 -0
  157. package/dist/test/suites/build/ensure-target.test.js +13 -5
  158. package/dist/test/suites/build/env-delivery.test.js +2 -2
  159. package/dist/test/suites/build/esm-only-dependency.test.js +2 -2
  160. package/dist/test/suites/build/exports.test.js +9 -8
  161. package/dist/test/suites/build/get-config.test.js +4 -4
  162. package/dist/test/suites/build/manifest-deps.test.js +1 -1
  163. package/dist/test/suites/build/merge-line-files.test.js +7 -7
  164. package/dist/test/suites/build/migrate.test.js +29 -0
  165. package/dist/test/suites/build/omega-shell.test.js +34 -2
  166. package/dist/test/suites/build/omega.test.js +350 -0
  167. package/dist/test/suites/build/project-scripts-deps.test.js +6 -10
  168. package/dist/test/suites/build/renderer-auth-bridge.test.js +211 -78
  169. package/dist/test/suites/build/runner-env-write.test.js +73 -0
  170. package/dist/test/suites/build/runner.test.js +11 -10
  171. package/dist/test/suites/build/sentry.test.js +2 -2
  172. package/dist/test/suites/build/setup-scripts.test.js +27 -0
  173. package/dist/test/suites/build/sign-windows-e2e.test.js +2 -2
  174. package/dist/test/suites/build/templating.test.js +3 -3
  175. package/dist/test/suites/build/test-stealth.test.js +7 -9
  176. package/dist/test/suites/build/url-helpers.test.js +55 -56
  177. package/dist/test/suites/build/validate-config.test.js +15 -4
  178. package/dist/test/suites/build/verb-logs.test.js +20 -0
  179. package/dist/test/suites/build/wave5-pins.test.js +2 -2
  180. package/dist/test/suites/main/analytics.test.js +59 -59
  181. package/dist/test/suites/main/app-state.test.js +66 -66
  182. package/dist/test/suites/main/auth-flow.test.js +41 -41
  183. package/dist/test/suites/main/auth-persistence.test.js +54 -43
  184. package/dist/test/suites/main/{client-bridge.integration.test.js → auth.integration.test.js} +10 -9
  185. package/dist/test/suites/main/auth.test.js +336 -0
  186. package/dist/test/suites/main/auto-updater.test.js +134 -134
  187. package/dist/test/suites/main/boot-sequence.test.js +37 -49
  188. package/dist/test/suites/main/context-menu.test.js +51 -50
  189. package/dist/test/suites/main/context.test.js +25 -25
  190. package/dist/test/suites/main/deep-link.test.js +74 -74
  191. package/dist/test/suites/main/fontawesome.test.js +27 -27
  192. package/dist/test/suites/main/ipc.test.js +35 -35
  193. package/dist/test/suites/main/menu.test.js +101 -100
  194. package/dist/test/suites/main/protocol.test.js +19 -19
  195. package/dist/test/suites/main/remote-config.test.js +63 -63
  196. package/dist/test/suites/main/remote-scripts.test.js +103 -103
  197. package/dist/test/suites/main/request.test.js +71 -0
  198. package/dist/test/suites/main/restart-manager.test.js +33 -33
  199. package/dist/test/suites/main/startup-paths-and-ua.test.js +4 -4
  200. package/dist/test/suites/main/startup.test.js +26 -26
  201. package/dist/test/suites/main/stealth-window.test.js +1 -1
  202. package/dist/test/suites/main/storage.test.js +25 -25
  203. package/dist/test/suites/main/theme.test.js +34 -34
  204. package/dist/test/suites/main/tray.test.js +79 -79
  205. package/dist/test/suites/main/url-helpers.test.js +133 -133
  206. package/dist/test/suites/main/usage.test.js +25 -25
  207. package/dist/test/suites/main/window-bounds.test.js +27 -27
  208. package/dist/test/suites/main/window-manager.test.js +44 -44
  209. package/dist/test/suites/renderer/analytics-bridge.test.js +5 -5
  210. package/dist/test/suites/renderer/cross-context-helpers.test.js +37 -31
  211. package/dist/test/suites/renderer/round-trip.test.js +3 -3
  212. package/dist/test/suites/renderer/tooltips.test.js +15 -15
  213. package/dist/test/suites/renderer/{window-em-surface.test.js → window-desktop-surface.test.js} +28 -8
  214. package/dist/test/utils/extended-mode-warning.js +1 -1
  215. package/dist/utils/boot-harness.js +56 -0
  216. package/dist/utils/build-pipeline.js +4 -4
  217. package/dist/utils/mode-helpers.js +2 -15
  218. package/dist/utils/runner-env.js +13 -28
  219. package/dist/utils/ship-keys.js +3 -3
  220. package/dist/utils/signing-status.js +51 -0
  221. package/dist/utils/test-events.js +7 -0
  222. package/dist/utils/test-stealth.js +6 -6
  223. package/dist/utils/url-helpers.js +52 -42
  224. package/dist/utils/user-agent.js +44 -0
  225. package/dist/vendor/account/engine.js +3 -3
  226. package/dist/vendor/account/index.js +14 -45
  227. package/dist/vendor/account/resolve-account.js +44 -0
  228. package/dist/vendor/account/schema.js +1 -1
  229. package/dist/vendor/account/user.js +99 -0
  230. package/dist/vendor/config/client-config.js +1 -1
  231. package/dist/vendor/config/company.js +46 -14
  232. package/dist/vendor/config/defaults.js +30 -7
  233. package/dist/vendor/config/edit.js +25 -3
  234. package/dist/vendor/config/env-delivery.js +1 -1
  235. package/dist/vendor/config/env-schema.js +3 -6
  236. package/dist/vendor/config/env.js +34 -22
  237. package/dist/vendor/config/environment.js +11 -30
  238. package/dist/vendor/config/index.js +21 -28
  239. package/dist/vendor/config/load.js +16 -9
  240. package/dist/vendor/config/platforms.js +1 -1
  241. package/dist/vendor/config/repo.js +10 -27
  242. package/dist/vendor/config/schema-client.js +64 -0
  243. package/dist/vendor/config/schema-cloud.js +38 -0
  244. package/dist/vendor/config/schema-manager.js +118 -0
  245. package/dist/vendor/config/schema-overrides.js +68 -0
  246. package/dist/vendor/config/schema.js +104 -160
  247. package/dist/vendor/config/site-global.js +2 -3
  248. package/dist/vendor/config/validate.js +97 -78
  249. package/dist/vendor/config/winback.js +1 -1
  250. package/dist/vendor/devkit/actions-secrets.js +1 -1
  251. package/dist/vendor/devkit/agents-md.js +233 -0
  252. package/dist/vendor/devkit/attach-log-file.js +16 -2
  253. package/dist/vendor/devkit/build-json.js +1 -1
  254. package/dist/vendor/devkit/ci-workflows.js +30 -30
  255. package/dist/vendor/devkit/cli-router.js +16 -11
  256. package/dist/vendor/devkit/defaults-engine.js +15 -51
  257. package/dist/vendor/devkit/deploy-snapshot.js +44 -9
  258. package/dist/vendor/devkit/env-lines.js +183 -0
  259. package/dist/vendor/devkit/local.js +64 -10
  260. package/dist/vendor/devkit/lockfile.js +32 -13
  261. package/dist/vendor/devkit/logger.js +7 -2
  262. package/dist/vendor/devkit/merge-line-files.js +219 -177
  263. package/dist/vendor/devkit/omega-bin.js +208 -111
  264. package/dist/vendor/devkit/preludes/docs-sync.js +52 -0
  265. package/dist/vendor/devkit/preludes/index.js +1 -0
  266. package/dist/vendor/devkit/target-picker.js +45 -0
  267. package/dist/vendor/devkit/test/dashed-files.js +37 -0
  268. package/dist/vendor/devkit/test/run-verb-under-tee.js +71 -0
  269. package/dist/vendor/devkit/test/runner-core.js +6 -6
  270. package/dist/vendor/devkit/update.js +15 -15
  271. package/dist/vendor/devkit/verb-scripts.js +40 -0
  272. package/dist/vendor/devkit/verbs.js +170 -0
  273. package/dist/vendor/monitoring/env.js +2 -2
  274. package/dist/vendor/monitoring/index.js +1 -1
  275. package/dist/vendor/monitoring/main.js +1 -1
  276. package/dist/vendor/monitoring/preload.js +1 -1
  277. package/dist/vendor/monitoring/renderer.js +1 -1
  278. package/package.json +19 -26
  279. package/dist/commands/install.js +0 -37
  280. package/dist/defaults/AGENTS.md +0 -110
  281. package/dist/defaults/CLAUDE.md +0 -1
  282. package/dist/lib/client-bridge.js +0 -374
  283. package/dist/lib/logger.js +0 -4
  284. package/dist/test/suites/build/manager.test.js +0 -213
  285. package/dist/test/suites/main/client-bridge.test.js +0 -262
  286. package/dist/vendor/config/env-retired.js +0 -137
  287. package/dist/vendor/config/retired-keys.js +0 -635
  288. package/docs/analytics.md +0 -140
  289. package/docs/app-state.md +0 -92
  290. package/docs/audit.md +0 -69
  291. package/docs/auto-updater.md +0 -243
  292. package/docs/boot-sequence.md +0 -39
  293. package/docs/build-system.md +0 -169
  294. package/docs/cdp-debugging.md +0 -169
  295. package/docs/client-bridge.md +0 -269
  296. package/docs/common-mistakes.md +0 -21
  297. package/docs/config-schema.md +0 -120
  298. package/docs/context-menu.md +0 -112
  299. package/docs/context.md +0 -81
  300. package/docs/css.md +0 -90
  301. package/docs/deep-link.md +0 -186
  302. package/docs/environment-detection.md +0 -112
  303. package/docs/fontawesome.md +0 -107
  304. package/docs/hooks.md +0 -89
  305. package/docs/icons.md +0 -79
  306. package/docs/index.md +0 -317
  307. package/docs/installer-options.md +0 -165
  308. package/docs/ipc.md +0 -61
  309. package/docs/lib-modules.md +0 -53
  310. package/docs/logging.md +0 -229
  311. package/docs/menu.md +0 -160
  312. package/docs/releasing.md +0 -239
  313. package/docs/remote-config.md +0 -118
  314. package/docs/remote-scripts.md +0 -144
  315. package/docs/restart-manager.md +0 -144
  316. package/docs/runner.md +0 -290
  317. package/docs/sentry.md +0 -97
  318. package/docs/shared/agent-docs.md +0 -89
  319. package/docs/shared/analytics.md +0 -612
  320. package/docs/shared/brands.md +0 -57
  321. package/docs/shared/breaking-changes.md +0 -851
  322. package/docs/shared/config.md +0 -1952
  323. package/docs/shared/deploys.md +0 -341
  324. package/docs/shared/icons.md +0 -219
  325. package/docs/shared/local-dev.md +0 -167
  326. package/docs/shared/logging.md +0 -205
  327. package/docs/shared/monitoring.md +0 -167
  328. package/docs/shared/publishing.md +0 -187
  329. package/docs/shared/rulings.md +0 -34
  330. package/docs/shared/testing.md +0 -147
  331. package/docs/shared/theming.md +0 -629
  332. package/docs/shared/translation.md +0 -333
  333. package/docs/shared/updates.md +0 -61
  334. package/docs/signing.md +0 -293
  335. package/docs/startup.md +0 -142
  336. package/docs/storage.md +0 -59
  337. package/docs/templating.md +0 -101
  338. package/docs/test-boot-layer.md +0 -157
  339. package/docs/test-framework.md +0 -362
  340. package/docs/themes.md +0 -149
  341. package/docs/tooltips.md +0 -99
  342. package/docs/tray.md +0 -164
  343. package/docs/usage.md +0 -58
  344. package/docs/verts.md +0 -62
  345. package/docs/windows.md +0 -149
@@ -4,7 +4,7 @@ Drop your project test suites here. The framework auto-runs them alongside its o
4
4
 
5
5
  ## Layers
6
6
 
7
- Match the framework's four layers — OMEGA Desktop's test runner discovers files by the directory they sit in:
7
+ Match the framework's four layers. OMEGA Desktop's test runner discovers files by the directory they sit in:
8
8
 
9
9
  | Directory | Runtime | Use for |
10
10
  |---|---|---|
@@ -17,19 +17,19 @@ A renderer suite that declares `view: '<name>'` runs against that view of YOUR a
17
17
 
18
18
  ## Coverage
19
19
 
20
- Every feature ships with tests at every layer it has a surface in — logic (`build`/`main`), UI (`renderer`), end-to-end (`boot`). Skip a layer only when the feature genuinely has no surface there; "the logic test covers it" does not excuse the UI test.
20
+ Every feature ships with tests at every layer it has a surface in: logic (`build`/`main`), UI (`renderer`), end-to-end (`boot`). Skip a layer only when the feature genuinely has no surface there; "the logic test covers it" does not excuse the UI test.
21
21
 
22
22
  ## Quick example
23
23
 
24
24
  ```js
25
25
  // test/build/my-feature.test.js
26
- const Manager = require('@omega.js/desktop/build');
26
+ const build = require('@omega.js/desktop/build');
27
27
 
28
28
  module.exports = {
29
29
  layer: 'build',
30
30
  description: 'the project config carries a brand id',
31
31
  run: (ctx) => {
32
- ctx.expect(Manager.getConfig().brand.id).toBeTruthy();
32
+ ctx.expect(build.getConfig().brand.id).toBeTruthy();
33
33
  },
34
34
  };
35
35
  ```
@@ -38,4 +38,4 @@ That is the standalone form: one test per file. Every `run` receives `ctx`, whos
38
38
 
39
39
  ## See also
40
40
 
41
- `node_modules/@omega.js/desktop/docs/test-framework.md` — full reference for the test framework (layers, assert API, fixtures, runner internals).
41
+ `node_modules/@omega.js/manager/docs/desktop/test-framework.md`: full reference for the test framework (layers, assert API, fixtures, runner internals).
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Test lifecycle hook for this project. Runs once before any suite (not a test itself).
3
- * See @omega.js/desktop/docs/test-framework.md → "test/_init.js".
3
+ * See @omega.js/manager/docs/desktop/test-framework.md → "test/_init.js".
4
4
  */
5
5
 
6
6
  module.exports = ({ projectRoot }) => ({
package/dist/gulp/main.js CHANGED
@@ -3,17 +3,17 @@
3
3
  delete process.env.ELECTRON_RUN_AS_NODE;
4
4
 
5
5
  // Libraries
6
- const Manager = new (require('../build.js'));
7
- const logger = Manager.logger('main');
8
- const argv = Manager.getArguments();
6
+ const build = require('../build.js');
7
+ const logger = build.logger('main');
8
+ const argv = build.getArguments();
9
9
  const { series, parallel } = require('gulp');
10
10
  const path = require('path');
11
11
  const glob = require('glob').globSync;
12
12
 
13
13
  // Load packages
14
- const package = Manager.getPackage('main');
15
- const project = Manager.getPackage('project');
16
- const projectRoot = Manager.getRootPath('project');
14
+ const package = build.getPackage('main');
15
+ const project = build.getPackage('project');
16
+ const projectRoot = build.getRootPath('project');
17
17
 
18
18
  // Resolve the .env cascade from the project root (shell > app > brand > company)
19
19
  // and derive the signing paths the brand's signing tree implies. gulp is its own
@@ -40,7 +40,7 @@ if (sanitizedSigningKeys.length) {
40
40
  const attachLogFile = require('../utils/attach-log-file.js');
41
41
  const logFileEnv = process.env.OMEGA_LOG_FILE;
42
42
  if (logFileEnv !== 'false' && logFileEnv !== '0') {
43
- const defaultName = Manager.isBuildMode() ? 'build.log' : 'dev.log';
43
+ const defaultName = build.isBuildMode() ? 'build.log' : 'dev.log';
44
44
  const logPath = (logFileEnv && logFileEnv !== 'true') ? logFileEnv : path.join(projectRoot, 'logs', defaultName);
45
45
  attachLogFile(logPath);
46
46
  logger.log(`Logs tee'd to ${logPath}`);
@@ -54,7 +54,7 @@ logger.log('Starting...', argv);
54
54
  // Auto-load tasks from src/gulp/tasks/*.js
55
55
  const tasks = glob('*.js', { cwd: `${__dirname}/tasks` });
56
56
 
57
- // Globals (parity with BXM)
57
+ // Globals (the same pair @omega.js/extension's gulp sets)
58
58
  global.tasks = {};
59
59
  global.websocket = null;
60
60
 
@@ -72,8 +72,7 @@ global.tasks = exports;
72
72
  const runConsumerHook = require('../utils/run-consumer-hook.js');
73
73
  function makeHookTask(name) {
74
74
  const fn = async () => {
75
- const Manager = new (require('../build.js'));
76
- await runConsumerHook(name, { manager: Manager, projectRoot: process.cwd(), mode: process.env.OMEGA_BUILD_MODE === 'true' ? 'production' : 'development' });
75
+ await runConsumerHook(name, { build, projectRoot: process.cwd(), mode: process.env.OMEGA_BUILD_MODE === 'true' ? 'production' : 'development' });
77
76
  };
78
77
  // Set displayName for nicer gulp logs.
79
78
  Object.defineProperty(fn, 'name', { value: `hook:${name.replace('/', ':')}` });
@@ -19,14 +19,14 @@
19
19
 
20
20
  const path = require('path');
21
21
  const jetpack = require('fs-jetpack');
22
- const Manager = new (require('../../build.js'));
22
+ const build = require('../../build.js');
23
23
  const { validateConfig, releasesRepo, hasOmegaConfig, loadConfig } = require('../../vendor/config/index.js');
24
24
 
25
- const logger = Manager.logger('audit');
25
+ const logger = build.logger('audit');
26
26
 
27
27
  module.exports = function audit(done) {
28
28
  const cwd = process.cwd();
29
- const config = Manager.getConfig();
29
+ const config = build.getConfig();
30
30
  const errors = [];
31
31
  const warnings = [];
32
32
 
@@ -38,18 +38,15 @@ module.exports = function audit(done) {
38
38
 
39
39
  // 1. Schema-driven config validation. Single source of truth in @omega.js/config
40
40
  // (shared schema + the desktop target refinements).
41
- const { errors: schemaErrors } = validateConfig(config, { target: 'desktop' });
41
+ // build.getConfig() attaches `environment`, a build fact: the config is decorated
42
+ const { errors: schemaErrors } = validateConfig(config, { target: 'desktop', decorated: true });
42
43
  errors.push(...schemaErrors);
43
44
 
44
- // ...and the validator's WARNINGS, which this task used to drop on the floor
45
- // while reporting `0 warnings` ([#911](https://github.com/Omega-JS-Stack/omega/issues/911)).
46
- // A key the schema does not declare is what a typo looks like, and the
47
- // consumer has to see it at build time. They come off the LOAD, the same
48
- // resolution `Manager.getConfig()` runs: loadConfig judges what the brand
49
- // AUTHORED, before the loader fills its own resolved facts (`company.name`
50
- // and friends) and before the build attaches `environment`.
45
+ // ...and the load's WARNINGS (an undeclared key is an ERROR, above). They
46
+ // come off the LOAD, the resolution `build.getConfig()` runs, which judges
47
+ // what the brand AUTHORED before the build attaches its own facts.
51
48
  const { warnings: configWarnings } = hasOmegaConfig(cwd)
52
- ? loadConfig(cwd, 'desktop', { environment: Manager.getEnvironment() })
49
+ ? loadConfig(cwd, 'desktop', { environment: build.getEnvironment() })
53
50
  : { warnings: [] };
54
51
  warnings.push(...configWarnings);
55
52
 
@@ -57,14 +54,14 @@ module.exports = function audit(done) {
57
54
  // tied to the build pipeline, not the config shape).
58
55
  fileMustExist('src/main.js', 'src/main.js');
59
56
  fileMustExist('src/preload.js', 'src/preload.js');
60
- if (Manager.isPublishMode() || Manager.isBuildMode()) {
57
+ if (build.isPublishMode() || build.isBuildMode()) {
61
58
  // Icon must exist when packaging — dev runs fine with the default Electron icon.
62
59
  fileMustExist(config.brand.images?.icon, 'config.brand.images.icon');
63
60
  }
64
61
  // Publishing needs an ADDRESS for the releases repo, and no repo name is ever
65
62
  // typed: @omega.js/config's releasesRepo derives `<brand.id>-releases` under
66
63
  // the brand's org, so only a missing org (or brand.id) leaves it unaddressable.
67
- if (Manager.isPublishMode() && config.releases?.enabled !== false && !releasesRepo(config)) {
64
+ if (build.isPublishMode() && config.releases?.enabled !== false && !releasesRepo(config)) {
68
65
  errors.push('the releases repo is unaddressable: set repo.org and brand.id. The repo is always "<brand.id>-releases" under that org');
69
66
  }
70
67
 
@@ -15,12 +15,12 @@ const path = require('path');
15
15
  const jetpack = require('fs-jetpack');
16
16
  const yaml = require('js-yaml');
17
17
  const { deepMerge, enabledFormats, desktopArtifactName, sanitizeProductName, releasesRepo } = require('../../vendor/config/index.js');
18
- const Manager = new (require('../../build.js'));
18
+ const build = require('../../build.js');
19
19
 
20
20
  const { writeMacEntitlements } = require('../../lib/sign-helpers/entitlements.js');
21
21
  const { resolveAndCopy } = require('../../lib/sign-helpers/resolve-icons.js');
22
22
 
23
- const logger = Manager.logger('build-config');
23
+ const logger = build.logger('build-config');
24
24
 
25
25
  module.exports = function buildConfig(done) {
26
26
  Promise.resolve().then(async () => {
@@ -28,7 +28,7 @@ module.exports = function buildConfig(done) {
28
28
  const distRoot = require('../../utils/dist-root.js')(projectRoot);
29
29
  const distPath = path.join(distRoot, 'electron-builder.yml');
30
30
 
31
- const config = Manager.getConfig();
31
+ const config = build.getConfig();
32
32
  const startupMode = config.startup?.mode || 'normal';
33
33
 
34
34
  // 1. Generate entitlements.mac.plist into dist/config/. Consumer overrides live at
@@ -51,7 +51,7 @@ module.exports = function buildConfig(done) {
51
51
  // (the cp142 rehearsal catch). The framework resolves the INSTALLED
52
52
  // electron from its own module context instead.
53
53
  try {
54
- builderConfig.electronVersion = Manager.require('electron/package.json').version;
54
+ builderConfig.electronVersion = require('electron/package.json').version;
55
55
  logger.log(`electronVersion → ${builderConfig.electronVersion} (resolved from the installed electron)`);
56
56
  } catch (error) {
57
57
  logger.log('electronVersion not injected (electron unresolved) — electron-builder falls back to its own detection');
@@ -160,11 +160,11 @@ function expandYear(str) {
160
160
  // test assertions).
161
161
  function baseConfig(config, extras = {}) {
162
162
  // Seed `app` + `brand` so callers (including tests passing bare {}) can deref without
163
- // optional-chaining at every site. Matches Manager.getConfig()'s own seeding.
163
+ // optional-chaining at every site. Matches build.getConfig()'s own seeding.
164
164
  config.app = config.app || {};
165
165
  config.brand = config.brand || {};
166
166
 
167
- // Manager.getConfig() derives appId from the brand url/id; the literal here
167
+ // build.getConfig() derives appId from the brand url/id; the literal here
168
168
  // only backstops bare test configs. Copyright derives from the BRAND, never
169
169
  // a hardcoded company (friction #18).
170
170
  const appId = config.app.appId || 'app.omega.consumer';
@@ -444,13 +444,13 @@ function baseConfig(config, extras = {}) {
444
444
  *
445
445
  * @param {object} arch - The resolved per-platform arch lists (`{ mac, linux }`).
446
446
  * @param {object} [options]
447
- * @param {object} [options.mode] - The Manager's mode (`{ build, publish, … }`).
447
+ * @param {object} [options.mode] - The build module's mode (`{ build, publish, … }`).
448
448
  * @param {object} [options.logger] - Logger with `warn` (default: this task's).
449
449
  * @throws {Error} in build/publish mode, naming the offending config key.
450
450
  */
451
451
  function assertArchRules(arch, options) {
452
452
  options = options || {};
453
- const mode = options.mode || Manager.getMode();
453
+ const mode = options.mode || build.getMode();
454
454
  const warn = (options.logger || logger).warn.bind(options.logger || logger);
455
455
 
456
456
  const violations = [];
@@ -15,8 +15,8 @@
15
15
  // three entry shapes, the Electron platform/target pair, the externals, the
16
16
  // renderer's Node-builtin shim, and the OMEGA_BUILD_JSON bake.
17
17
 
18
- const Manager = new (require('../../build.js'));
19
- const logger = Manager.logger('bundle');
18
+ const build = require('../../build.js');
19
+ const logger = build.logger('bundle');
20
20
  const path = require('path');
21
21
  const glob = require('glob').globSync;
22
22
  const jetpack = require('fs-jetpack');
@@ -29,8 +29,8 @@ const buildJsonKit = require('../../vendor/devkit/build-json.js');
29
29
  const { emptyModulesPlugin } = require('../../vendor/devkit/empty-modules-plugin.js');
30
30
  const electronTargets = require('../../utils/electron-targets.js');
31
31
 
32
- const projectRoot = Manager.getRootPath('project');
33
- const frameworkRoot = Manager.getRootPath();
32
+ const projectRoot = build.getRootPath('project');
33
+ const frameworkRoot = build.getRootPath();
34
34
  const outputRoot = require('../../utils/dist-root.js')(projectRoot);
35
35
 
36
36
  // The renderer runs with contextIsolation on: a browser-like environment with
@@ -73,7 +73,7 @@ function buildFacts({ pkg, mode, dev }) {
73
73
  }
74
74
 
75
75
  // The wrapper's `mode`, the same three keys on every OMEGA surface (#894).
76
- // Desktop's own `server` verdict stays inside the Manager, which is the only
76
+ // Desktop's own `server` verdict stays inside the build module, which is the only
77
77
  // thing that reads it: an artifact records what it WAS BUILT as.
78
78
  function artifactMode(mode) {
79
79
  return { environment: mode.environment, build: mode.build, publish: mode.publish };
@@ -118,9 +118,9 @@ function composeClientBuildJson({ config, facts, pkg, mode, license }) {
118
118
  }
119
119
 
120
120
  module.exports = function bundleTask(done) {
121
- const mode = Manager.getMode();
121
+ const mode = build.getMode();
122
122
  const isProd = mode.environment === 'production';
123
- const config = Manager.getConfig();
123
+ const config = build.getConfig();
124
124
 
125
125
  // The renderer's @omega.js/client reads `config.dev` to reach the local
126
126
  // stack (N7). A renderer has no env and no filesystem walk of its own, so
@@ -149,7 +149,7 @@ module.exports = function bundleTask(done) {
149
149
  // license server (a key that cannot be answered for THROWS, which is what
150
150
  // gates a bad-key release); a dev build is keyless by definition and never
151
151
  // phones home. The answer is stamped into the build blob below.
152
- const projectPackage = Manager.getPackage('project');
152
+ const projectPackage = build.getPackage('project');
153
153
  resolveLicenseStamp({ config, production: isProd })
154
154
  .then((license) => {
155
155
  // OMEGA_BUILD_JSON: frozen at build time. The NODE pair reads it as a
@@ -203,9 +203,9 @@ async function runBundles(buildJson, isProd) {
203
203
 
204
204
  // esbuild rejects with every error already formatted, so a failed build
205
205
  // surfaces through gulp's own callback rather than a hand-rolled reporter.
206
- const results = await Promise.all(builds.map(async (build) => ({
207
- name: build.name,
208
- result: await bundle(build.options),
206
+ const results = await Promise.all(builds.map(async (entry) => ({
207
+ name: entry.name,
208
+ result: await bundle(entry.options),
209
209
  })));
210
210
 
211
211
  // The metafile is what the wrapper turns on for exactly this: what each
@@ -225,7 +225,7 @@ async function runBundles(buildJson, isProd) {
225
225
  // version they must compile for.
226
226
  function resolveTargets() {
227
227
  try {
228
- return electronTargets(Manager.require('electron'), { logger });
228
+ return electronTargets(require('electron'), { logger });
229
229
  } catch (e) {
230
230
  logger.warn(`Could not resolve electron (${e.message}) — bundles compile with no syntax floor.`);
231
231
  return { node: null, chrome: null, electron: null };
@@ -300,13 +300,13 @@ const BAKED_SOURCE_KEYS = bakeSourceKeys('desktop');
300
300
  * @param {object} config - The target's resolved omega.json5 config.
301
301
  * @param {object} env - The build env.
302
302
  * @param {object} [options]
303
- * @param {object} [options.mode] - The Manager's mode (`{ build, publish, … }`).
303
+ * @param {object} [options.mode] - The build module's mode (`{ build, publish, … }`).
304
304
  * @param {object} [options.logger] - Logger with `warn` (default: this task's).
305
305
  * @throws {Error} in build/publish mode, naming every brand-level key and the config path that requires it.
306
306
  */
307
307
  function assertBakeRules(config, env, options) {
308
308
  options = options || {};
309
- const mode = options.mode || Manager.getMode();
309
+ const mode = options.mode || build.getMode();
310
310
  const warn = (options.logger || logger).warn.bind(options.logger || logger);
311
311
 
312
312
  const violations = checkEnvRules(config, env, { target: 'desktop' })
@@ -469,7 +469,7 @@ function rendererBundle(shared) {
469
469
  format: 'iife',
470
470
  target: shared.targets.chrome,
471
471
  dev: shared.dev,
472
- // Vendored core assets (#111) — mirrors the alias BXM/UJM use, so
472
+ // Vendored core assets (#111) — the same alias extension and web use, so
473
473
  // renderer code imports shared core modules by a stable name:
474
474
  // import appShell from '__main_assets__/js/core/app-shell.js';
475
475
  alias: {
@@ -504,7 +504,7 @@ function nativeExternals() {
504
504
  'sqlite3',
505
505
  ];
506
506
 
507
- const consumerPkg = Manager.getPackage('project');
507
+ const consumerPkg = build.getPackage('project');
508
508
  const declared = Object.assign({}, consumerPkg.dependencies || {}, consumerPkg.devDependencies || {});
509
509
 
510
510
  return Object.keys(declared).filter((name) => NATIVE.includes(name));
@@ -7,13 +7,13 @@
7
7
  // tree, the locality warning. Idempotent and quiet: a converged target writes
8
8
  // nothing. The non-gulp verbs (`omega test`, `omega deploy`) call ensureTarget
9
9
  // themselves.
10
- const Manager = new (require('../../build.js'));
11
- const logger = Manager.logger('defaults');
10
+ const build = require('../../build.js');
11
+ const logger = build.logger('defaults');
12
12
  const { ensureTarget } = require('../../commands/lib/ensure-target.js');
13
13
 
14
14
  module.exports = async function defaults() {
15
15
  await ensureTarget({
16
- projectDir: Manager.getRootPath('project'),
16
+ projectDir: build.getRootPath('project'),
17
17
  log: (line) => logger.log(line),
18
18
  warn: (line) => logger.warn(line),
19
19
  });
@@ -1,6 +1,6 @@
1
1
  // STUB — stage consumer src/ + @omega.js/desktop dist/ into .desktop-build/ for the `bundle` task to consume.
2
- const Manager = new (require('../../build.js'));
3
- const logger = Manager.logger('distribute');
2
+ const build = require('../../build.js');
3
+ const logger = build.logger('distribute');
4
4
 
5
5
  module.exports = function distribute(done) {
6
6
  logger.log('distribute (stub)');
@@ -4,7 +4,7 @@
4
4
  // Page template is FRAMEWORK-INTERNAL (`<framework>/dist/config/page-template.html`). Consumers don't ship
5
5
  // their own — every view goes through the same shell so the inset titlebar / draggable region /
6
6
  // css/js wiring stay consistent. If a consumer needs a different template they can fork via
7
- // `manager.windows` config, but we no longer look at `<consumer>/config/page-template.html`.
7
+ // `omega.windows` config, but we no longer look at `<consumer>/config/page-template.html`.
8
8
  //
9
9
  // Body content is itself templated FIRST (so you can use {{ brand.name }} etc. inside the view),
10
10
  // then the result is injected into the page template's `{{ content }}` slot.
@@ -15,17 +15,17 @@
15
15
  // This lines up with the `bundle` task's entry naming so /assets/js/components/<page.name>.bundle.js
16
16
  // and /assets/css/components/<page.name>.bundle.css resolve correctly.
17
17
 
18
- const Manager = new (require('../../build.js'));
19
- const logger = Manager.logger('html');
18
+ const build = require('../../build.js');
19
+ const logger = build.logger('html');
20
20
  const path = require('path');
21
21
  const jetpack = require('fs-jetpack');
22
22
 
23
- const projectRoot = Manager.getRootPath('project');
24
- const packageRoot = Manager.getRootPath('main');
23
+ const projectRoot = build.getRootPath('project');
24
+ const packageRoot = build.getRootPath('main');
25
25
  const outputRoot = require('../../utils/dist-root.js')(projectRoot);
26
26
 
27
- // We require the templating lib directly (rather than going through a Manager singleton)
28
- // because gulp tasks run pre-Electron, with only the build-time Manager available.
27
+ // We require the templating lib directly (rather than going through the omega instance)
28
+ // because gulp tasks run pre-Electron, with only the build module available.
29
29
  const templating = require('../../lib/templating.js');
30
30
 
31
31
  module.exports = function htmlTask(done) {
@@ -81,9 +81,9 @@ module.exports = function htmlTask(done) {
81
81
  const bodyContent = jetpack.read(src);
82
82
 
83
83
  // Two-pass render: first the body (so it can use {{ brand.name }} etc.), then the outer page.
84
- const innerVars = templating.buildPageVars(pageName, { cacheBust }, Manager);
84
+ const innerVars = templating.buildPageVars(pageName, { cacheBust }, build);
85
85
  const renderedBody = templating.render(bodyContent, innerVars);
86
- const outerVars = templating.buildPageVars(pageName, { cacheBust, content: renderedBody }, Manager);
86
+ const outerVars = templating.buildPageVars(pageName, { cacheBust, content: renderedBody }, build);
87
87
  const final = templating.render(pageTemplateContent, outerVars);
88
88
 
89
89
  const dest = path.join(outputRoot, 'views', rel);
@@ -15,9 +15,9 @@
15
15
  const path = require('path');
16
16
  const jetpack = require('fs-jetpack');
17
17
  const yaml = require('js-yaml');
18
- const Manager = new (require('../../build.js'));
18
+ const build = require('../../build.js');
19
19
 
20
- const logger = Manager.logger('package-quick');
20
+ const logger = build.logger('package-quick');
21
21
 
22
22
  module.exports = function packageQuick(done) {
23
23
  const projectRoot = process.cwd();
@@ -29,7 +29,7 @@ module.exports = function packageQuick(done) {
29
29
 
30
30
  let builder;
31
31
  try {
32
- builder = Manager.require('electron-builder');
32
+ builder = require('electron-builder');
33
33
  } catch (e) {
34
34
  return done(new Error(`Could not resolve electron-builder: ${e.message}`));
35
35
  }
@@ -10,9 +10,9 @@
10
10
 
11
11
  const path = require('path');
12
12
  const jetpack = require('fs-jetpack');
13
- const Manager = new (require('../../build.js'));
13
+ const build = require('../../build.js');
14
14
 
15
- const logger = Manager.logger('package');
15
+ const logger = build.logger('package');
16
16
 
17
17
  module.exports = function packageApp(done) {
18
18
  const projectRoot = process.cwd();
@@ -25,7 +25,7 @@ module.exports = function packageApp(done) {
25
25
  // Resolve electron-builder from the consumer's node_modules first, then @omega.js/desktop's bundled one.
26
26
  let builder;
27
27
  try {
28
- builder = Manager.require('electron-builder');
28
+ builder = require('electron-builder');
29
29
  } catch (e) {
30
30
  return done(new Error(`Could not resolve electron-builder: ${e.message}. Run \`npm i -D electron-builder\` in the consumer.`));
31
31
  }
@@ -14,9 +14,9 @@
14
14
 
15
15
  const path = require('path');
16
16
  const jetpack = require('fs-jetpack');
17
- const Manager = new (require('../../build.js'));
17
+ const build = require('../../build.js');
18
18
 
19
- const logger = Manager.logger('release');
19
+ const logger = build.logger('release');
20
20
 
21
21
  // The two warnings electron-publish prints when it uploads nothing: one per
22
22
  // release (`gitHubPublisher.getOrCreateRelease` returns null with its reason)
@@ -37,7 +37,7 @@ module.exports = function release(done) {
37
37
 
38
38
  let builder;
39
39
  try {
40
- builder = Manager.require('electron-builder');
40
+ builder = require('electron-builder');
41
41
  } catch (e) {
42
42
  return done(new Error(`Could not resolve electron-builder: ${e.message}. Run \`npm i -D electron-builder\` in the consumer.`));
43
43
  }
@@ -10,21 +10,21 @@
10
10
  // - <output-root>/assets/scss → resolves bare 'brand' to the generated _brand.scss (#912)
11
11
  // - <consumer>/src/assets/scss → consumer's own modules
12
12
 
13
- const Manager = new (require('../../build.js'));
14
- const logger = Manager.logger('sass');
13
+ const build = require('../../build.js');
14
+ const logger = build.logger('sass');
15
15
  const path = require('path');
16
16
  const jetpack = require('fs-jetpack');
17
17
  const sass = require('sass');
18
18
  const { formatBytes } = require('../../vendor/devkit/bundle.js');
19
19
  const { composeBrandTokens, renderBrandScss } = require('../../vendor/devkit/brand-tokens.js');
20
20
 
21
- const projectRoot = Manager.getRootPath('project');
22
- const packageRoot = Manager.getRootPath('main');
21
+ const projectRoot = build.getRootPath('project');
22
+ const packageRoot = build.getRootPath('main');
23
23
  const outputRoot = require('../../utils/dist-root.js')(projectRoot);
24
24
 
25
25
  module.exports = function sassTask(done) {
26
- const isProd = Manager.getMode().environment === 'production';
27
- const config = Manager.getConfig() || {};
26
+ const isProd = build.getMode().environment === 'production';
27
+ const config = build.getConfig() || {};
28
28
  const themeId = config.theme?.id || 'classy';
29
29
 
30
30
  // The brand partial ([#912](https://github.com/Omega-JS-Stack/omega/issues/912)):
@@ -4,12 +4,12 @@
4
4
  // Future passes will add: livereload websocket, watch + rebuild, renderer reload via webContents.reload(),
5
5
  // main reload via app.relaunch().
6
6
 
7
- const Manager = new (require('../../build.js'));
8
- const logger = Manager.logger('serve');
7
+ const build = require('../../build.js');
8
+ const logger = build.logger('serve');
9
9
  const { spawn } = require('child_process');
10
10
  const { watchEnvChain } = require('../../vendor/devkit/env-watch.js');
11
11
 
12
- const projectRoot = Manager.getRootPath('project');
12
+ const projectRoot = build.getRootPath('project');
13
13
 
14
14
  module.exports = function serve(done) {
15
15
  // N7: resolve livereload (and CDP when requested) through the allocator —
@@ -22,7 +22,7 @@ module.exports = function serve(done) {
22
22
 
23
23
  async function resolveServePorts() {
24
24
  const { resolvePorts, envPort, CLASSIC_PORTS } = require('../../vendor/config/index.js');
25
- const configPins = Manager.getConfig()?.ports || {};
25
+ const configPins = build.getConfig()?.ports || {};
26
26
 
27
27
  const wanted = { livereload: envPort('livereload') || CLASSIC_PORTS.livereload };
28
28
  const pins = {};
@@ -17,7 +17,7 @@
17
17
 
18
18
  const fs = require('fs');
19
19
  const path = require('path');
20
- const Logger = require('../lib/logger');
20
+ const Logger = require('../vendor/devkit/logger.js');
21
21
  const { submit, stapleAndProve, toolRunner } = require('./lib/notarize-tools.js');
22
22
 
23
23
  const logger = new Logger('notarize-artifacts');
@@ -29,7 +29,7 @@
29
29
  const path = require('path');
30
30
  const fs = require('fs');
31
31
  const { execute } = require('node-powertools');
32
- const Logger = require('../lib/logger');
32
+ const Logger = require('../vendor/devkit/logger.js');
33
33
  const { stapleAndProve, toolRunner } = require('./lib/notarize-tools.js');
34
34
 
35
35
  const logger = new Logger('notarize');
package/dist/index.js CHANGED
@@ -1,14 +1,11 @@
1
- // Default export — re-exports per-process Managers + version.
2
- // Most consumers should use the per-process subpath imports instead:
1
+ // Default export: the build-time entry (version + the build module). Each Electron
2
+ // process imports its own ready-made instance from its subpath instead:
3
3
  // require('@omega.js/desktop/main')
4
- // require('@omega.js/desktop/renderer')
4
+ // import omega from '@omega.js/desktop/renderer'
5
5
  // require('@omega.js/desktop/preload')
6
6
  const package = require('../package.json');
7
7
 
8
8
  module.exports = {
9
- version: package.version,
10
- Main: require('./main.js'),
11
- Renderer: require('./renderer.js'),
12
- Preload: require('./preload.js'),
13
- Build: require('./build.js'),
9
+ version: package.version,
10
+ build: require('./build.js'),
14
11
  };
@@ -0,0 +1,50 @@
1
+ // The main process's environment and backend-URL surface: methods mixed into
2
+ // the `Omega` class (src/main.js) with `Object.assign(Omega.prototype, ...)`, so
3
+ // they stay `omega.getEnvironment()`, `omega.getApiUrl()`, ... on the instance.
4
+
5
+ const { getEnvironment, isDevelopment, isProduction, isTesting, getVersion } = require('../utils/mode-helpers.js');
6
+ const { getFunctionsUrl, getApiUrl, getWebsiteUrl, getAuthUrl } = require('../utils/url-helpers.js');
7
+
8
+ module.exports = {
9
+ // The environment surface (#817): @omega.js/config's ONE implementation,
10
+ // reading the process's OMEGA_ENVIRONMENT, then this instance's baked
11
+ // `config.environment`
12
+ getEnvironment() {
13
+ return getEnvironment.call(this);
14
+ },
15
+
16
+ isDevelopment() {
17
+ return isDevelopment.call(this);
18
+ },
19
+
20
+ isProduction() {
21
+ return isProduction.call(this);
22
+ },
23
+
24
+ isTesting() {
25
+ return isTesting.call(this);
26
+ },
27
+
28
+ getVersion() {
29
+ return getVersion();
30
+ },
31
+
32
+ // The backend URL helpers (utils/url-helpers.js): local in development and
33
+ // testing, the brand's hosts in production. `environment` overrides the
34
+ // running one.
35
+ getFunctionsUrl(environment) {
36
+ return getFunctionsUrl(this, environment);
37
+ },
38
+
39
+ getApiUrl(environment) {
40
+ return getApiUrl(this, environment);
41
+ },
42
+
43
+ getWebsiteUrl(environment) {
44
+ return getWebsiteUrl(this, environment);
45
+ },
46
+
47
+ getAuthUrl(environment, returnUrl) {
48
+ return getAuthUrl(this, environment, returnUrl);
49
+ },
50
+ };