@insforge/cli 0.1.65 → 0.1.66
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 +23 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4153,6 +4153,27 @@ function registerDbMigrationsCommand(dbCmd2) {
|
|
|
4153
4153
|
});
|
|
4154
4154
|
}
|
|
4155
4155
|
|
|
4156
|
+
// src/commands/db/connection-string.ts
|
|
4157
|
+
function registerDbConnectionStringCommand(dbCmd2) {
|
|
4158
|
+
dbCmd2.command("connection-string").description("Print the project Postgres connection URL (cloud projects only)").action(async (_opts, cmd) => {
|
|
4159
|
+
const { json } = getRootOpts(cmd);
|
|
4160
|
+
try {
|
|
4161
|
+
await requireAuth();
|
|
4162
|
+
const res = await ossFetch("/api/metadata/database-connection-string");
|
|
4163
|
+
const body = await res.json();
|
|
4164
|
+
if (json) {
|
|
4165
|
+
outputJson(body);
|
|
4166
|
+
} else {
|
|
4167
|
+
console.log(body.connectionURL);
|
|
4168
|
+
}
|
|
4169
|
+
await reportCliUsage("cli.db.connection-string", true);
|
|
4170
|
+
} catch (err) {
|
|
4171
|
+
await reportCliUsage("cli.db.connection-string", false);
|
|
4172
|
+
handleError(err, json);
|
|
4173
|
+
}
|
|
4174
|
+
});
|
|
4175
|
+
}
|
|
4176
|
+
|
|
4156
4177
|
// src/commands/records/list.ts
|
|
4157
4178
|
function registerRecordsCommands(recordsCmd2) {
|
|
4158
4179
|
recordsCmd2.command("list <table>").description("List records from a table").option("--select <columns>", "Columns to select (comma-separated)").option("--filter <filter>", 'Filter expression (e.g. "name=eq.John")').option("--order <order>", 'Order by (e.g. "created_at.desc")').option("--limit <n>", "Limit number of records", parseInt).option("--offset <n>", "Offset for pagination", parseInt).action(async (table, opts, cmd) => {
|
|
@@ -6755,7 +6776,7 @@ function registerDiagnoseCommands(diagnoseCmd2) {
|
|
|
6755
6776
|
const s = !json ? clack14.spinner() : null;
|
|
6756
6777
|
s?.start("Collecting diagnostic data...");
|
|
6757
6778
|
const data2 = await collectDiagnosticData(projectId, ossMode, apiUrl);
|
|
6758
|
-
const cliVersion = "0.1.
|
|
6779
|
+
const cliVersion = "0.1.66";
|
|
6759
6780
|
s?.stop("Data collected");
|
|
6760
6781
|
if (!json) {
|
|
6761
6782
|
console.log(`
|
|
@@ -8156,6 +8177,7 @@ registerDbRpcCommand(dbCmd);
|
|
|
8156
8177
|
registerDbExportCommand(dbCmd);
|
|
8157
8178
|
registerDbImportCommand(dbCmd);
|
|
8158
8179
|
registerDbMigrationsCommand(dbCmd);
|
|
8180
|
+
registerDbConnectionStringCommand(dbCmd);
|
|
8159
8181
|
var recordsCmd = program.command("records", { hidden: true }).description("CRUD operations on table records");
|
|
8160
8182
|
registerRecordsCommands(recordsCmd);
|
|
8161
8183
|
registerRecordsCreateCommand(recordsCmd);
|