@camada/bun 0.1.0 → 0.1.2
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.
- package/README.md +3 -1
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@ from `server.requestIP`, the env from `Bun.env`, and the snapshot polls on a tim
|
|
|
8
8
|
server lives long enough to have one. Fails open by design — a camada outage or bug never 5xxes
|
|
9
9
|
your app.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
```sh
|
|
12
|
+
bun add @camada/bun
|
|
13
|
+
```
|
|
12
14
|
|
|
13
15
|
## Quickstart
|
|
14
16
|
|
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,7 @@ var import_iife_string = __toESM(require("@camada/browser/iife-string"), 1);
|
|
|
44
44
|
|
|
45
45
|
// package.json
|
|
46
46
|
var name = "@camada/bun";
|
|
47
|
-
var version = "0.1.
|
|
47
|
+
var version = "0.1.2";
|
|
48
48
|
|
|
49
49
|
// src/version.ts
|
|
50
50
|
var SDK_ID = `${name}/${version}`;
|
|
@@ -73,8 +73,7 @@ function camada(opts = {}) {
|
|
|
73
73
|
cam.after(req, r.vars, 101);
|
|
74
74
|
return res;
|
|
75
75
|
}
|
|
76
|
-
cam.
|
|
77
|
-
return r.vars.sessionCookie ? (0, import_fetch.withSetCookie)(res, r.vars.sessionCookie) : res;
|
|
76
|
+
return cam.finish(req, r.vars, r.vars.sessionCookie ? (0, import_fetch.withSetCookie)(res, r.vars.sessionCookie) : res);
|
|
78
77
|
};
|
|
79
78
|
};
|
|
80
79
|
}
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/camada.ts","../package.json","../src/version.ts"],"sourcesContent":["// @camada/bun — the one-line install for a Bun.serve app:\n// Bun.serve({ fetch: camada()(handler) }); // env: CAMADA_KEY (+ CAMADA_INGEST_URL / CAMADA_SNAPSHOT_URL in dev)\n// new Response(`<head>${scriptTag(req)}</head>…`, { headers: { 'content-type': 'text/html' } }) // the first-party beacon\n// track(req, 'login_failed', { user }) // an outcome the wire cannot show\nexport { camada, track, scriptTag, resetCamada, type CamadaBunOptions, type CamadaBunVars, type BunServer, type BunHandler } from './camada.js';\n","// @camada/bun — the Bun.serve binding for @camada/core/fetch. `wrap` sits around the app's fetch\n// handler: the socket peer comes from `server.requestIP` (the one address Bun vouches for), the\n// env from Bun.env, and there is no waitUntil — a long-lived process polls on a timer and drains\n// on exit instead. Bun has no per-request context object, so the Request itself keys the slot.\nimport { TAP_BUN, guarded } from '@camada/core';\nimport { createFetchCamada, withSetCookie, track as coreTrack, scriptTag as coreScriptTag, type FetchCamada, type FetchCamadaOptions, type FetchVars } from '@camada/core/fetch';\nimport iife from '@camada/browser/iife-string';\nimport { SDK_ID } from './version.js';\n\n/** The one thing the wrapper needs from Bun's server, typed structurally so the emitted types need no `bun` import; any `Bun.Server` satisfies it. */\nexport interface BunServer { requestIP(req: Request): { address: string } | null }\n/** A Bun fetch handler. `undefined`/`void` is what Bun's own websocket pattern returns after `server.upgrade(req)`. */\nexport type BunHandler<S extends BunServer = BunServer, R extends Response | undefined | void = Response> = (req: Request, server: S) => R | Promise<R>;\nexport type CamadaBunOptions = FetchCamadaOptions;\nexport type CamadaBunVars = FetchVars;\n\nconst slots = new WeakMap<Request, FetchVars>(); // set only when the app is about to run; camada's own answers leave nothing\nconst instances = new Set<FetchCamada>();\n\n/**\n * Builds one camada instance and returns `wrap`, which turns a Bun fetch handler into a guarded\n * one: `Bun.serve({ fetch: camada()(handler) })`. Timer mode by default (a server process lives\n * long enough to poll); `mode: 'lazy'` or CAMADA_SERVERLESS=1 switches to per-request refresh.\n */\nexport function camada(opts: CamadaBunOptions = {}) {\n const cam = createFetchCamada({ tap: TAP_BUN, sdk: SDK_ID, iife }, { ...opts, mode: opts.mode ?? 'timer' });\n instances.add(cam);\n return function wrap<S extends BunServer, R extends Response | undefined | void>(handler: BunHandler<S, R>): (req: Request, server: S) => Promise<Response | R> {\n return async (req, server) => {\n // Guarded: a runtime that is not Bun (or a Bun without a socket for this request) hands us\n // no peer rather than a throw. Client headers are core's to judge under the trusted-proxy rules.\n const peer = guarded(() => server?.requestIP?.(req)?.address ?? null, null);\n const r = await cam.before(req, { peer, env: globalThis.Bun?.env ?? globalThis.process?.env }); // Bun.env is process.env under Bun; the fallback is this suite under Node\n if (!r) return handler(req, server);\n if (r.response) return r.response;\n slots.set(req, r.vars);\n let res: R;\n try {\n res = await handler(req, server);\n } catch (err) {\n cam.after(req, r.vars, 500); // Bun answers 500 for a thrown handler (an `error` callback returning its own status is not visible here)\n throw err;\n }\n if (!res) { cam.after(req, r.vars, 101); return res; } // a websocket upgrade: Bun answers 101 itself, so there is no Response to carry a cookie\n cam.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/camada.ts","../package.json","../src/version.ts"],"sourcesContent":["// @camada/bun — the one-line install for a Bun.serve app:\n// Bun.serve({ fetch: camada()(handler) }); // env: CAMADA_KEY (+ CAMADA_INGEST_URL / CAMADA_SNAPSHOT_URL in dev)\n// new Response(`<head>${scriptTag(req)}</head>…`, { headers: { 'content-type': 'text/html' } }) // the first-party beacon\n// track(req, 'login_failed', { user }) // an outcome the wire cannot show\nexport { camada, track, scriptTag, resetCamada, type CamadaBunOptions, type CamadaBunVars, type BunServer, type BunHandler } from './camada.js';\n","// @camada/bun — the Bun.serve binding for @camada/core/fetch. `wrap` sits around the app's fetch\n// handler: the socket peer comes from `server.requestIP` (the one address Bun vouches for), the\n// env from Bun.env, and there is no waitUntil — a long-lived process polls on a timer and drains\n// on exit instead. Bun has no per-request context object, so the Request itself keys the slot.\nimport { TAP_BUN, guarded } from '@camada/core';\nimport { createFetchCamada, withSetCookie, track as coreTrack, scriptTag as coreScriptTag, type FetchCamada, type FetchCamadaOptions, type FetchVars } from '@camada/core/fetch';\nimport iife from '@camada/browser/iife-string';\nimport { SDK_ID } from './version.js';\n\n/** The one thing the wrapper needs from Bun's server, typed structurally so the emitted types need no `bun` import; any `Bun.Server` satisfies it. */\nexport interface BunServer { requestIP(req: Request): { address: string } | null }\n/** A Bun fetch handler. `undefined`/`void` is what Bun's own websocket pattern returns after `server.upgrade(req)`. */\nexport type BunHandler<S extends BunServer = BunServer, R extends Response | undefined | void = Response> = (req: Request, server: S) => R | Promise<R>;\nexport type CamadaBunOptions = FetchCamadaOptions;\nexport type CamadaBunVars = FetchVars;\n\nconst slots = new WeakMap<Request, FetchVars>(); // set only when the app is about to run; camada's own answers leave nothing\nconst instances = new Set<FetchCamada>();\n\n/**\n * Builds one camada instance and returns `wrap`, which turns a Bun fetch handler into a guarded\n * one: `Bun.serve({ fetch: camada()(handler) })`. Timer mode by default (a server process lives\n * long enough to poll); `mode: 'lazy'` or CAMADA_SERVERLESS=1 switches to per-request refresh.\n */\nexport function camada(opts: CamadaBunOptions = {}) {\n const cam = createFetchCamada({ tap: TAP_BUN, sdk: SDK_ID, iife }, { ...opts, mode: opts.mode ?? 'timer' });\n instances.add(cam);\n return function wrap<S extends BunServer, R extends Response | undefined | void>(handler: BunHandler<S, R>): (req: Request, server: S) => Promise<Response | R> {\n return async (req, server) => {\n // Guarded: a runtime that is not Bun (or a Bun without a socket for this request) hands us\n // no peer rather than a throw. Client headers are core's to judge under the trusted-proxy rules.\n const peer = guarded(() => server?.requestIP?.(req)?.address ?? null, null);\n const r = await cam.before(req, { peer, env: globalThis.Bun?.env ?? globalThis.process?.env }); // Bun.env is process.env under Bun; the fallback is this suite under Node\n if (!r) return handler(req, server);\n if (r.response) return r.response;\n slots.set(req, r.vars);\n let res: R;\n try {\n res = await handler(req, server);\n } catch (err) {\n cam.after(req, r.vars, 500); // Bun answers 500 for a thrown handler (an `error` callback returning its own status is not visible here)\n throw err;\n }\n if (!res) { cam.after(req, r.vars, 101); return res; } // a websocket upgrade: Bun answers 101 itself, so there is no Response to carry a cookie\n return cam.finish(req, r.vars, r.vars.sessionCookie ? withSetCookie(res, r.vars.sessionCookie) : res); // an SSE body ships once it has gone out; anything else now\n };\n };\n}\n\n/** An outcome the wire cannot show (`login_failed`, `signup`, …) joined to this request's event;\n * the user is HMAC-hashed in-process. A silent no-op where the wrapper did not run. */\nexport const track = (req: Request, event: string, data?: { user?: string }): Promise<void> => coreTrack(slots.get(req), event, data);\n\n/** The beacon `<script>` tag for an HTML response — `''` where the wrapper did not run or the tenant turned the beacon off. */\nexport const scriptTag = (req: Request): string => coreScriptTag(slots.get(req));\n\n/** Test/reset hook: stops every poller and exit handler of every instance this module created. */\nexport function resetCamada(): void {\n for (const cam of instances) cam.reset();\n}\n","{\n \"name\": \"@camada/bun\",\n \"version\": \"0.1.2\",\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"check\": \"tsc --noEmit\"\n },\n \"description\": \"camada SDK for Bun.serve: snapshot enforcement, first-party challenge and beacon, track() outcomes, the socket peer from server.requestIP, timer-polled snapshot with exit flush\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"dependencies\": {\n \"@camada/core\": \"file:../camada-core\",\n \"@camada/browser\": \"file:../camada-browser\"\n },\n \"devDependencies\": {\n \"@types/bun\": \"^1.2.0\",\n \"@types/node\": \"^22.10.0\",\n \"tsup\": \"^8.3.5\",\n \"typescript\": \"^5.7.2\",\n \"vitest\": \"^3.0.0\"\n }\n}\n","// The SDK's wire identity (SDK-03): x-camada-sdk: <package>/<version>. Named JSON imports are\n// inlined and tree-shaken by tsup at build, so dist carries two literals — no runtime fs read.\nimport { name, version } from '../package.json';\nexport const SDK_ID = `${name}/${version}`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIA,kBAAiC;AACjC,mBAA4J;AAC5J,yBAAiB;;;ACLf,WAAQ;AACR,cAAW;;;ACCN,IAAM,SAAS,GAAG,IAAI,IAAI,OAAO;;;AFaxC,IAAM,QAAQ,oBAAI,QAA4B;AAC9C,IAAM,YAAY,oBAAI,IAAiB;AAOhC,SAAS,OAAO,OAAyB,CAAC,GAAG;AAClD,QAAM,UAAM,gCAAkB,EAAE,KAAK,qBAAS,KAAK,QAAQ,yBAAAA,QAAK,GAAG,EAAE,GAAG,MAAM,MAAM,KAAK,QAAQ,QAAQ,CAAC;AAC1G,YAAU,IAAI,GAAG;AACjB,SAAO,SAAS,KAAiE,SAA+E;AAC9J,WAAO,OAAO,KAAK,WAAW;AAG5B,YAAM,WAAO,qBAAQ,MAAM,QAAQ,YAAY,GAAG,GAAG,WAAW,MAAM,IAAI;AAC1E,YAAM,IAAI,MAAM,IAAI,OAAO,KAAK,EAAE,MAAM,KAAK,WAAW,KAAK,OAAO,WAAW,SAAS,IAAI,CAAC;AAC7F,UAAI,CAAC,EAAG,QAAO,QAAQ,KAAK,MAAM;AAClC,UAAI,EAAE,SAAU,QAAO,EAAE;AACzB,YAAM,IAAI,KAAK,EAAE,IAAI;AACrB,UAAI;AACJ,UAAI;AACF,cAAM,MAAM,QAAQ,KAAK,MAAM;AAAA,MACjC,SAAS,KAAK;AACZ,YAAI,MAAM,KAAK,EAAE,MAAM,GAAG;AAC1B,cAAM;AAAA,MACR;AACA,UAAI,CAAC,KAAK;AAAE,YAAI,MAAM,KAAK,EAAE,MAAM,GAAG;AAAG,eAAO;AAAA,MAAK;AACrD,aAAO,IAAI,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,oBAAgB,4BAAc,KAAK,EAAE,KAAK,aAAa,IAAI,GAAG;AAAA,IACtG;AAAA,EACF;AACF;AAIO,IAAM,QAAQ,CAAC,KAAc,OAAe,aAA4C,aAAAC,OAAU,MAAM,IAAI,GAAG,GAAG,OAAO,IAAI;AAG7H,IAAM,YAAY,CAAC,YAAyB,aAAAC,WAAc,MAAM,IAAI,GAAG,CAAC;AAGxE,SAAS,cAAoB;AAClC,aAAW,OAAO,UAAW,KAAI,MAAM;AACzC;","names":["iife","coreTrack","coreScriptTag"]}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import iife from "@camada/browser/iife-string";
|
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
7
|
var name = "@camada/bun";
|
|
8
|
-
var version = "0.1.
|
|
8
|
+
var version = "0.1.2";
|
|
9
9
|
|
|
10
10
|
// src/version.ts
|
|
11
11
|
var SDK_ID = `${name}/${version}`;
|
|
@@ -34,8 +34,7 @@ function camada(opts = {}) {
|
|
|
34
34
|
cam.after(req, r.vars, 101);
|
|
35
35
|
return res;
|
|
36
36
|
}
|
|
37
|
-
cam.
|
|
38
|
-
return r.vars.sessionCookie ? withSetCookie(res, r.vars.sessionCookie) : res;
|
|
37
|
+
return cam.finish(req, r.vars, r.vars.sessionCookie ? withSetCookie(res, r.vars.sessionCookie) : res);
|
|
39
38
|
};
|
|
40
39
|
};
|
|
41
40
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/camada.ts","../package.json","../src/version.ts"],"sourcesContent":["// @camada/bun — the Bun.serve binding for @camada/core/fetch. `wrap` sits around the app's fetch\n// handler: the socket peer comes from `server.requestIP` (the one address Bun vouches for), the\n// env from Bun.env, and there is no waitUntil — a long-lived process polls on a timer and drains\n// on exit instead. Bun has no per-request context object, so the Request itself keys the slot.\nimport { TAP_BUN, guarded } from '@camada/core';\nimport { createFetchCamada, withSetCookie, track as coreTrack, scriptTag as coreScriptTag, type FetchCamada, type FetchCamadaOptions, type FetchVars } from '@camada/core/fetch';\nimport iife from '@camada/browser/iife-string';\nimport { SDK_ID } from './version.js';\n\n/** The one thing the wrapper needs from Bun's server, typed structurally so the emitted types need no `bun` import; any `Bun.Server` satisfies it. */\nexport interface BunServer { requestIP(req: Request): { address: string } | null }\n/** A Bun fetch handler. `undefined`/`void` is what Bun's own websocket pattern returns after `server.upgrade(req)`. */\nexport type BunHandler<S extends BunServer = BunServer, R extends Response | undefined | void = Response> = (req: Request, server: S) => R | Promise<R>;\nexport type CamadaBunOptions = FetchCamadaOptions;\nexport type CamadaBunVars = FetchVars;\n\nconst slots = new WeakMap<Request, FetchVars>(); // set only when the app is about to run; camada's own answers leave nothing\nconst instances = new Set<FetchCamada>();\n\n/**\n * Builds one camada instance and returns `wrap`, which turns a Bun fetch handler into a guarded\n * one: `Bun.serve({ fetch: camada()(handler) })`. Timer mode by default (a server process lives\n * long enough to poll); `mode: 'lazy'` or CAMADA_SERVERLESS=1 switches to per-request refresh.\n */\nexport function camada(opts: CamadaBunOptions = {}) {\n const cam = createFetchCamada({ tap: TAP_BUN, sdk: SDK_ID, iife }, { ...opts, mode: opts.mode ?? 'timer' });\n instances.add(cam);\n return function wrap<S extends BunServer, R extends Response | undefined | void>(handler: BunHandler<S, R>): (req: Request, server: S) => Promise<Response | R> {\n return async (req, server) => {\n // Guarded: a runtime that is not Bun (or a Bun without a socket for this request) hands us\n // no peer rather than a throw. Client headers are core's to judge under the trusted-proxy rules.\n const peer = guarded(() => server?.requestIP?.(req)?.address ?? null, null);\n const r = await cam.before(req, { peer, env: globalThis.Bun?.env ?? globalThis.process?.env }); // Bun.env is process.env under Bun; the fallback is this suite under Node\n if (!r) return handler(req, server);\n if (r.response) return r.response;\n slots.set(req, r.vars);\n let res: R;\n try {\n res = await handler(req, server);\n } catch (err) {\n cam.after(req, r.vars, 500); // Bun answers 500 for a thrown handler (an `error` callback returning its own status is not visible here)\n throw err;\n }\n if (!res) { cam.after(req, r.vars, 101); return res; } // a websocket upgrade: Bun answers 101 itself, so there is no Response to carry a cookie\n cam.
|
|
1
|
+
{"version":3,"sources":["../src/camada.ts","../package.json","../src/version.ts"],"sourcesContent":["// @camada/bun — the Bun.serve binding for @camada/core/fetch. `wrap` sits around the app's fetch\n// handler: the socket peer comes from `server.requestIP` (the one address Bun vouches for), the\n// env from Bun.env, and there is no waitUntil — a long-lived process polls on a timer and drains\n// on exit instead. Bun has no per-request context object, so the Request itself keys the slot.\nimport { TAP_BUN, guarded } from '@camada/core';\nimport { createFetchCamada, withSetCookie, track as coreTrack, scriptTag as coreScriptTag, type FetchCamada, type FetchCamadaOptions, type FetchVars } from '@camada/core/fetch';\nimport iife from '@camada/browser/iife-string';\nimport { SDK_ID } from './version.js';\n\n/** The one thing the wrapper needs from Bun's server, typed structurally so the emitted types need no `bun` import; any `Bun.Server` satisfies it. */\nexport interface BunServer { requestIP(req: Request): { address: string } | null }\n/** A Bun fetch handler. `undefined`/`void` is what Bun's own websocket pattern returns after `server.upgrade(req)`. */\nexport type BunHandler<S extends BunServer = BunServer, R extends Response | undefined | void = Response> = (req: Request, server: S) => R | Promise<R>;\nexport type CamadaBunOptions = FetchCamadaOptions;\nexport type CamadaBunVars = FetchVars;\n\nconst slots = new WeakMap<Request, FetchVars>(); // set only when the app is about to run; camada's own answers leave nothing\nconst instances = new Set<FetchCamada>();\n\n/**\n * Builds one camada instance and returns `wrap`, which turns a Bun fetch handler into a guarded\n * one: `Bun.serve({ fetch: camada()(handler) })`. Timer mode by default (a server process lives\n * long enough to poll); `mode: 'lazy'` or CAMADA_SERVERLESS=1 switches to per-request refresh.\n */\nexport function camada(opts: CamadaBunOptions = {}) {\n const cam = createFetchCamada({ tap: TAP_BUN, sdk: SDK_ID, iife }, { ...opts, mode: opts.mode ?? 'timer' });\n instances.add(cam);\n return function wrap<S extends BunServer, R extends Response | undefined | void>(handler: BunHandler<S, R>): (req: Request, server: S) => Promise<Response | R> {\n return async (req, server) => {\n // Guarded: a runtime that is not Bun (or a Bun without a socket for this request) hands us\n // no peer rather than a throw. Client headers are core's to judge under the trusted-proxy rules.\n const peer = guarded(() => server?.requestIP?.(req)?.address ?? null, null);\n const r = await cam.before(req, { peer, env: globalThis.Bun?.env ?? globalThis.process?.env }); // Bun.env is process.env under Bun; the fallback is this suite under Node\n if (!r) return handler(req, server);\n if (r.response) return r.response;\n slots.set(req, r.vars);\n let res: R;\n try {\n res = await handler(req, server);\n } catch (err) {\n cam.after(req, r.vars, 500); // Bun answers 500 for a thrown handler (an `error` callback returning its own status is not visible here)\n throw err;\n }\n if (!res) { cam.after(req, r.vars, 101); return res; } // a websocket upgrade: Bun answers 101 itself, so there is no Response to carry a cookie\n return cam.finish(req, r.vars, r.vars.sessionCookie ? withSetCookie(res, r.vars.sessionCookie) : res); // an SSE body ships once it has gone out; anything else now\n };\n };\n}\n\n/** An outcome the wire cannot show (`login_failed`, `signup`, …) joined to this request's event;\n * the user is HMAC-hashed in-process. A silent no-op where the wrapper did not run. */\nexport const track = (req: Request, event: string, data?: { user?: string }): Promise<void> => coreTrack(slots.get(req), event, data);\n\n/** The beacon `<script>` tag for an HTML response — `''` where the wrapper did not run or the tenant turned the beacon off. */\nexport const scriptTag = (req: Request): string => coreScriptTag(slots.get(req));\n\n/** Test/reset hook: stops every poller and exit handler of every instance this module created. */\nexport function resetCamada(): void {\n for (const cam of instances) cam.reset();\n}\n","{\n \"name\": \"@camada/bun\",\n \"version\": \"0.1.2\",\n \"license\": \"MIT\",\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"LICENSE\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"test\": \"vitest run\",\n \"check\": \"tsc --noEmit\"\n },\n \"description\": \"camada SDK for Bun.serve: snapshot enforcement, first-party challenge and beacon, track() outcomes, the socket peer from server.requestIP, timer-polled snapshot with exit flush\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"dependencies\": {\n \"@camada/core\": \"file:../camada-core\",\n \"@camada/browser\": \"file:../camada-browser\"\n },\n \"devDependencies\": {\n \"@types/bun\": \"^1.2.0\",\n \"@types/node\": \"^22.10.0\",\n \"tsup\": \"^8.3.5\",\n \"typescript\": \"^5.7.2\",\n \"vitest\": \"^3.0.0\"\n }\n}\n","// The SDK's wire identity (SDK-03): x-camada-sdk: <package>/<version>. Named JSON imports are\n// inlined and tree-shaken by tsup at build, so dist carries two literals — no runtime fs read.\nimport { name, version } from '../package.json';\nexport const SDK_ID = `${name}/${version}`;\n"],"mappings":";AAIA,SAAS,SAAS,eAAe;AACjC,SAAS,mBAAmB,eAAe,SAAS,WAAW,aAAa,qBAAgF;AAC5J,OAAO,UAAU;;;ACLf,WAAQ;AACR,cAAW;;;ACCN,IAAM,SAAS,GAAG,IAAI,IAAI,OAAO;;;AFaxC,IAAM,QAAQ,oBAAI,QAA4B;AAC9C,IAAM,YAAY,oBAAI,IAAiB;AAOhC,SAAS,OAAO,OAAyB,CAAC,GAAG;AAClD,QAAM,MAAM,kBAAkB,EAAE,KAAK,SAAS,KAAK,QAAQ,KAAK,GAAG,EAAE,GAAG,MAAM,MAAM,KAAK,QAAQ,QAAQ,CAAC;AAC1G,YAAU,IAAI,GAAG;AACjB,SAAO,SAAS,KAAiE,SAA+E;AAC9J,WAAO,OAAO,KAAK,WAAW;AAG5B,YAAM,OAAO,QAAQ,MAAM,QAAQ,YAAY,GAAG,GAAG,WAAW,MAAM,IAAI;AAC1E,YAAM,IAAI,MAAM,IAAI,OAAO,KAAK,EAAE,MAAM,KAAK,WAAW,KAAK,OAAO,WAAW,SAAS,IAAI,CAAC;AAC7F,UAAI,CAAC,EAAG,QAAO,QAAQ,KAAK,MAAM;AAClC,UAAI,EAAE,SAAU,QAAO,EAAE;AACzB,YAAM,IAAI,KAAK,EAAE,IAAI;AACrB,UAAI;AACJ,UAAI;AACF,cAAM,MAAM,QAAQ,KAAK,MAAM;AAAA,MACjC,SAAS,KAAK;AACZ,YAAI,MAAM,KAAK,EAAE,MAAM,GAAG;AAC1B,cAAM;AAAA,MACR;AACA,UAAI,CAAC,KAAK;AAAE,YAAI,MAAM,KAAK,EAAE,MAAM,GAAG;AAAG,eAAO;AAAA,MAAK;AACrD,aAAO,IAAI,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,gBAAgB,cAAc,KAAK,EAAE,KAAK,aAAa,IAAI,GAAG;AAAA,IACtG;AAAA,EACF;AACF;AAIO,IAAM,QAAQ,CAAC,KAAc,OAAe,SAA4C,UAAU,MAAM,IAAI,GAAG,GAAG,OAAO,IAAI;AAG7H,IAAM,YAAY,CAAC,QAAyB,cAAc,MAAM,IAAI,GAAG,CAAC;AAGxE,SAAS,cAAoB;AAClC,aAAW,OAAO,UAAW,KAAI,MAAM;AACzC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camada/bun",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"module": "./dist/index.js",
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@camada/core": "^0.
|
|
27
|
-
"@camada/browser": "^0.
|
|
26
|
+
"@camada/core": "^0.5.0",
|
|
27
|
+
"@camada/browser": "^0.3.0"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|