@bbn/bbn 2.0.245 → 2.0.247

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.
@@ -55,7 +55,7 @@ export default class bbnDbCenter {
55
55
  if (!database) {
56
56
  throw new Error('Missing database name for object method');
57
57
  }
58
- bbn.fn.log(`Executing object method: ${action} on database: ${database}`);
58
+ //bbn.fn.log(`Executing object method: ${action} on database: ${database}`);
59
59
  const dbo = await bbnDb.open(database);
60
60
  const fn = dbo[action];
61
61
  if (typeof fn !== 'function') {
@@ -499,14 +499,14 @@ const db = {
499
499
  if (conn) {
500
500
  conn.close();
501
501
  delete this._connections[database];
502
- log("Closing connection to database: " + database);
502
+ //log("Closing connection to database: " + database);
503
503
  }
504
504
  if (this._objects[database]) {
505
505
  delete this._objects[database];
506
506
  }
507
507
  },
508
508
  updateStructure(storeName, structure, database) {
509
- log("fn updateStructure, table: " + storeName + ", in SW? " + !globalThis.document);
509
+ //log("fn updateStructure, table: " + storeName + ", in SW? " + !globalThis.document)
510
510
  const primary = getPrimaryKey(structure);
511
511
  if (!database.objectStoreNames.contains(storeName)) {
512
512
  const store = database.createObjectStore(storeName, {
@@ -575,7 +575,7 @@ const db = {
575
575
  });
576
576
  },
577
577
  async reopenWithUpgrade(name) {
578
- log("fn reopenWithUpgrade", this._structures);
578
+ //log("fn reopenWithUpgrade", this._structures)
579
579
  if (!this._structures[name]) {
580
580
  throw new Error(_('Impossible to find a structure for the database %s', name));
581
581
  }
@@ -588,7 +588,7 @@ const db = {
588
588
  return await this.open(name, nextVersion);
589
589
  },
590
590
  async open(database, version) {
591
- log("Hello " + database);
591
+ //log("Hello " + database)
592
592
  if (database !== 'bbn') {
593
593
  log("THERE SHOULD BE A DEBUGGER!!!!!!!");
594
594
  debugger;
@@ -630,7 +630,7 @@ const db = {
630
630
  return this._objects[database];
631
631
  },
632
632
  async add(database, name, structure) {
633
- log("fn add " + name);
633
+ //log("fn add " + name);
634
634
  if (!structure?.keys?.PRIMARY || !structure?.fields) {
635
635
  log("Error on add", structure);
636
636
  throw new Error(_('The database structure for %s is not valid (missing keys, fields, or primary key)', name));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.245",
3
+ "version": "2.0.247",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",