@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
@@ -11,13 +11,13 @@
11
11
  // published, then composes OMEGA_WEBSITE_PORT / the baked port over https, then
12
12
  // the classic dev origin ([#747](https://github.com/Omega-JS-Stack/omega/issues/747)).
13
13
  //
14
- // The last case pins the auth emulator port client-bridge connects a testing
14
+ // The last case pins the auth emulator port lib/auth.js connects a testing
15
15
  // run to: the same three-step chain, off the same baked map.
16
16
 
17
17
  const path = require('path');
18
18
 
19
19
  const helpers = require(path.join(__dirname, '..', '..', '..', 'utils', 'url-helpers.js'));
20
- const clientBridge = require(path.join(__dirname, '..', '..', '..', 'lib', 'client-bridge.js'));
20
+ const auth = require(path.join(__dirname, '..', '..', '..', 'lib', 'auth.js'));
21
21
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
22
22
 
23
23
  function withEnv(overrides, fn) {
@@ -35,9 +35,9 @@ function withEnv(overrides, fn) {
35
35
  }
36
36
  }
37
37
 
38
- // The shape the helpers see at runtime: a Manager carrying the resolved config
38
+ // The shape the helpers see at runtime: an omega instance carrying the resolved config
39
39
  // (OMEGA_BUILD_JSON.config, `dev` block and all) plus mode-helpers' getEnvironment().
40
- function fakeManager(environment, ports, origin) {
40
+ function fakeOmega(environment, ports, origin) {
41
41
  return {
42
42
  getEnvironment: () => environment,
43
43
  isTesting: () => environment === 'testing',
@@ -51,11 +51,11 @@ function fakeManager(environment, ports, origin) {
51
51
  };
52
52
  }
53
53
 
54
- // Run `fn` with the bridge pointed at a stand-in Manager, then put the real one back.
55
- function withBridgeManager(manager, fn) {
56
- const original = clientBridge._manager;
57
- clientBridge._manager = manager;
58
- try { return fn(); } finally { clientBridge._manager = original; }
54
+ // Run `fn` with auth pointed at a stand-in instance, then put the real one back.
55
+ function withAuthOmega(omega, fn) {
56
+ const original = auth._omega;
57
+ auth._omega = omega;
58
+ try { return fn(); } finally { auth._omega = original; }
59
59
  }
60
60
 
61
61
  // No env channel published: the state a packaged main process is in.
@@ -72,9 +72,11 @@ module.exports = defineCases({
72
72
  description: 'utils/url-helpers: every local helper resolves env, then the baked dev.ports, then throws',
73
73
  tests: [
74
74
  {
75
- name: 'exports { attachTo, getApiUrl, localPort, requiredPort }',
75
+ // Plain functions the `Omega` classes call with themselves as `context`:
76
+ // no mixin onto a constructor any more
77
+ name: 'exports { getApiUrl, localPort, requiredPort } and no attachTo',
76
78
  run: (ctx) => {
77
- ctx.expect(typeof helpers.attachTo).toBe('function');
79
+ ctx.expect(helpers.attachTo).toBeUndefined();
78
80
  ctx.expect(typeof helpers.getApiUrl).toBe('function');
79
81
  ctx.expect(typeof helpers.localPort).toBe('function');
80
82
  ctx.expect(typeof helpers.requiredPort).toBe('function');
@@ -84,8 +86,8 @@ module.exports = defineCases({
84
86
  name: 'a BUMPED baked dev.ports.hosting is the api base in testing',
85
87
  run: (ctx) => {
86
88
  withEnv(NO_ENV, () => {
87
- const manager = fakeManager('testing', { hosting: 5012, auth: 9109 });
88
- ctx.expect(helpers.getApiUrl.call(manager)).toBe('http://localhost:5012');
89
+ const omega = fakeOmega('testing', { hosting: 5012, auth: 9109 });
90
+ ctx.expect(helpers.getApiUrl(omega)).toBe('http://localhost:5012');
89
91
  });
90
92
  },
91
93
  },
@@ -93,8 +95,8 @@ module.exports = defineCases({
93
95
  name: 'a BUMPED baked dev.ports.hosting is the api base in development too',
94
96
  run: (ctx) => {
95
97
  withEnv(NO_ENV, () => {
96
- const manager = fakeManager('development', { hosting: 5012 });
97
- ctx.expect(helpers.getApiUrl.call(manager)).toBe('http://localhost:5012');
98
+ const omega = fakeOmega('development', { hosting: 5012 });
99
+ ctx.expect(helpers.getApiUrl(omega)).toBe('http://localhost:5012');
98
100
  });
99
101
  },
100
102
  },
@@ -102,8 +104,8 @@ module.exports = defineCases({
102
104
  name: 'OMEGA_HOSTING_PORT wins over the baked value',
103
105
  run: (ctx) => {
104
106
  withEnv({ ...NO_ENV, OMEGA_HOSTING_PORT: '5022' }, () => {
105
- const manager = fakeManager('testing', { hosting: 5012 });
106
- ctx.expect(helpers.getApiUrl.call(manager)).toBe('http://localhost:5022');
107
+ const omega = fakeOmega('testing', { hosting: 5012 });
108
+ ctx.expect(helpers.getApiUrl(omega)).toBe('http://localhost:5022');
107
109
  });
108
110
  },
109
111
  },
@@ -116,9 +118,9 @@ module.exports = defineCases({
116
118
  run: (ctx) => {
117
119
  withEnv(NO_ENV, () => {
118
120
  for (const environment of ['testing', 'development']) {
119
- ctx.expect(() => helpers.getApiUrl.call(fakeManager(environment)))
121
+ ctx.expect(() => helpers.getApiUrl(fakeOmega(environment)))
120
122
  .toThrow(/dev port for `hosting`/);
121
- ctx.expect(() => helpers.getApiUrl.call(fakeManager(environment)))
123
+ ctx.expect(() => helpers.getApiUrl(fakeOmega(environment)))
122
124
  .toThrow(/bundle task/);
123
125
  }
124
126
  });
@@ -128,8 +130,8 @@ module.exports = defineCases({
128
130
  name: 'OMEGA_HTTPS_PORT means the mkcert proxy is up: https, not hosting',
129
131
  run: (ctx) => {
130
132
  withEnv({ ...NO_ENV, OMEGA_HTTPS_PORT: '5003' }, () => {
131
- const manager = fakeManager('testing', { hosting: 5012 });
132
- ctx.expect(helpers.getApiUrl.call(manager)).toBe('https://localhost:5003');
133
+ const omega = fakeOmega('testing', { hosting: 5012 });
134
+ ctx.expect(helpers.getApiUrl(omega)).toBe('https://localhost:5003');
133
135
  });
134
136
  },
135
137
  },
@@ -137,8 +139,8 @@ module.exports = defineCases({
137
139
  name: 'a baked dev.ports.https does the same with no env published',
138
140
  run: (ctx) => {
139
141
  withEnv(NO_ENV, () => {
140
- const manager = fakeManager('testing', { https: 5003, hosting: 5443 });
141
- ctx.expect(helpers.getApiUrl.call(manager)).toBe('https://localhost:5003');
142
+ const omega = fakeOmega('testing', { https: 5003, hosting: 5443 });
143
+ ctx.expect(helpers.getApiUrl(omega)).toBe('https://localhost:5003');
142
144
  });
143
145
  },
144
146
  },
@@ -146,8 +148,8 @@ module.exports = defineCases({
146
148
  name: 'production ignores every local channel, giving api.<brand host>',
147
149
  run: (ctx) => {
148
150
  withEnv({ ...NO_ENV, OMEGA_HOSTING_PORT: '5022' }, () => {
149
- const manager = fakeManager('production', { hosting: 5012 });
150
- ctx.expect(helpers.getApiUrl.call(manager)).toBe('https://api.playground.omegajs.dev');
151
+ const omega = fakeOmega('production', { hosting: 5012 });
152
+ ctx.expect(helpers.getApiUrl(omega)).toBe('https://api.playground.omegajs.dev');
151
153
  });
152
154
  },
153
155
  },
@@ -155,8 +157,8 @@ module.exports = defineCases({
155
157
  name: 'getFunctionsUrl: a BUMPED baked dev.ports.functions is the functions base',
156
158
  run: (ctx) => {
157
159
  withEnv(NO_ENV, () => {
158
- const manager = fakeManager('development', { functions: 5011 });
159
- ctx.expect(helpers.getFunctionsUrl.call(manager))
160
+ const omega = fakeOmega('development', { functions: 5011 });
161
+ ctx.expect(helpers.getFunctionsUrl(omega))
160
162
  .toBe('http://localhost:5011/demo-app/us-central1');
161
163
  });
162
164
  },
@@ -165,8 +167,8 @@ module.exports = defineCases({
165
167
  name: 'getFunctionsUrl: OMEGA_FUNCTIONS_PORT wins over the baked value',
166
168
  run: (ctx) => {
167
169
  withEnv({ ...NO_ENV, OMEGA_FUNCTIONS_PORT: '5021' }, () => {
168
- const manager = fakeManager('testing', { functions: 5011 });
169
- ctx.expect(helpers.getFunctionsUrl.call(manager))
170
+ const omega = fakeOmega('testing', { functions: 5011 });
171
+ ctx.expect(helpers.getFunctionsUrl(omega))
170
172
  .toBe('http://localhost:5021/demo-app/us-central1');
171
173
  });
172
174
  },
@@ -175,7 +177,7 @@ module.exports = defineCases({
175
177
  name: 'getFunctionsUrl: neither channel → a throw naming the port (#834)',
176
178
  run: (ctx) => {
177
179
  withEnv(NO_ENV, () => {
178
- ctx.expect(() => helpers.getFunctionsUrl.call(fakeManager('development')))
180
+ ctx.expect(() => helpers.getFunctionsUrl(fakeOmega('development')))
179
181
  .toThrow(/dev port for `functions`/);
180
182
  });
181
183
  },
@@ -184,8 +186,8 @@ module.exports = defineCases({
184
186
  name: 'getFunctionsUrl: production ignores every local channel',
185
187
  run: (ctx) => {
186
188
  withEnv({ ...NO_ENV, OMEGA_FUNCTIONS_PORT: '5021' }, () => {
187
- const manager = fakeManager('production', { functions: 5011 });
188
- ctx.expect(helpers.getFunctionsUrl.call(manager))
189
+ const omega = fakeOmega('production', { functions: 5011 });
190
+ ctx.expect(helpers.getFunctionsUrl(omega))
189
191
  .toBe('https://us-central1-demo-app.cloudfunctions.net');
190
192
  });
191
193
  },
@@ -194,8 +196,8 @@ module.exports = defineCases({
194
196
  name: 'getWebsiteUrl: a BUMPED baked dev.ports.website is the website base',
195
197
  run: (ctx) => {
196
198
  withEnv(NO_ENV, () => {
197
- const manager = fakeManager('development', { website: 4001 });
198
- ctx.expect(helpers.getWebsiteUrl.call(manager)).toBe('https://localhost:4001');
199
+ const omega = fakeOmega('development', { website: 4001 });
200
+ ctx.expect(helpers.getWebsiteUrl(omega)).toBe('https://localhost:4001');
199
201
  });
200
202
  },
201
203
  },
@@ -203,8 +205,8 @@ module.exports = defineCases({
203
205
  name: 'getWebsiteUrl: OMEGA_WEBSITE_PORT wins over the baked value',
204
206
  run: (ctx) => {
205
207
  withEnv({ ...NO_ENV, OMEGA_WEBSITE_PORT: '4002' }, () => {
206
- const manager = fakeManager('testing', { website: 4001 });
207
- ctx.expect(helpers.getWebsiteUrl.call(manager)).toBe('https://localhost:4002');
208
+ const omega = fakeOmega('testing', { website: 4001 });
209
+ ctx.expect(helpers.getWebsiteUrl(omega)).toBe('https://localhost:4002');
208
210
  });
209
211
  },
210
212
  },
@@ -212,7 +214,7 @@ module.exports = defineCases({
212
214
  name: 'getWebsiteUrl: neither channel → a throw naming the port (#834)',
213
215
  run: (ctx) => {
214
216
  withEnv(NO_ENV, () => {
215
- ctx.expect(() => helpers.getWebsiteUrl.call(fakeManager('development')))
217
+ ctx.expect(() => helpers.getWebsiteUrl(fakeOmega('development')))
216
218
  .toThrow(/dev port for `website`/);
217
219
  });
218
220
  },
@@ -224,8 +226,8 @@ module.exports = defineCases({
224
226
  name: 'getWebsiteUrl: a baked dev.origin wins over OMEGA_WEBSITE_PORT',
225
227
  run: (ctx) => {
226
228
  withEnv({ ...NO_ENV, OMEGA_WEBSITE_PORT: '4002' }, () => {
227
- const manager = fakeManager('development', { website: 4001 }, 'https://localhost:4123');
228
- ctx.expect(helpers.getWebsiteUrl.call(manager)).toBe('https://localhost:4123');
229
+ const omega = fakeOmega('development', { website: 4001 }, 'https://localhost:4123');
230
+ ctx.expect(helpers.getWebsiteUrl(omega)).toBe('https://localhost:4123');
229
231
  });
230
232
  },
231
233
  },
@@ -233,7 +235,7 @@ module.exports = defineCases({
233
235
  name: 'getWebsiteUrl: OMEGA_WEBSITE_PORT with no baked origin composes over https',
234
236
  run: (ctx) => {
235
237
  withEnv({ ...NO_ENV, OMEGA_WEBSITE_PORT: '4321' }, () => {
236
- ctx.expect(helpers.getWebsiteUrl.call(fakeManager('development'))).toBe('https://localhost:4321');
238
+ ctx.expect(helpers.getWebsiteUrl(fakeOmega('development'))).toBe('https://localhost:4321');
237
239
  });
238
240
  },
239
241
  },
@@ -258,11 +260,8 @@ module.exports = defineCases({
258
260
  name: 'getAuthUrl: dev builds /signin and /token on the https dev origin',
259
261
  run: (ctx) => {
260
262
  withEnv(NO_ENV, () => {
261
- // getAuthUrl calls `this.getWebsiteUrl()`, which attachTo() supplies on a
262
- // real Manager — hand the stand-in the same helper.
263
- const manager = fakeManager('development', { website: 4000 });
264
- manager.getWebsiteUrl = helpers.getWebsiteUrl;
265
- const url = new URL(helpers.getAuthUrl.call(manager));
263
+ const omega = fakeOmega('development', { website: 4000 });
264
+ const url = new URL(helpers.getAuthUrl(omega));
266
265
  ctx.expect(url.origin).toBe('https://localhost:4000');
267
266
  ctx.expect(url.pathname).toBe('/signin');
268
267
  const tokenUrl = new URL(url.searchParams.get('authReturnUrl'));
@@ -276,31 +275,31 @@ module.exports = defineCases({
276
275
  name: 'getWebsiteUrl: production ignores every local channel',
277
276
  run: (ctx) => {
278
277
  withEnv({ ...NO_ENV, OMEGA_WEBSITE_PORT: '4002' }, () => {
279
- const manager = fakeManager('production', { website: 4001 });
280
- ctx.expect(helpers.getWebsiteUrl.call(manager)).toBe('https://playground.omegajs.dev');
278
+ const omega = fakeOmega('production', { website: 4001 });
279
+ ctx.expect(helpers.getWebsiteUrl(omega)).toBe('https://playground.omegajs.dev');
281
280
  });
282
281
  },
283
282
  },
284
283
  {
285
- // client-bridge connects a TESTING run's auth to the emulator. Same chain:
284
+ // lib/auth.js connects a TESTING run's auth to the emulator. Same chain:
286
285
  // env, then the baked map, then classic 9099.
287
- name: 'the auth emulator port rides the same chain (client-bridge)',
286
+ name: 'the auth emulator port rides the same chain (lib/auth.js)',
288
287
  run: (ctx) => {
289
288
  withEnv({ OMEGA_AUTH_PORT: null }, () => {
290
- withBridgeManager(fakeManager('testing', { auth: 9109 }), () => {
291
- ctx.expect(clientBridge._authEmulatorPort()).toBe(9109);
289
+ withAuthOmega(fakeOmega('testing', { auth: 9109 }), () => {
290
+ ctx.expect(auth._authEmulatorPort()).toBe(9109);
292
291
  });
293
292
  // The classic 9099 used to answer here (#834): nothing identity-checks
294
293
  // what holds that port, so a neighbouring project's emulator read as
295
294
  // an auth mystery instead of a port problem.
296
- withBridgeManager(fakeManager('testing'), () => {
297
- ctx.expect(() => clientBridge._authEmulatorPort()).toThrow(/dev port for `auth`/);
298
- ctx.expect(() => clientBridge._authEmulatorPort()).toThrow(/bundle task/);
295
+ withAuthOmega(fakeOmega('testing'), () => {
296
+ ctx.expect(() => auth._authEmulatorPort()).toThrow(/dev port for `auth`/);
297
+ ctx.expect(() => auth._authEmulatorPort()).toThrow(/bundle task/);
299
298
  });
300
299
  });
301
300
  withEnv({ OMEGA_AUTH_PORT: '9119' }, () => {
302
- withBridgeManager(fakeManager('testing', { auth: 9109 }), () => {
303
- ctx.expect(clientBridge._authEmulatorPort()).toBe('9119');
301
+ withAuthOmega(fakeOmega('testing', { auth: 9109 }), () => {
302
+ ctx.expect(auth._authEmulatorPort()).toBe('9119');
304
303
  });
305
304
  });
306
305
  },
@@ -7,9 +7,9 @@
7
7
  const { validateConfig, runSchema, formatErrors, loadConfig } = require('../../../vendor/config/index.js');
8
8
 
9
9
  const path = require('path');
10
- const Manager = require('../../../build.js');
10
+ const build = require('../../../build.js');
11
11
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
12
- const root = Manager.getRootPath('main');
12
+ const root = build.getRootPath('main');
13
13
 
14
14
  // Minimal "good" config — passes every required check.
15
15
  const VALID = {
@@ -48,8 +48,8 @@ module.exports = defineCases({
48
48
  name: 'desktop refinements apply only with target: desktop',
49
49
  run: (ctx) => {
50
50
  const cfg = { ...VALID, startup: { mode: 'tray-only' } };
51
- // Without a target, startup.mode is just an unknown key — silent.
52
- ctx.expect(validateConfig(cfg).errors).toEqual([]);
51
+ // Without a target, startup.mode is a key nobody declared: the strict schema names it.
52
+ ctx.expect(validateConfig(cfg).errors.map((e) => e.split(' ')[0])).toEqual(['config.startup.mode']);
53
53
  // With the desktop target, the enum refinement fires.
54
54
  const { errors } = validateConfig(cfg, { target: 'desktop' });
55
55
  ctx.expect(errors.some((e) => e.includes('startup.mode') && e.includes('not allowed'))).toBe(true);
@@ -70,6 +70,17 @@ module.exports = defineCases({
70
70
  ctx.expect(errors.some((e) => e.includes('looks like a secret'))).toBe(true);
71
71
  },
72
72
  },
73
+ {
74
+ // The boot (main.js) and the audit validate a BAKED config, which carries
75
+ // the build facts; only `decorated: true` declares them.
76
+ name: 'a baked config passes as decorated, and its build facts fail an authored load',
77
+ run: (ctx) => {
78
+ const baked = { ...VALID, runtime: 'electron', environment: 'production', version: '1.0.0', buildTime: 1, target: 'desktop' };
79
+ ctx.expect(validateConfig(baked, { target: 'desktop', decorated: true }).errors).toEqual([]);
80
+ const authored = validateConfig(baked, { target: 'desktop' }).errors.map((e) => e.split(' ')[0]);
81
+ ctx.expect(authored).toEqual(['config.runtime', 'config.environment', 'config.version', 'config.buildTime', 'config.target']);
82
+ },
83
+ },
73
84
  {
74
85
  name: 'formatErrors renders a numbered block',
75
86
  run: (ctx) => {
@@ -10,6 +10,10 @@
10
10
  const path = require('path');
11
11
  const fs = require('fs');
12
12
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
13
+ const { runTestVerbUnderOuterTee } = require('../../../vendor/devkit/test/run-verb-under-tee.js');
14
+
15
+ const COMMANDS = path.join(__dirname, '..', '..', '..', 'commands');
16
+ const PREFIX = 'desktop-test-verb-';
13
17
 
14
18
  module.exports = defineCases({
15
19
  type: 'suite',
@@ -39,5 +43,21 @@ module.exports = defineCases({
39
43
  ctx.expect(line).toBe(marker);
40
44
  },
41
45
  },
46
+ {
47
+ // The verb takes off only the layer its own attach pushed: a declined
48
+ // attach pushes none, and a blind pop would eat the tee underneath.
49
+ name: 'a verb whose attach declined leaves the outer tee receiving (no-match exit)',
50
+ run: async (ctx) => {
51
+ const { outer } = await runTestVerbUnderOuterTee({ commands: COMMANDS, prefix: PREFIX, positionals: ['project:does-not-exist'] });
52
+ ctx.expect(outer.includes('after the verb')).toBe(true);
53
+ },
54
+ },
55
+ {
56
+ name: 'a verb whose attach declined leaves the outer tee receiving (green exit)',
57
+ run: async (ctx) => {
58
+ const { outer } = await runTestVerbUnderOuterTee({ commands: COMMANDS, prefix: PREFIX, positionals: [] });
59
+ ctx.expect(outer.includes('after the verb')).toBe(true);
60
+ },
61
+ },
42
62
  ],
43
63
  });
@@ -25,10 +25,10 @@ module.exports = defineCases({
25
25
  },
26
26
  {
27
27
  // wave-5 F1: main.js must release the deep-link boot queue after full init.
28
- name: 'main.js drains the deep-link boot queue via markManagerReady()',
28
+ name: 'main.js drains the deep-link boot queue via markOmegaReady()',
29
29
  run: (ctx) => {
30
30
  const source = fs.readFileSync(path.join(SRC, 'main.js'), 'utf8');
31
- ctx.expect(source.includes('deepLink.markManagerReady()')).toBe(true);
31
+ ctx.expect(source.includes('deepLink.markOmegaReady()')).toBe(true);
32
32
  },
33
33
  },
34
34
  ],