@kuckit/app-server 2.0.3 → 2.0.6

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
@@ -183,7 +183,8 @@ declare const setupAPIReference: (app: Express, options: SetupRoutesOptions) =>
183
183
  */
184
184
  declare const setupModuleRestRouters: (app: Express, options: SetupRoutesOptions) => void;
185
185
  /**
186
- * Setup health check endpoint
186
+ * Setup health check endpoint (includes database connectivity check)
187
+ * Used for liveness probes and ongoing health monitoring.
187
188
  */
188
189
  declare const setupHealth: (app: Express, container: KuckitContainer) => void;
189
190
  /**
package/dist/index.js CHANGED
@@ -127,12 +127,22 @@ const setupModuleRestRouters = (app, options) => {
127
127
  }
128
128
  };
129
129
  /**
130
- * Setup health check endpoint
130
+ * Setup startup probe endpoint (lightweight, no external dependencies)
131
+ * Used by Cloud Run startup probes to confirm the server is running.
131
132
  */
132
- const setupHealth = (app, container) => {
133
- app.get("/", (_req, res) => {
134
- res.status(200).send("OK");
133
+ const setupStartup = (app) => {
134
+ app.get("/startup", (_req, res) => {
135
+ res.status(200).json({
136
+ status: "started",
137
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
138
+ });
135
139
  });
140
+ };
141
+ /**
142
+ * Setup health check endpoint (includes database connectivity check)
143
+ * Used for liveness probes and ongoing health monitoring.
144
+ */
145
+ const setupHealth = (app, container) => {
136
146
  app.get("/health", async (_req, res) => {
137
147
  const { dbPool } = container.cradle;
138
148
  try {
@@ -270,6 +280,7 @@ const createKuckitServer = async (options) => {
270
280
  setupRPC(app, routeOptions);
271
281
  setupAPIReference(app, routeOptions);
272
282
  setupModuleRestRouters(app, routeOptions);
283
+ setupStartup(app);
273
284
  setupMetrics(app, container);
274
285
  setupHealth(app, container);
275
286
  setupStaticFiles(app);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuckit/app-server",
3
- "version": "2.0.3",
3
+ "version": "2.0.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,17 +23,18 @@
23
23
  "prepublishOnly": "npm run build && node ../../scripts/resolve-workspace-protocols.cjs && node ../../scripts/check-no-workspace-protocol.cjs"
24
24
  },
25
25
  "dependencies": {
26
- "@kuckit/sdk": "^2.0.3",
27
- "@kuckit/api": "^2.0.3",
28
- "@kuckit/db": "^2.0.3",
29
- "@kuckit/domain": "^2.0.3",
30
- "@kuckit/infrastructure": "^2.0.3",
31
- "@kuckit/auth": "^2.0.3",
26
+ "@kuckit/sdk": "^2.0.6",
27
+ "@kuckit/api": "^2.0.6",
28
+ "@kuckit/db": "^2.0.6",
29
+ "@kuckit/domain": "^2.0.6",
30
+ "@kuckit/infrastructure": "^2.0.6",
31
+ "@kuckit/auth": "^2.0.6",
32
32
  "express": "^5.1.0",
33
33
  "cors": "^2.8.5",
34
34
  "awilix": "^12.0.5",
35
35
  "@orpc/server": "^1.10.0",
36
36
  "@orpc/openapi": "^1.10.0",
37
+ "@orpc/zod": "^1.10.0",
37
38
  "better-auth": "^1.3.28",
38
39
  "pg": "^8.11.3"
39
40
  },