bb-relay 0.0.48 → 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 };
@@ -175,6 +175,7 @@ declare const enGB: {
175
175
  "help.starting": string;
176
176
  "developer.tools.toggle": string;
177
177
  socials: string;
178
+ "login.message": string;
178
179
  };
179
180
 
180
181
  type Language = keyof typeof enGB;
@@ -175,6 +175,7 @@ declare const enGB: {
175
175
  "help.starting": string;
176
176
  "developer.tools.toggle": string;
177
177
  socials: string;
178
+ "login.message": string;
178
179
  };
179
180
 
180
181
  type Language = keyof typeof enGB;
@@ -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/constant.js CHANGED
@@ -3,11 +3,12 @@ var SENTINEL_FILE = ".release.commit";
3
3
  var SENTINEL_FILE_default = SENTINEL_FILE;
4
4
 
5
5
  // src/constants/WEBSITE.ts
6
+ var isDev = process.env.NODE_ENV === "development";
6
7
  var WEBSITE = {
7
- main: "http://bb-editor.adeolaade.com/",
8
- console: "http://bb-console.adeolaade.com",
9
- marketplace: "http://bb-marketplace.adeolaade.com",
10
- docs: "http://bb-docs.adeolaade.com"
8
+ main: isDev ? "http://localhost:3000" : "http://bb-editor.adeolaade.com/",
9
+ console: isDev ? "http://localhost:3000" : "http://bb-console.adeolaade.com",
10
+ marketplace: isDev ? "http://localhost:3000" : "http://bb-marketplace.adeolaade.com",
11
+ docs: isDev ? "http://localhost:3000" : "http://bb-docs.adeolaade.com"
11
12
  };
12
13
  var WEBSITE_default = WEBSITE;
13
14
 
package/dist/constant.mjs CHANGED
@@ -3,11 +3,12 @@ var SENTINEL_FILE = ".release.commit";
3
3
  var SENTINEL_FILE_default = SENTINEL_FILE;
4
4
 
5
5
  // src/constants/WEBSITE.ts
6
+ var isDev = process.env.NODE_ENV === "development";
6
7
  var WEBSITE = {
7
- main: "http://bb-editor.adeolaade.com/",
8
- console: "http://bb-console.adeolaade.com",
9
- marketplace: "http://bb-marketplace.adeolaade.com",
10
- docs: "http://bb-docs.adeolaade.com"
8
+ main: isDev ? "http://localhost:3000" : "http://bb-editor.adeolaade.com/",
9
+ console: isDev ? "http://localhost:3000" : "http://bb-console.adeolaade.com",
10
+ marketplace: isDev ? "http://localhost:3000" : "http://bb-marketplace.adeolaade.com",
11
+ docs: isDev ? "http://localhost:3000" : "http://bb-docs.adeolaade.com"
11
12
  };
12
13
  var WEBSITE_default = WEBSITE;
13
14
 
package/dist/editor.d.mts CHANGED
@@ -1,7 +1,8 @@
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';
4
- import { L as Language, a as Locale } from './Locale-DQ4a71QR.mjs';
3
+ import { F as FileEncoding } from './FileContent-C0XQHPtC.mjs';
4
+ export { a as FileContent } from './FileContent-C0XQHPtC.mjs';
5
+ import { L as Language, a as Locale } from './Locale-CdRgNxJo.mjs';
5
6
  export { R as Result } from './Result-BLbZLEgX.mjs';
6
7
 
7
8
  type CopyArg = {
@@ -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,7 +1,8 @@
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';
4
- import { L as Language, a as Locale } from './Locale-DQ4a71QR.js';
3
+ import { F as FileEncoding } from './FileContent-C0XQHPtC.js';
4
+ export { a as FileContent } from './FileContent-C0XQHPtC.js';
5
+ import { L as Language, a as Locale } from './Locale-CdRgNxJo.js';
5
6
  export { R as Result } from './Result-BLbZLEgX.js';
6
7
 
7
8
  type CopyArg = {
@@ -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/locale.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as Language } from './Locale-DQ4a71QR.mjs';
2
- export { a as Locale, e as enGB } from './Locale-DQ4a71QR.mjs';
1
+ import { L as Language } from './Locale-CdRgNxJo.mjs';
2
+ export { a as Locale, e as enGB } from './Locale-CdRgNxJo.mjs';
3
3
 
4
4
  declare const frFR: {
5
5
  [key in Language]: string;
package/dist/locale.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as Language } from './Locale-DQ4a71QR.js';
2
- export { a as Locale, e as enGB } from './Locale-DQ4a71QR.js';
1
+ import { L as Language } from './Locale-CdRgNxJo.js';
2
+ export { a as Locale, e as enGB } from './Locale-CdRgNxJo.js';
3
3
 
4
4
  declare const frFR: {
5
5
  [key in Language]: string;
package/dist/locale.js CHANGED
@@ -175,7 +175,8 @@ var enGB = {
175
175
  "project.close": "Close project",
176
176
  "help.starting": "Getting started",
177
177
  "developer.tools.toggle": "Toggle Developer tools",
178
- socials: "Socials"
178
+ socials: "Socials",
179
+ "login.message": "Login to sync project"
179
180
  };
180
181
  var en_GB_default = enGB;
181
182
 
@@ -356,7 +357,8 @@ var frFR = {
356
357
  "project.close": "Fermer le projet",
357
358
  "help.starting": "Getting started",
358
359
  "developer.tools.toggle": "(D\xE9s)activer les outils de d\xE9v",
359
- socials: "Sociaux"
360
+ socials: "Sociaux",
361
+ "login.message": "Connectez-vous pour synchroniser le projet"
360
362
  };
361
363
  var fr_FR_default = frFR;
362
364
 
package/dist/locale.mjs CHANGED
@@ -175,7 +175,8 @@ var enGB = {
175
175
  "project.close": "Close project",
176
176
  "help.starting": "Getting started",
177
177
  "developer.tools.toggle": "Toggle Developer tools",
178
- socials: "Socials"
178
+ socials: "Socials",
179
+ "login.message": "Login to sync project"
179
180
  };
180
181
  var en_GB_default = enGB;
181
182
 
@@ -356,7 +357,8 @@ var frFR = {
356
357
  "project.close": "Fermer le projet",
357
358
  "help.starting": "Getting started",
358
359
  "developer.tools.toggle": "(D\xE9s)activer les outils de d\xE9v",
359
- socials: "Sociaux"
360
+ socials: "Sociaux",
361
+ "login.message": "Connectez-vous pour synchroniser le projet"
360
362
  };
361
363
  var fr_FR_default = frFR;
362
364
  export {
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.48",
3
+ "version": "0.0.50",
4
4
  "description": "For managing bb-editor extension",
5
5
  "license": "ISC",
6
6
  "author": "Ade Adeola",
@@ -1,8 +1,11 @@
1
+ const isDev = process.env.NODE_ENV === "development";
1
2
  const WEBSITE = {
2
- main: "http://bb-editor.adeolaade.com/",
3
- console: "http://bb-console.adeolaade.com",
4
- marketplace: "http://bb-marketplace.adeolaade.com",
5
- docs: "http://bb-docs.adeolaade.com",
3
+ main: isDev ? "http://localhost:3000" : "http://bb-editor.adeolaade.com/",
4
+ console: isDev ? "http://localhost:3000" : "http://bb-console.adeolaade.com",
5
+ marketplace: isDev
6
+ ? "http://localhost:3000"
7
+ : "http://bb-marketplace.adeolaade.com",
8
+ docs: isDev ? "http://localhost:3000" : "http://bb-docs.adeolaade.com",
6
9
  };
7
10
 
8
11
  export default WEBSITE;
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
  /**
@@ -184,6 +184,7 @@ export const enGB = {
184
184
  "help.starting": "Getting started",
185
185
  "developer.tools.toggle": "Toggle Developer tools",
186
186
  socials: "Socials",
187
+ "login.message": "Login to sync project",
187
188
  };
188
189
 
189
190
  export default enGB;
@@ -187,6 +187,7 @@ export const frFR: { [key in Language]: string } = {
187
187
  "help.starting": "Getting started",
188
188
  "developer.tools.toggle": "(Dés)activer les outils de dév",
189
189
  socials: "Sociaux",
190
+ "login.message": "Connectez-vous pour synchroniser le projet",
190
191
  };
191
192
 
192
193
  export default frFR;
@@ -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;