btca-server 2.0.0 → 2.0.2
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/package.json +1 -1
- package/src/index.ts +4 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Effect, Cause } from 'effect';
|
|
2
2
|
import { HttpRouter, HttpServerRequest, HttpServerResponse } from 'effect/unstable/http';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import packageJson from '../package.json';
|
|
4
5
|
|
|
5
6
|
import { createAgentService } from './agent/service.ts';
|
|
6
7
|
import { createCollectionsService } from './collections/service.ts';
|
|
@@ -28,6 +29,8 @@ import { disposeAllVirtualFs } from './vfs/virtual-fs.ts';
|
|
|
28
29
|
const DEFAULT_PORT = 8080;
|
|
29
30
|
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : DEFAULT_PORT;
|
|
30
31
|
const modelsDevPricing = createModelsDevPricing();
|
|
32
|
+
declare const __VERSION__: string;
|
|
33
|
+
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : (packageJson.version ?? '0.0.0');
|
|
31
34
|
|
|
32
35
|
const RESOURCE_NAME_REGEX = /^@?[a-zA-Z0-9][a-zA-Z0-9._-]*(\/[a-zA-Z0-9][a-zA-Z0-9._-]*)*$/;
|
|
33
36
|
const SAFE_NAME_REGEX = /^[a-zA-Z0-9._+\-/:]+$/;
|
|
@@ -197,7 +200,7 @@ const createApp = () => {
|
|
|
197
200
|
HttpServerResponse.jsonUnsafe({
|
|
198
201
|
ok: true,
|
|
199
202
|
service: 'btca-server',
|
|
200
|
-
version:
|
|
203
|
+
version: VERSION
|
|
201
204
|
})
|
|
202
205
|
),
|
|
203
206
|
HttpRouter.route(
|