@omega.js/desktop 0.52.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 (273) hide show
  1. package/README.md +17 -12
  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 +11 -11
  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/AGENTS.md +17 -8
  48. package/dist/defaults/config/omega.json5 +7 -7
  49. package/dist/defaults/hooks/build/post.js +1 -1
  50. package/dist/defaults/hooks/build/pre.js +1 -1
  51. package/dist/defaults/hooks/deploy/pre.js +1 -1
  52. package/dist/defaults/hooks/release/post.js +1 -1
  53. package/dist/defaults/hooks/release/pre.js +1 -1
  54. package/dist/defaults/src/assets/js/components/about/index.js +3 -5
  55. package/dist/defaults/src/assets/js/components/main/index.js +3 -5
  56. package/dist/defaults/src/assets/js/components/settings/index.js +3 -5
  57. package/dist/defaults/src/integrations/context-menu/index.js +2 -2
  58. package/dist/defaults/src/integrations/menu/index.js +3 -3
  59. package/dist/defaults/src/integrations/tray/index.js +3 -3
  60. package/dist/defaults/src/main.js +3 -5
  61. package/dist/defaults/src/preload.js +3 -5
  62. package/dist/defaults/test/README.md +2 -2
  63. package/dist/gulp/main.js +9 -10
  64. package/dist/gulp/tasks/audit.js +7 -7
  65. package/dist/gulp/tasks/build-config.js +8 -8
  66. package/dist/gulp/tasks/bundle.js +16 -16
  67. package/dist/gulp/tasks/defaults.js +3 -3
  68. package/dist/gulp/tasks/distribute.js +2 -2
  69. package/dist/gulp/tasks/html.js +9 -9
  70. package/dist/gulp/tasks/package-quick.js +3 -3
  71. package/dist/gulp/tasks/package.js +3 -3
  72. package/dist/gulp/tasks/release.js +3 -3
  73. package/dist/gulp/tasks/sass.js +6 -6
  74. package/dist/gulp/tasks/serve.js +4 -4
  75. package/dist/hooks/notarize-artifacts.js +1 -1
  76. package/dist/hooks/notarize.js +1 -1
  77. package/dist/index.js +5 -8
  78. package/dist/lib/_environment-mixin.js +50 -0
  79. package/dist/lib/_lifecycle-mixin.js +45 -0
  80. package/dist/lib/analytics.js +33 -35
  81. package/dist/lib/app-state.js +14 -14
  82. package/dist/lib/auth-flow.js +18 -18
  83. package/dist/lib/auth-persistence.js +12 -12
  84. package/dist/lib/auth.js +421 -0
  85. package/dist/lib/auto-updater.js +49 -49
  86. package/dist/lib/context-menu.js +13 -13
  87. package/dist/lib/context.js +19 -19
  88. package/dist/lib/deep-link.js +34 -34
  89. package/dist/lib/fontawesome.js +5 -5
  90. package/dist/lib/ipc.js +4 -4
  91. package/dist/lib/menu.js +25 -25
  92. package/dist/lib/protocol.js +5 -5
  93. package/dist/lib/remote-config.js +22 -22
  94. package/dist/lib/remote-scripts.js +21 -21
  95. package/dist/lib/restart-manager/index.js +28 -28
  96. package/dist/lib/sign-helpers/exec-with-limit.js +1 -1
  97. package/dist/lib/sign-helpers/sign-events.js +1 -1
  98. package/dist/lib/startup.js +18 -13
  99. package/dist/lib/storage.js +10 -10
  100. package/dist/lib/templating.js +16 -16
  101. package/dist/lib/theme.js +10 -10
  102. package/dist/lib/tray.js +27 -27
  103. package/dist/lib/usage.js +11 -11
  104. package/dist/lib/window-manager.js +26 -26
  105. package/dist/main.js +398 -483
  106. package/dist/preload.js +236 -176
  107. package/dist/renderer.js +417 -391
  108. package/dist/test/fixtures/consumer-app/config/omega.json5 +1 -1
  109. package/dist/test/fixtures/consumer-app/src/assets/js/components/main/index.js +8 -11
  110. package/dist/test/fixtures/consumer-app/src/main.js +5 -7
  111. package/dist/test/fixtures/consumer-app/src/preload.js +2 -2
  112. package/dist/test/harness/boot-entry.js +22 -20
  113. package/dist/test/harness/main-entry.js +31 -30
  114. package/dist/test/harness/renderer-entry.js +5 -5
  115. package/dist/test/harness/renderer-preload.js +137 -141
  116. package/dist/test/index.js +10 -10
  117. package/dist/test/runner.js +2 -2
  118. package/dist/test/runners/boot.js +7 -6
  119. package/dist/test/runners/electron.js +3 -2
  120. package/dist/test/runners/render-event.js +2 -2
  121. package/dist/test/suites/boot/consumer-app-boots.test.js +57 -26
  122. package/dist/test/suites/boot/restart-manager.test.js +2 -2
  123. package/dist/test/suites/boot/storage-bundled.test.js +5 -5
  124. package/dist/test/suites/boot/theme.test.js +13 -13
  125. package/dist/test/suites/build/audit.test.js +1 -1
  126. package/dist/test/suites/build/auth-persistence-resolve.test.js +6 -6
  127. package/dist/test/suites/build/boot-fixture.test.js +2 -2
  128. package/dist/test/suites/build/boot-runner-timeout.test.js +6 -5
  129. package/dist/test/suites/build/brand-scss.test.js +1 -1
  130. package/dist/test/suites/build/build-json-bake.test.js +1 -1
  131. package/dist/test/suites/build/cli.test.js +2 -2
  132. package/dist/test/suites/build/config-schema.test.js +5 -5
  133. package/dist/test/suites/build/defaults-scaffold.test.js +2 -2
  134. package/dist/test/suites/build/deploy-hook.test.js +3 -3
  135. package/dist/test/suites/build/ensure-target.test.js +2 -2
  136. package/dist/test/suites/build/env-delivery.test.js +2 -2
  137. package/dist/test/suites/build/esm-only-dependency.test.js +2 -2
  138. package/dist/test/suites/build/exports.test.js +9 -8
  139. package/dist/test/suites/build/get-config.test.js +4 -4
  140. package/dist/test/suites/build/manifest-deps.test.js +1 -1
  141. package/dist/test/suites/build/merge-line-files.test.js +1 -1
  142. package/dist/test/suites/build/omega-shell.test.js +34 -2
  143. package/dist/test/suites/build/omega.test.js +350 -0
  144. package/dist/test/suites/build/renderer-auth-bridge.test.js +211 -78
  145. package/dist/test/suites/build/runner.test.js +2 -2
  146. package/dist/test/suites/build/sentry.test.js +2 -2
  147. package/dist/test/suites/build/sign-windows-e2e.test.js +2 -2
  148. package/dist/test/suites/build/templating.test.js +3 -3
  149. package/dist/test/suites/build/test-stealth.test.js +7 -9
  150. package/dist/test/suites/build/url-helpers.test.js +55 -56
  151. package/dist/test/suites/build/validate-config.test.js +2 -2
  152. package/dist/test/suites/build/wave5-pins.test.js +2 -2
  153. package/dist/test/suites/main/analytics.test.js +59 -59
  154. package/dist/test/suites/main/app-state.test.js +66 -66
  155. package/dist/test/suites/main/auth-flow.test.js +41 -41
  156. package/dist/test/suites/main/auth-persistence.test.js +54 -43
  157. package/dist/test/suites/main/{client-bridge.integration.test.js → auth.integration.test.js} +10 -9
  158. package/dist/test/suites/main/auth.test.js +336 -0
  159. package/dist/test/suites/main/auto-updater.test.js +134 -134
  160. package/dist/test/suites/main/boot-sequence.test.js +37 -49
  161. package/dist/test/suites/main/context-menu.test.js +51 -50
  162. package/dist/test/suites/main/context.test.js +25 -25
  163. package/dist/test/suites/main/deep-link.test.js +74 -74
  164. package/dist/test/suites/main/fontawesome.test.js +27 -27
  165. package/dist/test/suites/main/ipc.test.js +35 -35
  166. package/dist/test/suites/main/menu.test.js +101 -100
  167. package/dist/test/suites/main/protocol.test.js +19 -19
  168. package/dist/test/suites/main/remote-config.test.js +63 -63
  169. package/dist/test/suites/main/remote-scripts.test.js +103 -103
  170. package/dist/test/suites/main/request.test.js +71 -0
  171. package/dist/test/suites/main/restart-manager.test.js +33 -33
  172. package/dist/test/suites/main/startup-paths-and-ua.test.js +4 -4
  173. package/dist/test/suites/main/startup.test.js +26 -26
  174. package/dist/test/suites/main/stealth-window.test.js +1 -1
  175. package/dist/test/suites/main/storage.test.js +25 -25
  176. package/dist/test/suites/main/theme.test.js +34 -34
  177. package/dist/test/suites/main/tray.test.js +79 -79
  178. package/dist/test/suites/main/url-helpers.test.js +133 -133
  179. package/dist/test/suites/main/usage.test.js +25 -25
  180. package/dist/test/suites/main/window-bounds.test.js +27 -27
  181. package/dist/test/suites/main/window-manager.test.js +44 -44
  182. package/dist/test/suites/renderer/analytics-bridge.test.js +5 -5
  183. package/dist/test/suites/renderer/cross-context-helpers.test.js +37 -31
  184. package/dist/test/suites/renderer/round-trip.test.js +3 -3
  185. package/dist/test/suites/renderer/tooltips.test.js +15 -15
  186. package/dist/test/suites/renderer/{window-em-surface.test.js → window-desktop-surface.test.js} +27 -7
  187. package/dist/test/utils/extended-mode-warning.js +1 -1
  188. package/dist/utils/boot-harness.js +56 -0
  189. package/dist/utils/mode-helpers.js +2 -15
  190. package/dist/utils/ship-keys.js +3 -3
  191. package/dist/utils/signing-status.js +51 -0
  192. package/dist/utils/test-events.js +7 -0
  193. package/dist/utils/test-stealth.js +6 -6
  194. package/dist/utils/url-helpers.js +52 -42
  195. package/dist/utils/user-agent.js +44 -0
  196. package/dist/vendor/account/engine.js +3 -3
  197. package/dist/vendor/account/index.js +14 -45
  198. package/dist/vendor/account/resolve-account.js +44 -0
  199. package/dist/vendor/account/schema.js +1 -1
  200. package/dist/vendor/account/user.js +99 -0
  201. package/dist/vendor/config/client-config.js +1 -1
  202. package/dist/vendor/config/environment.js +11 -30
  203. package/dist/vendor/config/index.js +8 -11
  204. package/dist/vendor/config/load.js +1 -2
  205. package/dist/vendor/config/platforms.js +1 -1
  206. package/dist/vendor/config/retired-keys.js +2 -2
  207. package/dist/vendor/config/schema.js +5 -8
  208. package/dist/vendor/config/site-global.js +2 -3
  209. package/dist/vendor/config/validate.js +1 -2
  210. package/dist/vendor/config/winback.js +1 -1
  211. package/dist/vendor/devkit/actions-secrets.js +1 -1
  212. package/dist/vendor/devkit/attach-log-file.js +1 -1
  213. package/dist/vendor/devkit/build-json.js +1 -1
  214. package/dist/vendor/devkit/cli-router.js +3 -4
  215. package/dist/vendor/devkit/defaults-engine.js +9 -11
  216. package/dist/vendor/devkit/local.js +2 -0
  217. package/dist/vendor/devkit/merge-line-files.js +2 -3
  218. package/dist/vendor/devkit/test/runner-core.js +6 -6
  219. package/dist/vendor/monitoring/env.js +2 -2
  220. package/dist/vendor/monitoring/index.js +1 -1
  221. package/dist/vendor/monitoring/main.js +1 -1
  222. package/dist/vendor/monitoring/preload.js +1 -1
  223. package/dist/vendor/monitoring/renderer.js +1 -1
  224. package/docs/analytics.md +8 -8
  225. package/docs/app-state.md +19 -19
  226. package/docs/audit.md +4 -4
  227. package/docs/{client-bridge.md → auth.md} +88 -73
  228. package/docs/auto-updater.md +8 -8
  229. package/docs/boot-sequence.md +11 -6
  230. package/docs/build-system.md +1 -1
  231. package/docs/cdp-debugging.md +1 -1
  232. package/docs/common-mistakes.md +7 -7
  233. package/docs/config-schema.md +1 -1
  234. package/docs/context-menu.md +13 -13
  235. package/docs/context.md +11 -11
  236. package/docs/css.md +3 -9
  237. package/docs/deep-link.md +25 -25
  238. package/docs/environment-detection.md +16 -16
  239. package/docs/fontawesome.md +7 -5
  240. package/docs/hooks.md +8 -8
  241. package/docs/index.md +38 -27
  242. package/docs/ipc.md +10 -10
  243. package/docs/lib-modules.md +9 -9
  244. package/docs/logging.md +12 -14
  245. package/docs/menu.md +18 -18
  246. package/docs/remote-config.md +9 -9
  247. package/docs/remote-scripts.md +12 -12
  248. package/docs/restart-manager.md +8 -8
  249. package/docs/sentry.md +4 -4
  250. package/docs/shared/analytics.md +1 -1
  251. package/docs/shared/breaking-changes.md +79 -13
  252. package/docs/shared/config.md +17 -21
  253. package/docs/shared/logging.md +1 -1
  254. package/docs/shared/monitoring.md +5 -5
  255. package/docs/shared/testing.md +2 -2
  256. package/docs/shared/theming.md +1 -1
  257. package/docs/shared/translation.md +19 -10
  258. package/docs/startup.md +16 -16
  259. package/docs/storage.md +11 -11
  260. package/docs/templating.md +3 -3
  261. package/docs/test-boot-layer.md +12 -12
  262. package/docs/test-framework.md +17 -17
  263. package/docs/themes.md +7 -7
  264. package/docs/tooltips.md +2 -2
  265. package/docs/tray.md +31 -31
  266. package/docs/usage.md +7 -7
  267. package/docs/verts.md +1 -1
  268. package/docs/windows.md +22 -22
  269. package/package.json +3 -4
  270. package/dist/lib/client-bridge.js +0 -374
  271. package/dist/lib/logger.js +0 -4
  272. package/dist/test/suites/build/manager.test.js +0 -213
  273. package/dist/test/suites/main/client-bridge.test.js +0 -262
@@ -1,10 +1,8 @@
1
1
  // applyDefaults(config) — the shared OMEGA defaults-scaffolding engine.
2
2
  //
3
3
  // Every framework ships a defaults tree (src/defaults/ → dist/defaults/) that
4
- // setup copies into the consumer project. The copy rules lived as two divergent
5
- // implementations (BXM's gulp FILE_MAP task — the real one — and EM's plain-fs
6
- // copyDefaults; UJM carries a third copy of the BXM shape). This is the single
7
- // plain-fs engine, a normalized superset of both.
4
+ // setup copies into the consumer project. This is the single plain-fs engine
5
+ // every framework's scaffold runs.
8
6
  //
9
7
  // File-map rules: minimatch patterns (dot:true) matched against the RAW path
10
8
  // relative to defaultsDir, last-match-wins option merging. Per-rule options:
@@ -28,7 +26,7 @@
28
26
  // Engine built-ins (not expressed in the file map):
29
27
  // - `_.name` segments lose the leading `_` (dotfiles ship past npm's filter)
30
28
  // - non-final segments starting `_` (but not `_.`) are ARCHIVE dirs — skipped
31
- // (reference material that ships in the framework package, e.g. EM's `_mas/`)
29
+ // (reference material that ships in the framework package, e.g. desktop's `_mas/`)
32
30
  // - `.gitkeep` creates the destination directory, the file itself never copies
33
31
  // - `.DS_Store` never copies
34
32
  // - text writes are skipped when the destination is byte-identical (idempotent
@@ -46,7 +44,7 @@ const { minimatch } = require('minimatch');
46
44
  const { mergeLineBasedFiles, hasSectionMarkers, getCustomSection } = require('./merge-line-files');
47
45
 
48
46
  // Files with these extensions copy byte-for-byte and never go through
49
- // template/merge/transform (matches BXM's binary detection list).
47
+ // template/merge/transform.
50
48
  const BINARY_EXTENSIONS = /\.(jpg|jpeg|png|gif|webp|svg|ico|woff|woff2|ttf|otf|eot|pdf|zip|tar|gz|mp3|mp4|avi|mov)$/i;
51
49
 
52
50
  const RULE_DEFAULTS = {
@@ -70,7 +68,7 @@ const RULE_DEFAULTS = {
70
68
  * @param {Object<string, object>} [config.fileMap] - minimatch pattern → rule options (see header)
71
69
  * @param {string[]} [config.files] - Only process these absolute source paths (watch single-file mode)
72
70
  * @param {Function} [config.transform] - `(contents, item) => contents` global hook, run on every
73
- * non-binary file after per-rule processing (BXM's site-token templating pass)
71
+ * non-binary file after per-rule processing (e.g. extension's site-token templating pass)
74
72
  * @param {object} [config.logger] - `{ log, warn, error }` (defaults to console)
75
73
  * @returns {{ written: string[], merged: string[], skipped: string[], removed: string[] }} destination-relative paths per outcome
76
74
  */
@@ -202,7 +200,7 @@ function applyDefaults(config) {
202
200
  let didMerge = false;
203
201
 
204
202
  // Per-rule template render happens BEFORE merging, so merges compare
205
- // rendered framework defaults against the consumer's file (EM semantic).
203
+ // rendered framework defaults against the consumer's file.
206
204
  if (options.template) {
207
205
  contents = renderTemplate(contents, options.template);
208
206
  }
@@ -309,7 +307,7 @@ function strippedSegments(segments) {
309
307
  return segments.map((s) => (s.startsWith('_.') ? s.slice(1) : s));
310
308
  }
311
309
 
312
- // Last-match-wins option resolution across the file map (BXM's getFileOptions).
310
+ // Last-match-wins option resolution across the file map.
313
311
  function resolveOptions(relativePath, fileMap) {
314
312
  let options = { ...RULE_DEFAULTS };
315
313
 
@@ -323,7 +321,7 @@ function resolveOptions(relativePath, fileMap) {
323
321
  return options;
324
322
  }
325
323
 
326
- // Minimal `{{ key.path }}` substitution (EM's tolerant renderer — the standard).
324
+ // Minimal `{{ key.path }}` substitution, tolerant of unknown keys.
327
325
  // Unknown keys render as the original `{{ ... }}` string, so non-template content
328
326
  // with literal braces (e.g. GitHub Actions `${{ secrets.X }}`) survives.
329
327
  function renderTemplate(content, context) {
@@ -334,7 +332,7 @@ function renderTemplate(content, context) {
334
332
  });
335
333
  }
336
334
 
337
- // JSON5 defaults merge (BXM's mergeConfigs): framework defaults provide shape and
335
+ // JSON5 defaults merge: framework defaults provide shape and
338
336
  // order; the consumer's values win unless they're the literal string 'default';
339
337
  // consumer-only keys survive at every nesting level, EXCEPT one holding the
340
338
  // 'default' sentinel, which is the framework's own unset marker and drops (#926).
@@ -1981,6 +1981,8 @@ module.exports = {
1981
1981
  findBrandRoot,
1982
1982
  discoverTargets,
1983
1983
  frameworkPackagesOf,
1984
+ resolvePackageRealDir,
1985
+ isLocalCheckout,
1984
1986
  linkLocalPackages,
1985
1987
  restoreRegistrySpecs,
1986
1988
  resolveLinkedMonorepo,
@@ -1,7 +1,6 @@
1
1
  // Merge line-based files (.env, .gitignore, AGENTS.md) during framework setup —
2
- // the OMEGA marker-section protocol. Canonical version is EM's (it added .env
3
- // double-quote normalization and order-safe key substitution over the older
4
- // BXM/UJM inline copies) plus @omega.js/backend's custom-key promotion (a key the framework
2
+ // the OMEGA marker-section protocol: .env double-quote normalization,
3
+ // order-safe key substitution, and custom-key promotion (a key the framework
5
4
  // newly adopts into its Default section is promoted UP from the user's Custom
6
5
  // section with their value, instead of appearing empty in Default and set in
7
6
  // Custom).
@@ -1,7 +1,7 @@
1
1
  // Shared test-runner core for the OMEGA frameworks — discovery, suite/group/standalone
2
- // execution, filtering, skip semantics, init hooks, and reporting. Extracted from UJM's
3
- // runner (the canonical 3-layer build/page/boot model); BXM/EM/UJM differ only in title,
4
- // package name, CLI target alias, and their special layers — all injected via config.
2
+ // execution, filtering, skip semantics, init hooks, and reporting, on the 3-layer
3
+ // build/page/boot model. The frameworks differ only in title, package name, CLI
4
+ // target alias, and their special layers — all injected via config.
5
5
  //
6
6
  // Test-definition forms supported (see each framework's test/index.js for docs):
7
7
  // - Standalone: module.exports = { layer, description, run, cleanup, timeout, skip };
@@ -12,7 +12,7 @@
12
12
  // Suites stop on first failure (sequential, share state). Groups run all tests regardless.
13
13
  //
14
14
  // createRunner(config) config surface:
15
- // title — heading printed at the top of a run ('Browser Extension Manager Tests')
15
+ // title — heading printed at the top of a run ('OMEGA Extension Tests')
16
16
  // packageName — framework npm name; cwd package === this ⇒ framework self-test mode
17
17
  // (framework boot/ suites only run in self-test mode — they assert on
18
18
  // the framework's own fixture consumer)
@@ -28,7 +28,7 @@
28
28
  // options, results, projectRoot }) => void }]
29
29
  // The callback owns runner loading, skip messaging, and results
30
30
  // mutation — framework glue stays framework-side.
31
- // bootDefaultTimeout — per-test default for boot-layer inspect() (UJM/BXM 20000, EM 15000)
31
+ // bootDefaultTimeout — per-test default for boot-layer inspect() (each framework's runner sets its own)
32
32
  // boot: { run: async ({ tests, suites, options, results, projectRoot }) => void }
33
33
  // Called with the aggregated flat boot test list plus the boot-BOUND
34
34
  // suites (at least one of the two is non-empty).
@@ -37,7 +37,7 @@
37
37
  // partitions that FILE into the boot layer whatever its `layer` says,
38
38
  // and hands it to boot.run WHOLE (`suites: [{ file, mod }]`) instead
39
39
  // of flattening it into the inspect list: for suites that need the
40
- // boot lane's built app but run their own way (EM's `view:` renderer
40
+ // boot lane's built app but run their own way (desktop's `view:` renderer
41
41
  // suites). Default: () => false. An array-form file is never bound.
42
42
 
43
43
  const path = require('path');
@@ -21,7 +21,7 @@
21
21
  * signal with its own opinion: a build-mode run of a development artifact
22
22
  * reported as production, and a packaged production app whose lane did not
23
23
  * carry the flag reported as development. @omega.js/backend still passes its
24
- * own answer in (`Manager.isProduction()`), and a boolean a host supplies
24
+ * own answer in (`omega.isProduction()`), and a boolean a host supplies
25
25
  * always wins.
26
26
  */
27
27
 
@@ -30,7 +30,7 @@ const { isProduction } = require('../config/environment.js');
30
30
  /**
31
31
  * Read the environment gates for core.resolveConfig().
32
32
  * @param {object} [host] - the host's own signals, and the context the one
33
- * environment is read off (a Manager carrying the baked `config`)
33
+ * environment is read off (an Omega instance carrying the baked `config`)
34
34
  * @param {boolean} [host.isProduction] - overrides the one environment's answer
35
35
  * @param {boolean} [host.allowInDev] - the host's own dev opt-in (e.g. @omega.js/backend's `reportErrorsInDev`)
36
36
  * @returns {{ killed: boolean, killedReason: string|null, isProduction: boolean, allowInDev: boolean }}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * The @omega.js/monitoring entry — the Electron context-aware delegator (#380).
3
- * Lifted from @omega.js/desktop's lib/sentry/index.js: a desktop Manager
3
+ * Lifted from @omega.js/desktop's lib/sentry/index.js: a desktop Omega instance
4
4
  * singleton requires this file from whichever process it is in, and every call
5
5
  * forwards to the right per-context module.
6
6
  *
@@ -25,7 +25,7 @@ const main = {
25
25
  _Sentry: null,
26
26
 
27
27
  /**
28
- * @param {object} host - the desktop Manager: { config, getVersion() }
28
+ * @param {object} host - the desktop Omega instance: { config, getVersion() }
29
29
  */
30
30
  initialize(host) {
31
31
  main._initialized = true;
@@ -18,7 +18,7 @@ const preload = {
18
18
  _enabled: false,
19
19
 
20
20
  /**
21
- * @param {object} host - the desktop Manager: { config }
21
+ * @param {object} host - the desktop Omega instance: { config }
22
22
  */
23
23
  initialize(host) {
24
24
  const { shouldEnable, reason } = resolveConfig(host && host.config && host.config.monitoring, readGates(host));
@@ -21,7 +21,7 @@ const renderer = {
21
21
  _Sentry: null,
22
22
 
23
23
  /**
24
- * @param {object} host - the desktop Manager: { config, getVersion() }
24
+ * @param {object} host - the desktop Omega instance: { config, getVersion() }
25
25
  */
26
26
  initialize(host) {
27
27
  renderer._initialized = true;
package/docs/analytics.md CHANGED
@@ -51,11 +51,11 @@ The `bundle` task's esbuild `define` bakes `process.env.GOOGLE_ANALYTICS_SECRET`
51
51
  ## API
52
52
 
53
53
  ```js
54
- manager.analytics.event('button_click', { button_id: 'cta' });
55
- manager.analytics.pageview('/settings');
56
- manager.analytics.screenview('SettingsScreen');
57
- manager.analytics.setUserProperties({ plan: 'premium', trial: false });
58
- manager.analytics.setUserId('firebase-uid-abc'); // usually wired automatically
54
+ omega.analytics.event('button_click', { button_id: 'cta' });
55
+ omega.analytics.pageview('/settings');
56
+ omega.analytics.screenview('SettingsScreen');
57
+ omega.analytics.setUserProperties({ plan: 'premium', trial: false });
58
+ omega.analytics.setUserId('firebase-uid-abc'); // usually wired automatically
59
59
  ```
60
60
 
61
61
  Same surface in renderer:
@@ -71,10 +71,10 @@ The renderer surface is fire-and-forget IPC (`ipcRenderer.send`) for events; onl
71
71
 
72
72
  ## The renderer NEVER sends — it forwards ([#411](https://github.com/Omega-JS-Stack/omega/issues/411))
73
73
 
74
- A renderer's own `omega.analytics().event(...)` — the embedded @omega.js/client, the surface a vert click or a permission prompt fires through — routes to the bridge above and is delivered by the MAIN process's sender. There is exactly one sender per install:
74
+ A renderer's own `omega.analytics.event(...)` (the embedded @omega.js/client, the surface a vert click or a permission prompt fires through) routes to the bridge above and is delivered by the MAIN process's sender. There is exactly one sender per install:
75
75
 
76
76
  ```
77
- renderer: omega.analytics().event('vert_click', { … })
77
+ renderer: omega.analytics.event('vert_click', { … })
78
78
  → @omega.js/client reads config.analyticsBridge (src/renderer.js injects the
79
79
  preload's window.desktop.analytics when it boots the client)
80
80
  → ipcRenderer.send('desktop:analytics:event', { name, params })
@@ -136,5 +136,5 @@ free-typed string here.
136
136
  ## Tests
137
137
 
138
138
  - `src/test/suites/main/analytics.test.js` — disabled paths, uuidv5 stability, the catalog contract (canonical name in, GA4 descriptor out; unknown names never post), queueing, auth-bridge wiring, IPC handlers, secret-not-leaked guard.
139
- - `src/test/suites/renderer/analytics-bridge.test.js` — renderer-side surface shape, `getStatus` round-trip, and the #411 pin: a renderer-originated `omega.analytics().event(...)` reaches main's sender exactly once, and the payload GA would receive carries main's `client_id` and main's session id, while the bridged client holds no secret and no device id of its own (the harness hands it credentials on purpose). The harness taps main's transport (`harness/main-entry.js`) so a renderer suite can read back what the sender was handed — a test run never reaches a real GA property. Harness fidelity, stated plainly: it drives the real client and the real IPC channel into the real main-process sender, but the client runs in the preload world holding the bridge object directly, not the contextBridge proxy a page bundle gets — the proxy hop is the one link this pin does not exercise.
139
+ - `src/test/suites/renderer/analytics-bridge.test.js`: renderer-side surface shape, `getStatus` round-trip, and the #411 pin: a renderer-originated `omega.analytics.event(...)` reaches main's sender exactly once, and the payload GA would receive carries main's `client_id` and main's session id, while the bridged client holds no secret and no device id of its own (the harness hands it credentials on purpose). The harness taps main's transport (`harness/main-entry.js`) so a renderer suite can read back what the sender was handed: a test run never reaches a real GA property. Harness fidelity, stated plainly: it drives the real client and the real IPC channel into the real main-process sender, but the client runs in the preload world holding the bridge object directly, not the contextBridge proxy a page bundle gets, the proxy hop is the one link this pin does not exercise.
140
140
  - `packages/client/test/analytics.test.js` — the client half: the bridge is the injected config value alone (a planted `window.desktop` bridges nothing), a bridged client drops credentials and mints no device id, an uncatalogued name never leaves the renderer, and a forward that throws never reaches the caller.
package/docs/app-state.md CHANGED
@@ -2,24 +2,24 @@
2
2
 
3
3
  Storage-backed launch flags + crash sentinel. Tells you *whether* this is the first launch ever, *how many* times the app has launched, *whether* the previous run crashed, and *whether* the version changed.
4
4
 
5
- ## Public API on `manager.appState`
5
+ ## Public API on `omega.appState`
6
6
 
7
7
  ```js
8
- manager.appState.isFirstLaunch() // boolean — true ONLY on the very first boot
9
- manager.appState.getLaunchCount() // number — total successful launches (including this one)
10
- manager.appState.getInstalledAt() // Date — first ever launch timestamp
11
- manager.appState.getLastLaunchAt() // Date | null — previous launch (null on first)
12
- manager.appState.getLastQuitAt() // Date | null — previous graceful quit; null if it crashed
13
- manager.appState.recoveredFromCrash() // boolean — previous run did not exit cleanly
8
+ omega.appState.isFirstLaunch() // boolean: true ONLY on the very first boot
9
+ omega.appState.getLaunchCount() // number: total successful launches (including this one)
10
+ omega.appState.getInstalledAt() // Date: first ever launch timestamp
11
+ omega.appState.getLastLaunchAt() // Date | null: previous launch (null on first)
12
+ omega.appState.getLastQuitAt() // Date | null: previous graceful quit; null if it crashed
13
+ omega.appState.recoveredFromCrash() // boolean: previous run did not exit cleanly
14
14
 
15
- manager.appState.getVersion() // string | null — package version of this launch
16
- manager.appState.getPreviousVersion() // string | null — version before this launch
17
- manager.appState.wasUpgraded() // boolean — true if THIS launch's version differs from the prior
15
+ omega.appState.getVersion() // string | null: package version of this launch
16
+ omega.appState.getPreviousVersion() // string | null: version before this launch
17
+ omega.appState.wasUpgraded() // boolean: true if THIS launch's version differs from the prior
18
18
 
19
- manager.appState.launchedAtLogin() // boolean — OS booted us via openAtLogin
20
- manager.appState.launchedFromDeepLink() // boolean — argv had a deep-link payload (set by lib/deep-link)
19
+ omega.appState.launchedAtLogin() // boolean: OS booted us via openAtLogin
20
+ omega.appState.launchedFromDeepLink() // boolean: argv had a deep-link payload (set by lib/deep-link)
21
21
 
22
- manager.appState.reset() // wipe persisted state (test helper / factory-reset command)
22
+ omega.appState.reset() // wipe persisted state (test helper / factory-reset command)
23
23
  ```
24
24
 
25
25
  ## Storage shape (key `appState`)
@@ -66,24 +66,24 @@ appState.getPreviousVersion() // '1.0.0' (preserved — useful for "what's new"
66
66
  ### Show onboarding on first launch
67
67
 
68
68
  ```js
69
- if (manager.appState.isFirstLaunch()) {
70
- manager.windows.show('onboarding');
69
+ if (omega.appState.isFirstLaunch()) {
70
+ omega.windows.show('onboarding');
71
71
  }
72
72
  ```
73
73
 
74
74
  ### Crash report ping
75
75
 
76
76
  ```js
77
- if (manager.appState.recoveredFromCrash()) {
78
- manager.sentry.captureMessage('recovered from crash', 'warning');
77
+ if (omega.appState.recoveredFromCrash()) {
78
+ omega.sentry.captureMessage('recovered from crash', 'warning');
79
79
  }
80
80
  ```
81
81
 
82
82
  ### What's new modal after upgrade
83
83
 
84
84
  ```js
85
- if (manager.appState.wasUpgraded()) {
86
- manager.windows.show('changelog');
85
+ if (omega.appState.wasUpgraded()) {
86
+ omega.windows.show('changelog');
87
87
  }
88
88
  ```
89
89
 
package/docs/audit.md CHANGED
@@ -24,10 +24,10 @@ Mirrored across all four OMEGA frameworks (UJM / @omega.js/backend / BXM / @omeg
24
24
  |----|-----|-------|-------|
25
25
  | U-01 | HIGH | B | Every feature has tests at EVERY layer it surfaces (build / main / renderer / boot) — never mocked, real harness only ([test-framework.md](test-framework.md)) |
26
26
  | U-02 | HIGH | B | Test hygiene — real-external-API tests gated behind `TEST_EXTENDED_MODE` in-source (not mocked); no tests that assert nothing ([test-framework.md](test-framework.md)) |
27
- | U-03 | CRIT | B | XSS — renderer DOM sinks escape untrusted values inline via `omega.utilities().escapeHTML(value)` (+ `sanitizeURL` for URL sinks); zero local escape helpers (rules mirror UJM/BXM `docs/xss-prevention.md`; see also DSK-01 for navigation sinks) |
28
- | U-04 | HIGH | B | @omega.js/client owns Firebase — never `require('firebase')`; renderers use `omega.auth()` / `.firestore()`, main uses `manager.omega` ([common-mistakes.md](common-mistakes.md), [client-bridge.md](client-bridge.md)) |
27
+ | U-03 | CRIT | B | XSS: renderer DOM sinks escape untrusted values inline via `omega.utilities.escapeHTML(value)` (+ `sanitizeURL` for URL sinks); zero local escape helpers (rules mirror @omega.js/web and @omega.js/extension `docs/xss-prevention.md`; see also DSK-01 for navigation sinks) |
28
+ | U-04 | HIGH | B | @omega.js/client owns Firebase: never `require('firebase')`; renderers use `omega.auth` / `omega.firestore`, main uses `omega.auth` ([common-mistakes.md](common-mistakes.md), [auth.md](auth.md)) |
29
29
  | U-05 | HIGH | C | No @omega.js/desktop transitive deps installed in the consumer `package.json` (`firebase`, `@omega.js/client`, `fs-jetpack`, …) — the bundle task's framework-deps hook resolves them ([common-mistakes.md](common-mistakes.md)) |
30
- | U-06 | HIGH | B | Env behavior gated on the INTENTIONAL check — `isProduction()` or `isDevelopment() \|\| isTesting()`, never `!isDevelopment()`; no ad-hoc `process.env.EM_*` reads where a helper exists ([environment-detection.md](environment-detection.md)) |
30
+ | U-06 | HIGH | B | Env behavior gated on the INTENTIONAL check: `isProduction()` or `isDevelopment() \|\| isTesting()`, never `!isDevelopment()`; no ad-hoc `process.env` reads where a helper exists ([environment-detection.md](environment-detection.md)) |
31
31
  | U-07 | HIGH | B | Config canon — `config/omega.json5` validates against the schema (boot validator green); canonical cross-framework blocks (`brand`, `app`, `cloud.{provider,config}`, `monitoring`, `analytics`, `payment`) not reinvented ([config-schema.md](config-schema.md)) |
32
32
  | U-08 | CRIT | B | No private credentials committed — signing certs (`config/certs/` gitignored), `.env` secrets, tokens, API secret keys ([signing.md](signing.md)). (The Firebase WEB `apiKey` is public by design — do NOT flag it.) |
33
33
  | U-09 | HIGH | B | Source discipline — nothing edited in `dist/` or generated files (`dist/electron-builder.yml`, entitlements plist); no live code referencing `_legacy/` / `_backup/` ([build-system.md](build-system.md), [common-mistakes.md](common-mistakes.md)) |
@@ -44,7 +44,7 @@ Mirrored across all four OMEGA frameworks (UJM / @omega.js/backend / BXM / @omeg
44
44
  | DSK-01 | CRIT | B | Zero-trust URLs — every DYNAMIC URL is gated through `sanitize-url.js` before `shell.openExternal` / `BrowserWindow.loadURL` / `window.location.href =` (hardcoded internal-scheme URLs bypass) ([the framework guide](../../../docs/desktop/index.md) §File Conventions, [common-mistakes.md](common-mistakes.md)) |
45
45
  | DSK-02 | HIGH | B | Path resolution — `app.getAppPath()` / `utils/app-root.js`, never `process.cwd()`, in runtime code (it's `/` in packaged apps) ([common-mistakes.md](common-mistakes.md)) |
46
46
  | DSK-03 | HIGH | C | Windows — every `windows.create()` is `await`ed; the `main` window is ALWAYS created (even hidden launches, with `show: false`) so activate/second-instance can surface UI ([windows.md](windows.md), [common-mistakes.md](common-mistakes.md)) |
47
- | DSK-04 | HIGH | B | Zero-trust IPC — all channels go through `manager.ipc` (never raw `ipcMain`); handlers validate payload content before acting, especially in apps embedding remote web content ([ipc.md](ipc.md#zero-trust-payloads)) |
47
+ | DSK-04 | HIGH | B | Zero-trust IPC: all channels go through `omega.ipc` (never raw `ipcMain`); handlers validate payload content before acting, especially in apps embedding remote web content ([ipc.md](ipc.md#zero-trust-payloads)) |
48
48
  | DSK-05 | MED | C | Icons — one native-size PNG per slot (no `@2x` siblings), macOS tray source named `tray.png` (@omega.js/desktop owns the `Template` rename), no `app.icons` config block ([icons.md](icons.md)) |
49
49
  | DSK-06 | HIGH | C | File-based integrations — tray/menu/context-menu logic lives in `src/integrations/<name>/index.js`, never expressed in config JSON ([tray.md](tray.md), [menu.md](menu.md), [context-menu.md](context-menu.md)) |
50
50
  | DSK-07 | HIGH | B | Presence-driven feature flags — credentials enable features (`monitoring.providers.sentry.dsn`, `analytics.providers.google.id`, `cloud.config`); no invented `enabled:` toggles ([config-schema.md](config-schema.md)) |