asyar-sdk 1.0.2
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/LICENSE +661 -0
- package/README.md +165 -0
- package/dist/ExtensionBridge.d.ts +34 -0
- package/dist/ExtensionBridge.d.ts.map +1 -0
- package/dist/ExtensionBridge.js +192 -0
- package/dist/ExtensionBridge.js.map +1 -0
- package/dist/ExtensionContext.d.ts +25 -0
- package/dist/ExtensionContext.d.ts.map +1 -0
- package/dist/ExtensionContext.js +128 -0
- package/dist/ExtensionContext.js.map +1 -0
- package/dist/cli/commands/build.d.ts +5 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +122 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/dev.d.ts +3 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/dev.js +85 -0
- package/dist/cli/commands/dev.js.map +1 -0
- package/dist/cli/commands/link.d.ts +6 -0
- package/dist/cli/commands/link.d.ts.map +1 -0
- package/dist/cli/commands/link.js +153 -0
- package/dist/cli/commands/link.js.map +1 -0
- package/dist/cli/commands/publish.d.ts +3 -0
- package/dist/cli/commands/publish.d.ts.map +1 -0
- package/dist/cli/commands/publish.js +344 -0
- package/dist/cli/commands/publish.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +3 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +58 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +20 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/lib/auth.d.ts +16 -0
- package/dist/cli/lib/auth.d.ts.map +1 -0
- package/dist/cli/lib/auth.js +225 -0
- package/dist/cli/lib/auth.js.map +1 -0
- package/dist/cli/lib/config.d.ts +11 -0
- package/dist/cli/lib/config.d.ts.map +1 -0
- package/dist/cli/lib/config.js +77 -0
- package/dist/cli/lib/config.js.map +1 -0
- package/dist/cli/lib/github.d.ts +44 -0
- package/dist/cli/lib/github.d.ts.map +1 -0
- package/dist/cli/lib/github.js +106 -0
- package/dist/cli/lib/github.js.map +1 -0
- package/dist/cli/lib/manifest.d.ts +29 -0
- package/dist/cli/lib/manifest.d.ts.map +1 -0
- package/dist/cli/lib/manifest.js +138 -0
- package/dist/cli/lib/manifest.js.map +1 -0
- package/dist/cli/lib/platform.d.ts +2 -0
- package/dist/cli/lib/platform.d.ts.map +1 -0
- package/dist/cli/lib/platform.js +40 -0
- package/dist/cli/lib/platform.js.map +1 -0
- package/dist/cli/lib/store.d.ts +21 -0
- package/dist/cli/lib/store.d.ts.map +1 -0
- package/dist/cli/lib/store.js +81 -0
- package/dist/cli/lib/store.js.map +1 -0
- package/dist/cli/lib/zip.d.ts +7 -0
- package/dist/cli/lib/zip.d.ts.map +1 -0
- package/dist/cli/lib/zip.js +67 -0
- package/dist/cli/lib/zip.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +25 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/ipc/MessageBroker.d.ts +30 -0
- package/dist/ipc/MessageBroker.d.ts.map +1 -0
- package/dist/ipc/MessageBroker.js +118 -0
- package/dist/ipc/MessageBroker.js.map +1 -0
- package/dist/services/ActionServiceProxy.d.ts +17 -0
- package/dist/services/ActionServiceProxy.d.ts.map +1 -0
- package/dist/services/ActionServiceProxy.js +60 -0
- package/dist/services/ActionServiceProxy.js.map +1 -0
- package/dist/services/ClipboardHistoryServiceProxy.d.ts +26 -0
- package/dist/services/ClipboardHistoryServiceProxy.d.ts.map +1 -0
- package/dist/services/ClipboardHistoryServiceProxy.js +74 -0
- package/dist/services/ClipboardHistoryServiceProxy.js.map +1 -0
- package/dist/services/CommandServiceProxy.d.ts +15 -0
- package/dist/services/CommandServiceProxy.d.ts.map +1 -0
- package/dist/services/CommandServiceProxy.js +44 -0
- package/dist/services/CommandServiceProxy.js.map +1 -0
- package/dist/services/ExtensionManagerProxy.d.ts +25 -0
- package/dist/services/ExtensionManagerProxy.d.ts.map +1 -0
- package/dist/services/ExtensionManagerProxy.js +78 -0
- package/dist/services/ExtensionManagerProxy.js.map +1 -0
- package/dist/services/IClipboardHistoryService.d.ts +24 -0
- package/dist/services/IClipboardHistoryService.d.ts.map +1 -0
- package/dist/services/IClipboardHistoryService.js +3 -0
- package/dist/services/IClipboardHistoryService.js.map +1 -0
- package/dist/services/ICommandService.d.ts +10 -0
- package/dist/services/ICommandService.d.ts.map +1 -0
- package/dist/services/ICommandService.js +3 -0
- package/dist/services/ICommandService.js.map +1 -0
- package/dist/services/IExtensionManager.d.ts +26 -0
- package/dist/services/IExtensionManager.d.ts.map +1 -0
- package/dist/services/IExtensionManager.js +3 -0
- package/dist/services/IExtensionManager.js.map +1 -0
- package/dist/services/INotificationService.d.ts +15 -0
- package/dist/services/INotificationService.d.ts.map +1 -0
- package/dist/services/INotificationService.js +3 -0
- package/dist/services/INotificationService.js.map +1 -0
- package/dist/services/IStatusBarService.d.ts +11 -0
- package/dist/services/IStatusBarService.d.ts.map +1 -0
- package/dist/services/IStatusBarService.js +3 -0
- package/dist/services/IStatusBarService.js.map +1 -0
- package/dist/services/LogService.d.ts +8 -0
- package/dist/services/LogService.d.ts.map +1 -0
- package/dist/services/LogService.js +3 -0
- package/dist/services/LogService.js.map +1 -0
- package/dist/services/LogServiceProxy.d.ts +13 -0
- package/dist/services/LogServiceProxy.d.ts.map +1 -0
- package/dist/services/LogServiceProxy.js +33 -0
- package/dist/services/LogServiceProxy.js.map +1 -0
- package/dist/services/NetworkServiceProxy.d.ts +9 -0
- package/dist/services/NetworkServiceProxy.d.ts.map +1 -0
- package/dist/services/NetworkServiceProxy.js +37 -0
- package/dist/services/NetworkServiceProxy.js.map +1 -0
- package/dist/services/NotificationServiceProxy.d.ts +17 -0
- package/dist/services/NotificationServiceProxy.d.ts.map +1 -0
- package/dist/services/NotificationServiceProxy.js +42 -0
- package/dist/services/NotificationServiceProxy.js.map +1 -0
- package/dist/services/StatusBarServiceProxy.d.ts +11 -0
- package/dist/services/StatusBarServiceProxy.d.ts.map +1 -0
- package/dist/services/StatusBarServiceProxy.js +28 -0
- package/dist/services/StatusBarServiceProxy.js.map +1 -0
- package/dist/services/index.d.ts +15 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +35 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/ActionType.d.ts +64 -0
- package/dist/types/ActionType.d.ts.map +1 -0
- package/dist/types/ActionType.js +47 -0
- package/dist/types/ActionType.js.map +1 -0
- package/dist/types/ClipboardType.d.ts +20 -0
- package/dist/types/ClipboardType.d.ts.map +1 -0
- package/dist/types/ClipboardType.js +13 -0
- package/dist/types/ClipboardType.js.map +1 -0
- package/dist/types/CommandType.d.ts +36 -0
- package/dist/types/CommandType.d.ts.map +1 -0
- package/dist/types/CommandType.js +3 -0
- package/dist/types/CommandType.js.map +1 -0
- package/dist/types/ExtensionType.d.ts +50 -0
- package/dist/types/ExtensionType.d.ts.map +1 -0
- package/dist/types/ExtensionType.js +3 -0
- package/dist/types/ExtensionType.js.map +1 -0
- package/dist/types/NetworkType.d.ts +17 -0
- package/dist/types/NetworkType.d.ts.map +1 -0
- package/dist/types/NetworkType.js +3 -0
- package/dist/types/NetworkType.js.map +1 -0
- package/dist/types/NotificationType.d.ts +48 -0
- package/dist/types/NotificationType.d.ts.map +1 -0
- package/dist/types/NotificationType.js +3 -0
- package/dist/types/NotificationType.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NotificationActionType, NotificationChannel, NotificationOptions } from "../types/NotificationType";
|
|
2
|
+
/**
|
|
3
|
+
* Interface for Notification Service
|
|
4
|
+
*/
|
|
5
|
+
export interface INotificationService {
|
|
6
|
+
checkPermission(): Promise<boolean>;
|
|
7
|
+
requestPermission(): Promise<boolean>;
|
|
8
|
+
notify(options: NotificationOptions): Promise<void>;
|
|
9
|
+
registerActionTypes(actionTypes: NotificationActionType[]): Promise<void>;
|
|
10
|
+
listenForActions(callback: (notification: any) => void): Promise<void>;
|
|
11
|
+
createChannel(channel: NotificationChannel): Promise<void>;
|
|
12
|
+
getChannels(): Promise<any[]>;
|
|
13
|
+
removeChannel(channelId: string): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=INotificationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"INotificationService.d.ts","sourceRoot":"","sources":["../../src/services/INotificationService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACpC,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,mBAAmB,CAAC,WAAW,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,gBAAgB,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9B,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"INotificationService.js","sourceRoot":"","sources":["../../src/services/INotificationService.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IStatusBarItem {
|
|
2
|
+
id: string;
|
|
3
|
+
icon?: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IStatusBarService {
|
|
7
|
+
registerItem(item: IStatusBarItem): void;
|
|
8
|
+
updateItem(id: string, updates: Partial<Pick<IStatusBarItem, 'icon' | 'text'>>): void;
|
|
9
|
+
unregisterItem(id: string): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=IStatusBarService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IStatusBarService.d.ts","sourceRoot":"","sources":["../../src/services/IStatusBarService.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IACzC,UAAU,CACR,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GACtD,IAAI,CAAC;IACR,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IStatusBarService.js","sourceRoot":"","sources":["../../src/services/IStatusBarService.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ILogService {
|
|
2
|
+
debug(message: string): void;
|
|
3
|
+
info(message: string): void;
|
|
4
|
+
warn(message: string): void;
|
|
5
|
+
error(message: string | Error): void;
|
|
6
|
+
custom(message: string, category: string, colorName: string, frameName?: string): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=LogService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogService.d.ts","sourceRoot":"","sources":["../../src/services/LogService.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAAC;IACrC,MAAM,CAAC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogService.js","sourceRoot":"","sources":["../../src/services/LogService.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ILogService } from "./LogService";
|
|
2
|
+
export declare class LogServiceProxy implements ILogService {
|
|
3
|
+
private broker;
|
|
4
|
+
private extensionId?;
|
|
5
|
+
constructor();
|
|
6
|
+
setExtensionId(id: string): void;
|
|
7
|
+
debug(message: string): void;
|
|
8
|
+
info(message: string): void;
|
|
9
|
+
warn(message: string): void;
|
|
10
|
+
error(message: string | Error): void;
|
|
11
|
+
custom(message: string, category: string, colorName: string, frameName?: string): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=LogServiceProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogServiceProxy.d.ts","sourceRoot":"","sources":["../../src/services/LogServiceProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,qBAAa,eAAgB,YAAW,WAAW;IACjD,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAS;;IAM7B,cAAc,CAAC,EAAE,EAAE,MAAM;IAOzB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;IAKpC,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI;CAGR"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogServiceProxy = void 0;
|
|
4
|
+
const MessageBroker_1 = require("../ipc/MessageBroker");
|
|
5
|
+
class LogServiceProxy {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.broker = MessageBroker_1.MessageBroker.getInstance();
|
|
8
|
+
}
|
|
9
|
+
setExtensionId(id) {
|
|
10
|
+
this.extensionId = id;
|
|
11
|
+
const originalInvoke = this.broker.invoke.bind(this.broker);
|
|
12
|
+
this.broker = Object.create(this.broker);
|
|
13
|
+
this.broker.invoke = (command, payload) => originalInvoke(command, payload, id);
|
|
14
|
+
}
|
|
15
|
+
debug(message) {
|
|
16
|
+
this.broker.invoke('log:debug', { message }).catch(console.error);
|
|
17
|
+
}
|
|
18
|
+
info(message) {
|
|
19
|
+
this.broker.invoke('log:info', { message }).catch(console.error);
|
|
20
|
+
}
|
|
21
|
+
warn(message) {
|
|
22
|
+
this.broker.invoke('log:warn', { message }).catch(console.error);
|
|
23
|
+
}
|
|
24
|
+
error(message) {
|
|
25
|
+
const errorMessage = message instanceof Error ? message.message : message;
|
|
26
|
+
this.broker.invoke('log:error', { message: errorMessage }).catch(console.error);
|
|
27
|
+
}
|
|
28
|
+
custom(message, category, colorName, frameName) {
|
|
29
|
+
this.broker.invoke('log:custom', { message, category, colorName, frameName }).catch(console.error);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.LogServiceProxy = LogServiceProxy;
|
|
33
|
+
//# sourceMappingURL=LogServiceProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogServiceProxy.js","sourceRoot":"","sources":["../../src/services/LogServiceProxy.ts"],"names":[],"mappings":";;;AACA,wDAAqD;AAErD,MAAa,eAAe;IAI1B;QACE,IAAI,CAAC,MAAM,GAAG,6BAAa,CAAC,WAAW,EAAE,CAAC;IAC5C,CAAC;IAED,cAAc,CAAC,EAAU;QACvB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAI,OAAe,EAAE,OAAa,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACnG,CAAC;IAED,KAAK,CAAC,OAAe;QACnB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,OAAuB;QAC3B,MAAM,YAAY,GAAG,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;QAC1E,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClF,CAAC;IAED,MAAM,CACJ,OAAe,EACf,QAAgB,EAChB,SAAiB,EACjB,SAAkB;QAElB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACrG,CAAC;CACF;AAxCD,0CAwCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { INetworkService, RequestOptions, NetworkResponse } from '../types/NetworkType';
|
|
2
|
+
export declare class NetworkServiceProxy implements INetworkService {
|
|
3
|
+
private broker;
|
|
4
|
+
private extensionId?;
|
|
5
|
+
constructor();
|
|
6
|
+
setExtensionId(id: string): void;
|
|
7
|
+
fetch(url: string, options?: RequestOptions): Promise<NetworkResponse>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=NetworkServiceProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkServiceProxy.d.ts","sourceRoot":"","sources":["../../src/services/NetworkServiceProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG7F,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAS;;IAM7B,cAAc,CAAC,EAAE,EAAE,MAAM;IAOnB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAU7E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NetworkServiceProxy = void 0;
|
|
13
|
+
const MessageBroker_1 = require("../ipc/MessageBroker");
|
|
14
|
+
class NetworkServiceProxy {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.broker = MessageBroker_1.MessageBroker.getInstance();
|
|
17
|
+
}
|
|
18
|
+
setExtensionId(id) {
|
|
19
|
+
this.extensionId = id;
|
|
20
|
+
const originalInvoke = this.broker.invoke.bind(this.broker);
|
|
21
|
+
this.broker = Object.create(this.broker);
|
|
22
|
+
this.broker.invoke = (command, payload) => originalInvoke(command, payload, id);
|
|
23
|
+
}
|
|
24
|
+
fetch(url, options) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
var _a;
|
|
27
|
+
const invokePromise = this.broker.invoke('network:fetch', { url, options: options !== null && options !== void 0 ? options : {} });
|
|
28
|
+
// Allow the host's AbortController (driven by options.timeout) to fire and send back
|
|
29
|
+
// an error response before we give up. Add a generous 15s buffer on top.
|
|
30
|
+
const ipcTimeout = ((_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : 25000) + 15000;
|
|
31
|
+
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error(`IPC Request timed out after ${ipcTimeout}ms`)), ipcTimeout));
|
|
32
|
+
return Promise.race([invokePromise, timeoutPromise]);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.NetworkServiceProxy = NetworkServiceProxy;
|
|
37
|
+
//# sourceMappingURL=NetworkServiceProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkServiceProxy.js","sourceRoot":"","sources":["../../src/services/NetworkServiceProxy.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wDAAqD;AAErD,MAAa,mBAAmB;IAI9B;QACE,IAAI,CAAC,MAAM,GAAG,6BAAa,CAAC,WAAW,EAAE,CAAC;IAC5C,CAAC;IAED,cAAc,CAAC,EAAU;QACvB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAI,OAAe,EAAE,OAAa,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACnG,CAAC;IAEK,KAAK,CAAC,GAAW,EAAE,OAAwB;;;YAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EAAE,CAAC,CAAC;YAC3F,qFAAqF;YACrF,yEAAyE;YACzE,MAAM,UAAU,GAAG,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,KAAK,CAAC,GAAG,KAAK,CAAC;YACvD,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAC/C,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,+BAA+B,UAAU,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAC/F,CAAC;YACF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,cAAc,CAAC,CAA6B,CAAC;QACnF,CAAC;KAAA;CACF;AAzBD,kDAyBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { INotificationService } from "./INotificationService";
|
|
2
|
+
import { NotificationActionType, NotificationChannel, NotificationOptions } from "../types/NotificationType";
|
|
3
|
+
export declare class NotificationServiceProxy implements INotificationService {
|
|
4
|
+
private broker;
|
|
5
|
+
private extensionId?;
|
|
6
|
+
constructor();
|
|
7
|
+
setExtensionId(id: string): void;
|
|
8
|
+
checkPermission(): Promise<boolean>;
|
|
9
|
+
requestPermission(): Promise<boolean>;
|
|
10
|
+
notify(options: NotificationOptions): Promise<void>;
|
|
11
|
+
registerActionTypes(actionTypes: NotificationActionType[]): Promise<void>;
|
|
12
|
+
listenForActions(callback: (notification: any) => void): Promise<void>;
|
|
13
|
+
createChannel(channel: NotificationChannel): Promise<void>;
|
|
14
|
+
getChannels(): Promise<any[]>;
|
|
15
|
+
removeChannel(channelId: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=NotificationServiceProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationServiceProxy.d.ts","sourceRoot":"","sources":["../../src/services/NotificationServiceProxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE7G,qBAAa,wBAAyB,YAAW,oBAAoB;IACnE,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAC,CAAS;;IAM7B,cAAc,CAAC,EAAE,EAAE,MAAM;IAOzB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAInC,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,mBAAmB,CAAC,WAAW,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzE,gBAAgB,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtE,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAI7B,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGhD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationServiceProxy = void 0;
|
|
4
|
+
const MessageBroker_1 = require("../ipc/MessageBroker");
|
|
5
|
+
class NotificationServiceProxy {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.broker = MessageBroker_1.MessageBroker.getInstance();
|
|
8
|
+
}
|
|
9
|
+
setExtensionId(id) {
|
|
10
|
+
this.extensionId = id;
|
|
11
|
+
const originalInvoke = this.broker.invoke.bind(this.broker);
|
|
12
|
+
this.broker = Object.create(this.broker);
|
|
13
|
+
this.broker.invoke = (command, payload) => originalInvoke(command, payload, id);
|
|
14
|
+
}
|
|
15
|
+
checkPermission() {
|
|
16
|
+
return this.broker.invoke('notification:checkPermission');
|
|
17
|
+
}
|
|
18
|
+
requestPermission() {
|
|
19
|
+
return this.broker.invoke('notification:requestPermission');
|
|
20
|
+
}
|
|
21
|
+
notify(options) {
|
|
22
|
+
return this.broker.invoke('notification:notify', { options });
|
|
23
|
+
}
|
|
24
|
+
registerActionTypes(actionTypes) {
|
|
25
|
+
return this.broker.invoke('notification:registerActionTypes', { actionTypes });
|
|
26
|
+
}
|
|
27
|
+
listenForActions(callback) {
|
|
28
|
+
this.broker.on('asyar:event:notification:action', callback);
|
|
29
|
+
return Promise.resolve();
|
|
30
|
+
}
|
|
31
|
+
createChannel(channel) {
|
|
32
|
+
return this.broker.invoke('notification:createChannel', { channel });
|
|
33
|
+
}
|
|
34
|
+
getChannels() {
|
|
35
|
+
return this.broker.invoke('notification:getChannels');
|
|
36
|
+
}
|
|
37
|
+
removeChannel(channelId) {
|
|
38
|
+
return this.broker.invoke('notification:removeChannel', { channelId });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.NotificationServiceProxy = NotificationServiceProxy;
|
|
42
|
+
//# sourceMappingURL=NotificationServiceProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationServiceProxy.js","sourceRoot":"","sources":["../../src/services/NotificationServiceProxy.ts"],"names":[],"mappings":";;;AACA,wDAAqD;AAGrD,MAAa,wBAAwB;IAInC;QACE,IAAI,CAAC,MAAM,GAAG,6BAAa,CAAC,WAAW,EAAE,CAAC;IAC5C,CAAC;IAED,cAAc,CAAC,EAAU;QACvB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAI,OAAe,EAAE,OAAa,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACnG,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAU,8BAA8B,CAAC,CAAC;IACrE,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAU,gCAAgC,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,CAAC,OAA4B;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,qBAAqB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,mBAAmB,CAAC,WAAqC;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,kCAAkC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,gBAAgB,CAAC,QAAqC;QACpD,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,iCAAiC,EAAE,QAAQ,CAAC,CAAC;QAC5D,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa,CAAC,OAA4B;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,4BAA4B,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAQ,0BAA0B,CAAC,CAAC;IAC/D,CAAC;IAED,aAAa,CAAC,SAAiB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,4BAA4B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AA/CD,4DA+CC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IStatusBarService, IStatusBarItem } from './IStatusBarService';
|
|
2
|
+
export declare class StatusBarServiceProxy implements IStatusBarService {
|
|
3
|
+
private broker;
|
|
4
|
+
private extensionId;
|
|
5
|
+
constructor();
|
|
6
|
+
setExtensionId(id: string): void;
|
|
7
|
+
registerItem(item: IStatusBarItem): void;
|
|
8
|
+
updateItem(id: string, updates: Partial<Pick<IStatusBarItem, 'icon' | 'text'>>): void;
|
|
9
|
+
unregisterItem(id: string): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=StatusBarServiceProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBarServiceProxy.d.ts","sourceRoot":"","sources":["../../src/services/StatusBarServiceProxy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE7E,qBAAa,qBAAsB,YAAW,iBAAiB;IAC7D,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAc;;IAMjC,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAQhC,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAKxC,UAAU,CACR,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GACtD,IAAI;IAIP,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;CAGjC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StatusBarServiceProxy = void 0;
|
|
4
|
+
const MessageBroker_1 = require("../ipc/MessageBroker");
|
|
5
|
+
class StatusBarServiceProxy {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.extensionId = '';
|
|
8
|
+
this.broker = MessageBroker_1.MessageBroker.getInstance();
|
|
9
|
+
}
|
|
10
|
+
setExtensionId(id) {
|
|
11
|
+
this.extensionId = id;
|
|
12
|
+
const originalInvoke = this.broker.invoke.bind(this.broker);
|
|
13
|
+
this.broker = Object.create(this.broker);
|
|
14
|
+
this.broker.invoke = (command, payload) => originalInvoke(command, payload, id);
|
|
15
|
+
}
|
|
16
|
+
registerItem(item) {
|
|
17
|
+
const fullItem = Object.assign(Object.assign({}, item), { extensionId: this.extensionId });
|
|
18
|
+
this.broker.invoke('statusbar:registerItem', { item: fullItem }).catch(console.error);
|
|
19
|
+
}
|
|
20
|
+
updateItem(id, updates) {
|
|
21
|
+
this.broker.invoke('statusbar:updateItem', { extensionId: this.extensionId, id, updates }).catch(console.error);
|
|
22
|
+
}
|
|
23
|
+
unregisterItem(id) {
|
|
24
|
+
this.broker.invoke('statusbar:unregisterItem', { extensionId: this.extensionId, id }).catch(console.error);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.StatusBarServiceProxy = StatusBarServiceProxy;
|
|
28
|
+
//# sourceMappingURL=StatusBarServiceProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBarServiceProxy.js","sourceRoot":"","sources":["../../src/services/StatusBarServiceProxy.ts"],"names":[],"mappings":";;;AAAA,wDAAqD;AAGrD,MAAa,qBAAqB;IAIhC;QAFQ,gBAAW,GAAW,EAAE,CAAC;QAG/B,IAAI,CAAC,MAAM,GAAG,6BAAa,CAAC,WAAW,EAAE,CAAC;IAC5C,CAAC;IAED,cAAc,CAAC,EAAU;QACvB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAI,OAAe,EAAE,OAAa,EAAE,EAAE,CACzD,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,YAAY,CAAC,IAAoB;QAC/B,MAAM,QAAQ,mCAAQ,IAAI,KAAE,WAAW,EAAE,IAAI,CAAC,WAAW,GAAE,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxF,CAAC;IAED,UAAU,CACR,EAAU,EACV,OAAuD;QAEvD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClH,CAAC;IAED,cAAc,CAAC,EAAU;QACvB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,0BAA0B,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7G,CAAC;CACF;AA/BD,sDA+BC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./LogService";
|
|
2
|
+
export * from "./INotificationService";
|
|
3
|
+
export * from "./IClipboardHistoryService";
|
|
4
|
+
export * from "./IExtensionManager";
|
|
5
|
+
export * from "./ICommandService";
|
|
6
|
+
export * from "./LogServiceProxy";
|
|
7
|
+
export * from "./NotificationServiceProxy";
|
|
8
|
+
export * from "./ClipboardHistoryServiceProxy";
|
|
9
|
+
export * from "./ExtensionManagerProxy";
|
|
10
|
+
export { CommandServiceProxy } from './CommandServiceProxy';
|
|
11
|
+
export { ActionServiceProxy } from './ActionServiceProxy';
|
|
12
|
+
export { NetworkServiceProxy } from './NetworkServiceProxy';
|
|
13
|
+
export { StatusBarServiceProxy } from './StatusBarServiceProxy';
|
|
14
|
+
export type { IStatusBarService, IStatusBarItem } from './IStatusBarService';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAElC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.StatusBarServiceProxy = exports.NetworkServiceProxy = exports.ActionServiceProxy = exports.CommandServiceProxy = void 0;
|
|
18
|
+
__exportStar(require("./LogService"), exports);
|
|
19
|
+
__exportStar(require("./INotificationService"), exports);
|
|
20
|
+
__exportStar(require("./IClipboardHistoryService"), exports);
|
|
21
|
+
__exportStar(require("./IExtensionManager"), exports);
|
|
22
|
+
__exportStar(require("./ICommandService"), exports);
|
|
23
|
+
__exportStar(require("./LogServiceProxy"), exports);
|
|
24
|
+
__exportStar(require("./NotificationServiceProxy"), exports);
|
|
25
|
+
__exportStar(require("./ClipboardHistoryServiceProxy"), exports);
|
|
26
|
+
__exportStar(require("./ExtensionManagerProxy"), exports);
|
|
27
|
+
var CommandServiceProxy_1 = require("./CommandServiceProxy");
|
|
28
|
+
Object.defineProperty(exports, "CommandServiceProxy", { enumerable: true, get: function () { return CommandServiceProxy_1.CommandServiceProxy; } });
|
|
29
|
+
var ActionServiceProxy_1 = require("./ActionServiceProxy");
|
|
30
|
+
Object.defineProperty(exports, "ActionServiceProxy", { enumerable: true, get: function () { return ActionServiceProxy_1.ActionServiceProxy; } });
|
|
31
|
+
var NetworkServiceProxy_1 = require("./NetworkServiceProxy");
|
|
32
|
+
Object.defineProperty(exports, "NetworkServiceProxy", { enumerable: true, get: function () { return NetworkServiceProxy_1.NetworkServiceProxy; } });
|
|
33
|
+
var StatusBarServiceProxy_1 = require("./StatusBarServiceProxy");
|
|
34
|
+
Object.defineProperty(exports, "StatusBarServiceProxy", { enumerable: true, get: function () { return StatusBarServiceProxy_1.StatusBarServiceProxy; } });
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,yDAAuC;AACvC,6DAA2C;AAC3C,sDAAoC;AACpC,oDAAkC;AAElC,oDAAkC;AAClC,6DAA2C;AAC3C,iEAA+C;AAC/C,0DAAwC;AACxC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available contexts for actions
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ActionContext {
|
|
5
|
+
/**
|
|
6
|
+
* Action available globally
|
|
7
|
+
*/
|
|
8
|
+
GLOBAL = "global",
|
|
9
|
+
/**
|
|
10
|
+
* Action available only within extension views
|
|
11
|
+
*/
|
|
12
|
+
EXTENSION_VIEW = "extension_view",
|
|
13
|
+
/**
|
|
14
|
+
* Action available in search results context
|
|
15
|
+
*/
|
|
16
|
+
SEARCH_VIEW = "search_view",
|
|
17
|
+
/**
|
|
18
|
+
* Action available in result display context
|
|
19
|
+
*/
|
|
20
|
+
RESULT = "result",
|
|
21
|
+
/**
|
|
22
|
+
* Action available in the core application
|
|
23
|
+
*/
|
|
24
|
+
CORE = "core",
|
|
25
|
+
/**
|
|
26
|
+
* Action available for a specific command result
|
|
27
|
+
*/
|
|
28
|
+
COMMAND_RESULT = "command_result"
|
|
29
|
+
}
|
|
30
|
+
export interface ExtensionAction {
|
|
31
|
+
id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
icon?: string;
|
|
35
|
+
extensionId: string;
|
|
36
|
+
category?: string;
|
|
37
|
+
context?: ActionContext;
|
|
38
|
+
execute: () => Promise<void> | void;
|
|
39
|
+
}
|
|
40
|
+
export interface IActionService {
|
|
41
|
+
registerAction(action: ExtensionAction): void;
|
|
42
|
+
unregisterAction(actionId: string): void;
|
|
43
|
+
getActions(context?: ActionContext): ExtensionAction[];
|
|
44
|
+
executeAction(actionId: string): Promise<void>;
|
|
45
|
+
setContext(context: ActionContext, data?: {
|
|
46
|
+
commandId?: string;
|
|
47
|
+
}): void;
|
|
48
|
+
getContext(): ActionContext;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Standard action category names.
|
|
52
|
+
* Use these for consistent grouping in the ⌘K panel.
|
|
53
|
+
* You may also use any custom string — these are recommendations, not restrictions.
|
|
54
|
+
*/
|
|
55
|
+
export declare const ActionCategory: {
|
|
56
|
+
readonly PRIMARY: "Primary";
|
|
57
|
+
readonly NAVIGATION: "Navigation";
|
|
58
|
+
readonly EDIT: "Edit";
|
|
59
|
+
readonly SHARE: "Share";
|
|
60
|
+
readonly DESTRUCTIVE: "Destructive";
|
|
61
|
+
readonly SYSTEM: "System";
|
|
62
|
+
};
|
|
63
|
+
export type ActionCategoryValue = typeof ActionCategory[keyof typeof ActionCategory];
|
|
64
|
+
//# sourceMappingURL=ActionType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionType.d.ts","sourceRoot":"","sources":["../../src/types/ActionType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,aAAa;IACvB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,cAAc,mBAAmB;IAEjC;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,cAAc,mBAAmB;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,cAAc;IAC7B,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9C,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,UAAU,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,eAAe,EAAE,CAAC;IACvD,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACxE,UAAU,IAAI,aAAa,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionCategory = exports.ActionContext = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Available contexts for actions
|
|
6
|
+
*/
|
|
7
|
+
var ActionContext;
|
|
8
|
+
(function (ActionContext) {
|
|
9
|
+
/**
|
|
10
|
+
* Action available globally
|
|
11
|
+
*/
|
|
12
|
+
ActionContext["GLOBAL"] = "global";
|
|
13
|
+
/**
|
|
14
|
+
* Action available only within extension views
|
|
15
|
+
*/
|
|
16
|
+
ActionContext["EXTENSION_VIEW"] = "extension_view";
|
|
17
|
+
/**
|
|
18
|
+
* Action available in search results context
|
|
19
|
+
*/
|
|
20
|
+
ActionContext["SEARCH_VIEW"] = "search_view";
|
|
21
|
+
/**
|
|
22
|
+
* Action available in result display context
|
|
23
|
+
*/
|
|
24
|
+
ActionContext["RESULT"] = "result";
|
|
25
|
+
/**
|
|
26
|
+
* Action available in the core application
|
|
27
|
+
*/
|
|
28
|
+
ActionContext["CORE"] = "core";
|
|
29
|
+
/**
|
|
30
|
+
* Action available for a specific command result
|
|
31
|
+
*/
|
|
32
|
+
ActionContext["COMMAND_RESULT"] = "command_result";
|
|
33
|
+
})(ActionContext || (exports.ActionContext = ActionContext = {}));
|
|
34
|
+
/**
|
|
35
|
+
* Standard action category names.
|
|
36
|
+
* Use these for consistent grouping in the ⌘K panel.
|
|
37
|
+
* You may also use any custom string — these are recommendations, not restrictions.
|
|
38
|
+
*/
|
|
39
|
+
exports.ActionCategory = {
|
|
40
|
+
PRIMARY: 'Primary',
|
|
41
|
+
NAVIGATION: 'Navigation',
|
|
42
|
+
EDIT: 'Edit',
|
|
43
|
+
SHARE: 'Share',
|
|
44
|
+
DESTRUCTIVE: 'Destructive',
|
|
45
|
+
SYSTEM: 'System',
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=ActionType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionType.js","sourceRoot":"","sources":["../../src/types/ActionType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,aA8BX;AA9BD,WAAY,aAAa;IACvB;;OAEG;IACH,kCAAiB,CAAA;IAEjB;;OAEG;IACH,kDAAiC,CAAA;IAEjC;;OAEG;IACH,4CAA2B,CAAA;IAE3B;;OAEG;IACH,kCAAiB,CAAA;IAEjB;;OAEG;IACH,8BAAa,CAAA;IAEb;;OAEG;IACH,kDAAiC,CAAA;AACnC,CAAC,EA9BW,aAAa,6BAAb,aAAa,QA8BxB;AAuBD;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAM,SAAS;IACtB,UAAU,EAAG,YAAY;IACzB,IAAI,EAAS,MAAM;IACnB,KAAK,EAAQ,OAAO;IACpB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAO,QAAQ;CACb,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of content that can be stored in the clipboard
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ClipboardItemType {
|
|
5
|
+
Text = "text",
|
|
6
|
+
Html = "html",
|
|
7
|
+
Image = "image"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Interface for clipboard history items that can be safely exposed externally
|
|
11
|
+
*/
|
|
12
|
+
export interface ClipboardHistoryItem {
|
|
13
|
+
id: string;
|
|
14
|
+
type: ClipboardItemType;
|
|
15
|
+
content?: string;
|
|
16
|
+
preview?: string;
|
|
17
|
+
createdAt: number;
|
|
18
|
+
favorite: boolean;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ClipboardType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClipboardType.d.ts","sourceRoot":"","sources":["../../src/types/ClipboardType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClipboardItemType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Types of content that can be stored in the clipboard
|
|
6
|
+
*/
|
|
7
|
+
var ClipboardItemType;
|
|
8
|
+
(function (ClipboardItemType) {
|
|
9
|
+
ClipboardItemType["Text"] = "text";
|
|
10
|
+
ClipboardItemType["Html"] = "html";
|
|
11
|
+
ClipboardItemType["Image"] = "image";
|
|
12
|
+
})(ClipboardItemType || (exports.ClipboardItemType = ClipboardItemType = {}));
|
|
13
|
+
//# sourceMappingURL=ClipboardType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClipboardType.js","sourceRoot":"","sources":["../../src/types/ClipboardType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,oCAAe,CAAA;AACjB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface CommandArgument {
|
|
2
|
+
name: string;
|
|
3
|
+
type: "string" | "number" | "boolean" | "object";
|
|
4
|
+
description?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
default?: any;
|
|
7
|
+
}
|
|
8
|
+
export interface CommandDefinition {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
trigger: string;
|
|
13
|
+
arguments?: CommandArgument[];
|
|
14
|
+
}
|
|
15
|
+
export interface CommandHandler {
|
|
16
|
+
execute: (args?: Record<string, any>) => Promise<any> | any;
|
|
17
|
+
}
|
|
18
|
+
export interface CommandMatch {
|
|
19
|
+
confidence: number;
|
|
20
|
+
args?: Record<string, any>;
|
|
21
|
+
commandId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ExtendedCommand {
|
|
24
|
+
id: string;
|
|
25
|
+
handler: CommandHandler;
|
|
26
|
+
extensionId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ICommandService {
|
|
29
|
+
registerCommand(commandId: string, handler: CommandHandler, extensionId: string): void;
|
|
30
|
+
unregisterCommand(commandId: string): void;
|
|
31
|
+
executeCommand(commandId: string, args?: Record<string, any>): Promise<any>;
|
|
32
|
+
getCommands(): string[];
|
|
33
|
+
getCommandsForExtension(extensionId: string): string[];
|
|
34
|
+
clearCommandsForExtension(extensionId: string): void;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=CommandType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandType.d.ts","sourceRoot":"","sources":["../../src/types/CommandType.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CAC7D;AAGD,MAAM,WAAW,YAAY;IAE3B,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,eAAe;IAC9B,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,MAAM,GAClB,IAAI,CAAC;IACR,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5E,WAAW,IAAI,MAAM,EAAE,CAAC;IACxB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvD,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandType.js","sourceRoot":"","sources":["../../src/types/CommandType.ts"],"names":[],"mappings":""}
|