@arcote.tech/arc-host 0.7.6 → 0.7.7
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.js +4 -2037
- package/dist/index.js.map +4 -60
- package/dist/src/create-server.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/create-server.ts +10 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-server.d.ts","sourceRoot":"","sources":["../../src/create-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"create-server.d.ts","sourceRoot":"","sources":["../../src/create-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAQ,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAOjD,OAAO,KAAK,EACV,cAAc,EAGd,YAAY,EACb,MAAM,oBAAoB,CAAC;AAG5B,KAAK,aAAa,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,aAAa,CAAC;IACvB,gBAAgB,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,cAAc,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;kEAG8D;IAC9D,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAC9B,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,aAAa,EAAE,aAAa,CAAC;IAC7B,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,SAAS,CAAC,CA0PpB"}
|
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.7.
|
|
7
|
+
"version": "0.7.7",
|
|
8
8
|
"private": false,
|
|
9
9
|
"author": "Przemysław Krasiński [arcote.tech]",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@arcote.tech/arc-adapter-db-sqlite": "^0.7.
|
|
11
|
+
"@arcote.tech/arc-adapter-db-sqlite": "^0.7.7",
|
|
12
12
|
"croner": "^9.0.0",
|
|
13
13
|
"jsonwebtoken": "^9.0.2"
|
|
14
14
|
},
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@types/bun": "^1.2.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@arcote.tech/arc": "^0.7.
|
|
28
|
-
"@arcote.tech/arc-otel": "^0.7.
|
|
27
|
+
"@arcote.tech/arc": "^0.7.7",
|
|
28
|
+
"@arcote.tech/arc-otel": "^0.7.7"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
31
31
|
"@arcote.tech/arc-otel": {
|
package/src/create-server.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { ArcContextAny, DatabaseAdapter } from "@arcote.tech/arc";
|
|
2
|
-
import type {
|
|
3
|
-
ArcTelemetry,
|
|
4
|
-
Span,
|
|
5
|
-
} from "@arcote.tech/arc-otel";
|
|
2
|
+
import type { ArcTelemetry, Span } from "@arcote.tech/arc-otel";
|
|
6
3
|
import type { Server } from "bun";
|
|
7
4
|
import jwt from "jsonwebtoken";
|
|
8
5
|
import { ConnectionManager } from "./connection-manager";
|
|
@@ -65,17 +62,15 @@ export async function createArcServer(
|
|
|
65
62
|
const port = config.port || 5005;
|
|
66
63
|
|
|
67
64
|
// Init context handler — telemetry (if any) flows through so executeCommand
|
|
68
|
-
// emits `command.<name>` spans parented to the active HTTP/WS span.
|
|
69
|
-
// adapter
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})
|
|
78
|
-
: rawDbAdapter;
|
|
65
|
+
// emits `command.<name>` spans parented to the active HTTP/WS span.
|
|
66
|
+
// DB adapter wrapping (per-transaction spans) is the caller's
|
|
67
|
+
// responsibility: pass an already-wrapped `dbAdapterFactory` if
|
|
68
|
+
// db spans are wanted. We don't `import()` arc-otel from here because
|
|
69
|
+
// doing so bundles its OTel SDK transitively into arc-host's dist,
|
|
70
|
+
// which then duplicates the @opentelemetry/api singleton when the CLI
|
|
71
|
+
// bundles arc-otel directly — leading to two global tracer providers
|
|
72
|
+
// and silent span loss.
|
|
73
|
+
const dbAdapter = config.dbAdapterFactory(config.context);
|
|
79
74
|
const contextHandler = new ContextHandler(
|
|
80
75
|
config.context,
|
|
81
76
|
dbAdapter,
|