@optimystic/db-p2p-storage-web 1.0.0-beta.1 → 1.0.0-beta.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.
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,CAEjE"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC,QAAQ,CAEjE"}
@@ -1,5 +1,8 @@
1
1
  import debug from 'debug';
2
+ import { registerDebugModule } from '@optimystic/db-core';
2
3
  const BASE_NAMESPACE = 'optimystic:db-p2p-storage-web';
4
+ // So `enableOptimysticLogging` reaches this package's copy of `debug`, which may be no one else's.
5
+ registerDebugModule('db-p2p-storage-web', debug);
3
6
  export function createLogger(subNamespace) {
4
7
  return debug(`${BASE_NAMESPACE}:${subNamespace}`);
5
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD,MAAM,UAAU,YAAY,CAAC,YAAoB;IAChD,OAAO,KAAK,CAAC,GAAG,cAAc,IAAI,YAAY,EAAE,CAAC,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,cAAc,GAAG,+BAA+B,CAAC;AAEvD,mGAAmG;AACnG,mBAAmB,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;AAEjD,MAAM,UAAU,YAAY,CAAC,YAAoB;IAChD,OAAO,KAAK,CAAC,GAAG,cAAc,IAAI,YAAY,EAAE,CAAC,CAAC;AACnD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimystic/db-p2p-storage-web",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "Browser IndexedDB storage backend for @optimystic/db-p2p",
6
6
  "main": "dist/src/index.js",
@@ -54,8 +54,8 @@
54
54
  "typescript": "^5.9.3"
55
55
  },
56
56
  "dependencies": {
57
- "@optimystic/db-core": "^1.0.0-beta.1",
58
- "@optimystic/db-p2p": "^1.0.0-beta.1",
57
+ "@optimystic/db-core": "^1.0.0-beta.3",
58
+ "@optimystic/db-p2p": "^1.0.0-beta.3",
59
59
  "debug": "^4.4.3",
60
60
  "idb": "^8.0.3"
61
61
  },
package/src/logger.ts CHANGED
@@ -1,7 +1,11 @@
1
1
  import debug from 'debug';
2
+ import { registerDebugModule } from '@optimystic/db-core';
2
3
 
3
4
  const BASE_NAMESPACE = 'optimystic:db-p2p-storage-web';
4
5
 
6
+ // So `enableOptimysticLogging` reaches this package's copy of `debug`, which may be no one else's.
7
+ registerDebugModule('db-p2p-storage-web', debug);
8
+
5
9
  export function createLogger(subNamespace: string): debug.Debugger {
6
10
  return debug(`${BASE_NAMESPACE}:${subNamespace}`);
7
11
  }