@senguoyun/dsh-arkme 0.1.32 → 0.1.34
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 +24 -0
- package/lib/client.js +4247 -4140
- package/lib/client.js.map +1 -1
- package/lib/extension-profile-restart-helper.js +17 -5
- package/lib/index.js +412 -23
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-CFeIg6aw.js → persistent-runtime-CZQTfyC1.js} +35814 -6704
- package/lib/types/arkme-service.d.ts +9 -1
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/client/ArkmeExtensionRecoveryNotice.d.ts +9 -0
- package/lib/types/client/ArkmeExtensionRecoveryNotice.d.ts.map +1 -0
- package/lib/types/client/ArkmeFooterAction.d.ts +1 -7
- package/lib/types/client/ArkmeFooterAction.d.ts.map +1 -1
- package/lib/types/client/ArkmeFooterDropdown.d.ts.map +1 -1
- package/lib/types/client/ArkmeMarketplace.d.ts +2 -1
- package/lib/types/client/ArkmeMarketplace.d.ts.map +1 -1
- package/lib/types/client/ArkmeMessageSnapshotDialog.d.ts +17 -0
- package/lib/types/client/ArkmeMessageSnapshotDialog.d.ts.map +1 -0
- package/lib/types/client/ArkmePersistentShell.d.ts.map +1 -1
- package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichComposerInput.d.ts +3 -1
- package/lib/types/client/ArkmeRichComposerInput.d.ts.map +1 -1
- package/lib/types/client/ArkmeSettingsSurface.d.ts +4 -19
- package/lib/types/client/ArkmeSettingsSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkmeUpdateSurfaces.d.ts +38 -5
- package/lib/types/client/ArkmeUpdateSurfaces.d.ts.map +1 -1
- package/lib/types/client/api.d.ts +1 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/desktop-quarantine-status.d.ts +3 -0
- package/lib/types/client/desktop-quarantine-status.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +0 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/record-capture-location.d.ts +8 -0
- package/lib/types/client/record-capture-location.d.ts.map +1 -0
- package/lib/types/client/update-presentation.d.ts +1 -1
- package/lib/types/client/update-presentation.d.ts.map +1 -1
- package/lib/types/client/update-ui-controller.d.ts +1 -1
- package/lib/types/client/update-ui-controller.d.ts.map +1 -1
- package/lib/types/extensions/desktop-quarantine.d.ts +79 -0
- package/lib/types/extensions/desktop-quarantine.d.ts.map +1 -0
- package/lib/types/extensions/profile-installer.d.ts +5 -0
- package/lib/types/extensions/profile-installer.d.ts.map +1 -1
- package/lib/types/extensions/profile-restart-helper.d.ts +3 -1
- package/lib/types/extensions/profile-restart-helper.d.ts.map +1 -1
- package/lib/types/host-api.d.ts +3 -1
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/local-database.d.ts +1 -0
- package/lib/types/local-database.d.ts.map +1 -1
- package/lib/types/services/chat-service.d.ts +14 -1
- package/lib/types/services/chat-service.d.ts.map +1 -1
- package/lib/types/services/group-ai-polish-service.d.ts +3 -1
- package/lib/types/services/group-ai-polish-service.d.ts.map +1 -1
- package/lib/types/services/record-service.d.ts +10 -3
- package/lib/types/services/record-service.d.ts.map +1 -1
- package/lib/types/state-store.d.ts.map +1 -1
- package/lib/types/types.d.ts +50 -1
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -35,15 +35,18 @@ function parseExtensionProfileRestartPlan(value) {
|
|
|
35
35
|
installStoreDirectory: stringValue(source.installStoreDirectory),
|
|
36
36
|
previousInstalled: source.previousInstalled !== null && typeof source.previousInstalled === "object" ? source.previousInstalled : void 0,
|
|
37
37
|
activationChange: source.activationChange === true ? true : void 0,
|
|
38
|
+
desktopQuarantineActivation: source.desktopQuarantineActivation === true ? true : void 0,
|
|
38
39
|
previousProfileIncluded: typeof source.previousProfileIncluded === "boolean" ? source.previousProfileIncluded : void 0,
|
|
39
40
|
healthUrl: stringValue(source.healthUrl),
|
|
40
|
-
logPath: stringValue(source.logPath)
|
|
41
|
+
logPath: stringValue(source.logPath),
|
|
42
|
+
runtimeReleaseId: stringValue(source.runtimeReleaseId)
|
|
41
43
|
};
|
|
42
44
|
if (![
|
|
43
45
|
1,
|
|
44
46
|
2,
|
|
45
|
-
3
|
|
46
|
-
|
|
47
|
+
3,
|
|
48
|
+
4
|
|
49
|
+
].includes(plan.schemaVersion) || typeof plan.parentPid !== "number" || !Number.isSafeInteger(plan.parentPid) || plan.parentPid <= 0 || plan.execPath === void 0 || plan.dshBinPath === void 0 || plan.restartArgv.length === 0 || plan.dshHome === void 0 || plan.profileName === void 0 || plan.packageName === void 0 || plan.extensionId === void 0 || typeof plan.expectActive !== "boolean" || plan.installStoreDirectory === void 0 || plan.healthUrl === void 0 || plan.logPath === void 0 || plan.runtimeReleaseId !== void 0 && !/^electron-runtime-v1-[a-f0-9]{32}$/.test(plan.runtimeReleaseId) || plan.schemaVersion === 3 && (plan.activationChange !== true || plan.desktopQuarantineActivation === true || plan.previousInstalled === void 0 || plan.previousProfileIncluded === void 0) || plan.schemaVersion === 4 && (plan.activationChange !== true || plan.desktopQuarantineActivation !== true || plan.previousInstalled !== void 0 || plan.previousProfileIncluded !== false || plan.expectActive !== true || plan.extensionId !== `desktop-quarantine:${plan.packageName}`) || ![3, 4].includes(plan.schemaVersion) && plan.activationChange === true || plan.schemaVersion !== 4 && plan.desktopQuarantineActivation === true || (plan.schemaVersion === 1 ? !/^@arkme-local\/ext-[a-f0-9]{16}$/.test(plan.packageName) : !/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/.test(plan.packageName))) throw new Error("extension restart plan is incomplete");
|
|
47
50
|
const health = new URL(plan.healthUrl);
|
|
48
51
|
if (health.protocol !== "http:" || !["127.0.0.1", "localhost"].includes(health.hostname)) throw new Error("extension restart health URL must be loopback HTTP");
|
|
49
52
|
return {
|
|
@@ -88,12 +91,21 @@ async function healthy(plan) {
|
|
|
88
91
|
"Content-Type": "application/json",
|
|
89
92
|
Origin: new URL(plan.healthUrl).origin
|
|
90
93
|
},
|
|
91
|
-
body: JSON.stringify(
|
|
94
|
+
body: JSON.stringify(plan.desktopQuarantineActivation === true ? {
|
|
95
|
+
operation: "extensions.quarantine.health",
|
|
96
|
+
params: { packageName: plan.packageName }
|
|
97
|
+
} : { operation: "extensions.installed-list" }),
|
|
92
98
|
signal: AbortSignal.timeout(2e3)
|
|
93
99
|
});
|
|
94
100
|
if (response.ok) {
|
|
95
101
|
const body = await response.json();
|
|
96
|
-
|
|
102
|
+
if (plan.desktopQuarantineActivation === true) {
|
|
103
|
+
const status = body.value;
|
|
104
|
+
if (body.ok === true && status?.profileEnabled === true && status.active === true) return true;
|
|
105
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const installed = Array.isArray(body.value) ? body.value.find((item) => item.extensionId === plan.extensionId) : void 0;
|
|
97
109
|
if (body.ok === true && (plan.activationChange === true ? plan.expectActive ? installed?.enabled === true && installed.active === true : installed?.enabled === false && installed.active === false : plan.expectActive ? installed?.active === true : installed === void 0)) return true;
|
|
98
110
|
}
|
|
99
111
|
} catch {}
|