opencara 0.100.2 → 0.100.3
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/bin.js +2 -13
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -12,9 +12,7 @@ import {
|
|
|
12
12
|
totalmem,
|
|
13
13
|
uptime
|
|
14
14
|
} from "node:os";
|
|
15
|
-
import {
|
|
16
|
-
import { dirname, join as join2 } from "node:path";
|
|
17
|
-
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { statfsSync } from "node:fs";
|
|
18
16
|
|
|
19
17
|
// src/config/store.ts
|
|
20
18
|
import { readFileSync, writeFileSync, mkdirSync, existsSync, unlinkSync } from "node:fs";
|
|
@@ -369,8 +367,7 @@ function runJob(spec, stdinJson, handlers) {
|
|
|
369
367
|
}
|
|
370
368
|
|
|
371
369
|
// src/commands/run.ts
|
|
372
|
-
var
|
|
373
|
-
var PKG_VERSION = readPkgVersion();
|
|
370
|
+
var PKG_VERSION = "0.100.3";
|
|
374
371
|
var LOG_FLUSH_MS = 800;
|
|
375
372
|
var MAX_CHUNK_SIZE = 4 * 1024;
|
|
376
373
|
async function run(opts = {}) {
|
|
@@ -458,14 +455,6 @@ async function executeJob(job, client) {
|
|
|
458
455
|
console.error(`[opencara] job ${runId.slice(-8)} failed`, message);
|
|
459
456
|
}
|
|
460
457
|
}
|
|
461
|
-
function readPkgVersion() {
|
|
462
|
-
try {
|
|
463
|
-
const raw = readFileSync2(join2(__dirname, "..", "..", "package.json"), "utf8");
|
|
464
|
-
return JSON.parse(raw).version ?? "0.0.0";
|
|
465
|
-
} catch {
|
|
466
|
-
return "0.0.0";
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
458
|
function collectSystemInfo() {
|
|
470
459
|
try {
|
|
471
460
|
const cpuList = cpus();
|