@littlebearapps/platform-admin-sdk 1.4.0 → 1.4.1

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.
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import type { Tier } from './prompts.js';
8
8
  /** Single source of truth for the SDK version. */
9
- export declare const SDK_VERSION = "1.4.0";
9
+ export declare const SDK_VERSION = "1.4.1";
10
10
  /** Returns true if `to` is the same or higher tier than `from`. */
11
11
  export declare function isTierUpgradeOrSame(from: Tier, to: Tier): boolean;
12
12
  /** Check if a template file is a numbered migration (not seed.sql). */
package/dist/templates.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * All other files are copied verbatim.
6
6
  */
7
7
  /** Single source of truth for the SDK version. */
8
- export const SDK_VERSION = '1.4.0';
8
+ export const SDK_VERSION = '1.4.1';
9
9
  /** Tier ordering for upgrade validation. */
10
10
  const TIER_ORDER = { minimal: 0, standard: 1, full: 2 };
11
11
  /** Returns true if `to` is the same or higher tier than `from`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@littlebearapps/platform-admin-sdk",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Platform Admin SDK — scaffold backend infrastructure with workers, circuit breakers, and cost protection for Cloudflare",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1472,9 +1472,15 @@ async function tail(events: TailEvent[], env: Env): Promise<void> {
1472
1472
 
1473
1473
  // Load dynamic patterns once for all events in this batch
1474
1474
  // These are AI-suggested, human-approved patterns from pattern-discovery
1475
- const dynamicPatterns = await loadDynamicPatterns(env.PLATFORM_CACHE);
1476
- if (dynamicPatterns.length > 0) {
1477
- console.log(`Loaded ${dynamicPatterns.length} dynamic patterns from KV`);
1475
+ // Defensive wrap: if SDK's internal catch is ever refactored, this prevents entire batch loss
1476
+ let dynamicPatterns: CompiledPattern[] = [];
1477
+ try {
1478
+ dynamicPatterns = await loadDynamicPatterns(env.PLATFORM_CACHE);
1479
+ if (dynamicPatterns.length > 0) {
1480
+ console.log(`Loaded ${dynamicPatterns.length} dynamic patterns from KV`);
1481
+ }
1482
+ } catch (e) {
1483
+ console.error('Failed to load dynamic patterns in tail handler:', e);
1478
1484
  }
1479
1485
 
1480
1486
  for (const event of events) {