postgresai 0.18.0-dev.4 → 0.18.0-dev.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/bin/postgres-ai.js +6 -4
- package/package.json +1 -1
package/dist/bin/postgres-ai.js
CHANGED
|
@@ -13533,7 +13533,7 @@ var {
|
|
|
13533
13533
|
// package.json
|
|
13534
13534
|
var package_default = {
|
|
13535
13535
|
name: "postgresai",
|
|
13536
|
-
version: "0.18.0-dev.
|
|
13536
|
+
version: "0.18.0-dev.5",
|
|
13537
13537
|
description: "postgres_ai CLI",
|
|
13538
13538
|
license: "Apache-2.0",
|
|
13539
13539
|
private: false,
|
|
@@ -16893,7 +16893,7 @@ var Result = import_lib.default.Result;
|
|
|
16893
16893
|
var TypeOverrides = import_lib.default.TypeOverrides;
|
|
16894
16894
|
var defaults = import_lib.default.defaults;
|
|
16895
16895
|
// package.json
|
|
16896
|
-
var version = "0.18.0-dev.
|
|
16896
|
+
var version = "0.18.0-dev.5";
|
|
16897
16897
|
var package_default2 = {
|
|
16898
16898
|
name: "postgresai",
|
|
16899
16899
|
version,
|
|
@@ -48027,7 +48027,7 @@ async function selfRegisterAndPersist(projectDir, apiKey, projectName, opts, reg
|
|
|
48027
48027
|
process.exitCode = 1;
|
|
48028
48028
|
return reg;
|
|
48029
48029
|
}
|
|
48030
|
-
async function applyMonitoringTargetsConfig() {
|
|
48030
|
+
async function applyMonitoringTargetsConfig(restartReporter = false) {
|
|
48031
48031
|
console.log("Applying monitoring target configuration...");
|
|
48032
48032
|
const generateCode = await runCompose(["run", "--rm", "sources-generator"]);
|
|
48033
48033
|
if (generateCode !== 0)
|
|
@@ -48036,6 +48036,8 @@ async function applyMonitoringTargetsConfig() {
|
|
|
48036
48036
|
const upCode = await runCompose(["up", "-d", "--force-recreate", "pgwatch-prometheus", "pgwatch-postgres"]);
|
|
48037
48037
|
if (upCode !== 0)
|
|
48038
48038
|
return upCode;
|
|
48039
|
+
if (!restartReporter)
|
|
48040
|
+
return 0;
|
|
48039
48041
|
if (await runCompose(["restart", "postgres-reports"]) !== 0) {
|
|
48040
48042
|
console.error("\u26A0 Could not restart postgres-reports; the target's first report comes with its next daily run");
|
|
48041
48043
|
}
|
|
@@ -49729,7 +49731,7 @@ async function addTarget(file, projectDir, connStr, name, env, { apply = true, v
|
|
|
49729
49731
|
}
|
|
49730
49732
|
if (!apply)
|
|
49731
49733
|
return true;
|
|
49732
|
-
const applyCode = await applyMonitoringTargetsConfig();
|
|
49734
|
+
const applyCode = await applyMonitoringTargetsConfig(true);
|
|
49733
49735
|
if (applyCode !== 0) {
|
|
49734
49736
|
console.error("Monitoring target was saved, but applying the generated pgwatch sources failed. Run 'postgresai mon restart' to apply manually.");
|
|
49735
49737
|
process.exitCode = 1;
|