bb-relay 0.0.49 → 0.0.50
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/{FileContent-CXlulSZq.d.mts → FileContent-C0XQHPtC.d.mts} +1 -1
- package/dist/{FileContent-CXlulSZq.d.ts → FileContent-C0XQHPtC.d.ts} +1 -1
- package/dist/{RequestReturn-Clb_WcNj.d.ts → RequestReturn-Dh56kqJZ.d.ts} +1 -1
- package/dist/{RequestReturn-Dahl-hde.d.mts → RequestReturn-Yinms53l.d.mts} +1 -1
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/editor.d.mts +48 -2
- package/dist/editor.d.ts +48 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/plugin.d.mts +3 -4
- package/dist/plugin.d.ts +3 -4
- package/package.json +1 -1
- package/src/editor.ts +14 -0
- package/src/lib/plugin/index.ts +3 -7
- package/src/types/editor/CommitArg.ts +3 -0
- package/src/types/editor/DownloadArg.ts +3 -0
- package/src/types/editor/GitActionArg.ts +7 -0
- package/src/types/editor/GitContent.ts +12 -0
- package/src/types/editor/GitFileActionArg.ts +7 -0
- package/src/types/editor/ListFilesArg.ts +3 -0
- package/src/types/editor/ShortcutArg.ts +5 -0
package/dist/api.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RelayEvent, a as RelayRequest } from './RequestReturn-
|
|
2
|
-
export { E as EventReturn, b as RequestReturn } from './RequestReturn-
|
|
3
|
-
import './FileContent-
|
|
1
|
+
import { R as RelayEvent, a as RelayRequest } from './RequestReturn-Yinms53l.mjs';
|
|
2
|
+
export { E as EventReturn, b as RequestReturn } from './RequestReturn-Yinms53l.mjs';
|
|
3
|
+
import './FileContent-C0XQHPtC.mjs';
|
|
4
4
|
|
|
5
5
|
type EventParam<K extends keyof RelayEvent> = {
|
|
6
6
|
type: K;
|
package/dist/api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as RelayEvent, a as RelayRequest } from './RequestReturn-
|
|
2
|
-
export { E as EventReturn, b as RequestReturn } from './RequestReturn-
|
|
3
|
-
import './FileContent-
|
|
1
|
+
import { R as RelayEvent, a as RelayRequest } from './RequestReturn-Dh56kqJZ.js';
|
|
2
|
+
export { E as EventReturn, b as RequestReturn } from './RequestReturn-Dh56kqJZ.js';
|
|
3
|
+
import './FileContent-C0XQHPtC.js';
|
|
4
4
|
|
|
5
5
|
type EventParam<K extends keyof RelayEvent> = {
|
|
6
6
|
type: K;
|
package/dist/editor.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { C as Commit } from './Commit-PdsjrKSG.mjs';
|
|
2
2
|
export { a as FileStat, F as FolderContent, b as FolderStat } from './FolderStat-Bhmwwc0t.mjs';
|
|
3
|
-
|
|
3
|
+
import { F as FileEncoding } from './FileContent-C0XQHPtC.mjs';
|
|
4
|
+
export { a as FileContent } from './FileContent-C0XQHPtC.mjs';
|
|
4
5
|
import { L as Language, a as Locale } from './Locale-CdRgNxJo.mjs';
|
|
5
6
|
export { R as Result } from './Result-BLbZLEgX.mjs';
|
|
6
7
|
|
|
@@ -73,4 +74,49 @@ interface TutorialHeader {
|
|
|
73
74
|
|
|
74
75
|
type WatchFSEvent = "updated" | "deleted" | "add";
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
type DownloadArg = {
|
|
78
|
+
url: string;
|
|
79
|
+
targetDir: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
type ListFilesArg = {
|
|
83
|
+
path: string;
|
|
84
|
+
glob?: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Used for ipc calls related to git content, such as getting the content of a file in the HEAD or staging area. It includes the directory of the git repository, the file path relative to the repository, and an optional encoding for the file content.
|
|
89
|
+
*/
|
|
90
|
+
type GitContent = {
|
|
91
|
+
dir: string;
|
|
92
|
+
filePath: string;
|
|
93
|
+
encoding?: FileEncoding;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @description Argument for git file action like discard, stage, unstage. It includes the directory of the git repository and an array of file paths relative to the repository that the action should be performed on.
|
|
98
|
+
*/
|
|
99
|
+
interface GitFileActionArg {
|
|
100
|
+
dir: string;
|
|
101
|
+
filePaths: string[];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @description Argument for git action like log, checkout. It includes the directory of the git repository and an optional reference.
|
|
106
|
+
*/
|
|
107
|
+
interface GitActionArg {
|
|
108
|
+
dir: string;
|
|
109
|
+
ref?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type CommitArg = {
|
|
113
|
+
dir: string;
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
type ShortcutArg = {
|
|
118
|
+
id: Language;
|
|
119
|
+
data: unknown;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type { CommitArg, CopyArg, DownloadArg, GitActionArg, GitContent, GitFileActionArg, GitFileStatus, IconArg, ListFilesArg, MenuContent, Nav, Route, Settings, Shortcut, ShortcutArg, TutorialHeader, WatchFSEvent };
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { C as Commit } from './Commit-PdsjrKSG.js';
|
|
2
2
|
export { a as FileStat, F as FolderContent, b as FolderStat } from './FolderStat-Bhmwwc0t.js';
|
|
3
|
-
|
|
3
|
+
import { F as FileEncoding } from './FileContent-C0XQHPtC.js';
|
|
4
|
+
export { a as FileContent } from './FileContent-C0XQHPtC.js';
|
|
4
5
|
import { L as Language, a as Locale } from './Locale-CdRgNxJo.js';
|
|
5
6
|
export { R as Result } from './Result-BLbZLEgX.js';
|
|
6
7
|
|
|
@@ -73,4 +74,49 @@ interface TutorialHeader {
|
|
|
73
74
|
|
|
74
75
|
type WatchFSEvent = "updated" | "deleted" | "add";
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
type DownloadArg = {
|
|
78
|
+
url: string;
|
|
79
|
+
targetDir: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
type ListFilesArg = {
|
|
83
|
+
path: string;
|
|
84
|
+
glob?: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Used for ipc calls related to git content, such as getting the content of a file in the HEAD or staging area. It includes the directory of the git repository, the file path relative to the repository, and an optional encoding for the file content.
|
|
89
|
+
*/
|
|
90
|
+
type GitContent = {
|
|
91
|
+
dir: string;
|
|
92
|
+
filePath: string;
|
|
93
|
+
encoding?: FileEncoding;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @description Argument for git file action like discard, stage, unstage. It includes the directory of the git repository and an array of file paths relative to the repository that the action should be performed on.
|
|
98
|
+
*/
|
|
99
|
+
interface GitFileActionArg {
|
|
100
|
+
dir: string;
|
|
101
|
+
filePaths: string[];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @description Argument for git action like log, checkout. It includes the directory of the git repository and an optional reference.
|
|
106
|
+
*/
|
|
107
|
+
interface GitActionArg {
|
|
108
|
+
dir: string;
|
|
109
|
+
ref?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type CommitArg = {
|
|
113
|
+
dir: string;
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
type ShortcutArg = {
|
|
118
|
+
id: Language;
|
|
119
|
+
data: unknown;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export type { CommitArg, CopyArg, DownloadArg, GitActionArg, GitContent, GitFileActionArg, GitFileStatus, IconArg, ListFilesArg, MenuContent, Nav, Route, Settings, Shortcut, ShortcutArg, TutorialHeader, WatchFSEvent };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as FileContent } from './FileContent-C0XQHPtC.mjs';
|
|
2
2
|
export { R as Result } from './Result-BLbZLEgX.mjs';
|
|
3
3
|
import { P as Plugin } from './Plugin-BUbJvxEw.mjs';
|
|
4
|
-
import { R as RelayEvent, E as EventReturn, a as RelayRequest, b as RequestReturn } from './RequestReturn-
|
|
4
|
+
import { R as RelayEvent, E as EventReturn, a as RelayRequest, b as RequestReturn } from './RequestReturn-Yinms53l.mjs';
|
|
5
5
|
import './Wrapper-DWhYVa7F.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as FileContent } from './FileContent-C0XQHPtC.js';
|
|
2
2
|
export { R as Result } from './Result-BLbZLEgX.js';
|
|
3
3
|
import { P as Plugin } from './Plugin-BYz_yl3E.js';
|
|
4
|
-
import { R as RelayEvent, E as EventReturn, a as RelayRequest, b as RequestReturn } from './RequestReturn-
|
|
4
|
+
import { R as RelayEvent, E as EventReturn, a as RelayRequest, b as RequestReturn } from './RequestReturn-Dh56kqJZ.js';
|
|
5
5
|
import './Wrapper-DWhYVa7F.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/plugin.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, InputHTMLAttributes } from 'react';
|
|
2
2
|
import { IconName } from 'lucide-react/dynamic';
|
|
3
3
|
import { F as FolderContent, b as FolderStat, a as FileStat } from './FolderStat-Bhmwwc0t.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { a as FileContent } from './FileContent-C0XQHPtC.mjs';
|
|
5
5
|
import { R as Result } from './Result-BLbZLEgX.mjs';
|
|
6
6
|
import { P as Project } from './Project-9NfYlQ36.mjs';
|
|
7
7
|
import './PROJECT_CATEGORY-BivLHtB6.mjs';
|
|
@@ -224,12 +224,11 @@ type EditorAPI = {
|
|
|
224
224
|
commit: (arg: {
|
|
225
225
|
files: string[];
|
|
226
226
|
message: string;
|
|
227
|
-
email?: string;
|
|
228
227
|
}) => Promise<Result>;
|
|
229
228
|
};
|
|
230
229
|
dialog?: {
|
|
231
|
-
selectFile: () => Promise<Result<string
|
|
232
|
-
selectFolder: () => Promise<Result<string
|
|
230
|
+
selectFile: () => Promise<Result<string>>;
|
|
231
|
+
selectFolder: () => Promise<Result<string>>;
|
|
233
232
|
};
|
|
234
233
|
project?: {
|
|
235
234
|
/**
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, InputHTMLAttributes } from 'react';
|
|
2
2
|
import { IconName } from 'lucide-react/dynamic';
|
|
3
3
|
import { F as FolderContent, b as FolderStat, a as FileStat } from './FolderStat-Bhmwwc0t.js';
|
|
4
|
-
import {
|
|
4
|
+
import { a as FileContent } from './FileContent-C0XQHPtC.js';
|
|
5
5
|
import { R as Result } from './Result-BLbZLEgX.js';
|
|
6
6
|
import { P as Project } from './Project-DOzeI4xi.js';
|
|
7
7
|
import './PROJECT_CATEGORY-BivLHtB6.js';
|
|
@@ -224,12 +224,11 @@ type EditorAPI = {
|
|
|
224
224
|
commit: (arg: {
|
|
225
225
|
files: string[];
|
|
226
226
|
message: string;
|
|
227
|
-
email?: string;
|
|
228
227
|
}) => Promise<Result>;
|
|
229
228
|
};
|
|
230
229
|
dialog?: {
|
|
231
|
-
selectFile: () => Promise<Result<string
|
|
232
|
-
selectFolder: () => Promise<Result<string
|
|
230
|
+
selectFile: () => Promise<Result<string>>;
|
|
231
|
+
selectFolder: () => Promise<Result<string>>;
|
|
233
232
|
};
|
|
234
233
|
project?: {
|
|
235
234
|
/**
|
package/package.json
CHANGED
package/src/editor.ts
CHANGED
|
@@ -13,6 +13,13 @@ import { WatchFSEvent } from "./types/editor/WatchFSEvent";
|
|
|
13
13
|
import FileStat from "./types/editor/FileStat";
|
|
14
14
|
import Result from "./types/editor/Result";
|
|
15
15
|
import { FolderStat } from "./types/editor/FolderStat";
|
|
16
|
+
import DownloadArg from "./types/editor/DownloadArg";
|
|
17
|
+
import ListFilesArg from "./types/editor/ListFilesArg";
|
|
18
|
+
import GitContent from "./types/editor/GitContent";
|
|
19
|
+
import GitFileActionArg from "./types/editor/GitFileActionArg";
|
|
20
|
+
import GitActionArg from "./types/editor/GitActionArg";
|
|
21
|
+
import CommitArg from "./types/editor/CommitArg";
|
|
22
|
+
import ShortcutArg from "./types/editor/ShortcutArg";
|
|
16
23
|
|
|
17
24
|
export type {
|
|
18
25
|
Commit,
|
|
@@ -31,4 +38,11 @@ export type {
|
|
|
31
38
|
FolderStat,
|
|
32
39
|
Result,
|
|
33
40
|
Shortcut,
|
|
41
|
+
DownloadArg,
|
|
42
|
+
ListFilesArg,
|
|
43
|
+
GitContent,
|
|
44
|
+
GitFileActionArg,
|
|
45
|
+
GitActionArg,
|
|
46
|
+
CommitArg,
|
|
47
|
+
ShortcutArg,
|
|
34
48
|
};
|
package/src/lib/plugin/index.ts
CHANGED
|
@@ -44,15 +44,11 @@ export type EditorAPI = {
|
|
|
44
44
|
listFiles: (glob?: string) => Promise<Result<string[]>>;
|
|
45
45
|
};
|
|
46
46
|
git?: {
|
|
47
|
-
commit: (arg: {
|
|
48
|
-
files: string[];
|
|
49
|
-
message: string;
|
|
50
|
-
email?: string;
|
|
51
|
-
}) => Promise<Result>;
|
|
47
|
+
commit: (arg: { files: string[]; message: string }) => Promise<Result>;
|
|
52
48
|
};
|
|
53
49
|
dialog?: {
|
|
54
|
-
selectFile: () => Promise<Result<string
|
|
55
|
-
selectFolder: () => Promise<Result<string
|
|
50
|
+
selectFile: () => Promise<Result<string>>;
|
|
51
|
+
selectFolder: () => Promise<Result<string>>;
|
|
56
52
|
};
|
|
57
53
|
project?: {
|
|
58
54
|
/**
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FileEncoding } from "./FileContent";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Used for ipc calls related to git content, such as getting the content of a file in the HEAD or staging area. It includes the directory of the git repository, the file path relative to the repository, and an optional encoding for the file content.
|
|
5
|
+
*/
|
|
6
|
+
type GitContent = {
|
|
7
|
+
dir: string;
|
|
8
|
+
filePath: string;
|
|
9
|
+
encoding?: FileEncoding;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default GitContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Argument for git file action like discard, stage, unstage. It includes the directory of the git repository and an array of file paths relative to the repository that the action should be performed on.
|
|
3
|
+
*/
|
|
4
|
+
export default interface GitFileActionArg {
|
|
5
|
+
dir: string;
|
|
6
|
+
filePaths: string[];
|
|
7
|
+
}
|