mindspace: version runtime contracts and audit packages
This commit is contained in:
@@ -1,9 +1,27 @@
|
||||
import { bootstrapMindSpaceService } from './mindspace-service-bootstrap.mjs';
|
||||
import { startMindSpaceRpcServer } from './mindspace-rpc-server.mjs';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const logger = console;
|
||||
|
||||
async function readBuildInfo() {
|
||||
try {
|
||||
const raw = await fs.readFile(
|
||||
path.join(__dirname, 'build-info.json'),
|
||||
'utf8',
|
||||
);
|
||||
return JSON.parse(raw);
|
||||
} catch {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const buildInfo = await readBuildInfo();
|
||||
const service = await bootstrapMindSpaceService({ env: process.env, logger });
|
||||
const rpc = await startMindSpaceRpcServer({
|
||||
adapter: service.adapter,
|
||||
@@ -11,6 +29,9 @@ async function main() {
|
||||
logger,
|
||||
serviceMeta: {
|
||||
operationBasePath: service.runtime.remote.operationBasePath,
|
||||
buildId: buildInfo.buildId,
|
||||
gitSha: buildInfo.gitSha,
|
||||
builtAt: buildInfo.builtAt,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user