fix: resolve TypeScript and pip build errors

- tsconfig.json: remove duplicate target, add missing comma
- requirements.txt: fix boto3/botocore version conflict
- deployAll.ts, deployService.ts: remove duplicate concatenated code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

RoadChain-SHA2048: f3e2c6a6f3c323b4
RoadChain-Identity: alexa@sovereign
RoadChain-Full: f3e2c6a6f3c323b4d200ae278824975d0b102ec0ee1708560ccae57bf0f31819f19805317aa33b967b58b06750443394fafd250e40985dc35d2d89c12f369ef2083bcd4b0496043e87bfa1ef7ec7d307065d63190fa31461367dc3f2d76410326c1bd9602aac1587084f3d7ec068b6abffb94ff1bf18ce5408a4cd7523ff9a078c60c6f0050434c562b18b9f9ac81af72a23590e6d8e2ed79ea7de61cf2b9a1e1e44051ee2a151cb0c57f23b04db771944889473eb0ec2bf5d42bbd3727422c6e28987af96fb6006ee55604dfbded15a70cbe196da844945f373d838d446f33c0465e463f244992bc506e4ca6b414cc8b935e7d5fe993297444805dddb9af436
This commit is contained in:
2026-03-10 20:54:56 -05:00
parent fda0f69534
commit 40341c3e0c
4 changed files with 2 additions and 133 deletions

View File

@@ -21,8 +21,8 @@ redis==5.0.1
hiredis==3.3.0 hiredis==3.3.0
# AWS S3 for File Storage # AWS S3 for File Storage
boto3==1.29.7 boto3==1.35.99
botocore==1.42.59 botocore==1.35.99
# Email # Email
email-validator==2.3.0 email-validator==2.3.0

View File

@@ -30,72 +30,3 @@ async function main(): Promise<void> {
} }
main(); main();
import { spawn } from "child_process";
import * as path from "path";
import * as fs from "fs";
import { ServiceConfig } from "./types";
function loadServices(): ServiceConfig[] {
const filePath = path.join(__dirname, "..", "infra", "services.json");
const raw = fs.readFileSync(filePath, "utf-8");
return JSON.parse(raw) as ServiceConfig[];
}
function runCommand(cmd: string, args: string[]): Promise<void> {
return new Promise((resolve, reject) => {
const child = spawn(cmd, args, {
stdio: "inherit",
shell: process.platform === "win32"
});
child.on("close", (code) => {
if (code === 0) {
resolve();
} else {
reject(new Error(`Command failed with code ${code}`));
}
});
});
}
async function deployAll() {
const services = loadServices();
// Fixed order so dependencies come up first
const order = ["core", "api", "operator", "agents", "console", "web", "docs"];
const ordered = order
.map((id) => services.find((s) => s.id === id))
.filter((s): s is ServiceConfig => Boolean(s));
for (const service of ordered) {
console.log(
`\n===============================\nDeploying ${service.id} (${service.name})\n===============================`
);
const args = [
"railway",
"up",
"--project",
service.railwayProject,
"--service",
service.railwayService
];
try {
await runCommand("npx", args);
console.log(`✅ Done: ${service.id}`);
} catch (err) {
console.error(`❌ Failed: ${service.id}`);
console.error(String(err));
// Keep going to try the rest
}
}
console.log("\n🏁 Deployment run finished.");
}
deployAll().catch((err) => {
console.error(err);
process.exit(1);
});

View File

@@ -84,63 +84,3 @@ async function main(): Promise<void> {
} }
main(); main();
import * as path from "path";
import * as fs from "fs";
import { ServiceConfig } from "./types";
function loadServices(): ServiceConfig[] {
const filePath = path.join(__dirname, "..", "infra", "services.json");
const raw = fs.readFileSync(filePath, "utf-8");
return JSON.parse(raw) as ServiceConfig[];
}
function deployService(serviceId: string) {
const services = loadServices();
const service = services.find((s) => s.id === serviceId);
if (!service) {
console.error(`Service "${serviceId}" not found.`);
console.error(
"Valid ids: " + services.map((s) => s.id).join(", ")
);
process.exit(1);
}
console.log(`\n🚀 Deploying service: ${service.name} (${service.id})`);
console.log(
` Railway project: ${service.railwayProject}, service: ${service.railwayService}`
);
const cmd = "npx";
const args = [
"railway",
"up",
"--project",
service.railwayProject,
"--service",
service.railwayService
];
const child = spawn(cmd, args, {
stdio: "inherit",
shell: process.platform === "win32"
});
child.on("close", (code) => {
if (code === 0) {
console.log(`✅ Deploy complete: ${service.id}`);
} else {
console.error(`❌ Deploy failed for ${service.id} (exit code ${code})`);
}
process.exit(code === null ? 1 : code);
});
}
const serviceId = process.argv[2];
if (!serviceId) {
console.error("Usage: npm run deploy:service -- <serviceId>");
process.exit(1);
}
deployService(serviceId);

View File

@@ -1,6 +1,5 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2019",
"target": "ES2021", "target": "ES2021",
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
@@ -11,7 +10,6 @@
"outDir": "dist", "outDir": "dist",
"rootDir": "." "rootDir": "."
}, },
"include": ["scripts/**/*.ts", "tools/**/*.ts", "infra/**/*.json"]
"include": ["scripts/**/*.ts", "tools/**/*.ts", "infra/**/*.json"], "include": ["scripts/**/*.ts", "tools/**/*.ts", "infra/**/*.json"],
"ts-node": { "ts-node": {
"esm": false "esm": false