@proveanything/smartlinks 1.3.39 → 1.3.40

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,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.3.39 | Generated: 2026-02-18T19:54:44.075Z
3
+ Version: 1.3.40 | Generated: 2026-02-18T20:09:53.593Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -526,29 +526,39 @@ export class IframeResponder {
526
526
  this.sendResponse(event, response);
527
527
  }
528
528
  getCachedResponse(path) {
529
- // Collection request
530
- if (path.includes('/collection/') && this.cache.collection) {
531
- const match = path.match(/collection\/([^/]+)/);
532
- if (match && match[1] === this.options.collectionId) {
529
+ // App data endpoints should NOT be cached - they need fresh data from API
530
+ // These are the new separated app config endpoints
531
+ if (path.includes('/app/') && (path.includes('/data') || path.match(/\/app\/[^/]+$/))) {
532
+ console.log('[IframeResponder:Parent] 🚫 Not caching app data endpoint:', path);
533
+ return null;
534
+ }
535
+ // Collection request - ONLY match direct collection endpoint, not app config endpoints
536
+ if (this.cache.collection) {
537
+ const collectionMatch = path.match(/^public\/collection\/([^/]+)$/);
538
+ if (collectionMatch && collectionMatch[1] === this.options.collectionId) {
539
+ console.log('[IframeResponder:Parent] 📦 Cache hit: collection');
533
540
  return JSON.parse(JSON.stringify(this.cache.collection));
534
541
  }
535
542
  }
536
- // Product request
537
- if (path.includes('/product/') && this.cache.product && this.options.productId) {
538
- const match = path.match(/product\/([^/]+)/);
539
- if (match && match[1] === this.options.productId) {
543
+ // Product request - ONLY match direct product endpoint, not app config endpoints
544
+ if (this.cache.product && this.options.productId) {
545
+ const productMatch = path.match(/^public\/collection\/[^/]+\/product\/([^/]+)$/);
546
+ if (productMatch && productMatch[1] === this.options.productId) {
547
+ console.log('[IframeResponder:Parent] 📦 Cache hit: product');
540
548
  return JSON.parse(JSON.stringify(this.cache.product));
541
549
  }
542
550
  }
543
551
  // Proof request
544
- if (path.includes('/proof/') && this.cache.proof && this.options.proofId) {
545
- const match = path.match(/proof\/([^/]+)/);
546
- if (match && match[1] === this.options.proofId) {
552
+ if (this.cache.proof && this.options.proofId) {
553
+ const proofMatch = path.match(/^public\/proof\/([^/]+)$/);
554
+ if (proofMatch && proofMatch[1] === this.options.proofId) {
555
+ console.log('[IframeResponder:Parent] 📦 Cache hit: proof');
547
556
  return JSON.parse(JSON.stringify(this.cache.proof));
548
557
  }
549
558
  }
550
559
  // Account request
551
560
  if (path.includes('/account') && this.cache.user) {
561
+ console.log('[IframeResponder:Parent] 📦 Cache hit: account');
552
562
  return JSON.parse(JSON.stringify(Object.assign(Object.assign({}, this.cache.user.accountData), { uid: this.cache.user.uid, email: this.cache.user.email, displayName: this.cache.user.displayName })));
553
563
  }
554
564
  return null;
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.3.39 | Generated: 2026-02-18T19:54:44.075Z
3
+ Version: 1.3.40 | Generated: 2026-02-18T20:09:53.593Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.3.39",
3
+ "version": "1.3.40",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",