@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
|
@@ -26,10 +26,10 @@ const COMMANDS = path.join(__dirname, '..', '..', '..', 'commands');
|
|
|
26
26
|
const DEPLOY = path.join(COMMANDS, 'deploy.js');
|
|
27
27
|
const WORKFLOW = path.join(__dirname, '..', '..', '..', 'defaults', '.github', 'workflows', 'build.yml');
|
|
28
28
|
|
|
29
|
-
// The scripts every target gets from the scaffold,
|
|
30
|
-
//
|
|
29
|
+
// The scripts every target gets from the scaffold, derived the one way the
|
|
30
|
+
// scaffold derives them: expanding the workflow's command through THESE is what ties
|
|
31
31
|
// the runner's step to the verb this laptop runs.
|
|
32
|
-
const SCRIPTS = require(path.join(__dirname, '..', '..', '..', '..', 'package.json'))
|
|
32
|
+
const SCRIPTS = require('../../../vendor/devkit/verb-scripts.js').projectScripts(require(path.join(__dirname, '..', '..', '..', '..', 'package.json')));
|
|
33
33
|
|
|
34
34
|
const { directPlatform } = require(DEPLOY);
|
|
35
35
|
|
|
@@ -147,6 +147,7 @@ module.exports = defineCases({
|
|
|
147
147
|
const resolved = require.resolve(DEPLOY);
|
|
148
148
|
const cached = require.cache[resolved];
|
|
149
149
|
delete require.cache[resolved];
|
|
150
|
+
const restoreTee = attachLogFile.mark();
|
|
150
151
|
|
|
151
152
|
try {
|
|
152
153
|
const deploy = require(resolved);
|
|
@@ -159,7 +160,7 @@ module.exports = defineCases({
|
|
|
159
160
|
ctx.expect(ran).toEqual(['ensure-target']);
|
|
160
161
|
} finally {
|
|
161
162
|
// The verb tees this process' writers now (#873): hand them back.
|
|
162
|
-
|
|
163
|
+
restoreTee();
|
|
163
164
|
for (const restore of restores) restore();
|
|
164
165
|
if (cached) require.cache[resolved] = cached;
|
|
165
166
|
else delete require.cache[resolved];
|
|
@@ -206,6 +207,7 @@ module.exports = defineCases({
|
|
|
206
207
|
const resolved = require.resolve(DEPLOY);
|
|
207
208
|
const cached = require.cache[resolved];
|
|
208
209
|
delete require.cache[resolved];
|
|
210
|
+
const restoreTee = attachLogFile.mark();
|
|
209
211
|
|
|
210
212
|
try {
|
|
211
213
|
const deploy = require(resolved);
|
|
@@ -229,7 +231,7 @@ module.exports = defineCases({
|
|
|
229
231
|
ctx.expect(script.split(' ').filter((word) => word.startsWith('--'))).toEqual(['--local']);
|
|
230
232
|
} finally {
|
|
231
233
|
// The verb tees this process' writers now (#873): hand them back.
|
|
232
|
-
|
|
234
|
+
restoreTee();
|
|
233
235
|
deployRecord.recordDeploy = recordDeploy;
|
|
234
236
|
for (const restore of restores) restore();
|
|
235
237
|
if (cached) require.cache[resolved] = cached;
|
|
@@ -108,6 +108,7 @@ async function runRelease(follower, options = {}, token = {}) {
|
|
|
108
108
|
else process.env.GH_TOKEN = envToken;
|
|
109
109
|
process.chdir(targetDir);
|
|
110
110
|
delete require.cache[require.resolve(RELEASE)];
|
|
111
|
+
const restoreTee = attachLogFile.mark();
|
|
111
112
|
|
|
112
113
|
let error = null;
|
|
113
114
|
try {
|
|
@@ -117,7 +118,7 @@ async function runRelease(follower, options = {}, token = {}) {
|
|
|
117
118
|
} finally {
|
|
118
119
|
// The verb tees this process' writers: hand them back before the next
|
|
119
120
|
// suite prints through a fixture that is about to be gone.
|
|
120
|
-
|
|
121
|
+
restoreTee();
|
|
121
122
|
console.log = previousLog;
|
|
122
123
|
process.chdir(previousCwd);
|
|
123
124
|
if (previousToken === undefined) delete process.env.GH_TOKEN;
|
|
@@ -57,7 +57,7 @@ async function runDeploy(options) {
|
|
|
57
57
|
fs.writeFileSync(path.join(tmp, 'package.json'), '{"name":"desktop-deploy-hook-test"}');
|
|
58
58
|
fs.writeFileSync(
|
|
59
59
|
path.join(tmp, 'hooks', 'deploy', 'pre.js'),
|
|
60
|
-
`module.exports = async (ctx) => { global.__omegaDeployHookRan.push('deploy/pre:' + (ctx.projectRoot === process.cwd() && typeof ctx.
|
|
60
|
+
`module.exports = async (ctx) => { global.__omegaDeployHookRan.push('deploy/pre:' + (ctx.projectRoot === process.cwd() && typeof ctx.build === 'object' && ctx.mode === 'production' ? 'ctx ok' : 'ctx wrong')); };`,
|
|
61
61
|
);
|
|
62
62
|
|
|
63
63
|
const restores = [
|
|
@@ -69,10 +69,11 @@ async function runDeploy(options) {
|
|
|
69
69
|
const origCwd = process.cwd();
|
|
70
70
|
|
|
71
71
|
delete require.cache[resolved];
|
|
72
|
+
const restoreTee = attachLogFile.mark();
|
|
72
73
|
global.__omegaDeployHookRan = ran;
|
|
73
74
|
|
|
74
75
|
try {
|
|
75
|
-
// Required BEFORE the chdir: the verb
|
|
76
|
+
// Required BEFORE the chdir: the verb loads its build module at load time from
|
|
76
77
|
// the real target; only the hook lookup reads cwd, at call time.
|
|
77
78
|
const deploy = require(resolved);
|
|
78
79
|
process.chdir(tmp);
|
|
@@ -80,7 +81,7 @@ async function runDeploy(options) {
|
|
|
80
81
|
return ran;
|
|
81
82
|
} finally {
|
|
82
83
|
// The verb tees this process' writers now (#873): hand them back.
|
|
83
|
-
|
|
84
|
+
restoreTee();
|
|
84
85
|
process.chdir(origCwd);
|
|
85
86
|
delete global.__omegaDeployHookRan;
|
|
86
87
|
for (const restore of restores) restore();
|
|
@@ -116,6 +117,7 @@ async function runDriftedDeploy() {
|
|
|
116
117
|
const origCwd = process.cwd();
|
|
117
118
|
|
|
118
119
|
delete require.cache[resolved];
|
|
120
|
+
const restoreTee = attachLogFile.mark();
|
|
119
121
|
|
|
120
122
|
try {
|
|
121
123
|
const deploy = require(resolved);
|
|
@@ -124,7 +126,7 @@ async function runDriftedDeploy() {
|
|
|
124
126
|
return ran;
|
|
125
127
|
} finally {
|
|
126
128
|
// The verb tees this process' writers now (#873): hand them back.
|
|
127
|
-
|
|
129
|
+
restoreTee();
|
|
128
130
|
process.chdir(origCwd);
|
|
129
131
|
for (const restore of restores) restore();
|
|
130
132
|
if (cached) require.cache[resolved] = cached;
|
|
@@ -139,7 +141,7 @@ module.exports = defineCases({
|
|
|
139
141
|
description: 'deploy: the consumer\'s hooks/deploy/pre.js runs before the precheck (#899)',
|
|
140
142
|
tests: [
|
|
141
143
|
{
|
|
142
|
-
name: 'the hook runs after the scaffold and before the network precheck, with {
|
|
144
|
+
name: 'the hook runs after the scaffold and before the network precheck, with { build, projectRoot, mode: production }',
|
|
143
145
|
run: async (ctx) => {
|
|
144
146
|
const ran = await runDeploy({});
|
|
145
147
|
ctx.expect(ran).toEqual(['ensure-target', 'deploy/pre:ctx ok', 'precheck', 'STOP AT PRECHECK']);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Build-layer tests for the `dev` verb, what the target's `start` script runs:
|
|
2
|
+
// clean, then the gulp default task (build, then launch electron), with the
|
|
3
|
+
// `--` flags it was given forwarded to the gulp lane. No build-mode flag, and
|
|
4
|
+
// never a shell-out back to `npm start` (that script IS this verb).
|
|
5
|
+
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const defineCases = require('../../../vendor/devkit/test/define-cases.js');
|
|
9
|
+
|
|
10
|
+
const SRC = path.join(__dirname, '..', '..', '..');
|
|
11
|
+
const pipeline = require(path.join(SRC, 'utils', 'build-pipeline.js'));
|
|
12
|
+
const dev = require(path.join(SRC, 'commands', 'dev.js'));
|
|
13
|
+
|
|
14
|
+
const stepsOf = (plan) => plan.steps.map((s) => (s.task ? `${s.type}:${s.task}` : s.type));
|
|
15
|
+
|
|
16
|
+
module.exports = defineCases({
|
|
17
|
+
type: 'suite',
|
|
18
|
+
layer: 'build',
|
|
19
|
+
description: 'dev verb: clean, then the gulp default task',
|
|
20
|
+
tests: [
|
|
21
|
+
{
|
|
22
|
+
name: 'dev: clean → gulp default, no build-mode flag',
|
|
23
|
+
run: (ctx) => {
|
|
24
|
+
const plan = dev.plan({}, []);
|
|
25
|
+
ctx.expect(stepsOf(plan)).toEqual(['clean', 'gulp:default']);
|
|
26
|
+
ctx.expect(plan.env.OMEGA_BUILD_MODE).toBe(undefined);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'dev forwards its `--` flags to the gulp lane (`npm start -- --remote-debugging-port=9222`)',
|
|
31
|
+
run: (ctx) => {
|
|
32
|
+
const plan = dev.plan({}, ['dev', '--remote-debugging-port=9222', 'stray', '--debug']);
|
|
33
|
+
ctx.expect(plan.steps[1].args).toEqual(['--remote-debugging-port=9222', '--debug']);
|
|
34
|
+
ctx.expect(pipeline.gulpCommand('default', plan.steps[1].args))
|
|
35
|
+
.toBe('npm run gulp -- default --remote-debugging-port=9222 --debug');
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'runPipeline runs the dev plan in order and leaves the build-mode flag unset',
|
|
40
|
+
run: async (ctx) => {
|
|
41
|
+
const log = [];
|
|
42
|
+
const record = (type) => (options, step) => { log.push(step.task ? `${type}:${step.task}` : type); };
|
|
43
|
+
const previous = process.env.OMEGA_BUILD_MODE;
|
|
44
|
+
delete process.env.OMEGA_BUILD_MODE;
|
|
45
|
+
try {
|
|
46
|
+
await pipeline.runPipeline(dev.plan({}, []), {}, { clean: record('clean'), gulp: record('gulp') });
|
|
47
|
+
ctx.expect(process.env.OMEGA_BUILD_MODE).toBe(undefined);
|
|
48
|
+
} finally {
|
|
49
|
+
if (previous !== undefined) process.env.OMEGA_BUILD_MODE = previous;
|
|
50
|
+
}
|
|
51
|
+
ctx.expect(log).toEqual(['clean', 'gulp:default']);
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'the CLI answers dev and its aliases, and the verb never shells back to `npm start`',
|
|
56
|
+
run: (ctx) => {
|
|
57
|
+
const { aliases } = require(path.join(SRC, 'cli.js')).config;
|
|
58
|
+
ctx.expect(aliases.dev).toEqual(['serve', 'start', '--dev']);
|
|
59
|
+
|
|
60
|
+
const source = fs.readFileSync(path.join(SRC, 'commands', 'dev.js'), 'utf8')
|
|
61
|
+
.replace(/\/\/[^\n]*/g, '')
|
|
62
|
+
.replace(/\/\*[\s\S]*?\*\//g, '');
|
|
63
|
+
ctx.expect(/npm (run )?start/.test(source)).toBe(false);
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
});
|
|
@@ -13,13 +13,13 @@ const os = require('os');
|
|
|
13
13
|
const jetpack = require('fs-jetpack');
|
|
14
14
|
|
|
15
15
|
const SRC = path.join(__dirname, '..', '..', '..');
|
|
16
|
-
const
|
|
16
|
+
const build = require(path.join(SRC, 'build.js'));
|
|
17
17
|
const { ensureTarget } = require(path.join(SRC, 'commands', 'lib', 'ensure-target.js'));
|
|
18
18
|
const { deployPrecheck } = require(path.join(SRC, 'commands', 'lib', 'deploy-precheck.js'));
|
|
19
19
|
const cli = require(path.join(SRC, 'cli.js'));
|
|
20
20
|
const defineCases = require('../../../vendor/devkit/test/define-cases.js');
|
|
21
21
|
|
|
22
|
-
const package =
|
|
22
|
+
const package = build.getPackage('main');
|
|
23
23
|
|
|
24
24
|
// A consumer whose peer deps are already satisfied — the steady state.
|
|
25
25
|
function stageConsumer(dir) {
|
|
@@ -67,7 +67,7 @@ module.exports = defineCases({
|
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
name: 'refuses a workspace root, loudly,
|
|
70
|
+
name: 'refuses a workspace root, loudly, leaving its AGENTS.md and .gitignore byte-identical (#699, #973)',
|
|
71
71
|
run: async (ctx) => {
|
|
72
72
|
// The accident: `omega deploy` at a workspace root scaffolded a whole
|
|
73
73
|
// desktop target into it — gulpfile, src/, hooks/, workflows, rewritten
|
|
@@ -78,6 +78,12 @@ module.exports = defineCases({
|
|
|
78
78
|
manifest.workspaces = ['packages/*'];
|
|
79
79
|
jetpack.write(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
80
80
|
const before = jetpack.read(manifestPath);
|
|
81
|
+
// A root's hand-authored AGENTS.md and .gitignore are what the marker
|
|
82
|
+
// merge rewrites in place: `#` headings and blank lines are its comments.
|
|
83
|
+
const agentsDoc = '# Monorepo\n\n## HARD RULES\n\n1. Rule one.\n';
|
|
84
|
+
const ignoreFile = '# Dependencies\nnode_modules/\n\n# Scratch\n.temp/\n';
|
|
85
|
+
jetpack.write(path.join(tmp, 'AGENTS.md'), agentsDoc);
|
|
86
|
+
jetpack.write(path.join(tmp, '.gitignore'), ignoreFile);
|
|
81
87
|
|
|
82
88
|
try {
|
|
83
89
|
let refusal = null;
|
|
@@ -92,9 +98,11 @@ module.exports = defineCases({
|
|
|
92
98
|
ctx.expect(refusal.message).toMatch(/declares "workspaces"/);
|
|
93
99
|
ctx.expect(refusal.message.includes(tmp)).toBe(true);
|
|
94
100
|
|
|
95
|
-
// Nothing scaffolded, and
|
|
96
|
-
ctx.expect(jetpack.list(tmp)).toEqual(['package.json']);
|
|
101
|
+
// Nothing scaffolded, and every root file is byte-identical.
|
|
102
|
+
ctx.expect(jetpack.list(tmp).sort()).toEqual(['.gitignore', 'AGENTS.md', 'package.json']);
|
|
97
103
|
ctx.expect(jetpack.read(manifestPath)).toBe(before);
|
|
104
|
+
ctx.expect(jetpack.read(path.join(tmp, 'AGENTS.md'))).toBe(agentsDoc);
|
|
105
|
+
ctx.expect(jetpack.read(path.join(tmp, '.gitignore'))).toBe(ignoreFile);
|
|
98
106
|
} finally {
|
|
99
107
|
fs.rmSync(tmp, { recursive: true, force: true });
|
|
100
108
|
}
|
|
@@ -19,13 +19,13 @@ const { publishSecretKeys, bakeKeys, renderSecretsBlock, WORKFLOW_OWNED_KEYS } =
|
|
|
19
19
|
const { composeTargetEnv } = require('../../../vendor/config/index.js');
|
|
20
20
|
|
|
21
21
|
const SRC = path.join(__dirname, '..', '..', '..');
|
|
22
|
-
const
|
|
22
|
+
const build = require(path.join(SRC, 'build.js'));
|
|
23
23
|
const { ensureTarget } = require(path.join(SRC, 'commands', 'lib', 'ensure-target.js'));
|
|
24
24
|
const bundleTask = require(path.join(SRC, 'gulp', 'tasks', 'bundle.js'));
|
|
25
25
|
const { collectTargetSecrets } = require('../../../vendor/devkit/target-secrets.js');
|
|
26
26
|
const defineCases = require('../../../vendor/devkit/test/define-cases.js');
|
|
27
27
|
|
|
28
|
-
const package =
|
|
28
|
+
const package = build.getPackage('main');
|
|
29
29
|
|
|
30
30
|
/** A consumer whose peer deps are already satisfied — the steady state. */
|
|
31
31
|
function stageConsumer() {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// Both Node bundles are CommonJS (`format: 'cjs'`, `platform: 'node'`), and
|
|
5
5
|
// esbuild rewrites `import.meta` to `{}` in that output: a dependency doing
|
|
6
6
|
// `createRequire(import.meta.url)` was handed `undefined` and threw
|
|
7
|
-
// ERR_INVALID_ARG_VALUE the moment a packaged app booted (
|
|
8
|
-
//
|
|
7
|
+
// ERR_INVALID_ARG_VALUE the moment a packaged app booted (an app that depends
|
|
8
|
+
// on yargs 18 does exactly that). @omega.js/devkit's `bundle()`
|
|
9
9
|
// composes the answer for every cjs+node build, so nothing here wires it.
|
|
10
10
|
//
|
|
11
11
|
// The proof is a RUN, not a read of the bundle text: the fixture package
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const build = require('../../../build.js');
|
|
7
7
|
const defineCases = require('../../../vendor/devkit/test/define-cases.js');
|
|
8
|
-
const pkg =
|
|
9
|
-
const root =
|
|
8
|
+
const pkg = build.getPackage('main');
|
|
9
|
+
const root = build.getRootPath('main');
|
|
10
10
|
|
|
11
11
|
module.exports = defineCases({
|
|
12
12
|
type: 'group',
|
|
@@ -28,13 +28,14 @@ module.exports = defineCases({
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
|
|
31
|
+
// main and preload load anywhere and export their instance; the renderer
|
|
32
|
+
// needs its preload's window.desktop, so omega.test.js loads it with one
|
|
33
|
+
name: 'main / preload / build all loadable',
|
|
32
34
|
run: (ctx) => {
|
|
33
35
|
const fromDist = (subpath) => path.join(root, 'dist', subpath);
|
|
34
|
-
ctx.expect(typeof require(fromDist('main.js'))).toBe('
|
|
35
|
-
ctx.expect(typeof require(fromDist('
|
|
36
|
-
ctx.expect(typeof require(fromDist('
|
|
37
|
-
ctx.expect(typeof require(fromDist('build.js'))).toBe('function');
|
|
36
|
+
ctx.expect(typeof require(fromDist('main.js'))).toBe('object');
|
|
37
|
+
ctx.expect(typeof require(fromDist('preload.js'))).toBe('object');
|
|
38
|
+
ctx.expect(typeof require(fromDist('build.js'))).toBe('object');
|
|
38
39
|
},
|
|
39
40
|
},
|
|
40
41
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Build-layer tests for
|
|
1
|
+
// Build-layer tests for build.getConfig() — omega.json5 resolution + derived defaults.
|
|
2
2
|
// Stages a temp consumer dir with a config/omega.json5, sets process.cwd()
|
|
3
3
|
// at it, and asserts the resolution + derivation rules.
|
|
4
4
|
|
|
@@ -43,8 +43,8 @@ function loadConfigInDir(dir) {
|
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
45
|
process.chdir(dir);
|
|
46
|
-
const
|
|
47
|
-
return
|
|
46
|
+
const build = require(path.join(__dirname, '..', '..', '..', 'build.js'));
|
|
47
|
+
return build.getConfig();
|
|
48
48
|
} finally {
|
|
49
49
|
process.chdir(oldCwd);
|
|
50
50
|
}
|
|
@@ -53,7 +53,7 @@ function loadConfigInDir(dir) {
|
|
|
53
53
|
module.exports = defineCases({
|
|
54
54
|
type: 'suite',
|
|
55
55
|
layer: 'build',
|
|
56
|
-
description: '
|
|
56
|
+
description: 'build.getConfig — omega.json5 resolution + derived defaults',
|
|
57
57
|
tests: [
|
|
58
58
|
{
|
|
59
59
|
name: 'derives appId from the BRAND: reverse-domain of brand.url, else app.<brand.id> (friction #18)',
|
|
@@ -24,7 +24,7 @@ const SOURCE_DIRS = ['lib', 'gulp'];
|
|
|
24
24
|
// The two specifiers that are ALLOWED to be undeclared, each one required inside a
|
|
25
25
|
// try/catch whose catch is the documented behaviour, not a crash:
|
|
26
26
|
// firebase @omega.js/client's own dependency; the client bridge falls back
|
|
27
|
-
// to no-op mode when it is not there (lib/
|
|
27
|
+
// to no-op mode when it is not there (lib/auth.js)
|
|
28
28
|
// app-builder-bin electron-builder's own dependency; blockmap generation is
|
|
29
29
|
// best-effort and warns-and-skips (lib/sign-helpers/update-info.js)
|
|
30
30
|
const GUARDED = new Set(['firebase', 'app-builder-bin']);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Build-layer tests for utils/merge-line-files.js — verify the .env / .gitignore merge convention
|
|
2
|
-
// (
|
|
2
|
+
// (Default + Custom sections) AND the double-quote normalization for .env values.
|
|
3
3
|
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { mergeLineBasedFiles, normalizeEnvLine, DEFAULT_MARKER, CUSTOM_MARKER } =
|
|
@@ -222,17 +222,17 @@ ${CUSTOM_MARKER}
|
|
|
222
222
|
},
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
|
-
name: 'normalizeEnvLine: empty value
|
|
225
|
+
name: 'normalizeEnvLine: an empty value becomes KEY=""',
|
|
226
226
|
run: (ctx) => {
|
|
227
|
-
ctx.expect(normalizeEnvLine('KEY=')).toBe('KEY=');
|
|
228
|
-
ctx.expect(normalizeEnvLine('KEY= ')).toBe('KEY=');
|
|
227
|
+
ctx.expect(normalizeEnvLine('KEY=')).toBe('KEY=""');
|
|
228
|
+
ctx.expect(normalizeEnvLine('KEY= ')).toBe('KEY=""');
|
|
229
229
|
},
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
|
-
name: 'normalizeEnvLine:
|
|
232
|
+
name: 'normalizeEnvLine: keeps embedded quotes and backslashes as dotenv reads them',
|
|
233
233
|
run: (ctx) => {
|
|
234
|
-
ctx.expect(normalizeEnvLine('KEY=he said "hi"')).toBe('KEY="he said
|
|
235
|
-
ctx.expect(normalizeEnvLine('KEY=back\\slash')).toBe('KEY="back
|
|
234
|
+
ctx.expect(normalizeEnvLine('KEY=he said "hi"')).toBe('KEY="he said "hi""');
|
|
235
|
+
ctx.expect(normalizeEnvLine('KEY=back\\slash')).toBe('KEY="back\\slash"');
|
|
236
236
|
},
|
|
237
237
|
},
|
|
238
238
|
{
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// migrateTarget: the desktop leg of the brand root's `omega migrate`. Desktop
|
|
2
|
+
// carries no legacy move today, yet exposes the same entry as every framework,
|
|
3
|
+
// so the manager's walk never special-cases a framework name.
|
|
4
|
+
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
|
|
9
|
+
const SRC = path.join(__dirname, '..', '..', '..');
|
|
10
|
+
const { migrateTarget } = require(path.join(SRC, 'commands', 'lib', 'migrate.js'));
|
|
11
|
+
const defineCases = require('../../../vendor/devkit/test/define-cases.js');
|
|
12
|
+
|
|
13
|
+
module.exports = defineCases({
|
|
14
|
+
type: 'group',
|
|
15
|
+
layer: 'build',
|
|
16
|
+
description: 'migrateTarget: the desktop leg answers the shared shape, empty',
|
|
17
|
+
tests: [
|
|
18
|
+
{
|
|
19
|
+
name: 'report mode and execute both answer three empty lists',
|
|
20
|
+
run: (ctx) => {
|
|
21
|
+
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'desktop-migrate-'));
|
|
22
|
+
|
|
23
|
+
ctx.expect(migrateTarget(tmp)).toEqual({ due: [], changed: [], errors: [] });
|
|
24
|
+
ctx.expect(migrateTarget(tmp, { execute: true })).toEqual({ due: [], changed: [], errors: [] });
|
|
25
|
+
ctx.expect(fs.readdirSync(tmp)).toEqual([]);
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
});
|
|
@@ -39,8 +39,40 @@ module.exports = defineCases({
|
|
|
39
39
|
ctx.expect(module.includes('data-shell-toggle')).toBe(true);
|
|
40
40
|
ctx.expect(module.includes('data-shell-dismiss')).toBe(true);
|
|
41
41
|
ctx.expect(module.includes("'shell.collapsed'")).toBe(true);
|
|
42
|
-
//
|
|
43
|
-
|
|
42
|
+
// The shell is built FROM the runtime instance it is handed, so the
|
|
43
|
+
// vendored copy imports no runtime of its own.
|
|
44
|
+
ctx.expect(module.includes('export function createShell(omega)')).toBe(true);
|
|
45
|
+
ctx.expect(module.includes('@omega.js/client')).toBe(false);
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
// The renderer builds `omega.shell` from ITSELF, exactly as web's runtime
|
|
50
|
+
// does (`this.shell = createShell(this)`), off the vendored module
|
|
51
|
+
name: 'the renderer builds omega.shell with createShell(omega)',
|
|
52
|
+
run: (ctx) => {
|
|
53
|
+
const renderer = fs.readFileSync(path.join(PACKAGE_ROOT, 'dist', 'renderer.js'), 'utf8');
|
|
54
|
+
ctx.expect(renderer.includes("const { createShell } = require('./assets/js/core/app-shell.js');")).toBe(true);
|
|
55
|
+
ctx.expect(renderer.includes('this.shell = createShell(this);')).toBe(true);
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
// The same function object the renderer calls, and it builds the shell API
|
|
60
|
+
// off the instance's storage (an inert API when the page carries no shell)
|
|
61
|
+
name: 'createShell(omega) returns the shell API off the instance it is handed',
|
|
62
|
+
run: (ctx) => {
|
|
63
|
+
const { createShell } = require(path.join(PACKAGE_ROOT, 'dist', 'assets', 'js', 'core', 'app-shell.js'));
|
|
64
|
+
const savedDocument = globalThis.document;
|
|
65
|
+
globalThis.document = { querySelector: () => null };
|
|
66
|
+
try {
|
|
67
|
+
const shell = createShell({ storage: { get: () => null, set: () => {} } });
|
|
68
|
+
for (const name of ['isCollapsed', 'isOpen', 'setCollapsed', 'setOpen', 'toggleCollapsed', 'toggleOpen']) {
|
|
69
|
+
ctx.expect(typeof shell[name]).toBe('function');
|
|
70
|
+
}
|
|
71
|
+
ctx.expect(shell.isCollapsed()).toBe(false);
|
|
72
|
+
} finally {
|
|
73
|
+
if (savedDocument === undefined) delete globalThis.document;
|
|
74
|
+
else globalThis.document = savedDocument;
|
|
75
|
+
}
|
|
44
76
|
},
|
|
45
77
|
},
|
|
46
78
|
{
|