pgai 0.14.0-beta.2 → 0.14.0-dev.15
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/bin/pgai.js +9 -16
- package/package.json +2 -2
package/bin/pgai.js
CHANGED
|
@@ -2,31 +2,24 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
const { spawn } = require("node:child_process");
|
|
5
|
-
const path = require("node:path");
|
|
6
|
-
const fs = require("node:fs");
|
|
7
5
|
|
|
8
6
|
function die(msg) {
|
|
9
7
|
process.stderr.write(`${msg}\n`);
|
|
10
|
-
process.
|
|
8
|
+
process.exitCode = 1;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
let target;
|
|
14
12
|
try {
|
|
15
13
|
target = require.resolve("postgresai/dist/bin/postgres-ai.js");
|
|
16
14
|
} catch (e) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"",
|
|
26
|
-
"This wrapper expects postgresai to be installed as a dependency.",
|
|
27
|
-
].join("\n")
|
|
28
|
-
);
|
|
29
|
-
}
|
|
15
|
+
die(
|
|
16
|
+
[
|
|
17
|
+
"pgai: failed to locate postgresai package.",
|
|
18
|
+
"",
|
|
19
|
+
"This wrapper expects postgresai to be installed as a dependency.",
|
|
20
|
+
].join("\n")
|
|
21
|
+
);
|
|
22
|
+
process.exit(1);
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
const child = spawn(process.execPath, [target, ...process.argv.slice(2)], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgai",
|
|
3
|
-
"version": "0.14.0-
|
|
3
|
+
"version": "0.14.0-dev.15",
|
|
4
4
|
"description": "Thin wrapper for postgresai CLI (provides `npx pgai ...`)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"private": false,
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"node": ">=18"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"postgresai": "0.14.0-
|
|
23
|
+
"postgresai": "0.14.0-dev.15"
|
|
24
24
|
}
|
|
25
25
|
}
|