@hatk/hatk 0.0.1-alpha.3 → 0.0.1-alpha.5
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/cli.js +6 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -611,6 +611,7 @@ backfill:
|
|
|
611
611
|
encoding: 'application/json',
|
|
612
612
|
schema: {
|
|
613
613
|
type: 'object',
|
|
614
|
+
required: ['items'],
|
|
614
615
|
properties: {
|
|
615
616
|
items: { type: 'array', items: { type: 'unknown' } },
|
|
616
617
|
cursor: { type: 'string' },
|
|
@@ -668,6 +669,7 @@ backfill:
|
|
|
668
669
|
encoding: 'application/json',
|
|
669
670
|
schema: {
|
|
670
671
|
type: 'object',
|
|
672
|
+
required: ['items'],
|
|
671
673
|
properties: {
|
|
672
674
|
items: { type: 'array', items: { type: 'unknown' } },
|
|
673
675
|
cursor: { type: 'string' },
|
|
@@ -699,6 +701,7 @@ backfill:
|
|
|
699
701
|
encoding: 'application/json',
|
|
700
702
|
schema: {
|
|
701
703
|
type: 'object',
|
|
704
|
+
required: ['items'],
|
|
702
705
|
properties: {
|
|
703
706
|
items: { type: 'array', items: { type: 'unknown' } },
|
|
704
707
|
cursor: { type: 'string' },
|
|
@@ -793,9 +796,10 @@ public
|
|
|
793
796
|
writeFileSync(join(dir, 'Dockerfile'), `FROM node:25-slim
|
|
794
797
|
WORKDIR /app
|
|
795
798
|
COPY package.json package-lock.json ./
|
|
796
|
-
RUN npm ci
|
|
799
|
+
RUN npm ci
|
|
797
800
|
COPY . .
|
|
798
801
|
RUN node_modules/.bin/hatk build
|
|
802
|
+
RUN npm prune --omit=dev
|
|
799
803
|
EXPOSE 3000
|
|
800
804
|
CMD ["node", "node_modules/@hatk/hatk/dist/main.js", "config.yaml"]
|
|
801
805
|
`);
|
|
@@ -807,6 +811,7 @@ CMD ["node", "node_modules/@hatk/hatk/dist/main.js", "config.yaml"]
|
|
|
807
811
|
typescript: '^5',
|
|
808
812
|
vite: '^6',
|
|
809
813
|
vitest: '^4',
|
|
814
|
+
'@types/node': '^22',
|
|
810
815
|
};
|
|
811
816
|
if (withSvelte) {
|
|
812
817
|
pkgDevDeps['@sveltejs/adapter-static'] = '^3';
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAmD3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AA2B9C,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,EACrB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,MAAM,GAAE,MAAM,EAAO,EACrB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAC/D,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAA;AAmD3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AA2B9C,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EAAE,EACrB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,EAAE,WAAW,GAAG,IAAI,EACzB,MAAM,GAAE,MAAM,EAAO,EACrB,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAC/D,MAAM,CA28BR"}
|
package/dist/server.js
CHANGED
|
@@ -481,7 +481,14 @@ export function startServer(port, collections, publicDir, oauth, admins = [], re
|
|
|
481
481
|
const sizeRows = await querySQL(`SELECT database_size, memory_usage, memory_limit FROM pragma_database_size()`);
|
|
482
482
|
const dbInfo = sizeRows[0] ?? {};
|
|
483
483
|
const collectionCounts = await getCollectionCounts();
|
|
484
|
-
|
|
484
|
+
const mem = process.memoryUsage();
|
|
485
|
+
const node = {
|
|
486
|
+
rss: `${(mem.rss / 1024 / 1024).toFixed(1)} MiB`,
|
|
487
|
+
heapUsed: `${(mem.heapUsed / 1024 / 1024).toFixed(1)} MiB`,
|
|
488
|
+
heapTotal: `${(mem.heapTotal / 1024 / 1024).toFixed(1)} MiB`,
|
|
489
|
+
external: `${(mem.external / 1024 / 1024).toFixed(1)} MiB`,
|
|
490
|
+
};
|
|
491
|
+
jsonResponse(res, { repos: counts, duckdb: dbInfo, node, collections: collectionCounts });
|
|
485
492
|
return;
|
|
486
493
|
}
|
|
487
494
|
// GET /admin/info/:did — repo status info
|