@edenapp/types 0.6.2 → 0.6.4
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/CHANGELOG.md +8 -0
- package/ContextMenu.d.ts +7 -1
- package/commands.generated.d.ts +8 -1
- package/events.generated.d.ts +1 -1
- package/index.d.ts +5 -1
- package/ipc/appbus.d.ts +2 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/ContextMenu.d.ts
CHANGED
|
@@ -156,15 +156,21 @@ export type ContextMenuIconName =
|
|
|
156
156
|
| "align-center"
|
|
157
157
|
| "align-right";
|
|
158
158
|
|
|
159
|
+
export type ContextMenuIcon =
|
|
160
|
+
| ContextMenuIconName
|
|
161
|
+
| { type: "glyph"; name: ContextMenuIconName }
|
|
162
|
+
| { type: "app"; appId: string };
|
|
163
|
+
|
|
159
164
|
export type ContextMenuItem =
|
|
160
165
|
| {
|
|
161
166
|
type: "item";
|
|
162
167
|
id: string;
|
|
163
168
|
label: string;
|
|
164
|
-
icon?:
|
|
169
|
+
icon?: ContextMenuIcon;
|
|
165
170
|
shortcut?: string;
|
|
166
171
|
disabled?: boolean;
|
|
167
172
|
danger?: boolean;
|
|
173
|
+
items?: ContextMenuItem[];
|
|
168
174
|
}
|
|
169
175
|
| { type: "separator" }
|
|
170
176
|
| { type: "title"; label: string };
|
package/commands.generated.d.ts
CHANGED
|
@@ -339,6 +339,13 @@ export interface FsCommands {
|
|
|
339
339
|
args: { path: string };
|
|
340
340
|
response: import("./index").FileStats;
|
|
341
341
|
};
|
|
342
|
+
/**
|
|
343
|
+
* Resolve an Eden path to the underlying OS path.
|
|
344
|
+
*/
|
|
345
|
+
"fs/resolve": {
|
|
346
|
+
args: { path: string };
|
|
347
|
+
response: { realPath: string };
|
|
348
|
+
};
|
|
342
349
|
/**
|
|
343
350
|
* Search for files and directories using glob patterns.
|
|
344
351
|
*/
|
|
@@ -385,7 +392,7 @@ export interface I18nCommands {
|
|
|
385
392
|
"i18n/get-common": {
|
|
386
393
|
args: { locale: string };
|
|
387
394
|
response: {
|
|
388
|
-
translations:
|
|
395
|
+
translations: import("./index").RecursiveObject<string>;
|
|
389
396
|
};
|
|
390
397
|
};
|
|
391
398
|
}
|
package/events.generated.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface PackageEvents {
|
|
|
57
57
|
export interface ProcessEvents {
|
|
58
58
|
"process/launched": { instance: import("./index").AppInstance };
|
|
59
59
|
"process/stopped": { appId: string };
|
|
60
|
-
"process/error": { appId: string; error:
|
|
60
|
+
"process/error": { appId: string; error: unknown };
|
|
61
61
|
"process/exited": { appId: string; code: number };
|
|
62
62
|
}
|
|
63
63
|
|
package/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface IPCMessage {
|
|
|
57
57
|
target: string;
|
|
58
58
|
|
|
59
59
|
/** Message payload */
|
|
60
|
-
payload:
|
|
60
|
+
payload: unknown;
|
|
61
61
|
|
|
62
62
|
/** Unique message ID for tracking responses */
|
|
63
63
|
messageId: string;
|
|
@@ -76,6 +76,10 @@ export interface ViewBounds {
|
|
|
76
76
|
height: number;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
export type RecursiveObject<T> = {
|
|
80
|
+
[key: string]: T | RecursiveObject<T>;
|
|
81
|
+
};
|
|
82
|
+
|
|
79
83
|
// Export new command types
|
|
80
84
|
export type {
|
|
81
85
|
CommandName,
|
package/ipc/appbus.d.ts
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
* Schema for fire-and-forget messages (send/on/once)
|
|
10
10
|
* Keys are method names, values are the payload types
|
|
11
11
|
*/
|
|
12
|
-
export type MessageSchema = Record<string,
|
|
12
|
+
export type MessageSchema = Record<string, unknown>;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Schema for request/response (request/handle)
|
|
16
16
|
* Keys are method names, values are { args, result } types
|
|
17
17
|
*/
|
|
18
|
-
export type RequestSchema = Record<string, { args:
|
|
18
|
+
export type RequestSchema = Record<string, { args: unknown; result: unknown }>;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Defines a bidirectional communication protocol between two sides.
|
|
@@ -55,16 +55,6 @@ export interface ChannelProtocol {
|
|
|
55
55
|
peerHandles: RequestSchema;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* Default empty protocol (all any)
|
|
60
|
-
*/
|
|
61
|
-
type DefaultProtocol = {
|
|
62
|
-
hostMessages: MessageSchema;
|
|
63
|
-
peerMessages: MessageSchema;
|
|
64
|
-
hostHandles: RequestSchema;
|
|
65
|
-
peerHandles: RequestSchema;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
58
|
/**
|
|
69
59
|
* AppBus connection from the HOST perspective (the side that exposes the service).
|
|
70
60
|
* - send() sends hostMessages
|