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.
@@ -6,4 +6,4 @@ type FileContent = {
6
6
  prevContent?: string | null;
7
7
  };
8
8
 
9
- export type { FileContent as F };
9
+ export type { FileEncoding as F, FileContent as a };
@@ -6,4 +6,4 @@ type FileContent = {
6
6
  prevContent?: string | null;
7
7
  };
8
8
 
9
- export type { FileContent as F };
9
+ export type { FileEncoding as F, FileContent as a };
@@ -1,4 +1,4 @@
1
- import { F as FileContent } from './FileContent-CXlulSZq.js';
1
+ import { a as FileContent } from './FileContent-C0XQHPtC.js';
2
2
 
3
3
  type Load = {
4
4
  theme: string;
@@ -1,4 +1,4 @@
1
- import { F as FileContent } from './FileContent-CXlulSZq.mjs';
1
+ import { a as FileContent } from './FileContent-C0XQHPtC.mjs';
2
2
 
3
3
  type Load = {
4
4
  theme: string;
package/dist/api.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { R as RelayEvent, a as RelayRequest } from './RequestReturn-Dahl-hde.mjs';
2
- export { E as EventReturn, b as RequestReturn } from './RequestReturn-Dahl-hde.mjs';
3
- import './FileContent-CXlulSZq.mjs';
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-Clb_WcNj.js';
2
- export { E as EventReturn, b as RequestReturn } from './RequestReturn-Clb_WcNj.js';
3
- import './FileContent-CXlulSZq.js';
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
- export { F as FileContent } from './FileContent-CXlulSZq.mjs';
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
- export type { CopyArg, GitFileStatus, IconArg, MenuContent, Nav, Route, Settings, Shortcut, TutorialHeader, WatchFSEvent };
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
- export { F as FileContent } from './FileContent-CXlulSZq.js';
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
- export type { CopyArg, GitFileStatus, IconArg, MenuContent, Nav, Route, Settings, Shortcut, TutorialHeader, WatchFSEvent };
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 { F as FileContent } from './FileContent-CXlulSZq.mjs';
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-Dahl-hde.mjs';
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 { F as FileContent } from './FileContent-CXlulSZq.js';
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-Clb_WcNj.js';
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 { F as FileContent } from './FileContent-CXlulSZq.mjs';
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 { F as FileContent } from './FileContent-CXlulSZq.js';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-relay",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "For managing bb-editor extension",
5
5
  "license": "ISC",
6
6
  "author": "Ade Adeola",
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
  };
@@ -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,3 @@
1
+ type CommitArg = { dir: string; message: string };
2
+
3
+ export default CommitArg;
@@ -0,0 +1,3 @@
1
+ type DownloadArg = { url: string; targetDir: string };
2
+
3
+ export default DownloadArg;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @description Argument for git action like log, checkout. It includes the directory of the git repository and an optional reference.
3
+ */
4
+ export default interface GitActionArg {
5
+ dir: string;
6
+ ref?: string;
7
+ }
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ type ListFilesArg = { path: string; glob?: string };
2
+
3
+ export default ListFilesArg;
@@ -0,0 +1,5 @@
1
+ import Language from "./Language";
2
+
3
+ type ShortcutArg = { id: Language; data: unknown };
4
+
5
+ export default ShortcutArg;