bb-relay 0.0.2 → 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 +53 -167
- package/dist/index.d.ts +53 -167
- package/package.json +1 -1
- package/src/index.ts +4 -2
- package/src/types/Zip.ts +15 -0
- package/src/types/editor/User.ts +9 -8
- package/src/types/plugins/Plugin.ts +22 -0
- package/src/types/plugins/Release.ts +14 -0
- package/src/types/editor/PluginItem.ts +0 -14
package/dist/index.d.mts
CHANGED
|
@@ -301,6 +301,7 @@ type WatchFSEvent = "updated" | "deleted";
|
|
|
301
301
|
type User = {
|
|
302
302
|
id: string;
|
|
303
303
|
name: string;
|
|
304
|
+
username: string;
|
|
304
305
|
email: string;
|
|
305
306
|
bio: string;
|
|
306
307
|
avatar: string;
|
|
@@ -464,172 +465,6 @@ interface MenuContent {
|
|
|
464
465
|
|
|
465
466
|
type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote";
|
|
466
467
|
|
|
467
|
-
type Database = {
|
|
468
|
-
__InternalSupabase: {
|
|
469
|
-
PostgrestVersion: "13.0.4";
|
|
470
|
-
};
|
|
471
|
-
public: {
|
|
472
|
-
Tables: {
|
|
473
|
-
plugin_versions: {
|
|
474
|
-
Row: {
|
|
475
|
-
archived: boolean;
|
|
476
|
-
created_at: string;
|
|
477
|
-
id: number;
|
|
478
|
-
plugin_id: number;
|
|
479
|
-
release_note: string;
|
|
480
|
-
size: number;
|
|
481
|
-
stage: Database["public"]["Enums"]["version_stage"];
|
|
482
|
-
updated_at: string;
|
|
483
|
-
version: string;
|
|
484
|
-
};
|
|
485
|
-
Insert: {
|
|
486
|
-
archived?: boolean;
|
|
487
|
-
created_at?: string;
|
|
488
|
-
id?: number;
|
|
489
|
-
plugin_id: number;
|
|
490
|
-
release_note: string;
|
|
491
|
-
size?: number;
|
|
492
|
-
stage?: Database["public"]["Enums"]["version_stage"];
|
|
493
|
-
updated_at?: string;
|
|
494
|
-
version: string;
|
|
495
|
-
};
|
|
496
|
-
Update: {
|
|
497
|
-
archived?: boolean;
|
|
498
|
-
created_at?: string;
|
|
499
|
-
id?: number;
|
|
500
|
-
plugin_id?: number;
|
|
501
|
-
release_note?: string;
|
|
502
|
-
size?: number;
|
|
503
|
-
stage?: Database["public"]["Enums"]["version_stage"];
|
|
504
|
-
updated_at?: string;
|
|
505
|
-
version?: string;
|
|
506
|
-
};
|
|
507
|
-
Relationships: [
|
|
508
|
-
{
|
|
509
|
-
foreignKeyName: "plugin_versions_plugin_id_fkey";
|
|
510
|
-
columns: ["plugin_id"];
|
|
511
|
-
isOneToOne: false;
|
|
512
|
-
referencedRelation: "plugins";
|
|
513
|
-
referencedColumns: ["id"];
|
|
514
|
-
}
|
|
515
|
-
];
|
|
516
|
-
};
|
|
517
|
-
plugins: {
|
|
518
|
-
Row: {
|
|
519
|
-
author_id: string;
|
|
520
|
-
categories: string[] | null;
|
|
521
|
-
created_at: string;
|
|
522
|
-
description: string | null;
|
|
523
|
-
homepage: string | null;
|
|
524
|
-
id: number;
|
|
525
|
-
key: string;
|
|
526
|
-
name: string | null;
|
|
527
|
-
npm_package: string | null;
|
|
528
|
-
updated_at: string;
|
|
529
|
-
};
|
|
530
|
-
Insert: {
|
|
531
|
-
author_id?: string;
|
|
532
|
-
categories?: string[] | null;
|
|
533
|
-
created_at?: string;
|
|
534
|
-
description?: string | null;
|
|
535
|
-
homepage?: string | null;
|
|
536
|
-
id?: number;
|
|
537
|
-
key?: string;
|
|
538
|
-
name?: string | null;
|
|
539
|
-
npm_package?: string | null;
|
|
540
|
-
updated_at?: string;
|
|
541
|
-
};
|
|
542
|
-
Update: {
|
|
543
|
-
author_id?: string;
|
|
544
|
-
categories?: string[] | null;
|
|
545
|
-
created_at?: string;
|
|
546
|
-
description?: string | null;
|
|
547
|
-
homepage?: string | null;
|
|
548
|
-
id?: number;
|
|
549
|
-
key?: string;
|
|
550
|
-
name?: string | null;
|
|
551
|
-
npm_package?: string | null;
|
|
552
|
-
updated_at?: string;
|
|
553
|
-
};
|
|
554
|
-
Relationships: [
|
|
555
|
-
{
|
|
556
|
-
foreignKeyName: "plugins_author_id_fkey";
|
|
557
|
-
columns: ["author_id"];
|
|
558
|
-
isOneToOne: false;
|
|
559
|
-
referencedRelation: "profiles";
|
|
560
|
-
referencedColumns: ["id"];
|
|
561
|
-
}
|
|
562
|
-
];
|
|
563
|
-
};
|
|
564
|
-
profiles: {
|
|
565
|
-
Row: {
|
|
566
|
-
avatar_url: string | null;
|
|
567
|
-
full_name: string | null;
|
|
568
|
-
id: string;
|
|
569
|
-
updated_at: string | null;
|
|
570
|
-
username: string | null;
|
|
571
|
-
website: string | null;
|
|
572
|
-
};
|
|
573
|
-
Insert: {
|
|
574
|
-
avatar_url?: string | null;
|
|
575
|
-
full_name?: string | null;
|
|
576
|
-
id: string;
|
|
577
|
-
updated_at?: string | null;
|
|
578
|
-
username?: string | null;
|
|
579
|
-
website?: string | null;
|
|
580
|
-
};
|
|
581
|
-
Update: {
|
|
582
|
-
avatar_url?: string | null;
|
|
583
|
-
full_name?: string | null;
|
|
584
|
-
id?: string;
|
|
585
|
-
updated_at?: string | null;
|
|
586
|
-
username?: string | null;
|
|
587
|
-
website?: string | null;
|
|
588
|
-
};
|
|
589
|
-
Relationships: [];
|
|
590
|
-
};
|
|
591
|
-
};
|
|
592
|
-
Views: {
|
|
593
|
-
[_ in never]: never;
|
|
594
|
-
};
|
|
595
|
-
Functions: {
|
|
596
|
-
[_ in never]: never;
|
|
597
|
-
};
|
|
598
|
-
Enums: {
|
|
599
|
-
version_stage: "DRAFT" | "ALPHA" | "BETA" | "PROD";
|
|
600
|
-
};
|
|
601
|
-
CompositeTypes: {
|
|
602
|
-
[_ in never]: never;
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
};
|
|
606
|
-
type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
|
|
607
|
-
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
|
|
608
|
-
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
|
|
609
|
-
schema: keyof DatabaseWithoutInternals;
|
|
610
|
-
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
611
|
-
schema: keyof DatabaseWithoutInternals;
|
|
612
|
-
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
613
|
-
schema: keyof DatabaseWithoutInternals;
|
|
614
|
-
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
615
|
-
Row: infer R;
|
|
616
|
-
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
|
|
617
|
-
Row: infer R;
|
|
618
|
-
} ? R : never : never;
|
|
619
|
-
|
|
620
|
-
type PluginItem = Tables<"plugins"> & {
|
|
621
|
-
production_version: {
|
|
622
|
-
id: number;
|
|
623
|
-
version: string;
|
|
624
|
-
release_note: string;
|
|
625
|
-
size: number;
|
|
626
|
-
updated_at: string;
|
|
627
|
-
} | null;
|
|
628
|
-
profile: {
|
|
629
|
-
username: string | null;
|
|
630
|
-
} | null;
|
|
631
|
-
};
|
|
632
|
-
|
|
633
468
|
interface RenameType {
|
|
634
469
|
path: string;
|
|
635
470
|
name: string;
|
|
@@ -663,4 +498,55 @@ declare const frFR: {
|
|
|
663
498
|
[key in Language]: ;
|
|
664
499
|
};
|
|
665
500
|
|
|
666
|
-
|
|
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
|
@@ -301,6 +301,7 @@ type WatchFSEvent = "updated" | "deleted";
|
|
|
301
301
|
type User = {
|
|
302
302
|
id: string;
|
|
303
303
|
name: string;
|
|
304
|
+
username: string;
|
|
304
305
|
email: string;
|
|
305
306
|
bio: string;
|
|
306
307
|
avatar: string;
|
|
@@ -464,172 +465,6 @@ interface MenuContent {
|
|
|
464
465
|
|
|
465
466
|
type Nav = "file-explorer" | "checkpoints" | "plugins" | "settings" | "remote";
|
|
466
467
|
|
|
467
|
-
type Database = {
|
|
468
|
-
__InternalSupabase: {
|
|
469
|
-
PostgrestVersion: "13.0.4";
|
|
470
|
-
};
|
|
471
|
-
public: {
|
|
472
|
-
Tables: {
|
|
473
|
-
plugin_versions: {
|
|
474
|
-
Row: {
|
|
475
|
-
archived: boolean;
|
|
476
|
-
created_at: string;
|
|
477
|
-
id: number;
|
|
478
|
-
plugin_id: number;
|
|
479
|
-
release_note: string;
|
|
480
|
-
size: number;
|
|
481
|
-
stage: Database["public"]["Enums"]["version_stage"];
|
|
482
|
-
updated_at: string;
|
|
483
|
-
version: string;
|
|
484
|
-
};
|
|
485
|
-
Insert: {
|
|
486
|
-
archived?: boolean;
|
|
487
|
-
created_at?: string;
|
|
488
|
-
id?: number;
|
|
489
|
-
plugin_id: number;
|
|
490
|
-
release_note: string;
|
|
491
|
-
size?: number;
|
|
492
|
-
stage?: Database["public"]["Enums"]["version_stage"];
|
|
493
|
-
updated_at?: string;
|
|
494
|
-
version: string;
|
|
495
|
-
};
|
|
496
|
-
Update: {
|
|
497
|
-
archived?: boolean;
|
|
498
|
-
created_at?: string;
|
|
499
|
-
id?: number;
|
|
500
|
-
plugin_id?: number;
|
|
501
|
-
release_note?: string;
|
|
502
|
-
size?: number;
|
|
503
|
-
stage?: Database["public"]["Enums"]["version_stage"];
|
|
504
|
-
updated_at?: string;
|
|
505
|
-
version?: string;
|
|
506
|
-
};
|
|
507
|
-
Relationships: [
|
|
508
|
-
{
|
|
509
|
-
foreignKeyName: "plugin_versions_plugin_id_fkey";
|
|
510
|
-
columns: ["plugin_id"];
|
|
511
|
-
isOneToOne: false;
|
|
512
|
-
referencedRelation: "plugins";
|
|
513
|
-
referencedColumns: ["id"];
|
|
514
|
-
}
|
|
515
|
-
];
|
|
516
|
-
};
|
|
517
|
-
plugins: {
|
|
518
|
-
Row: {
|
|
519
|
-
author_id: string;
|
|
520
|
-
categories: string[] | null;
|
|
521
|
-
created_at: string;
|
|
522
|
-
description: string | null;
|
|
523
|
-
homepage: string | null;
|
|
524
|
-
id: number;
|
|
525
|
-
key: string;
|
|
526
|
-
name: string | null;
|
|
527
|
-
npm_package: string | null;
|
|
528
|
-
updated_at: string;
|
|
529
|
-
};
|
|
530
|
-
Insert: {
|
|
531
|
-
author_id?: string;
|
|
532
|
-
categories?: string[] | null;
|
|
533
|
-
created_at?: string;
|
|
534
|
-
description?: string | null;
|
|
535
|
-
homepage?: string | null;
|
|
536
|
-
id?: number;
|
|
537
|
-
key?: string;
|
|
538
|
-
name?: string | null;
|
|
539
|
-
npm_package?: string | null;
|
|
540
|
-
updated_at?: string;
|
|
541
|
-
};
|
|
542
|
-
Update: {
|
|
543
|
-
author_id?: string;
|
|
544
|
-
categories?: string[] | null;
|
|
545
|
-
created_at?: string;
|
|
546
|
-
description?: string | null;
|
|
547
|
-
homepage?: string | null;
|
|
548
|
-
id?: number;
|
|
549
|
-
key?: string;
|
|
550
|
-
name?: string | null;
|
|
551
|
-
npm_package?: string | null;
|
|
552
|
-
updated_at?: string;
|
|
553
|
-
};
|
|
554
|
-
Relationships: [
|
|
555
|
-
{
|
|
556
|
-
foreignKeyName: "plugins_author_id_fkey";
|
|
557
|
-
columns: ["author_id"];
|
|
558
|
-
isOneToOne: false;
|
|
559
|
-
referencedRelation: "profiles";
|
|
560
|
-
referencedColumns: ["id"];
|
|
561
|
-
}
|
|
562
|
-
];
|
|
563
|
-
};
|
|
564
|
-
profiles: {
|
|
565
|
-
Row: {
|
|
566
|
-
avatar_url: string | null;
|
|
567
|
-
full_name: string | null;
|
|
568
|
-
id: string;
|
|
569
|
-
updated_at: string | null;
|
|
570
|
-
username: string | null;
|
|
571
|
-
website: string | null;
|
|
572
|
-
};
|
|
573
|
-
Insert: {
|
|
574
|
-
avatar_url?: string | null;
|
|
575
|
-
full_name?: string | null;
|
|
576
|
-
id: string;
|
|
577
|
-
updated_at?: string | null;
|
|
578
|
-
username?: string | null;
|
|
579
|
-
website?: string | null;
|
|
580
|
-
};
|
|
581
|
-
Update: {
|
|
582
|
-
avatar_url?: string | null;
|
|
583
|
-
full_name?: string | null;
|
|
584
|
-
id?: string;
|
|
585
|
-
updated_at?: string | null;
|
|
586
|
-
username?: string | null;
|
|
587
|
-
website?: string | null;
|
|
588
|
-
};
|
|
589
|
-
Relationships: [];
|
|
590
|
-
};
|
|
591
|
-
};
|
|
592
|
-
Views: {
|
|
593
|
-
[_ in never]: never;
|
|
594
|
-
};
|
|
595
|
-
Functions: {
|
|
596
|
-
[_ in never]: never;
|
|
597
|
-
};
|
|
598
|
-
Enums: {
|
|
599
|
-
version_stage: "DRAFT" | "ALPHA" | "BETA" | "PROD";
|
|
600
|
-
};
|
|
601
|
-
CompositeTypes: {
|
|
602
|
-
[_ in never]: never;
|
|
603
|
-
};
|
|
604
|
-
};
|
|
605
|
-
};
|
|
606
|
-
type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
|
|
607
|
-
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
|
|
608
|
-
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
|
|
609
|
-
schema: keyof DatabaseWithoutInternals;
|
|
610
|
-
}, TableName extends DefaultSchemaTableNameOrOptions extends {
|
|
611
|
-
schema: keyof DatabaseWithoutInternals;
|
|
612
|
-
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
|
|
613
|
-
schema: keyof DatabaseWithoutInternals;
|
|
614
|
-
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
615
|
-
Row: infer R;
|
|
616
|
-
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
|
|
617
|
-
Row: infer R;
|
|
618
|
-
} ? R : never : never;
|
|
619
|
-
|
|
620
|
-
type PluginItem = Tables<"plugins"> & {
|
|
621
|
-
production_version: {
|
|
622
|
-
id: number;
|
|
623
|
-
version: string;
|
|
624
|
-
release_note: string;
|
|
625
|
-
size: number;
|
|
626
|
-
updated_at: string;
|
|
627
|
-
} | null;
|
|
628
|
-
profile: {
|
|
629
|
-
username: string | null;
|
|
630
|
-
} | null;
|
|
631
|
-
};
|
|
632
|
-
|
|
633
468
|
interface RenameType {
|
|
634
469
|
path: string;
|
|
635
470
|
name: string;
|
|
@@ -663,4 +498,55 @@ declare const frFR: {
|
|
|
663
498
|
[key in Language]: ;
|
|
664
499
|
};
|
|
665
500
|
|
|
666
|
-
|
|
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
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 { PluginItem } from "./types/editor/PluginItem";
|
|
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
|
-
PluginItem,
|
|
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 };
|
package/src/types/Zip.ts
ADDED
|
@@ -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
|
+
}
|
package/src/types/editor/User.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export type User = {
|
|
2
|
-
id: string
|
|
3
|
-
name: string
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
username: string;
|
|
5
|
+
email: string;
|
|
6
|
+
bio: string;
|
|
7
|
+
avatar: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
};
|
|
@@ -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,14 +0,0 @@
|
|
|
1
|
-
import { Tables } from "./database.types";
|
|
2
|
-
|
|
3
|
-
export type PluginItem = Tables<"plugins"> & {
|
|
4
|
-
production_version: {
|
|
5
|
-
id: number;
|
|
6
|
-
version: string;
|
|
7
|
-
release_note: string;
|
|
8
|
-
size: number;
|
|
9
|
-
updated_at: string;
|
|
10
|
-
} | null;
|
|
11
|
-
profile: {
|
|
12
|
-
username: string | null;
|
|
13
|
-
} | null;
|
|
14
|
-
};
|