@widget-js/core 0.10.13 → 0.10.14
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.cjs +31 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CPUUsage, IOCounters, BlinkMemoryInfo, HeapStatistics as HeapStatistics$1, ProcessMemoryInfo, SystemMemoryInfo } from 'electron';
|
|
1
2
|
import { FileTypeResult } from 'file-type';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -1424,6 +1425,23 @@ interface IBroadcastApi {
|
|
|
1424
1425
|
type BroadcastApiMethods = keyof IBroadcastApi;
|
|
1425
1426
|
declare const BroadcastApi: IBroadcastApi;
|
|
1426
1427
|
|
|
1428
|
+
interface IProcessApi {
|
|
1429
|
+
getCPUUsage(): Promise<CPUUsage>;
|
|
1430
|
+
getIOCounters(): Promise<IOCounters>;
|
|
1431
|
+
getBlinkMemoryInfo(): Promise<BlinkMemoryInfo>;
|
|
1432
|
+
getHeapStatistics(): Promise<HeapStatistics$1>;
|
|
1433
|
+
/**
|
|
1434
|
+
* // On macOS -> '10.13.6'
|
|
1435
|
+
* // On Windows -> '10.0.17763'
|
|
1436
|
+
* // On Linux -> '4.15.0-45-generic'
|
|
1437
|
+
*/
|
|
1438
|
+
getSystemVersion(): Promise<string>;
|
|
1439
|
+
getProcessMemoryInfo(): Promise<ProcessMemoryInfo>;
|
|
1440
|
+
getSystemMemoryInfo(): Promise<SystemMemoryInfo>;
|
|
1441
|
+
}
|
|
1442
|
+
type ProcessApiMethods = keyof IProcessApi;
|
|
1443
|
+
declare const ProcessApi: IProcessApi;
|
|
1444
|
+
|
|
1427
1445
|
interface IDialogApi {
|
|
1428
1446
|
pickFile(extensions?: string[]): Promise<string | undefined>;
|
|
1429
1447
|
pickFolder(): Promise<string | undefined>;
|
|
@@ -1479,4 +1497,4 @@ interface HeapStatistics {
|
|
|
1479
1497
|
doesZapGarbage: boolean;
|
|
1480
1498
|
}
|
|
1481
1499
|
|
|
1482
|
-
export { AlignPosition, ApiConstants, AppApi, AppApiConstants, AppApiEvent, AppApiMethods, AppMouseEvent, AppNotification, BaseApi, BroadcastApi, BroadcastApiMethods, BroadcastEvent, BroadcastEventType, BrowserWindowApi, BrowserWindowApiEvent, BrowserWindowApiMethods, Channel, ClipboardApi, ClipboardApiEvent, ClipboardApiMethods, DeployMode, DeployedPage, DeployedWidget, DeployedWidgetApi, DeployedWidgetApiMethods, DevOptions, DeviceApi, DeviceApiMethods, DialogApi, DialogApiMethods, ElectronApi, ElectronUtils, FileApi, FileApiMethods, Gravity, GridRect, GridSystem, HeapStatistics, HostedMode, IGridRect, IPage, IPageOptions, IWidgetDataApi, IWidgetOptions, IWindowSize, LanguageCode, LanguageTextMap, LocalPackageUrlInfo, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, LogApi, LogApiMethods, MetaInfo, NativeKeyboardEvent, NormalizeOptions, NotificationApi, NotificationApiEvent, NotificationApiMethods, NotificationOption, NotificationSize, NotificationType, OpenUrlOptions, Page, Point, Position, ReadDirOptions, Rectangle, RemotePackageUrlInfo, SaveWidgetOption, SetPositionOptions, ShortcutApi, ShortcutApiEvent, ShortcutApiMethods, StoreApi, StoreApiMethods, ThemeMode, WebSocketEvent, WebSocketEventType, Widget, WidgetApi, WidgetApiEvent, WidgetApiMethods, WidgetData, WidgetDataApi, WidgetDataApiMethods, WidgetKeyword, WidgetPackage, WidgetPackageOptions, WidgetParams, WidgetPermission, WidgetRoute, WidgetUrlUtils, getTextByLanguageCode, normalizeUrl, parseQuery, stringifyQuery };
|
|
1500
|
+
export { AlignPosition, ApiConstants, AppApi, AppApiConstants, AppApiEvent, AppApiMethods, AppMouseEvent, AppNotification, BaseApi, BroadcastApi, BroadcastApiMethods, BroadcastEvent, BroadcastEventType, BrowserWindowApi, BrowserWindowApiEvent, BrowserWindowApiMethods, Channel, ClipboardApi, ClipboardApiEvent, ClipboardApiMethods, DeployMode, DeployedPage, DeployedWidget, DeployedWidgetApi, DeployedWidgetApiMethods, DevOptions, DeviceApi, DeviceApiMethods, DialogApi, DialogApiMethods, ElectronApi, ElectronUtils, FileApi, FileApiMethods, Gravity, GridRect, GridSystem, HeapStatistics, HostedMode, IGridRect, IPage, IPageOptions, IWidgetDataApi, IWidgetOptions, IWindowSize, LanguageCode, LanguageTextMap, LocalPackageUrlInfo, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, LogApi, LogApiMethods, MetaInfo, NativeKeyboardEvent, NormalizeOptions, NotificationApi, NotificationApiEvent, NotificationApiMethods, NotificationOption, NotificationSize, NotificationType, OpenUrlOptions, Page, Point, Position, ProcessApi, ProcessApiMethods, ReadDirOptions, Rectangle, RemotePackageUrlInfo, SaveWidgetOption, SetPositionOptions, ShortcutApi, ShortcutApiEvent, ShortcutApiMethods, StoreApi, StoreApiMethods, ThemeMode, WebSocketEvent, WebSocketEventType, Widget, WidgetApi, WidgetApiEvent, WidgetApiMethods, WidgetData, WidgetDataApi, WidgetDataApiMethods, WidgetKeyword, WidgetPackage, WidgetPackageOptions, WidgetParams, WidgetPermission, WidgetRoute, WidgetUrlUtils, getTextByLanguageCode, normalizeUrl, parseQuery, stringifyQuery };
|
package/dist/index.js
CHANGED
|
@@ -1799,6 +1799,35 @@ var ShortcutApiImpl = class extends BaseApi {
|
|
|
1799
1799
|
};
|
|
1800
1800
|
var ShortcutApi = new ShortcutApiImpl();
|
|
1801
1801
|
|
|
1802
|
+
// src/api/ProcessApi.ts
|
|
1803
|
+
var ProcessApiImpl = class extends BaseApi {
|
|
1804
|
+
getChannel() {
|
|
1805
|
+
return "channel::cn.widgetjs.core.process" /* PROCESS */;
|
|
1806
|
+
}
|
|
1807
|
+
getBlinkMemoryInfo() {
|
|
1808
|
+
return this.invokeMethod("getBlinkMemoryInfo");
|
|
1809
|
+
}
|
|
1810
|
+
getCPUUsage() {
|
|
1811
|
+
return this.invokeMethod("getCPUUsage");
|
|
1812
|
+
}
|
|
1813
|
+
getHeapStatistics() {
|
|
1814
|
+
return this.invokeMethod("getHeapStatistics");
|
|
1815
|
+
}
|
|
1816
|
+
getIOCounters() {
|
|
1817
|
+
return this.invokeMethod("getIOCounters");
|
|
1818
|
+
}
|
|
1819
|
+
getProcessMemoryInfo() {
|
|
1820
|
+
return this.invokeMethod("getProcessMemoryInfo");
|
|
1821
|
+
}
|
|
1822
|
+
getSystemMemoryInfo() {
|
|
1823
|
+
return this.invokeMethod("getSystemMemoryInfo");
|
|
1824
|
+
}
|
|
1825
|
+
getSystemVersion() {
|
|
1826
|
+
return this.invokeMethod("getSystemVersion");
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
var ProcessApi = new ProcessApiImpl();
|
|
1830
|
+
|
|
1802
1831
|
// src/api/AppApi.ts
|
|
1803
1832
|
var AppApiEvent = /* @__PURE__ */ ((AppApiEvent2) => {
|
|
1804
1833
|
AppApiEvent2["CONFIG_CHANGED"] = "event::cn.widgetjs.core.app.config.changed";
|
|
@@ -1982,6 +2011,7 @@ export {
|
|
|
1982
2011
|
NotificationApiEvent,
|
|
1983
2012
|
NotificationSize,
|
|
1984
2013
|
Page,
|
|
2014
|
+
ProcessApi,
|
|
1985
2015
|
ShortcutApi,
|
|
1986
2016
|
ShortcutApiEvent,
|
|
1987
2017
|
StoreApi,
|