airfoil 0.1.1 → 0.3.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/index.js +72253 -73199
- package/package.json +6 -7
- package/src/commands/cluster/data-lake/create-iceberg.ts +7 -7
- package/src/commands/cluster/data-lake/create-parquet.ts +7 -7
- package/src/commands/cluster/data-lake/create.ts +1 -1
- package/src/commands/cluster/data-lake/delete.ts +5 -5
- package/src/commands/cluster/data-lake/get.ts +5 -5
- package/src/commands/cluster/data-lake/list.ts +5 -5
- package/src/commands/cluster/index.ts +1 -1
- package/src/commands/cluster/namespace/create.ts +17 -17
- package/src/commands/cluster/namespace/delete.ts +5 -5
- package/src/commands/cluster/namespace/get.ts +5 -5
- package/src/commands/cluster/namespace/list.ts +5 -5
- package/src/commands/cluster/object-store/create-aws.ts +19 -21
- package/src/commands/cluster/object-store/create-azure.ts +16 -16
- package/src/commands/cluster/object-store/create-google.ts +16 -16
- package/src/commands/cluster/object-store/create-s3.ts +22 -21
- package/src/commands/cluster/object-store/create.ts +1 -1
- package/src/commands/cluster/object-store/delete.ts +5 -5
- package/src/commands/cluster/object-store/get.ts +5 -5
- package/src/commands/cluster/object-store/list.ts +5 -5
- package/src/commands/cluster/tenant/create.ts +5 -7
- package/src/commands/cluster/tenant/delete.ts +5 -5
- package/src/commands/cluster/tenant/get.ts +5 -5
- package/src/commands/cluster/tenant/list.ts +3 -3
- package/src/commands/cluster/topic/create.ts +69 -58
- package/src/commands/cluster/topic/delete.ts +8 -8
- package/src/commands/cluster/topic/get.ts +5 -5
- package/src/commands/cluster/topic/list.ts +10 -16
- package/src/commands/dev.ts +23 -23
- package/src/commands/sql.ts +17 -17
- package/src/index.ts +7 -5
- package/src/utils/client.ts +1 -1
- package/src/utils/options.ts +18 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "airfoil",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"typecheck": "tsc --noEmit",
|
|
16
16
|
"lint": "biome check .",
|
|
17
|
-
"lint:fix": "
|
|
17
|
+
"lint:fix": "bun run lint --write",
|
|
18
18
|
"format": "biome format --write .",
|
|
19
19
|
"airfoil:dev": "bun run src/index.ts",
|
|
20
20
|
"build": "bun build src/index.ts --outdir dist --target node",
|
|
@@ -28,13 +28,12 @@
|
|
|
28
28
|
"typescript": "^5"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@useairfoil/flight": "0.1.1",
|
|
32
|
-
"@useairfoil/wings": "0.1.1",
|
|
33
31
|
"@clack/prompts": "^0.11.0",
|
|
34
|
-
"@effect/
|
|
35
|
-
"@
|
|
32
|
+
"@effect/platform-node": "4.0.0-beta.25",
|
|
33
|
+
"@useairfoil/flight": "0.2.0",
|
|
34
|
+
"@useairfoil/wings": "0.2.0",
|
|
36
35
|
"console-table-printer": "^2.15.0",
|
|
37
|
-
"effect": "
|
|
36
|
+
"effect": "4.0.0-beta.25",
|
|
38
37
|
"nice-grpc": "^2.1.13",
|
|
39
38
|
"nice-grpc-common": "^2.0.2"
|
|
40
39
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
const dataLakeIdOption =
|
|
15
|
-
|
|
14
|
+
const dataLakeIdOption = Flag.string("data-lake-id").pipe(
|
|
15
|
+
Flag.withDescription("Unique identifier for the data lake"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
export const createDataLakeIcebergCommand = Command.make(
|
|
@@ -57,5 +57,5 @@ export const createDataLakeIcebergCommand = Command.make(
|
|
|
57
57
|
]);
|
|
58
58
|
p.outro("✓ Done");
|
|
59
59
|
});
|
|
60
|
-
}).pipe(Effect.
|
|
60
|
+
}).pipe(Effect.catch(handleCliError("Failed to create data lake"))),
|
|
61
61
|
).pipe(Command.withDescription("Create a new Iceberg data lake"));
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
const dataLakeIdOption =
|
|
15
|
-
|
|
14
|
+
const dataLakeIdOption = Flag.string("data-lake-id").pipe(
|
|
15
|
+
Flag.withDescription("Unique identifier for the data lake"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
18
|
export const createDataLakeParquetCommand = Command.make(
|
|
@@ -57,5 +57,5 @@ export const createDataLakeParquetCommand = Command.make(
|
|
|
57
57
|
]);
|
|
58
58
|
p.outro("✓ Done");
|
|
59
59
|
});
|
|
60
|
-
}).pipe(Effect.
|
|
60
|
+
}).pipe(Effect.catch(handleCliError("Failed to create data lake"))),
|
|
61
61
|
).pipe(Command.withDescription("Create a new Parquet data lake"));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { Effect } from "effect";
|
|
4
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
7
7
|
import { forceOption, hostOption, portOption } from "../../../utils/options.js";
|
|
8
8
|
|
|
9
|
-
const nameOption =
|
|
10
|
-
|
|
9
|
+
const nameOption = Flag.string("name").pipe(
|
|
10
|
+
Flag.withDescription(
|
|
11
11
|
"Data lake name in format: tenants/{tenant}/data-lakes/{data-lake}",
|
|
12
12
|
),
|
|
13
13
|
);
|
|
@@ -54,5 +54,5 @@ export const deleteDataLakeCommand = Command.make(
|
|
|
54
54
|
|
|
55
55
|
s.stop("Data lake deleted successfully");
|
|
56
56
|
p.outro("✓ Done");
|
|
57
|
-
}).pipe(Effect.
|
|
57
|
+
}).pipe(Effect.catch(handleCliError("Failed to delete data lake"))),
|
|
58
58
|
).pipe(Command.withDescription("Delete a data lake from the cluster"));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const nameOption =
|
|
11
|
-
|
|
10
|
+
const nameOption = Flag.string("name").pipe(
|
|
11
|
+
Flag.withDescription(
|
|
12
12
|
"Data lake name in format: tenants/{tenant}/data-lakes/{data-lake}",
|
|
13
13
|
),
|
|
14
14
|
);
|
|
@@ -42,5 +42,5 @@ export const getDataLakeCommand = Command.make(
|
|
|
42
42
|
]);
|
|
43
43
|
p.outro("✓ Done");
|
|
44
44
|
});
|
|
45
|
-
}).pipe(Effect.
|
|
45
|
+
}).pipe(Effect.catch(handleCliError("Failed to get data lake"))),
|
|
46
46
|
).pipe(Command.withDescription("Get details of a specific data lake"));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect, Option } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import {
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
portOption,
|
|
13
13
|
} from "../../../utils/options.js";
|
|
14
14
|
|
|
15
|
-
const parentOption =
|
|
16
|
-
|
|
15
|
+
const parentOption = Flag.string("parent").pipe(
|
|
16
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
export const listDataLakesCommand = Command.make(
|
|
@@ -68,5 +68,5 @@ export const listDataLakesCommand = Command.make(
|
|
|
68
68
|
|
|
69
69
|
p.outro("✓ Done");
|
|
70
70
|
});
|
|
71
|
-
}).pipe(Effect.
|
|
71
|
+
}).pipe(Effect.catch(handleCliError("Failed to list data lakes"))),
|
|
72
72
|
).pipe(Command.withDescription("List all data lakes belonging to a tenant"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Command } from "@effect/cli";
|
|
2
1
|
import { Effect } from "effect";
|
|
2
|
+
import { Command } from "effect/unstable/cli";
|
|
3
3
|
import { createDataLakeCommand } from "./data-lake/create.js";
|
|
4
4
|
import { deleteDataLakeCommand } from "./data-lake/delete.js";
|
|
5
5
|
import { getDataLakeCommand } from "./data-lake/get.js";
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription(
|
|
12
12
|
"Parent tenant in format: tenants/{tenant} (e.g., 'tenants/default')",
|
|
13
13
|
),
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
const namespaceIdOption =
|
|
17
|
-
|
|
16
|
+
const namespaceIdOption = Flag.string("namespace-id").pipe(
|
|
17
|
+
Flag.withDescription(
|
|
18
18
|
"Unique identifier for the namespace (e.g., 'production')",
|
|
19
19
|
),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
-
const flushSizeBytesOption =
|
|
23
|
-
|
|
22
|
+
const flushSizeBytesOption = Flag.integer("flush-size-bytes").pipe(
|
|
23
|
+
Flag.withDescription(
|
|
24
24
|
"Size at which the current segment is flushed to object storage",
|
|
25
25
|
),
|
|
26
|
-
|
|
26
|
+
Flag.withDefault(0),
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
const flushIntervalMillisOption =
|
|
30
|
-
|
|
29
|
+
const flushIntervalMillisOption = Flag.integer("flush-interval-millis").pipe(
|
|
30
|
+
Flag.withDescription(
|
|
31
31
|
"Maximum interval at which the current segment is flushed (milliseconds)",
|
|
32
32
|
),
|
|
33
|
-
|
|
33
|
+
Flag.withDefault(0),
|
|
34
34
|
);
|
|
35
35
|
|
|
36
|
-
const objectStoreOption =
|
|
37
|
-
|
|
36
|
+
const objectStoreOption = Flag.string("object-store").pipe(
|
|
37
|
+
Flag.withDescription(
|
|
38
38
|
"Object store used by this namespace (format: tenants/{tenant}/object-stores/{object-store})",
|
|
39
39
|
),
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
const dataLakeOption =
|
|
43
|
-
|
|
42
|
+
const dataLakeOption = Flag.string("data-lake").pipe(
|
|
43
|
+
Flag.withDescription(
|
|
44
44
|
"Data lake used by this namespace (format: tenants/{tenant}/data-lakes/{data-lake})",
|
|
45
45
|
),
|
|
46
46
|
);
|
|
@@ -103,5 +103,5 @@ export const createNamespaceCommand = Command.make(
|
|
|
103
103
|
]);
|
|
104
104
|
p.outro("✓ Done");
|
|
105
105
|
});
|
|
106
|
-
}).pipe(Effect.
|
|
106
|
+
}).pipe(Effect.catch(handleCliError("Failed to create namespace"))),
|
|
107
107
|
).pipe(Command.withDescription("Create a new namespace belonging to a tenant"));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { Effect } from "effect";
|
|
4
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
5
5
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
6
6
|
import { handleCliError } from "../../../utils/effect.js";
|
|
7
7
|
import { forceOption, hostOption, portOption } from "../../../utils/options.js";
|
|
8
8
|
|
|
9
|
-
const nameOption =
|
|
10
|
-
|
|
9
|
+
const nameOption = Flag.string("name").pipe(
|
|
10
|
+
Flag.withDescription(
|
|
11
11
|
"Namespace name in format: tenants/{tenant}/namespaces/{namespace}",
|
|
12
12
|
),
|
|
13
13
|
);
|
|
@@ -54,7 +54,7 @@ export const deleteNamespaceCommand = Command.make(
|
|
|
54
54
|
|
|
55
55
|
s.stop("Namespace deleted successfully");
|
|
56
56
|
p.outro("✓ Done");
|
|
57
|
-
}).pipe(Effect.
|
|
57
|
+
}).pipe(Effect.catch(handleCliError("Failed to delete namespace"))),
|
|
58
58
|
).pipe(
|
|
59
59
|
Command.withDescription(
|
|
60
60
|
"Delete a namespace from the cluster (fails if namespace has any topics)",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const nameOption =
|
|
11
|
-
|
|
10
|
+
const nameOption = Flag.string("name").pipe(
|
|
11
|
+
Flag.withDescription(
|
|
12
12
|
"Namespace name in format: tenants/{tenant}/namespaces/{namespace}",
|
|
13
13
|
),
|
|
14
14
|
);
|
|
@@ -48,5 +48,5 @@ export const getNamespaceCommand = Command.make(
|
|
|
48
48
|
]);
|
|
49
49
|
p.outro("✓ Done");
|
|
50
50
|
});
|
|
51
|
-
}).pipe(Effect.
|
|
51
|
+
}).pipe(Effect.catch(handleCliError("Failed to get namespace"))),
|
|
52
52
|
).pipe(Command.withDescription("Get details of a specific namespace"));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect, Option } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import {
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
portOption,
|
|
13
13
|
} from "../../../utils/options.js";
|
|
14
14
|
|
|
15
|
-
const parentOption =
|
|
16
|
-
|
|
15
|
+
const parentOption = Flag.string("parent").pipe(
|
|
16
|
+
Flag.withDescription(
|
|
17
17
|
"Parent tenant in format: tenants/{tenant} (e.g., 'tenants/default')",
|
|
18
18
|
),
|
|
19
19
|
);
|
|
@@ -76,5 +76,5 @@ export const listNamespacesCommand = Command.make(
|
|
|
76
76
|
|
|
77
77
|
p.outro("✓ Done");
|
|
78
78
|
});
|
|
79
|
-
}).pipe(Effect.
|
|
79
|
+
}).pipe(Effect.catch(handleCliError("Failed to list namespaces"))),
|
|
80
80
|
).pipe(Command.withDescription("List all namespaces belonging to a tenant"));
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect, Option } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
const objectStoreIdOption =
|
|
15
|
-
|
|
14
|
+
const objectStoreIdOption = Flag.string("object-store-id").pipe(
|
|
15
|
+
Flag.withDescription("Unique identifier for the object store"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
const bucketNameOption =
|
|
19
|
-
|
|
18
|
+
const bucketNameOption = Flag.string("bucket-name").pipe(
|
|
19
|
+
Flag.withDescription("AWS S3 bucket name"),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
-
const prefixOption =
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const prefixOption = Flag.string("prefix").pipe(
|
|
23
|
+
Flag.withDescription("Bucket prefix (optional)"),
|
|
24
|
+
Flag.optional,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const accessKeyIdOption =
|
|
28
|
-
|
|
27
|
+
const accessKeyIdOption = Flag.string("access-key-id").pipe(
|
|
28
|
+
Flag.withDescription("AWS_ACCESS_KEY_ID"),
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
-
const secretAccessKeyOption =
|
|
32
|
-
|
|
31
|
+
const secretAccessKeyOption = Flag.string("secret-access-key").pipe(
|
|
32
|
+
Flag.withDescription("AWS_SECRET_ACCESS_KEY"),
|
|
33
33
|
);
|
|
34
34
|
|
|
35
|
-
const regionOption =
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const regionOption = Flag.string("region").pipe(
|
|
36
|
+
Flag.withDescription("AWS_DEFAULT_REGION (e.g., us-east-1)"),
|
|
37
|
+
Flag.optional,
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
export const createObjectStoreAwsCommand = Command.make(
|
|
@@ -102,7 +102,5 @@ export const createObjectStoreAwsCommand = Command.make(
|
|
|
102
102
|
]);
|
|
103
103
|
p.outro("✓ Done");
|
|
104
104
|
});
|
|
105
|
-
}).pipe(
|
|
106
|
-
Effect.catchAll(handleCliError("Failed to create AWS object store")),
|
|
107
|
-
),
|
|
105
|
+
}).pipe(Effect.catch(handleCliError("Failed to create AWS object store"))),
|
|
108
106
|
).pipe(Command.withDescription("Create a new AWS S3 object store"));
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect, Option } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
const objectStoreIdOption =
|
|
15
|
-
|
|
14
|
+
const objectStoreIdOption = Flag.string("object-store-id").pipe(
|
|
15
|
+
Flag.withDescription("Unique identifier for the object store"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
const containerNameOption =
|
|
19
|
-
|
|
18
|
+
const containerNameOption = Flag.string("container-name").pipe(
|
|
19
|
+
Flag.withDescription("Azure container name"),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
-
const prefixOption =
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const prefixOption = Flag.string("prefix").pipe(
|
|
23
|
+
Flag.withDescription("Container prefix (optional)"),
|
|
24
|
+
Flag.optional,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const storageAccountNameOption =
|
|
28
|
-
|
|
27
|
+
const storageAccountNameOption = Flag.string("storage-account-name").pipe(
|
|
28
|
+
Flag.withDescription("AZURE_STORAGE_ACCOUNT_NAME"),
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
-
const storageAccountKeyOption =
|
|
32
|
-
|
|
31
|
+
const storageAccountKeyOption = Flag.string("storage-account-key").pipe(
|
|
32
|
+
Flag.withDescription("AZURE_STORAGE_ACCOUNT_KEY"),
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
export const createObjectStoreAzureCommand = Command.make(
|
|
@@ -95,6 +95,6 @@ export const createObjectStoreAzureCommand = Command.make(
|
|
|
95
95
|
p.outro("✓ Done");
|
|
96
96
|
});
|
|
97
97
|
}).pipe(
|
|
98
|
-
Effect.
|
|
98
|
+
Effect.catch(handleCliError("Failed to create Azure object store")),
|
|
99
99
|
),
|
|
100
100
|
).pipe(Command.withDescription("Create a new Azure Blob Storage object store"));
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect, Option } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
const objectStoreIdOption =
|
|
15
|
-
|
|
14
|
+
const objectStoreIdOption = Flag.string("object-store-id").pipe(
|
|
15
|
+
Flag.withDescription("Unique identifier for the object store"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
const bucketNameOption =
|
|
19
|
-
|
|
18
|
+
const bucketNameOption = Flag.string("bucket-name").pipe(
|
|
19
|
+
Flag.withDescription("Google Cloud Storage bucket name"),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
-
const prefixOption =
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const prefixOption = Flag.string("prefix").pipe(
|
|
23
|
+
Flag.withDescription("Bucket prefix (optional)"),
|
|
24
|
+
Flag.optional,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const serviceAccountOption =
|
|
28
|
-
|
|
27
|
+
const serviceAccountOption = Flag.string("service-account").pipe(
|
|
28
|
+
Flag.withDescription("GOOGLE_SERVICE_ACCOUNT"),
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
-
const serviceAccountKeyOption =
|
|
32
|
-
|
|
31
|
+
const serviceAccountKeyOption = Flag.string("service-account-key").pipe(
|
|
32
|
+
Flag.withDescription("GOOGLE_SERVICE_ACCOUNT_KEY"),
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
export const createObjectStoreGoogleCommand = Command.make(
|
|
@@ -95,7 +95,7 @@ export const createObjectStoreGoogleCommand = Command.make(
|
|
|
95
95
|
p.outro("✓ Done");
|
|
96
96
|
});
|
|
97
97
|
}).pipe(
|
|
98
|
-
Effect.
|
|
98
|
+
Effect.catch(handleCliError("Failed to create Google object store")),
|
|
99
99
|
),
|
|
100
100
|
).pipe(
|
|
101
101
|
Command.withDescription("Create a new Google Cloud Storage object store"),
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { WingsClusterMetadata } from "@airfoil/wings";
|
|
2
1
|
import * as p from "@clack/prompts";
|
|
3
|
-
import {
|
|
2
|
+
import { WingsClusterMetadata } from "@useairfoil/wings";
|
|
4
3
|
import { printTable } from "console-table-printer";
|
|
5
4
|
import { Effect, Option } from "effect";
|
|
5
|
+
import { Command, Flag } from "effect/unstable/cli";
|
|
6
6
|
import { makeClusterMetadataLayer } from "../../../utils/client.js";
|
|
7
7
|
import { handleCliError } from "../../../utils/effect.js";
|
|
8
8
|
import { hostOption, portOption } from "../../../utils/options.js";
|
|
9
9
|
|
|
10
|
-
const parentOption =
|
|
11
|
-
|
|
10
|
+
const parentOption = Flag.string("parent").pipe(
|
|
11
|
+
Flag.withDescription("Parent tenant in format: tenants/{tenant}"),
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
const objectStoreIdOption =
|
|
15
|
-
|
|
14
|
+
const objectStoreIdOption = Flag.string("object-store-id").pipe(
|
|
15
|
+
Flag.withDescription("Unique identifier for the object store"),
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
const bucketNameOption =
|
|
19
|
-
|
|
18
|
+
const bucketNameOption = Flag.string("bucket-name").pipe(
|
|
19
|
+
Flag.withDescription("S3 bucket name"),
|
|
20
20
|
);
|
|
21
21
|
|
|
22
|
-
const prefixOption =
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const prefixOption = Flag.string("prefix").pipe(
|
|
23
|
+
Flag.withDescription("Bucket prefix (optional)"),
|
|
24
|
+
Flag.optional,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
const accessKeyIdOption =
|
|
28
|
-
|
|
27
|
+
const accessKeyIdOption = Flag.string("access-key-id").pipe(
|
|
28
|
+
Flag.withDescription("AWS_ACCESS_KEY_ID"),
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
-
const secretAccessKeyOption =
|
|
32
|
-
|
|
31
|
+
const secretAccessKeyOption = Flag.string("secret-access-key").pipe(
|
|
32
|
+
Flag.withDescription("AWS_SECRET_ACCESS_KEY"),
|
|
33
33
|
);
|
|
34
34
|
|
|
35
|
-
const regionOption =
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
const regionOption = Flag.string("region").pipe(
|
|
36
|
+
Flag.withDescription("AWS_DEFAULT_REGION"),
|
|
37
|
+
Flag.optional,
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
const endpointOption =
|
|
41
|
-
|
|
40
|
+
const endpointOption = Flag.string("endpoint").pipe(
|
|
41
|
+
Flag.withDescription(
|
|
42
42
|
"AWS_ENDPOINT (e.g., https://nyc3.digitaloceanspaces.com)",
|
|
43
43
|
),
|
|
44
44
|
);
|
|
@@ -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(
|
|
@@ -114,7 +115,7 @@ export const createObjectStoreS3Command = Command.make(
|
|
|
114
115
|
p.outro("✓ Done");
|
|
115
116
|
});
|
|
116
117
|
}).pipe(
|
|
117
|
-
Effect.
|
|
118
|
+
Effect.catch(
|
|
118
119
|
handleCliError("Failed to create S3-compatible object store"),
|
|
119
120
|
),
|
|
120
121
|
),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Command } from "@effect/cli";
|
|
2
1
|
import { Effect } from "effect";
|
|
2
|
+
import { Command } from "effect/unstable/cli";
|
|
3
3
|
import { createObjectStoreAwsCommand } from "./create-aws.js";
|
|
4
4
|
import { createObjectStoreAzureCommand } from "./create-azure.js";
|
|
5
5
|
import { createObjectStoreGoogleCommand } from "./create-google.js";
|