@altertable/cli 1.4.0 → 1.5.0
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/cli.js +225 -26
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7033,7 +7033,7 @@ var require_public_api = __commonJS((exports) => {
|
|
|
7033
7033
|
});
|
|
7034
7034
|
|
|
7035
7035
|
// src/version.ts
|
|
7036
|
-
var VERSION = "1.
|
|
7036
|
+
var VERSION = "1.5.0";
|
|
7037
7037
|
var USER_AGENT = `altertable-cli/${VERSION}`;
|
|
7038
7038
|
|
|
7039
7039
|
// src/lib/transport-defaults.ts
|
|
@@ -8232,6 +8232,9 @@ function createDefaultOutputSink(context) {
|
|
|
8232
8232
|
writeRaw(body) {
|
|
8233
8233
|
console.log(body);
|
|
8234
8234
|
},
|
|
8235
|
+
async writeBytes(body) {
|
|
8236
|
+
await Bun.write(Bun.stdout, body);
|
|
8237
|
+
},
|
|
8235
8238
|
writeHuman(text) {
|
|
8236
8239
|
console.log(text);
|
|
8237
8240
|
},
|
|
@@ -8351,6 +8354,11 @@ function mergeGlobalFlagsFromArgs(context, args) {
|
|
|
8351
8354
|
}
|
|
8352
8355
|
|
|
8353
8356
|
// src/lib/command.ts
|
|
8357
|
+
var ALTERTABLE_COMMAND_GROUPS = [
|
|
8358
|
+
{ id: "platform", title: "Platform" },
|
|
8359
|
+
{ id: "ingest", title: "Ingest" },
|
|
8360
|
+
{ id: "query", title: "Query" }
|
|
8361
|
+
];
|
|
8354
8362
|
function defineArguments(commandArguments) {
|
|
8355
8363
|
return commandArguments;
|
|
8356
8364
|
}
|
|
@@ -12288,12 +12296,23 @@ async function sendHttpStream(request, context) {
|
|
|
12288
12296
|
}
|
|
12289
12297
|
|
|
12290
12298
|
// src/lib/lakehouse/query.ts
|
|
12299
|
+
var LAKEHOUSE_COMPUTE_SIZES = ["XS", "S", "M", "L", "XL", "AUTO"];
|
|
12291
12300
|
function buildQueryPayload(input) {
|
|
12292
12301
|
const payload = { statement: input.statement };
|
|
12293
12302
|
if (input.queryId)
|
|
12294
12303
|
payload.query_id = input.queryId;
|
|
12295
12304
|
if (input.sessionId)
|
|
12296
12305
|
payload.session_id = input.sessionId;
|
|
12306
|
+
if (input.computeSize)
|
|
12307
|
+
payload.compute_size = input.computeSize;
|
|
12308
|
+
if (input.format)
|
|
12309
|
+
payload.format = input.format;
|
|
12310
|
+
if (input.dialect)
|
|
12311
|
+
payload.dialect = input.dialect;
|
|
12312
|
+
if (input.catalog)
|
|
12313
|
+
payload.catalog = input.catalog;
|
|
12314
|
+
if (input.schema)
|
|
12315
|
+
payload.schema = input.schema;
|
|
12297
12316
|
return payload;
|
|
12298
12317
|
}
|
|
12299
12318
|
function buildLakehouseQueryRequest(input, streaming) {
|
|
@@ -12325,6 +12344,9 @@ async function executeLakehouseQuery(input, execution, streaming) {
|
|
|
12325
12344
|
}
|
|
12326
12345
|
return parseLakehouseQueryResponse(await sendHttp(request, execution));
|
|
12327
12346
|
}
|
|
12347
|
+
async function executeLakehouseQueryBytes(input, execution) {
|
|
12348
|
+
return sendHttpStream(buildLakehouseQueryRequest(input, true), execution);
|
|
12349
|
+
}
|
|
12328
12350
|
function buildLakehouseQueryShowRequest(queryId) {
|
|
12329
12351
|
return {
|
|
12330
12352
|
plane: "lakehouse",
|
|
@@ -15478,11 +15500,74 @@ async function writePagedOutput(text3, options, sink) {
|
|
|
15478
15500
|
}
|
|
15479
15501
|
}
|
|
15480
15502
|
|
|
15503
|
+
// src/lib/query-destination.ts
|
|
15504
|
+
async function writeStreamChunks(stream, writeChunk) {
|
|
15505
|
+
const reader = stream.getReader();
|
|
15506
|
+
try {
|
|
15507
|
+
while (true) {
|
|
15508
|
+
const { done, value } = await reader.read();
|
|
15509
|
+
if (done) {
|
|
15510
|
+
return;
|
|
15511
|
+
}
|
|
15512
|
+
await writeChunk(value);
|
|
15513
|
+
}
|
|
15514
|
+
} finally {
|
|
15515
|
+
reader.releaseLock();
|
|
15516
|
+
}
|
|
15517
|
+
}
|
|
15518
|
+
async function writeQueryDestination(content, options = {}) {
|
|
15519
|
+
const { outputPath, sink } = options;
|
|
15520
|
+
if (typeof content === "string") {
|
|
15521
|
+
const bytes = new TextEncoder().encode(content.endsWith(`
|
|
15522
|
+
`) ? content : `${content}
|
|
15523
|
+
`);
|
|
15524
|
+
if (outputPath !== undefined) {
|
|
15525
|
+
await Bun.write(outputPath, bytes);
|
|
15526
|
+
return;
|
|
15527
|
+
}
|
|
15528
|
+
if (sink) {
|
|
15529
|
+
await sink.writeBytes(bytes);
|
|
15530
|
+
return;
|
|
15531
|
+
}
|
|
15532
|
+
await Bun.write(Bun.stdout, bytes);
|
|
15533
|
+
return;
|
|
15534
|
+
}
|
|
15535
|
+
if (outputPath !== undefined) {
|
|
15536
|
+
const writer = Bun.file(outputPath).writer();
|
|
15537
|
+
try {
|
|
15538
|
+
await writeStreamChunks(content, async (chunk) => {
|
|
15539
|
+
await writer.write(chunk);
|
|
15540
|
+
});
|
|
15541
|
+
} finally {
|
|
15542
|
+
await writer.end();
|
|
15543
|
+
}
|
|
15544
|
+
return;
|
|
15545
|
+
}
|
|
15546
|
+
if (sink) {
|
|
15547
|
+
await writeStreamChunks(content, (chunk) => sink.writeBytes(chunk));
|
|
15548
|
+
return;
|
|
15549
|
+
}
|
|
15550
|
+
await writeStreamChunks(content, async (chunk) => {
|
|
15551
|
+
await Bun.write(Bun.stdout, chunk);
|
|
15552
|
+
});
|
|
15553
|
+
}
|
|
15554
|
+
|
|
15481
15555
|
// src/lib/query-output.ts
|
|
15482
|
-
var
|
|
15556
|
+
var API_NATIVE_QUERY_FORMATS = new Set(["csv", "jsonl", "parquet"]);
|
|
15557
|
+
var QUERY_RESULT_FORMATS = new Set([
|
|
15558
|
+
"human",
|
|
15559
|
+
"json",
|
|
15560
|
+
"csv",
|
|
15561
|
+
"jsonl",
|
|
15562
|
+
"parquet",
|
|
15563
|
+
"markdown"
|
|
15564
|
+
]);
|
|
15565
|
+
function isApiNativeQueryFormat(format) {
|
|
15566
|
+
return API_NATIVE_QUERY_FORMATS.has(format);
|
|
15567
|
+
}
|
|
15483
15568
|
function parseQueryResultFormat(format) {
|
|
15484
15569
|
if (!QUERY_RESULT_FORMATS.has(format)) {
|
|
15485
|
-
throw new CliError(`Unsupported format: ${format}. Use csv or markdown.`);
|
|
15570
|
+
throw new CliError(`Unsupported format: ${format}. Use csv, jsonl, parquet, or markdown.`);
|
|
15486
15571
|
}
|
|
15487
15572
|
return format;
|
|
15488
15573
|
}
|
|
@@ -15523,16 +15608,33 @@ function renderQueryOutputText(result, format, displayOptions) {
|
|
|
15523
15608
|
const columnNames = getQueryColumnNames(result);
|
|
15524
15609
|
return renderQueryMarkdown(result, columnNames, displayOptions ?? defaultDisplayOptions());
|
|
15525
15610
|
}
|
|
15611
|
+
if (isApiNativeQueryFormat(format)) {
|
|
15612
|
+
throw new CliError(`Format ${format} must be streamed from the lakehouse API.`);
|
|
15613
|
+
}
|
|
15526
15614
|
return renderQueryHumanOutput(result, displayOptions ?? defaultDisplayOptions());
|
|
15527
15615
|
}
|
|
15528
|
-
async function writeQueryOutput(result, format, sink, displayOptions, pagerOptions) {
|
|
15529
|
-
const
|
|
15530
|
-
|
|
15616
|
+
async function writeQueryOutput(result, format, sink, displayOptions, pagerOptions, outputPath) {
|
|
15617
|
+
const effectiveFormat = sink.json ? "json" : format;
|
|
15618
|
+
if (isApiNativeQueryFormat(effectiveFormat)) {
|
|
15619
|
+
throw new CliError(`Format ${effectiveFormat} must be streamed from the lakehouse API.`);
|
|
15620
|
+
}
|
|
15621
|
+
const outputText = renderQueryOutputText(result, effectiveFormat, displayOptions);
|
|
15622
|
+
const usePager = format === "human" && !sink.json && outputPath === undefined;
|
|
15531
15623
|
if (usePager) {
|
|
15532
15624
|
await writePagedOutput(outputText, pagerOptions ?? resolvePagerOptions(), sink);
|
|
15533
15625
|
return;
|
|
15534
15626
|
}
|
|
15535
|
-
if (
|
|
15627
|
+
if (outputPath !== undefined) {
|
|
15628
|
+
if (effectiveFormat === "json") {
|
|
15629
|
+
await writeQueryDestination(JSON.stringify(JSON.parse(outputText), null, 2), {
|
|
15630
|
+
outputPath
|
|
15631
|
+
});
|
|
15632
|
+
return;
|
|
15633
|
+
}
|
|
15634
|
+
await writeQueryDestination(outputText, { outputPath });
|
|
15635
|
+
return;
|
|
15636
|
+
}
|
|
15637
|
+
if (effectiveFormat === "json" || sink.json) {
|
|
15536
15638
|
sink.writeJson(JSON.parse(outputText));
|
|
15537
15639
|
return;
|
|
15538
15640
|
}
|
|
@@ -16354,14 +16456,28 @@ var appendCommand = defineCommand({
|
|
|
16354
16456
|
|
|
16355
16457
|
// src/lib/query-output-args.ts
|
|
16356
16458
|
var MIN_MAX_COLUMN_WIDTH = 8;
|
|
16357
|
-
var
|
|
16459
|
+
var PRESENTATION_RESULT_FORMAT_OPTIONS = ["csv", "markdown"];
|
|
16460
|
+
var QUERY_RESULT_FORMAT_OPTIONS = ["csv", "jsonl", "parquet", "markdown"];
|
|
16358
16461
|
var PAGER_MODE_OPTIONS = ["auto", "always", "never"];
|
|
16359
16462
|
var PAGER_MODES = new Set(PAGER_MODE_OPTIONS);
|
|
16360
16463
|
var AGENT_INCOMPATIBLE_QUERY_FLAGS = ["--layout", "--pager", "--max-width"];
|
|
16464
|
+
var API_NATIVE_INCOMPATIBLE_PRESENTATION_FLAGS = [
|
|
16465
|
+
"--layout",
|
|
16466
|
+
"--columns",
|
|
16467
|
+
"--max-width",
|
|
16468
|
+
"--pager"
|
|
16469
|
+
];
|
|
16361
16470
|
var queryResultFormatArgs = defineArguments({
|
|
16362
16471
|
format: {
|
|
16363
16472
|
type: "enum",
|
|
16364
16473
|
description: "Serialized output format; use global --json for JSON",
|
|
16474
|
+
options: [...PRESENTATION_RESULT_FORMAT_OPTIONS]
|
|
16475
|
+
}
|
|
16476
|
+
});
|
|
16477
|
+
var queryApiResultFormatArgs = defineArguments({
|
|
16478
|
+
format: {
|
|
16479
|
+
type: "enum",
|
|
16480
|
+
description: "Result format: csv, jsonl, and parquet stream from the API; markdown is rendered by the CLI. Use global --json for structured JSON",
|
|
16365
16481
|
options: [...QUERY_RESULT_FORMAT_OPTIONS]
|
|
16366
16482
|
}
|
|
16367
16483
|
});
|
|
@@ -16386,6 +16502,30 @@ var queryPagerArgs = defineArguments({
|
|
|
16386
16502
|
options: [...PAGER_MODE_OPTIONS]
|
|
16387
16503
|
}
|
|
16388
16504
|
});
|
|
16505
|
+
var queryRequestArgs = defineArguments({
|
|
16506
|
+
"compute-size": {
|
|
16507
|
+
type: "enum",
|
|
16508
|
+
description: "Compute size for the query",
|
|
16509
|
+
default: "AUTO",
|
|
16510
|
+
options: [...LAKEHOUSE_COMPUTE_SIZES]
|
|
16511
|
+
},
|
|
16512
|
+
dialect: {
|
|
16513
|
+
type: "string",
|
|
16514
|
+
description: "Source SQL dialect to transpile from (server default: DuckDB)"
|
|
16515
|
+
},
|
|
16516
|
+
catalog: {
|
|
16517
|
+
type: "string",
|
|
16518
|
+
description: "Catalog name (optional; can also come from the session)"
|
|
16519
|
+
},
|
|
16520
|
+
schema: {
|
|
16521
|
+
type: "string",
|
|
16522
|
+
description: "Schema name (optional; can also come from the session)"
|
|
16523
|
+
},
|
|
16524
|
+
output: {
|
|
16525
|
+
type: "string",
|
|
16526
|
+
description: "Write result bytes/text to this path instead of stdout"
|
|
16527
|
+
}
|
|
16528
|
+
});
|
|
16389
16529
|
function hasArgvFlag(rawArgs, flag) {
|
|
16390
16530
|
return rawArgs.some((arg) => arg === flag || arg.startsWith(`${flag}=`));
|
|
16391
16531
|
}
|
|
@@ -16398,6 +16538,18 @@ function validateAgentQueryFlags(options) {
|
|
|
16398
16538
|
}
|
|
16399
16539
|
}
|
|
16400
16540
|
}
|
|
16541
|
+
function validateApiNativeFormatFlags(format, options) {
|
|
16542
|
+
if (!isApiNativeQueryFormat(format))
|
|
16543
|
+
return;
|
|
16544
|
+
if (options.json || options.agent) {
|
|
16545
|
+
throw new CliError(`--format ${format} cannot be combined with --json or --agent. Those flags expect structured CLI JSON output.`);
|
|
16546
|
+
}
|
|
16547
|
+
for (const flag of API_NATIVE_INCOMPATIBLE_PRESENTATION_FLAGS) {
|
|
16548
|
+
if (hasArgvFlag(options.rawArgs, flag)) {
|
|
16549
|
+
throw new CliError(`${flag} cannot be used with --format ${format}.`);
|
|
16550
|
+
}
|
|
16551
|
+
}
|
|
16552
|
+
}
|
|
16401
16553
|
function parseQueryLayout(args) {
|
|
16402
16554
|
const defaults = defaultDisplayOptions();
|
|
16403
16555
|
if (args.layout === undefined)
|
|
@@ -16432,13 +16584,47 @@ function parsePagerOptions(args, agent) {
|
|
|
16432
16584
|
}
|
|
16433
16585
|
return resolvePagerOptions(pager);
|
|
16434
16586
|
}
|
|
16587
|
+
function optionalTrimmedString(args, name) {
|
|
16588
|
+
const value = args[name];
|
|
16589
|
+
if (typeof value !== "string")
|
|
16590
|
+
return;
|
|
16591
|
+
const trimmed = value.trim();
|
|
16592
|
+
return trimmed === "" ? undefined : trimmed;
|
|
16593
|
+
}
|
|
16594
|
+
function isLakehouseComputeSize(value) {
|
|
16595
|
+
return LAKEHOUSE_COMPUTE_SIZES.includes(value);
|
|
16596
|
+
}
|
|
16597
|
+
function parseLakehouseComputeSize(value) {
|
|
16598
|
+
if (!isLakehouseComputeSize(value)) {
|
|
16599
|
+
throw new CliError(`--compute-size must be one of ${LAKEHOUSE_COMPUTE_SIZES.join(", ")}.`);
|
|
16600
|
+
}
|
|
16601
|
+
return value;
|
|
16602
|
+
}
|
|
16603
|
+
function resolveQueryComputeSize(options) {
|
|
16604
|
+
const computeSize = options.computeSizeArg ?? "AUTO";
|
|
16605
|
+
if (options.sessionId && !options.computeSizeExplicit)
|
|
16606
|
+
return;
|
|
16607
|
+
return computeSize;
|
|
16608
|
+
}
|
|
16435
16609
|
function parseQueryOutputOptions(args, options) {
|
|
16436
16610
|
validateAgentQueryFlags(options);
|
|
16437
16611
|
const format = parseQueryResultFormat(args.format === undefined ? "human" : asCliArgString(args.format));
|
|
16612
|
+
validateApiNativeFormatFlags(format, options);
|
|
16613
|
+
const sessionId = optionalTrimmedString(args, "session-id");
|
|
16614
|
+
const computeSize = resolveQueryComputeSize({
|
|
16615
|
+
sessionId,
|
|
16616
|
+
computeSizeArg: args["compute-size"] === undefined ? undefined : parseLakehouseComputeSize(asCliArgString(args["compute-size"])),
|
|
16617
|
+
computeSizeExplicit: hasArgvFlag(options.rawArgs, "--compute-size")
|
|
16618
|
+
});
|
|
16438
16619
|
return {
|
|
16439
16620
|
format,
|
|
16440
16621
|
displayOptions: parseDisplayOptions(args),
|
|
16441
|
-
pagerOptions: parsePagerOptions(args, options.agent)
|
|
16622
|
+
pagerOptions: parsePagerOptions(args, options.agent),
|
|
16623
|
+
outputPath: optionalTrimmedString(args, "output"),
|
|
16624
|
+
computeSize,
|
|
16625
|
+
dialect: optionalTrimmedString(args, "dialect"),
|
|
16626
|
+
catalog: optionalTrimmedString(args, "catalog"),
|
|
16627
|
+
schema: optionalTrimmedString(args, "schema")
|
|
16442
16628
|
};
|
|
16443
16629
|
}
|
|
16444
16630
|
|
|
@@ -16450,8 +16636,9 @@ var queryRunArgs = defineArguments({
|
|
|
16450
16636
|
required: false,
|
|
16451
16637
|
directRequired: true
|
|
16452
16638
|
},
|
|
16453
|
-
...
|
|
16639
|
+
...queryApiResultFormatArgs,
|
|
16454
16640
|
...queryDisplayArgs,
|
|
16641
|
+
...queryRequestArgs,
|
|
16455
16642
|
"query-id": { type: "string", description: "Optional stable query id" },
|
|
16456
16643
|
"session-id": { type: "string", description: "Optional session id" },
|
|
16457
16644
|
...queryPagerArgs
|
|
@@ -16500,11 +16687,11 @@ var queryCommand = defineCommand({
|
|
|
16500
16687
|
examples: [
|
|
16501
16688
|
'altertable query "SELECT id, email, plan FROM analytics.main.users LIMIT 10"',
|
|
16502
16689
|
'altertable query "SELECT event, timestamp FROM analytics.main.events ORDER BY timestamp DESC LIMIT 10" --json',
|
|
16690
|
+
'altertable query "SELECT 1" --format csv --output results.csv',
|
|
16503
16691
|
"altertable query show <query-id>"
|
|
16504
16692
|
]
|
|
16505
16693
|
},
|
|
16506
16694
|
args: queryRunArgs,
|
|
16507
|
-
soleDirectOperands: ["show"],
|
|
16508
16695
|
subcommands: {
|
|
16509
16696
|
show: queryShowCommand,
|
|
16510
16697
|
cancel: queryCancelCommand
|
|
@@ -16514,17 +16701,36 @@ var queryCommand = defineCommand({
|
|
|
16514
16701
|
if (statement === undefined) {
|
|
16515
16702
|
throw new CliError('Provide a SQL statement, e.g. altertable query "SELECT 1".');
|
|
16516
16703
|
}
|
|
16517
|
-
const {
|
|
16704
|
+
const {
|
|
16705
|
+
format,
|
|
16706
|
+
displayOptions,
|
|
16707
|
+
pagerOptions,
|
|
16708
|
+
outputPath,
|
|
16709
|
+
computeSize,
|
|
16710
|
+
dialect,
|
|
16711
|
+
catalog,
|
|
16712
|
+
schema
|
|
16713
|
+
} = parseQueryOutputOptions(args, {
|
|
16518
16714
|
agent: execution.cli.agent,
|
|
16715
|
+
json: sink.json,
|
|
16519
16716
|
rawArgs
|
|
16520
16717
|
});
|
|
16521
16718
|
const input2 = {
|
|
16522
16719
|
statement,
|
|
16523
16720
|
queryId: optionalStringArg(args, "query-id"),
|
|
16524
|
-
sessionId: optionalStringArg(args, "session-id")
|
|
16721
|
+
sessionId: optionalStringArg(args, "session-id"),
|
|
16722
|
+
computeSize,
|
|
16723
|
+
dialect,
|
|
16724
|
+
catalog,
|
|
16725
|
+
schema
|
|
16525
16726
|
};
|
|
16727
|
+
if (isApiNativeQueryFormat(format)) {
|
|
16728
|
+
const stream = await executeLakehouseQueryBytes({ ...input2, format }, execution);
|
|
16729
|
+
await writeQueryDestination(stream, { outputPath, sink });
|
|
16730
|
+
return;
|
|
16731
|
+
}
|
|
16526
16732
|
const result = await executeLakehouseQuery(input2, execution, !sink.json);
|
|
16527
|
-
await writeQueryOutput(result, format, sink, displayOptions, pagerOptions);
|
|
16733
|
+
await writeQueryOutput(result, format, sink, displayOptions, pagerOptions, outputPath);
|
|
16528
16734
|
}
|
|
16529
16735
|
});
|
|
16530
16736
|
|
|
@@ -16641,6 +16847,7 @@ var schemaCommand = defineCommand({
|
|
|
16641
16847
|
const catalog = stringArg(args, "catalog");
|
|
16642
16848
|
const { format, displayOptions, pagerOptions } = parseQueryOutputOptions(args, {
|
|
16643
16849
|
agent: execution.cli.agent,
|
|
16850
|
+
json: sink.json,
|
|
16644
16851
|
rawArgs
|
|
16645
16852
|
});
|
|
16646
16853
|
const queryInput = {
|
|
@@ -21924,11 +22131,6 @@ var HELP_COLUMN_GAP = " ";
|
|
|
21924
22131
|
var HELP_MIN_DESCRIPTION_WIDTH = 16;
|
|
21925
22132
|
var HELP_FALLBACK_TERMINAL_WIDTH = 68;
|
|
21926
22133
|
var COMMAND_PATTERN = /altertable(?:\s+[^\s'",]+)*/g;
|
|
21927
|
-
var COMMAND_GROUP_TITLES = {
|
|
21928
|
-
platform: "Platform",
|
|
21929
|
-
ingest: "Ingest",
|
|
21930
|
-
query: "Query"
|
|
21931
|
-
};
|
|
21932
22134
|
function renderHighlightedCommands(text3) {
|
|
21933
22135
|
const spans = [];
|
|
21934
22136
|
let offset = 0;
|
|
@@ -22155,11 +22357,7 @@ function renderCommandUsage(descriptor, parentDescriptor) {
|
|
|
22155
22357
|
}
|
|
22156
22358
|
function renderRootUsage(descriptor) {
|
|
22157
22359
|
const metadata = descriptor.metadata;
|
|
22158
|
-
const groupedEntries = {
|
|
22159
|
-
platform: [],
|
|
22160
|
-
ingest: [],
|
|
22161
|
-
query: []
|
|
22162
|
-
};
|
|
22360
|
+
const groupedEntries = Object.fromEntries(ALTERTABLE_COMMAND_GROUPS.map(({ id }) => [id, []]));
|
|
22163
22361
|
const lines = [
|
|
22164
22362
|
...wrapHelpText(metadata.description, getHelpTerminalWidth()),
|
|
22165
22363
|
"",
|
|
@@ -22178,9 +22376,10 @@ function renderRootUsage(descriptor) {
|
|
|
22178
22376
|
});
|
|
22179
22377
|
}
|
|
22180
22378
|
let renderedGroup = false;
|
|
22181
|
-
for (const
|
|
22379
|
+
for (const { id, title } of ALTERTABLE_COMMAND_GROUPS) {
|
|
22380
|
+
const entries = groupedEntries[id];
|
|
22182
22381
|
if (entries.length > 0) {
|
|
22183
|
-
lines.push(...renderedGroup ? [""] : [], ` ${renderDisplayText([span(
|
|
22382
|
+
lines.push(...renderedGroup ? [""] : [], ` ${renderDisplayText([span(title, "muted")])}`, ...formatHelpEntries(entries));
|
|
22184
22383
|
renderedGroup = true;
|
|
22185
22384
|
}
|
|
22186
22385
|
}
|