@omega.js/desktop 0.50.0 → 0.51.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 (267) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/css/tokens/_index.scss +1 -1
  3. package/dist/assets/themes/base/_includes/frontend/sections/account-section-header.html +4 -1
  4. package/dist/assets/themes/base/_includes/frontend/sections/footer.html +13 -6
  5. package/dist/assets/themes/base/_includes/frontend/sections/nav.html +10 -8
  6. package/dist/assets/themes/base/_includes/global/sections/account.html +3 -1
  7. package/dist/assets/themes/base/_includes/global/sections/app-sidebar.html +12 -8
  8. package/dist/assets/themes/base/_includes/global/sections/app-topbar.html +10 -6
  9. package/dist/assets/themes/base/_includes/global/sections/page-header.html +8 -4
  10. package/dist/assets/themes/base/_layouts/backend/pages/dashboard/index.html +24 -24
  11. package/dist/assets/themes/base/_layouts/frontend/pages/about.html +10 -10
  12. package/dist/assets/themes/base/_layouts/frontend/pages/account/index.html +35 -35
  13. package/dist/assets/themes/base/_layouts/frontend/pages/alternatives/index.html +4 -4
  14. package/dist/assets/themes/base/_layouts/frontend/pages/auth/signin.html +1 -1
  15. package/dist/assets/themes/base/_layouts/frontend/pages/auth/signup.html +4 -4
  16. package/dist/assets/themes/base/_layouts/frontend/pages/contact.html +3 -3
  17. package/dist/assets/themes/base/_layouts/frontend/pages/download.html +34 -33
  18. package/dist/assets/themes/base/_layouts/frontend/pages/extension/index.html +11 -11
  19. package/dist/assets/themes/base/_layouts/frontend/pages/legal/document.html +1 -1
  20. package/dist/assets/themes/base/_layouts/frontend/pages/status.html +1 -1
  21. package/dist/assets/themes/base/_layouts/frontend/pages/team/index.html +9 -7
  22. package/dist/assets/themes/base/_layouts/frontend/pages/team/member.html +5 -3
  23. package/dist/assets/themes/base/_sections/about/letter/section.html +1 -1
  24. package/dist/assets/themes/base/_sections/about/letter/section.json5 +4 -4
  25. package/dist/assets/themes/base/_sections/marketing/bento/section.html +1 -1
  26. package/dist/assets/themes/base/_sections/marketing/bento/section.json5 +15 -15
  27. package/dist/assets/themes/base/_sections/marketing/cta/section.json5 +1 -1
  28. package/dist/assets/themes/base/_sections/marketing/hero/section.html +6 -6
  29. package/dist/assets/themes/base/_sections/marketing/hero/section.json5 +10 -10
  30. package/dist/assets/themes/base/_sections/marketing/product-demo/section.html +1 -1
  31. package/dist/assets/themes/base/_sections/marketing/product-demo/section.json5 +2 -2
  32. package/dist/assets/themes/base/_sections/marketing/stats/section.html +1 -1
  33. package/dist/assets/themes/base/_sections/marketing/stats/section.json5 +5 -5
  34. package/dist/assets/themes/base/_sections/marketing/trusted-by/section.html +1 -1
  35. package/dist/assets/themes/base/_sections/marketing/trusted-by/section.json5 +2 -2
  36. package/dist/assets/themes/neobrutalism/_layouts/frontend/pages/index.html +10 -10
  37. package/dist/assets/themes/newsflash/_layouts/frontend/pages/index.html +10 -10
  38. package/dist/assets/themes/newsflash/_sections/marketing/desks/section.html +2 -2
  39. package/dist/assets/themes/newsflash/_sections/marketing/desks/section.json5 +4 -4
  40. package/dist/build.js +69 -28
  41. package/dist/cli-run.js +20 -13
  42. package/dist/cli.js +12 -7
  43. package/dist/commands/build.js +0 -2
  44. package/dist/commands/deploy.js +116 -44
  45. package/dist/commands/finalize-release.js +5 -4
  46. package/dist/commands/launch.js +12 -7
  47. package/dist/commands/lib/deploy-precheck.js +66 -34
  48. package/dist/commands/lib/ensure-target.js +71 -11
  49. package/dist/commands/package.js +0 -1
  50. package/dist/commands/publish.js +11 -4
  51. package/dist/commands/release.js +99 -252
  52. package/dist/commands/runner.js +42 -5
  53. package/dist/commands/sign-windows.js +46 -15
  54. package/dist/commands/test.js +4 -3
  55. package/dist/commands/validate-certs.js +291 -115
  56. package/dist/config/page-template.html +4 -0
  57. package/dist/defaults/.github/workflows/build.yml +144 -64
  58. package/dist/defaults/AGENTS.md +3 -2
  59. package/dist/defaults/_.gitignore +4 -2
  60. package/dist/defaults/config/certs/README.md +25 -45
  61. package/dist/defaults/config/omega.json5 +66 -32
  62. package/dist/defaults/hooks/deploy/pre.js +10 -0
  63. package/dist/defaults/src/assets/scss/main.scss +12 -2
  64. package/dist/defaults/src/integrations/tray/index.js +1 -1
  65. package/dist/gulp/main.js +13 -25
  66. package/dist/gulp/tasks/audit.js +18 -6
  67. package/dist/gulp/tasks/build-config.js +181 -60
  68. package/dist/gulp/tasks/bundle.js +108 -36
  69. package/dist/gulp/tasks/release.js +86 -4
  70. package/dist/gulp/tasks/sass.js +11 -0
  71. package/dist/hooks/lib/notarize-tools.js +137 -0
  72. package/dist/hooks/notarize-artifacts.js +57 -0
  73. package/dist/hooks/notarize.js +59 -8
  74. package/dist/lib/auth-persistence.js +25 -0
  75. package/dist/lib/client-bridge.js +11 -8
  76. package/dist/lib/deep-link.js +15 -8
  77. package/dist/lib/protocol.js +7 -1
  78. package/dist/lib/restart-manager/install.js +6 -3
  79. package/dist/lib/sign-helpers/auto-unlock.js +65 -27
  80. package/dist/lib/sign-helpers/console-lock.js +34 -0
  81. package/dist/lib/sign-helpers/exec-with-limit.js +68 -0
  82. package/dist/lib/sign-helpers/resolve-icons.js +6 -4
  83. package/dist/lib/tray.js +7 -6
  84. package/dist/main.js +16 -0
  85. package/dist/preload.js +8 -0
  86. package/dist/renderer.js +16 -4
  87. package/dist/runner/job-started.js +104 -0
  88. package/dist/test/fixtures/consumer-app/config/omega.json5 +7 -0
  89. package/dist/test/fixtures/consumer-app/package.json +1 -1
  90. package/dist/test/fixtures/consumer-app/src/assets/js/components/main/index.js +7 -1
  91. package/dist/test/harness/main-entry.js +2 -1
  92. package/dist/test/harness/renderer-preload.js +12 -3
  93. package/dist/test/runners/boot.js +101 -11
  94. package/dist/test/runners/electron.js +1 -1
  95. package/dist/test/suites/boot/consumer-app-boots.test.js +54 -0
  96. package/dist/test/suites/build/audit.test.js +45 -6
  97. package/dist/test/suites/build/auth-persistence-resolve.test.js +119 -0
  98. package/dist/test/suites/build/auto-unlock.test.js +105 -0
  99. package/dist/test/suites/build/boot-runner-timeout.test.js +253 -0
  100. package/dist/test/suites/build/brand-scss.test.js +106 -0
  101. package/dist/test/suites/build/build-config.test.js +146 -36
  102. package/dist/test/suites/build/build-json-bake.test.js +245 -0
  103. package/dist/test/suites/build/build-verbs.test.js +48 -15
  104. package/dist/test/suites/build/build-workflow-jobs.test.js +190 -0
  105. package/dist/test/suites/build/cli.test.js +32 -10
  106. package/dist/test/suites/build/config-schema.test.js +4 -4
  107. package/dist/test/suites/build/console-lock.test.js +51 -0
  108. package/dist/test/suites/build/defaults-scaffold.test.js +71 -2
  109. package/dist/test/suites/build/deploy-direct.test.js +241 -0
  110. package/dist/test/suites/build/deploy-dispatch.test.js +287 -0
  111. package/dist/test/suites/build/deploy-hook.test.js +169 -0
  112. package/dist/test/suites/build/ensure-target.test.js +14 -2
  113. package/dist/test/suites/build/env-delivery.test.js +19 -10
  114. package/dist/test/suites/build/env-watch.test.js +18 -7
  115. package/dist/test/suites/build/esm-only-dependency.test.js +127 -0
  116. package/dist/test/suites/build/exec-with-limit.test.js +53 -0
  117. package/dist/test/suites/build/finalize-release.test.js +2 -2
  118. package/dist/test/suites/build/get-config.test.js +120 -8
  119. package/dist/test/suites/build/github-utils.test.js +12 -6
  120. package/dist/test/suites/build/license-stamp.test.js +6 -4
  121. package/dist/test/suites/build/manager.test.js +88 -68
  122. package/dist/test/suites/build/manifest-deps.test.js +116 -0
  123. package/dist/test/suites/build/merge-line-files.test.js +27 -4
  124. package/dist/test/suites/build/notarize-artifacts.test.js +135 -0
  125. package/dist/test/suites/build/notarize-tools.test.js +38 -0
  126. package/dist/test/suites/build/notarize.test.js +207 -0
  127. package/dist/test/suites/build/release-pipeline.test.js +38 -60
  128. package/dist/test/suites/build/release-skipped-upload.test.js +107 -0
  129. package/dist/test/suites/build/resolve-icons.test.js +35 -35
  130. package/dist/test/suites/build/runner-job-guard.test.js +182 -0
  131. package/dist/test/suites/build/runner.test.js +25 -2
  132. package/dist/test/suites/build/sentry.test.js +8 -3
  133. package/dist/test/suites/build/setup-scripts.test.js +3 -0
  134. package/dist/test/suites/build/sign-windows.test.js +92 -8
  135. package/dist/test/suites/build/test-stealth.test.js +17 -11
  136. package/dist/test/suites/build/url-helpers.test.js +37 -17
  137. package/dist/test/suites/build/validate-certs.test.js +428 -55
  138. package/dist/test/suites/build/validate-config.test.js +3 -3
  139. package/dist/test/suites/main/auth-flow.test.js +12 -0
  140. package/dist/test/suites/main/auth-persistence.test.js +14 -17
  141. package/dist/test/suites/main/auto-updater.test.js +2 -2
  142. package/dist/test/suites/main/boot-sequence.test.js +1 -1
  143. package/dist/test/suites/main/client-bridge.integration.test.js +5 -82
  144. package/dist/test/suites/main/client-bridge.test.js +19 -6
  145. package/dist/test/suites/main/deep-link.test.js +54 -0
  146. package/dist/test/suites/main/startup-paths-and-ua.test.js +1 -1
  147. package/dist/test/suites/main/url-helpers.test.js +81 -72
  148. package/dist/test/suites/renderer/cross-context-helpers.test.js +19 -16
  149. package/dist/utils/build-pipeline.js +10 -10
  150. package/dist/utils/github.js +12 -51
  151. package/dist/utils/load-env.js +66 -0
  152. package/dist/utils/mode-helpers.js +43 -111
  153. package/dist/utils/platform.js +37 -0
  154. package/dist/utils/runner-env.js +2 -1
  155. package/dist/utils/runner-job-guard.js +149 -0
  156. package/dist/utils/ship-keys.js +52 -0
  157. package/dist/utils/test-stealth.js +5 -3
  158. package/dist/utils/url-helpers.js +33 -17
  159. package/dist/vendor/config/bundle-id.js +53 -0
  160. package/dist/vendor/config/client-config.js +141 -0
  161. package/dist/vendor/config/company.js +334 -15
  162. package/dist/vendor/config/dev-facts.js +48 -0
  163. package/dist/vendor/config/env-delivery.js +231 -9
  164. package/dist/vendor/config/env-retired.js +137 -0
  165. package/dist/vendor/config/env-rules.js +22 -3
  166. package/dist/vendor/config/env-schema.js +234 -117
  167. package/dist/vendor/config/env.js +55 -26
  168. package/dist/vendor/config/environment.js +189 -0
  169. package/dist/vendor/config/hooks.js +13 -11
  170. package/dist/vendor/config/index.js +121 -44
  171. package/dist/vendor/config/load.js +366 -115
  172. package/dist/vendor/config/merge.js +2 -2
  173. package/dist/vendor/config/order.js +3 -3
  174. package/dist/vendor/config/platforms.js +276 -0
  175. package/dist/vendor/config/repo.js +226 -104
  176. package/dist/vendor/config/retired-keys.js +232 -27
  177. package/dist/vendor/config/schema.js +525 -99
  178. package/dist/vendor/config/site-global.js +63 -53
  179. package/dist/vendor/config/targets.js +187 -0
  180. package/dist/vendor/config/validate.js +119 -59
  181. package/dist/vendor/devkit/argv.js +118 -0
  182. package/dist/vendor/devkit/attach-log-file.js +21 -13
  183. package/dist/vendor/devkit/brand-tokens.js +278 -0
  184. package/dist/vendor/devkit/brand-version.js +264 -0
  185. package/dist/vendor/devkit/build-json.js +91 -0
  186. package/dist/vendor/devkit/bundle.js +48 -0
  187. package/dist/vendor/devkit/certificate-expiry.js +108 -0
  188. package/dist/vendor/devkit/certs.js +16 -194
  189. package/dist/vendor/devkit/ci-workflows.js +124 -8
  190. package/dist/vendor/devkit/cli-router.js +3 -3
  191. package/dist/vendor/devkit/defaults-engine.js +69 -7
  192. package/dist/vendor/devkit/deploy-follow.js +297 -0
  193. package/dist/vendor/devkit/deploy-precheck.js +23 -8
  194. package/dist/vendor/devkit/deploy-record.js +11 -27
  195. package/dist/vendor/devkit/deploy-snapshot.js +661 -0
  196. package/dist/vendor/devkit/deploy.js +445 -75
  197. package/dist/vendor/devkit/git-auth.js +73 -0
  198. package/dist/vendor/devkit/git-remote.js +95 -0
  199. package/dist/vendor/devkit/github-repo.js +290 -0
  200. package/dist/vendor/devkit/local.js +47 -0
  201. package/dist/vendor/devkit/merge-line-files.js +23 -16
  202. package/dist/vendor/devkit/omega-bin.js +18 -3
  203. package/dist/vendor/devkit/pack-local.js +391 -0
  204. package/dist/vendor/devkit/preludes/index.js +120 -0
  205. package/dist/vendor/devkit/preludes/origin-heal.js +156 -0
  206. package/dist/vendor/devkit/service-account.js +43 -0
  207. package/dist/vendor/devkit/ship-plan.js +112 -0
  208. package/dist/vendor/devkit/signing-env.js +180 -0
  209. package/dist/vendor/devkit/signing-tree.js +92 -0
  210. package/dist/vendor/devkit/target-seams.js +142 -0
  211. package/dist/vendor/devkit/target-secrets.js +235 -50
  212. package/dist/vendor/devkit/test/esm-only-fixture.js +48 -0
  213. package/dist/vendor/devkit/test/fixtures/esm-only-package/browser.js +19 -0
  214. package/dist/vendor/devkit/test/fixtures/esm-only-package/index.js +20 -0
  215. package/dist/vendor/devkit/test/fixtures/esm-only-package/package.json +13 -0
  216. package/dist/vendor/monitoring/env.js +20 -10
  217. package/dist/vendor/monitoring/main.js +1 -1
  218. package/dist/vendor/monitoring/preload.js +1 -1
  219. package/dist/vendor/monitoring/renderer.js +1 -1
  220. package/docs/analytics.md +1 -1
  221. package/docs/auto-updater.md +5 -5
  222. package/docs/boot-sequence.md +1 -1
  223. package/docs/build-system.md +15 -7
  224. package/docs/client-bridge.md +9 -7
  225. package/docs/config-schema.md +4 -4
  226. package/docs/css.md +8 -2
  227. package/docs/deep-link.md +12 -4
  228. package/docs/environment-detection.md +32 -24
  229. package/docs/hooks.md +3 -1
  230. package/docs/icons.md +7 -7
  231. package/docs/index.md +61 -23
  232. package/docs/installer-options.md +24 -21
  233. package/docs/logging.md +5 -5
  234. package/docs/releasing.md +25 -17
  235. package/docs/runner.md +40 -5
  236. package/docs/shared/brands.md +12 -6
  237. package/docs/shared/breaking-changes.md +375 -21
  238. package/docs/shared/config.md +757 -199
  239. package/docs/shared/deploys.md +194 -91
  240. package/docs/shared/icons.md +18 -0
  241. package/docs/shared/local-dev.md +24 -6
  242. package/docs/shared/logging.md +9 -6
  243. package/docs/shared/monitoring.md +27 -13
  244. package/docs/shared/publishing.md +3 -3
  245. package/docs/shared/rulings.md +2 -2
  246. package/docs/shared/testing.md +1 -1
  247. package/docs/shared/theming.md +26 -1
  248. package/docs/shared/translation.md +49 -7
  249. package/docs/shared/updates.md +1 -1
  250. package/docs/signing.md +59 -33
  251. package/docs/test-framework.md +10 -5
  252. package/docs/themes.md +15 -1
  253. package/package.json +18 -12
  254. package/bin/omega-desktop +0 -2
  255. package/dist/commands/push-secrets.js +0 -141
  256. package/dist/test/suites/build/deliver-certs.test.js +0 -95
  257. package/dist/test/suites/build/derive-signing-env.test.js +0 -122
  258. package/dist/test/suites/build/push-secrets.test.js +0 -226
  259. package/dist/test/suites/build/resolve-signing-cert.test.js +0 -342
  260. package/dist/utils/deliver-certs.js +0 -69
  261. package/dist/utils/derive-signing-env.js +0 -56
  262. package/dist/utils/resolve-signing-cert.js +0 -175
  263. package/dist/vendor/config/desktop-artifacts.js +0 -110
  264. package/dist/vendor/config/instances.js +0 -208
  265. /package/dist/defaults/config/icons/{macos → mac}/dmg.png +0 -0
  266. /package/dist/defaults/config/icons/{macos → mac}/icon.png +0 -0
  267. /package/dist/defaults/config/icons/{macos → mac}/tray.png +0 -0
@@ -4,9 +4,10 @@
4
4
  * One file, config/omega.json5 (functions/config/omega.json5 for standalone
5
5
  * backends), identical shape everywhere: shared sections (brand,
6
6
  * cloud, analytics, payment, monitoring, connections, theme) + a `targets`
7
- * object whose KEY PRESENCE says which targets a brand enables and whose
8
- * values hold target-scoped settings — any shared key inside a target entry
9
- * overrides the shared value for that surface (one agnostic deep merge).
7
+ * object whose KEY PRESENCE says which targets a brand enables: every key is a
8
+ * target NAME (the folder under targets/), every entry declares its framework
9
+ * `type`, and any shared key inside a target entry overrides the shared value
10
+ * for that surface (one agnostic deep merge).
10
11
  *
11
12
  * Replaces the per-framework config zoo (UJM's _config.yml + JSON split,
12
13
  * EM's config/electron-manager.json, @omega.js/backend's backend-manager-config.json,
@@ -19,30 +20,35 @@
19
20
  * at prepare time, never published on its own.
20
21
  */
21
22
 
22
- const { TARGETS, CUSTOM_TARGET_TYPE, isCustomTargetEntry, BACKEND_PROJECT_TYPES, backendProjectType, SHARED_SECTIONS, SHARED_SCHEMA, TARGET_SCHEMAS, BRAND_ID_PATTERN } = require('./schema.js');
23
+ const { TARGETS, CUSTOM_TARGET_TYPE, isCustomTargetEntry, BACKEND_PROJECT_TYPES, backendProjectType, SHARED_SECTIONS, CLIENT_SECTIONS, SHARED_SCHEMA, TARGET_SCHEMAS, BRAND_ID_PATTERN, AMO_CATEGORIES } = require('./schema.js');
24
+ const { clientConfig, CLIENT_FACT_KEYS } = require('./client-config.js');
23
25
  const { deepMerge } = require('./merge.js');
24
26
  const { findSecretKeys, SECRET_KEY_PATTERN } = require('./secrets.js');
25
27
  const { findRetiredKeys, RETIRED_KEYS, RETIRED_PATHS } = require('./retired-keys.js');
26
28
  const { chosenProvider } = require('./providers.js');
27
29
  const { validateConfig, runSchema, formatErrors, resolvedBrandHost } = require('./validate.js');
28
30
  const { loadConfig, composeTargetConfig, hasOmegaConfig, resolveConfigPath, getEnabledTargets, findBrandRoot, findBrandConfigPath, resolveBrandRoot, FILE_NAME, CONFIG_LOCATIONS } = require('./load.js');
29
- const { loadEnv, reloadEnv, ENV_ENVIRONMENTS, envEnvironment, resolveEnvChain, envLayerFiles, loadEnvChain, loadEnvRoots, applyDeliverAs, composeTargetEnv, envLine, serializeEnv } = require('./env.js');
31
+ const { ENV_ENVIRONMENTS, ENVIRONMENT_VAR, getEnvironment, isDevelopment, isProduction, isTesting, setEnvironment, buildLaneEnvironment, attachTo: attachEnvironment } = require('./environment.js');
32
+ const { loadEnv, reloadEnv, envEnvironment, resolveEnvChain, envLayerFiles, loadEnvChain, loadEnvRoots, applyDeliverAs, composeTargetEnv, envLine, serializeEnv } = require('./env.js');
30
33
  const { ENV_SCHEMA, ENV_GROUPS, DELIVERY_MODES, envFileGroups, envSchemaEntry, envKeysForTarget, generatedEnvKeys, requiredEnvKeys, envKeysByGroup } = require('./env-schema.js');
31
- const { WORKFLOW_OWNED_KEYS, workflowSecretKeys, bakeKeys, publishSecretKeys, renderSecretsBlock } = require('./env-delivery.js');
34
+ const { WORKFLOW_OWNED_KEYS, deliveredKeys, workflowSecretKeys, envFileKeys, artifactEnvValues, bakeKeys, bakeSourceKeys, publishSecretKeys, renderSecretsBlock, renderEnvFileKeys } = require('./env-delivery.js');
32
35
  const { checkEnvRules } = require('./env-rules.js');
33
- const { readCompanyRoot, COMPANY_MARKER } = require('./company.js');
36
+ const { RETIRED_ENV_KEYS, findRetiredEnvKeys, assertNoRetiredEnvKeys } = require('./env-retired.js');
37
+ const { resolveCompany, recordBrand, readRegistry, registryFile, COMPANY_DIR, COMPANY_RESOLVED_FILE, COMPANY_SELF } = require('./company.js');
34
38
  const { applyConfigEdits, writeConfigValues, applyConfigRemovals, removeConfigValues } = require('./edit.js');
35
39
  const { schemaDefaults, missingDefaults, defaultComments } = require('./defaults.js');
36
40
  const { applyCanonicalOrder, CANONICAL_TOP_LEVEL_ORDER } = require('./order.js');
37
41
  const { resolveSeedMode } = require('./seed.js');
38
42
  const { resolveHook, loadHook } = require('./hooks.js');
39
43
  const { toSiteGlobal } = require('./site-global.js');
40
- const { DESKTOP_ARTIFACTS, desktopProductName, sanitizeProductName, desktopArtifactName, desktopArtifactNames } = require('./desktop-artifacts.js');
44
+ const { PLATFORMS, FORMATS, enabledFormats, formatKeys, desktopProductName, sanitizeProductName, desktopArtifactName, desktopArtifactNames } = require('./platforms.js');
41
45
  const { resolveWinbackOffer, WINBACK_OFFER_DEFAULTS, WINBACK_DURATIONS } = require('./winback.js');
42
- const { parseRepoSlug, brandRepoName, brandRepoOwner, brandRepo, releasesRepo } = require('./repo.js');
46
+ const { REPO_PROVIDERS, HOSTING_PROVIDERS, repoBlock, sourceRepo, releasesRepo, websiteRepo, hostingProvider, pagesHost, brandVisibility } = require('./repo.js');
43
47
  const { isDemoProject } = require('./demo.js');
48
+ const { deriveBundleIdPrefix, composeBundleId } = require('./bundle-id.js');
49
+ const { DEV_FACT_CHANNEL, devFactMissing } = require('./dev-facts.js');
44
50
  const { CLASSIC_PORTS, CLASSIC_DEV_ORIGIN, isPortFree, resolvePorts, writePortsFile, readPortsFile, clearPortsFile, readSiblingPorts, readSiblingOrigin, envName, portsToEnv, envPort, envPorts } = require('./ports.js');
45
- const { DIR_TARGETS, TARGET_DIRS, MAIN_INSTANCE, INSTANCE_ID_PATTERN, normalizeTargetInstances, instanceIdFromDirName, instanceTargetDir, targetInstance, resolveInstanceEntry, instancePortOffset, resolveInstanceUrl } = require('./instances.js');
51
+ const { TARGET_NAME_PATTERN, TARGET_TYPES, targetEntries, targetsOfType, hasTargetOfType, targetPath, targetNameFromDir, targetUrl, targetPortOffset, brandHost } = require('./targets.js');
46
52
 
47
53
  module.exports = {
48
54
  // Loading
@@ -68,9 +74,25 @@ module.exports = {
68
74
  loadEnvChain,
69
75
  loadEnvRoots,
70
76
 
71
- // The ONE environment vocabulary ('development' | 'testing' | 'production') —
77
+ // The ONE environment vocabulary ('development' | 'testing' | 'production'):
72
78
  // the overlay's file suffix and every framework's own environment answer
73
79
  ENV_ENVIRONMENTS,
80
+ // The ONE environment module every target answers from (#817): one input
81
+ // (OMEGA_ENVIRONMENT on Node, the baked config.environment in a browser),
82
+ // no per-surface default, a missing input is a loud error. `attachEnvironment`
83
+ // is its attachTo(), named for what it mixes in.
84
+ ENVIRONMENT_VAR,
85
+ getEnvironment,
86
+ isDevelopment,
87
+ isProduction,
88
+ isTesting,
89
+ setEnvironment,
90
+ // The word a node BUILD LANE is for, from its build-mode flag and whatever a
91
+ // parent lane named: the desktop and extension build Managers set this
92
+ buildLaneEnvironment,
93
+ attachEnvironment,
94
+ // The AMBIENT answer a lane resolves when nothing named one for it, and the
95
+ // producer of the input above
74
96
  envEnvironment,
75
97
 
76
98
  // The schema's `deliverAs` rename (#678) — the ONE place a brand-level name
@@ -103,19 +125,42 @@ module.exports = {
103
125
  // bake list, and the set a push-secrets publisher sends. No framework keeps
104
126
  // a hand-written list, and a secret can never bake into an artifact
105
127
  WORKFLOW_OWNED_KEYS,
128
+ deliveredKeys,
106
129
  workflowSecretKeys,
130
+ envFileKeys,
131
+ artifactEnvValues,
107
132
  bakeKeys,
133
+ bakeSourceKeys,
108
134
  publishSecretKeys,
109
135
  renderSecretsBlock,
136
+ renderEnvFileKeys,
110
137
 
111
138
  // The env presence checker (#626) — the ONE evaluator of `required` and
112
139
  // `requiredWhen`; every consumer calls it, none keeps its own if
113
140
  checkEnvRules,
114
141
 
115
- // Company layer discovery (the .omega/company.json stamp) — shared by the
116
- // config chain, the .env chain, and owner hooks
117
- readCompanyRoot,
118
- COMPANY_MARKER,
142
+ // The .env half of the retired-key register (#893): a key that moved into
143
+ // config fails the layer that still declares it, naming the move. Every
144
+ // `.env` read goes through parseEnvFile, so nothing can miss the check
145
+ RETIRED_ENV_KEYS,
146
+ findRetiredEnvKeys,
147
+ assertNoRetiredEnvKeys,
148
+
149
+ // The ONE company resolver (#677): `company: { id }` in, the company's public
150
+ // facts plus its tree on this machine out. The config chain, the .env chain,
151
+ // owner hooks and the desktop signing tree all inherit through its `file()`,
152
+ // so a new kind of inherited file needs no code anywhere
153
+ resolveCompany,
154
+ // The machine registry `~/.omega/brands.json` every loadConfig refreshes its
155
+ // own line in, which is what makes a sibling's `company: { id }` resolvable
156
+ recordBrand,
157
+ readRegistry,
158
+ registryFile,
159
+ COMPANY_DIR,
160
+ COMPANY_SELF,
161
+ // The generated layer a deploy hands a runner, which has no registry and no
162
+ // company tree to resolve from
163
+ COMPANY_RESOLVED_FILE,
119
164
 
120
165
  // Writeback (comment-preserving edits + canonical top-level key order)
121
166
  applyConfigEdits,
@@ -141,9 +186,18 @@ module.exports = {
141
186
  // Template surface
142
187
  toSiteGlobal,
143
188
 
144
- // The desktop release assets' versionless names (#620) — @omega.js/desktop
145
- // packages under them, the site links straight at them
146
- DESKTOP_ARTIFACTS,
189
+ // The ONE browser-safe subset (#894): what web's page chrome, desktop's
190
+ // renderer bundle and every extension bundle bake as OMEGA_BUILD_JSON.config
191
+ clientConfig,
192
+ CLIENT_FACT_KEYS,
193
+
194
+ // The ONE shipping vocabulary and format table (#867): what each target can
195
+ // ship, what each format needs, and the versionless asset names (#620)
196
+ // @omega.js/desktop packages under and the site links straight at
197
+ PLATFORMS,
198
+ FORMATS,
199
+ enabledFormats,
200
+ formatKeys,
147
201
  desktopProductName,
148
202
  sanitizeProductName,
149
203
  desktopArtifactName,
@@ -155,29 +209,44 @@ module.exports = {
155
209
  WINBACK_OFFER_DEFAULTS,
156
210
  WINBACK_DURATIONS,
157
211
 
158
- // Brand repo derivation from the shared repo.providers.github block, overlaid
159
- // by a target's own github entry (backend: targets.backend.github.repo slug —
160
- // "owner/name" or bare name; name → `<brand.id>-omega`, owner → repo.providers.github.org)
161
- parseRepoSlug,
162
212
  // demo-* project ids are emulator-only (Firebase's convention) — cloud
163
213
  // surfaces short-circuit on this instead of 403ing at Google
164
214
  isDemoProject,
165
- brandRepoName,
166
- brandRepoOwner,
167
- // The finished form a framework hands to consumer code (#290) — owner, name,
168
- // and the "owner/name" slug — so brands never re-derive the rule
169
- brandRepo,
170
- // The brand's ONE public releases repo (#799): `<brand.id>-releases` under the
171
- // brand repo's owner unless `targets.desktop.releases` names its own, the one
172
- // home every release reader takes its address from
215
+
216
+ // The repo derivations (#883): ONE `repo: { provider, org }` block, and every
217
+ // repo a brand owns derives its name from `<brand.id>-<role>` (#809), so no
218
+ // name, owner or visibility is ever configured
219
+ REPO_PROVIDERS,
220
+ HOSTING_PROVIDERS,
221
+ repoBlock,
222
+ // The SOURCE monorepo `<brand.id>-omega`: the dispatch, the repo secrets, the
223
+ // scaffolded workflows and the CMS commits all address this one
224
+ sourceRepo,
225
+ // The brand's ONE public releases repo `<brand.id>-releases`, always public:
226
+ // the one home every release reader takes its address from
173
227
  releasesRepo,
228
+ // A web target's own repo `<brand.id>-<name>`, holding the BUILT site so the
229
+ // source monorepo can stay private, plus where that target is served from
230
+ websiteRepo,
231
+ hostingProvider,
232
+ // The Pages custom domain of a web target: the manage walk sets it on the
233
+ // repo, the deploy writes it into the CNAME, from this ONE derivation
234
+ pagesHost,
235
+ // Visibility has ONE statement, the brand root's package.json `private`
236
+ brandVisibility,
237
+
238
+ // The bundle-identifier policy ([#909](https://github.com/Omega-JS-Stack/omega/issues/909)):
239
+ // ONE derivation for the id the certificates service registers and the id the
240
+ // desktop build signs under
241
+ deriveBundleIdPrefix,
242
+ composeBundleId,
174
243
 
175
244
  // Validation
176
245
  validateConfig,
177
246
  runSchema,
178
247
  formatErrors,
179
248
 
180
- // The brand's own HOST, resolved from an instance `url` or `brand.url` — the
249
+ // The brand's own HOST, resolved from a target `url` or `brand.url`, the
181
250
  // ONE derivation of it ([#708](https://github.com/Omega-JS-Stack/omega/issues/708)):
182
251
  // authDomain validation, and every lane that composes a test persona's email
183
252
  resolvedBrandHost,
@@ -196,6 +265,12 @@ module.exports = {
196
265
  deepMerge,
197
266
 
198
267
  // Port auto-allocation (N7 — dev/emulator only)
268
+ // The ONE missing-dev-fact error (#834): no surface carries a browser-side
269
+ // copy of the classic numbers any more, so a read that finds no baked map
270
+ // throws this instead of assuming one
271
+ DEV_FACT_CHANNEL,
272
+ devFactMissing,
273
+
199
274
  CLASSIC_PORTS,
200
275
  CLASSIC_DEV_ORIGIN,
201
276
  isPortFree,
@@ -210,19 +285,19 @@ module.exports = {
210
285
  envPort,
211
286
  envPorts,
212
287
 
213
- // Multi-instance targets (_attic/plans/multi-instance-targets.md): normalization
214
- // is the ONE iteration mechanism — object form = [{ id: 'main', ...entry }]
215
- DIR_TARGETS,
216
- TARGET_DIRS,
217
- MAIN_INSTANCE,
218
- INSTANCE_ID_PATTERN,
219
- normalizeTargetInstances,
220
- instanceIdFromDirName,
221
- instanceTargetDir,
222
- targetInstance,
223
- resolveInstanceEntry,
224
- instancePortOffset,
225
- resolveInstanceUrl,
288
+ // The targets map (#886): every key is a NAME, every entry declares its
289
+ // `type`, and the name IS the folder, so this is the ONE derivation of a
290
+ // target's path, its dir walk, its public url, and its dev-port offset
291
+ TARGET_NAME_PATTERN,
292
+ TARGET_TYPES,
293
+ targetEntries,
294
+ targetsOfType,
295
+ hasTargetOfType,
296
+ targetPath,
297
+ targetNameFromDir,
298
+ targetUrl,
299
+ targetPortOffset,
300
+ brandHost,
226
301
 
227
302
  // Schema (pure data)
228
303
  TARGETS,
@@ -231,7 +306,9 @@ module.exports = {
231
306
  BACKEND_PROJECT_TYPES,
232
307
  backendProjectType,
233
308
  SHARED_SECTIONS,
309
+ CLIENT_SECTIONS,
234
310
  SHARED_SCHEMA,
235
311
  TARGET_SCHEMAS,
236
312
  BRAND_ID_PATTERN,
313
+ AMO_CATEGORIES,
237
314
  };