@kosha-ai/server 0.0.5 → 0.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/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +7 -0
- package/package.json +4 -4
package/dist/bootstrap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAI/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,gBAAgB,CAAC,CA0B3B;AAED,gCAAgC;AAChC,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,gBAAgB,CAAC,CAkB3B"}
|
package/dist/bootstrap.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
2
|
import { NestFactory } from '@nestjs/core';
|
|
3
|
+
import express from 'express';
|
|
3
4
|
import { createAdminProxy } from './admin-proxy.js';
|
|
4
5
|
import { resolveConfig } from './config/kosha-config.js';
|
|
5
6
|
import { KoshaModule } from './kosha.module.js';
|
|
@@ -15,6 +16,12 @@ export async function createKoshaServer(config) {
|
|
|
15
16
|
const app = await NestFactory.create(KoshaModule.forRoot(resolved), {
|
|
16
17
|
bodyParser: false,
|
|
17
18
|
});
|
|
19
|
+
const expressApp = app.getHttpAdapter().getInstance();
|
|
20
|
+
for (const integration of resolved.integrations) {
|
|
21
|
+
if (integration.docsPath) {
|
|
22
|
+
expressApp.use(`/${resolved.server.globalPrefix}/integrations/${integration.key}/docs`, express.static(integration.docsPath));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
const cors = resolved.server.cors;
|
|
19
26
|
app.enableCors({
|
|
20
27
|
origin: cors?.origin ?? resolved.auth.trustedOrigins ?? [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosha-ai/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Kosha server: OAuth handshake, encrypted credential storage, token refresh, and an authenticated request proxy for third-party integrations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kosha",
|
|
@@ -105,14 +105,14 @@
|
|
|
105
105
|
"rxjs": "^7.8.0",
|
|
106
106
|
"tslib": "^2.3.0",
|
|
107
107
|
"zod": "4.5.4",
|
|
108
|
-
"@kosha-ai/integration-sdk": "0.0.
|
|
108
|
+
"@kosha-ai/integration-sdk": "0.0.6"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@nestjs/testing": "^11.0.0",
|
|
112
112
|
"@types/express": "^5.0.6",
|
|
113
113
|
"@types/pg": "^8.23.1",
|
|
114
114
|
"prisma": "^7.10.0",
|
|
115
|
-
"@kosha-ai/integration-github": "0.0.
|
|
116
|
-
"@kosha-ai/integration-slack": "0.0.
|
|
115
|
+
"@kosha-ai/integration-github": "0.0.6",
|
|
116
|
+
"@kosha-ai/integration-slack": "0.0.6"
|
|
117
117
|
}
|
|
118
118
|
}
|