@adea-ai/app-framework 0.35.1 → 0.36.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 +1 -1
- package/ci/desktop-release.sh +3 -2
- package/dist/desktop/desktop-client.d.ts +1 -6
- package/dist/desktop/desktop-client.js +2 -10
- package/dist/desktop/desktop-detection.d.ts +10 -0
- package/dist/desktop/desktop-detection.js +14 -0
- package/dist/framework-source.json +1 -1
- package/dist/release/local-provenance.js +2 -2
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ test checks the file list against the exports.
|
|
|
79
79
|
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
80
80
|
| Application and shell | `application`, `app-shell`, `app-utilities`, `app-settings`, `app-help`, `app-about`, `update-surface` (all _solid_), `service-registry`, `application-menu`, `application-command-client` |
|
|
81
81
|
| Appearance | `appearance-host`, `appearance-preferences`, `appearance-surface`, `custom-theme-library`, `window-surface` (all _solid_) |
|
|
82
|
-
| Desktop host | `desktop-host`, `desktop-gateway`, `desktop-client`, `desktop-stream`, `channel-handshake`, `channel-proof`, `loopback-policy`, `open-url-channel`, `client-asset-manifest`, `client-assets` (source only)
|
|
82
|
+
| Desktop host | `desktop-host`, `desktop-gateway`, `desktop-client`, `desktop-detection`, `desktop-stream`, `channel-handshake`, `channel-proof`, `loopback-policy`, `open-url-channel`, `client-asset-manifest`, `client-assets` (source only) |
|
|
83
83
|
| Native windows and OS | `renderer-profile`, `secure-window`, `partitioned-window`, `window-options` (source only), `native-utilities`, `native-secret-store`, `app-bundle`, `sidecar`, `sidecar-services`, `desktop-build-hook`, `desktop-build`, `windows-runtime-patch`, `electrobun-types` (ambient types only) |
|
|
84
84
|
| Updates | `desktop-updater`, `update-manager`, `update-inherited-launch-lease`, `packaged-launch-admission`, `packaged-update-startup`, `update-resume`, `channel-update-manager`, `update-channel-store`, `update-discovery`, `update-download`, `update-extraction`, `signed-release`, `release-feed`, `release-location`, `update-process-liveness`, `update-adapter` (_solid_), `release-version` (_solid_), `update-state` (source only), `update-helper.js` (bundled helper) |
|
|
85
85
|
| Release tooling | `release-config`, `release-cut`, `release-steps`, `release-staging`, `release-artifact`, `release-assets-plan`, `release-descriptor-staging`, `release-publication`, `release-publish-command`, `release-promotion`, `retained-release-build`, `github-release-publisher`, `github-release-qualification`, `github-release-promotion`, `macos-dmg` |
|
package/ci/desktop-release.sh
CHANGED
|
@@ -37,8 +37,9 @@ root=$(git rev-parse --show-toplevel)
|
|
|
37
37
|
cd "$root"
|
|
38
38
|
sha=${CI_COMMIT_SHA:-$(git rev-parse HEAD)}
|
|
39
39
|
[ "$sha" = "$(git rev-parse HEAD)" ] || { say "refusing: checkout is not at $sha"; exit 1; }
|
|
40
|
-
# Provenance is checked against origin/main
|
|
41
|
-
#
|
|
40
|
+
# Provenance is checked against origin/main of this project (the framework records the GitLab
|
|
41
|
+
# project as owner/name). The runner's insteadOf rewrite can still put its job token into
|
|
42
|
+
# `git remote get-url`; the framework drops that userinfo. The runner resets the URL per job.
|
|
42
43
|
if [ -n "${CI_PROJECT_URL:-}" ]; then git remote set-url origin "$CI_PROJECT_URL.git"; fi
|
|
43
44
|
git fetch --quiet origin "+refs/heads/main:refs/remotes/origin/main"
|
|
44
45
|
git merge-base --is-ancestor "$sha" refs/remotes/origin/main ||
|
|
@@ -3,11 +3,7 @@ import type { FetchFunction } from '../updates/release-location';
|
|
|
3
3
|
type Bootstrap = (signal?: AbortSignal) => Promise<{
|
|
4
4
|
bootstrap: string;
|
|
5
5
|
}>;
|
|
6
|
-
|
|
7
|
-
* Whether this page runs in a framework desktop window: the window preload defines the
|
|
8
|
-
* bootstrap acquirer before any page script. Pass another scope to probe it instead.
|
|
9
|
-
*/
|
|
10
|
-
export declare function isFrameworkDesktop(scope?: object): boolean;
|
|
6
|
+
export { isFrameworkDesktop } from './desktop-detection';
|
|
11
7
|
declare const streamSessionBrand: unique symbol;
|
|
12
8
|
/** A token tied to one successful explicit reconnect on its originating client. */
|
|
13
9
|
export type DesktopStreamSession = Readonly<{
|
|
@@ -39,4 +35,3 @@ export declare function createDesktopClient(options?: {
|
|
|
39
35
|
}>;
|
|
40
36
|
dispose(): void;
|
|
41
37
|
};
|
|
42
|
-
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isFrameworkDesktop } from "./desktop-detection.js";
|
|
1
2
|
import { createLoopbackPolicy } from "./loopback-policy.js";
|
|
2
3
|
// src/desktop/desktop-client.ts
|
|
3
4
|
function abortReason(signal) {
|
|
@@ -52,15 +53,6 @@ function base64UrlToBytes(value) {
|
|
|
52
53
|
const text = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
53
54
|
return Uint8Array.from(atob(text + "=".repeat((4 - text.length % 4) % 4)), (c) => c.charCodeAt(0));
|
|
54
55
|
}
|
|
55
|
-
/** The global the framework window preload defines before any page script runs. */
|
|
56
|
-
var BOOTSTRAP_GLOBAL = "__frameworkAcquireBootstrap";
|
|
57
|
-
/**
|
|
58
|
-
* Whether this page runs in a framework desktop window: the window preload defines the
|
|
59
|
-
* bootstrap acquirer before any page script. Pass another scope to probe it instead.
|
|
60
|
-
*/
|
|
61
|
-
function isFrameworkDesktop(scope = globalThis) {
|
|
62
|
-
return typeof scope[BOOTSTRAP_GLOBAL] === "function";
|
|
63
|
-
}
|
|
64
56
|
/** Browser-side client for the authenticated desktop gateway. Share one client per window: acquiring a new bootstrap revokes the window's previous channel. */
|
|
65
57
|
function createDesktopClient(options = {}) {
|
|
66
58
|
const origin = createLoopbackPolicy(options.origin ?? globalThis.location.origin).origin;
|
|
@@ -68,7 +60,7 @@ function createDesktopClient(options = {}) {
|
|
|
68
60
|
const crypto = options.crypto ?? globalThis.crypto;
|
|
69
61
|
const now = options.now ?? Date.now;
|
|
70
62
|
const bootstrap = options.bootstrap ?? ((signal) => {
|
|
71
|
-
const acquire = globalThis[
|
|
63
|
+
const acquire = globalThis["__frameworkAcquireBootstrap"];
|
|
72
64
|
if (typeof acquire !== "function") throw new Error("Desktop window bootstrap is unavailable");
|
|
73
65
|
return acquire(signal);
|
|
74
66
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The global the framework window preload defines before any page script runs. */
|
|
2
|
+
export declare const BOOTSTRAP_GLOBAL = "__frameworkAcquireBootstrap";
|
|
3
|
+
/**
|
|
4
|
+
* Whether this page runs in a framework desktop window: the window preload defines the
|
|
5
|
+
* bootstrap acquirer before any page script. Pass another scope to probe it instead.
|
|
6
|
+
*
|
|
7
|
+
* This module has no imports, so a web build can branch on it without pulling the desktop
|
|
8
|
+
* client into its initial chunk.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isFrameworkDesktop(scope?: object): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/desktop/desktop-detection.ts
|
|
2
|
+
/** The global the framework window preload defines before any page script runs. */
|
|
3
|
+
var BOOTSTRAP_GLOBAL = "__frameworkAcquireBootstrap";
|
|
4
|
+
/**
|
|
5
|
+
* Whether this page runs in a framework desktop window: the window preload defines the
|
|
6
|
+
* bootstrap acquirer before any page script. Pass another scope to probe it instead.
|
|
7
|
+
*
|
|
8
|
+
* This module has no imports, so a web build can branch on it without pulling the desktop
|
|
9
|
+
* client into its initial chunk.
|
|
10
|
+
*/
|
|
11
|
+
function isFrameworkDesktop(scope = globalThis) {
|
|
12
|
+
return typeof scope[BOOTSTRAP_GLOBAL] === "function";
|
|
13
|
+
}
|
|
14
|
+
export { BOOTSTRAP_GLOBAL, isFrameworkDesktop };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.
|
|
1
|
+
{"version":"0.36.0","commit":"1debd6201aa32d22b16f10c02af9513b43a6d95d"}
|
|
@@ -39,11 +39,11 @@ async function readSourceVersion(git, sourceSha, path) {
|
|
|
39
39
|
* does not change the identity recorded in new descriptors or in installed apps' feeds.
|
|
40
40
|
*/
|
|
41
41
|
async function originRepository(git) {
|
|
42
|
-
const url = await git([
|
|
42
|
+
const url = (await git([
|
|
43
43
|
"remote",
|
|
44
44
|
"get-url",
|
|
45
45
|
"origin"
|
|
46
|
-
]);
|
|
46
|
+
])).replace(/^https:\/\/[^/@\s]*@(?=(?:github|gitlab)\.com\/)/, "https://");
|
|
47
47
|
const part = "[A-Za-z0-9_.-]+";
|
|
48
48
|
const github = new RegExp(`^(?:https://github\\.com/|git@github\\.com:)(${part}/${part}?)(?:\\.git)?/?$`).exec(url);
|
|
49
49
|
const gitlab = new RegExp(`^(?:https://gitlab\\.com/|git@gitlab\\.com:)(${part}/(?:${part}/)*${part}?)(?:\\.git)?/?$`).exec(url);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/app-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -144,6 +144,10 @@
|
|
|
144
144
|
"types": "./dist/desktop/channel-handshake.d.ts",
|
|
145
145
|
"import": "./dist/desktop/channel-handshake.js"
|
|
146
146
|
},
|
|
147
|
+
"./desktop-detection": {
|
|
148
|
+
"types": "./dist/desktop/desktop-detection.d.ts",
|
|
149
|
+
"import": "./dist/desktop/desktop-detection.js"
|
|
150
|
+
},
|
|
147
151
|
"./desktop-gateway": {
|
|
148
152
|
"types": "./dist/desktop/desktop-gateway.d.ts",
|
|
149
153
|
"import": "./dist/desktop/desktop-gateway.js"
|