@qaecy/cue-sdk 0.0.2 → 0.0.3

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.
@@ -20262,9 +20262,12 @@ function eI(n, e, t) {
20262
20262
  })();
20263
20263
  const vi = "projects";
20264
20264
  class tI {
20265
- constructor(e, t, r = !1) {
20265
+ constructor(e, t, r = !1, s) {
20266
20266
  ze(this, "_db");
20267
- this._auth = e, this._db = ME(t), r && Mh(this._db, "localhost", 8080);
20267
+ if (this._auth = e, this._db = ME(t), r) {
20268
+ const o = (s == null ? void 0 : s.firestoreEmulatorHost) ?? "localhost", a = (s == null ? void 0 : s.firestoreEmulatorPort) ?? 8080;
20269
+ Mh(this._db, o, a);
20270
+ }
20268
20271
  }
20269
20272
  _requireUser() {
20270
20273
  const e = this._auth.currentUser;
@@ -20321,12 +20324,20 @@ const _u = "qaecy-mvp-406413", nI = "734737865998", rI = {
20321
20324
  production: {
20322
20325
  gatewayUrl: "https://accessors-api-gateway-ueyeemwf2a-oa.a.run.app",
20323
20326
  tokenUrl: "https://accessors-api-gateway-ueyeemwf2a-oa.a.run.app/token",
20324
- authEmulatorUrl: "http://localhost:9099"
20327
+ authEmulatorUrl: "http://localhost:9099",
20328
+ storageEmulatorHost: "localhost",
20329
+ storageEmulatorPort: 9199,
20330
+ firestoreEmulatorHost: "localhost",
20331
+ firestoreEmulatorPort: 8080
20325
20332
  },
20326
20333
  emulator: {
20327
20334
  gatewayUrl: "http://localhost:8093",
20328
20335
  tokenUrl: "http://localhost:8093/token",
20329
- authEmulatorUrl: "http://localhost:9099"
20336
+ authEmulatorUrl: "http://localhost:9099",
20337
+ storageEmulatorHost: "localhost",
20338
+ storageEmulatorPort: 9199,
20339
+ firestoreEmulatorHost: "localhost",
20340
+ firestoreEmulatorPort: 8080
20330
20341
  }
20331
20342
  };
20332
20343
  class oI {
@@ -20345,7 +20356,7 @@ class oI {
20345
20356
  projectId: _u,
20346
20357
  messagingSenderId: nI
20347
20358
  }), this.auth = new kg(this._app, this._isEmulator, this._endpoints);
20348
- const r = new tI(this.auth, this._app, this._isEmulator);
20359
+ const r = new tI(this.auth, this._app, this._isEmulator, this._endpoints);
20349
20360
  this.api = this._buildApi(r);
20350
20361
  }
20351
20362
  /** Override in subclasses to provide a custom CueApi (e.g. with sync). */
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { f as u, h as a, j as C, k as o } from "./index-BnBbVXtu.js";
1
+ import { f as u, h as a, j as C, k as o } from "./index-CV1OX3eG.js";
2
2
  export {
3
3
  u as Cue,
4
4
  a as CueApi,
package/lib/models.d.ts CHANGED
@@ -6,6 +6,14 @@ export interface CueEndpoints {
6
6
  tokenUrl: string;
7
7
  /** Firebase Auth emulator URL */
8
8
  authEmulatorUrl: string;
9
+ /** Firebase Storage emulator hostname, no protocol (emulator mode only, default: 'localhost') */
10
+ storageEmulatorHost: string;
11
+ /** Firebase Storage emulator port (emulator mode only, default: 9199) */
12
+ storageEmulatorPort: number;
13
+ /** Firebase Firestore emulator hostname, no protocol (emulator mode only, default: 'localhost') */
14
+ firestoreEmulatorHost: string;
15
+ /** Firebase Firestore emulator port (emulator mode only, default: 8080) */
16
+ firestoreEmulatorPort: number;
9
17
  }
10
18
  export interface CueSdkConfig {
11
19
  /** Firebase API key for this project */
package/lib/project.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { FirebaseApp } from 'firebase/app';
2
2
  import { CueAuth } from './auth';
3
- import { CreateProjectOptions, ProjectData } from './models';
3
+ import { CreateProjectOptions, CueEndpoints, ProjectData } from './models';
4
4
  export declare class CueProjects {
5
5
  private readonly _auth;
6
6
  private readonly _db;
7
- constructor(_auth: CueAuth, app: FirebaseApp, useEmulator?: boolean);
7
+ constructor(_auth: CueAuth, app: FirebaseApp, useEmulator?: boolean, endpoints?: CueEndpoints);
8
8
  private _requireUser;
9
9
  /**
10
10
  * Create a new project. The authenticated user is automatically set as admin, syncer, and member.