airfoil 0.1.0 → 0.2.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/README.md +1 -0
- package/dist/index.js +42194 -38552
- package/package.json +8 -3
- package/src/commands/cluster/data-lake/create-iceberg.ts +1 -1
- package/src/commands/cluster/data-lake/create-parquet.ts +1 -1
- package/src/commands/cluster/data-lake/delete.ts +1 -1
- package/src/commands/cluster/data-lake/get.ts +1 -1
- package/src/commands/cluster/data-lake/list.ts +1 -1
- package/src/commands/cluster/namespace/create.ts +1 -1
- package/src/commands/cluster/namespace/delete.ts +1 -1
- package/src/commands/cluster/namespace/get.ts +1 -1
- package/src/commands/cluster/namespace/list.ts +1 -1
- package/src/commands/cluster/object-store/create-aws.ts +1 -1
- package/src/commands/cluster/object-store/create-azure.ts +1 -1
- package/src/commands/cluster/object-store/create-google.ts +1 -1
- package/src/commands/cluster/object-store/create-s3.ts +2 -1
- package/src/commands/cluster/object-store/delete.ts +1 -1
- package/src/commands/cluster/object-store/get.ts +1 -1
- package/src/commands/cluster/object-store/list.ts +1 -1
- package/src/commands/cluster/tenant/create.ts +1 -1
- package/src/commands/cluster/tenant/delete.ts +1 -1
- package/src/commands/cluster/tenant/get.ts +1 -1
- package/src/commands/cluster/tenant/list.ts +1 -1
- package/src/commands/cluster/topic/create.ts +46 -33
- package/src/commands/cluster/topic/delete.ts +1 -1
- package/src/commands/cluster/topic/get.ts +1 -1
- package/src/commands/cluster/topic/list.ts +6 -12
- package/src/commands/dev.ts +2 -2
- package/src/commands/sql.ts +1 -1
- package/src/utils/client.ts +1 -1
- package/.turbo/turbo-build.log +0 -6
- package/CHANGELOG.json +0 -20
- package/CHANGELOG.md +0 -13
- package/test-commands.sh +0 -209
- package/tsconfig.json +0 -31
- package/useairfoil-0.1.0.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "airfoil",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"src",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
6
11
|
"bin": {
|
|
7
12
|
"airfoil": "./dist/index.js"
|
|
8
13
|
},
|
|
@@ -23,8 +28,8 @@
|
|
|
23
28
|
"typescript": "^5"
|
|
24
29
|
},
|
|
25
30
|
"dependencies": {
|
|
26
|
-
"@useairfoil/flight": "0.
|
|
27
|
-
"@useairfoil/wings": "0.
|
|
31
|
+
"@useairfoil/flight": "0.2.0",
|
|
32
|
+
"@useairfoil/wings": "0.2.0",
|
|
28
33
|
"@clack/prompts": "^0.11.0",
|
|
29
34
|
"@effect/cli": "^0.73.1",
|
|
30
35
|
"@effect/platform-node": "^0.104.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -89,6 +89,7 @@ export const createObjectStoreS3Command = Command.make(
|
|
|
89
89
|
secretAccessKey,
|
|
90
90
|
region: Option.getOrUndefined(region),
|
|
91
91
|
endpoint,
|
|
92
|
+
allowHttp: false,
|
|
92
93
|
},
|
|
93
94
|
},
|
|
94
95
|
}).pipe(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
|
-
import type { FieldConfig } from "@airfoil/wings";
|
|
3
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
4
2
|
import * as p from "@clack/prompts";
|
|
5
3
|
import { Command, Options } from "@effect/cli";
|
|
4
|
+
import type { FieldConfig } from "@useairfoil/wings";
|
|
5
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
6
6
|
import { printTable } from "console-table-printer";
|
|
7
7
|
import { Effect, Option } from "effect";
|
|
8
8
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -26,14 +26,8 @@ const SUPPORTED_INLINE_TYPES = [
|
|
|
26
26
|
"Float16",
|
|
27
27
|
"Float32",
|
|
28
28
|
"Float64",
|
|
29
|
-
"LargeUtf8",
|
|
30
|
-
"LargeBinary",
|
|
31
29
|
"DateDay",
|
|
32
30
|
"DateMillisecond",
|
|
33
|
-
"TimeSecond",
|
|
34
|
-
"TimeMillisecond",
|
|
35
|
-
"TimeMicrosecond",
|
|
36
|
-
"TimeNanosecond",
|
|
37
31
|
"TimestampSecond",
|
|
38
32
|
"TimestampMillisecond",
|
|
39
33
|
"TimestampMicrosecond",
|
|
@@ -42,9 +36,6 @@ const SUPPORTED_INLINE_TYPES = [
|
|
|
42
36
|
"DurationMillisecond",
|
|
43
37
|
"DurationMicrosecond",
|
|
44
38
|
"DurationNanosecond",
|
|
45
|
-
"IntervalDayTime",
|
|
46
|
-
"IntervalYearMonth",
|
|
47
|
-
"IntervalMonthDayNano",
|
|
48
39
|
] as const;
|
|
49
40
|
|
|
50
41
|
type SupportedInlineType = (typeof SUPPORTED_INLINE_TYPES)[number];
|
|
@@ -93,10 +84,17 @@ const ttlSecondsOption = Options.integer("ttl-seconds").pipe(
|
|
|
93
84
|
Options.optional,
|
|
94
85
|
);
|
|
95
86
|
|
|
87
|
+
const targetFileSizeBytesOption = Options.integer(
|
|
88
|
+
"target-file-size-bytes",
|
|
89
|
+
).pipe(
|
|
90
|
+
Options.withDescription("Target file size for compaction (bytes)"),
|
|
91
|
+
Options.withDefault(1024 * 1024),
|
|
92
|
+
);
|
|
93
|
+
|
|
96
94
|
/**
|
|
97
95
|
* Parse a field string in format "name:Type" or "name:Type?" (nullable)
|
|
98
96
|
*/
|
|
99
|
-
function parseFieldString(fieldStr: string): FieldConfig {
|
|
97
|
+
function parseFieldString(fieldStr: string, index: number): FieldConfig {
|
|
100
98
|
const match = fieldStr.match(/^([^:]+):([^?]+)(\?)?$/);
|
|
101
99
|
if (!match) {
|
|
102
100
|
throw new Error(
|
|
@@ -126,14 +124,15 @@ function parseFieldString(fieldStr: string): FieldConfig {
|
|
|
126
124
|
name: name.trim(),
|
|
127
125
|
dataType: dataType as SupportedInlineType,
|
|
128
126
|
nullable,
|
|
129
|
-
|
|
127
|
+
id: BigInt(index + 1),
|
|
128
|
+
};
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
/**
|
|
133
132
|
* Parse multiple field strings into FieldConfig array
|
|
134
133
|
*/
|
|
135
134
|
function parseFieldsFromArgs(fields: string[]): FieldConfig[] {
|
|
136
|
-
return fields.map(parseFieldString);
|
|
135
|
+
return fields.map((field, index) => parseFieldString(field, index));
|
|
137
136
|
}
|
|
138
137
|
|
|
139
138
|
/**
|
|
@@ -165,7 +164,13 @@ function loadFieldsFromFile(filePath: string): FieldConfig[] {
|
|
|
165
164
|
);
|
|
166
165
|
}
|
|
167
166
|
|
|
168
|
-
return parsed as FieldConfig[]
|
|
167
|
+
return (parsed as FieldConfig[]).map((field, index) => {
|
|
168
|
+
const fieldId = (field as { id?: bigint | number }).id;
|
|
169
|
+
return {
|
|
170
|
+
...field,
|
|
171
|
+
id: typeof fieldId === "bigint" ? fieldId : BigInt(fieldId ?? index + 1),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
export const createTopicCommand = Command.make(
|
|
@@ -179,6 +184,7 @@ export const createTopicCommand = Command.make(
|
|
|
179
184
|
partitionKey: partitionKeyOption,
|
|
180
185
|
freshnessSeconds: freshnessSecondsOption,
|
|
181
186
|
ttlSeconds: ttlSecondsOption,
|
|
187
|
+
targetFileSizeBytes: targetFileSizeBytesOption,
|
|
182
188
|
host: hostOption,
|
|
183
189
|
port: portOption,
|
|
184
190
|
},
|
|
@@ -191,6 +197,7 @@ export const createTopicCommand = Command.make(
|
|
|
191
197
|
partitionKey,
|
|
192
198
|
freshnessSeconds,
|
|
193
199
|
ttlSeconds,
|
|
200
|
+
targetFileSizeBytes,
|
|
194
201
|
host,
|
|
195
202
|
port,
|
|
196
203
|
}) =>
|
|
@@ -226,7 +233,7 @@ export const createTopicCommand = Command.make(
|
|
|
226
233
|
}
|
|
227
234
|
|
|
228
235
|
const partitionKeyName = Option.getOrUndefined(partitionKey);
|
|
229
|
-
let
|
|
236
|
+
let partitionKeyId: bigint | undefined;
|
|
230
237
|
if (partitionKeyName) {
|
|
231
238
|
const index = topicFields.findIndex(
|
|
232
239
|
(field) => field.name === partitionKeyName,
|
|
@@ -238,7 +245,15 @@ export const createTopicCommand = Command.make(
|
|
|
238
245
|
),
|
|
239
246
|
);
|
|
240
247
|
}
|
|
241
|
-
|
|
248
|
+
const partitionField = topicFields[index];
|
|
249
|
+
if (!partitionField) {
|
|
250
|
+
return yield* Effect.fail(
|
|
251
|
+
new Error(
|
|
252
|
+
`Partition key field "${partitionKeyName}" not found in fields. Available fields: ${topicFields.map((field) => field.name).join(", ")}`,
|
|
253
|
+
),
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
partitionKeyId = partitionField.id;
|
|
242
257
|
}
|
|
243
258
|
|
|
244
259
|
const layer = makeClusterMetadataLayer(host, port);
|
|
@@ -251,12 +266,13 @@ export const createTopicCommand = Command.make(
|
|
|
251
266
|
topicId,
|
|
252
267
|
description: Option.getOrUndefined(description),
|
|
253
268
|
fields: topicFields,
|
|
254
|
-
partitionKey:
|
|
269
|
+
partitionKey: partitionKeyId,
|
|
255
270
|
compaction: {
|
|
256
271
|
freshnessSeconds: BigInt(freshnessSeconds),
|
|
257
272
|
ttlSeconds: Option.getOrUndefined(
|
|
258
273
|
Option.map(ttlSeconds, (ttl) => BigInt(ttl)),
|
|
259
274
|
),
|
|
275
|
+
targetFileSizeBytes: BigInt(targetFileSizeBytes),
|
|
260
276
|
},
|
|
261
277
|
}).pipe(
|
|
262
278
|
Effect.provide(layer),
|
|
@@ -274,29 +290,26 @@ export const createTopicCommand = Command.make(
|
|
|
274
290
|
description: topic.description || "-",
|
|
275
291
|
partition_key:
|
|
276
292
|
topic.partitionKey !== undefined
|
|
277
|
-
? topicFields
|
|
278
|
-
|
|
293
|
+
? topicFields.find((field) => field.id === topic.partitionKey)
|
|
294
|
+
?.name || topic.partitionKey.toString()
|
|
279
295
|
: "-",
|
|
280
296
|
freshness_seconds: topic.compaction.freshnessSeconds.toString(),
|
|
281
297
|
ttl_seconds: topic.compaction.ttlSeconds?.toString() || "-",
|
|
282
|
-
|
|
298
|
+
target_file_size_bytes:
|
|
299
|
+
topic.compaction.targetFileSizeBytes.toString(),
|
|
300
|
+
fields_count: topic.schema.fields.length.toString(),
|
|
283
301
|
},
|
|
284
302
|
]);
|
|
285
303
|
|
|
286
|
-
if (topic.fields.length > 0) {
|
|
304
|
+
if (topic.schema.fields.length > 0) {
|
|
287
305
|
console.log("\nFields:");
|
|
288
306
|
printTable(
|
|
289
|
-
topic.fields.map(
|
|
290
|
-
(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
name: field.name,
|
|
296
|
-
type: field.dataType,
|
|
297
|
-
nullable: field.nullable ? "yes" : "no",
|
|
298
|
-
}),
|
|
299
|
-
),
|
|
307
|
+
topic.schema.fields.map((field, index) => ({
|
|
308
|
+
index: index.toString(),
|
|
309
|
+
name: field.name,
|
|
310
|
+
type: field.arrowType?._tag ?? "unknown",
|
|
311
|
+
nullable: field.nullable ? "yes" : "no",
|
|
312
|
+
})),
|
|
300
313
|
);
|
|
301
314
|
}
|
|
302
315
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
2
|
import { Command, Options } from "@effect/cli";
|
|
3
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
4
|
import { printTable } from "console-table-printer";
|
|
5
5
|
import { Effect, Option } from "effect";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
@@ -52,17 +52,11 @@ export const listTopicsCommand = Command.make(
|
|
|
52
52
|
p.log.warn("No topics found");
|
|
53
53
|
} else {
|
|
54
54
|
printTable(
|
|
55
|
-
response.topics.map(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}) => ({
|
|
61
|
-
name: topic.name,
|
|
62
|
-
description: topic.description || "-",
|
|
63
|
-
partition_key: topic.partitionKey?.toString() || "-",
|
|
64
|
-
}),
|
|
65
|
-
),
|
|
55
|
+
response.topics.map((topic) => ({
|
|
56
|
+
name: topic.name,
|
|
57
|
+
description: topic.description || "-",
|
|
58
|
+
partition_key: topic.partitionKey?.toString() || "-",
|
|
59
|
+
})),
|
|
66
60
|
);
|
|
67
61
|
}
|
|
68
62
|
|
package/src/commands/dev.ts
CHANGED
|
@@ -221,8 +221,8 @@ async function runWithDocker(options: { tag: string; forcePull: boolean }) {
|
|
|
221
221
|
"7780:7780",
|
|
222
222
|
image,
|
|
223
223
|
"dev",
|
|
224
|
-
"--http
|
|
225
|
-
"--metadata
|
|
224
|
+
"--http.address=0.0.0.0:7780",
|
|
225
|
+
"--metadata.address=0.0.0.0:7777",
|
|
226
226
|
],
|
|
227
227
|
{
|
|
228
228
|
stdout: "inherit",
|
package/src/commands/sql.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
-
import { ArrowFlightSqlClient } from "@airfoil/flight";
|
|
3
2
|
import * as p from "@clack/prompts";
|
|
4
3
|
import { Args, Command, Options } from "@effect/cli";
|
|
4
|
+
import { ArrowFlightSqlClient } from "@useairfoil/flight";
|
|
5
5
|
import { printTable } from "console-table-printer";
|
|
6
6
|
import { Effect, Option } from "effect";
|
|
7
7
|
import { Metadata } from "nice-grpc-common";
|
package/src/utils/client.ts
CHANGED
package/.turbo/turbo-build.log
DELETED
package/CHANGELOG.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@useairfoil/cli",
|
|
3
|
-
"entries": [
|
|
4
|
-
{
|
|
5
|
-
"date": "Wed, 28 Jan 2026 15:18:35 GMT",
|
|
6
|
-
"version": "0.1.0",
|
|
7
|
-
"tag": "@useairfoil/cli_v0.1.0",
|
|
8
|
-
"comments": {
|
|
9
|
-
"minor": [
|
|
10
|
-
{
|
|
11
|
-
"author": "francesco@ceccon.me",
|
|
12
|
-
"package": "@useairfoil/cli",
|
|
13
|
-
"commit": "003fc255f696223e8e54fe7b9da4a8112411910f",
|
|
14
|
-
"comment": "Switch SDK to Effect.ts"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Change Log - @useairfoil/cli
|
|
2
|
-
|
|
3
|
-
<!-- This log was last generated on Wed, 28 Jan 2026 15:18:35 GMT and should not be manually modified. -->
|
|
4
|
-
|
|
5
|
-
<!-- Start content -->
|
|
6
|
-
|
|
7
|
-
## 0.1.0
|
|
8
|
-
|
|
9
|
-
Wed, 28 Jan 2026 15:18:35 GMT
|
|
10
|
-
|
|
11
|
-
### Minor changes
|
|
12
|
-
|
|
13
|
-
- Switch SDK to Effect.ts (francesco@ceccon.me)
|