@btravstack/observability 0.10.0 → 0.11.0

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.
Files changed (2) hide show
  1. package/README.md +14 -6
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -1,13 +1,21 @@
1
1
  <!-- doctest: prelude
2
- import { HttpModule } from "@btravstack/http-server";
3
- import { Port } from "@btravstack/di";
4
- import type { AsyncResult } from "unthrown";
5
- import { orderRouter } from "../../module.js";
2
+ import { HttpModule, defineHttp } from "@btravstack/http-server";
3
+ import { Port, type AnyModule } from "@btravstack/di";
4
+ import { OkAsync, type AsyncResult } from "unthrown";
5
+ import { oc } from "@orpc/contract";
6
6
  import { otel } from "@btravstack/observability/otel";
7
7
  import { cache } from "@btravstack/cache";
8
8
  import { redisCache } from "@btravstack/cache/redis";
9
- import { CustomersSlice } from "../../slices/customers/module.js";
10
- import { OrdersSlice } from "../../slices/orders/module.js";
9
+
10
+ // The application's own router and slices, declared here so this sample stands
11
+ // on the published packages alone.
12
+ const api = defineHttp();
13
+ const orderRouter = api.OrpcRouter({ orders: { place: oc } })({
14
+ inject: {},
15
+ sync: () => ({ orders: { place: () => OkAsync("placed") } }),
16
+ });
17
+ declare const OrdersSlice: AnyModule;
18
+ declare const CustomersSlice: AnyModule;
11
19
  class PlaceOrder extends Port("PlaceOrder")<{
12
20
  readonly execute: (id: string, quantity: number) => AsyncResult<void, never>;
13
21
  }> {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@btravstack/observability",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Observability for @btravstack/core: a strict Logger port correlated with the kernel's units, a dependency-free JSON sink, and the lifecycle events as log lines",
5
5
  "keywords": [
6
6
  "dependency-injection",
@@ -77,19 +77,19 @@
77
77
  "typescript": "7.0.2",
78
78
  "unthrown": "5.7.0",
79
79
  "vitest": "4.1.11",
80
- "@btravstack/config": "0.10.0",
81
- "@btravstack/core": "0.10.0",
82
- "@btravstack/di": "0.10.0",
83
- "@btravstack/testing": "0.10.0"
80
+ "@btravstack/config": "0.11.0",
81
+ "@btravstack/core": "0.11.0",
82
+ "@btravstack/di": "0.11.0",
83
+ "@btravstack/testing": "0.11.0"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@opentelemetry/api": "^1.9.0",
87
87
  "@opentelemetry/sdk-node": "^0.221.0",
88
88
  "pino": "^10",
89
89
  "unthrown": "^5.0.0",
90
- "@btravstack/config": "^0.10.0",
91
- "@btravstack/core": "^0.10.0",
92
- "@btravstack/di": "^0.10.0"
90
+ "@btravstack/config": "^0.11.0",
91
+ "@btravstack/core": "^0.11.0",
92
+ "@btravstack/di": "^0.11.0"
93
93
  },
94
94
  "peerDependenciesMeta": {
95
95
  "@opentelemetry/api": {