bb-relay 0.0.3 → 0.0.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/dist/index.d.mts CHANGED
@@ -465,29 +465,6 @@ interface MenuContent {
465
465
 
466
466
  type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote";
467
467
 
468
- type Plugin = {
469
- id: string;
470
- slug: string;
471
- userId: string;
472
- size: number;
473
- latestProduction: {
474
- version: string;
475
- id: number;
476
- };
477
- latestBeta: {
478
- version: string;
479
- id: number;
480
- };
481
- latestAlpha: {
482
- version: string;
483
- id: number;
484
- };
485
- latestDraft: {
486
- version: string;
487
- id: number;
488
- };
489
- };
490
-
491
468
  interface RenameType {
492
469
  path: string;
493
470
  name: string;
@@ -521,4 +498,55 @@ declare const frFR: {
521
498
  [key in Language]: ;
522
499
  };
523
500
 
524
- export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type RenameType, type RequestReturn, type Result, type Route, type Settings, type TutorialHeader, type User, type WatchFSEvent, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest };
501
+ type Release = {
502
+ storageRef: string;
503
+ changes: string;
504
+ version: string;
505
+ type: "production" | "beta" | "alpha" | "draft";
506
+ slug: string;
507
+ metadata: {
508
+ uploadedAt: number;
509
+ totalFiles: number;
510
+ totalSize: number;
511
+ };
512
+ createdAt: string;
513
+ id?: string;
514
+ };
515
+
516
+ type Status = Omit<Release, "type">;
517
+ /**
518
+ * This will be pulled from two firestore
519
+ * The part of name, description etc will be in the main
520
+ * Things like installs will be in the registry
521
+ */
522
+ type Plugin = {
523
+ userId: string;
524
+ slug: string;
525
+ name: string;
526
+ description: string | null;
527
+ installs: number;
528
+ archived?: boolean;
529
+ deprecated?: boolean;
530
+ alpha: Status | null;
531
+ beta: Status | null;
532
+ production: Status | null;
533
+ createdAt: string;
534
+ updatedAt: string;
535
+ };
536
+
537
+ interface FileNode {
538
+ name: string;
539
+ path: string;
540
+ type: "file" | "folder";
541
+ size?: number;
542
+ content?: string | ArrayBuffer;
543
+ mimeType?: string;
544
+ children?: FileNode[];
545
+ }
546
+ interface Zip {
547
+ files: FileNode[];
548
+ totalFiles: number;
549
+ totalSize: number;
550
+ }
551
+
552
+ export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type Release, type RenameType, type RequestReturn, type Result, type Route, type Settings, type TutorialHeader, type User, type WatchFSEvent, type Zip, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest };
package/dist/index.d.ts CHANGED
@@ -465,29 +465,6 @@ interface MenuContent {
465
465
 
466
466
  type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote";
467
467
 
468
- type Plugin = {
469
- id: string;
470
- slug: string;
471
- userId: string;
472
- size: number;
473
- latestProduction: {
474
- version: string;
475
- id: number;
476
- };
477
- latestBeta: {
478
- version: string;
479
- id: number;
480
- };
481
- latestAlpha: {
482
- version: string;
483
- id: number;
484
- };
485
- latestDraft: {
486
- version: string;
487
- id: number;
488
- };
489
- };
490
-
491
468
  interface RenameType {
492
469
  path: string;
493
470
  name: string;
@@ -521,4 +498,55 @@ declare const frFR: {
521
498
  [key in Language]: ;
522
499
  };
523
500
 
524
- export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type RenameType, type RequestReturn, type Result, type Route, type Settings, type TutorialHeader, type User, type WatchFSEvent, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest };
501
+ type Release = {
502
+ storageRef: string;
503
+ changes: string;
504
+ version: string;
505
+ type: "production" | "beta" | "alpha" | "draft";
506
+ slug: string;
507
+ metadata: {
508
+ uploadedAt: number;
509
+ totalFiles: number;
510
+ totalSize: number;
511
+ };
512
+ createdAt: string;
513
+ id?: string;
514
+ };
515
+
516
+ type Status = Omit<Release, "type">;
517
+ /**
518
+ * This will be pulled from two firestore
519
+ * The part of name, description etc will be in the main
520
+ * Things like installs will be in the registry
521
+ */
522
+ type Plugin = {
523
+ userId: string;
524
+ slug: string;
525
+ name: string;
526
+ description: string | null;
527
+ installs: number;
528
+ archived?: boolean;
529
+ deprecated?: boolean;
530
+ alpha: Status | null;
531
+ beta: Status | null;
532
+ production: Status | null;
533
+ createdAt: string;
534
+ updatedAt: string;
535
+ };
536
+
537
+ interface FileNode {
538
+ name: string;
539
+ path: string;
540
+ type: "file" | "folder";
541
+ size?: number;
542
+ content?: string | ArrayBuffer;
543
+ mimeType?: string;
544
+ children?: FileNode[];
545
+ }
546
+ interface Zip {
547
+ files: FileNode[];
548
+ totalFiles: number;
549
+ totalSize: number;
550
+ }
551
+
552
+ export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type Release, type RenameType, type RequestReturn, type Result, type Route, type Settings, type TutorialHeader, type User, type WatchFSEvent, type Zip, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-relay",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "For managing bb-editor extension",
5
5
  "license": "ISC",
6
6
  "author": "Ade Adeola",
package/src/index.ts CHANGED
@@ -22,7 +22,6 @@ import Language from "./types/editor/Language";
22
22
  import Locale from "./types/editor/Locale";
23
23
  import { MenuContent } from "./types/editor/MenuContent";
24
24
  import Nav from "./types/editor/Nav";
25
- import { Plugin } from "./types/editor/Plugin";
26
25
  import Project from "./types/project/Project";
27
26
  import { RenameType } from "./types/editor/RenameType";
28
27
  import Result from "./types/editor/Result";
@@ -31,6 +30,9 @@ import { Settings } from "./types/editor/Settings";
31
30
  import { TutorialHeader } from "./types/editor/TutorialHeader";
32
31
  import enGB from "./locales/en-GB";
33
32
  import frFR from "./locales/fr-FR";
33
+ import { Release } from "./types/plugins/Release";
34
+ import { Plugin } from "./types/plugins/Plugin";
35
+ import { Zip } from "./types/Zip";
34
36
 
35
37
  export default BBRelay;
36
38
 
@@ -58,7 +60,6 @@ export type {
58
60
  Locale,
59
61
  MenuContent,
60
62
  Nav,
61
- Plugin,
62
63
  Project,
63
64
  RenameType,
64
65
  Result,
@@ -69,4 +70,5 @@ export type {
69
70
  WatchFSEvent,
70
71
  };
71
72
 
73
+ export type { Release, Plugin, Zip };
72
74
  export { enGB, frFR };
@@ -0,0 +1,15 @@
1
+ interface FileNode {
2
+ name: string;
3
+ path: string;
4
+ type: "file" | "folder";
5
+ size?: number;
6
+ content?: string | ArrayBuffer;
7
+ mimeType?: string;
8
+ children?: FileNode[];
9
+ }
10
+
11
+ export interface Zip {
12
+ files: FileNode[];
13
+ totalFiles: number;
14
+ totalSize: number;
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Release } from "./Release";
2
+
3
+ type Status = Omit<Release, "type">;
4
+ /**
5
+ * This will be pulled from two firestore
6
+ * The part of name, description etc will be in the main
7
+ * Things like installs will be in the registry
8
+ */
9
+ export type Plugin = {
10
+ userId: string;
11
+ slug: string;
12
+ name: string;
13
+ description: string | null;
14
+ installs: number;
15
+ archived?: boolean;
16
+ deprecated?: boolean;
17
+ alpha: Status | null;
18
+ beta: Status | null;
19
+ production: Status | null;
20
+ createdAt: string;
21
+ updatedAt: string;
22
+ };
@@ -0,0 +1,14 @@
1
+ export type Release = {
2
+ storageRef: string;
3
+ changes: string;
4
+ version: string;
5
+ type: "production" | "beta" | "alpha" | "draft";
6
+ slug: string;
7
+ metadata: {
8
+ uploadedAt: number;
9
+ totalFiles: number;
10
+ totalSize: number;
11
+ };
12
+ createdAt: string;
13
+ id?: string
14
+ };
@@ -1,22 +0,0 @@
1
- export type Plugin = {
2
- id: string;
3
- slug: string;
4
- userId: string;
5
- size: number;
6
- latestProduction: {
7
- version: string;
8
- id: number;
9
- };
10
- latestBeta: {
11
- version: string;
12
- id: number;
13
- };
14
- latestAlpha: {
15
- version: string;
16
- id: number;
17
- };
18
- latestDraft: {
19
- version: string;
20
- id: number;
21
- };
22
- };