@arcote.tech/arc-cli 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 +11988 -28969
- package/package.json +22 -10
- package/src/builder/dependency-collector.ts +34 -1
- package/src/commands/platform-deploy.ts +6 -0
- package/src/deploy/bootstrap.ts +35 -7
- package/src/deploy/compose.ts +12 -0
- package/src/deploy/htpasswd.ts +20 -0
- package/src/deploy/observability-configs.ts +674 -9
- package/src/platform/server.ts +19 -1
package/src/platform/server.ts
CHANGED
|
@@ -600,7 +600,25 @@ export async function startPlatformServer(
|
|
|
600
600
|
// Context available — use createArcServer with platform handlers on top.
|
|
601
601
|
// `resolveDbAdapterFactory` picks SQLite or Postgres based on DATABASE_URL.
|
|
602
602
|
const dbPath = opts.dbPath || join(ws.arcDir, "data", "arc.db");
|
|
603
|
-
const
|
|
603
|
+
const baseDbFactory = await resolveDbAdapterFactory(dbPath);
|
|
604
|
+
|
|
605
|
+
// Wrap the DB adapter for per-transaction spans when telemetry is on.
|
|
606
|
+
// Done here (not in arc-host) so arc-host stays free of arc-otel runtime
|
|
607
|
+
// imports — duplicate @opentelemetry/api copies silently drop spans.
|
|
608
|
+
let dbAdapterFactory = baseDbFactory;
|
|
609
|
+
if (telemetry) {
|
|
610
|
+
// Pull wrapDbAdapter from `/server` (not the root export) so Bun
|
|
611
|
+
// doesn't double-bundle arc-otel for the CLI bundle. Both /server
|
|
612
|
+
// and / share telemetry.ts but split bundling otherwise.
|
|
613
|
+
const { wrapDbAdapter } = await import("@arcote.tech/arc-otel/server");
|
|
614
|
+
const dbSystem: "postgresql" | "sqlite" = process.env.DATABASE_URL
|
|
615
|
+
? "postgresql"
|
|
616
|
+
: "sqlite";
|
|
617
|
+
dbAdapterFactory = async (ctx: any) => {
|
|
618
|
+
const a = await baseDbFactory(ctx);
|
|
619
|
+
return wrapDbAdapter(a, telemetry, dbSystem);
|
|
620
|
+
};
|
|
621
|
+
}
|
|
604
622
|
|
|
605
623
|
const arcServer = await createArcServer({
|
|
606
624
|
context,
|