@fireproof/core 0.7.0-alpha.0 → 0.7.0-alpha.1

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/fireproof.js CHANGED
@@ -9,21 +9,10 @@ class Fireproof {
9
9
  * Creates a new Fireproof instance with default storage settings
10
10
  * Most apps should use this and not worry about the details.
11
11
  * @static
12
- * @returns {Database|Promise<Database>} - a new Fireproof instance or a promise for remote loaders
12
+ * @returns {Database} - a new Fireproof instance
13
13
  */
14
14
  static storage = (name = null, opts = {}) => {
15
- if (!name) {
16
- return new Database(null, opts);
17
- }
18
- else {
19
- // const primaryLoader = Loader.appropriate(name, opts.primary, { key: null })
20
- // const secondaryLoader = opts.secondary ? Loader.appropriate(name, opts.secondary, { key: null }) : null
21
- const db = new Database(name, opts);
22
- return db;
23
- // const loaders = [pr]
24
- // todo we need branch names here
25
- // console.log('storage', name, opts, primaryLoader, secondaryLoader)
26
- }
15
+ return new Database(name, opts);
27
16
  };
28
17
  // static fromConfig (name, primary, secondary, opts = {}) {
29
18
  // console.log('fromConfig', name, primary, secondary, opts)
@@ -569,9 +569,9 @@ declare class Fireproof {
569
569
  * Creates a new Fireproof instance with default storage settings
570
570
  * Most apps should use this and not worry about the details.
571
571
  * @static
572
- * @returns {Database|Promise<Database>} - a new Fireproof instance or a promise for remote loaders
572
+ * @returns {Database} - a new Fireproof instance
573
573
  */
574
- static storage: (name?: any, opts?: {}) => Database | Promise<Database>;
574
+ static storage: (name?: any, opts?: {}) => Database;
575
575
  static fromJSON(primary: any, secondary: any, database: any): any;
576
576
  static snapshot(database: any, clock: any): any;
577
577
  static zoom(database: any, clock: any): Promise<any>;
@@ -50348,22 +50348,10 @@ class Fireproof {
50348
50348
  * Creates a new Fireproof instance with default storage settings
50349
50349
  * Most apps should use this and not worry about the details.
50350
50350
  * @static
50351
- * @returns {Database|Promise<Database>} - a new Fireproof instance or a promise for remote loaders
50351
+ * @returns {Database} - a new Fireproof instance
50352
50352
  */
50353
50353
  static storage = (name = null, opts = {}) => {
50354
- if (!name) {
50355
- return new Database(null, opts)
50356
- } else {
50357
- // const primaryLoader = Loader.appropriate(name, opts.primary, { key: null })
50358
- // const secondaryLoader = opts.secondary ? Loader.appropriate(name, opts.secondary, { key: null }) : null
50359
- const db = new Database(name, opts);
50360
- return db
50361
- // const loaders = [pr]
50362
-
50363
- // todo we need branch names here
50364
-
50365
- // console.log('storage', name, opts, primaryLoader, secondaryLoader)
50366
- }
50354
+ return new Database(name, opts)
50367
50355
  }
50368
50356
 
50369
50357
  // static fromConfig (name, primary, secondary, opts = {}) {