bb-relay 0.0.14 → 0.0.16

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
@@ -498,7 +498,7 @@ declare const frFR: {
498
498
  [key in Language]: string;
499
499
  };
500
500
 
501
- type Release = {
501
+ type BaseRelease = {
502
502
  storageRef: string;
503
503
  changes: string;
504
504
  version: string;
@@ -510,19 +510,24 @@ type Release = {
510
510
  totalSize: number;
511
511
  };
512
512
  createdAt: string;
513
- id?: string;
513
+ id: string;
514
514
  updatedAt: string;
515
515
  userId: string;
516
516
  installs: number;
517
517
  };
518
+ type Release = {
519
+ insert: Omit<BaseRelease, "id">;
520
+ update: Partial<Exclude<BaseRelease, "id">>;
521
+ doc: BaseRelease;
522
+ };
518
523
 
519
- type Status = Omit<Release, "type">;
524
+ type Status = Omit<Release["doc"], "type">;
520
525
  /**
521
526
  * This will be pulled from two firestore
522
527
  * The part of name, description etc will be in the main
523
528
  * Things like installs will be in the registry
524
529
  */
525
- type Plugin = {
530
+ type BasePlugin = {
526
531
  userId: string;
527
532
  slug: string;
528
533
  name: string;
@@ -535,8 +540,14 @@ type Plugin = {
535
540
  updatedAt: string;
536
541
  tags: string[];
537
542
  username: string;
543
+ id: string;
538
544
  avatar?: string;
539
545
  };
546
+ type Plugin = {
547
+ insert: Omit<BasePlugin, "id">;
548
+ update: Partial<Exclude<BasePlugin, "id">>;
549
+ doc: BasePlugin;
550
+ };
540
551
 
541
552
  interface FileNode {
542
553
  name: string;
@@ -559,9 +570,9 @@ type ValidateManifestProp = {
559
570
  };
560
571
  declare const validateManifest: (manifestContent: string) => ValidateManifestProp[];
561
572
 
562
- type Rating = {
573
+ type BaseRating = {
563
574
  userId: string;
564
- pluginId: string;
575
+ RatingId: string;
565
576
  rating: number;
566
577
  comment?: string;
567
578
  createdAt: string;
@@ -569,6 +580,11 @@ type Rating = {
569
580
  username: string;
570
581
  avatar?: string;
571
582
  };
583
+ type Rating = {
584
+ insert: Omit<BaseRating, "id">;
585
+ update: Partial<Exclude<BaseRating, "id">>;
586
+ doc: BaseRating;
587
+ };
572
588
 
573
589
  declare const SENTINEL_FILE = ".release.commit";
574
590
 
@@ -579,4 +595,6 @@ declare const WEBSITE: {
579
595
  docs: string;
580
596
  };
581
597
 
582
- export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type FileNode, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type Rating, type Release, type RenameType, type RequestReturn, type Result, type Route, SENTINEL_FILE, type Settings, type TutorialHeader, type User, type ValidateManifestProp, WEBSITE, type WatchFSEvent, type Zip, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest, validateManifest };
598
+ declare const DATA_ALIAS = "${userData}";
599
+
600
+ export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, DATA_ALIAS, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type FileNode, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type Rating, type Release, type RenameType, type RequestReturn, type Result, type Route, SENTINEL_FILE, type Settings, type TutorialHeader, type User, type ValidateManifestProp, WEBSITE, type WatchFSEvent, type Zip, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest, validateManifest };
package/dist/index.d.ts CHANGED
@@ -498,7 +498,7 @@ declare const frFR: {
498
498
  [key in Language]: string;
499
499
  };
500
500
 
501
- type Release = {
501
+ type BaseRelease = {
502
502
  storageRef: string;
503
503
  changes: string;
504
504
  version: string;
@@ -510,19 +510,24 @@ type Release = {
510
510
  totalSize: number;
511
511
  };
512
512
  createdAt: string;
513
- id?: string;
513
+ id: string;
514
514
  updatedAt: string;
515
515
  userId: string;
516
516
  installs: number;
517
517
  };
518
+ type Release = {
519
+ insert: Omit<BaseRelease, "id">;
520
+ update: Partial<Exclude<BaseRelease, "id">>;
521
+ doc: BaseRelease;
522
+ };
518
523
 
519
- type Status = Omit<Release, "type">;
524
+ type Status = Omit<Release["doc"], "type">;
520
525
  /**
521
526
  * This will be pulled from two firestore
522
527
  * The part of name, description etc will be in the main
523
528
  * Things like installs will be in the registry
524
529
  */
525
- type Plugin = {
530
+ type BasePlugin = {
526
531
  userId: string;
527
532
  slug: string;
528
533
  name: string;
@@ -535,8 +540,14 @@ type Plugin = {
535
540
  updatedAt: string;
536
541
  tags: string[];
537
542
  username: string;
543
+ id: string;
538
544
  avatar?: string;
539
545
  };
546
+ type Plugin = {
547
+ insert: Omit<BasePlugin, "id">;
548
+ update: Partial<Exclude<BasePlugin, "id">>;
549
+ doc: BasePlugin;
550
+ };
540
551
 
541
552
  interface FileNode {
542
553
  name: string;
@@ -559,9 +570,9 @@ type ValidateManifestProp = {
559
570
  };
560
571
  declare const validateManifest: (manifestContent: string) => ValidateManifestProp[];
561
572
 
562
- type Rating = {
573
+ type BaseRating = {
563
574
  userId: string;
564
- pluginId: string;
575
+ RatingId: string;
565
576
  rating: number;
566
577
  comment?: string;
567
578
  createdAt: string;
@@ -569,6 +580,11 @@ type Rating = {
569
580
  username: string;
570
581
  avatar?: string;
571
582
  };
583
+ type Rating = {
584
+ insert: Omit<BaseRating, "id">;
585
+ update: Partial<Exclude<BaseRating, "id">>;
586
+ doc: BaseRating;
587
+ };
572
588
 
573
589
  declare const SENTINEL_FILE = ".release.commit";
574
590
 
@@ -579,4 +595,6 @@ declare const WEBSITE: {
579
595
  docs: string;
580
596
  };
581
597
 
582
- export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type FileNode, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type Rating, type Release, type RenameType, type RequestReturn, type Result, type Route, SENTINEL_FILE, type Settings, type TutorialHeader, type User, type ValidateManifestProp, WEBSITE, type WatchFSEvent, type Zip, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest, validateManifest };
598
+ declare const DATA_ALIAS = "${userData}";
599
+
600
+ export { type BBEvent, type BBRequest, type Checkpoint, type CopyArg, DATA_ALIAS, type DirInfo, type DirectoryContents, type DirectoryStats, type EventReturn, type FileContent, type FileInfo, type FileNode, type GitFileStatus, type IconArg, type Language, type Load, type Locale, type MenuContent, type Nav, type Plugin, type Project, type Rating, type Release, type RenameType, type RequestReturn, type Result, type Route, SENTINEL_FILE, type Settings, type TutorialHeader, type User, type ValidateManifestProp, WEBSITE, type WatchFSEvent, type Zip, BBRelay as default, enGB, frFR, injectStyles, registerEvent, registerRequest, validateManifest };
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
+ DATA_ALIAS: () => DATA_ALIAS,
23
24
  SENTINEL_FILE: () => SENTINEL_FILE_default,
24
25
  WEBSITE: () => WEBSITE_default,
25
26
  default: () => src_default,
@@ -440,10 +441,14 @@ var WEBSITE = {
440
441
  };
441
442
  var WEBSITE_default = WEBSITE;
442
443
 
444
+ // src/constants/DATA_ALIAS.ts
445
+ var DATA_ALIAS = "${userData}";
446
+
443
447
  // src/index.ts
444
448
  var src_default = BBRelay;
445
449
  // Annotate the CommonJS export names for ESM import in node:
446
450
  0 && (module.exports = {
451
+ DATA_ALIAS,
447
452
  SENTINEL_FILE,
448
453
  WEBSITE,
449
454
  enGB,
package/dist/index.mjs CHANGED
@@ -408,9 +408,13 @@ var WEBSITE = {
408
408
  };
409
409
  var WEBSITE_default = WEBSITE;
410
410
 
411
+ // src/constants/DATA_ALIAS.ts
412
+ var DATA_ALIAS = "${userData}";
413
+
411
414
  // src/index.ts
412
415
  var src_default = BBRelay;
413
416
  export {
417
+ DATA_ALIAS,
414
418
  SENTINEL_FILE_default as SENTINEL_FILE,
415
419
  WEBSITE_default as WEBSITE,
416
420
  src_default as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bb-relay",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "For managing bb-editor extension",
5
5
  "license": "ISC",
6
6
  "author": "Ade Adeola",
@@ -0,0 +1 @@
1
+ export const DATA_ALIAS = "${userData}";
package/src/index.ts CHANGED
@@ -39,6 +39,7 @@ import validateManifest, {
39
39
  import { Rating } from "./types/plugins/Rating";
40
40
  import SENTINEL_FILE from "./constants/SENTINEL_FILE";
41
41
  import WEBSITE from "./constants/WEBSITE";
42
+ import { DATA_ALIAS } from "./constants/DATA_ALIAS";
42
43
 
43
44
  export default BBRelay;
44
45
 
@@ -77,5 +78,5 @@ export type {
77
78
  };
78
79
 
79
80
  export type { Release, Plugin, Zip, ValidateManifestProp, Rating, FileNode };
80
- export { SENTINEL_FILE, WEBSITE };
81
+ export { SENTINEL_FILE, WEBSITE, DATA_ALIAS };
81
82
  export { enGB, frFR };
@@ -1,12 +1,12 @@
1
1
  import { Release } from "./Release";
2
2
 
3
- type Status = Omit<Release, "type">;
3
+ type Status = Omit<Release["doc"], "type">;
4
4
  /**
5
5
  * This will be pulled from two firestore
6
6
  * The part of name, description etc will be in the main
7
7
  * Things like installs will be in the registry
8
8
  */
9
- export type Plugin = {
9
+ type BasePlugin = {
10
10
  userId: string;
11
11
  slug: string;
12
12
  name: string;
@@ -19,5 +19,12 @@ export type Plugin = {
19
19
  updatedAt: string;
20
20
  tags: string[];
21
21
  username: string;
22
+ id: string;
22
23
  avatar?: string;
23
24
  };
25
+
26
+ export type Plugin = {
27
+ insert: Omit<BasePlugin, "id">;
28
+ update: Partial<Exclude<BasePlugin, "id">>;
29
+ doc: BasePlugin;
30
+ };
@@ -1,6 +1,6 @@
1
- export type Rating = {
1
+ type BaseRating = {
2
2
  userId: string;
3
- pluginId: string;
3
+ RatingId: string;
4
4
  rating: number;
5
5
  comment?: string;
6
6
  createdAt: string;
@@ -8,3 +8,9 @@ export type Rating = {
8
8
  username: string;
9
9
  avatar?: string;
10
10
  };
11
+
12
+ export type Rating = {
13
+ insert: Omit<BaseRating, "id">;
14
+ update: Partial<Exclude<BaseRating, "id">>;
15
+ doc: BaseRating;
16
+ };
@@ -1,4 +1,4 @@
1
- export type Release = {
1
+ type BaseRelease = {
2
2
  storageRef: string;
3
3
  changes: string;
4
4
  version: string;
@@ -10,8 +10,14 @@ export type Release = {
10
10
  totalSize: number;
11
11
  };
12
12
  createdAt: string;
13
- id?: string;
13
+ id: string;
14
14
  updatedAt: string;
15
15
  userId: string;
16
16
  installs: number;
17
17
  };
18
+
19
+ export type Release = {
20
+ insert: Omit<BaseRelease, "id">;
21
+ update: Partial<Exclude<BaseRelease, "id">>;
22
+ doc: BaseRelease;
23
+ };