@omega.js/desktop 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -48
- package/dist/assets/css/core/_initialize.scss +1 -1
- package/dist/assets/js/core/app-shell.js +14 -15
- package/dist/assets/themes/_template/_theme.js +6 -6
- package/dist/assets/themes/base/_includes/global/sections/account.html +4 -4
- package/dist/assets/themes/base/_includes/global/sections/app-sidebar.html +5 -5
- package/dist/assets/themes/base/_layouts/frontend/pages/account/index.html +3 -3
- package/dist/assets/themes/base/_layouts/frontend/pages/alternatives/index.html +1 -1
- package/dist/assets/themes/base/_layouts/frontend/pages/blog/tags/tag.html +1 -1
- package/dist/assets/themes/base/_layouts/frontend/pages/payment/confirmation.html +1 -1
- package/dist/assets/themes/base/_sections/marketing/newsletter-cta/section.js +2 -3
- package/dist/assets/themes/base/_sections/verts/unit/section.html +1 -1
- package/dist/assets/themes/base/_sections/verts/unit/section.js +3 -4
- package/dist/assets/themes/base/_theme.js +4 -3
- package/dist/assets/themes/bootstrap/_theme.js +2 -2
- package/dist/assets/themes/bootstrap/overrides/_links.scss +1 -1
- package/dist/assets/themes/classy/_theme.js +8 -6
- package/dist/assets/themes/classy/css/marketing/_sections.scss +1 -2
- package/dist/assets/themes/classy/js/hero-demo-form.js +3 -2
- package/dist/assets/themes/neobrutalism/_theme.js +5 -5
- package/dist/assets/themes/neobrutalism/js/pages/test/libraries/layers/index.js +1 -1
- package/dist/assets/themes/newsflash/_theme.js +6 -6
- package/dist/assets/themes/newsflash/js/pages/test/libraries/layers/index.js +1 -1
- package/dist/build.js +87 -111
- package/dist/cli-run.js +4 -1
- package/dist/cli.js +3 -3
- package/dist/commands/build.js +2 -2
- package/dist/commands/cdp/capture.js +2 -2
- package/dist/commands/cdp/client.js +1 -1
- package/dist/commands/cdp/quit.js +2 -2
- package/dist/commands/cdp/relaunch.js +2 -2
- package/dist/commands/cdp/theme.js +1 -1
- package/dist/commands/cdp.js +1 -1
- package/dist/commands/clean.js +4 -5
- package/dist/commands/deploy.js +4 -4
- package/dist/commands/dev.js +25 -0
- package/dist/commands/finalize-release.js +4 -4
- package/dist/commands/launch.js +2 -2
- package/dist/commands/lib/deploy-precheck.js +3 -3
- package/dist/commands/lib/ensure-target.js +18 -23
- package/dist/commands/lib/migrate.js +17 -0
- package/dist/commands/logs.js +1 -1
- package/dist/commands/package.js +2 -2
- package/dist/commands/publish.js +2 -2
- package/dist/commands/release.js +4 -4
- package/dist/commands/runner.js +11 -11
- package/dist/commands/sign-windows.js +5 -5
- package/dist/commands/test.js +8 -8
- package/dist/commands/update.js +7 -6
- package/dist/commands/validate-certs.js +4 -4
- package/dist/commands/version.js +3 -3
- package/dist/defaults/.github/workflows/build.yml +18 -18
- package/dist/defaults/_.gitignore +0 -2
- package/dist/defaults/_mas/README.md +3 -3
- package/dist/defaults/config/certs/README.md +1 -1
- package/dist/defaults/config/omega.json5 +43 -43
- package/dist/defaults/docs/README.md +3 -3
- package/dist/defaults/gulpfile.js +1 -1
- package/dist/defaults/hooks/build/post.js +2 -2
- package/dist/defaults/hooks/build/pre.js +2 -2
- package/dist/defaults/hooks/deploy/pre.js +1 -1
- package/dist/defaults/hooks/notarize/post.js +2 -2
- package/dist/defaults/hooks/release/post.js +2 -2
- package/dist/defaults/hooks/release/pre.js +2 -2
- package/dist/defaults/src/assets/js/components/about/index.js +3 -5
- package/dist/defaults/src/assets/js/components/main/index.js +3 -5
- package/dist/defaults/src/assets/js/components/settings/index.js +3 -5
- package/dist/defaults/src/assets/scss/pages/about.scss +1 -1
- package/dist/defaults/src/assets/scss/pages/main.scss +1 -1
- package/dist/defaults/src/assets/scss/pages/settings.scss +1 -1
- package/dist/defaults/src/integrations/context-menu/index.js +13 -13
- package/dist/defaults/src/integrations/menu/index.js +8 -8
- package/dist/defaults/src/integrations/tray/index.js +12 -12
- package/dist/defaults/src/main.js +5 -7
- package/dist/defaults/src/preload.js +4 -6
- package/dist/defaults/test/README.md +5 -5
- package/dist/defaults/test/_init.js +1 -1
- package/dist/gulp/main.js +9 -10
- package/dist/gulp/tasks/audit.js +11 -14
- package/dist/gulp/tasks/build-config.js +8 -8
- package/dist/gulp/tasks/bundle.js +16 -16
- package/dist/gulp/tasks/defaults.js +3 -3
- package/dist/gulp/tasks/distribute.js +2 -2
- package/dist/gulp/tasks/html.js +9 -9
- package/dist/gulp/tasks/package-quick.js +3 -3
- package/dist/gulp/tasks/package.js +3 -3
- package/dist/gulp/tasks/release.js +3 -3
- package/dist/gulp/tasks/sass.js +6 -6
- package/dist/gulp/tasks/serve.js +4 -4
- package/dist/hooks/notarize-artifacts.js +1 -1
- package/dist/hooks/notarize.js +1 -1
- package/dist/index.js +5 -8
- package/dist/lib/_environment-mixin.js +50 -0
- package/dist/lib/_lifecycle-mixin.js +45 -0
- package/dist/lib/analytics.js +33 -35
- package/dist/lib/app-state.js +14 -14
- package/dist/lib/auth-flow.js +18 -18
- package/dist/lib/auth-persistence.js +12 -12
- package/dist/lib/auth.js +421 -0
- package/dist/lib/auto-updater.js +49 -49
- package/dist/lib/context-menu.js +13 -13
- package/dist/lib/context.js +19 -19
- package/dist/lib/deep-link.js +34 -34
- package/dist/lib/fontawesome.js +5 -5
- package/dist/lib/ipc.js +4 -4
- package/dist/lib/menu.js +25 -25
- package/dist/lib/protocol.js +5 -5
- package/dist/lib/remote-config.js +22 -22
- package/dist/lib/remote-scripts.js +21 -21
- package/dist/lib/restart-manager/index.js +29 -29
- package/dist/lib/restart-manager/install.js +1 -1
- package/dist/lib/restart-manager/protocol.js +1 -1
- package/dist/lib/sign-helpers/exec-with-limit.js +1 -1
- package/dist/lib/sign-helpers/sign-events.js +1 -1
- package/dist/lib/startup.js +18 -13
- package/dist/lib/storage.js +10 -10
- package/dist/lib/templating.js +16 -16
- package/dist/lib/theme.js +10 -10
- package/dist/lib/tray.js +27 -27
- package/dist/lib/usage.js +11 -11
- package/dist/lib/window-manager.js +26 -26
- package/dist/main.js +399 -483
- package/dist/preload.js +236 -176
- package/dist/renderer.js +417 -391
- package/dist/test/fixtures/consumer-app/config/omega.json5 +1 -1
- package/dist/test/fixtures/consumer-app/src/assets/js/components/main/index.js +8 -11
- package/dist/test/fixtures/consumer-app/src/main.js +5 -7
- package/dist/test/fixtures/consumer-app/src/preload.js +2 -2
- package/dist/test/harness/boot-entry.js +22 -20
- package/dist/test/harness/main-entry.js +31 -30
- package/dist/test/harness/renderer-entry.js +5 -5
- package/dist/test/harness/renderer-preload.js +137 -141
- package/dist/test/index.js +10 -10
- package/dist/test/runner.js +2 -2
- package/dist/test/runners/boot.js +7 -6
- package/dist/test/runners/electron.js +3 -2
- package/dist/test/runners/render-event.js +2 -2
- package/dist/test/suites/boot/consumer-app-boots.test.js +57 -26
- package/dist/test/suites/boot/restart-manager.test.js +2 -2
- package/dist/test/suites/boot/storage-bundled.test.js +5 -5
- package/dist/test/suites/boot/theme.test.js +13 -13
- package/dist/test/suites/build/audit.test.js +21 -8
- package/dist/test/suites/build/auth-persistence-resolve.test.js +6 -6
- package/dist/test/suites/build/boot-fixture.test.js +2 -2
- package/dist/test/suites/build/boot-runner-timeout.test.js +6 -5
- package/dist/test/suites/build/brand-scss.test.js +1 -1
- package/dist/test/suites/build/build-json-bake.test.js +1 -1
- package/dist/test/suites/build/build-workflow-jobs.test.js +2 -2
- package/dist/test/suites/build/cli.test.js +30 -2
- package/dist/test/suites/build/config-schema.test.js +5 -5
- package/dist/test/suites/build/defaults-em-dash.test.js +22 -0
- package/dist/test/suites/build/defaults-scaffold.test.js +21 -7
- package/dist/test/suites/build/deploy-direct.test.js +7 -5
- package/dist/test/suites/build/deploy-dispatch.test.js +2 -1
- package/dist/test/suites/build/deploy-hook.test.js +7 -5
- package/dist/test/suites/build/dev-verb.test.js +67 -0
- package/dist/test/suites/build/ensure-target.test.js +13 -5
- package/dist/test/suites/build/env-delivery.test.js +2 -2
- package/dist/test/suites/build/esm-only-dependency.test.js +2 -2
- package/dist/test/suites/build/exports.test.js +9 -8
- package/dist/test/suites/build/get-config.test.js +4 -4
- package/dist/test/suites/build/manifest-deps.test.js +1 -1
- package/dist/test/suites/build/merge-line-files.test.js +7 -7
- package/dist/test/suites/build/migrate.test.js +29 -0
- package/dist/test/suites/build/omega-shell.test.js +34 -2
- package/dist/test/suites/build/omega.test.js +350 -0
- package/dist/test/suites/build/project-scripts-deps.test.js +6 -10
- package/dist/test/suites/build/renderer-auth-bridge.test.js +211 -78
- package/dist/test/suites/build/runner-env-write.test.js +73 -0
- package/dist/test/suites/build/runner.test.js +11 -10
- package/dist/test/suites/build/sentry.test.js +2 -2
- package/dist/test/suites/build/setup-scripts.test.js +27 -0
- package/dist/test/suites/build/sign-windows-e2e.test.js +2 -2
- package/dist/test/suites/build/templating.test.js +3 -3
- package/dist/test/suites/build/test-stealth.test.js +7 -9
- package/dist/test/suites/build/url-helpers.test.js +55 -56
- package/dist/test/suites/build/validate-config.test.js +15 -4
- package/dist/test/suites/build/verb-logs.test.js +20 -0
- package/dist/test/suites/build/wave5-pins.test.js +2 -2
- package/dist/test/suites/main/analytics.test.js +59 -59
- package/dist/test/suites/main/app-state.test.js +66 -66
- package/dist/test/suites/main/auth-flow.test.js +41 -41
- package/dist/test/suites/main/auth-persistence.test.js +54 -43
- package/dist/test/suites/main/{client-bridge.integration.test.js → auth.integration.test.js} +10 -9
- package/dist/test/suites/main/auth.test.js +336 -0
- package/dist/test/suites/main/auto-updater.test.js +134 -134
- package/dist/test/suites/main/boot-sequence.test.js +37 -49
- package/dist/test/suites/main/context-menu.test.js +51 -50
- package/dist/test/suites/main/context.test.js +25 -25
- package/dist/test/suites/main/deep-link.test.js +74 -74
- package/dist/test/suites/main/fontawesome.test.js +27 -27
- package/dist/test/suites/main/ipc.test.js +35 -35
- package/dist/test/suites/main/menu.test.js +101 -100
- package/dist/test/suites/main/protocol.test.js +19 -19
- package/dist/test/suites/main/remote-config.test.js +63 -63
- package/dist/test/suites/main/remote-scripts.test.js +103 -103
- package/dist/test/suites/main/request.test.js +71 -0
- package/dist/test/suites/main/restart-manager.test.js +33 -33
- package/dist/test/suites/main/startup-paths-and-ua.test.js +4 -4
- package/dist/test/suites/main/startup.test.js +26 -26
- package/dist/test/suites/main/stealth-window.test.js +1 -1
- package/dist/test/suites/main/storage.test.js +25 -25
- package/dist/test/suites/main/theme.test.js +34 -34
- package/dist/test/suites/main/tray.test.js +79 -79
- package/dist/test/suites/main/url-helpers.test.js +133 -133
- package/dist/test/suites/main/usage.test.js +25 -25
- package/dist/test/suites/main/window-bounds.test.js +27 -27
- package/dist/test/suites/main/window-manager.test.js +44 -44
- package/dist/test/suites/renderer/analytics-bridge.test.js +5 -5
- package/dist/test/suites/renderer/cross-context-helpers.test.js +37 -31
- package/dist/test/suites/renderer/round-trip.test.js +3 -3
- package/dist/test/suites/renderer/tooltips.test.js +15 -15
- package/dist/test/suites/renderer/{window-em-surface.test.js → window-desktop-surface.test.js} +28 -8
- package/dist/test/utils/extended-mode-warning.js +1 -1
- package/dist/utils/boot-harness.js +56 -0
- package/dist/utils/build-pipeline.js +4 -4
- package/dist/utils/mode-helpers.js +2 -15
- package/dist/utils/runner-env.js +13 -28
- package/dist/utils/ship-keys.js +3 -3
- package/dist/utils/signing-status.js +51 -0
- package/dist/utils/test-events.js +7 -0
- package/dist/utils/test-stealth.js +6 -6
- package/dist/utils/url-helpers.js +52 -42
- package/dist/utils/user-agent.js +44 -0
- package/dist/vendor/account/engine.js +3 -3
- package/dist/vendor/account/index.js +14 -45
- package/dist/vendor/account/resolve-account.js +44 -0
- package/dist/vendor/account/schema.js +1 -1
- package/dist/vendor/account/user.js +99 -0
- package/dist/vendor/config/client-config.js +1 -1
- package/dist/vendor/config/company.js +46 -14
- package/dist/vendor/config/defaults.js +30 -7
- package/dist/vendor/config/edit.js +25 -3
- package/dist/vendor/config/env-delivery.js +1 -1
- package/dist/vendor/config/env-schema.js +3 -6
- package/dist/vendor/config/env.js +34 -22
- package/dist/vendor/config/environment.js +11 -30
- package/dist/vendor/config/index.js +21 -28
- package/dist/vendor/config/load.js +16 -9
- package/dist/vendor/config/platforms.js +1 -1
- package/dist/vendor/config/repo.js +10 -27
- package/dist/vendor/config/schema-client.js +64 -0
- package/dist/vendor/config/schema-cloud.js +38 -0
- package/dist/vendor/config/schema-manager.js +118 -0
- package/dist/vendor/config/schema-overrides.js +68 -0
- package/dist/vendor/config/schema.js +104 -160
- package/dist/vendor/config/site-global.js +2 -3
- package/dist/vendor/config/validate.js +97 -78
- package/dist/vendor/config/winback.js +1 -1
- package/dist/vendor/devkit/actions-secrets.js +1 -1
- package/dist/vendor/devkit/agents-md.js +233 -0
- package/dist/vendor/devkit/attach-log-file.js +16 -2
- package/dist/vendor/devkit/build-json.js +1 -1
- package/dist/vendor/devkit/ci-workflows.js +30 -30
- package/dist/vendor/devkit/cli-router.js +16 -11
- package/dist/vendor/devkit/defaults-engine.js +15 -51
- package/dist/vendor/devkit/deploy-snapshot.js +44 -9
- package/dist/vendor/devkit/env-lines.js +183 -0
- package/dist/vendor/devkit/local.js +64 -10
- package/dist/vendor/devkit/lockfile.js +32 -13
- package/dist/vendor/devkit/logger.js +7 -2
- package/dist/vendor/devkit/merge-line-files.js +219 -177
- package/dist/vendor/devkit/omega-bin.js +208 -111
- package/dist/vendor/devkit/preludes/docs-sync.js +52 -0
- package/dist/vendor/devkit/preludes/index.js +1 -0
- package/dist/vendor/devkit/target-picker.js +45 -0
- package/dist/vendor/devkit/test/dashed-files.js +37 -0
- package/dist/vendor/devkit/test/run-verb-under-tee.js +71 -0
- package/dist/vendor/devkit/test/runner-core.js +6 -6
- package/dist/vendor/devkit/update.js +15 -15
- package/dist/vendor/devkit/verb-scripts.js +40 -0
- package/dist/vendor/devkit/verbs.js +170 -0
- package/dist/vendor/monitoring/env.js +2 -2
- package/dist/vendor/monitoring/index.js +1 -1
- package/dist/vendor/monitoring/main.js +1 -1
- package/dist/vendor/monitoring/preload.js +1 -1
- package/dist/vendor/monitoring/renderer.js +1 -1
- package/package.json +19 -26
- package/dist/commands/install.js +0 -37
- package/dist/defaults/AGENTS.md +0 -110
- package/dist/defaults/CLAUDE.md +0 -1
- package/dist/lib/client-bridge.js +0 -374
- package/dist/lib/logger.js +0 -4
- package/dist/test/suites/build/manager.test.js +0 -213
- package/dist/test/suites/main/client-bridge.test.js +0 -262
- package/dist/vendor/config/env-retired.js +0 -137
- package/dist/vendor/config/retired-keys.js +0 -635
- package/docs/analytics.md +0 -140
- package/docs/app-state.md +0 -92
- package/docs/audit.md +0 -69
- package/docs/auto-updater.md +0 -243
- package/docs/boot-sequence.md +0 -39
- package/docs/build-system.md +0 -169
- package/docs/cdp-debugging.md +0 -169
- package/docs/client-bridge.md +0 -269
- package/docs/common-mistakes.md +0 -21
- package/docs/config-schema.md +0 -120
- package/docs/context-menu.md +0 -112
- package/docs/context.md +0 -81
- package/docs/css.md +0 -90
- package/docs/deep-link.md +0 -186
- package/docs/environment-detection.md +0 -112
- package/docs/fontawesome.md +0 -107
- package/docs/hooks.md +0 -89
- package/docs/icons.md +0 -79
- package/docs/index.md +0 -317
- package/docs/installer-options.md +0 -165
- package/docs/ipc.md +0 -61
- package/docs/lib-modules.md +0 -53
- package/docs/logging.md +0 -229
- package/docs/menu.md +0 -160
- package/docs/releasing.md +0 -239
- package/docs/remote-config.md +0 -118
- package/docs/remote-scripts.md +0 -144
- package/docs/restart-manager.md +0 -144
- package/docs/runner.md +0 -290
- package/docs/sentry.md +0 -97
- package/docs/shared/agent-docs.md +0 -89
- package/docs/shared/analytics.md +0 -612
- package/docs/shared/brands.md +0 -57
- package/docs/shared/breaking-changes.md +0 -851
- package/docs/shared/config.md +0 -1952
- package/docs/shared/deploys.md +0 -341
- package/docs/shared/icons.md +0 -219
- package/docs/shared/local-dev.md +0 -167
- package/docs/shared/logging.md +0 -205
- package/docs/shared/monitoring.md +0 -167
- package/docs/shared/publishing.md +0 -187
- package/docs/shared/rulings.md +0 -34
- package/docs/shared/testing.md +0 -147
- package/docs/shared/theming.md +0 -629
- package/docs/shared/translation.md +0 -333
- package/docs/shared/updates.md +0 -61
- package/docs/signing.md +0 -293
- package/docs/startup.md +0 -142
- package/docs/storage.md +0 -59
- package/docs/templating.md +0 -101
- package/docs/test-boot-layer.md +0 -157
- package/docs/test-framework.md +0 -362
- package/docs/themes.md +0 -149
- package/docs/tooltips.md +0 -99
- package/docs/tray.md +0 -164
- package/docs/usage.md +0 -58
- package/docs/verts.md +0 -62
- package/docs/windows.md +0 -149
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// /test — Theme (newsflash) page JS — the #theme layer.
|
|
2
2
|
// Runs AFTER #main, BEFORE #project. Turns the "js-theme" dot green.
|
|
3
|
-
export default ({
|
|
3
|
+
export default ({ omega, options }) => {
|
|
4
4
|
const dot = document.querySelector('.layer-dot[data-layer="js-theme"]');
|
|
5
5
|
if (dot) {
|
|
6
6
|
dot.style.background = '#30a46c'; // green
|
package/dist/build.js
CHANGED
|
@@ -1,96 +1,71 @@
|
|
|
1
|
+
// The build-time module: one plain object of functions every gulp task, verb
|
|
2
|
+
// and consumer hook reads (`const build = require('@omega.js/desktop/build')`).
|
|
3
|
+
// No class and no `new`, the shape @omega.js/web's and @omega.js/extension's
|
|
4
|
+
// build modules share.
|
|
5
|
+
|
|
1
6
|
// Libraries
|
|
2
7
|
const path = require('path');
|
|
3
8
|
const jetpack = require('fs-jetpack');
|
|
4
9
|
const { setEnvironment, buildLaneEnvironment } = require('./vendor/config/environment.js');
|
|
5
10
|
const fs = require('fs');
|
|
6
11
|
const JSON5 = require('json5');
|
|
7
|
-
const { force
|
|
12
|
+
const { force } = require('node-powertools');
|
|
8
13
|
const { parseArgv } = require('./vendor/devkit/argv.js');
|
|
14
|
+
const { getEnvironment, isDevelopment, isProduction, isTesting, getVersion } = require('./utils/mode-helpers.js');
|
|
9
15
|
|
|
10
|
-
//
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Properties
|
|
15
|
-
self._logger = null;
|
|
16
|
-
|
|
17
|
-
// Return
|
|
18
|
-
return self;
|
|
16
|
+
// Logger: a named build logger
|
|
17
|
+
function logger(name) {
|
|
18
|
+
return new (require('./vendor/devkit/logger.js'))(name);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
// Initialize (build-time hook)
|
|
22
|
-
Manager.prototype.initialize = function () {
|
|
23
|
-
console.log('initialize:');
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// Logger
|
|
27
|
-
Manager.prototype.logger = function (name) {
|
|
28
|
-
// Static-style call
|
|
29
|
-
if (!(this instanceof Manager)) {
|
|
30
|
-
return new (require('./lib/logger'))(name);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Cache one logger per Manager instance
|
|
34
|
-
if (!this._logger) {
|
|
35
|
-
this._logger = new (require('./lib/logger'))(name);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return this._logger;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
21
|
// argv: the gulp lane's own parse. It is spawned with the TASK NAME alone
|
|
42
22
|
// (`npm run gulp -- build`), so `debug` is the one flag it declares.
|
|
43
|
-
|
|
23
|
+
function getArguments() {
|
|
44
24
|
const options = parseArgv(process.argv.slice(2), { booleans: ['debug'] });
|
|
45
25
|
|
|
46
26
|
options.debug = force(options.debug === undefined ? false : options.debug, 'boolean');
|
|
47
27
|
|
|
48
28
|
return options;
|
|
49
|
-
}
|
|
50
|
-
Manager.prototype.getArguments = Manager.getArguments;
|
|
29
|
+
}
|
|
51
30
|
|
|
52
|
-
// Report build errors with notification (parity with
|
|
53
|
-
|
|
54
|
-
const
|
|
31
|
+
// Report build errors with notification (parity with @omega.js/extension)
|
|
32
|
+
function reportBuildError(error, callback) {
|
|
33
|
+
const log = logger('build-error');
|
|
55
34
|
const errorMessage = error.message || error.toString() || 'Unknown error';
|
|
56
35
|
const errorPlugin = error.plugin || 'Build';
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
log.error(`[${errorPlugin}] ${errorMessage}`);
|
|
59
38
|
|
|
60
39
|
if (callback) {
|
|
61
40
|
return callback(error);
|
|
62
41
|
}
|
|
63
42
|
|
|
64
43
|
return (cb) => cb ? cb(error) : error;
|
|
65
|
-
}
|
|
66
|
-
Manager.prototype.reportBuildError = Manager.reportBuildError;
|
|
44
|
+
}
|
|
67
45
|
|
|
68
46
|
// Mode flags
|
|
69
|
-
|
|
47
|
+
function isBuildMode() {
|
|
70
48
|
return process.env.OMEGA_BUILD_MODE === 'true';
|
|
71
|
-
}
|
|
72
|
-
Manager.prototype.isBuildMode = Manager.isBuildMode;
|
|
49
|
+
}
|
|
73
50
|
|
|
74
|
-
|
|
51
|
+
function isPublishMode() {
|
|
75
52
|
return process.env.OMEGA_IS_PUBLISH === 'true';
|
|
76
|
-
}
|
|
77
|
-
Manager.prototype.isPublishMode = Manager.isPublishMode;
|
|
53
|
+
}
|
|
78
54
|
|
|
79
|
-
|
|
55
|
+
function isServerMode() {
|
|
80
56
|
return process.env.OMEGA_IS_SERVER === 'true';
|
|
81
|
-
}
|
|
82
|
-
Manager.prototype.isServerMode = Manager.isServerMode;
|
|
57
|
+
}
|
|
83
58
|
|
|
84
|
-
|
|
85
|
-
return Boolean(
|
|
86
|
-
}
|
|
87
|
-
Manager.prototype.actLikeProduction = Manager.actLikeProduction;
|
|
59
|
+
function actLikeProduction() {
|
|
60
|
+
return Boolean(isBuildMode() || process.env.OMEGA_AUDIT_FORCE === 'true');
|
|
61
|
+
}
|
|
88
62
|
|
|
89
63
|
// The environment is the ONE module's (@omega.js/config's environment.js,
|
|
90
64
|
// [#817](https://github.com/Omega-JS-Stack/omega/issues/817)), reachable from
|
|
91
|
-
// all four @omega.js/desktop
|
|
92
|
-
//
|
|
93
|
-
// every context resolves it identically. It reads ONE
|
|
65
|
+
// all four @omega.js/desktop entry points (the main / renderer / preload `Omega`
|
|
66
|
+
// classes and this build module) through the same plain functions in
|
|
67
|
+
// utils/mode-helpers.js, so every context resolves it identically. It reads ONE
|
|
68
|
+
// input and never guesses.
|
|
94
69
|
//
|
|
95
70
|
// THIS FILE IS THE NODE LANE'S ONE SETTER, and it runs at load, before any
|
|
96
71
|
// gulp task, verb or getConfig() asks. Two rules, no sniffing:
|
|
@@ -108,19 +83,18 @@ Manager.prototype.actLikeProduction = Manager.actLikeProduction;
|
|
|
108
83
|
// The electron app this lane spawns inherits the variable; a PACKAGED app has
|
|
109
84
|
// no parent env, so main.js sets it from the baked config instead (the same
|
|
110
85
|
// word, written into the artifact by the bundle task).
|
|
111
|
-
setEnvironment(buildLaneEnvironment(
|
|
86
|
+
setEnvironment(buildLaneEnvironment(isBuildMode()));
|
|
112
87
|
|
|
113
|
-
|
|
88
|
+
function getMode() {
|
|
114
89
|
return {
|
|
115
|
-
build:
|
|
116
|
-
publish:
|
|
117
|
-
server:
|
|
118
|
-
environment:
|
|
90
|
+
build: isBuildMode(),
|
|
91
|
+
publish: isPublishMode(),
|
|
92
|
+
server: isServerMode(),
|
|
93
|
+
environment: getEnvironment(),
|
|
119
94
|
};
|
|
120
|
-
}
|
|
121
|
-
Manager.prototype.getMode = Manager.getMode;
|
|
95
|
+
}
|
|
122
96
|
|
|
123
|
-
// Config
|
|
97
|
+
// Config: the consumer's config/omega.json5 resolved for the desktop target via
|
|
124
98
|
// @omega.js/config: shared sections (brand, cloud, analytics, payment, monitoring,
|
|
125
99
|
// theme) at the top level, targets.desktop overlaid onto them (so app/platforms/startup/
|
|
126
100
|
// releases/... land at the top level here), and in a brand monorepo the brand root's
|
|
@@ -136,7 +110,7 @@ Manager.prototype.getMode = Manager.getMode;
|
|
|
136
110
|
// app.productName ← brand.name if not set
|
|
137
111
|
// These keep the consumer's config minimal: setting `brand: { id: 'foo', name: 'Foo',
|
|
138
112
|
// url: 'https://foo.com' }` is enough; appId/productName flow through automatically.
|
|
139
|
-
|
|
113
|
+
function getConfig() {
|
|
140
114
|
const { hasOmegaConfig, loadConfig, composeBundleId, deriveBundleIdPrefix } = require('./vendor/config/index.js');
|
|
141
115
|
|
|
142
116
|
// WHICH environment overlay composes
|
|
@@ -147,7 +121,7 @@ Manager.getConfig = function () {
|
|
|
147
121
|
// every other read in the process answers from, so the overlay that composes
|
|
148
122
|
// and the environment the artifact records can never be two different words.
|
|
149
123
|
// Same rule, same shape, in @omega.js/extension's getConfig.
|
|
150
|
-
const environment =
|
|
124
|
+
const environment = getEnvironment();
|
|
151
125
|
|
|
152
126
|
// No config at all (fresh dir, non-consumer cwd) → seeded empty shape below; the
|
|
153
127
|
// schema validation in audit/boot reports what's actually missing.
|
|
@@ -184,11 +158,10 @@ Manager.getConfig = function () {
|
|
|
184
158
|
if (!config.app.productName && config.brand.name) config.app.productName = config.brand.name;
|
|
185
159
|
|
|
186
160
|
return config;
|
|
187
|
-
}
|
|
188
|
-
Manager.prototype.getConfig = Manager.getConfig;
|
|
161
|
+
}
|
|
189
162
|
|
|
190
163
|
// package.json
|
|
191
|
-
|
|
164
|
+
function getPackage(type) {
|
|
192
165
|
const basePath = type === 'project'
|
|
193
166
|
? process.cwd()
|
|
194
167
|
: path.resolve(__dirname, '..');
|
|
@@ -201,35 +174,31 @@ Manager.getPackage = function (type) {
|
|
|
201
174
|
}
|
|
202
175
|
|
|
203
176
|
return JSON5.parse(raw);
|
|
204
|
-
}
|
|
205
|
-
Manager.prototype.getPackage = Manager.getPackage;
|
|
177
|
+
}
|
|
206
178
|
|
|
207
179
|
// Root path
|
|
208
|
-
|
|
180
|
+
function getRootPath(type) {
|
|
209
181
|
return type === 'project'
|
|
210
182
|
? process.cwd()
|
|
211
183
|
: path.resolve(__dirname, '..');
|
|
212
|
-
}
|
|
213
|
-
Manager.prototype.getRootPath = Manager.getRootPath;
|
|
184
|
+
}
|
|
214
185
|
|
|
215
186
|
// Live reload port
|
|
216
|
-
|
|
187
|
+
function getLiveReloadPort() {
|
|
217
188
|
process.env.OMEGA_LIVERELOAD_PORT = process.env.OMEGA_LIVERELOAD_PORT || 35729;
|
|
218
189
|
return parseInt(process.env.OMEGA_LIVERELOAD_PORT, 10);
|
|
219
|
-
}
|
|
220
|
-
Manager.prototype.getLiveReloadPort = Manager.getLiveReloadPort;
|
|
190
|
+
}
|
|
221
191
|
|
|
222
192
|
// Windows signing strategy. Config-only: `platforms.windows.signing.strategy`
|
|
223
193
|
// (targets.desktop.platforms.windows in the raw omega.json5). Default 'self-hosted'.
|
|
224
|
-
|
|
225
|
-
const config =
|
|
194
|
+
function getWindowsSignStrategy() {
|
|
195
|
+
const config = getConfig();
|
|
226
196
|
return config?.platforms?.windows?.signing?.strategy || 'self-hosted';
|
|
227
|
-
}
|
|
228
|
-
Manager.prototype.getWindowsSignStrategy = Manager.getWindowsSignStrategy;
|
|
197
|
+
}
|
|
229
198
|
|
|
230
199
|
// Touch files to trigger a rebuild watcher
|
|
231
|
-
|
|
232
|
-
|
|
200
|
+
function triggerRebuild(files, log) {
|
|
201
|
+
log = log || console;
|
|
233
202
|
|
|
234
203
|
if (typeof files === 'string') {
|
|
235
204
|
files = [files];
|
|
@@ -238,7 +207,7 @@ Manager.triggerRebuild = function (files, logger) {
|
|
|
238
207
|
} else if (typeof files === 'object' && files !== null) {
|
|
239
208
|
files = Object.keys(files);
|
|
240
209
|
} else {
|
|
241
|
-
|
|
210
|
+
log.error('Invalid files for triggerRebuild()');
|
|
242
211
|
return;
|
|
243
212
|
}
|
|
244
213
|
|
|
@@ -247,24 +216,15 @@ Manager.triggerRebuild = function (files, logger) {
|
|
|
247
216
|
files.forEach((file) => {
|
|
248
217
|
try {
|
|
249
218
|
fs.utimesSync(file, now, now);
|
|
250
|
-
|
|
219
|
+
log.log(`Triggered build: ${file}`);
|
|
251
220
|
} catch (e) {
|
|
252
|
-
|
|
221
|
+
log.error(`Failed to trigger build ${file}`, e);
|
|
253
222
|
}
|
|
254
223
|
});
|
|
255
|
-
}
|
|
256
|
-
Manager.prototype.triggerRebuild = Manager.triggerRebuild;
|
|
257
|
-
|
|
258
|
-
// Generic require passthrough (lets gulp tasks dynamically load lib modules).
|
|
259
|
-
// Only ever called from gulp tasks (release / package / bundle), which run
|
|
260
|
-
// un-bundled — so plain require is fine.
|
|
261
|
-
Manager.require = function (p) {
|
|
262
|
-
return require(p);
|
|
263
|
-
};
|
|
264
|
-
Manager.prototype.require = Manager.require;
|
|
224
|
+
}
|
|
265
225
|
|
|
266
226
|
// Memory usage
|
|
267
|
-
|
|
227
|
+
function getMemoryUsage() {
|
|
268
228
|
const used = process.memoryUsage();
|
|
269
229
|
return {
|
|
270
230
|
rss: Math.round(used.rss / 1024 / 1024),
|
|
@@ -272,19 +232,35 @@ Manager.getMemoryUsage = function () {
|
|
|
272
232
|
heapUsed: Math.round(used.heapUsed / 1024 / 1024),
|
|
273
233
|
external: Math.round(used.external / 1024 / 1024),
|
|
274
234
|
};
|
|
275
|
-
}
|
|
276
|
-
Manager.prototype.getMemoryUsage = Manager.getMemoryUsage;
|
|
277
|
-
|
|
278
|
-
Manager.logMemory = function (logger, label) {
|
|
279
|
-
const mem = Manager.getMemoryUsage();
|
|
280
|
-
logger.log(`[Memory ${label}] RSS: ${mem.rss}MB | Heap Used: ${mem.heapUsed}MB / ${mem.heapTotal}MB | External: ${mem.external}MB`);
|
|
281
|
-
};
|
|
282
|
-
Manager.prototype.logMemory = Manager.logMemory;
|
|
235
|
+
}
|
|
283
236
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
237
|
+
function logMemory(log, label) {
|
|
238
|
+
const mem = getMemoryUsage();
|
|
239
|
+
log.log(`[Memory ${label}] RSS: ${mem.rss}MB | Heap Used: ${mem.heapUsed}MB / ${mem.heapTotal}MB | External: ${mem.external}MB`);
|
|
240
|
+
}
|
|
288
241
|
|
|
289
|
-
// Export
|
|
290
|
-
|
|
242
|
+
// Export: the environment four + getVersion() come from the same plain
|
|
243
|
+
// functions the runtime `Omega` classes call
|
|
244
|
+
module.exports = {
|
|
245
|
+
logger,
|
|
246
|
+
getArguments,
|
|
247
|
+
reportBuildError,
|
|
248
|
+
isBuildMode,
|
|
249
|
+
isPublishMode,
|
|
250
|
+
isServerMode,
|
|
251
|
+
actLikeProduction,
|
|
252
|
+
getMode,
|
|
253
|
+
getConfig,
|
|
254
|
+
getPackage,
|
|
255
|
+
getRootPath,
|
|
256
|
+
getLiveReloadPort,
|
|
257
|
+
getWindowsSignStrategy,
|
|
258
|
+
triggerRebuild,
|
|
259
|
+
getMemoryUsage,
|
|
260
|
+
logMemory,
|
|
261
|
+
getEnvironment,
|
|
262
|
+
isDevelopment,
|
|
263
|
+
isProduction,
|
|
264
|
+
isTesting,
|
|
265
|
+
getVersion,
|
|
266
|
+
};
|
package/dist/cli-run.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
const BOOLEAN_FLAGS = [
|
|
10
10
|
'extended', 'local', 'quick', 'q', 'direct', 'dry-run', 'secrets',
|
|
11
11
|
'smoke', 'verify-only', 'find-window-id', 'publish', 'open', 'tail', 'f', 'strict',
|
|
12
|
-
'
|
|
12
|
+
'major', 'force-fresh',
|
|
13
13
|
];
|
|
14
14
|
|
|
15
15
|
async function run() {
|
|
@@ -39,3 +39,6 @@ async function run() {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
module.exports = { run, BOOLEAN_FLAGS };
|
|
42
|
+
|
|
43
|
+
// Runnable as a file: the package's own `npm test` calls it directly, never through the dispatcher
|
|
44
|
+
if (require.main === module) run();
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ const { isBoxVerbArgv } = require('./vendor/devkit/omega-bin.js');
|
|
|
19
19
|
// reading of it, covering the bare verb and its `--` flag spelling alike.
|
|
20
20
|
if (!isBoxVerbArgv(process.argv.slice(2))) {
|
|
21
21
|
require('./utils/load-env.js').loadDesktopEnv(process.cwd(), {
|
|
22
|
-
logger: new (require('./
|
|
22
|
+
logger: new (require('./vendor/devkit/logger.js'))('env'),
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -36,14 +36,14 @@ module.exports = createCliRouter({
|
|
|
36
36
|
defaultCommand: 'help',
|
|
37
37
|
aliases: {
|
|
38
38
|
clean: ['-c', '--clean'],
|
|
39
|
-
|
|
39
|
+
dev: ['serve', 'start', '--dev'],
|
|
40
40
|
version: ['-v', '--version'],
|
|
41
41
|
build: ['-b', '--build'],
|
|
42
42
|
deploy: ['-d', '--deploy'],
|
|
43
43
|
publish: ['-p', '--publish'],
|
|
44
44
|
release: ['-r', '--release'],
|
|
45
45
|
test: ['-t', '--test'],
|
|
46
|
-
update: ['-u', '--update'
|
|
46
|
+
update: ['-u', '--update'],
|
|
47
47
|
logs: ['--logs', 'log'],
|
|
48
48
|
'validate-certs': ['certs', '--validate-certs'],
|
|
49
49
|
'sign-windows': ['--sign-windows'],
|
package/dist/commands/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Libraries
|
|
2
|
-
const
|
|
3
|
-
const logger =
|
|
2
|
+
const build = require('../build.js');
|
|
3
|
+
const logger = build.logger('build');
|
|
4
4
|
const { runPipeline } = require('../utils/build-pipeline.js');
|
|
5
5
|
const { ensureTarget } = require('./lib/ensure-target.js');
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
const { execFileSync } = require('child_process');
|
|
22
22
|
const client = require('./client');
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const build = require('../../build.js');
|
|
25
25
|
|
|
26
26
|
const SRGB_PROFILE = '/System/Library/ColorSync/Profiles/sRGB Profile.icc';
|
|
27
27
|
|
|
@@ -65,7 +65,7 @@ module.exports = async function (options) {
|
|
|
65
65
|
throw new Error('mgr cdp capture is macOS-only (screencapture/sips/osascript)');
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const names = client.appNames(
|
|
68
|
+
const names = client.appNames(build.getConfig());
|
|
69
69
|
|
|
70
70
|
if (options['find-window-id'] || options.findWindowId) {
|
|
71
71
|
console.log(findWindowIds(names) || `no windows found (tried: ${names.join(', ')})`);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// matcher instead of a "selected page"; the main window's document is always
|
|
8
8
|
// at `dist/views/main/` (the MAIN_VIEW default matcher).
|
|
9
9
|
//
|
|
10
|
-
// See docs/cdp-debugging.md for the full toolkit reference.
|
|
10
|
+
// See docs/desktop/cdp-debugging.md for the full toolkit reference.
|
|
11
11
|
|
|
12
12
|
// The main window's view path — @omega.js/desktop's templating convention, so it holds for
|
|
13
13
|
// every consumer. Subcommands that need "the app's main renderer" (status,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
const { execFileSync } = require('child_process');
|
|
10
10
|
const client = require('./client');
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const build = require('../../build.js');
|
|
13
13
|
|
|
14
14
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
15
15
|
|
|
@@ -77,7 +77,7 @@ async function quitAndDrain(names) {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
module.exports = async function (options) {
|
|
80
|
-
const wasRunning = await quitAndDrain(client.appNames(
|
|
80
|
+
const wasRunning = await quitAndDrain(client.appNames(build.getConfig()));
|
|
81
81
|
console.log(wasRunning ? 'quit running app' : 'app was not running');
|
|
82
82
|
};
|
|
83
83
|
|
|
@@ -17,7 +17,7 @@ const { spawn } = require('child_process');
|
|
|
17
17
|
const client = require('./client');
|
|
18
18
|
const { quitAndDrain } = require('./quit');
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const build = require('../../build.js');
|
|
21
21
|
|
|
22
22
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
23
23
|
|
|
@@ -42,7 +42,7 @@ async function waitForBoot(matcher) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
module.exports = async function (options) {
|
|
45
|
-
const config =
|
|
45
|
+
const config = build.getConfig();
|
|
46
46
|
|
|
47
47
|
const wasRunning = await quitAndDrain(client.appNames(config));
|
|
48
48
|
console.log(wasRunning ? 'quit running app' : 'app was not running');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// `npx omega cdp theme <dark|light|system>` — flip the app's theme live
|
|
2
|
-
// (
|
|
2
|
+
// (omega.theme via the main window's renderer).
|
|
3
3
|
//
|
|
4
4
|
// Flips every renderer (BrowserWindows AND WebContentsViews) with no restart —
|
|
5
5
|
// nativeTheme.themeSource → prefers-color-scheme → the preload applier
|
package/dist/commands/cdp.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// MANGLES quoted eval expressions (cross-env strips inner quotes), so a
|
|
17
17
|
// pinned-port script must pass the port as a flag instead. Targets are
|
|
18
18
|
// matched by URL substring (the main window is always `/views/main/`).
|
|
19
|
-
// Full reference: docs/cdp-debugging.md.
|
|
19
|
+
// Full reference: docs/desktop/cdp-debugging.md.
|
|
20
20
|
|
|
21
21
|
const path = require('path');
|
|
22
22
|
|
package/dist/commands/clean.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Libraries
|
|
2
|
-
const
|
|
3
|
-
const logger =
|
|
2
|
+
const build = require('../build.js');
|
|
3
|
+
const logger = build.logger('clean');
|
|
4
4
|
const { cleanDirs } = require('../vendor/devkit/clean-dirs.js');
|
|
5
5
|
const { ensureTarget } = require('./lib/ensure-target.js');
|
|
6
6
|
|
|
@@ -13,9 +13,8 @@ const dirs = [
|
|
|
13
13
|
];
|
|
14
14
|
|
|
15
15
|
module.exports = async function (options) {
|
|
16
|
-
// The local scaffold
|
|
17
|
-
//
|
|
18
|
-
// deps the ensure installs — clean is the only verb that runs before it.
|
|
16
|
+
// The local scaffold: dev, build and package clean before gulp runs,
|
|
17
|
+
// and gulp itself is one of the peer deps the ensure installs.
|
|
19
18
|
await ensureTarget({ log: (line) => logger.log(line), warn: (line) => logger.warn(line) });
|
|
20
19
|
|
|
21
20
|
// Quick mode used to keep `dist/` so "the next gulp run is incremental" —
|
package/dist/commands/deploy.js
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* most; a linked brand now packs its frameworks into the snapshot instead.
|
|
19
19
|
*/
|
|
20
20
|
const path = require('node:path');
|
|
21
|
-
const
|
|
22
|
-
const logger =
|
|
21
|
+
const build = require('../build.js');
|
|
22
|
+
const logger = build.logger('deploy');
|
|
23
23
|
const attachLogFile = require('../utils/attach-log-file.js');
|
|
24
24
|
const { assertBrandVersion } = require('../vendor/devkit/brand-version.js');
|
|
25
25
|
const { targetNameFromDir } = require('../vendor/config/index.js');
|
|
@@ -62,9 +62,9 @@ module.exports = async function (options) {
|
|
|
62
62
|
if (dryRun) {
|
|
63
63
|
logger.log('DRY RUN, skipping hook "deploy/pre"');
|
|
64
64
|
} else {
|
|
65
|
-
// The one ctx shape every OMEGA hook takes, `{
|
|
65
|
+
// The one ctx shape every OMEGA hook takes, `{ build, projectRoot, mode }`,
|
|
66
66
|
// and a deploy's mode is PRODUCTION: what it is about to publish is a release.
|
|
67
|
-
await runConsumerHook('deploy/pre', {
|
|
67
|
+
await runConsumerHook('deploy/pre', { build, projectRoot: projectDir, mode: 'production' });
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
// The direct lane: build + sign + publish from THIS machine, for this
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
const build = require('../build.js');
|
|
3
|
+
const logger = build.logger('dev');
|
|
4
|
+
const { runPipeline } = require('../utils/build-pipeline.js');
|
|
5
|
+
|
|
6
|
+
// The local dev loop the target's `start` script runs: clean (which runs the
|
|
7
|
+
// local scaffold), then the gulp default task, build then launch electron. The
|
|
8
|
+
// `--` flags it was given ride to the gulp lane (`--debug`, `--remote-debugging-port=<n>`).
|
|
9
|
+
function plan(options, argv = process.argv.slice(2)) {
|
|
10
|
+
return {
|
|
11
|
+
env: {},
|
|
12
|
+
steps: [
|
|
13
|
+
{ type: 'clean' },
|
|
14
|
+
{ type: 'gulp', task: 'default', args: argv.filter((arg) => arg.startsWith('--')) },
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = async function (options) {
|
|
20
|
+
logger.log('Starting the dev loop...');
|
|
21
|
+
|
|
22
|
+
await runPipeline(plan(options), options);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
module.exports.plan = plan;
|
|
@@ -27,9 +27,9 @@ const jetpack = require('fs-jetpack');
|
|
|
27
27
|
|
|
28
28
|
const { getOctokit } = require('../utils/github.js');
|
|
29
29
|
const { releasesRepo } = require('../vendor/config/index.js');
|
|
30
|
-
const
|
|
30
|
+
const build = require('../build.js');
|
|
31
31
|
|
|
32
|
-
const logger =
|
|
32
|
+
const logger = build.logger('finalize-release');
|
|
33
33
|
|
|
34
34
|
module.exports = async function finalizeRelease(options = {}) {
|
|
35
35
|
const argv = options._ || [];
|
|
@@ -42,8 +42,8 @@ module.exports = async function finalizeRelease(options = {}) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
const projectRoot = process.cwd();
|
|
45
|
-
const config =
|
|
46
|
-
const pkgVersion = (
|
|
45
|
+
const config = build.getConfig() || {};
|
|
46
|
+
const pkgVersion = (build.getPackage('project') || {}).version;
|
|
47
47
|
|
|
48
48
|
if (!pkgVersion) {
|
|
49
49
|
throw new Error('finalize-release: package.json version not found');
|
package/dist/commands/launch.js
CHANGED
|
@@ -31,8 +31,8 @@ const fs = require('fs');
|
|
|
31
31
|
const jetpack = require('fs-jetpack');
|
|
32
32
|
const { spawn } = require('child_process');
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
const logger =
|
|
34
|
+
const build = require('../build.js');
|
|
35
|
+
const logger = build.logger('launch');
|
|
36
36
|
|
|
37
37
|
module.exports = async function (options) {
|
|
38
38
|
options = options || {};
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
* The RUNNER is `@omega.js/devkit/deploy-precheck` (one copy for every
|
|
23
23
|
* framework); this file is desktop's STEPS.
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const build = require('../../build.js');
|
|
26
26
|
const { runDeployPrecheck } = require('../../vendor/devkit/deploy-precheck.js');
|
|
27
27
|
const { releasesRepo } = require('../../vendor/config/index.js');
|
|
28
28
|
const { publishTargetSecrets } = require('../../vendor/devkit/target-secrets.js');
|
|
29
29
|
const { resolveToken } = require('../../vendor/devkit/deploy.js');
|
|
30
30
|
const { updateManager } = require('./dependencies.js');
|
|
31
31
|
|
|
32
|
-
const package =
|
|
32
|
+
const package = build.getPackage('main');
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Auto-provision the brand's ONE public releases repo, addressed by
|
|
@@ -57,7 +57,7 @@ const package = Manager.getPackage('main');
|
|
|
57
57
|
async function provisionReleaseRepos({ log, warn, config, execFn, dryRun }) {
|
|
58
58
|
const { ensureRepo } = require('../../vendor/devkit/github-repo.js');
|
|
59
59
|
|
|
60
|
-
const resolved = config ||
|
|
60
|
+
const resolved = config || build.getConfig() || {};
|
|
61
61
|
if (resolved.releases?.enabled === false) return;
|
|
62
62
|
|
|
63
63
|
const releases = releasesRepo(resolved);
|