postgresai 0.18.1-rc.5 → 0.19.0-dev.1
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 +19 -2
- package/package.json +1 -1
package/dist/bin/postgres-ai.js
CHANGED
|
@@ -13538,7 +13538,7 @@ var {
|
|
|
13538
13538
|
// package.json
|
|
13539
13539
|
var package_default = {
|
|
13540
13540
|
name: "postgresai",
|
|
13541
|
-
version: "0.
|
|
13541
|
+
version: "0.19.0-dev.1",
|
|
13542
13542
|
description: "postgres_ai CLI",
|
|
13543
13543
|
license: "Apache-2.0",
|
|
13544
13544
|
private: false,
|
|
@@ -16898,7 +16898,7 @@ var Result = import_lib.default.Result;
|
|
|
16898
16898
|
var TypeOverrides = import_lib.default.TypeOverrides;
|
|
16899
16899
|
var defaults = import_lib.default.defaults;
|
|
16900
16900
|
// package.json
|
|
16901
|
-
var version = "0.
|
|
16901
|
+
var version = "0.19.0-dev.1";
|
|
16902
16902
|
var package_default2 = {
|
|
16903
16903
|
name: "postgresai",
|
|
16904
16904
|
version,
|
|
@@ -35638,6 +35638,11 @@ var DEFAULT_POLL_INTERVAL_MS = 800;
|
|
|
35638
35638
|
var JOE_ASYNC_FALLBACK_WAIT_MS2 = 10 * 60 * 1000;
|
|
35639
35639
|
var JOE_ASYNC_MAX_WAIT_MS2 = 60 * 60 * 1000;
|
|
35640
35640
|
var JOE_ASYNC_MAX_POLL_FAILURES = 5;
|
|
35641
|
+
var CONSOLE_URL_SAFE = /^https?:\/\/[^\s\x00-\x1f\x7f-\x9f]+$/;
|
|
35642
|
+
function formatJoeConsoleLine(output) {
|
|
35643
|
+
const url = typeof output?.console_url === "string" ? output.console_url.trim() : "";
|
|
35644
|
+
return CONSOLE_URL_SAFE.test(url) ? `console: ${url}` : null;
|
|
35645
|
+
}
|
|
35641
35646
|
async function callRpc2(params) {
|
|
35642
35647
|
return (await callRpcRaw2(params)).data;
|
|
35643
35648
|
}
|
|
@@ -53323,6 +53328,9 @@ function printJoeOutcome(outcome, json, budgetMs) {
|
|
|
53323
53328
|
console.log(JSON.stringify(output, null, 2));
|
|
53324
53329
|
else {
|
|
53325
53330
|
console.log(`command ${outcome.commandId} \xB7 ok`);
|
|
53331
|
+
const link = formatJoeConsoleLine(output);
|
|
53332
|
+
if (link)
|
|
53333
|
+
console.log(link);
|
|
53326
53334
|
const body = formatJoeOutput(output);
|
|
53327
53335
|
if (body)
|
|
53328
53336
|
console.log(body);
|
|
@@ -53332,6 +53340,9 @@ function printJoeOutcome(outcome, json, budgetMs) {
|
|
|
53332
53340
|
if (json && output)
|
|
53333
53341
|
console.log(JSON.stringify(output, null, 2));
|
|
53334
53342
|
console.error(`command ${outcome.commandId} error: ${output?.error ?? "command failed"}`);
|
|
53343
|
+
const errLink = json ? null : formatJoeConsoleLine(output);
|
|
53344
|
+
if (errLink)
|
|
53345
|
+
console.error(errLink);
|
|
53335
53346
|
process.exitCode = 1;
|
|
53336
53347
|
}
|
|
53337
53348
|
async function runJoeCli(command, arg, opts) {
|
|
@@ -53423,11 +53434,17 @@ withOrgOptions(joe.command("result <commandId>")).description("fetch a Joe comma
|
|
|
53423
53434
|
}
|
|
53424
53435
|
if (output.status === "ok") {
|
|
53425
53436
|
console.log(`command ${output.command_id} \xB7 ok`);
|
|
53437
|
+
const link = formatJoeConsoleLine(output);
|
|
53438
|
+
if (link)
|
|
53439
|
+
console.log(link);
|
|
53426
53440
|
const body = formatJoeOutput(output);
|
|
53427
53441
|
if (body)
|
|
53428
53442
|
console.log(body);
|
|
53429
53443
|
} else if (output.status === "error") {
|
|
53430
53444
|
console.error(`command ${output.command_id} error: ${output.error ?? "command failed"}`);
|
|
53445
|
+
const errLink = formatJoeConsoleLine(output);
|
|
53446
|
+
if (errLink)
|
|
53447
|
+
console.error(errLink);
|
|
53431
53448
|
process.exitCode = 1;
|
|
53432
53449
|
} else {
|
|
53433
53450
|
console.error(`command ${output.command_id} \xB7 ${output.status} \u2014 result is not ready`);
|