@senguoyun/dsh-arkme 0.1.22 → 0.1.23
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/assets/desktop_call/gallery-linear.svg +5 -0
- package/docs/consumer-plugin-contract.md +4 -0
- package/docs/third-party-notices.md +13 -0
- package/lib/client.js +32263 -15241
- package/lib/client.js.map +1 -1
- package/lib/extension-profile-restart-helper.js +19 -7
- package/lib/index.js +613 -84
- package/lib/{install-store-Beau1y-o.js → install-store-C1tAM346.js} +1 -1
- package/lib/persistent-extension.js +1 -1
- package/lib/{persistent-runtime-CNdmWCSF.js → persistent-runtime-BIJ2Er-6.js} +9419 -7883
- package/lib/plugin-updater-helper-Ddppbids.js +2 -0
- package/lib/{plugin-updater-helper-CEnlAUhI.js → plugin-updater-helper-Lmz7W2ph.js} +47 -10
- package/lib/plugin-updater-helper.js +1 -1
- package/lib/{profile-package-manager-DwuQu8ZL.js → profile-bundle-policy-CvojZuTD.js} +76 -1
- package/lib/sdk.js +59 -1
- package/lib/types/arkme-service.d.ts +26 -3
- package/lib/types/arkme-service.d.ts.map +1 -1
- package/lib/types/chat-realtime.d.ts +13 -1
- package/lib/types/chat-realtime.d.ts.map +1 -1
- package/lib/types/client/ArkmeCallSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeChatMemberActions.d.ts +3 -0
- package/lib/types/client/ArkmeChatMemberActions.d.ts.map +1 -1
- package/lib/types/client/ArkmeEmojiPicker.d.ts +25 -1
- package/lib/types/client/ArkmeEmojiPicker.d.ts.map +1 -1
- package/lib/types/client/ArkmeGroupChatControls.d.ts +2 -0
- package/lib/types/client/ArkmeGroupChatControls.d.ts.map +1 -1
- package/lib/types/client/ArkmeLogin.d.ts.map +1 -1
- package/lib/types/client/ArkmeMarketplace.d.ts +6 -3
- package/lib/types/client/ArkmeMarketplace.d.ts.map +1 -1
- package/lib/types/client/ArkmeMessageReadReceipt.d.ts +24 -0
- package/lib/types/client/ArkmeMessageReadReceipt.d.ts.map +1 -0
- package/lib/types/client/ArkmeNoteDetails.d.ts +14 -0
- package/lib/types/client/ArkmeNoteDetails.d.ts.map +1 -0
- package/lib/types/client/ArkmePersistentShell.d.ts +7 -1
- package/lib/types/client/ArkmePersistentShell.d.ts.map +1 -1
- package/lib/types/client/ArkmeProductNavigation.d.ts.map +1 -1
- package/lib/types/client/ArkmeQuickAdd.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichComposerInput.d.ts +11 -0
- package/lib/types/client/ArkmeRichComposerInput.d.ts.map +1 -1
- package/lib/types/client/ArkmeRichContent.d.ts +9 -1
- package/lib/types/client/ArkmeRichContent.d.ts.map +1 -1
- package/lib/types/client/ArkmeSearchSurface.d.ts +19 -1
- package/lib/types/client/ArkmeSearchSurface.d.ts.map +1 -1
- package/lib/types/client/ArkmeSidebar.d.ts +37 -2
- package/lib/types/client/ArkmeSidebar.d.ts.map +1 -1
- package/lib/types/client/ArkmeSourceBreadcrumb.d.ts +29 -5
- package/lib/types/client/ArkmeSourceBreadcrumb.d.ts.map +1 -1
- package/lib/types/client/ArkmeTopicCreateDialog.d.ts +3 -1
- package/lib/types/client/ArkmeTopicCreateDialog.d.ts.map +1 -1
- package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts +8 -1
- package/lib/types/client/ArkmeTopicDirectoryPopover.d.ts.map +1 -1
- package/lib/types/client/ArkmeTopicManagementDialog.d.ts +22 -0
- package/lib/types/client/ArkmeTopicManagementDialog.d.ts.map +1 -0
- package/lib/types/client/ArkmeUpdateSurfaces.d.ts.map +1 -1
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts +10 -1
- package/lib/types/client/ArkmeVirtualWorkspace.d.ts.map +1 -1
- package/lib/types/client/ArkmeVoiceContent.d.ts +16 -0
- package/lib/types/client/ArkmeVoiceContent.d.ts.map +1 -0
- package/lib/types/client/ArkmeWorldSurface.d.ts +11 -3
- package/lib/types/client/ArkmeWorldSurface.d.ts.map +1 -1
- package/lib/types/client/account-settings-nav-icon.d.ts +10 -0
- package/lib/types/client/account-settings-nav-icon.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +1 -1
- package/lib/types/client/api.d.ts.map +1 -1
- package/lib/types/client/arkme-login-locales.d.ts +2 -6
- package/lib/types/client/arkme-login-locales.d.ts.map +1 -1
- package/lib/types/client/arkme-theme.d.ts +1 -1
- package/lib/types/client/arkme-voice-compat.d.ts +7 -0
- package/lib/types/client/arkme-voice-compat.d.ts.map +1 -0
- package/lib/types/client/chat-directory-store.d.ts.map +1 -1
- package/lib/types/client/composer-draft-store.d.ts +6 -1
- package/lib/types/client/composer-draft-store.d.ts.map +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/message-read-receipt-store.d.ts +63 -0
- package/lib/types/client/message-read-receipt-store.d.ts.map +1 -0
- package/lib/types/client/navigation-cache.d.ts.map +1 -1
- package/lib/types/client/realtime-client-events.d.ts.map +1 -1
- package/lib/types/client/source-list.d.ts.map +1 -1
- package/lib/types/client/source-tree.d.ts +13 -1
- package/lib/types/client/source-tree.d.ts.map +1 -1
- package/lib/types/client/ui-controller.d.ts +18 -0
- package/lib/types/client/ui-controller.d.ts.map +1 -1
- package/lib/types/extensions/client-owner.d.ts +10 -5
- package/lib/types/extensions/client-owner.d.ts.map +1 -1
- package/lib/types/extensions/manager.d.ts +18 -3
- package/lib/types/extensions/manager.d.ts.map +1 -1
- package/lib/types/extensions/persistent-client-bundle.d.ts +2 -2
- package/lib/types/extensions/persistent-client-bundle.d.ts.map +1 -1
- package/lib/types/extensions/profile-bundle-policy.d.ts +16 -0
- package/lib/types/extensions/profile-bundle-policy.d.ts.map +1 -0
- package/lib/types/extensions/profile-installer.d.ts +2 -0
- package/lib/types/extensions/profile-installer.d.ts.map +1 -1
- package/lib/types/extensions/profile-restart-helper.d.ts +5 -1
- package/lib/types/extensions/profile-restart-helper.d.ts.map +1 -1
- package/lib/types/extensions/types.d.ts +2 -0
- package/lib/types/extensions/types.d.ts.map +1 -1
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/mention-metadata.d.ts +3 -0
- package/lib/types/mention-metadata.d.ts.map +1 -0
- package/lib/types/outgoing-call-assets.d.ts.map +1 -1
- package/lib/types/plugin-update.d.ts +1 -0
- package/lib/types/plugin-update.d.ts.map +1 -1
- package/lib/types/plugin-updater-helper.d.ts +9 -1
- package/lib/types/plugin-updater-helper.d.ts.map +1 -1
- package/lib/types/rich-media-routes.d.ts.map +1 -1
- package/lib/types/sdk/index.d.ts +15 -2
- package/lib/types/sdk/index.d.ts.map +1 -1
- package/lib/types/services/bot-service.d.ts +19 -1
- package/lib/types/services/bot-service.d.ts.map +1 -1
- package/lib/types/services/calendar-service.d.ts +3 -1
- package/lib/types/services/calendar-service.d.ts.map +1 -1
- package/lib/types/services/chat-realtime-service.d.ts +1 -0
- package/lib/types/services/chat-realtime-service.d.ts.map +1 -1
- package/lib/types/services/chat-service.d.ts +31 -4
- package/lib/types/services/chat-service.d.ts.map +1 -1
- package/lib/types/services/media-service.d.ts +13 -1
- package/lib/types/services/media-service.d.ts.map +1 -1
- package/lib/types/services/privacy-visibility.d.ts +17 -0
- package/lib/types/services/privacy-visibility.d.ts.map +1 -0
- package/lib/types/services/record-service.d.ts +6 -1
- package/lib/types/services/record-service.d.ts.map +1 -1
- package/lib/types/services/search-service.d.ts +7 -1
- package/lib/types/services/search-service.d.ts.map +1 -1
- package/lib/types/services/source-service.d.ts +45 -3
- package/lib/types/services/source-service.d.ts.map +1 -1
- package/lib/types/services/world-service.d.ts.map +1 -1
- package/lib/types/tools/business/conversation/favorite-stickers.d.ts +5 -0
- package/lib/types/tools/business/conversation/favorite-stickers.d.ts.map +1 -0
- package/lib/types/tools/business/conversation/index.d.ts.map +1 -1
- package/lib/types/tools/business/conversation/read-receipts.d.ts +4 -0
- package/lib/types/tools/business/conversation/read-receipts.d.ts.map +1 -0
- package/lib/types/tools/business/conversation/unread.d.ts +4 -0
- package/lib/types/tools/business/conversation/unread.d.ts.map +1 -0
- package/lib/types/tools/business/index.d.ts.map +1 -1
- package/lib/types/tools/ports/conversations.d.ts +18 -1
- package/lib/types/tools/ports/conversations.d.ts.map +1 -1
- package/lib/types/tools/prompts/business.d.ts.map +1 -1
- package/lib/types/types.d.ts +177 -4
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +12 -5
- package/lib/plugin-updater-helper-Bg28PYR7.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as ArkmeExtensionInstallStore } from "./install-store-
|
|
1
|
+
import { i as prepareProfilePackageManager, r as localExtensionPnpmArgs, t as applyArkmeProfileBundlePolicy } from "./profile-bundle-policy-CvojZuTD.js";
|
|
2
|
+
import { t as ArkmeExtensionInstallStore } from "./install-store-C1tAM346.js";
|
|
3
3
|
import { closeSync, openSync } from "node:fs";
|
|
4
|
-
import { relative, resolve } from "node:path";
|
|
4
|
+
import { join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { spawn, spawnSync } from "node:child_process";
|
|
7
7
|
import { readFile, rm, unlink } from "node:fs/promises";
|
|
@@ -34,10 +34,16 @@ function parseExtensionProfileRestartPlan(value) {
|
|
|
34
34
|
cleanupPaths: Array.isArray(source.cleanupPaths) ? source.cleanupPaths.map(stringValue).filter((item) => item !== void 0) : [],
|
|
35
35
|
installStoreDirectory: stringValue(source.installStoreDirectory),
|
|
36
36
|
previousInstalled: source.previousInstalled !== null && typeof source.previousInstalled === "object" ? source.previousInstalled : void 0,
|
|
37
|
+
activationChange: source.activationChange === true ? true : void 0,
|
|
38
|
+
previousProfileIncluded: typeof source.previousProfileIncluded === "boolean" ? source.previousProfileIncluded : void 0,
|
|
37
39
|
healthUrl: stringValue(source.healthUrl),
|
|
38
40
|
logPath: stringValue(source.logPath)
|
|
39
41
|
};
|
|
40
|
-
if (![
|
|
42
|
+
if (![
|
|
43
|
+
1,
|
|
44
|
+
2,
|
|
45
|
+
3
|
|
46
|
+
].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.schemaVersion === 3 && (plan.activationChange !== true || plan.previousInstalled === void 0 || plan.previousProfileIncluded === void 0) || plan.schemaVersion !== 3 && plan.activationChange === 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");
|
|
41
47
|
const health = new URL(plan.healthUrl);
|
|
42
48
|
if (health.protocol !== "http:" || !["127.0.0.1", "localhost"].includes(health.hostname)) throw new Error("extension restart health URL must be loopback HTTP");
|
|
43
49
|
return {
|
|
@@ -88,7 +94,7 @@ async function healthy(plan) {
|
|
|
88
94
|
if (response.ok) {
|
|
89
95
|
const body = await response.json();
|
|
90
96
|
const installed = body.value?.find((item) => item.extensionId === plan.extensionId);
|
|
91
|
-
if (body.ok === true && (plan.expectActive ? installed?.active === true : installed === void 0)) return true;
|
|
97
|
+
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;
|
|
92
98
|
}
|
|
93
99
|
} catch {}
|
|
94
100
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
@@ -117,6 +123,7 @@ const defaultOperations = {
|
|
|
117
123
|
start,
|
|
118
124
|
isHealthy: healthy,
|
|
119
125
|
profileCommand,
|
|
126
|
+
applyBundlePolicy: applyArkmeProfileBundlePolicy,
|
|
120
127
|
removePath: async (path) => await rm(path, {
|
|
121
128
|
recursive: true,
|
|
122
129
|
force: true
|
|
@@ -136,7 +143,11 @@ async function cleanup(plan, helper) {
|
|
|
136
143
|
}
|
|
137
144
|
}
|
|
138
145
|
async function rollback(plan, restart, helper) {
|
|
139
|
-
if (
|
|
146
|
+
if (plan.activationChange === true) helper.applyBundlePolicy(join(plan.dshHome, "profiles", plan.profileName), [{
|
|
147
|
+
packageName: plan.packageName,
|
|
148
|
+
enabled: plan.previousProfileIncluded === true
|
|
149
|
+
}]);
|
|
150
|
+
else if (!helper.profileCommand(plan, extensionProfileRollbackArgs(plan))) throw new Error("extension profile rollback failed");
|
|
140
151
|
const store = new ArkmeExtensionInstallStore(plan.installStoreDirectory);
|
|
141
152
|
try {
|
|
142
153
|
if (plan.previousInstalled === void 0) store.remove(plan.extensionId);
|
|
@@ -150,6 +161,7 @@ async function rollback(plan, restart, helper) {
|
|
|
150
161
|
if (restart) helper.start(plan);
|
|
151
162
|
}
|
|
152
163
|
function extensionProfileRollbackArgs(plan) {
|
|
164
|
+
if (plan.activationChange === true) throw new Error("activation restart rollback does not use DSH plugin commands");
|
|
153
165
|
if (plan.previousBundlePath === void 0) return ["remove", plan.packageName];
|
|
154
166
|
return plan.schemaVersion === 1 ? ["add", `link:${plan.previousBundlePath}`] : ["add", plan.previousBundlePath];
|
|
155
167
|
}
|
|
@@ -196,7 +208,7 @@ async function main() {
|
|
|
196
208
|
if (planPath === void 0) throw new Error("extension restart plan path is required");
|
|
197
209
|
const rawPlan = JSON.parse(await readFile(planPath, "utf8"));
|
|
198
210
|
if (managed && isPluginUpdateRestartPlan(rawPlan)) {
|
|
199
|
-
const pluginUpdate = await import("./plugin-updater-helper-
|
|
211
|
+
const pluginUpdate = await import("./plugin-updater-helper-Ddppbids.js");
|
|
200
212
|
if (mode === "--managed-finalize") {
|
|
201
213
|
const healthUrl = process.argv[4];
|
|
202
214
|
if (healthUrl === void 0) throw new Error("managed plugin update health URL is required");
|