@eum-agent/extension-catalog 1.0.1 → 1.0.3
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/dist/index.js +2249 -1673
- package/package.json +6 -6
- package/ui/ui.js +9 -6
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"en-US": "Extension Catalog",
|
|
5
5
|
"zh-CN": "扩展目录"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.0.
|
|
7
|
+
"version": "1.0.3",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"description": "Extension Catalog",
|
|
10
10
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"semver": "7.8.5"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@eum-agent/plugin": "1.0.
|
|
28
|
+
"@eum-agent/plugin": "1.0.1",
|
|
29
29
|
"@types/react": "^19.2.18",
|
|
30
30
|
"@types/react-dom": "^19.2.5",
|
|
31
31
|
"react": "^19.2.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"lucide-react": "^1.40.0",
|
|
42
42
|
"@types/semver": "7.8.0",
|
|
43
43
|
"i18next": "^26.4.1",
|
|
44
|
-
"@eum-agent/infra-local": "1.0.
|
|
45
|
-
"@eum-agent/storage-sqlite": "1.0.
|
|
44
|
+
"@eum-agent/infra-local": "1.0.1",
|
|
45
|
+
"@eum-agent/storage-sqlite": "1.0.1"
|
|
46
46
|
},
|
|
47
47
|
"yaoguang": {
|
|
48
48
|
"kind": "extension",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {},
|
|
54
54
|
"foundationDependencies": {
|
|
55
|
-
"@eum-agent/infra-local": "1.0.
|
|
56
|
-
"@eum-agent/storage-sqlite": "1.0.
|
|
55
|
+
"@eum-agent/infra-local": "1.0.1",
|
|
56
|
+
"@eum-agent/storage-sqlite": "1.0.1"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
package/ui/ui.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region ui-src/i18n.ts
|
|
8
|
+
/** Platform browser strings share the host's language and React translation runtime. */
|
|
8
9
|
var translations;
|
|
9
10
|
/** Binds this activation's registered namespace without reconstructing the owner's namespace. */
|
|
10
11
|
function configureTranslations(ctx) {
|
|
@@ -293,10 +294,12 @@ function createCatalogController(ctx, options = {}) {
|
|
|
293
294
|
try {
|
|
294
295
|
do {
|
|
295
296
|
entry.again = false;
|
|
296
|
-
const
|
|
297
|
+
const member = (await invoke("extensionCatalogOperations", { operationIds: [id] })).results[0];
|
|
298
|
+
if (!member || member.target !== id || member.index !== 0) throw new Error("Installation operation query returned an unexpected member");
|
|
299
|
+
if (!member.ok) throw new CatalogRequestError(member.error.code, `${member.error.code}: ${member.error.message}`, member.error.details?.retryAfterSeconds);
|
|
297
300
|
if (operationId !== id) return;
|
|
298
|
-
if (state.batch) requireBatchOperation(
|
|
299
|
-
const operation = retainSettledBatch(
|
|
301
|
+
if (state.batch) requireBatchOperation(member.value.operation, id);
|
|
302
|
+
const operation = retainSettledBatch(member.value.operation);
|
|
300
303
|
publish({ operation });
|
|
301
304
|
await observeBatchOperation(operation);
|
|
302
305
|
} while (entry.again && live && generation === epoch);
|
|
@@ -470,7 +473,7 @@ function createCatalogController(ctx, options = {}) {
|
|
|
470
473
|
preview: (selection) => action(async () => {
|
|
471
474
|
requireSettledOperation();
|
|
472
475
|
publish({ preview: null });
|
|
473
|
-
publish({ preview: await invoke("
|
|
476
|
+
publish({ preview: await invoke("extensionCatalogPreviewBatch", { selections: [selection] }) });
|
|
474
477
|
}),
|
|
475
478
|
cancelPreview: () => {
|
|
476
479
|
publish({ preview: null });
|
|
@@ -480,7 +483,7 @@ function createCatalogController(ctx, options = {}) {
|
|
|
480
483
|
requireSettledOperation();
|
|
481
484
|
const preview = state.preview;
|
|
482
485
|
if (!preview) return;
|
|
483
|
-
operationId =
|
|
486
|
+
operationId = ctx.uuid();
|
|
484
487
|
const id = operationId;
|
|
485
488
|
const generation = epoch;
|
|
486
489
|
publish({
|
|
@@ -560,7 +563,7 @@ function createCatalogController(ctx, options = {}) {
|
|
|
560
563
|
const batch = state.batch;
|
|
561
564
|
const preview = batch.entries[0]?.preview;
|
|
562
565
|
if (!preview) return;
|
|
563
|
-
operationId =
|
|
566
|
+
operationId = ctx.uuid();
|
|
564
567
|
const id = operationId;
|
|
565
568
|
const generation = epoch;
|
|
566
569
|
publish({
|