@nimbus-sh/worker 0.1.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -17,10 +17,9 @@
17
17
  * ID embedded in /s/<id>/* paths. URL → DO mapping is a stable
18
18
  * contract delegated to {@link createNimbusHandler}.
19
19
  *
20
- * The fetch handler delegates to `createNimbusHandler({ auth: { mode:
21
- * 'auto' } })` — same shape an external embedder uses via
22
- * `@nimbus-sh/worker`. This file's only deploy-specific logic is the
23
- * W6.5 registry-event sink installed at module-load time.
20
+ * Application embedders import this deploy-time surface through
21
+ * `@nimbus-sh/sdk/worker`. This implementation package keeps the
22
+ * runtime and generated assets in one place.
24
23
  */
25
24
  import { NimbusSession, NimbusAssetsRPC, NimbusLoaderRPC, NimbusLoadedWorker, NimbusLoadedEntrypoint, NimbusDurableObjectNamespace, NimbusDOStub } from './session/nimbus-session.js';
26
25
  import { SupervisorRPC } from './session/supervisor-rpc.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,YAAY,EACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAUzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,QAAQ,EACR,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAmBzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,YAAY,EACZ,YAAY,GACb,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAEnC;;AAOD,wBAAqC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,YAAY,EACb,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAUzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,QAAQ,EACR,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAmBzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,YAAY,EACZ,YAAY,GACb,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAEnC;;AAOD,wBAAqC"}
package/dist/index.js CHANGED
@@ -17,10 +17,9 @@
17
17
  * ID embedded in /s/<id>/* paths. URL → DO mapping is a stable
18
18
  * contract delegated to {@link createNimbusHandler}.
19
19
  *
20
- * The fetch handler delegates to `createNimbusHandler({ auth: { mode:
21
- * 'auto' } })` — same shape an external embedder uses via
22
- * `@nimbus-sh/worker`. This file's only deploy-specific logic is the
23
- * W6.5 registry-event sink installed at module-load time.
20
+ * Application embedders import this deploy-time surface through
21
+ * `@nimbus-sh/sdk/worker`. This implementation package keeps the
22
+ * runtime and generated assets in one place.
24
23
  */
25
24
  import { NimbusSession, NimbusAssetsRPC, NimbusLoaderRPC, NimbusLoadedWorker, NimbusLoadedEntrypoint, NimbusDurableObjectNamespace, NimbusDOStub, } from './session/nimbus-session.js';
26
25
  import { SupervisorRPC } from './session/supervisor-rpc.js';
@@ -28,16 +27,15 @@ import { CirrusHmrRPC } from './facets/real-vite-hmr.js';
28
27
  import { createNimbusHandler } from './router/index.js';
29
28
  import { getCtxExports as _getCtxExports } from './session/ctx-exports.js';
30
29
  import { setRegistryEventSink } from './facets/wasm-swap-registry.js';
31
- // Re-export the composable factory + companion types so embedders can
32
- // build their own default-export handlers. The thin path:
33
- // import { createNimbusHandler, NimbusSession } from '@nimbus-sh/worker';
30
+ // Re-export the composable factory + companion types. The SDK worker
31
+ // subpath re-exports these for application embedders:
32
+ // import { createNimbusHandler, NimbusSession } from '@nimbus-sh/sdk/worker';
34
33
  // export { NimbusSession };
35
34
  // export default createNimbusHandler();
36
35
  export { createNimbusHandler } from './router/index.js';
37
36
  // Auth surface — embedders need `issueNimbusToken` / `verifyNimbusToken`
38
- // to mint tokens from custom routes. Re-exported here for the canonical
39
- // `@nimbus-sh/worker` entry; `@nimbus-sh/sdk/token` re-re-exports from
40
- // the dedicated auth subpath for non-Worker callers.
37
+ // to mint tokens from custom routes. `@nimbus-sh/sdk/token` re-exports
38
+ // from the dedicated auth subpath for application callers.
41
39
  export { issueNimbusToken, verifyNimbusToken, NimbusAuthError, } from './auth/index.js';
42
40
  // W6.5: install the default registry-event sink at module top so events
43
41
  // emitted from any code path (supervisor BFS, facet drain, applyW6Registry)
@@ -15,7 +15,7 @@
15
15
  * W7-frame symbols: encodeWriteBatchStream, decodeWriteBatchStream,
16
16
  * W7_MAGIC, W7_TRAILER.
17
17
  *
18
- * Generated at: 2026-06-02T20:52:06.510Z
18
+ * Generated at: 2026-06-04T21:03:19.350Z
19
19
  * Tar size: 3.84 KiB
20
20
  * W7 size: 7.77 KiB
21
21
  */
@@ -15,7 +15,7 @@
15
15
  * W7-frame symbols: encodeWriteBatchStream, decodeWriteBatchStream,
16
16
  * W7_MAGIC, W7_TRAILER.
17
17
  *
18
- * Generated at: 2026-06-02T20:52:06.510Z
18
+ * Generated at: 2026-06-04T21:03:19.350Z
19
19
  * Tar size: 3.84 KiB
20
20
  * W7 size: 7.77 KiB
21
21
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * router/index.ts — `createNimbusHandler` factory.
3
3
  *
4
- * The Worker entry's `default { fetch }` is now a thin call into this
5
- * factory. The factory is the **composable surface** an embedder gets via
6
- * `@nimbus-sh/worker`:
4
+ * The Worker entry's `default { fetch }` is a thin call into this
5
+ * factory. Application embedders get the composable surface via
6
+ * `@nimbus-sh/sdk/worker`:
7
7
  *
8
- * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/worker';
8
+ * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/sdk/worker';
9
9
  * export { NimbusSession };
10
10
  * export default createNimbusHandler({
11
11
  * // Optional embedder hooks (all default no-op):
@@ -124,14 +124,14 @@ export interface NimbusHandler {
124
124
  *
125
125
  * @example minimal embedder
126
126
  * ```ts
127
- * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/worker';
127
+ * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/sdk/worker';
128
128
  * export { NimbusSession };
129
129
  * export default createNimbusHandler();
130
130
  * ```
131
131
  *
132
132
  * @example embedder with auth + a custom route
133
133
  * ```ts
134
- * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/worker';
134
+ * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/sdk/worker';
135
135
  * import { issueNimbusToken } from '@nimbus-sh/sdk/token';
136
136
  *
137
137
  * export { NimbusSession };
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * router/index.ts — `createNimbusHandler` factory.
3
3
  *
4
- * The Worker entry's `default { fetch }` is now a thin call into this
5
- * factory. The factory is the **composable surface** an embedder gets via
6
- * `@nimbus-sh/worker`:
4
+ * The Worker entry's `default { fetch }` is a thin call into this
5
+ * factory. Application embedders get the composable surface via
6
+ * `@nimbus-sh/sdk/worker`:
7
7
  *
8
- * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/worker';
8
+ * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/sdk/worker';
9
9
  * export { NimbusSession };
10
10
  * export default createNimbusHandler({
11
11
  * // Optional embedder hooks (all default no-op):
@@ -41,14 +41,14 @@ import { setCtxExports } from '../session/ctx-exports.js';
41
41
  *
42
42
  * @example minimal embedder
43
43
  * ```ts
44
- * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/worker';
44
+ * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/sdk/worker';
45
45
  * export { NimbusSession };
46
46
  * export default createNimbusHandler();
47
47
  * ```
48
48
  *
49
49
  * @example embedder with auth + a custom route
50
50
  * ```ts
51
- * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/worker';
51
+ * import { NimbusSession, createNimbusHandler } from '@nimbus-sh/sdk/worker';
52
52
  * import { issueNimbusToken } from '@nimbus-sh/sdk/token';
53
53
  *
54
54
  * export { NimbusSession };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nimbus-sh/worker",
3
- "version": "0.1.0",
4
- "description": "Nimbus — cloud dev environment runtime for Cloudflare Workers. Re-export NimbusSession + createNimbusHandler from your Worker.",
3
+ "version": "0.1.1",
4
+ "description": "Nimbus runtime package for Cloudflare Workers, re-exported publicly through @nimbus-sh/sdk/worker.",
5
5
  "homepage": "https://github.com/AshishKumar4/Nimbus",
6
6
  "repository": {
7
7
  "type": "git",