@adea-ai/app-framework 0.0.0-stage → 0.24.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/LICENSE +201 -0
- package/NOTICE +30 -0
- package/README.md +967 -2
- package/dist/app/application.d.ts +47 -0
- package/dist/app/application.js +115 -0
- package/dist/app/create-application.d.ts +13 -0
- package/dist/app/create-application.js +178 -0
- package/dist/app/service-registry.d.ts +44 -0
- package/dist/app/service-registry.js +116 -0
- package/dist/appearance/appearance-host.d.ts +62 -0
- package/dist/appearance/appearance-host.js +115 -0
- package/dist/appearance/appearance-preferences.d.ts +106 -0
- package/dist/appearance/appearance-preferences.js +175 -0
- package/dist/appearance/composition.d.ts +11 -0
- package/dist/appearance/composition.js +16 -0
- package/dist/appearance/custom-theme-import.d.ts +14 -0
- package/dist/appearance/custom-theme-import.js +315 -0
- package/dist/appearance/custom-theme-library.d.ts +146 -0
- package/dist/appearance/custom-theme-library.js +378 -0
- package/dist/appearance/editor.d.ts +20 -0
- package/dist/appearance/editor.js +47 -0
- package/dist/appearance/theme-file-importer.d.ts +23 -0
- package/dist/appearance/theme-file-importer.js +66 -0
- package/dist/appearance/theme-record-adapter.d.ts +26 -0
- package/dist/appearance/theme-record-adapter.js +64 -0
- package/dist/appearance/theme-registry.d.ts +10 -0
- package/dist/appearance/theme-registry.js +16 -0
- package/dist/appearance/window-surface.d.ts +5 -0
- package/dist/appearance/window-surface.js +9 -0
- package/dist/ci/toolchain-identity.d.ts +39 -0
- package/dist/ci/toolchain-identity.js +196 -0
- package/dist/cli/cef-helper-cli.d.ts +2 -0
- package/dist/cli/cef-helper-cli.js +18 -0
- package/dist/cli/cli-runner.d.ts +8 -0
- package/dist/cli/cli-runner.js +23 -0
- package/dist/cli/create-application-cli.d.ts +2 -0
- package/dist/cli/create-application-cli.js +40 -0
- package/dist/cli/electrobun-shortcut-patch-cli.d.ts +2 -0
- package/dist/cli/electrobun-shortcut-patch-cli.js +17 -0
- package/dist/cli/framework-update-cli.d.ts +2 -0
- package/dist/cli/framework-update-cli.js +40 -0
- package/dist/cli/release-assets-plan-cli.d.ts +2 -0
- package/dist/cli/release-assets-plan-cli.js +14 -0
- package/dist/cli/release-cut-cli.d.ts +2 -0
- package/dist/cli/release-cut-cli.js +27 -0
- package/dist/cli/release-descriptor-staging-cli.d.ts +2 -0
- package/dist/cli/release-descriptor-staging-cli.js +45 -0
- package/dist/cli/release-finalize-cli.d.ts +1 -0
- package/dist/cli/release-finalize-cli.js +30 -0
- package/dist/cli/release-promote-cli.d.ts +2 -0
- package/dist/cli/release-promote-cli.js +32 -0
- package/dist/cli/release-publish-cli.d.ts +2 -0
- package/dist/cli/release-publish-cli.js +48 -0
- package/dist/cli/release-sign-cli.d.ts +2 -0
- package/dist/cli/release-sign-cli.js +13 -0
- package/dist/cli/release-step-cli.d.ts +2 -0
- package/dist/cli/release-step-cli.js +44 -0
- package/dist/cli/toolchain-identity-cli.d.ts +2 -0
- package/dist/cli/toolchain-identity-cli.js +10 -0
- package/dist/cli/update-helper-cli.d.ts +1 -0
- package/dist/cli/update-helper-cli.js +10 -0
- package/dist/cli/windows-runtime-patch-cli.d.ts +2 -0
- package/dist/cli/windows-runtime-patch-cli.js +17 -0
- package/dist/desktop/application-command-client.d.ts +15 -0
- package/dist/desktop/application-command-client.js +21 -0
- package/dist/desktop/channel-handshake.d.ts +32 -0
- package/dist/desktop/channel-handshake.js +111 -0
- package/dist/desktop/channel-proof.d.ts +43 -0
- package/dist/desktop/channel-proof.js +85 -0
- package/dist/desktop/client-assets.d.ts +7 -0
- package/dist/desktop/client-assets.js +59 -0
- package/dist/desktop/desktop-client.d.ts +23 -0
- package/dist/desktop/desktop-client.js +231 -0
- package/dist/desktop/desktop-gateway.d.ts +18 -0
- package/dist/desktop/desktop-gateway.js +146 -0
- package/dist/desktop/desktop-host.d.ts +48 -0
- package/dist/desktop/desktop-host.js +208 -0
- package/dist/desktop/desktop-stream.d.ts +36 -0
- package/dist/desktop/desktop-stream.js +231 -0
- package/dist/desktop/loopback-policy.d.ts +19 -0
- package/dist/desktop/loopback-policy.js +23 -0
- package/dist/desktop/open-url-channel.d.ts +15 -0
- package/dist/desktop/open-url-channel.js +55 -0
- package/dist/desktop/string-policy.d.ts +2 -0
- package/dist/desktop/string-policy.js +11 -0
- package/dist/framework-source.json +1 -0
- package/dist/installer/archive-entry.d.ts +6 -0
- package/dist/installer/archive-entry.js +14 -0
- package/dist/installer/command-artifact.d.ts +47 -0
- package/dist/installer/command-artifact.js +261 -0
- package/dist/installer/command-qualification-command.d.ts +12 -0
- package/dist/installer/command-qualification-command.js +71 -0
- package/dist/installer/hosted-runner.d.ts +4 -0
- package/dist/installer/hosted-runner.js +10 -0
- package/dist/installer/installed-payload.d.ts +29 -0
- package/dist/installer/installed-payload.js +312 -0
- package/dist/installer/installer-ci-bootstrap.d.ts +26 -0
- package/dist/installer/installer-ci-bootstrap.js +160 -0
- package/dist/installer/installer-ci-preflight.d.ts +1 -0
- package/dist/installer/installer-ci-preflight.js +49 -0
- package/dist/installer/installer-ci-worker.d.ts +1 -0
- package/dist/installer/installer-ci-worker.js +105 -0
- package/dist/installer/installer-extraction.d.ts +14 -0
- package/dist/installer/installer-extraction.js +289 -0
- package/dist/installer/installer-fetch-guard.d.ts +15 -0
- package/dist/installer/installer-fetch-guard.js +50 -0
- package/dist/installer/installer-identity.d.ts +23 -0
- package/dist/installer/installer-identity.js +286 -0
- package/dist/installer/installer-layout.d.ts +21 -0
- package/dist/installer/installer-layout.js +89 -0
- package/dist/installer/installer-observation.d.ts +64 -0
- package/dist/installer/installer-observation.js +473 -0
- package/dist/installer/installer-process-cleanup.d.ts +18 -0
- package/dist/installer/installer-process-cleanup.js +158 -0
- package/dist/installer/installer-qualification-command.d.ts +11 -0
- package/dist/installer/installer-qualification-command.js +71 -0
- package/dist/installer/installer-renderer-evidence.d.ts +43 -0
- package/dist/installer/installer-renderer-evidence.js +136 -0
- package/dist/installer/installer-upgrade-command.d.ts +37 -0
- package/dist/installer/installer-upgrade-command.js +172 -0
- package/dist/installer/installer-worker-guard.d.ts +21 -0
- package/dist/installer/installer-worker-guard.js +72 -0
- package/dist/installer/native-executable.d.ts +5 -0
- package/dist/installer/native-executable.js +21 -0
- package/dist/installer/upgrade-asset-download.d.ts +13 -0
- package/dist/installer/upgrade-asset-download.js +41 -0
- package/dist/installer/write-all.d.ts +6 -0
- package/dist/installer/write-all.js +11 -0
- package/dist/native/app-bundle.d.ts +28 -0
- package/dist/native/app-bundle.js +60 -0
- package/dist/native/cef-helper.d.ts +28 -0
- package/dist/native/cef-helper.js +402 -0
- package/dist/native/desktop-build-hook.d.ts +7 -0
- package/dist/native/desktop-build-hook.js +20 -0
- package/dist/native/electrobun-source-patch.d.ts +25 -0
- package/dist/native/electrobun-source-patch.js +93 -0
- package/dist/native/linux-cef-links.d.ts +2 -0
- package/dist/native/linux-cef-links.js +15 -0
- package/dist/native/native-secret-store.d.ts +27 -0
- package/dist/native/native-secret-store.js +70 -0
- package/dist/native/native-utilities.d.ts +24 -0
- package/dist/native/native-utilities.js +85 -0
- package/dist/native/partitioned-window.d.ts +34 -0
- package/dist/native/partitioned-window.js +44 -0
- package/dist/native/renderer-profile.d.ts +53 -0
- package/dist/native/renderer-profile.js +30 -0
- package/dist/native/secure-window.d.ts +38 -0
- package/dist/native/secure-window.js +77 -0
- package/dist/native/sidecar-services.d.ts +23 -0
- package/dist/native/sidecar-services.js +46 -0
- package/dist/native/sidecar.d.ts +81 -0
- package/dist/native/sidecar.js +250 -0
- package/dist/native/window-bootstrap.d.ts +24 -0
- package/dist/native/window-bootstrap.js +63 -0
- package/dist/native/window-options.d.ts +32 -0
- package/dist/native/window-options.js +23 -0
- package/dist/native/windows-build-hook-internal.d.ts +2 -0
- package/dist/native/windows-build-hook-internal.js +32 -0
- package/dist/native/windows-build-hook.d.ts +2 -0
- package/dist/native/windows-build-hook.js +12 -0
- package/dist/native/windows-runtime-patch-internal.d.ts +3 -0
- package/dist/native/windows-runtime-patch-internal.js +20 -0
- package/dist/native/windows-runtime-patch.d.ts +4 -0
- package/dist/native/windows-runtime-patch.js +12 -0
- package/dist/release/feed-release-cut.d.ts +23 -0
- package/dist/release/feed-release-cut.js +93 -0
- package/dist/release/feed-state.d.ts +25 -0
- package/dist/release/feed-state.js +81 -0
- package/dist/release/framework-package-publish.d.ts +21 -0
- package/dist/release/framework-package-publish.js +125 -0
- package/dist/release/framework-update.d.ts +30 -0
- package/dist/release/framework-update.js +139 -0
- package/dist/release/github-cli.d.ts +6 -0
- package/dist/release/github-cli.js +16 -0
- package/dist/release/github-release-assets.d.ts +3 -0
- package/dist/release/github-release-assets.js +24 -0
- package/dist/release/github-release-cut.d.ts +14 -0
- package/dist/release/github-release-cut.js +174 -0
- package/dist/release/github-release-lookup.d.ts +7 -0
- package/dist/release/github-release-lookup.js +29 -0
- package/dist/release/github-release-promotion.d.ts +10 -0
- package/dist/release/github-release-promotion.js +78 -0
- package/dist/release/github-release-provenance.d.ts +9 -0
- package/dist/release/github-release-provenance.js +27 -0
- package/dist/release/github-release-publisher.d.ts +9 -0
- package/dist/release/github-release-publisher.js +63 -0
- package/dist/release/github-release-qualification.d.ts +12 -0
- package/dist/release/github-release-qualification.js +80 -0
- package/dist/release/local-provenance.d.ts +24 -0
- package/dist/release/local-provenance.js +72 -0
- package/dist/release/local-release.d.ts +133 -0
- package/dist/release/local-release.js +387 -0
- package/dist/release/macos-dmg.d.ts +22 -0
- package/dist/release/macos-dmg.js +91 -0
- package/dist/release/release-artifact.d.ts +6 -0
- package/dist/release/release-artifact.js +38 -0
- package/dist/release/release-assets-plan.d.ts +14 -0
- package/dist/release/release-assets-plan.js +65 -0
- package/dist/release/release-config.d.ts +76 -0
- package/dist/release/release-config.js +180 -0
- package/dist/release/release-cut-command.d.ts +13 -0
- package/dist/release/release-cut-command.js +39 -0
- package/dist/release/release-cut.d.ts +54 -0
- package/dist/release/release-cut.js +76 -0
- package/dist/release/release-descriptor-staging.d.ts +34 -0
- package/dist/release/release-descriptor-staging.js +147 -0
- package/dist/release/release-finalize.d.ts +16 -0
- package/dist/release/release-finalize.js +104 -0
- package/dist/release/release-promotion-command.d.ts +12 -0
- package/dist/release/release-promotion-command.js +28 -0
- package/dist/release/release-promotion.d.ts +29 -0
- package/dist/release/release-promotion.js +57 -0
- package/dist/release/release-publication.d.ts +33 -0
- package/dist/release/release-publication.js +138 -0
- package/dist/release/release-publish-command.d.ts +7 -0
- package/dist/release/release-publish-command.js +91 -0
- package/dist/release/release-qualification.d.ts +106 -0
- package/dist/release/release-qualification.js +135 -0
- package/dist/release/release-staging.d.ts +9 -0
- package/dist/release/release-staging.js +61 -0
- package/dist/release/release-steps.d.ts +38 -0
- package/dist/release/release-steps.js +147 -0
- package/dist/release/retained-release-build.d.ts +19 -0
- package/dist/release/retained-release-build.js +122 -0
- package/dist/shell/app-shell.d.ts +61 -0
- package/dist/shell/app-shell.js +318 -0
- package/dist/shell/app-utilities.d.ts +122 -0
- package/dist/shell/app-utilities.js +334 -0
- package/dist/shell/application-menu-commands.d.ts +5 -0
- package/dist/shell/application-menu-commands.js +11 -0
- package/dist/shell/application-menu.d.ts +61 -0
- package/dist/shell/application-menu.js +208 -0
- package/dist/shell/help-shortcuts.d.ts +12 -0
- package/dist/shell/help-shortcuts.js +22 -0
- package/dist/shell/settings-sections.d.ts +31 -0
- package/dist/shell/settings-sections.js +50 -0
- package/dist/shell/shortcut-platform.d.ts +17 -0
- package/dist/shell/shortcut-platform.js +25 -0
- package/dist/update-helper.bundle.js +260 -0
- package/dist/updates/channel-update-manager.d.ts +46 -0
- package/dist/updates/channel-update-manager.js +114 -0
- package/dist/updates/desktop-updater.d.ts +104 -0
- package/dist/updates/desktop-updater.js +345 -0
- package/dist/updates/release-feed.d.ts +61 -0
- package/dist/updates/release-feed.js +111 -0
- package/dist/updates/release-location.d.ts +9 -0
- package/dist/updates/release-location.js +80 -0
- package/dist/updates/release-version.d.ts +12 -0
- package/dist/updates/release-version.js +43 -0
- package/dist/updates/signed-release.d.ts +63 -0
- package/dist/updates/signed-release.js +162 -0
- package/dist/updates/stable-file.d.ts +10 -0
- package/dist/updates/stable-file.js +22 -0
- package/dist/updates/update-adapter.d.ts +57 -0
- package/dist/updates/update-adapter.js +72 -0
- package/dist/updates/update-arm.d.ts +24 -0
- package/dist/updates/update-arm.js +95 -0
- package/dist/updates/update-channel-store.d.ts +8 -0
- package/dist/updates/update-channel-store.js +72 -0
- package/dist/updates/update-discovery.d.ts +13 -0
- package/dist/updates/update-discovery.js +56 -0
- package/dist/updates/update-download.d.ts +14 -0
- package/dist/updates/update-download.js +67 -0
- package/dist/updates/update-exclusive-rename.d.ts +2 -0
- package/dist/updates/update-exclusive-rename.js +52 -0
- package/dist/updates/update-extraction.d.ts +18 -0
- package/dist/updates/update-extraction.js +183 -0
- package/dist/updates/update-handoff-plan.d.ts +22 -0
- package/dist/updates/update-handoff-plan.js +28 -0
- package/dist/updates/update-helper.d.ts +24 -0
- package/dist/updates/update-helper.js +56 -0
- package/dist/updates/update-launch.d.ts +5 -0
- package/dist/updates/update-launch.js +27 -0
- package/dist/updates/update-manager.d.ts +40 -0
- package/dist/updates/update-manager.js +83 -0
- package/dist/updates/update-process-fence.d.ts +10 -0
- package/dist/updates/update-process-fence.js +114 -0
- package/dist/updates/update-resume.d.ts +13 -0
- package/dist/updates/update-resume.js +34 -0
- package/dist/updates/update-shutdown.d.ts +15 -0
- package/dist/updates/update-shutdown.js +29 -0
- package/dist/updates/update-state.d.ts +30 -0
- package/dist/updates/update-state.js +18 -0
- package/dist/updates/update-swap-stage.d.ts +27 -0
- package/dist/updates/update-swap-stage.js +58 -0
- package/dist/updates/update-swap.d.ts +10 -0
- package/dist/updates/update-swap.js +30 -0
- package/dist/views/app-about.d.ts +22 -0
- package/dist/views/app-about.js +43 -0
- package/dist/views/app-appearance.d.ts +11 -0
- package/dist/views/app-appearance.js +42 -0
- package/dist/views/app-help.d.ts +17 -0
- package/dist/views/app-help.js +42 -0
- package/dist/views/app-settings.d.ts +26 -0
- package/dist/views/app-settings.js +97 -0
- package/dist/views/appearance-surface.d.ts +9 -0
- package/dist/views/appearance-surface.js +334 -0
- package/dist/views/update-surface.d.ts +34 -0
- package/dist/views/update-surface.js +64 -0
- package/package.json +363 -4
- package/src/app/application.tsx +138 -0
- package/src/app/create-application.ts +245 -0
- package/src/app/service-registry.ts +124 -0
- package/src/appearance/appearance-host.tsx +205 -0
- package/src/appearance/appearance-preferences.ts +287 -0
- package/src/appearance/composition.ts +29 -0
- package/src/appearance/custom-theme-import.ts +424 -0
- package/src/appearance/custom-theme-library.ts +600 -0
- package/src/appearance/editor.ts +94 -0
- package/src/appearance/theme-file-importer.ts +103 -0
- package/src/appearance/theme-record-adapter.ts +106 -0
- package/src/appearance/theme-registry.ts +20 -0
- package/src/appearance/window-surface.ts +18 -0
- package/src/ci/toolchain-identity.ts +244 -0
- package/src/cli/cef-helper-cli.ts +21 -0
- package/src/cli/cli-runner.ts +29 -0
- package/src/cli/create-application-cli.ts +62 -0
- package/src/cli/electrobun-shortcut-patch-cli.ts +24 -0
- package/src/cli/framework-update-cli.ts +41 -0
- package/src/cli/release-assets-plan-cli.ts +14 -0
- package/src/cli/release-cut-cli.ts +41 -0
- package/src/cli/release-descriptor-staging-cli.ts +57 -0
- package/src/cli/release-finalize-cli.ts +34 -0
- package/src/cli/release-promote-cli.ts +31 -0
- package/src/cli/release-publish-cli.ts +46 -0
- package/src/cli/release-sign-cli.ts +24 -0
- package/src/cli/release-step-cli.ts +71 -0
- package/src/cli/toolchain-identity-cli.ts +12 -0
- package/src/cli/update-helper-cli.ts +12 -0
- package/src/cli/windows-runtime-patch-cli.ts +17 -0
- package/src/desktop/application-command-client.ts +43 -0
- package/src/desktop/channel-handshake.ts +136 -0
- package/src/desktop/channel-proof.ts +122 -0
- package/src/desktop/client-assets.ts +75 -0
- package/src/desktop/desktop-client.ts +303 -0
- package/src/desktop/desktop-gateway.ts +189 -0
- package/src/desktop/desktop-host.ts +335 -0
- package/src/desktop/desktop-stream.ts +324 -0
- package/src/desktop/loopback-policy.ts +41 -0
- package/src/desktop/open-url-channel.ts +79 -0
- package/src/desktop/string-policy.ts +9 -0
- package/src/installer/archive-entry.ts +32 -0
- package/src/installer/command-artifact.ts +307 -0
- package/src/installer/command-qualification-command.ts +75 -0
- package/src/installer/hosted-runner.ts +11 -0
- package/src/installer/installed-payload.ts +408 -0
- package/src/installer/installer-ci-bootstrap.ts +199 -0
- package/src/installer/installer-ci-preflight.ts +61 -0
- package/src/installer/installer-ci-worker.ts +105 -0
- package/src/installer/installer-extraction.ts +367 -0
- package/src/installer/installer-fetch-guard.ts +75 -0
- package/src/installer/installer-identity.ts +331 -0
- package/src/installer/installer-layout.ts +167 -0
- package/src/installer/installer-observation.ts +671 -0
- package/src/installer/installer-process-cleanup.ts +167 -0
- package/src/installer/installer-qualification-command.ts +81 -0
- package/src/installer/installer-renderer-evidence.ts +268 -0
- package/src/installer/installer-upgrade-command.ts +226 -0
- package/src/installer/installer-worker-guard.ts +112 -0
- package/src/installer/native-executable.ts +37 -0
- package/src/installer/upgrade-asset-download.ts +72 -0
- package/src/installer/write-all.ts +19 -0
- package/src/native/app-bundle.ts +86 -0
- package/src/native/cef-helper.ts +471 -0
- package/src/native/desktop-build-hook.ts +21 -0
- package/src/native/electrobun-cef-main-frame-bridges.patch +63 -0
- package/src/native/electrobun-source-patch.ts +107 -0
- package/src/native/electrobun-windows-shortcut-com.patch +923 -0
- package/src/native/linux-cef-links.ts +14 -0
- package/src/native/native-secret-store.ts +99 -0
- package/src/native/native-utilities.ts +166 -0
- package/src/native/partitioned-window.ts +62 -0
- package/src/native/renderer-profile.ts +27 -0
- package/src/native/secure-window.ts +115 -0
- package/src/native/sidecar-services.ts +71 -0
- package/src/native/sidecar.ts +387 -0
- package/src/native/window-bootstrap.ts +77 -0
- package/src/native/window-options.ts +24 -0
- package/src/native/windows-build-hook-internal.ts +49 -0
- package/src/native/windows-build-hook.ts +12 -0
- package/src/native/windows-runtime-patch-internal.ts +48 -0
- package/src/native/windows-runtime-patch.ts +15 -0
- package/src/release/feed-release-cut.ts +110 -0
- package/src/release/feed-state.ts +135 -0
- package/src/release/framework-package-publish.ts +163 -0
- package/src/release/framework-update.ts +196 -0
- package/src/release/github-cli.ts +27 -0
- package/src/release/github-release-assets.ts +36 -0
- package/src/release/github-release-cut.ts +237 -0
- package/src/release/github-release-lookup.ts +39 -0
- package/src/release/github-release-promotion.ts +112 -0
- package/src/release/github-release-provenance.ts +65 -0
- package/src/release/github-release-publisher.ts +90 -0
- package/src/release/github-release-qualification.ts +144 -0
- package/src/release/local-provenance.ts +92 -0
- package/src/release/local-release.ts +525 -0
- package/src/release/macos-dmg.ts +113 -0
- package/src/release/release-artifact.ts +53 -0
- package/src/release/release-assets-plan.ts +118 -0
- package/src/release/release-config.ts +420 -0
- package/src/release/release-cut-command.ts +80 -0
- package/src/release/release-cut.ts +133 -0
- package/src/release/release-descriptor-staging.ts +242 -0
- package/src/release/release-finalize.ts +191 -0
- package/src/release/release-promotion-command.ts +36 -0
- package/src/release/release-promotion.ts +132 -0
- package/src/release/release-publication.ts +213 -0
- package/src/release/release-publish-command.ts +163 -0
- package/src/release/release-qualification.ts +397 -0
- package/src/release/release-staging.ts +87 -0
- package/src/release/release-steps.ts +173 -0
- package/src/release/retained-release-build.ts +217 -0
- package/src/shell/app-shell.tsx +285 -0
- package/src/shell/app-utilities.tsx +437 -0
- package/src/shell/application-menu-commands.ts +6 -0
- package/src/shell/application-menu.ts +250 -0
- package/src/shell/help-shortcuts.ts +24 -0
- package/src/shell/settings-sections.ts +74 -0
- package/src/shell/shortcut-platform.ts +35 -0
- package/src/updates/channel-update-manager.ts +127 -0
- package/src/updates/desktop-updater.ts +440 -0
- package/src/updates/release-feed.ts +187 -0
- package/src/updates/release-location.ts +101 -0
- package/src/updates/release-version.ts +57 -0
- package/src/updates/signed-release.ts +311 -0
- package/src/updates/stable-file.ts +32 -0
- package/src/updates/update-adapter.ts +129 -0
- package/src/updates/update-arm.ts +107 -0
- package/src/updates/update-channel-store.ts +86 -0
- package/src/updates/update-discovery.ts +113 -0
- package/src/updates/update-download.ts +82 -0
- package/src/updates/update-exclusive-rename.ts +58 -0
- package/src/updates/update-extraction.ts +261 -0
- package/src/updates/update-handoff-plan.ts +75 -0
- package/src/updates/update-helper.ts +87 -0
- package/src/updates/update-launch.ts +33 -0
- package/src/updates/update-manager.ts +130 -0
- package/src/updates/update-process-fence.ts +125 -0
- package/src/updates/update-resume.ts +34 -0
- package/src/updates/update-shutdown.ts +37 -0
- package/src/updates/update-state.ts +34 -0
- package/src/updates/update-swap-stage.ts +75 -0
- package/src/updates/update-swap.ts +30 -0
- package/src/views/app-about.tsx +44 -0
- package/src/views/app-appearance.tsx +32 -0
- package/src/views/app-help.tsx +43 -0
- package/src/views/app-settings.tsx +88 -0
- package/src/views/appearance-surface.tsx +427 -0
- package/src/views/update-surface.tsx +85 -0
- package/templates/application/.gitattributes +1 -0
- package/templates/application/.github/workflows/release-assets.yml +29 -0
- package/templates/application/.github/workflows/release-finalize.yml +29 -0
- package/templates/application/.github/workflows/release-please.yml +19 -0
- package/templates/application/.github/workflows/release.yml +29 -0
- package/templates/application/.github/workflows/validation.yml +28 -0
- package/templates/application/.oxfmtrc.json +6 -0
- package/templates/application/.oxlintrc.json +48 -0
- package/templates/application/.release-please-manifest.json +3 -0
- package/templates/application/README.md +47 -0
- package/templates/application/electrobun.config.ts +22 -0
- package/templates/application/release-please-config.json +12 -0
- package/templates/application/scripts/app-version.ts +9 -0
- package/templates/application/scripts/build-desktop.ts +34 -0
- package/templates/application/scripts/secure-build.ts +1 -0
- package/templates/application/scripts/stage-release.ts +21 -0
- package/templates/application/src/bun/index.ts +80 -0
- package/templates/application/src/electrobun.d.ts +27 -0
- package/templates/application/src/web/index.html +12 -0
- package/templates/application/src/web/main.tsx +97 -0
- package/templates/application/src/web/public/icon.svg +1 -0
- package/templates/application/src/web/style.css +3 -0
- package/templates/application/tests/app-config.test.ts +9 -0
- package/templates/application/tsconfig.json +15 -0
- package/templates/application/vite.config.ts +10 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"jsPlugins": ["@shadcn/lint", "@adea-ai/ui/lint"],
|
|
4
|
+
"settings": {
|
|
5
|
+
"shadcn": {
|
|
6
|
+
"ui": ["@adea-ai/ui/components"]
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"categories": {
|
|
10
|
+
"correctness": "error",
|
|
11
|
+
"suspicious": "error"
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"shadcn/no-restyle": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
"allow": ["layout"]
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"shadcn/no-raw-colors": [
|
|
21
|
+
"error",
|
|
22
|
+
{
|
|
23
|
+
"scanAllStrings": true
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"shadcn/no-arbitrary-values": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
"scanAllStrings": true
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"shadcn/no-inline-styles": "error",
|
|
33
|
+
"shadcn/no-unknown-classes": "error",
|
|
34
|
+
"shadcn/require-static-classes": "error",
|
|
35
|
+
"adea/no-raw-interactive-elements": "error",
|
|
36
|
+
"adea/no-primitive-library-imports": "error",
|
|
37
|
+
"adea/no-class-list": "error",
|
|
38
|
+
"adea/no-inline-styles": "error",
|
|
39
|
+
"adea/require-action-button-tooltip": "error",
|
|
40
|
+
"adea/no-interactive-wrappers": "error",
|
|
41
|
+
"no-underscore-dangle": [
|
|
42
|
+
"error",
|
|
43
|
+
{
|
|
44
|
+
"allow": ["__APP_VERSION__"]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Generated application
|
|
2
|
+
|
|
3
|
+
Use Bun 1.4.4, install dependencies with `bun install`, run `bun run format:check`, `bun run lint`, `bun run typecheck` and `bun run test` to check the starter, then run `bun run build:desktop` to build the Electrobun app. The system webview is the default renderer; set the renderer in `src/app-config.ts` to `cef` when Chromium is required.
|
|
4
|
+
|
|
5
|
+
Add navigation and views in `src/web/main.tsx`, and register app-specific services in `src/bun/index.ts`. Supply your app icon, identity, authorization and release configuration before distribution. The host registers shared app information, external-link and folder-picker services; a picked folder does not grant file access. The framework's native host and release tooling are still under development.
|
|
6
|
+
|
|
7
|
+
The generated release control workflow uses `release-config.json` for daily,
|
|
8
|
+
dev and stable channels. Run `bun install` and commit `bun.lock` before
|
|
9
|
+
pushing. The asset workflow validates release provenance, retains or reuses each
|
|
10
|
+
platform payload, qualifies installers and signs descriptors before publishing.
|
|
11
|
+
The release path is still under development and must be tested end to end
|
|
12
|
+
before enabling the release control workflow. It stays disabled unless the repository variable
|
|
13
|
+
`DESKTOP_RELEASES_ENABLED` is set to `true`. If you rename or move the release
|
|
14
|
+
control or asset workflow, update `releaseWorkflows` in `release-config.json`:
|
|
15
|
+
release provenance is accepted only from the workflow files it names.
|
|
16
|
+
Set `releaseFeed` to the HTTPS origin and path prefix your releases are served
|
|
17
|
+
from and the app's key prefix there: updates are discovered from
|
|
18
|
+
`<base><app>/channels/<channel>.json` and downloaded only from that prefix.
|
|
19
|
+
|
|
20
|
+
Before enabling releases, add the app's Ed25519 public verification keys to
|
|
21
|
+
`releaseSigningKeys` in `release-config.json`, and configure the matching
|
|
22
|
+
private signing key as a repository secret for the release-assets workflow.
|
|
23
|
+
Never commit a private key. Set `offlinePolicy` to a visible, meaningful offline
|
|
24
|
+
state for your app; apps that require a local bootstrap can select the
|
|
25
|
+
`local-bootstrap` policy and its route. Configure only expected unauthenticated
|
|
26
|
+
startup reads in `offlineExpectedReads`. The generated channel policies identify each
|
|
27
|
+
platform's tested full archive; publication fails closed until keys and real
|
|
28
|
+
installer receipts are present.
|
|
29
|
+
|
|
30
|
+
The desktop host stores its loopback port in Electrobun's app-specific data
|
|
31
|
+
directory so appearance and layout preferences survive restarts. If the saved
|
|
32
|
+
port is already in use, startup retries briefly and then fails instead of
|
|
33
|
+
silently switching origins. To
|
|
34
|
+
preserve a pre-existing origin, set `initialPort` in `src/app-config.ts` before
|
|
35
|
+
the first launch; the saved port must then match it.
|
|
36
|
+
|
|
37
|
+
For retries, dispatch a new asset workflow or rerun all jobs. A failed-jobs-only
|
|
38
|
+
rerun can lack artifacts from the current attempt and will fail closed.
|
|
39
|
+
|
|
40
|
+
For a macOS deep-link callback, list the app's custom URL schemes in
|
|
41
|
+
`src/app-config.ts`. The generated Electrobun configuration declares them in the
|
|
42
|
+
package; the app must register and validate its own callback handler. Subscribe early with
|
|
43
|
+
`@adea-ai/app-framework/open-url-channel` to buffer bounded cold-start events
|
|
44
|
+
until that handler is ready. Async handlers start in delivery order but can
|
|
45
|
+
complete concurrently; serialize them in the app if its protocol requires it. Platform
|
|
46
|
+
support follows the pinned Electrobun version and must be qualified for each
|
|
47
|
+
platform before relying on it.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRendererProfile } from '@adea-ai/app-framework/renderer-profile'
|
|
2
|
+
import { appConfig } from './src/app-config'
|
|
3
|
+
import { applicationVersion } from './scripts/app-version'
|
|
4
|
+
|
|
5
|
+
const profile = createRendererProfile(appConfig.renderer)
|
|
6
|
+
export default {
|
|
7
|
+
app: {
|
|
8
|
+
name: appConfig.name,
|
|
9
|
+
identifier: appConfig.identifier,
|
|
10
|
+
version: applicationVersion(),
|
|
11
|
+
urlSchemes: process.platform === 'darwin' ? [...appConfig.urlSchemes] : [],
|
|
12
|
+
},
|
|
13
|
+
scripts: { postBuild: 'scripts/secure-build.ts' },
|
|
14
|
+
build: {
|
|
15
|
+
mainProcess: 'bun',
|
|
16
|
+
bun: { entrypoint: 'src/bun/index.ts' },
|
|
17
|
+
views: {},
|
|
18
|
+
copy: { 'build/client': 'client' },
|
|
19
|
+
...profile.build,
|
|
20
|
+
mac: { ...profile.build.mac, createDmg: false },
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
|
3
|
+
"bump-minor-pre-major": true,
|
|
4
|
+
"include-component-in-tag": false,
|
|
5
|
+
"draft": true,
|
|
6
|
+
"force-tag-creation": true,
|
|
7
|
+
"packages": {
|
|
8
|
+
".": {
|
|
9
|
+
"release-type": "node"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { appConfig } from '../src/app-config'
|
|
2
|
+
|
|
3
|
+
/** Keep the shell and its client on the same validated release version. */
|
|
4
|
+
export function applicationVersion(env: Record<string, string | undefined> = process.env): string {
|
|
5
|
+
const version = env.ADEA_APP_RELEASE_VERSION ?? appConfig.version
|
|
6
|
+
if (version.length > 64 || !/^\d+\.\d+\.\d+(?:-dev\.\d+)?$/.test(version))
|
|
7
|
+
throw new Error('Invalid application release version')
|
|
8
|
+
return version
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { join } from 'node:path'
|
|
2
|
+
import { createMacosDmg } from '@adea-ai/app-framework/macos-dmg'
|
|
3
|
+
import { appConfig } from '../src/app-config'
|
|
4
|
+
|
|
5
|
+
const [environment, ...extra] = process.argv.slice(2)
|
|
6
|
+
if (!environment || !['dev', 'stable'].includes(environment) || extra.length)
|
|
7
|
+
throw new Error('Expected dev or stable build environment')
|
|
8
|
+
const env = { ...process.env }
|
|
9
|
+
if (process.platform === 'win32') {
|
|
10
|
+
const tar = Bun.spawnSync({ cmd: ['tar', '--version'], stdout: 'pipe', stderr: 'pipe', env })
|
|
11
|
+
if (tar.exitCode !== 0) throw new Error('A working tar executable is required')
|
|
12
|
+
if (/GNU tar/i.test(tar.stdout.toString())) env.TAR_OPTIONS = '--force-local'
|
|
13
|
+
}
|
|
14
|
+
const child = Bun.spawn({
|
|
15
|
+
cmd: [
|
|
16
|
+
'node',
|
|
17
|
+
join('node_modules', 'electrobun', 'bin', 'electrobun.cjs'),
|
|
18
|
+
'build',
|
|
19
|
+
`--env=${environment}`,
|
|
20
|
+
],
|
|
21
|
+
env,
|
|
22
|
+
stdin: 'inherit',
|
|
23
|
+
stdout: 'inherit',
|
|
24
|
+
stderr: 'inherit',
|
|
25
|
+
})
|
|
26
|
+
if ((await child.exited) !== 0) throw new Error('Desktop build failed')
|
|
27
|
+
if (environment === 'stable' && process.platform === 'darwin') {
|
|
28
|
+
const bundle = appConfig.name.replaceAll(' ', '')
|
|
29
|
+
createMacosDmg({
|
|
30
|
+
appName: appConfig.name,
|
|
31
|
+
appPath: join('build', `stable-macos-${process.arch}`, `${appConfig.name}.app`),
|
|
32
|
+
outputPath: join('artifacts', `macos-${process.arch}-${bundle}.dmg`),
|
|
33
|
+
})
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@adea-ai/app-framework/desktop-build-hook'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mkdir, readFile } from 'node:fs/promises'
|
|
2
|
+
import { parseReleaseConfig } from '@adea-ai/app-framework/release-config'
|
|
3
|
+
import { stagePlatformArtifacts } from '@adea-ai/app-framework/release-staging'
|
|
4
|
+
|
|
5
|
+
const [platform, installer, archive, directory, ...extra] = process.argv.slice(2)
|
|
6
|
+
const tag = process.env.RELEASE_TAG
|
|
7
|
+
if (!platform || !installer || !archive || !directory || extra.length || !tag)
|
|
8
|
+
throw new Error('Expected platform, installer, archive, staging directory and RELEASE_TAG')
|
|
9
|
+
const config: unknown = JSON.parse(await readFile('release-config.json', 'utf8'))
|
|
10
|
+
const assets = parseReleaseConfig(config).requirements(tag).platforms[platform]
|
|
11
|
+
if (!assets || assets.length !== 2)
|
|
12
|
+
throw new Error('Expected one installer and one archive for the platform')
|
|
13
|
+
await mkdir(directory, { recursive: true })
|
|
14
|
+
const staged = await stagePlatformArtifacts({
|
|
15
|
+
config,
|
|
16
|
+
tag,
|
|
17
|
+
platform,
|
|
18
|
+
directory,
|
|
19
|
+
sources: { [assets[0]!]: installer, [assets[1]!]: archive },
|
|
20
|
+
})
|
|
21
|
+
console.log(JSON.stringify(staged))
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ApplicationMenu, BrowserWindow, Utils } from 'electrobun/bun'
|
|
2
|
+
import { mkdirSync } from 'node:fs'
|
|
3
|
+
import { join } from 'node:path'
|
|
4
|
+
import {
|
|
5
|
+
createApplicationCommandBroadcaster,
|
|
6
|
+
createApplicationMenu,
|
|
7
|
+
createApplicationMenuHandler,
|
|
8
|
+
} from '@adea-ai/app-framework/application-menu'
|
|
9
|
+
import { readPackagedVersion } from '@adea-ai/app-framework/app-bundle'
|
|
10
|
+
import { startDesktopHostWithRetry } from '@adea-ai/app-framework/desktop-host'
|
|
11
|
+
import { createServiceRegistry } from '@adea-ai/app-framework/service-registry'
|
|
12
|
+
import { registerNativeUtilities } from '@adea-ai/app-framework/native-utilities'
|
|
13
|
+
import { appConfig } from '../app-config'
|
|
14
|
+
|
|
15
|
+
const dataDirectory = Utils.paths.userData
|
|
16
|
+
mkdirSync(dataDirectory, { recursive: true, mode: 0o700 })
|
|
17
|
+
const services = createServiceRegistry<string>()
|
|
18
|
+
const { version } = readPackagedVersion(import.meta.dir)
|
|
19
|
+
registerNativeUtilities({
|
|
20
|
+
services,
|
|
21
|
+
info: { name: appConfig.name, version, platform: process.platform },
|
|
22
|
+
authorize: (principal) => principal === 'app-window',
|
|
23
|
+
openExternal: (url) => Utils.openExternal(url),
|
|
24
|
+
pickFolder: (startingFolder) =>
|
|
25
|
+
Utils.openFileDialog({
|
|
26
|
+
...(startingFolder === undefined ? {} : { startingFolder }),
|
|
27
|
+
canChooseFiles: false,
|
|
28
|
+
canChooseDirectory: true,
|
|
29
|
+
allowsMultipleSelection: false,
|
|
30
|
+
}),
|
|
31
|
+
pickFiles: ({ startingFolder, extensions, multiple }) =>
|
|
32
|
+
Utils.openFileDialog({
|
|
33
|
+
...(startingFolder === undefined ? {} : { startingFolder }),
|
|
34
|
+
allowedFileTypes: extensions === undefined ? '*' : extensions.join(','),
|
|
35
|
+
canChooseFiles: true,
|
|
36
|
+
canChooseDirectory: false,
|
|
37
|
+
allowsMultipleSelection: multiple,
|
|
38
|
+
}),
|
|
39
|
+
})
|
|
40
|
+
services.register('app.hello', {
|
|
41
|
+
parse: (value) => value,
|
|
42
|
+
authorize: (principal) => principal === 'app-window',
|
|
43
|
+
run: () => `Hello from ${appConfig.name}`,
|
|
44
|
+
})
|
|
45
|
+
const commands = createApplicationCommandBroadcaster<string>({
|
|
46
|
+
authorize: (principal) => principal === 'app-window',
|
|
47
|
+
})
|
|
48
|
+
const helpLinks = [{ label: 'Source code', url: appConfig.sourceUrl }]
|
|
49
|
+
// Electrobun implements application menus on macOS and Windows; Linux keeps
|
|
50
|
+
// these surfaces in the window's account menu.
|
|
51
|
+
if (process.platform !== 'linux') {
|
|
52
|
+
ApplicationMenu.setApplicationMenu(
|
|
53
|
+
createApplicationMenu({
|
|
54
|
+
name: appConfig.name,
|
|
55
|
+
platform: process.platform,
|
|
56
|
+
settings: true,
|
|
57
|
+
helpLinks,
|
|
58
|
+
})
|
|
59
|
+
)
|
|
60
|
+
ApplicationMenu.on(
|
|
61
|
+
'application-menu-clicked',
|
|
62
|
+
createApplicationMenuHandler({
|
|
63
|
+
helpLinks,
|
|
64
|
+
command: (command) => commands.send(command),
|
|
65
|
+
openExternal: (url) => Utils.openExternal(url),
|
|
66
|
+
})
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
await startDesktopHostWithRetry({
|
|
70
|
+
clientRoot: join(import.meta.dir, '..', 'client'),
|
|
71
|
+
portFile: join(dataDirectory, 'desktop-origin-port'),
|
|
72
|
+
initialPort: appConfig.initialPort ?? undefined,
|
|
73
|
+
title: appConfig.name,
|
|
74
|
+
renderer: appConfig.renderer,
|
|
75
|
+
platform: process.platform,
|
|
76
|
+
principal: 'app-window',
|
|
77
|
+
services,
|
|
78
|
+
configureStreams: (streams) => commands.register(streams),
|
|
79
|
+
construct: (options) => new BrowserWindow(options),
|
|
80
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Narrow declarations for the Electrobun 2.0.5 APIs used by the generated host. */
|
|
2
|
+
declare module 'electrobun/bun' {
|
|
3
|
+
import type { NativeWindow, SecureWindowOptions } from '@adea-ai/app-framework/secure-window'
|
|
4
|
+
export class BrowserWindow implements NativeWindow {
|
|
5
|
+
constructor(options: SecureWindowOptions)
|
|
6
|
+
webview: NativeWindow['webview']
|
|
7
|
+
on(event: 'close', handler: () => void): unknown
|
|
8
|
+
close(): unknown
|
|
9
|
+
}
|
|
10
|
+
export const ApplicationMenu: {
|
|
11
|
+
setApplicationMenu(
|
|
12
|
+
menu: import('@adea-ai/app-framework/application-menu').ApplicationMenuItem[]
|
|
13
|
+
): void
|
|
14
|
+
on(name: 'application-menu-clicked', handler: (event: unknown) => void): void
|
|
15
|
+
}
|
|
16
|
+
export const Utils: {
|
|
17
|
+
paths: { userData: string }
|
|
18
|
+
openExternal(url: string): boolean
|
|
19
|
+
openFileDialog(options?: {
|
|
20
|
+
startingFolder?: string
|
|
21
|
+
allowedFileTypes?: string
|
|
22
|
+
canChooseFiles?: boolean
|
|
23
|
+
canChooseDirectory?: boolean
|
|
24
|
+
allowsMultipleSelection?: boolean
|
|
25
|
+
}): Promise<string[]>
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<title>Application</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createSignal, lazy, onCleanup } from 'solid-js'
|
|
2
|
+
import { render } from 'solid-js/web'
|
|
3
|
+
import { House } from 'lucide-solid'
|
|
4
|
+
import { Application, defineApplication } from '@adea-ai/app-framework/application'
|
|
5
|
+
import { ThemeProvider } from '@adea-ai/app-framework/appearance-host'
|
|
6
|
+
import { connectApplicationCommands } from '@adea-ai/app-framework/application-command-client'
|
|
7
|
+
import { createDesktopClient } from '@adea-ai/app-framework/desktop-client'
|
|
8
|
+
import { Button } from '@adea-ai/ui/components/ui/button'
|
|
9
|
+
import { appConfig } from '../app-config'
|
|
10
|
+
import './style.css'
|
|
11
|
+
|
|
12
|
+
declare const __APP_VERSION__: string
|
|
13
|
+
|
|
14
|
+
const client = createDesktopClient()
|
|
15
|
+
const openExternal = async (url: string) => {
|
|
16
|
+
const result = await client.invoke('shell.open-external', { url })
|
|
17
|
+
if (
|
|
18
|
+
!result.ok ||
|
|
19
|
+
typeof result.value !== 'object' ||
|
|
20
|
+
result.value === null ||
|
|
21
|
+
!('opened' in result.value) ||
|
|
22
|
+
result.value.opened !== true
|
|
23
|
+
)
|
|
24
|
+
throw new Error('Unable to open external link')
|
|
25
|
+
}
|
|
26
|
+
const AppearancePanel = lazy(() =>
|
|
27
|
+
import('@adea-ai/app-framework/appearance-surface').then((module) => ({
|
|
28
|
+
default: module.AppearancePanel,
|
|
29
|
+
}))
|
|
30
|
+
)
|
|
31
|
+
function Home() {
|
|
32
|
+
const [message, setMessage] = createSignal('')
|
|
33
|
+
return (
|
|
34
|
+
<section>
|
|
35
|
+
<p>Welcome to {appConfig.name}.</p>
|
|
36
|
+
<Button
|
|
37
|
+
onClick={async () => {
|
|
38
|
+
try {
|
|
39
|
+
const result = await client.invoke('app.hello', null)
|
|
40
|
+
setMessage(result.ok ? String(result.value) : 'Service unavailable')
|
|
41
|
+
} catch {
|
|
42
|
+
setMessage('Desktop service unavailable')
|
|
43
|
+
}
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
Try the desktop service
|
|
47
|
+
</Button>
|
|
48
|
+
<p role="status">{message()}</p>
|
|
49
|
+
</section>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
const definition = defineApplication({
|
|
53
|
+
identity: {
|
|
54
|
+
name: appConfig.name,
|
|
55
|
+
icon: '/icon.svg',
|
|
56
|
+
version: __APP_VERSION__,
|
|
57
|
+
platform: navigator.platform,
|
|
58
|
+
copyright: appConfig.name,
|
|
59
|
+
sourceUrl: appConfig.sourceUrl,
|
|
60
|
+
},
|
|
61
|
+
storageKey: `${appConfig.slug}.appearance`,
|
|
62
|
+
mark: <span aria-hidden="true">{appConfig.name.slice(0, 1)}</span>,
|
|
63
|
+
initialView: 'home',
|
|
64
|
+
views: [{ id: 'home', label: 'Home', icon: <House />, render: () => <Home /> }],
|
|
65
|
+
})
|
|
66
|
+
document.title = appConfig.name
|
|
67
|
+
render(() => {
|
|
68
|
+
onCleanup(() => client.dispose())
|
|
69
|
+
return (
|
|
70
|
+
<Application
|
|
71
|
+
definition={definition}
|
|
72
|
+
runtime="desktop"
|
|
73
|
+
themeProvider={ThemeProvider}
|
|
74
|
+
utilities={{
|
|
75
|
+
appearance: <AppearancePanel />,
|
|
76
|
+
openExternal,
|
|
77
|
+
settings: {
|
|
78
|
+
sections: [
|
|
79
|
+
{
|
|
80
|
+
id: 'general',
|
|
81
|
+
label: 'General',
|
|
82
|
+
group: appConfig.name,
|
|
83
|
+
description: `Settings that belong to ${appConfig.name}.`,
|
|
84
|
+
render: () => <p>Add your application's settings here.</p>,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
help: { links: [{ label: 'Source code', url: appConfig.sourceUrl }] },
|
|
89
|
+
commands: (commands) => {
|
|
90
|
+
// Native menus deliver About, Settings and Help over the authenticated stream.
|
|
91
|
+
const connection = connectApplicationCommands(client, commands).catch(() => undefined)
|
|
92
|
+
onCleanup(() => void connection.then((disconnect) => disconnect?.()))
|
|
93
|
+
},
|
|
94
|
+
}}
|
|
95
|
+
/>
|
|
96
|
+
)
|
|
97
|
+
}, document.getElementById('root')!)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="12" fill="#6d28d9"/><path d="M16 44 32 16 48 44Z" fill="#fff"/></svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { expect, test } from 'bun:test'
|
|
2
|
+
import { createRendererProfile } from '@adea-ai/app-framework/renderer-profile'
|
|
3
|
+
import { appConfig } from '../src/app-config'
|
|
4
|
+
|
|
5
|
+
test('the app identity and selected renderer produce a valid desktop profile', () => {
|
|
6
|
+
expect(appConfig.name.trim()).not.toBe('')
|
|
7
|
+
expect(appConfig.identifier).toMatch(/^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$/)
|
|
8
|
+
expect(createRendererProfile(appConfig.renderer).renderer).toBe(appConfig.renderer)
|
|
9
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "Preserve",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"jsxImportSource": "solid-js",
|
|
8
|
+
"types": ["bun", "vite/client"],
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"allowImportingTsExtensions": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src", "scripts", "tests", "vite.config.ts", "electrobun.config.ts"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import solid from 'vite-plugin-solid'
|
|
3
|
+
import tailwind from '@tailwindcss/vite'
|
|
4
|
+
import { applicationVersion } from './scripts/app-version'
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
define: { __APP_VERSION__: JSON.stringify(applicationVersion()) },
|
|
7
|
+
root: 'src/web',
|
|
8
|
+
plugins: [solid(), tailwind()],
|
|
9
|
+
build: { outDir: '../../build/client', emptyOutDir: true },
|
|
10
|
+
})
|