mocody 0.8.3 → 0.8.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.cjs CHANGED
@@ -5970,6 +5970,7 @@ var MocodyInitializerPouch = class {
5970
5970
  _pouchInstance;
5971
5971
  _docMetaFieldsObJ = this.docMetaFieldsObject();
5972
5972
  baseConfig;
5973
+ pouchWithPlugins = null;
5973
5974
  constructor(baseConfig) {
5974
5975
  this.baseConfig = baseConfig;
5975
5976
  }
@@ -6098,8 +6099,20 @@ var MocodyInitializerPouch = class {
6098
6099
  async pouch_getDbInstance() {
6099
6100
  return await concurrency4(() => this.pouch_getDbInstanceBase());
6100
6101
  }
6102
+ // private getPouchWithPlugins() {
6103
+ // return (
6104
+ // PouchDB00.plugin(pouchdbhttp)
6105
+ // //
6106
+ // .plugin(pouchdbmapreduce)
6107
+ // .plugin(pouchdbreplication)
6108
+ // .plugin(pouchdbFind)
6109
+ // );
6110
+ // }
6101
6111
  getPouchWithPlugins() {
6102
- return import_pouchdb_core.default.plugin(import_pouchdb_adapter_http.default).plugin(import_pouchdb_mapreduce.default).plugin(import_pouchdb_replication.default).plugin(import_pouchdb_find.default);
6112
+ if (!this.pouchWithPlugins) {
6113
+ this.pouchWithPlugins = import_pouchdb_core.default.plugin(import_pouchdb_adapter_http.default).plugin(import_pouchdb_mapreduce.default).plugin(import_pouchdb_replication.default).plugin(import_pouchdb_find.default);
6114
+ }
6115
+ return this.pouchWithPlugins;
6103
6116
  }
6104
6117
  createRemoteDB({
6105
6118
  proxyAuthToken,
package/dist/index.d.cts CHANGED
@@ -767,6 +767,7 @@ declare class MocodyInitializerPouch<T extends IMocodyCoreEntityModel> {
767
767
  private _pouchInstance;
768
768
  private readonly _docMetaFieldsObJ;
769
769
  private readonly baseConfig;
770
+ private pouchWithPlugins;
770
771
  constructor(baseConfig: IOptions$1);
771
772
  deleteIndex({ ddoc, name }: {
772
773
  ddoc: string;
package/dist/index.d.ts CHANGED
@@ -767,6 +767,7 @@ declare class MocodyInitializerPouch<T extends IMocodyCoreEntityModel> {
767
767
  private _pouchInstance;
768
768
  private readonly _docMetaFieldsObJ;
769
769
  private readonly baseConfig;
770
+ private pouchWithPlugins;
770
771
  constructor(baseConfig: IOptions$1);
771
772
  deleteIndex({ ddoc, name }: {
772
773
  ddoc: string;
package/dist/index.js CHANGED
@@ -5940,6 +5940,7 @@ var MocodyInitializerPouch = class {
5940
5940
  _pouchInstance;
5941
5941
  _docMetaFieldsObJ = this.docMetaFieldsObject();
5942
5942
  baseConfig;
5943
+ pouchWithPlugins = null;
5943
5944
  constructor(baseConfig) {
5944
5945
  this.baseConfig = baseConfig;
5945
5946
  }
@@ -6068,8 +6069,20 @@ var MocodyInitializerPouch = class {
6068
6069
  async pouch_getDbInstance() {
6069
6070
  return await concurrency4(() => this.pouch_getDbInstanceBase());
6070
6071
  }
6072
+ // private getPouchWithPlugins() {
6073
+ // return (
6074
+ // PouchDB00.plugin(pouchdbhttp)
6075
+ // //
6076
+ // .plugin(pouchdbmapreduce)
6077
+ // .plugin(pouchdbreplication)
6078
+ // .plugin(pouchdbFind)
6079
+ // );
6080
+ // }
6071
6081
  getPouchWithPlugins() {
6072
- return PouchDB00.plugin(pouchdbhttp).plugin(pouchdbmapreduce).plugin(pouchdbreplication).plugin(pouchdbFind);
6082
+ if (!this.pouchWithPlugins) {
6083
+ this.pouchWithPlugins = PouchDB00.plugin(pouchdbhttp).plugin(pouchdbmapreduce).plugin(pouchdbreplication).plugin(pouchdbFind);
6084
+ }
6085
+ return this.pouchWithPlugins;
6073
6086
  }
6074
6087
  createRemoteDB({
6075
6088
  proxyAuthToken,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocody",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Implementation of single table design, and unified query access for MongoDB, CouchDB, and dynamoDB",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",