@omega.js/desktop 0.51.0 → 0.53.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 (289) hide show
  1. package/README.md +18 -13
  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.js +1 -1
  26. package/dist/commands/build.js +2 -2
  27. package/dist/commands/cdp/capture.js +2 -2
  28. package/dist/commands/cdp/quit.js +2 -2
  29. package/dist/commands/cdp/relaunch.js +2 -2
  30. package/dist/commands/cdp/theme.js +1 -1
  31. package/dist/commands/clean.js +2 -2
  32. package/dist/commands/deploy.js +4 -4
  33. package/dist/commands/finalize-release.js +4 -4
  34. package/dist/commands/install.js +3 -3
  35. package/dist/commands/launch.js +2 -2
  36. package/dist/commands/lib/deploy-precheck.js +3 -3
  37. package/dist/commands/lib/ensure-target.js +6 -6
  38. package/dist/commands/package.js +2 -2
  39. package/dist/commands/publish.js +2 -2
  40. package/dist/commands/release.js +3 -3
  41. package/dist/commands/runner.js +145 -48
  42. package/dist/commands/sign-windows.js +5 -5
  43. package/dist/commands/test.js +4 -4
  44. package/dist/commands/update.js +2 -2
  45. package/dist/commands/validate-certs.js +4 -4
  46. package/dist/commands/version.js +3 -3
  47. package/dist/defaults/.github/workflows/build.yml +2 -0
  48. package/dist/defaults/AGENTS.md +17 -8
  49. package/dist/defaults/config/omega.json5 +7 -7
  50. package/dist/defaults/hooks/build/post.js +1 -1
  51. package/dist/defaults/hooks/build/pre.js +1 -1
  52. package/dist/defaults/hooks/deploy/pre.js +1 -1
  53. package/dist/defaults/hooks/release/post.js +1 -1
  54. package/dist/defaults/hooks/release/pre.js +1 -1
  55. package/dist/defaults/src/assets/js/components/about/index.js +3 -5
  56. package/dist/defaults/src/assets/js/components/main/index.js +3 -5
  57. package/dist/defaults/src/assets/js/components/settings/index.js +3 -5
  58. package/dist/defaults/src/integrations/context-menu/index.js +2 -2
  59. package/dist/defaults/src/integrations/menu/index.js +3 -3
  60. package/dist/defaults/src/integrations/tray/index.js +3 -3
  61. package/dist/defaults/src/main.js +3 -5
  62. package/dist/defaults/src/preload.js +3 -5
  63. package/dist/defaults/test/README.md +2 -2
  64. package/dist/gulp/main.js +9 -10
  65. package/dist/gulp/tasks/audit.js +7 -7
  66. package/dist/gulp/tasks/build-config.js +8 -8
  67. package/dist/gulp/tasks/bundle.js +16 -16
  68. package/dist/gulp/tasks/defaults.js +3 -3
  69. package/dist/gulp/tasks/distribute.js +2 -2
  70. package/dist/gulp/tasks/html.js +9 -9
  71. package/dist/gulp/tasks/package-quick.js +3 -3
  72. package/dist/gulp/tasks/package.js +3 -3
  73. package/dist/gulp/tasks/release.js +3 -3
  74. package/dist/gulp/tasks/sass.js +6 -6
  75. package/dist/gulp/tasks/serve.js +4 -4
  76. package/dist/hooks/notarize-artifacts.js +1 -1
  77. package/dist/hooks/notarize.js +1 -1
  78. package/dist/index.js +5 -8
  79. package/dist/lib/_environment-mixin.js +50 -0
  80. package/dist/lib/_lifecycle-mixin.js +45 -0
  81. package/dist/lib/analytics.js +33 -35
  82. package/dist/lib/app-state.js +14 -14
  83. package/dist/lib/auth-flow.js +18 -18
  84. package/dist/lib/auth-persistence.js +12 -12
  85. package/dist/lib/auth.js +421 -0
  86. package/dist/lib/auto-updater.js +49 -49
  87. package/dist/lib/context-menu.js +13 -13
  88. package/dist/lib/context.js +19 -19
  89. package/dist/lib/deep-link.js +34 -34
  90. package/dist/lib/fontawesome.js +5 -5
  91. package/dist/lib/ipc.js +4 -4
  92. package/dist/lib/menu.js +25 -25
  93. package/dist/lib/protocol.js +5 -5
  94. package/dist/lib/remote-config.js +22 -22
  95. package/dist/lib/remote-scripts.js +21 -21
  96. package/dist/lib/restart-manager/index.js +28 -28
  97. package/dist/lib/sign-helpers/exec-with-limit.js +1 -1
  98. package/dist/lib/sign-helpers/sign-events.js +1 -1
  99. package/dist/lib/startup.js +18 -13
  100. package/dist/lib/storage.js +10 -10
  101. package/dist/lib/templating.js +16 -16
  102. package/dist/lib/theme.js +10 -10
  103. package/dist/lib/tray.js +27 -27
  104. package/dist/lib/usage.js +11 -11
  105. package/dist/lib/window-manager.js +26 -26
  106. package/dist/main.js +398 -483
  107. package/dist/preload.js +236 -176
  108. package/dist/renderer.js +417 -391
  109. package/dist/runner/job-started.js +1 -1
  110. package/dist/test/fixtures/consumer-app/config/omega.json5 +1 -1
  111. package/dist/test/fixtures/consumer-app/src/assets/js/components/main/index.js +8 -11
  112. package/dist/test/fixtures/consumer-app/src/main.js +5 -7
  113. package/dist/test/fixtures/consumer-app/src/preload.js +2 -2
  114. package/dist/test/harness/boot-entry.js +22 -20
  115. package/dist/test/harness/main-entry.js +31 -30
  116. package/dist/test/harness/renderer-entry.js +5 -5
  117. package/dist/test/harness/renderer-preload.js +137 -141
  118. package/dist/test/index.js +10 -10
  119. package/dist/test/runner.js +2 -2
  120. package/dist/test/runners/boot.js +7 -6
  121. package/dist/test/runners/electron.js +3 -2
  122. package/dist/test/runners/render-event.js +2 -2
  123. package/dist/test/suites/boot/consumer-app-boots.test.js +57 -26
  124. package/dist/test/suites/boot/restart-manager.test.js +2 -2
  125. package/dist/test/suites/boot/storage-bundled.test.js +5 -5
  126. package/dist/test/suites/boot/theme.test.js +13 -13
  127. package/dist/test/suites/build/audit.test.js +1 -1
  128. package/dist/test/suites/build/auth-persistence-resolve.test.js +6 -6
  129. package/dist/test/suites/build/boot-fixture.test.js +2 -2
  130. package/dist/test/suites/build/boot-runner-timeout.test.js +6 -5
  131. package/dist/test/suites/build/brand-scss.test.js +1 -1
  132. package/dist/test/suites/build/build-json-bake.test.js +1 -1
  133. package/dist/test/suites/build/cli.test.js +2 -2
  134. package/dist/test/suites/build/config-schema.test.js +5 -5
  135. package/dist/test/suites/build/defaults-scaffold.test.js +2 -2
  136. package/dist/test/suites/build/deploy-hook.test.js +3 -3
  137. package/dist/test/suites/build/ensure-target.test.js +2 -2
  138. package/dist/test/suites/build/env-delivery.test.js +2 -2
  139. package/dist/test/suites/build/esm-only-dependency.test.js +2 -2
  140. package/dist/test/suites/build/exports.test.js +9 -8
  141. package/dist/test/suites/build/get-config.test.js +4 -4
  142. package/dist/test/suites/build/manifest-deps.test.js +1 -1
  143. package/dist/test/suites/build/merge-line-files.test.js +1 -1
  144. package/dist/test/suites/build/omega-shell.test.js +34 -2
  145. package/dist/test/suites/build/omega.test.js +350 -0
  146. package/dist/test/suites/build/renderer-auth-bridge.test.js +211 -78
  147. package/dist/test/suites/build/runner.test.js +612 -5
  148. package/dist/test/suites/build/sentry.test.js +2 -2
  149. package/dist/test/suites/build/sign-windows-e2e.test.js +2 -2
  150. package/dist/test/suites/build/templating.test.js +3 -3
  151. package/dist/test/suites/build/test-stealth.test.js +7 -9
  152. package/dist/test/suites/build/url-helpers.test.js +55 -56
  153. package/dist/test/suites/build/validate-config.test.js +2 -2
  154. package/dist/test/suites/build/wave5-pins.test.js +2 -2
  155. package/dist/test/suites/main/analytics.test.js +59 -59
  156. package/dist/test/suites/main/app-state.test.js +66 -66
  157. package/dist/test/suites/main/auth-flow.test.js +41 -41
  158. package/dist/test/suites/main/auth-persistence.test.js +54 -43
  159. package/dist/test/suites/main/{client-bridge.integration.test.js → auth.integration.test.js} +10 -9
  160. package/dist/test/suites/main/auth.test.js +336 -0
  161. package/dist/test/suites/main/auto-updater.test.js +134 -134
  162. package/dist/test/suites/main/boot-sequence.test.js +37 -49
  163. package/dist/test/suites/main/context-menu.test.js +51 -50
  164. package/dist/test/suites/main/context.test.js +25 -25
  165. package/dist/test/suites/main/deep-link.test.js +74 -74
  166. package/dist/test/suites/main/fontawesome.test.js +27 -27
  167. package/dist/test/suites/main/ipc.test.js +35 -35
  168. package/dist/test/suites/main/menu.test.js +101 -100
  169. package/dist/test/suites/main/protocol.test.js +19 -19
  170. package/dist/test/suites/main/remote-config.test.js +63 -63
  171. package/dist/test/suites/main/remote-scripts.test.js +103 -103
  172. package/dist/test/suites/main/request.test.js +71 -0
  173. package/dist/test/suites/main/restart-manager.test.js +33 -33
  174. package/dist/test/suites/main/startup-paths-and-ua.test.js +4 -4
  175. package/dist/test/suites/main/startup.test.js +26 -26
  176. package/dist/test/suites/main/stealth-window.test.js +1 -1
  177. package/dist/test/suites/main/storage.test.js +25 -25
  178. package/dist/test/suites/main/theme.test.js +34 -34
  179. package/dist/test/suites/main/tray.test.js +79 -79
  180. package/dist/test/suites/main/url-helpers.test.js +133 -133
  181. package/dist/test/suites/main/usage.test.js +25 -25
  182. package/dist/test/suites/main/window-bounds.test.js +27 -27
  183. package/dist/test/suites/main/window-manager.test.js +44 -44
  184. package/dist/test/suites/renderer/analytics-bridge.test.js +5 -5
  185. package/dist/test/suites/renderer/cross-context-helpers.test.js +37 -31
  186. package/dist/test/suites/renderer/round-trip.test.js +3 -3
  187. package/dist/test/suites/renderer/tooltips.test.js +15 -15
  188. package/dist/test/suites/renderer/{window-em-surface.test.js → window-desktop-surface.test.js} +27 -7
  189. package/dist/test/utils/extended-mode-warning.js +1 -1
  190. package/dist/utils/boot-harness.js +56 -0
  191. package/dist/utils/mode-helpers.js +2 -15
  192. package/dist/utils/ship-keys.js +3 -3
  193. package/dist/utils/signing-status.js +51 -0
  194. package/dist/utils/test-events.js +7 -0
  195. package/dist/utils/test-stealth.js +6 -6
  196. package/dist/utils/url-helpers.js +52 -42
  197. package/dist/utils/user-agent.js +44 -0
  198. package/dist/vendor/account/engine.js +3 -3
  199. package/dist/vendor/account/index.js +14 -45
  200. package/dist/vendor/account/resolve-account.js +44 -0
  201. package/dist/vendor/account/schema.js +1 -1
  202. package/dist/vendor/account/user.js +99 -0
  203. package/dist/vendor/config/client-config.js +1 -1
  204. package/dist/vendor/config/environment.js +11 -30
  205. package/dist/vendor/config/index.js +13 -12
  206. package/dist/vendor/config/load.js +1 -2
  207. package/dist/vendor/config/platforms.js +1 -1
  208. package/dist/vendor/config/repo.js +24 -0
  209. package/dist/vendor/config/retired-keys.js +2 -2
  210. package/dist/vendor/config/schema.js +5 -8
  211. package/dist/vendor/config/site-global.js +2 -3
  212. package/dist/vendor/config/validate.js +1 -2
  213. package/dist/vendor/config/winback.js +1 -1
  214. package/dist/vendor/devkit/actions-secrets.js +1 -1
  215. package/dist/vendor/devkit/attach-log-file.js +1 -1
  216. package/dist/vendor/devkit/brand-version.js +162 -1
  217. package/dist/vendor/devkit/build-json.js +1 -1
  218. package/dist/vendor/devkit/cli-router.js +3 -4
  219. package/dist/vendor/devkit/defaults-engine.js +9 -11
  220. package/dist/vendor/devkit/deploy.js +64 -4
  221. package/dist/vendor/devkit/git-remote.js +78 -1
  222. package/dist/vendor/devkit/local.js +53 -3
  223. package/dist/vendor/devkit/lockfile.js +127 -0
  224. package/dist/vendor/devkit/merge-line-files.js +2 -3
  225. package/dist/vendor/devkit/pack-local.js +4 -7
  226. package/dist/vendor/devkit/preludes/origin-heal.js +35 -49
  227. package/dist/vendor/devkit/target-secrets.js +34 -45
  228. package/dist/vendor/devkit/test/runner-core.js +6 -6
  229. package/dist/vendor/monitoring/env.js +2 -2
  230. package/dist/vendor/monitoring/index.js +1 -1
  231. package/dist/vendor/monitoring/main.js +1 -1
  232. package/dist/vendor/monitoring/preload.js +1 -1
  233. package/dist/vendor/monitoring/renderer.js +1 -1
  234. package/docs/analytics.md +8 -8
  235. package/docs/app-state.md +19 -19
  236. package/docs/audit.md +4 -4
  237. package/docs/{client-bridge.md → auth.md} +88 -73
  238. package/docs/auto-updater.md +8 -8
  239. package/docs/boot-sequence.md +11 -6
  240. package/docs/build-system.md +1 -1
  241. package/docs/cdp-debugging.md +1 -1
  242. package/docs/common-mistakes.md +7 -7
  243. package/docs/config-schema.md +1 -1
  244. package/docs/context-menu.md +13 -13
  245. package/docs/context.md +11 -11
  246. package/docs/css.md +3 -9
  247. package/docs/deep-link.md +25 -25
  248. package/docs/environment-detection.md +16 -16
  249. package/docs/fontawesome.md +7 -5
  250. package/docs/hooks.md +8 -8
  251. package/docs/index.md +39 -28
  252. package/docs/ipc.md +10 -10
  253. package/docs/lib-modules.md +9 -9
  254. package/docs/logging.md +12 -14
  255. package/docs/menu.md +18 -18
  256. package/docs/releasing.md +4 -2
  257. package/docs/remote-config.md +9 -9
  258. package/docs/remote-scripts.md +12 -12
  259. package/docs/restart-manager.md +8 -8
  260. package/docs/runner.md +12 -10
  261. package/docs/sentry.md +4 -4
  262. package/docs/shared/analytics.md +1 -1
  263. package/docs/shared/brands.md +1 -1
  264. package/docs/shared/breaking-changes.md +79 -13
  265. package/docs/shared/config.md +24 -21
  266. package/docs/shared/deploys.md +30 -7
  267. package/docs/shared/local-dev.md +5 -3
  268. package/docs/shared/logging.md +1 -1
  269. package/docs/shared/monitoring.md +5 -5
  270. package/docs/shared/testing.md +2 -2
  271. package/docs/shared/theming.md +1 -1
  272. package/docs/shared/translation.md +19 -10
  273. package/docs/signing.md +1 -1
  274. package/docs/startup.md +16 -16
  275. package/docs/storage.md +11 -11
  276. package/docs/templating.md +3 -3
  277. package/docs/test-boot-layer.md +12 -12
  278. package/docs/test-framework.md +17 -17
  279. package/docs/themes.md +7 -7
  280. package/docs/tooltips.md +2 -2
  281. package/docs/tray.md +31 -31
  282. package/docs/usage.md +7 -7
  283. package/docs/verts.md +1 -1
  284. package/docs/windows.md +22 -22
  285. package/package.json +3 -4
  286. package/dist/lib/client-bridge.js +0 -374
  287. package/dist/lib/logger.js +0 -4
  288. package/dist/test/suites/build/manager.test.js +0 -213
  289. package/dist/test/suites/main/client-bridge.test.js +0 -262
@@ -1,8 +1,8 @@
1
- // Boot-layer self-test — @omega.js/desktop's analog of "does the extension load?" (BXM) / "does the
2
- // site boot?" (UJM). The boot runner esbuild-builds the bundled fixture consumer
1
+ // Boot-layer self-test — @omega.js/desktop's analog of "does the extension load?" /
2
+ // "does the site boot?". The boot runner esbuild-builds the bundled fixture consumer
3
3
  // (src/test/fixtures/consumer-app) into a real main.bundle.js, spawns Electron with
4
4
  // it (the actual production boot path — bundled, not the unbundled lib code that the
5
- // `main` layer exercises), then runs these inspects against the live manager.
5
+ // `main` layer exercises), then runs these inspects against the live omega instance.
6
6
  //
7
7
  // In @omega.js/desktop's own test run, OMEGA_TEST_BOOT_PROJECT points at the fixture (auto-set in
8
8
  // src/commands/test.js when the cwd is the @omega.js/desktop repo). In a real consumer's
@@ -11,7 +11,7 @@
11
11
  // boot tests under <cwd>/test/boot/.
12
12
  //
13
13
  // NOTE: inspect bodies are serialized to the spawned Electron process — no closures over
14
- // module scope. `require`, `process`, and `Buffer` are injected; { manager, expect,
14
+ // module scope. `require`, `process`, and `Buffer` are injected; { omega, expect,
15
15
  // projectRoot, appRoot, frameworkDistRoot, distSnapshotBefore } is the inspect argument
16
16
  // (projectRoot = the fixture root; appRoot = the staged target root holding the build).
17
17
 
@@ -24,25 +24,25 @@ module.exports = defineCases({
24
24
  timeout: 30000,
25
25
  tests: [
26
26
  {
27
- description: 'manager initialized with all core libs wired',
28
- inspect: async ({ manager, expect }) => {
29
- expect(manager).toBeTruthy();
30
- expect(manager._initialized).toBe(true);
31
- for (const lib of ['storage', 'ipc', 'windows', 'tray', 'menu', 'contextMenu', 'omega']) {
32
- expect(Boolean(manager[lib])).toBe(true);
27
+ description: 'omega initialized with all core libs wired',
28
+ inspect: async ({ omega, expect }) => {
29
+ expect(omega).toBeTruthy();
30
+ expect(omega._initialized).toBe(true);
31
+ for (const lib of ['storage', 'ipc', 'windows', 'tray', 'menu', 'contextMenu', 'auth']) {
32
+ expect(Boolean(omega[lib])).toBe(true);
33
33
  }
34
34
  },
35
35
  },
36
36
 
37
37
  {
38
38
  description: 'the fixture main.js created the main window and loaded the built view',
39
- inspect: async ({ manager, expect }) => {
39
+ inspect: async ({ omega, expect }) => {
40
40
  const { BrowserWindow } = require('electron');
41
41
 
42
42
  // windows.create() runs inside the consumer's initialize().then(); poll for it.
43
43
  let url = '';
44
44
  for (let i = 0; i < 40; i++) {
45
- const win = manager.windows.get('main') || BrowserWindow.getAllWindows()[0];
45
+ const win = omega.windows.get('main') || BrowserWindow.getAllWindows()[0];
46
46
  if (win && !win.isDestroyed()) {
47
47
  url = win.webContents.getURL();
48
48
  if (url.includes('/views/main/')) break;
@@ -50,23 +50,23 @@ module.exports = defineCases({
50
50
  await new Promise((resolve) => setTimeout(resolve, 100));
51
51
  }
52
52
 
53
- expect(Boolean(manager.windows.get('main'))).toBe(true);
53
+ expect(Boolean(omega.windows.get('main'))).toBe(true);
54
54
  expect(url.includes('/views/main/')).toBe(true);
55
55
  },
56
56
  },
57
57
 
58
58
  {
59
59
  description: 'test stealth: app activation suppressed — dock hidden (macOS)',
60
- inspect: async ({ manager, expect }) => {
60
+ inspect: async ({ omega, expect }) => {
61
61
  if (process.platform !== 'darwin') {
62
62
  return; // accessory activation policy / dock is macOS-only
63
63
  }
64
- // Manager.initialize step 1a hides the dock under the stealth predicate,
64
+ // omega.initialize step 1a hides the dock under the stealth predicate,
65
65
  // so the spawned consumer app never activates and never steals keyboard
66
66
  // focus from the developer's editor.
67
67
  const { app } = require('electron');
68
68
  expect(app.dock.isVisible()).toBe(false);
69
- expect(manager.isTesting()).toBe(true);
69
+ expect(omega.isTesting()).toBe(true);
70
70
  },
71
71
  },
72
72
 
@@ -83,8 +83,8 @@ module.exports = defineCases({
83
83
  {
84
84
  // #111 — the fixture's renderer entry imports the vendored app-shell
85
85
  // module through the `__main_assets__` alias. Its declarative contract
86
- // showing up in the built bundle proves the whole chain: esbuild alias →
87
- // @omega.js/desktop's vendored dist asset → its @omega.js/client import.
86
+ // showing up in the built bundle proves the chain: esbuild alias →
87
+ // @omega.js/desktop's vendored dist asset.
88
88
  description: 'renderer bundle carries the vendored app-shell module via __main_assets__',
89
89
  inspect: async ({ expect, appRoot }) => {
90
90
  const fs = require('fs');
@@ -105,12 +105,12 @@ module.exports = defineCases({
105
105
  // line the bridge logs next is out of reach here, because the fixture's
106
106
  // `cloud.config` is empty and this boot never initializes Firebase auth.)
107
107
  description: 'the booted app runs in the lane environment, not the one baked into its bundle (#925)',
108
- inspect: async ({ manager, expect, projectRoot }) => {
108
+ inspect: async ({ omega, expect, projectRoot }) => {
109
109
  const fs = require('fs');
110
110
  const path = require('path');
111
111
 
112
- expect(manager.isTesting()).toBe(true);
113
- expect(manager.config.environment).toBe('production'); // the artifact IS a production build
112
+ expect(omega.isTesting()).toBe(true);
113
+ expect(omega.config.environment).toBe('production'); // the artifact IS a production build
114
114
 
115
115
  const log = fs.readFileSync(path.join(projectRoot, 'logs', 'runtime.log'), 'utf8');
116
116
  expect(log.includes('auth persistence: none (test mode)')).toBe(true);
@@ -118,11 +118,11 @@ module.exports = defineCases({
118
118
  },
119
119
 
120
120
  {
121
- // #925: a page has no `process`, so its Manager reads the baked word. The
121
+ // #925: a page has no `process`, so its instance reads the baked word. The
122
122
  // preload hands the running one over on `window.desktop`, and the renderer
123
123
  // bootstrap applies it, so this window answers what main answers.
124
124
  description: 'the main window renderer answers the lane environment too (#925)',
125
- inspect: async ({ manager, expect }) => {
125
+ inspect: async ({ omega, expect }) => {
126
126
  const { BrowserWindow } = require('electron');
127
127
 
128
128
  // The window is created in the consumer's initialize().then(), and its
@@ -131,10 +131,10 @@ module.exports = defineCases({
131
131
  let answer = null;
132
132
  let win = null;
133
133
  for (let i = 0; i < 40; i++) {
134
- win = manager.windows.get('main') || BrowserWindow.getAllWindows()[0];
134
+ win = omega.windows.get('main') || BrowserWindow.getAllWindows()[0];
135
135
  if (win && !win.isDestroyed() && !win.webContents.isLoading()) {
136
136
  answer = await win.webContents.executeJavaScript(
137
- 'window.__omegaManager && window.__omegaManager.config ? window.__omegaManager.getEnvironment() : null',
137
+ 'window.__omegaInstance && window.__omegaInstance.config.environment ? window.__omegaInstance.getEnvironment() : null',
138
138
  );
139
139
  if (answer) break;
140
140
  }
@@ -146,7 +146,38 @@ module.exports = defineCases({
146
146
 
147
147
  expect(baked).toBe('production'); // what the build baked
148
148
  expect(bridged).toBe('testing'); // what the preload read off the lane
149
- expect(answer).toBe('testing'); // what the renderer's Manager answers
149
+ expect(answer).toBe('testing'); // what the renderer's instance answers
150
+ },
151
+ },
152
+
153
+ {
154
+ // The renderer builds `omega.shell` from ITSELF with the vendored app
155
+ // shell's createShell(omega), exactly as web builds it; the fixture binds
156
+ // the same export through the `__main_assets__` alias (#111).
157
+ description: 'the main window renderer carries omega.shell, built by createShell(omega)',
158
+ inspect: async ({ omega, expect }) => {
159
+ const { BrowserWindow } = require('electron');
160
+
161
+ let probe = null;
162
+ for (let i = 0; i < 40; i++) {
163
+ const win = omega.windows.get('main') || BrowserWindow.getAllWindows()[0];
164
+ if (win && !win.isDestroyed() && !win.webContents.isLoading()) {
165
+ probe = await win.webContents.executeJavaScript(`(() => {
166
+ const instance = window.__omegaInstance;
167
+ if (!instance || !instance.shell) return null;
168
+ return {
169
+ createShell: typeof window.__omegaCreateShell,
170
+ isCollapsed: typeof instance.shell.isCollapsed,
171
+ toggleOpen: typeof instance.shell.toggleOpen,
172
+ desktopIsBridge: instance.desktop === window.desktop,
173
+ };
174
+ })()`);
175
+ if (probe) break;
176
+ }
177
+ await new Promise((resolve) => setTimeout(resolve, 100));
178
+ }
179
+
180
+ expect(probe).toEqual({ createShell: 'function', isCollapsed: 'function', toggleOpen: 'function', desktopIsBridge: true });
150
181
  },
151
182
  },
152
183
  ],
@@ -16,8 +16,8 @@ module.exports = defineCases({
16
16
  tests: [
17
17
  {
18
18
  description: 'restartManager wired, bailed as testing, nothing scheduled',
19
- inspect: async ({ manager, expect }) => {
20
- const rm = manager.restartManager;
19
+ inspect: async ({ omega, expect }) => {
20
+ const rm = omega.restartManager;
21
21
  expect(Boolean(rm)).toBe(true);
22
22
  for (const fn of ['register', 'unregister', 'ensureInstalled', 'ensureRunning', 'getStatus', 'shutdown']) {
23
23
  expect(typeof rm[fn]).toBe('function');
@@ -40,19 +40,19 @@ module.exports = defineCases({
40
40
 
41
41
  {
42
42
  description: 'storage is a REAL store through the bundle (not the no-op fallback)',
43
- inspect: async ({ manager, expect }) => {
43
+ inspect: async ({ omega, expect }) => {
44
44
  const fs = require('fs');
45
45
 
46
46
  // The no-op fallback leaves _store null → getPath() null and get() always default.
47
- manager.storage.set('desktop:boot:storageProof', 'bundled');
48
- expect(manager.storage.get('desktop:boot:storageProof')).toBe('bundled');
47
+ omega.storage.set('desktop:boot:storageProof', 'bundled');
48
+ expect(omega.storage.get('desktop:boot:storageProof')).toBe('bundled');
49
49
 
50
- const storePath = manager.storage.getPath();
50
+ const storePath = omega.storage.getPath();
51
51
  expect(Boolean(storePath)).toBe(true);
52
52
  expect(storePath.endsWith('omega-storage.json')).toBe(true);
53
53
  expect(fs.existsSync(storePath)).toBe(true);
54
54
 
55
- manager.storage.delete('desktop:boot:storageProof');
55
+ omega.storage.delete('desktop:boot:storageProof');
56
56
  },
57
57
  },
58
58
  ],
@@ -16,39 +16,39 @@ module.exports = defineCases({
16
16
  tests: [
17
17
  {
18
18
  description: 'page boots with data-bs-theme equal to the resolved appearance',
19
- inspect: async ({ manager, expect }) => {
19
+ inspect: async ({ omega, expect }) => {
20
20
  const { BrowserWindow } = require('electron');
21
21
 
22
- expect(manager.theme._initialized).toBe(true);
23
- expect(['light', 'dark'].includes(manager.theme.resolved())).toBe(true);
22
+ expect(omega.theme._initialized).toBe(true);
23
+ expect(['light', 'dark'].includes(omega.theme.resolved())).toBe(true);
24
24
 
25
25
  // Wait for the fixture's main window + view, then for the applier to land
26
26
  // (it applies at DOMContentLoaded).
27
27
  let attr = null;
28
28
  for (let i = 0; i < 50; i++) {
29
- const win = manager.windows.get('main') || BrowserWindow.getAllWindows()[0];
29
+ const win = omega.windows.get('main') || BrowserWindow.getAllWindows()[0];
30
30
  if (win && !win.isDestroyed() && win.webContents.getURL().includes('/views/main/')) {
31
31
  attr = await win.webContents.executeJavaScript('document.documentElement.getAttribute("data-bs-theme")').catch(() => null);
32
- if (attr === manager.theme.resolved()) break;
32
+ if (attr === omega.theme.resolved()) break;
33
33
  }
34
34
  await new Promise((resolve) => setTimeout(resolve, 100));
35
35
  }
36
36
 
37
- expect(attr).toBe(manager.theme.resolved());
37
+ expect(attr).toBe(omega.theme.resolved());
38
38
  },
39
39
  },
40
40
 
41
41
  {
42
42
  description: 'main-side theme.set() updates the live page attribute (no reload)',
43
- inspect: async ({ manager, expect }) => {
43
+ inspect: async ({ omega, expect }) => {
44
44
  const { BrowserWindow } = require('electron');
45
- const win = manager.windows.get('main') || BrowserWindow.getAllWindows()[0];
45
+ const win = omega.windows.get('main') || BrowserWindow.getAllWindows()[0];
46
46
  expect(Boolean(win && !win.isDestroyed())).toBe(true);
47
47
 
48
- const original = manager.theme.get();
49
- const target = manager.theme.resolved() === 'dark' ? 'light' : 'dark';
48
+ const original = omega.theme.get();
49
+ const target = omega.theme.resolved() === 'dark' ? 'light' : 'dark';
50
50
 
51
- manager.theme.set(target);
51
+ omega.theme.set(target);
52
52
 
53
53
  let attr = null;
54
54
  for (let i = 0; i < 50; i++) {
@@ -58,8 +58,8 @@ module.exports = defineCases({
58
58
  }
59
59
 
60
60
  // Restore before asserting so a failure can't strand the flipped state.
61
- manager.theme.set(original);
62
- manager.storage.delete('theme.appearance');
61
+ omega.theme.set(original);
62
+ omega.storage.delete('theme.appearance');
63
63
 
64
64
  expect(attr).toBe(target);
65
65
  },
@@ -12,7 +12,7 @@ const defineCases = require('../../../vendor/devkit/test/define-cases.js');
12
12
  const auditPath = path.join(__dirname, '..', '..', '..', 'gulp', 'tasks', 'audit.js');
13
13
 
14
14
  function freshAudit() {
15
- // Clear require cache so each test gets a clean module (it instantiates Manager at require time).
15
+ // Clear require cache so each test gets a clean module (it loads the build module at require time).
16
16
  delete require.cache[require.resolve(auditPath)];
17
17
  return require(auditPath);
18
18
  }
@@ -3,7 +3,7 @@
3
3
  //
4
4
  // The managers are plain objects and `available()` is stubbed, so the production
5
5
  // default is provable with no Electron and, above all, with no call into this box's
6
- // OS keychain. The real-manager half lives in the main suite, which now runs under
6
+ // OS keychain. The real-instance half lives in the main suite, which now runs under
7
7
  // the forced test-mode strategy itself.
8
8
 
9
9
  const path = require('path');
@@ -41,7 +41,7 @@ module.exports = defineCases({
41
41
  description: 'auth-persistence resolve(): the production default, and the test-mode override',
42
42
  tests: [
43
43
  {
44
- name: 'a production manager with no config still picks safeStorage; an unknown name warns to null',
44
+ name: 'a production omega instance with no config still picks safeStorage; an unknown name warns to null',
45
45
  run: async (ctx) => {
46
46
  const vault = stubSafeStorage();
47
47
  const lines = [];
@@ -63,7 +63,7 @@ module.exports = defineCases({
63
63
  },
64
64
  },
65
65
  {
66
- name: 'a testing manager gets none before any config read, and the vault is never asked',
66
+ name: 'a testing omega instance gets none before any config read, and the vault is never asked',
67
67
  run: async (ctx) => {
68
68
  const vault = stubSafeStorage();
69
69
  const lines = [];
@@ -97,13 +97,13 @@ module.exports = defineCases({
97
97
  // explicit one alone ([#925](https://github.com/Omega-JS-Stack/omega/issues/925)),
98
98
  // and so the real isTesting() answers the lane, not the bake.
99
99
  process.env[ENVIRONMENT_VAR] = 'testing';
100
- const manager = {
100
+ const omega = {
101
101
  config: { environment: 'production', omega: { authPersistence: 'safeStorage' } },
102
102
  isTesting,
103
103
  };
104
- ctx.expect(manager.isTesting()).toBe(true);
104
+ ctx.expect(omega.isTesting()).toBe(true);
105
105
 
106
- const active = await capture(lines, () => authPersistence.resolve(manager));
106
+ const active = await capture(lines, () => authPersistence.resolve(omega));
107
107
  ctx.expect(active).toBeNull();
108
108
  ctx.expect(vault.calls.available).toBe(0);
109
109
  ctx.expect(lines.join('\n')).toMatch(/auth persistence: none \(test mode\)/);
@@ -15,9 +15,9 @@
15
15
 
16
16
  const path = require('path');
17
17
 
18
- const Manager = require('../../../build.js');
18
+ const build = require('../../../build.js');
19
19
 
20
- const package = Manager.getPackage('main');
20
+ const package = build.getPackage('main');
21
21
  const fixture = require(path.join(__dirname, '..', '..', 'fixtures', 'consumer-app', 'package.json'));
22
22
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
23
23
 
@@ -15,6 +15,7 @@ const jetpack = require('fs-jetpack');
15
15
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
16
16
 
17
17
  const { runBootChild } = require(path.join(__dirname, '..', '..', 'runners', 'boot.js'));
18
+ const { TEST_EVENT_PREFIX } = require(path.join(__dirname, '..', '..', '..', 'utils', 'test-events.js'));
18
19
 
19
20
  // A project root the runner reads its report clue from. `logLine` null writes no
20
21
  // logs/ at all, the boot that died before the logger ever opened a file.
@@ -152,11 +153,11 @@ module.exports = defineCases({
152
153
  killGraceMs: 20,
153
154
  });
154
155
 
155
- child.stdout.emit('data', `__EM_TEST__${JSON.stringify({ event: 'result', name: 'the app boots', passed: true, duration: 12 })}\n`);
156
+ child.stdout.emit('data', `${TEST_EVENT_PREFIX}${JSON.stringify({ event: 'result', name: 'the app boots', passed: true, duration: 12 })}\n`);
156
157
  await sleep(150);
157
- child.stdout.emit('data', `__EM_TEST__${JSON.stringify({ event: 'result', name: 'a slow suite finishes', passed: true, duration: 12 })}\n`);
158
+ child.stdout.emit('data', `${TEST_EVENT_PREFIX}${JSON.stringify({ event: 'result', name: 'a slow suite finishes', passed: true, duration: 12 })}\n`);
158
159
  await sleep(150);
159
- child.stdout.emit('data', `__EM_TEST__${JSON.stringify({ event: 'result', name: 'and another', passed: true, duration: 12 })}\n`);
160
+ child.stdout.emit('data', `${TEST_EVENT_PREFIX}${JSON.stringify({ event: 'result', name: 'and another', passed: true, duration: 12 })}\n`);
160
161
  await sleep(150);
161
162
  child.emit('exit', 0);
162
163
 
@@ -196,7 +197,7 @@ module.exports = defineCases({
196
197
  killGraceMs: 20,
197
198
  });
198
199
 
199
- child.stdout.emit('data', `__EM_TEST__${JSON.stringify({ event: 'result', name: 'a late line', passed: true, duration: 12 })}\n`);
200
+ child.stdout.emit('data', `${TEST_EVENT_PREFIX}${JSON.stringify({ event: 'result', name: 'a late line', passed: true, duration: 12 })}\n`);
200
201
  child.emit('exit', 0);
201
202
  await sleep(40);
202
203
 
@@ -231,7 +232,7 @@ module.exports = defineCases({
231
232
  killGraceMs: 20,
232
233
  });
233
234
 
234
- child.stdout.emit('data', `__EM_TEST__${JSON.stringify({ event: 'result', name: 'the app boots', passed: true, duration: 12 })}\n`);
235
+ child.stdout.emit('data', `${TEST_EVENT_PREFIX}${JSON.stringify({ event: 'result', name: 'the app boots', passed: true, duration: 12 })}\n`);
235
236
  child.emit('exit', 0);
236
237
 
237
238
  const settled = await pending;
@@ -29,7 +29,7 @@ function stageConsumer(color) {
29
29
 
30
30
  /**
31
31
  * Run the sass task with the fixture as the project root. Both the task and the
32
- * build Manager resolve that root at REQUIRE time, so each run gets a fresh
32
+ * build module resolve that root at REQUIRE time, so each run gets a fresh
33
33
  * copy of both.
34
34
  */
35
35
  function runSassIn(dir) {
@@ -133,7 +133,7 @@ module.exports = defineCases({
133
133
  ctx.expect(blob.license.status).toBe('licensed');
134
134
  ctx.expect(typeof blob.builtAt).toBe('string');
135
135
  // The mode is the same THREE keys everywhere (#894): desktop's own
136
- // `server` verdict stays inside the Manager.
136
+ // `server` verdict stays inside the build module.
137
137
  ctx.expect(Object.keys(blob.mode).sort()).toEqual(['build', 'environment', 'publish']);
138
138
  ctx.expect(blob.mode.environment).toBe('production');
139
139
  ctx.expect(blob.mode.build).toBe(true);
@@ -3,9 +3,9 @@
3
3
  const path = require('path');
4
4
  const fs = require('fs');
5
5
 
6
- const Manager = require('../../../build.js');
6
+ const build = require('../../../build.js');
7
7
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
8
- const root = Manager.getRootPath('main');
8
+ const root = build.getRootPath('main');
9
9
 
10
10
  module.exports = defineCases({
11
11
  type: 'group',
@@ -10,9 +10,9 @@ const fs = require('fs');
10
10
  const JSON5 = require('json5');
11
11
  const { loadConfig } = require('../../../vendor/config/index.js');
12
12
 
13
- const Manager = require('../../../build.js');
13
+ const build = require('../../../build.js');
14
14
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
15
- const root = Manager.getRootPath('main');
15
+ const root = build.getRootPath('main');
16
16
  const defaultsDir = path.join(root, 'dist', 'defaults');
17
17
  const defaultConfigPath = path.join(defaultsDir, 'config', 'omega.json5');
18
18
 
@@ -76,7 +76,7 @@ module.exports = defineCases({
76
76
  name: 'resolved: has app block (appId + productName may be null — derived from brand)',
77
77
  run: (ctx) => {
78
78
  // appId and productName are derived from brand.id / brand.name at config-load
79
- // time (Manager.getConfig). The raw scaffold leaves them null on purpose so the
79
+ // time (build.getConfig). The raw scaffold leaves them null on purpose so the
80
80
  // user only sets brand.{id,name} once. The `app` block itself must exist for
81
81
  // copyright + any future explicit overrides.
82
82
  ctx.expect(ctx.state.cfg.app).toBeTruthy();
@@ -96,7 +96,7 @@ module.exports = defineCases({
96
96
  run: (ctx) => {
97
97
  // Tray, menu, and context-menu use fixed conventional paths
98
98
  // (src/integrations/{tray,menu,context-menu}/index.js). Disabling is a runtime
99
- // call (manager.tray.disable() etc.), not a config flag. Config carries no entry
99
+ // call (omega.tray.disable() etc.), not a config flag. Config carries no entry
100
100
  // for these in v1 — guard against re-introducing one accidentally.
101
101
  ctx.expect(ctx.state.cfg.tray).toBeUndefined();
102
102
  ctx.expect(ctx.state.cfg.menu).toBeUndefined();
@@ -125,7 +125,7 @@ module.exports = defineCases({
125
125
  name: 'has NO deepLinks config block (scheme = brand.id, routes are runtime)',
126
126
  run: (ctx) => {
127
127
  // deep-link scheme is auto-derived from brand.id; routes register at runtime via
128
- // manager.deepLink.on(). Guard against re-introducing a config block.
128
+ // omega.deepLink.on(). Guard against re-introducing a config block.
129
129
  ctx.expect(ctx.state.cfg.deepLinks).toBeUndefined();
130
130
  },
131
131
  },
@@ -9,11 +9,11 @@ const fs = require('fs');
9
9
  const os = require('os');
10
10
  const jetpack = require('fs-jetpack');
11
11
 
12
- const Manager = require('../../../build.js');
12
+ const build = require('../../../build.js');
13
13
  const { renderSecretsBlock } = require('../../../vendor/config/env-delivery.js');
14
14
  const { copyDefaults } = require('../../../commands/lib/ensure-target.js');
15
15
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
16
- const package = Manager.getPackage('main');
16
+ const package = build.getPackage('main');
17
17
 
18
18
  const DEFAULT_MARKER = '# ========== Default Values ==========';
19
19
  const CUSTOM_MARKER = '# ========== Custom Values ==========';
@@ -57,7 +57,7 @@ async function runDeploy(options) {
57
57
  fs.writeFileSync(path.join(tmp, 'package.json'), '{"name":"desktop-deploy-hook-test"}');
58
58
  fs.writeFileSync(
59
59
  path.join(tmp, 'hooks', 'deploy', 'pre.js'),
60
- `module.exports = async (ctx) => { global.__omegaDeployHookRan.push('deploy/pre:' + (ctx.projectRoot === process.cwd() && typeof ctx.manager === 'object' && ctx.mode === 'production' ? 'ctx ok' : 'ctx wrong')); };`,
60
+ `module.exports = async (ctx) => { global.__omegaDeployHookRan.push('deploy/pre:' + (ctx.projectRoot === process.cwd() && typeof ctx.build === 'object' && ctx.mode === 'production' ? 'ctx ok' : 'ctx wrong')); };`,
61
61
  );
62
62
 
63
63
  const restores = [
@@ -72,7 +72,7 @@ async function runDeploy(options) {
72
72
  global.__omegaDeployHookRan = ran;
73
73
 
74
74
  try {
75
- // Required BEFORE the chdir: the verb builds its Manager at load time from
75
+ // Required BEFORE the chdir: the verb loads its build module at load time from
76
76
  // the real target; only the hook lookup reads cwd, at call time.
77
77
  const deploy = require(resolved);
78
78
  process.chdir(tmp);
@@ -139,7 +139,7 @@ module.exports = defineCases({
139
139
  description: 'deploy: the consumer\'s hooks/deploy/pre.js runs before the precheck (#899)',
140
140
  tests: [
141
141
  {
142
- name: 'the hook runs after the scaffold and before the network precheck, with { manager, projectRoot, mode: production }',
142
+ name: 'the hook runs after the scaffold and before the network precheck, with { build, projectRoot, mode: production }',
143
143
  run: async (ctx) => {
144
144
  const ran = await runDeploy({});
145
145
  ctx.expect(ran).toEqual(['ensure-target', 'deploy/pre:ctx ok', 'precheck', 'STOP AT PRECHECK']);
@@ -13,13 +13,13 @@ const os = require('os');
13
13
  const jetpack = require('fs-jetpack');
14
14
 
15
15
  const SRC = path.join(__dirname, '..', '..', '..');
16
- const Manager = require(path.join(SRC, 'build.js'));
16
+ const build = require(path.join(SRC, 'build.js'));
17
17
  const { ensureTarget } = require(path.join(SRC, 'commands', 'lib', 'ensure-target.js'));
18
18
  const { deployPrecheck } = require(path.join(SRC, 'commands', 'lib', 'deploy-precheck.js'));
19
19
  const cli = require(path.join(SRC, 'cli.js'));
20
20
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
21
21
 
22
- const package = Manager.getPackage('main');
22
+ const package = build.getPackage('main');
23
23
 
24
24
  // A consumer whose peer deps are already satisfied — the steady state.
25
25
  function stageConsumer(dir) {
@@ -19,13 +19,13 @@ const { publishSecretKeys, bakeKeys, renderSecretsBlock, WORKFLOW_OWNED_KEYS } =
19
19
  const { composeTargetEnv } = require('../../../vendor/config/index.js');
20
20
 
21
21
  const SRC = path.join(__dirname, '..', '..', '..');
22
- const Manager = require(path.join(SRC, 'build.js'));
22
+ const build = require(path.join(SRC, 'build.js'));
23
23
  const { ensureTarget } = require(path.join(SRC, 'commands', 'lib', 'ensure-target.js'));
24
24
  const bundleTask = require(path.join(SRC, 'gulp', 'tasks', 'bundle.js'));
25
25
  const { collectTargetSecrets } = require('../../../vendor/devkit/target-secrets.js');
26
26
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
27
27
 
28
- const package = Manager.getPackage('main');
28
+ const package = build.getPackage('main');
29
29
 
30
30
  /** A consumer whose peer deps are already satisfied — the steady state. */
31
31
  function stageConsumer() {
@@ -4,8 +4,8 @@
4
4
  // Both Node bundles are CommonJS (`format: 'cjs'`, `platform: 'node'`), and
5
5
  // esbuild rewrites `import.meta` to `{}` in that output: a dependency doing
6
6
  // `createRequire(import.meta.url)` was handed `undefined` and threw
7
- // ERR_INVALID_ARG_VALUE the moment a packaged app booted (found porting an
8
- // electron-manager app that depends on yargs 18). @omega.js/devkit's `bundle()`
7
+ // ERR_INVALID_ARG_VALUE the moment a packaged app booted (an app that depends
8
+ // on yargs 18 does exactly that). @omega.js/devkit's `bundle()`
9
9
  // composes the answer for every cjs+node build, so nothing here wires it.
10
10
  //
11
11
  // The proof is a RUN, not a read of the bundle text: the fixture package
@@ -3,10 +3,10 @@
3
3
  const path = require('path');
4
4
  const fs = require('fs');
5
5
 
6
- const Manager = require('../../../build.js');
6
+ const build = require('../../../build.js');
7
7
  const defineCases = require('../../../vendor/devkit/test/define-cases.js');
8
- const pkg = Manager.getPackage('main');
9
- const root = Manager.getRootPath('main');
8
+ const pkg = build.getPackage('main');
9
+ const root = build.getRootPath('main');
10
10
 
11
11
  module.exports = defineCases({
12
12
  type: 'group',
@@ -28,13 +28,14 @@ module.exports = defineCases({
28
28
  },
29
29
  },
30
30
  {
31
- name: 'main / renderer / preload / build all loadable',
31
+ // main and preload load anywhere and export their instance; the renderer
32
+ // needs its preload's window.desktop, so omega.test.js loads it with one
33
+ name: 'main / preload / build all loadable',
32
34
  run: (ctx) => {
33
35
  const fromDist = (subpath) => path.join(root, 'dist', subpath);
34
- ctx.expect(typeof require(fromDist('main.js'))).toBe('function');
35
- ctx.expect(typeof require(fromDist('renderer.js'))).toBe('function');
36
- ctx.expect(typeof require(fromDist('preload.js'))).toBe('function');
37
- ctx.expect(typeof require(fromDist('build.js'))).toBe('function');
36
+ ctx.expect(typeof require(fromDist('main.js'))).toBe('object');
37
+ ctx.expect(typeof require(fromDist('preload.js'))).toBe('object');
38
+ ctx.expect(typeof require(fromDist('build.js'))).toBe('object');
38
39
  },
39
40
  },
40
41
  {
@@ -1,4 +1,4 @@
1
- // Build-layer tests for Manager.getConfig() — omega.json5 resolution + derived defaults.
1
+ // Build-layer tests for build.getConfig() — omega.json5 resolution + derived defaults.
2
2
  // Stages a temp consumer dir with a config/omega.json5, sets process.cwd()
3
3
  // at it, and asserts the resolution + derivation rules.
4
4
 
@@ -43,8 +43,8 @@ function loadConfigInDir(dir) {
43
43
  }
44
44
  try {
45
45
  process.chdir(dir);
46
- const Manager = require(path.join(__dirname, '..', '..', '..', 'build.js'));
47
- return Manager.getConfig();
46
+ const build = require(path.join(__dirname, '..', '..', '..', 'build.js'));
47
+ return build.getConfig();
48
48
  } finally {
49
49
  process.chdir(oldCwd);
50
50
  }
@@ -53,7 +53,7 @@ function loadConfigInDir(dir) {
53
53
  module.exports = defineCases({
54
54
  type: 'suite',
55
55
  layer: 'build',
56
- description: 'Manager.getConfig — omega.json5 resolution + derived defaults',
56
+ description: 'build.getConfig — omega.json5 resolution + derived defaults',
57
57
  tests: [
58
58
  {
59
59
  name: 'derives appId from the BRAND: reverse-domain of brand.url, else app.<brand.id> (friction #18)',
@@ -24,7 +24,7 @@ const SOURCE_DIRS = ['lib', 'gulp'];
24
24
  // The two specifiers that are ALLOWED to be undeclared, each one required inside a
25
25
  // try/catch whose catch is the documented behaviour, not a crash:
26
26
  // firebase @omega.js/client's own dependency; the client bridge falls back
27
- // to no-op mode when it is not there (lib/client-bridge.js)
27
+ // to no-op mode when it is not there (lib/auth.js)
28
28
  // app-builder-bin electron-builder's own dependency; blockmap generation is
29
29
  // best-effort and warns-and-skips (lib/sign-helpers/update-info.js)
30
30
  const GUARDED = new Set(['firebase', 'app-builder-bin']);
@@ -1,5 +1,5 @@
1
1
  // Build-layer tests for utils/merge-line-files.js — verify the .env / .gitignore merge convention
2
- // (BXM/UJM-style Default + Custom sections) AND the double-quote normalization for .env values.
2
+ // (Default + Custom sections) AND the double-quote normalization for .env values.
3
3
 
4
4
  const path = require('path');
5
5
  const { mergeLineBasedFiles, normalizeEnvLine, DEFAULT_MARKER, CUSTOM_MARKER } =