arcane-os 0.92.0 → 0.93.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/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/browser-runtime/core/client.mjs +18 -0
- package/browser-runtime/core/contracts.mjs +20 -0
- package/browser-runtime/core/native-diagnostics.mjs +217 -0
- package/docs/reference/core/arcane-api.md +32 -0
- package/docs/reference/core/arcane-events.md +25 -0
- package/docs/reference/core-client.md +99 -0
- package/docs/reference/inventory/package-api.json +3 -3
- package/docs/reference/native-diagnostics.md +167 -0
- package/package.json +3 -1
- package/src/core/app-control.mjs +1 -0
- package/src/core/hosts/windows/ArcaneAppControl.cs +1 -1
- package/src/core/hosts/windows/ArcaneHost.cs +167 -0
- package/src/core/hosts/windows/ArcaneLauncher.cs +1 -0
- package/src/core/hosts/windows/ArcaneNativeDiagnostics.cs +137 -0
- package/src/core/hosts/windows/ArcaneNotifications.cs +822 -0
- package/src/core/hosts/windows/ArcaneWindowControl.cs +3 -2
- package/src/core-native-diagnostics-source.mjs +13 -0
- package/src/import-map.mjs +1 -0
|
@@ -38,7 +38,7 @@ namespace Arcane.Core.Hosts.Windows
|
|
|
38
38
|
{
|
|
39
39
|
if (appControl == null) return;
|
|
40
40
|
appControlScript = await browser.AddScriptToExecuteOnDocumentCreatedAsync(
|
|
41
|
-
"globalThis[" + AppControlDocumentKey + "]
|
|
41
|
+
"globalThis[" + AppControlDocumentKey + "] ??= globalThis.crypto.randomUUID();");
|
|
42
42
|
if (closing) return;
|
|
43
43
|
browser.NavigationStarting += AppControlNavigationStarting;
|
|
44
44
|
browser.NavigationCompleted += AppControlNavigationCompleted;
|
|
@@ -140,7 +140,7 @@ namespace Arcane.Core.Hosts.Windows
|
|
|
140
140
|
{ "url", webView.Source == null ? null : webView.Source.AbsoluteUri },
|
|
141
141
|
{ "documentGeneration", appControlGeneration }, { "ready", AppControlDocumentReady() },
|
|
142
142
|
{ "window", AppControlWindow() },
|
|
143
|
-
{ "operations", new string[] { "status", "inspect", "capture", "act", "key", "resize" } }
|
|
143
|
+
{ "operations", new string[] { "status", "diagnostics", "inspect", "capture", "act", "key", "resize" } }
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -158,6 +158,7 @@ namespace Arcane.Core.Hosts.Windows
|
|
|
158
158
|
{
|
|
159
159
|
cancellation.ThrowIfCancellationRequested();
|
|
160
160
|
if (method == "app.control.status") return AppControlStatus();
|
|
161
|
+
if (method == "app.control.diagnostics") return nativeDiagnostics.Snapshot(parameters);
|
|
161
162
|
if (method != "app.control.inspect" && method != "app.control.capture" && method != "app.control.act"
|
|
162
163
|
&& method != "app.control.key" && method != "app.control.resize")
|
|
163
164
|
throw new ArgumentException("Unknown app-control method: " + method);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {readFile} from 'node:fs/promises';
|
|
2
|
+
|
|
3
|
+
/** Project the one canonical diagnostic observer into a document-start script. */
|
|
4
|
+
export async function createNativeDiagnosticsSource() {
|
|
5
|
+
const source = await readFile(new URL('../browser-runtime/core/native-diagnostics.mjs', import.meta.url), 'utf8');
|
|
6
|
+
return `(function installArcaneNativeDiagnostics(global){
|
|
7
|
+
'use strict';
|
|
8
|
+
if(global.top!==undefined&&global.top!==global)return;
|
|
9
|
+
${source.replace(/^export (?=(?:async )?function )/gmu, '')}
|
|
10
|
+
installNativeDiagnostics(global);
|
|
11
|
+
})(globalThis);
|
|
12
|
+
`;
|
|
13
|
+
}
|
package/src/import-map.mjs
CHANGED
|
@@ -44,6 +44,7 @@ const SDK_BROWSER_SELF_IMPORTS=new Map([
|
|
|
44
44
|
['arcane-os/websocket-client','sdk/websocket-client.mjs'],
|
|
45
45
|
['arcane-os/core/client','sdk/core/client.mjs'],
|
|
46
46
|
['arcane-os/core/contracts','sdk/core/contracts.mjs'],
|
|
47
|
+
['arcane-os/core/native-diagnostics','sdk/core/native-diagnostics.mjs'],
|
|
47
48
|
['arcane-os/document-acquisition','sdk/document-acquisition.mjs'],
|
|
48
49
|
['arcane-os/logging','sdk/logging.mjs'],
|
|
49
50
|
['arcane-os/browser-device','sdk/browser-device.mjs'],
|