@heyhru/app-dms-server 0.9.0 → 0.9.1
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/chunk-Q4FLM4HF.js +23 -0
- package/dist/index.js +3 -29
- package/dist/otel.js +11 -0
- package/package.json +2 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
if (!process.env.DATABASE_URL) {
|
|
3
|
+
throw new Error("DATABASE_URL environment variable is required");
|
|
4
|
+
}
|
|
5
|
+
var config = {
|
|
6
|
+
port: Number(process.env.PORT) || 3001,
|
|
7
|
+
jwtSecret: process.env.JWT_SECRET || "dev-secret-change-in-production",
|
|
8
|
+
jwtExpiresIn: "24h",
|
|
9
|
+
encryptionKey: process.env.ENCRYPTION_KEY || "dev-encryption-key-32-bytes-long!",
|
|
10
|
+
dbUrl: process.env.DATABASE_URL,
|
|
11
|
+
dbSsl: process.env.DATABASE_SSL === "true",
|
|
12
|
+
dbPoolMin: Number(process.env.DATABASE_POOL_MIN) || 2,
|
|
13
|
+
dbPoolMax: Number(process.env.DATABASE_POOL_MAX) || 10,
|
|
14
|
+
dbIdleTimeoutMs: Number(process.env.DATABASE_IDLE_TIMEOUT) || 1e4,
|
|
15
|
+
nodeEnv: process.env.NODE_ENV || "development",
|
|
16
|
+
logDir: process.env.LOG_DIR || "",
|
|
17
|
+
otelEndpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4317",
|
|
18
|
+
otelEnabled: process.env.OTEL_ENABLED === "true"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
config
|
|
23
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// src/config.ts
|
|
5
|
-
if (!process.env.DATABASE_URL) {
|
|
6
|
-
throw new Error("DATABASE_URL environment variable is required");
|
|
7
|
-
}
|
|
8
|
-
var config = {
|
|
9
|
-
port: Number(process.env.PORT) || 3001,
|
|
10
|
-
jwtSecret: process.env.JWT_SECRET || "dev-secret-change-in-production",
|
|
11
|
-
jwtExpiresIn: "24h",
|
|
12
|
-
encryptionKey: process.env.ENCRYPTION_KEY || "dev-encryption-key-32-bytes-long!",
|
|
13
|
-
dbUrl: process.env.DATABASE_URL,
|
|
14
|
-
dbSsl: process.env.DATABASE_SSL === "true",
|
|
15
|
-
dbPoolMin: Number(process.env.DATABASE_POOL_MIN) || 2,
|
|
16
|
-
dbPoolMax: Number(process.env.DATABASE_POOL_MAX) || 10,
|
|
17
|
-
dbIdleTimeoutMs: Number(process.env.DATABASE_IDLE_TIMEOUT) || 1e4,
|
|
18
|
-
nodeEnv: process.env.NODE_ENV || "development",
|
|
19
|
-
logDir: process.env.LOG_DIR || "",
|
|
20
|
-
otelEndpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4317",
|
|
21
|
-
otelEnabled: process.env.OTEL_ENABLED === "true"
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
// src/otel.ts
|
|
25
|
-
initOtel({
|
|
26
|
-
serviceName: "app-dms-server",
|
|
27
|
-
endpoint: config.otelEndpoint,
|
|
28
|
-
enabled: config.otelEnabled
|
|
29
|
-
});
|
|
1
|
+
import {
|
|
2
|
+
config
|
|
3
|
+
} from "./chunk-Q4FLM4HF.js";
|
|
30
4
|
|
|
31
5
|
// src/index.ts
|
|
32
6
|
import { createPgDb } from "@heyhru/server-plugin-pg";
|
package/dist/otel.js
ADDED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.9.
|
|
6
|
+
"version": "0.9.1",
|
|
7
7
|
"description": "DMS backend API server built on Fastify",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist/index.mjs",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"typescript": "^6.0.2",
|
|
44
44
|
"vitest": "^4.1.4"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "3c0d1f14059d98f7e92c7a7134590c071300966e"
|
|
47
47
|
}
|