@ontrails/hono 1.0.0-beta.16 → 1.0.0-beta.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @ontrails/hono
2
2
 
3
+ ## 1.0.0-beta.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 61497c5: Add v1-minimum public API examples for shipped surface entrypoints.
8
+ - Updated dependencies [3dc8254]
9
+ - Updated dependencies [61497c5]
10
+ - @ontrails/core@1.0.0-beta.17
11
+ - @ontrails/http@1.0.0-beta.17
12
+
3
13
  ## 1.0.0-beta.16
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontrails/hono",
3
- "version": "1.0.0-beta.16",
3
+ "version": "1.0.0-beta.17",
4
4
  "files": [
5
5
  "src/**/*.ts",
6
6
  "!src/**/__tests__/**",
@@ -22,11 +22,11 @@
22
22
  "clean": "rm -rf dist *.tsbuildinfo"
23
23
  },
24
24
  "dependencies": {
25
- "@ontrails/core": "^1.0.0-beta.15",
25
+ "@ontrails/core": "^1.0.0-beta.16",
26
26
  "hono": "^4.7.0"
27
27
  },
28
28
  "peerDependencies": {
29
- "@ontrails/http": "^1.0.0-beta.15",
29
+ "@ontrails/http": "^1.0.0-beta.16",
30
30
  "zod": "^4.3.5"
31
31
  }
32
32
  }
package/src/surface.ts CHANGED
@@ -628,6 +628,14 @@ const registerErrorHandler = (hono: Hono): void => {
628
628
  * @remarks This is a host materialization boundary. Derivation failures are
629
629
  * thrown for HTTP bootstrap code after `deriveHttpRoutes` has already
630
630
  * represented the framework error as a Result.
631
+ *
632
+ * @example
633
+ * ```ts
634
+ * import { createApp } from '@ontrails/hono';
635
+ *
636
+ * const app = createApp(graph, { basePath: '/api' });
637
+ * Bun.serve({ fetch: app.fetch, port: 3000 });
638
+ * ```
631
639
  */
632
640
  export const createApp = (
633
641
  graph: Topo,
@@ -688,6 +696,14 @@ const startServer = (
688
696
  *
689
697
  * @remarks Always starts a Bun server. Use `createApp(graph)` for an
690
698
  * unserved Hono app that you can wire into your own server.
699
+ *
700
+ * @example
701
+ * ```ts
702
+ * import { surface } from '@ontrails/hono';
703
+ *
704
+ * const server = await surface(graph, { port: 3000 });
705
+ * console.log(server.url);
706
+ * ```
691
707
  */
692
708
  export const surface = async (
693
709
  graph: Topo,