@trops/dash-core 0.1.93 → 0.1.96
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/electron/index.js +196 -163
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +1553 -254
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1552 -253
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -612,16 +612,16 @@ var dashboardConfigEvents$1 = {
|
|
|
612
612
|
* IPC event constants for dashboard ratings CRUD.
|
|
613
613
|
*/
|
|
614
614
|
|
|
615
|
-
const DASHBOARD_RATING_SAVE = "dashboard-rating-save";
|
|
616
|
-
const DASHBOARD_RATING_GET = "dashboard-rating-get";
|
|
617
|
-
const DASHBOARD_RATING_LIST = "dashboard-rating-list";
|
|
618
|
-
const DASHBOARD_RATING_DELETE = "dashboard-rating-delete";
|
|
615
|
+
const DASHBOARD_RATING_SAVE$1 = "dashboard-rating-save";
|
|
616
|
+
const DASHBOARD_RATING_GET$1 = "dashboard-rating-get";
|
|
617
|
+
const DASHBOARD_RATING_LIST$1 = "dashboard-rating-list";
|
|
618
|
+
const DASHBOARD_RATING_DELETE$1 = "dashboard-rating-delete";
|
|
619
619
|
|
|
620
620
|
var dashboardRatingsEvents$1 = {
|
|
621
|
-
DASHBOARD_RATING_SAVE,
|
|
622
|
-
DASHBOARD_RATING_GET,
|
|
623
|
-
DASHBOARD_RATING_LIST,
|
|
624
|
-
DASHBOARD_RATING_DELETE,
|
|
621
|
+
DASHBOARD_RATING_SAVE: DASHBOARD_RATING_SAVE$1,
|
|
622
|
+
DASHBOARD_RATING_GET: DASHBOARD_RATING_GET$1,
|
|
623
|
+
DASHBOARD_RATING_LIST: DASHBOARD_RATING_LIST$1,
|
|
624
|
+
DASHBOARD_RATING_DELETE: DASHBOARD_RATING_DELETE$1,
|
|
625
625
|
};
|
|
626
626
|
|
|
627
627
|
/**
|
|
@@ -10146,10 +10146,9 @@ async function exportDashboardConfig$1(
|
|
|
10146
10146
|
schemaVersion: CURRENT_SCHEMA_VERSION,
|
|
10147
10147
|
name: workspace.name || workspace.label || "Exported Dashboard",
|
|
10148
10148
|
description: options.description || "",
|
|
10149
|
-
|
|
10150
|
-
name: options.authorName || ""
|
|
10151
|
-
|
|
10152
|
-
},
|
|
10149
|
+
...(options.authorName
|
|
10150
|
+
? { author: { name: options.authorName, id: options.authorId || "" } }
|
|
10151
|
+
: {}),
|
|
10153
10152
|
shareable: true,
|
|
10154
10153
|
tags: options.tags || [],
|
|
10155
10154
|
icon: options.icon || "grip",
|
|
@@ -10700,10 +10699,9 @@ async function prepareDashboardForPublish$1(
|
|
|
10700
10699
|
schemaVersion: CURRENT_SCHEMA_VERSION,
|
|
10701
10700
|
name: workspace.name || workspace.label || "Dashboard",
|
|
10702
10701
|
description: options.description || "",
|
|
10703
|
-
|
|
10704
|
-
name: options.authorName || ""
|
|
10705
|
-
|
|
10706
|
-
},
|
|
10702
|
+
...(options.authorName
|
|
10703
|
+
? { author: { name: options.authorName, id: options.authorId || "" } }
|
|
10704
|
+
: {}),
|
|
10707
10705
|
shareable: true,
|
|
10708
10706
|
tags: options.tags || [],
|
|
10709
10707
|
icon: options.icon || "grip",
|
|
@@ -10730,29 +10728,26 @@ async function prepareDashboardForPublish$1(
|
|
|
10730
10728
|
};
|
|
10731
10729
|
}
|
|
10732
10730
|
|
|
10733
|
-
// 5.
|
|
10731
|
+
// 5. Check which widgets exist in the registry (soft warning, not blocking)
|
|
10734
10732
|
const { fetchRegistryIndex } = registryController$1;
|
|
10735
10733
|
let registryPackages = [];
|
|
10734
|
+
let registryCheckFailed = false;
|
|
10736
10735
|
try {
|
|
10737
10736
|
const index = await fetchRegistryIndex();
|
|
10738
10737
|
registryPackages = index.packages || [];
|
|
10739
10738
|
} catch (err) {
|
|
10740
|
-
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10739
|
+
console.warn(
|
|
10740
|
+
`[DashboardConfigController] Unable to verify registry: ${err.message}`,
|
|
10741
|
+
);
|
|
10742
|
+
registryCheckFailed = true;
|
|
10744
10743
|
}
|
|
10745
10744
|
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
.
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
return {
|
|
10753
|
-
success: false,
|
|
10754
|
-
error: `Required widgets not found in registry: ${missingFromRegistry.join(", ")}. Publish them first.`,
|
|
10755
|
-
};
|
|
10745
|
+
let missingFromRegistry = [];
|
|
10746
|
+
if (!registryCheckFailed) {
|
|
10747
|
+
const registryNames = new Set(registryPackages.map((p) => p.name));
|
|
10748
|
+
missingFromRegistry = widgets
|
|
10749
|
+
.filter((w) => w.required !== false && !registryNames.has(w.package))
|
|
10750
|
+
.map((w) => w.package);
|
|
10756
10751
|
}
|
|
10757
10752
|
|
|
10758
10753
|
// 6. Generate registry manifest
|
|
@@ -10795,6 +10790,8 @@ async function prepareDashboardForPublish$1(
|
|
|
10795
10790
|
filePath,
|
|
10796
10791
|
manifest,
|
|
10797
10792
|
config: dashboardConfig,
|
|
10793
|
+
warnings: missingFromRegistry.length > 0 ? missingFromRegistry : undefined,
|
|
10794
|
+
registryCheckFailed: registryCheckFailed || undefined,
|
|
10798
10795
|
};
|
|
10799
10796
|
} catch (error) {
|
|
10800
10797
|
console.error(
|
|
@@ -11252,7 +11249,7 @@ var controller = {
|
|
|
11252
11249
|
enrichPackagesWithRatings,
|
|
11253
11250
|
};
|
|
11254
11251
|
|
|
11255
|
-
const { ipcRenderer: ipcRenderer$
|
|
11252
|
+
const { ipcRenderer: ipcRenderer$j } = require$$0$1;
|
|
11256
11253
|
const {
|
|
11257
11254
|
SECURE_STORE_ENCRYPTION_CHECK,
|
|
11258
11255
|
SECURE_STORE_SET_DATA,
|
|
@@ -11264,10 +11261,10 @@ const {
|
|
|
11264
11261
|
*/
|
|
11265
11262
|
const secureStoreApi$2 = {
|
|
11266
11263
|
isEncryptionAvailable: () =>
|
|
11267
|
-
ipcRenderer$
|
|
11264
|
+
ipcRenderer$j.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
|
|
11268
11265
|
saveData: (key, value) =>
|
|
11269
|
-
ipcRenderer$
|
|
11270
|
-
getData: (key) => ipcRenderer$
|
|
11266
|
+
ipcRenderer$j.invoke(SECURE_STORE_SET_DATA, { key, value }),
|
|
11267
|
+
getData: (key) => ipcRenderer$j.invoke(SECURE_STORE_GET_DATA, { key }),
|
|
11271
11268
|
};
|
|
11272
11269
|
|
|
11273
11270
|
var secureStoreApi_1 = secureStoreApi$2;
|
|
@@ -11278,7 +11275,7 @@ var secureStoreApi_1 = secureStoreApi$2;
|
|
|
11278
11275
|
* Handle the workspace configuration file
|
|
11279
11276
|
*/
|
|
11280
11277
|
|
|
11281
|
-
const { ipcRenderer: ipcRenderer$
|
|
11278
|
+
const { ipcRenderer: ipcRenderer$i } = require$$0$1;
|
|
11282
11279
|
const {
|
|
11283
11280
|
WORKSPACE_LIST,
|
|
11284
11281
|
WORKSPACE_SAVE,
|
|
@@ -11295,7 +11292,7 @@ const workspaceApi$2 = {
|
|
|
11295
11292
|
*/
|
|
11296
11293
|
listWorkspacesForApplication: (appId) => {
|
|
11297
11294
|
console.log("listWorkspacesForApplication called with appId:", appId);
|
|
11298
|
-
return ipcRenderer$
|
|
11295
|
+
return ipcRenderer$i.invoke(WORKSPACE_LIST, { appId });
|
|
11299
11296
|
},
|
|
11300
11297
|
|
|
11301
11298
|
/**
|
|
@@ -11306,7 +11303,7 @@ const workspaceApi$2 = {
|
|
|
11306
11303
|
* @returns
|
|
11307
11304
|
*/
|
|
11308
11305
|
saveWorkspaceForApplication: (appId, data) =>
|
|
11309
|
-
ipcRenderer$
|
|
11306
|
+
ipcRenderer$i.invoke(WORKSPACE_SAVE, { appId, data }),
|
|
11310
11307
|
|
|
11311
11308
|
/**
|
|
11312
11309
|
* deleteWorkspaceForApplication
|
|
@@ -11316,7 +11313,7 @@ const workspaceApi$2 = {
|
|
|
11316
11313
|
* @returns
|
|
11317
11314
|
*/
|
|
11318
11315
|
deleteWorkspaceForApplication: (appId, workspaceId) =>
|
|
11319
|
-
ipcRenderer$
|
|
11316
|
+
ipcRenderer$i.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
|
|
11320
11317
|
};
|
|
11321
11318
|
|
|
11322
11319
|
var workspaceApi_1 = workspaceApi$2;
|
|
@@ -11328,15 +11325,15 @@ var workspaceApi_1 = workspaceApi$2;
|
|
|
11328
11325
|
*/
|
|
11329
11326
|
|
|
11330
11327
|
// ipcRenderer that must be used to invoke the events
|
|
11331
|
-
const { ipcRenderer: ipcRenderer$
|
|
11328
|
+
const { ipcRenderer: ipcRenderer$h } = require$$0$1;
|
|
11332
11329
|
|
|
11333
11330
|
const { LAYOUT_LIST, LAYOUT_SAVE } = events$8;
|
|
11334
11331
|
|
|
11335
11332
|
const layoutApi$2 = {
|
|
11336
11333
|
listLayoutsForApplication: (appId) =>
|
|
11337
|
-
ipcRenderer$
|
|
11334
|
+
ipcRenderer$h.invoke(LAYOUT_LIST, { appId }),
|
|
11338
11335
|
saveLayoutForApplication: (appId, data) =>
|
|
11339
|
-
ipcRenderer$
|
|
11336
|
+
ipcRenderer$h.invoke(LAYOUT_SAVE, { appId, data }),
|
|
11340
11337
|
};
|
|
11341
11338
|
|
|
11342
11339
|
var layoutApi_1 = layoutApi$2;
|
|
@@ -11348,7 +11345,7 @@ var layoutApi_1 = layoutApi$2;
|
|
|
11348
11345
|
*/
|
|
11349
11346
|
|
|
11350
11347
|
// ipcRenderer that must be used to invoke the events
|
|
11351
|
-
const { ipcRenderer: ipcRenderer$
|
|
11348
|
+
const { ipcRenderer: ipcRenderer$g } = require$$0$1;
|
|
11352
11349
|
|
|
11353
11350
|
const {
|
|
11354
11351
|
DATA_JSON_TO_CSV_FILE,
|
|
@@ -11367,7 +11364,7 @@ const {
|
|
|
11367
11364
|
const dataApi$2 = {
|
|
11368
11365
|
// convert a json array of objects to a csv string and save to file
|
|
11369
11366
|
convertJsonToCsvFile: (appId, jsonObject, filename) =>
|
|
11370
|
-
ipcRenderer$
|
|
11367
|
+
ipcRenderer$g.invoke(DATA_JSON_TO_CSV_FILE, {
|
|
11371
11368
|
appId,
|
|
11372
11369
|
jsonObject,
|
|
11373
11370
|
filename,
|
|
@@ -11375,10 +11372,10 @@ const dataApi$2 = {
|
|
|
11375
11372
|
|
|
11376
11373
|
// convert a json array of objects to a csv string and return a string
|
|
11377
11374
|
convertJsonToCsvString: (appId, jsonObject) =>
|
|
11378
|
-
ipcRenderer$
|
|
11375
|
+
ipcRenderer$g.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
|
|
11379
11376
|
|
|
11380
11377
|
parseXMLStream: (filepath, outpath, start) =>
|
|
11381
|
-
ipcRenderer$
|
|
11378
|
+
ipcRenderer$g.invoke(PARSE_XML_STREAM, {
|
|
11382
11379
|
filepath,
|
|
11383
11380
|
outpath,
|
|
11384
11381
|
start,
|
|
@@ -11392,7 +11389,7 @@ const dataApi$2 = {
|
|
|
11392
11389
|
headers = null,
|
|
11393
11390
|
limit = null,
|
|
11394
11391
|
) => {
|
|
11395
|
-
ipcRenderer$
|
|
11392
|
+
ipcRenderer$g.invoke(PARSE_CSV_STREAM, {
|
|
11396
11393
|
filepath,
|
|
11397
11394
|
outpath,
|
|
11398
11395
|
delimiter,
|
|
@@ -11403,15 +11400,15 @@ const dataApi$2 = {
|
|
|
11403
11400
|
},
|
|
11404
11401
|
|
|
11405
11402
|
readLinesFromFile: (filepath, lineCount) => {
|
|
11406
|
-
ipcRenderer$
|
|
11403
|
+
ipcRenderer$g.invoke(READ_LINES, { filepath, lineCount });
|
|
11407
11404
|
},
|
|
11408
11405
|
|
|
11409
11406
|
readJSONFromFile: (filepath, objectCount = null) => {
|
|
11410
|
-
ipcRenderer$
|
|
11407
|
+
ipcRenderer$g.invoke(READ_JSON, { filepath, objectCount });
|
|
11411
11408
|
},
|
|
11412
11409
|
|
|
11413
11410
|
readDataFromURL: (url, toFilepath) => {
|
|
11414
|
-
ipcRenderer$
|
|
11411
|
+
ipcRenderer$g.invoke(READ_DATA_URL, { url, toFilepath });
|
|
11415
11412
|
},
|
|
11416
11413
|
|
|
11417
11414
|
/*
|
|
@@ -11420,7 +11417,7 @@ const dataApi$2 = {
|
|
|
11420
11417
|
* @param {object} returnEmpty the return empty object
|
|
11421
11418
|
*/
|
|
11422
11419
|
saveData: (data, filename, append, returnEmpty, uuid) =>
|
|
11423
|
-
ipcRenderer$
|
|
11420
|
+
ipcRenderer$g.invoke(DATA_SAVE_TO_FILE, {
|
|
11424
11421
|
data,
|
|
11425
11422
|
filename,
|
|
11426
11423
|
append,
|
|
@@ -11432,14 +11429,14 @@ const dataApi$2 = {
|
|
|
11432
11429
|
* @param {string} filename the filename to read (not path)
|
|
11433
11430
|
*/
|
|
11434
11431
|
readData: (filename, returnEmpty = []) =>
|
|
11435
|
-
ipcRenderer$
|
|
11432
|
+
ipcRenderer$g.invoke(DATA_READ_FROM_FILE, { filename, returnEmpty }),
|
|
11436
11433
|
|
|
11437
11434
|
/**
|
|
11438
11435
|
* transformFile
|
|
11439
11436
|
* @returns
|
|
11440
11437
|
*/
|
|
11441
11438
|
transformFile: (filepath, outFilepath, mappingFunctionBody, args) => {
|
|
11442
|
-
ipcRenderer$
|
|
11439
|
+
ipcRenderer$g.invoke(TRANSFORM_FILE, {
|
|
11443
11440
|
filepath,
|
|
11444
11441
|
outFilepath,
|
|
11445
11442
|
mappingFunctionBody,
|
|
@@ -11448,7 +11445,7 @@ const dataApi$2 = {
|
|
|
11448
11445
|
},
|
|
11449
11446
|
|
|
11450
11447
|
extractColorsFromImageURL: (url) => {
|
|
11451
|
-
ipcRenderer$
|
|
11448
|
+
ipcRenderer$g.invoke(EXTRACT_COLORS_FROM_IMAGE, {
|
|
11452
11449
|
url,
|
|
11453
11450
|
});
|
|
11454
11451
|
},
|
|
@@ -11463,7 +11460,7 @@ var dataApi_1 = dataApi$2;
|
|
|
11463
11460
|
*/
|
|
11464
11461
|
|
|
11465
11462
|
// ipcRenderer that must be used to invoke the events
|
|
11466
|
-
const { ipcRenderer: ipcRenderer$
|
|
11463
|
+
const { ipcRenderer: ipcRenderer$f } = require$$0$1;
|
|
11467
11464
|
|
|
11468
11465
|
const {
|
|
11469
11466
|
SETTINGS_GET,
|
|
@@ -11474,14 +11471,14 @@ const {
|
|
|
11474
11471
|
} = events$8;
|
|
11475
11472
|
|
|
11476
11473
|
const settingsApi$2 = {
|
|
11477
|
-
getSettingsForApplication: () => ipcRenderer$
|
|
11474
|
+
getSettingsForApplication: () => ipcRenderer$f.invoke(SETTINGS_GET, {}),
|
|
11478
11475
|
saveSettingsForApplication: (data) =>
|
|
11479
|
-
ipcRenderer$
|
|
11480
|
-
getDataDirectory: () => ipcRenderer$
|
|
11476
|
+
ipcRenderer$f.invoke(SETTINGS_SAVE, { data }),
|
|
11477
|
+
getDataDirectory: () => ipcRenderer$f.invoke(SETTINGS_GET_DATA_DIR, {}),
|
|
11481
11478
|
setDataDirectory: (dataDirectory) =>
|
|
11482
|
-
ipcRenderer$
|
|
11479
|
+
ipcRenderer$f.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
|
|
11483
11480
|
migrateDataDirectory: (oldDirectory, newDirectory) =>
|
|
11484
|
-
ipcRenderer$
|
|
11481
|
+
ipcRenderer$f.invoke(SETTINGS_MIGRATE_DATA_DIR, {
|
|
11485
11482
|
oldDirectory,
|
|
11486
11483
|
newDirectory,
|
|
11487
11484
|
}),
|
|
@@ -11496,7 +11493,7 @@ var settingsApi_1 = settingsApi$2;
|
|
|
11496
11493
|
*/
|
|
11497
11494
|
|
|
11498
11495
|
// ipcRenderer that must be used to invoke the events
|
|
11499
|
-
const { ipcRenderer: ipcRenderer$
|
|
11496
|
+
const { ipcRenderer: ipcRenderer$e } = require$$0$1;
|
|
11500
11497
|
|
|
11501
11498
|
const { CHOOSE_FILE } = events$8;
|
|
11502
11499
|
|
|
@@ -11508,7 +11505,7 @@ const dialogApi$2 = {
|
|
|
11508
11505
|
*/
|
|
11509
11506
|
chooseFile: (allowFile = true, extensions = ["*"]) => {
|
|
11510
11507
|
console.log("dialog api choose file");
|
|
11511
|
-
return ipcRenderer$
|
|
11508
|
+
return ipcRenderer$e.invoke(CHOOSE_FILE, { allowFile, extensions });
|
|
11512
11509
|
},
|
|
11513
11510
|
};
|
|
11514
11511
|
|
|
@@ -11527,7 +11524,7 @@ var dialogApi_1 = dialogApi$2;
|
|
|
11527
11524
|
* mainApi.widgets.uninstall('Weather')
|
|
11528
11525
|
*/
|
|
11529
11526
|
|
|
11530
|
-
const { ipcRenderer: ipcRenderer$
|
|
11527
|
+
const { ipcRenderer: ipcRenderer$d } = require$$0$1;
|
|
11531
11528
|
|
|
11532
11529
|
const widgetApi$2 = {
|
|
11533
11530
|
/**
|
|
@@ -11536,7 +11533,7 @@ const widgetApi$2 = {
|
|
|
11536
11533
|
*/
|
|
11537
11534
|
list: async () => {
|
|
11538
11535
|
try {
|
|
11539
|
-
return await ipcRenderer$
|
|
11536
|
+
return await ipcRenderer$d.invoke("widget:list");
|
|
11540
11537
|
} catch (error) {
|
|
11541
11538
|
console.error("[WidgetApi] Error listing widgets:", error);
|
|
11542
11539
|
throw error;
|
|
@@ -11550,7 +11547,7 @@ const widgetApi$2 = {
|
|
|
11550
11547
|
*/
|
|
11551
11548
|
get: async (widgetName) => {
|
|
11552
11549
|
try {
|
|
11553
|
-
return await ipcRenderer$
|
|
11550
|
+
return await ipcRenderer$d.invoke("widget:get", widgetName);
|
|
11554
11551
|
} catch (error) {
|
|
11555
11552
|
console.error(`[WidgetApi] Error getting widget ${widgetName}:`, error);
|
|
11556
11553
|
throw error;
|
|
@@ -11581,7 +11578,7 @@ const widgetApi$2 = {
|
|
|
11581
11578
|
console.log(
|
|
11582
11579
|
`[WidgetApi] Installing widget: ${widgetName} from ${downloadUrl}`,
|
|
11583
11580
|
);
|
|
11584
|
-
const config = await ipcRenderer$
|
|
11581
|
+
const config = await ipcRenderer$d.invoke(
|
|
11585
11582
|
"widget:install",
|
|
11586
11583
|
widgetName,
|
|
11587
11584
|
downloadUrl,
|
|
@@ -11621,7 +11618,7 @@ const widgetApi$2 = {
|
|
|
11621
11618
|
console.log(
|
|
11622
11619
|
`[WidgetApi] Installing local widget: ${widgetName} from ${localPath}`,
|
|
11623
11620
|
);
|
|
11624
|
-
const config = await ipcRenderer$
|
|
11621
|
+
const config = await ipcRenderer$d.invoke(
|
|
11625
11622
|
"widget:install-local",
|
|
11626
11623
|
widgetName,
|
|
11627
11624
|
localPath,
|
|
@@ -11652,7 +11649,7 @@ const widgetApi$2 = {
|
|
|
11652
11649
|
loadFolder: async (folderPath) => {
|
|
11653
11650
|
try {
|
|
11654
11651
|
console.log(`[WidgetApi] Loading widgets from folder: ${folderPath}`);
|
|
11655
|
-
const results = await ipcRenderer$
|
|
11652
|
+
const results = await ipcRenderer$d.invoke(
|
|
11656
11653
|
"widget:load-folder",
|
|
11657
11654
|
folderPath,
|
|
11658
11655
|
);
|
|
@@ -11676,7 +11673,7 @@ const widgetApi$2 = {
|
|
|
11676
11673
|
uninstall: async (widgetName) => {
|
|
11677
11674
|
try {
|
|
11678
11675
|
console.log(`[WidgetApi] Uninstalling widget: ${widgetName}`);
|
|
11679
|
-
const success = await ipcRenderer$
|
|
11676
|
+
const success = await ipcRenderer$d.invoke("widget:uninstall", widgetName);
|
|
11680
11677
|
if (success) {
|
|
11681
11678
|
console.log(`[WidgetApi] ✓ Widget ${widgetName} uninstalled`);
|
|
11682
11679
|
} else {
|
|
@@ -11699,7 +11696,7 @@ const widgetApi$2 = {
|
|
|
11699
11696
|
*/
|
|
11700
11697
|
getCachePath: async () => {
|
|
11701
11698
|
try {
|
|
11702
|
-
return await ipcRenderer$
|
|
11699
|
+
return await ipcRenderer$d.invoke("widget:cache-path");
|
|
11703
11700
|
} catch (error) {
|
|
11704
11701
|
console.error("[WidgetApi] Error getting cache path:", error);
|
|
11705
11702
|
throw error;
|
|
@@ -11713,7 +11710,7 @@ const widgetApi$2 = {
|
|
|
11713
11710
|
*/
|
|
11714
11711
|
getStoragePath: async () => {
|
|
11715
11712
|
try {
|
|
11716
|
-
return await ipcRenderer$
|
|
11713
|
+
return await ipcRenderer$d.invoke("widget:storage-path");
|
|
11717
11714
|
} catch (error) {
|
|
11718
11715
|
console.error("[WidgetApi] Error getting storage path:", error);
|
|
11719
11716
|
throw error;
|
|
@@ -11730,7 +11727,7 @@ const widgetApi$2 = {
|
|
|
11730
11727
|
setStoragePath: async (customPath) => {
|
|
11731
11728
|
try {
|
|
11732
11729
|
console.log(`[WidgetApi] Setting storage path to: ${customPath}`);
|
|
11733
|
-
const result = await ipcRenderer$
|
|
11730
|
+
const result = await ipcRenderer$d.invoke(
|
|
11734
11731
|
"widget:set-storage-path",
|
|
11735
11732
|
customPath,
|
|
11736
11733
|
);
|
|
@@ -11752,7 +11749,7 @@ const widgetApi$2 = {
|
|
|
11752
11749
|
*/
|
|
11753
11750
|
getComponentConfigs: async () => {
|
|
11754
11751
|
try {
|
|
11755
|
-
return await ipcRenderer$
|
|
11752
|
+
return await ipcRenderer$d.invoke("widget:get-component-configs");
|
|
11756
11753
|
} catch (error) {
|
|
11757
11754
|
console.error("[WidgetApi] Error getting component configs:", error);
|
|
11758
11755
|
return [];
|
|
@@ -11767,7 +11764,7 @@ const widgetApi$2 = {
|
|
|
11767
11764
|
*/
|
|
11768
11765
|
readBundle: async (widgetName) => {
|
|
11769
11766
|
try {
|
|
11770
|
-
return await ipcRenderer$
|
|
11767
|
+
return await ipcRenderer$d.invoke("widget:read-bundle", widgetName);
|
|
11771
11768
|
} catch (error) {
|
|
11772
11769
|
console.error(
|
|
11773
11770
|
`[WidgetApi] Error reading bundle for ${widgetName}:`,
|
|
@@ -11784,7 +11781,7 @@ const widgetApi$2 = {
|
|
|
11784
11781
|
*/
|
|
11785
11782
|
readAllBundles: async () => {
|
|
11786
11783
|
try {
|
|
11787
|
-
return await ipcRenderer$
|
|
11784
|
+
return await ipcRenderer$d.invoke("widget:read-all-bundles");
|
|
11788
11785
|
} catch (error) {
|
|
11789
11786
|
console.error("[WidgetApi] Error reading all bundles:", error);
|
|
11790
11787
|
return [];
|
|
@@ -11804,7 +11801,7 @@ const widgetApi$2 = {
|
|
|
11804
11801
|
* });
|
|
11805
11802
|
*/
|
|
11806
11803
|
onInstalled: (callback) => {
|
|
11807
|
-
ipcRenderer$
|
|
11804
|
+
ipcRenderer$d.on("widget:installed", (event, data) => {
|
|
11808
11805
|
callback(data);
|
|
11809
11806
|
});
|
|
11810
11807
|
},
|
|
@@ -11822,7 +11819,7 @@ const widgetApi$2 = {
|
|
|
11822
11819
|
* });
|
|
11823
11820
|
*/
|
|
11824
11821
|
onLoaded: (callback) => {
|
|
11825
|
-
ipcRenderer$
|
|
11822
|
+
ipcRenderer$d.on("widgets:loaded", (event, data) => {
|
|
11826
11823
|
callback(data);
|
|
11827
11824
|
});
|
|
11828
11825
|
},
|
|
@@ -11833,7 +11830,7 @@ const widgetApi$2 = {
|
|
|
11833
11830
|
* @param {Function} callback - The callback to remove
|
|
11834
11831
|
*/
|
|
11835
11832
|
removeInstalledListener: (callback) => {
|
|
11836
|
-
ipcRenderer$
|
|
11833
|
+
ipcRenderer$d.removeListener("widget:installed", callback);
|
|
11837
11834
|
},
|
|
11838
11835
|
|
|
11839
11836
|
/**
|
|
@@ -11842,7 +11839,7 @@ const widgetApi$2 = {
|
|
|
11842
11839
|
* @param {Function} callback - The callback to remove
|
|
11843
11840
|
*/
|
|
11844
11841
|
removeLoadedListener: (callback) => {
|
|
11845
|
-
ipcRenderer$
|
|
11842
|
+
ipcRenderer$d.removeListener("widgets:loaded", callback);
|
|
11846
11843
|
},
|
|
11847
11844
|
};
|
|
11848
11845
|
|
|
@@ -11855,7 +11852,7 @@ var widgetApi_1 = widgetApi$2;
|
|
|
11855
11852
|
* Communicates with main process via IPC to handle encryption and file storage
|
|
11856
11853
|
*/
|
|
11857
11854
|
|
|
11858
|
-
const { ipcRenderer: ipcRenderer$
|
|
11855
|
+
const { ipcRenderer: ipcRenderer$c } = require$$0$1;
|
|
11859
11856
|
const {
|
|
11860
11857
|
PROVIDER_SAVE,
|
|
11861
11858
|
PROVIDER_LIST,
|
|
@@ -11887,7 +11884,7 @@ const providerApi$2 = {
|
|
|
11887
11884
|
mcpConfig = null,
|
|
11888
11885
|
allowedTools = null,
|
|
11889
11886
|
) =>
|
|
11890
|
-
ipcRenderer$
|
|
11887
|
+
ipcRenderer$c.invoke(PROVIDER_SAVE, {
|
|
11891
11888
|
appId,
|
|
11892
11889
|
providerName,
|
|
11893
11890
|
providerType,
|
|
@@ -11905,7 +11902,7 @@ const providerApi$2 = {
|
|
|
11905
11902
|
* @param {String} appId - the appId specified in the dash initialization
|
|
11906
11903
|
* @returns {Promise<Array>} Array of provider objects with name, type, credentials
|
|
11907
11904
|
*/
|
|
11908
|
-
listProviders: (appId) => ipcRenderer$
|
|
11905
|
+
listProviders: (appId) => ipcRenderer$c.invoke(PROVIDER_LIST, { appId }),
|
|
11909
11906
|
|
|
11910
11907
|
/**
|
|
11911
11908
|
* getProvider
|
|
@@ -11917,7 +11914,7 @@ const providerApi$2 = {
|
|
|
11917
11914
|
* @returns {Promise<Object>} Provider object with name, type, credentials
|
|
11918
11915
|
*/
|
|
11919
11916
|
getProvider: (appId, providerName) =>
|
|
11920
|
-
ipcRenderer$
|
|
11917
|
+
ipcRenderer$c.invoke(PROVIDER_GET, { appId, providerName }),
|
|
11921
11918
|
|
|
11922
11919
|
/**
|
|
11923
11920
|
* deleteProvider
|
|
@@ -11929,7 +11926,7 @@ const providerApi$2 = {
|
|
|
11929
11926
|
* @returns {Promise}
|
|
11930
11927
|
*/
|
|
11931
11928
|
deleteProvider: (appId, providerName) =>
|
|
11932
|
-
ipcRenderer$
|
|
11929
|
+
ipcRenderer$c.invoke(PROVIDER_DELETE, { appId, providerName }),
|
|
11933
11930
|
|
|
11934
11931
|
/**
|
|
11935
11932
|
* listProvidersForApplication
|
|
@@ -11939,14 +11936,14 @@ const providerApi$2 = {
|
|
|
11939
11936
|
* @param {String} appId - the appId specified in the dash initialization
|
|
11940
11937
|
*/
|
|
11941
11938
|
listProvidersForApplication: (appId) => {
|
|
11942
|
-
ipcRenderer$
|
|
11939
|
+
ipcRenderer$c
|
|
11943
11940
|
.invoke(PROVIDER_LIST, { appId })
|
|
11944
11941
|
.then((result) => {
|
|
11945
11942
|
// Emit the event for ElectronDashboardApi to listen to
|
|
11946
|
-
ipcRenderer$
|
|
11943
|
+
ipcRenderer$c.send("PROVIDER_LIST_COMPLETE", result);
|
|
11947
11944
|
})
|
|
11948
11945
|
.catch((error) => {
|
|
11949
|
-
ipcRenderer$
|
|
11946
|
+
ipcRenderer$c.send("PROVIDER_LIST_ERROR", {
|
|
11950
11947
|
error: error.message,
|
|
11951
11948
|
});
|
|
11952
11949
|
});
|
|
@@ -11963,7 +11960,7 @@ const providerApi$2 = {
|
|
|
11963
11960
|
providerType,
|
|
11964
11961
|
credentials,
|
|
11965
11962
|
) => {
|
|
11966
|
-
ipcRenderer$
|
|
11963
|
+
ipcRenderer$c
|
|
11967
11964
|
.invoke(PROVIDER_SAVE, {
|
|
11968
11965
|
appId,
|
|
11969
11966
|
providerName,
|
|
@@ -11971,10 +11968,10 @@ const providerApi$2 = {
|
|
|
11971
11968
|
credentials,
|
|
11972
11969
|
})
|
|
11973
11970
|
.then((result) => {
|
|
11974
|
-
ipcRenderer$
|
|
11971
|
+
ipcRenderer$c.send("PROVIDER_SAVE_COMPLETE", result);
|
|
11975
11972
|
})
|
|
11976
11973
|
.catch((error) => {
|
|
11977
|
-
ipcRenderer$
|
|
11974
|
+
ipcRenderer$c.send("PROVIDER_SAVE_ERROR", {
|
|
11978
11975
|
error: error.message,
|
|
11979
11976
|
});
|
|
11980
11977
|
});
|
|
@@ -11986,13 +11983,13 @@ const providerApi$2 = {
|
|
|
11986
11983
|
* Event-listener-based version for use with ElectronDashboardApi
|
|
11987
11984
|
*/
|
|
11988
11985
|
getProviderForApplication: (appId, providerName) => {
|
|
11989
|
-
ipcRenderer$
|
|
11986
|
+
ipcRenderer$c
|
|
11990
11987
|
.invoke(PROVIDER_GET, { appId, providerName })
|
|
11991
11988
|
.then((result) => {
|
|
11992
|
-
ipcRenderer$
|
|
11989
|
+
ipcRenderer$c.send("PROVIDER_GET_COMPLETE", result);
|
|
11993
11990
|
})
|
|
11994
11991
|
.catch((error) => {
|
|
11995
|
-
ipcRenderer$
|
|
11992
|
+
ipcRenderer$c.send("PROVIDER_GET_ERROR", {
|
|
11996
11993
|
error: error.message,
|
|
11997
11994
|
});
|
|
11998
11995
|
});
|
|
@@ -12004,13 +12001,13 @@ const providerApi$2 = {
|
|
|
12004
12001
|
* Event-listener-based version for use with ElectronDashboardApi
|
|
12005
12002
|
*/
|
|
12006
12003
|
deleteProviderForApplication: (appId, providerName) => {
|
|
12007
|
-
ipcRenderer$
|
|
12004
|
+
ipcRenderer$c
|
|
12008
12005
|
.invoke(PROVIDER_DELETE, { appId, providerName })
|
|
12009
12006
|
.then((result) => {
|
|
12010
|
-
ipcRenderer$
|
|
12007
|
+
ipcRenderer$c.send("PROVIDER_DELETE_COMPLETE", result);
|
|
12011
12008
|
})
|
|
12012
12009
|
.catch((error) => {
|
|
12013
|
-
ipcRenderer$
|
|
12010
|
+
ipcRenderer$c.send("PROVIDER_DELETE_ERROR", {
|
|
12014
12011
|
error: error.message,
|
|
12015
12012
|
});
|
|
12016
12013
|
});
|
|
@@ -12026,7 +12023,7 @@ var providerApi_1 = providerApi$2;
|
|
|
12026
12023
|
* Communicates with main process via IPC to manage MCP server lifecycle.
|
|
12027
12024
|
*/
|
|
12028
12025
|
|
|
12029
|
-
const { ipcRenderer: ipcRenderer$
|
|
12026
|
+
const { ipcRenderer: ipcRenderer$b } = require$$0$1;
|
|
12030
12027
|
const {
|
|
12031
12028
|
MCP_START_SERVER,
|
|
12032
12029
|
MCP_STOP_SERVER,
|
|
@@ -12050,7 +12047,7 @@ const mcpApi$2 = {
|
|
|
12050
12047
|
* @returns {Promise<{ success, serverName, tools, status } | { error, message }>}
|
|
12051
12048
|
*/
|
|
12052
12049
|
startServer: (serverName, mcpConfig, credentials) =>
|
|
12053
|
-
ipcRenderer$
|
|
12050
|
+
ipcRenderer$b.invoke(MCP_START_SERVER, {
|
|
12054
12051
|
serverName,
|
|
12055
12052
|
mcpConfig,
|
|
12056
12053
|
credentials,
|
|
@@ -12064,7 +12061,7 @@ const mcpApi$2 = {
|
|
|
12064
12061
|
* @returns {Promise<{ success, serverName } | { error, message }>}
|
|
12065
12062
|
*/
|
|
12066
12063
|
stopServer: (serverName) =>
|
|
12067
|
-
ipcRenderer$
|
|
12064
|
+
ipcRenderer$b.invoke(MCP_STOP_SERVER, { serverName }),
|
|
12068
12065
|
|
|
12069
12066
|
/**
|
|
12070
12067
|
* listTools
|
|
@@ -12073,7 +12070,7 @@ const mcpApi$2 = {
|
|
|
12073
12070
|
* @param {string} serverName the server name
|
|
12074
12071
|
* @returns {Promise<{ tools } | { error, message }>}
|
|
12075
12072
|
*/
|
|
12076
|
-
listTools: (serverName) => ipcRenderer$
|
|
12073
|
+
listTools: (serverName) => ipcRenderer$b.invoke(MCP_LIST_TOOLS, { serverName }),
|
|
12077
12074
|
|
|
12078
12075
|
/**
|
|
12079
12076
|
* callTool
|
|
@@ -12086,7 +12083,7 @@ const mcpApi$2 = {
|
|
|
12086
12083
|
* @returns {Promise<{ result } | { error, message }>}
|
|
12087
12084
|
*/
|
|
12088
12085
|
callTool: (serverName, toolName, args, allowedTools = null) =>
|
|
12089
|
-
ipcRenderer$
|
|
12086
|
+
ipcRenderer$b.invoke(MCP_CALL_TOOL, {
|
|
12090
12087
|
serverName,
|
|
12091
12088
|
toolName,
|
|
12092
12089
|
args,
|
|
@@ -12101,7 +12098,7 @@ const mcpApi$2 = {
|
|
|
12101
12098
|
* @returns {Promise<{ resources } | { error, message }>}
|
|
12102
12099
|
*/
|
|
12103
12100
|
listResources: (serverName) =>
|
|
12104
|
-
ipcRenderer$
|
|
12101
|
+
ipcRenderer$b.invoke(MCP_LIST_RESOURCES, { serverName }),
|
|
12105
12102
|
|
|
12106
12103
|
/**
|
|
12107
12104
|
* readResource
|
|
@@ -12112,7 +12109,7 @@ const mcpApi$2 = {
|
|
|
12112
12109
|
* @returns {Promise<{ resource } | { error, message }>}
|
|
12113
12110
|
*/
|
|
12114
12111
|
readResource: (serverName, uri) =>
|
|
12115
|
-
ipcRenderer$
|
|
12112
|
+
ipcRenderer$b.invoke(MCP_READ_RESOURCE, { serverName, uri }),
|
|
12116
12113
|
|
|
12117
12114
|
/**
|
|
12118
12115
|
* getServerStatus
|
|
@@ -12122,7 +12119,7 @@ const mcpApi$2 = {
|
|
|
12122
12119
|
* @returns {Promise<{ status, tools, error }>}
|
|
12123
12120
|
*/
|
|
12124
12121
|
getServerStatus: (serverName) =>
|
|
12125
|
-
ipcRenderer$
|
|
12122
|
+
ipcRenderer$b.invoke(MCP_SERVER_STATUS, { serverName }),
|
|
12126
12123
|
|
|
12127
12124
|
/**
|
|
12128
12125
|
* getCatalog
|
|
@@ -12130,7 +12127,7 @@ const mcpApi$2 = {
|
|
|
12130
12127
|
*
|
|
12131
12128
|
* @returns {Promise<{ catalog } | { error, message }>}
|
|
12132
12129
|
*/
|
|
12133
|
-
getCatalog: () => ipcRenderer$
|
|
12130
|
+
getCatalog: () => ipcRenderer$b.invoke(MCP_GET_CATALOG),
|
|
12134
12131
|
|
|
12135
12132
|
/**
|
|
12136
12133
|
* runAuth
|
|
@@ -12142,7 +12139,7 @@ const mcpApi$2 = {
|
|
|
12142
12139
|
* @returns {Promise<{ success } | { error, message }>}
|
|
12143
12140
|
*/
|
|
12144
12141
|
runAuth: (mcpConfig, credentials, authCommand) =>
|
|
12145
|
-
ipcRenderer$
|
|
12142
|
+
ipcRenderer$b.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
|
|
12146
12143
|
};
|
|
12147
12144
|
|
|
12148
12145
|
var mcpApi_1 = mcpApi$2;
|
|
@@ -12160,7 +12157,7 @@ var mcpApi_1 = mcpApi$2;
|
|
|
12160
12157
|
* mainApi.registry.checkUpdates([{ name: "weather-widgets", version: "1.0.0" }])
|
|
12161
12158
|
*/
|
|
12162
12159
|
|
|
12163
|
-
const { ipcRenderer: ipcRenderer$
|
|
12160
|
+
const { ipcRenderer: ipcRenderer$a } = require$$0$1;
|
|
12164
12161
|
|
|
12165
12162
|
const registryApi$2 = {
|
|
12166
12163
|
/**
|
|
@@ -12170,7 +12167,7 @@ const registryApi$2 = {
|
|
|
12170
12167
|
*/
|
|
12171
12168
|
fetchIndex: async (forceRefresh = false) => {
|
|
12172
12169
|
try {
|
|
12173
|
-
return await ipcRenderer$
|
|
12170
|
+
return await ipcRenderer$a.invoke("registry:fetch-index", forceRefresh);
|
|
12174
12171
|
} catch (error) {
|
|
12175
12172
|
console.error("[RegistryApi] Error fetching index:", error);
|
|
12176
12173
|
throw error;
|
|
@@ -12185,7 +12182,7 @@ const registryApi$2 = {
|
|
|
12185
12182
|
*/
|
|
12186
12183
|
search: async (query = "", filters = {}) => {
|
|
12187
12184
|
try {
|
|
12188
|
-
return await ipcRenderer$
|
|
12185
|
+
return await ipcRenderer$a.invoke("registry:search", query, filters);
|
|
12189
12186
|
} catch (error) {
|
|
12190
12187
|
console.error("[RegistryApi] Error searching registry:", error);
|
|
12191
12188
|
throw error;
|
|
@@ -12199,7 +12196,7 @@ const registryApi$2 = {
|
|
|
12199
12196
|
*/
|
|
12200
12197
|
getPackage: async (packageName) => {
|
|
12201
12198
|
try {
|
|
12202
|
-
return await ipcRenderer$
|
|
12199
|
+
return await ipcRenderer$a.invoke("registry:get-package", packageName);
|
|
12203
12200
|
} catch (error) {
|
|
12204
12201
|
console.error(
|
|
12205
12202
|
`[RegistryApi] Error getting package ${packageName}:`,
|
|
@@ -12216,7 +12213,7 @@ const registryApi$2 = {
|
|
|
12216
12213
|
*/
|
|
12217
12214
|
checkUpdates: async (installedWidgets = []) => {
|
|
12218
12215
|
try {
|
|
12219
|
-
return await ipcRenderer$
|
|
12216
|
+
return await ipcRenderer$a.invoke(
|
|
12220
12217
|
"registry:check-updates",
|
|
12221
12218
|
installedWidgets,
|
|
12222
12219
|
);
|
|
@@ -12234,7 +12231,7 @@ const registryApi$2 = {
|
|
|
12234
12231
|
*/
|
|
12235
12232
|
searchDashboards: async (query = "", filters = {}) => {
|
|
12236
12233
|
try {
|
|
12237
|
-
return await ipcRenderer$
|
|
12234
|
+
return await ipcRenderer$a.invoke(
|
|
12238
12235
|
"registry:search-dashboards",
|
|
12239
12236
|
query,
|
|
12240
12237
|
filters,
|
|
@@ -12254,17 +12251,17 @@ var registryApi_1 = registryApi$2;
|
|
|
12254
12251
|
* Handle the theme configuration file
|
|
12255
12252
|
*/
|
|
12256
12253
|
|
|
12257
|
-
const { ipcRenderer: ipcRenderer$
|
|
12254
|
+
const { ipcRenderer: ipcRenderer$9 } = require$$0$1;
|
|
12258
12255
|
|
|
12259
12256
|
const { THEME_LIST, THEME_SAVE, THEME_DELETE } = events$8;
|
|
12260
12257
|
|
|
12261
12258
|
const themeApi$2 = {
|
|
12262
12259
|
listThemesForApplication: (appId) =>
|
|
12263
|
-
ipcRenderer$
|
|
12260
|
+
ipcRenderer$9.invoke(THEME_LIST, { appId }),
|
|
12264
12261
|
saveThemeForApplication: (appId, themeName, themeObject) =>
|
|
12265
|
-
ipcRenderer$
|
|
12262
|
+
ipcRenderer$9.invoke(THEME_SAVE, { appId, themeName, themeObject }),
|
|
12266
12263
|
deleteThemeForApplication: (appId, themeKey) =>
|
|
12267
|
-
ipcRenderer$
|
|
12264
|
+
ipcRenderer$9.invoke(THEME_DELETE, { appId, themeKey }),
|
|
12268
12265
|
};
|
|
12269
12266
|
|
|
12270
12267
|
var themeApi_1 = themeApi$2;
|
|
@@ -12276,7 +12273,7 @@ var themeApi_1 = themeApi$2;
|
|
|
12276
12273
|
*/
|
|
12277
12274
|
|
|
12278
12275
|
// ipcRenderer that must be used to invoke the events
|
|
12279
|
-
const { ipcRenderer: ipcRenderer$
|
|
12276
|
+
const { ipcRenderer: ipcRenderer$8 } = require$$0$1;
|
|
12280
12277
|
|
|
12281
12278
|
const {
|
|
12282
12279
|
ALGOLIA_LIST_INDICES,
|
|
@@ -12290,10 +12287,10 @@ const {
|
|
|
12290
12287
|
|
|
12291
12288
|
const algoliaApi$2 = {
|
|
12292
12289
|
listIndices: (application) =>
|
|
12293
|
-
ipcRenderer$
|
|
12290
|
+
ipcRenderer$8.invoke(ALGOLIA_LIST_INDICES, application),
|
|
12294
12291
|
|
|
12295
12292
|
browseObjects: (appId, apiKey, indexName) => {
|
|
12296
|
-
ipcRenderer$
|
|
12293
|
+
ipcRenderer$8.invoke(ALGOLIA_BROWSE_OBJECTS, {
|
|
12297
12294
|
appId,
|
|
12298
12295
|
apiKey,
|
|
12299
12296
|
indexName,
|
|
@@ -12301,10 +12298,10 @@ const algoliaApi$2 = {
|
|
|
12301
12298
|
});
|
|
12302
12299
|
},
|
|
12303
12300
|
|
|
12304
|
-
saveSynonyms: () => ipcRenderer$
|
|
12301
|
+
saveSynonyms: () => ipcRenderer$8.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
|
|
12305
12302
|
|
|
12306
12303
|
getAnalyticsForQuery: (application, indexName, query) =>
|
|
12307
|
-
ipcRenderer$
|
|
12304
|
+
ipcRenderer$8.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
|
|
12308
12305
|
application,
|
|
12309
12306
|
indexName,
|
|
12310
12307
|
query,
|
|
@@ -12317,7 +12314,7 @@ const algoliaApi$2 = {
|
|
|
12317
12314
|
dir,
|
|
12318
12315
|
createIfNotExists = false,
|
|
12319
12316
|
) =>
|
|
12320
|
-
ipcRenderer$
|
|
12317
|
+
ipcRenderer$8.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
|
|
12321
12318
|
appId,
|
|
12322
12319
|
apiKey,
|
|
12323
12320
|
indexName,
|
|
@@ -12326,7 +12323,7 @@ const algoliaApi$2 = {
|
|
|
12326
12323
|
}),
|
|
12327
12324
|
|
|
12328
12325
|
createBatchesFromFile: (filepath, batchFilepath, batchSize) => {
|
|
12329
|
-
ipcRenderer$
|
|
12326
|
+
ipcRenderer$8.invoke(ALGOLIA_CREATE_BATCH, {
|
|
12330
12327
|
filepath,
|
|
12331
12328
|
batchFilepath,
|
|
12332
12329
|
batchSize,
|
|
@@ -12334,7 +12331,7 @@ const algoliaApi$2 = {
|
|
|
12334
12331
|
},
|
|
12335
12332
|
|
|
12336
12333
|
browseObjectsToFile: (appId, apiKey, indexName, toFilename, query = "") => {
|
|
12337
|
-
ipcRenderer$
|
|
12334
|
+
ipcRenderer$8.invoke(ALGOLIA_BROWSE_OBJECTS, {
|
|
12338
12335
|
appId,
|
|
12339
12336
|
apiKey,
|
|
12340
12337
|
indexName,
|
|
@@ -12344,7 +12341,7 @@ const algoliaApi$2 = {
|
|
|
12344
12341
|
},
|
|
12345
12342
|
|
|
12346
12343
|
search: (appId, apiKey, indexName, query = "", options = {}) =>
|
|
12347
|
-
ipcRenderer$
|
|
12344
|
+
ipcRenderer$8.invoke(ALGOLIA_SEARCH, {
|
|
12348
12345
|
appId,
|
|
12349
12346
|
apiKey,
|
|
12350
12347
|
indexName,
|
|
@@ -12359,14 +12356,14 @@ var algoliaApi_1 = algoliaApi$2;
|
|
|
12359
12356
|
* openAI
|
|
12360
12357
|
*/
|
|
12361
12358
|
|
|
12362
|
-
const { ipcRenderer: ipcRenderer$
|
|
12359
|
+
const { ipcRenderer: ipcRenderer$7 } = require$$0$1;
|
|
12363
12360
|
|
|
12364
12361
|
const { OPENAI_DESCRIBE_IMAGE } = openaiEvents$1;
|
|
12365
12362
|
|
|
12366
12363
|
const openaiApi$2 = {
|
|
12367
12364
|
// convert a json array of objects to a csv string and save to file
|
|
12368
12365
|
describeImage: (imageUrl, apiKey, prompt = "What's in this image?") =>
|
|
12369
|
-
ipcRenderer$
|
|
12366
|
+
ipcRenderer$7.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
|
|
12370
12367
|
};
|
|
12371
12368
|
|
|
12372
12369
|
var openaiApi_1 = openaiApi$2;
|
|
@@ -12377,14 +12374,14 @@ var openaiApi_1 = openaiApi$2;
|
|
|
12377
12374
|
*/
|
|
12378
12375
|
|
|
12379
12376
|
// ipcRenderer that must be used to invoke the events
|
|
12380
|
-
const { ipcRenderer: ipcRenderer$
|
|
12377
|
+
const { ipcRenderer: ipcRenderer$6 } = require$$0$1;
|
|
12381
12378
|
|
|
12382
12379
|
const { MENU_ITEMS_SAVE, MENU_ITEMS_LIST } = events$8;
|
|
12383
12380
|
|
|
12384
12381
|
const menuItemsApi$2 = {
|
|
12385
12382
|
saveMenuItem: (appId, menuItem) =>
|
|
12386
|
-
ipcRenderer$
|
|
12387
|
-
listMenuItems: (appId) => ipcRenderer$
|
|
12383
|
+
ipcRenderer$6.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
|
|
12384
|
+
listMenuItems: (appId) => ipcRenderer$6.invoke(MENU_ITEMS_LIST, { appId }),
|
|
12388
12385
|
};
|
|
12389
12386
|
|
|
12390
12387
|
var menuItemsApi_1 = menuItemsApi$2;
|
|
@@ -12396,12 +12393,12 @@ var menuItemsApi_1 = menuItemsApi$2;
|
|
|
12396
12393
|
*/
|
|
12397
12394
|
|
|
12398
12395
|
// ipcRenderer that must be used to invoke the events
|
|
12399
|
-
const { ipcRenderer: ipcRenderer$
|
|
12396
|
+
const { ipcRenderer: ipcRenderer$5 } = require$$0$1;
|
|
12400
12397
|
|
|
12401
12398
|
const pluginApi$2 = {
|
|
12402
12399
|
install: (packageName, filepath) =>
|
|
12403
|
-
ipcRenderer$
|
|
12404
|
-
uninstall: (filepath) => ipcRenderer$
|
|
12400
|
+
ipcRenderer$5.invoke("plugin-install", { packageName, filepath }),
|
|
12401
|
+
uninstall: (filepath) => ipcRenderer$5.invoke("plugin-uninstall", filepath),
|
|
12405
12402
|
};
|
|
12406
12403
|
|
|
12407
12404
|
var pluginApi_1 = pluginApi$2;
|
|
@@ -12414,7 +12411,7 @@ var pluginApi_1 = pluginApi$2;
|
|
|
12414
12411
|
* tool-use events, and request cancellation.
|
|
12415
12412
|
*/
|
|
12416
12413
|
|
|
12417
|
-
const { ipcRenderer: ipcRenderer$
|
|
12414
|
+
const { ipcRenderer: ipcRenderer$4 } = require$$0$1;
|
|
12418
12415
|
const {
|
|
12419
12416
|
LLM_SEND_MESSAGE,
|
|
12420
12417
|
LLM_ABORT_REQUEST,
|
|
@@ -12436,7 +12433,7 @@ const _listenerMap = new Map();
|
|
|
12436
12433
|
function _addListener(channel, callback) {
|
|
12437
12434
|
const id = String(++_nextListenerId);
|
|
12438
12435
|
const wrapped = (_event, data) => callback(data);
|
|
12439
|
-
ipcRenderer$
|
|
12436
|
+
ipcRenderer$4.on(channel, wrapped);
|
|
12440
12437
|
_listenerMap.set(id, { channel, wrapped });
|
|
12441
12438
|
return id;
|
|
12442
12439
|
}
|
|
@@ -12451,7 +12448,7 @@ const llmApi$2 = {
|
|
|
12451
12448
|
* @returns {Promise<void>}
|
|
12452
12449
|
*/
|
|
12453
12450
|
sendMessage: (requestId, params) =>
|
|
12454
|
-
ipcRenderer$
|
|
12451
|
+
ipcRenderer$4.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
|
|
12455
12452
|
|
|
12456
12453
|
/**
|
|
12457
12454
|
* abortRequest
|
|
@@ -12461,7 +12458,7 @@ const llmApi$2 = {
|
|
|
12461
12458
|
* @returns {Promise<{ success: boolean }>}
|
|
12462
12459
|
*/
|
|
12463
12460
|
abortRequest: (requestId) =>
|
|
12464
|
-
ipcRenderer$
|
|
12461
|
+
ipcRenderer$4.invoke(LLM_ABORT_REQUEST, { requestId }),
|
|
12465
12462
|
|
|
12466
12463
|
/**
|
|
12467
12464
|
* listConnectedTools
|
|
@@ -12469,7 +12466,7 @@ const llmApi$2 = {
|
|
|
12469
12466
|
*
|
|
12470
12467
|
* @returns {Promise<Array<{ serverName, tools, resources, status }>>}
|
|
12471
12468
|
*/
|
|
12472
|
-
listConnectedTools: () => ipcRenderer$
|
|
12469
|
+
listConnectedTools: () => ipcRenderer$4.invoke(LLM_LIST_CONNECTED_TOOLS),
|
|
12473
12470
|
|
|
12474
12471
|
/**
|
|
12475
12472
|
* checkCliAvailable
|
|
@@ -12477,7 +12474,7 @@ const llmApi$2 = {
|
|
|
12477
12474
|
*
|
|
12478
12475
|
* @returns {Promise<{ available: boolean, path?: string }>}
|
|
12479
12476
|
*/
|
|
12480
|
-
checkCliAvailable: () => ipcRenderer$
|
|
12477
|
+
checkCliAvailable: () => ipcRenderer$4.invoke(LLM_CHECK_CLI_AVAILABLE),
|
|
12481
12478
|
|
|
12482
12479
|
/**
|
|
12483
12480
|
* clearCliSession
|
|
@@ -12487,7 +12484,7 @@ const llmApi$2 = {
|
|
|
12487
12484
|
* @returns {Promise<{ success: boolean }>}
|
|
12488
12485
|
*/
|
|
12489
12486
|
clearCliSession: (widgetUuid) =>
|
|
12490
|
-
ipcRenderer$
|
|
12487
|
+
ipcRenderer$4.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
|
|
12491
12488
|
|
|
12492
12489
|
/**
|
|
12493
12490
|
* getCliSessionStatus
|
|
@@ -12497,7 +12494,7 @@ const llmApi$2 = {
|
|
|
12497
12494
|
* @returns {Promise<{ hasSession: boolean, sessionId?: string, isProcessActive: boolean }>}
|
|
12498
12495
|
*/
|
|
12499
12496
|
getCliSessionStatus: (widgetUuid) =>
|
|
12500
|
-
ipcRenderer$
|
|
12497
|
+
ipcRenderer$4.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
|
|
12501
12498
|
|
|
12502
12499
|
/**
|
|
12503
12500
|
* endCliSession
|
|
@@ -12507,7 +12504,7 @@ const llmApi$2 = {
|
|
|
12507
12504
|
* @returns {Promise<{ success: boolean }>}
|
|
12508
12505
|
*/
|
|
12509
12506
|
endCliSession: (widgetUuid) =>
|
|
12510
|
-
ipcRenderer$
|
|
12507
|
+
ipcRenderer$4.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
|
|
12511
12508
|
|
|
12512
12509
|
// --- Stream event listeners ---
|
|
12513
12510
|
// Each on* method returns an opaque string ID. Strings cross the
|
|
@@ -12541,7 +12538,7 @@ const llmApi$2 = {
|
|
|
12541
12538
|
const listenerId = id !== undefined ? String(id) : String(idOrChannel);
|
|
12542
12539
|
const entry = _listenerMap.get(listenerId);
|
|
12543
12540
|
if (entry) {
|
|
12544
|
-
ipcRenderer$
|
|
12541
|
+
ipcRenderer$4.removeListener(entry.channel, entry.wrapped);
|
|
12545
12542
|
_listenerMap.delete(listenerId);
|
|
12546
12543
|
}
|
|
12547
12544
|
},
|
|
@@ -12553,14 +12550,14 @@ const llmApi$2 = {
|
|
|
12553
12550
|
*/
|
|
12554
12551
|
removeAllStreamListeners: () => {
|
|
12555
12552
|
for (const [, entry] of _listenerMap) {
|
|
12556
|
-
ipcRenderer$
|
|
12553
|
+
ipcRenderer$4.removeListener(entry.channel, entry.wrapped);
|
|
12557
12554
|
}
|
|
12558
12555
|
_listenerMap.clear();
|
|
12559
|
-
ipcRenderer$
|
|
12560
|
-
ipcRenderer$
|
|
12561
|
-
ipcRenderer$
|
|
12562
|
-
ipcRenderer$
|
|
12563
|
-
ipcRenderer$
|
|
12556
|
+
ipcRenderer$4.removeAllListeners(LLM_STREAM_DELTA);
|
|
12557
|
+
ipcRenderer$4.removeAllListeners(LLM_STREAM_TOOL_CALL);
|
|
12558
|
+
ipcRenderer$4.removeAllListeners(LLM_STREAM_TOOL_RESULT);
|
|
12559
|
+
ipcRenderer$4.removeAllListeners(LLM_STREAM_COMPLETE);
|
|
12560
|
+
ipcRenderer$4.removeAllListeners(LLM_STREAM_ERROR);
|
|
12564
12561
|
},
|
|
12565
12562
|
};
|
|
12566
12563
|
|
|
@@ -12574,7 +12571,7 @@ var llmApi_1 = llmApi$2;
|
|
|
12574
12571
|
* and manage the response cache.
|
|
12575
12572
|
*/
|
|
12576
12573
|
|
|
12577
|
-
const { ipcRenderer: ipcRenderer$
|
|
12574
|
+
const { ipcRenderer: ipcRenderer$3 } = require$$0$1;
|
|
12578
12575
|
const {
|
|
12579
12576
|
CLIENT_CACHE_INVALIDATE,
|
|
12580
12577
|
CLIENT_CACHE_INVALIDATE_ALL,
|
|
@@ -12591,28 +12588,28 @@ const clientCacheApi$2 = {
|
|
|
12591
12588
|
* @returns {Promise<{success: boolean}>}
|
|
12592
12589
|
*/
|
|
12593
12590
|
invalidate: (appId, providerName) =>
|
|
12594
|
-
ipcRenderer$
|
|
12591
|
+
ipcRenderer$3.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
|
|
12595
12592
|
|
|
12596
12593
|
/**
|
|
12597
12594
|
* Invalidate all cached clients.
|
|
12598
12595
|
*
|
|
12599
12596
|
* @returns {Promise<{success: boolean}>}
|
|
12600
12597
|
*/
|
|
12601
|
-
invalidateAll: () => ipcRenderer$
|
|
12598
|
+
invalidateAll: () => ipcRenderer$3.invoke(CLIENT_CACHE_INVALIDATE_ALL),
|
|
12602
12599
|
|
|
12603
12600
|
/**
|
|
12604
12601
|
* Clear the response cache.
|
|
12605
12602
|
*
|
|
12606
12603
|
* @returns {Promise<{success: boolean}>}
|
|
12607
12604
|
*/
|
|
12608
|
-
clearResponseCache: () => ipcRenderer$
|
|
12605
|
+
clearResponseCache: () => ipcRenderer$3.invoke(RESPONSE_CACHE_CLEAR),
|
|
12609
12606
|
|
|
12610
12607
|
/**
|
|
12611
12608
|
* Get response cache statistics.
|
|
12612
12609
|
*
|
|
12613
12610
|
* @returns {Promise<{entries: number, inflight: number, keys: string[]}>}
|
|
12614
12611
|
*/
|
|
12615
|
-
responseCacheStats: () => ipcRenderer$
|
|
12612
|
+
responseCacheStats: () => ipcRenderer$3.invoke(RESPONSE_CACHE_STATS),
|
|
12616
12613
|
};
|
|
12617
12614
|
|
|
12618
12615
|
var clientCacheApi_1 = clientCacheApi$2;
|
|
@@ -12624,7 +12621,7 @@ var clientCacheApi_1 = clientCacheApi$2;
|
|
|
12624
12621
|
* Exposed via contextBridge through mainApi.
|
|
12625
12622
|
*/
|
|
12626
12623
|
|
|
12627
|
-
const { ipcRenderer: ipcRenderer$
|
|
12624
|
+
const { ipcRenderer: ipcRenderer$2 } = require$$0$1;
|
|
12628
12625
|
const {
|
|
12629
12626
|
DASHBOARD_CONFIG_EXPORT,
|
|
12630
12627
|
DASHBOARD_CONFIG_IMPORT,
|
|
@@ -12646,7 +12643,7 @@ const dashboardConfigApi$2 = {
|
|
|
12646
12643
|
* @returns {Promise<Object>} Result with success, filePath, and config
|
|
12647
12644
|
*/
|
|
12648
12645
|
exportDashboardConfig: (appId, workspaceId, options = {}) =>
|
|
12649
|
-
ipcRenderer$
|
|
12646
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_EXPORT, {
|
|
12650
12647
|
appId,
|
|
12651
12648
|
workspaceId,
|
|
12652
12649
|
options,
|
|
@@ -12661,7 +12658,7 @@ const dashboardConfigApi$2 = {
|
|
|
12661
12658
|
* @returns {Promise<Object>} Result with success, workspace, and summary
|
|
12662
12659
|
*/
|
|
12663
12660
|
importDashboardConfig: (appId) =>
|
|
12664
|
-
ipcRenderer$
|
|
12661
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_IMPORT, { appId }),
|
|
12665
12662
|
|
|
12666
12663
|
/**
|
|
12667
12664
|
* Install a dashboard from the registry by package name.
|
|
@@ -12673,7 +12670,7 @@ const dashboardConfigApi$2 = {
|
|
|
12673
12670
|
* @returns {Promise<Object>} Result with success, workspace, and summary
|
|
12674
12671
|
*/
|
|
12675
12672
|
installDashboardFromRegistry: (appId, packageName) =>
|
|
12676
|
-
ipcRenderer$
|
|
12673
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_INSTALL, {
|
|
12677
12674
|
appId,
|
|
12678
12675
|
packageName,
|
|
12679
12676
|
}),
|
|
@@ -12686,7 +12683,7 @@ const dashboardConfigApi$2 = {
|
|
|
12686
12683
|
* @returns {Promise<Object>} Compatibility report with per-widget status
|
|
12687
12684
|
*/
|
|
12688
12685
|
checkDashboardCompatibility: (appId, dashboardWidgets) =>
|
|
12689
|
-
ipcRenderer$
|
|
12686
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_COMPATIBILITY, {
|
|
12690
12687
|
appId,
|
|
12691
12688
|
dashboardWidgets,
|
|
12692
12689
|
}),
|
|
@@ -12702,7 +12699,7 @@ const dashboardConfigApi$2 = {
|
|
|
12702
12699
|
* @returns {Promise<Object>} Result with success, manifest, filePath
|
|
12703
12700
|
*/
|
|
12704
12701
|
prepareDashboardForPublish: (appId, workspaceId, options = {}) =>
|
|
12705
|
-
ipcRenderer$
|
|
12702
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_PUBLISH, {
|
|
12706
12703
|
appId,
|
|
12707
12704
|
workspaceId,
|
|
12708
12705
|
options,
|
|
@@ -12716,7 +12713,7 @@ const dashboardConfigApi$2 = {
|
|
|
12716
12713
|
* @returns {Promise<Object>} Preview with metadata, widgets, wiring, compatibility
|
|
12717
12714
|
*/
|
|
12718
12715
|
getDashboardPreview: (packageName) =>
|
|
12719
|
-
ipcRenderer$
|
|
12716
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_PREVIEW, { packageName }),
|
|
12720
12717
|
|
|
12721
12718
|
/**
|
|
12722
12719
|
* Check installed dashboards for available updates.
|
|
@@ -12725,7 +12722,7 @@ const dashboardConfigApi$2 = {
|
|
|
12725
12722
|
* @returns {Promise<Object>} Result with updates array
|
|
12726
12723
|
*/
|
|
12727
12724
|
checkDashboardUpdates: (appId) =>
|
|
12728
|
-
ipcRenderer$
|
|
12725
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_CHECK_UPDATES, { appId }),
|
|
12729
12726
|
|
|
12730
12727
|
/**
|
|
12731
12728
|
* Get provider setup manifest for a dashboard's requirements.
|
|
@@ -12735,7 +12732,7 @@ const dashboardConfigApi$2 = {
|
|
|
12735
12732
|
* @returns {Promise<Object>} Setup manifest with per-provider status
|
|
12736
12733
|
*/
|
|
12737
12734
|
getProviderSetupManifest: (appId, requiredProviders) =>
|
|
12738
|
-
ipcRenderer$
|
|
12735
|
+
ipcRenderer$2.invoke(DASHBOARD_CONFIG_PROVIDER_SETUP, {
|
|
12739
12736
|
appId,
|
|
12740
12737
|
requiredProviders,
|
|
12741
12738
|
}),
|
|
@@ -12743,6 +12740,40 @@ const dashboardConfigApi$2 = {
|
|
|
12743
12740
|
|
|
12744
12741
|
var dashboardConfigApi_1 = dashboardConfigApi$2;
|
|
12745
12742
|
|
|
12743
|
+
/**
|
|
12744
|
+
* dashboardRatingsApi.js
|
|
12745
|
+
*
|
|
12746
|
+
* IPC bridge for dashboard ratings (renderer side).
|
|
12747
|
+
*/
|
|
12748
|
+
|
|
12749
|
+
const { ipcRenderer: ipcRenderer$1 } = require$$0$1;
|
|
12750
|
+
const {
|
|
12751
|
+
DASHBOARD_RATING_SAVE,
|
|
12752
|
+
DASHBOARD_RATING_GET,
|
|
12753
|
+
DASHBOARD_RATING_LIST,
|
|
12754
|
+
DASHBOARD_RATING_DELETE,
|
|
12755
|
+
} = events$8;
|
|
12756
|
+
|
|
12757
|
+
const dashboardRatingsApi$1 = {
|
|
12758
|
+
saveDashboardRating: (appId, packageName, rating) =>
|
|
12759
|
+
ipcRenderer$1.invoke(DASHBOARD_RATING_SAVE, {
|
|
12760
|
+
appId,
|
|
12761
|
+
packageName,
|
|
12762
|
+
rating,
|
|
12763
|
+
}),
|
|
12764
|
+
|
|
12765
|
+
getDashboardRating: (appId, packageName) =>
|
|
12766
|
+
ipcRenderer$1.invoke(DASHBOARD_RATING_GET, { appId, packageName }),
|
|
12767
|
+
|
|
12768
|
+
listDashboardRatings: (appId) =>
|
|
12769
|
+
ipcRenderer$1.invoke(DASHBOARD_RATING_LIST, { appId }),
|
|
12770
|
+
|
|
12771
|
+
deleteDashboardRating: (appId, packageName) =>
|
|
12772
|
+
ipcRenderer$1.invoke(DASHBOARD_RATING_DELETE, { appId, packageName }),
|
|
12773
|
+
};
|
|
12774
|
+
|
|
12775
|
+
var dashboardRatingsApi_1 = dashboardRatingsApi$1;
|
|
12776
|
+
|
|
12746
12777
|
/**
|
|
12747
12778
|
* mainApi.js
|
|
12748
12779
|
*
|
|
@@ -12775,6 +12806,7 @@ const pluginApi$1 = pluginApi_1;
|
|
|
12775
12806
|
const llmApi$1 = llmApi_1;
|
|
12776
12807
|
const clientCacheApi$1 = clientCacheApi_1;
|
|
12777
12808
|
const dashboardConfigApi$1 = dashboardConfigApi_1;
|
|
12809
|
+
const dashboardRatingsApi = dashboardRatingsApi_1;
|
|
12778
12810
|
|
|
12779
12811
|
// Events constants
|
|
12780
12812
|
const events$1 = events$8;
|
|
@@ -12847,6 +12879,7 @@ function createMainApi$1(extensions = {}) {
|
|
|
12847
12879
|
plugins: pluginApi$1,
|
|
12848
12880
|
clientCache: clientCacheApi$1,
|
|
12849
12881
|
dashboardConfig: dashboardConfigApi$1,
|
|
12882
|
+
dashboardRatings: dashboardRatingsApi,
|
|
12850
12883
|
|
|
12851
12884
|
widgetEvent: {
|
|
12852
12885
|
publish: (eventType, content) => {
|