@aiam/ciba 0.8.2 → 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.
Files changed (2) hide show
  1. package/ciba.mjs +1 -5
  2. package/package.json +1 -1
package/ciba.mjs CHANGED
@@ -496,10 +496,7 @@ function startDaemon(provider, deviceDoc, privateKey, serverUrl) {
496
496
  dlog(`cache miss; writing requests[${newRid}] attrs=${JSON.stringify(attrs)}`);
497
497
  requests.set(newRid, { ...attrs, status: 'pending', created_at: new Date().toISOString() });
498
498
 
499
- // Watch both token:<newRid> AND resources[requestedResource] for
500
- // the result. resources map updates survive WS reconnects because
501
- // Yjs re-syncs the full doc state; token:<newRid> may be missed
502
- // if the write happened during a reconnect gap.
499
+ dlog(`resources map: ${JSON.stringify([...resourcesMap.entries()])} requested=${requestedResource}`);
503
500
  const prevTokenMapName = resourcesMap.get(requestedResource);
504
501
  const newTokenMap = deviceDoc.getMap(`token:${newRid}`);
505
502
 
@@ -512,7 +509,6 @@ function startDaemon(provider, deviceDoc, privateKey, serverUrl) {
512
509
  30_000
513
510
  ).then((newMapName) => {
514
511
  const m = deviceDoc.getMap(newMapName);
515
- // wait for ciphertext to land on the new map (may arrive right after resources update)
516
512
  return firstInYMap(m, (key) => key === 'ciphertext' || key === 'error', 5_000)
517
513
  .then(() => m).catch(() => m);
518
514
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiam/ciba",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "OAuth 2.0 Device Authorization Grant CLI with cross-device push approval (Yjs sync, ECDH-encrypted token delivery, persistent device id)",
5
5
  "type": "module",
6
6
  "bin": {