@automagik/omni 2.260520.16 → 2.260520.18
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/index.js
CHANGED
|
@@ -4783,11 +4783,17 @@ function psqlCapture(args) {
|
|
|
4783
4783
|
return result.stdout ?? "";
|
|
4784
4784
|
}
|
|
4785
4785
|
async function copyTable(table, srcArgs, dstArgs, log) {
|
|
4786
|
-
const src = spawn("psql", [...srcArgs, "-c", `\\copy public.${table} TO STDOUT`], {
|
|
4786
|
+
const src = spawn("psql", [...srcArgs, "-c", `\\copy public.${table} TO STDOUT WITH (FORMAT binary)`], {
|
|
4787
4787
|
stdio: ["ignore", "pipe", "pipe"],
|
|
4788
4788
|
env: { ...process.env, PGPASSWORD: "postgres" }
|
|
4789
4789
|
});
|
|
4790
|
-
const dst = spawn("psql", [
|
|
4790
|
+
const dst = spawn("psql", [
|
|
4791
|
+
...dstArgs,
|
|
4792
|
+
"-c",
|
|
4793
|
+
`SET session_replication_role='replica';`,
|
|
4794
|
+
"-c",
|
|
4795
|
+
`\\copy public.${table} FROM STDIN WITH (FORMAT binary)`
|
|
4796
|
+
], {
|
|
4791
4797
|
stdio: ["pipe", "pipe", "pipe"],
|
|
4792
4798
|
env: { ...process.env, PGPASSWORD: "postgres" }
|
|
4793
4799
|
});
|
|
@@ -4886,9 +4892,12 @@ async function migrateUnmountedEmbeddedToCanonical(opts = {}) {
|
|
|
4886
4892
|
return { status: "skipped", reason: "autopg postgres binary not found \u2014 install autopg first" };
|
|
4887
4893
|
}
|
|
4888
4894
|
log(` using postgres binary: ${binary}`);
|
|
4895
|
+
log(" stopping omni-api during data copy");
|
|
4896
|
+
spawnSync2("pm2", ["stop", "omni-api"], { stdio: "inherit" });
|
|
4889
4897
|
const tempPort = await findFreePort();
|
|
4890
4898
|
const t0 = Date.now();
|
|
4891
4899
|
const temp = await spawnTempPostmaster(binary, EMBEDDED_DIR, tempPort, log);
|
|
4900
|
+
let apiRestarted = false;
|
|
4892
4901
|
try {
|
|
4893
4902
|
const srcBaseArgs = ["-h", "127.0.0.1", "-p", String(tempPort), "-U", "postgres", "-d", "omni"];
|
|
4894
4903
|
const dstBaseArgs = ["-h", "127.0.0.1", "-p", String(canonicalPort), "-U", "postgres", "-d", "omni"];
|
|
@@ -4917,6 +4926,9 @@ async function migrateUnmountedEmbeddedToCanonical(opts = {}) {
|
|
|
4917
4926
|
return { status: "migrated", tables: tables.length, durationMs: Date.now() - t0 };
|
|
4918
4927
|
} finally {
|
|
4919
4928
|
await temp.stop();
|
|
4929
|
+
log(" restarting omni-api");
|
|
4930
|
+
spawnSync2("pm2", ["start", "omni-api"], { stdio: "inherit" });
|
|
4931
|
+
apiRestarted = true;
|
|
4920
4932
|
}
|
|
4921
4933
|
}
|
|
4922
4934
|
var EMBEDDED_DIR, EMBEDDED_PGSERVE_DATA_DIR;
|
|
@@ -124332,7 +124344,7 @@ import { fileURLToPath } from "url";
|
|
|
124332
124344
|
// package.json
|
|
124333
124345
|
var package_default = {
|
|
124334
124346
|
name: "@automagik/omni",
|
|
124335
|
-
version: "2.260520.
|
|
124347
|
+
version: "2.260520.18",
|
|
124336
124348
|
description: "LLM-optimized CLI for Omni",
|
|
124337
124349
|
type: "module",
|
|
124338
124350
|
bin: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded-canonical-migration.d.ts","sourceRoot":"","sources":["../../src/lib/embedded-canonical-migration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAWH,MAAM,MAAM,eAAe,GACvB;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,2EAA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AACzE,eAAO,MAAM,yBAAyB,QAAe,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -230137,7 +230137,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
230137
230137
|
var require_package8 = __commonJS((exports, module) => {
|
|
230138
230138
|
module.exports = {
|
|
230139
230139
|
name: "@omni/api",
|
|
230140
|
-
version: "2.260520.
|
|
230140
|
+
version: "2.260520.18",
|
|
230141
230141
|
type: "module",
|
|
230142
230142
|
exports: {
|
|
230143
230143
|
".": {
|