@maravilla-labs/functions 0.2.2 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/events/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAwF5E"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/events/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,MAAM,CA8F5E"}
@@ -36,17 +36,23 @@ for (const mod of MODULES) {
36
36
  }
37
37
 
38
38
  function buildCtx(handlerId) {
39
+ // Mirror globalThis.platform exactly — these are the same names
40
+ // users see everywhere else in their app via getPlatform().
39
41
  const platform = (typeof globalThis !== 'undefined' && globalThis.platform) || {};
40
42
  return {
41
- env: platform.env || {},
42
- kv: platform.kv,
43
- db: platform.db,
44
- storage: platform.storage,
45
- queue: platform.queue,
46
- ren: platform.ren,
47
- tenant: platform.tenant || 'default',
48
- traceId: (globalThis.crypto?.randomUUID?.() || String(Date.now())),
43
+ env: platform.env || {},
44
+ kv: platform.kv,
45
+ database: platform.database,
46
+ storage: platform.storage,
47
+ queue: platform.queue,
48
+ auth: platform.auth,
49
+ push: platform.push,
50
+ tenant: platform.tenant || 'default',
51
+ traceId: (globalThis.crypto?.randomUUID?.() || String(Date.now())),
49
52
  handlerId,
53
+ // Escape hatch: full platform object for forward-compatibility if
54
+ // new services land on globalThis.platform.
55
+ platform,
50
56
  };
51
57
  }
52
58
 
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/events/generator.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgC;IAClE,MAAM,OAAO,GAAG,OAAO;SACpB,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC;SAC5E,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/D,OAAO;EACP,OAAO;;mBAEU,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6E3B,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/events/generator.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgC;IAClE,MAAM,OAAO,GAAG,OAAO;SACpB,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC;SAC5E,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE/D,OAAO;EACP,OAAO;;mBAEU,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF3B,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maravilla-labs/functions",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Maravilla Edge Functions bundler and development tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",