@a9s/cli 1.0.7 → 1.0.9
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/scripts/seed.js +202 -4
- package/dist/src/App.js +35 -3
- package/dist/src/components/AdvancedTextInput.js +3 -1
- package/dist/src/components/AutocompleteInput.js +3 -1
- package/dist/src/components/DetailPanel.js +3 -1
- package/dist/src/components/DiffViewer.js +3 -1
- package/dist/src/components/ErrorStatePanel.js +3 -1
- package/dist/src/components/HUD.js +3 -1
- package/dist/src/components/HelpPanel.js +6 -4
- package/dist/src/components/ModeBar.js +5 -8
- package/dist/src/components/Table/index.js +19 -26
- package/dist/src/components/TableSkeleton.js +3 -1
- package/dist/src/components/YankHelpPanel.js +3 -1
- package/dist/src/constants/commands.js +2 -1
- package/dist/src/constants/theme.js +608 -0
- package/dist/src/contexts/ThemeContext.js +13 -0
- package/dist/src/features/AppMainView.integration.test.js +1 -0
- package/dist/src/features/AppMainView.js +6 -4
- package/dist/src/hooks/useCommandRouter.js +5 -0
- package/dist/src/hooks/usePickerManager.js +35 -1
- package/dist/src/index.js +2 -1
- package/dist/src/services.js +2 -2
- package/dist/src/state/atoms.js +3 -0
- package/dist/src/utils/config.js +36 -0
- package/dist/src/views/dynamodb/adapter.js +313 -9
- package/dist/src/views/dynamodb/capabilities/detailCapability.js +94 -0
- package/dist/src/views/dynamodb/capabilities/yankCapability.js +6 -0
- package/dist/src/views/dynamodb/capabilities/yankOptions.js +69 -0
- package/dist/src/views/dynamodb/schema.js +18 -0
- package/dist/src/views/dynamodb/types.js +1 -0
- package/dist/src/views/dynamodb/utils.js +175 -0
- package/dist/src/views/iam/adapter.js +2 -1
- package/dist/src/views/route53/adapter.js +166 -9
- package/dist/src/views/route53/capabilities/detailCapability.js +63 -0
- package/dist/src/views/route53/capabilities/yankCapability.js +6 -0
- package/dist/src/views/route53/capabilities/yankOptions.js +58 -0
- package/dist/src/views/route53/schema.js +18 -0
- package/dist/src/views/route53/types.js +1 -0
- package/dist/src/views/s3/adapter.js +2 -1
- package/dist/src/views/secretsmanager/adapter.js +2 -1
- package/package.json +2 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export const Route53YankOptions = [
|
|
2
|
+
// Zone options
|
|
3
|
+
{
|
|
4
|
+
trigger: { type: "key", char: "n" },
|
|
5
|
+
label: "Copy zone name",
|
|
6
|
+
feedback: "Copied zone name",
|
|
7
|
+
isRelevant: (row) => row.meta.type === "zone",
|
|
8
|
+
resolve: async (row) => {
|
|
9
|
+
return row.meta.zoneName ?? null;
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
trigger: { type: "key", char: "i" },
|
|
14
|
+
label: "Copy zone ID",
|
|
15
|
+
feedback: "Copied zone ID",
|
|
16
|
+
isRelevant: (row) => row.meta.type === "zone",
|
|
17
|
+
resolve: async (row) => {
|
|
18
|
+
return row.meta.zoneId ?? null;
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
// Record options
|
|
22
|
+
{
|
|
23
|
+
trigger: { type: "key", char: "n" },
|
|
24
|
+
label: "Copy record name",
|
|
25
|
+
feedback: "Copied record name",
|
|
26
|
+
isRelevant: (row) => row.meta.type === "record",
|
|
27
|
+
resolve: async (row) => {
|
|
28
|
+
return row.meta.recordName ?? null;
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
trigger: { type: "key", char: "v" },
|
|
33
|
+
label: "Copy first value",
|
|
34
|
+
feedback: "Copied first value",
|
|
35
|
+
isRelevant: (row) => {
|
|
36
|
+
return row.meta.type === "record" && (row.meta.recordValues?.length ?? 0) > 0;
|
|
37
|
+
},
|
|
38
|
+
resolve: async (row) => {
|
|
39
|
+
return row.meta.recordValues?.[0] ?? null;
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
trigger: { type: "key", char: "b" },
|
|
44
|
+
label: "Copy in BIND format",
|
|
45
|
+
feedback: "Copied BIND format",
|
|
46
|
+
isRelevant: (row) => row.meta.type === "record",
|
|
47
|
+
resolve: async (row) => {
|
|
48
|
+
const name = row.meta.recordName ?? "";
|
|
49
|
+
const type = row.meta.recordType ?? "";
|
|
50
|
+
const ttl = row.meta.recordTtl ?? 3600;
|
|
51
|
+
const value = row.meta.recordValues?.[0] ?? "";
|
|
52
|
+
if (row.meta.recordAliasTarget) {
|
|
53
|
+
return `${name} ALIAS ${row.meta.recordAliasTarget.DNSName}`;
|
|
54
|
+
}
|
|
55
|
+
return `${name} ${ttl} IN ${type} ${value}`;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const Route53RowMetaSchema = z.object({
|
|
3
|
+
type: z.enum(["zone", "record"]),
|
|
4
|
+
zoneId: z.string().optional(),
|
|
5
|
+
zoneName: z.string().optional(),
|
|
6
|
+
isPrivate: z.boolean().optional(),
|
|
7
|
+
recordName: z.string().optional(),
|
|
8
|
+
recordType: z.string().optional(),
|
|
9
|
+
recordTtl: z.number().optional(),
|
|
10
|
+
recordValues: z.array(z.string()).optional(),
|
|
11
|
+
recordAliasTarget: z
|
|
12
|
+
.object({
|
|
13
|
+
HostedZoneId: z.string(),
|
|
14
|
+
DNSName: z.string(),
|
|
15
|
+
EvaluateTargetHealth: z.boolean(),
|
|
16
|
+
})
|
|
17
|
+
.optional(),
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,7 @@ import { createS3EditCapability } from "./capabilities/editCapability.js";
|
|
|
8
8
|
import { createS3DetailCapability } from "./capabilities/detailCapability.js";
|
|
9
9
|
import { createS3YankCapability } from "./capabilities/yankCapability.js";
|
|
10
10
|
import { createS3ActionCapability } from "./capabilities/actionCapability.js";
|
|
11
|
+
import { SERVICE_COLORS } from "../../constants/theme.js";
|
|
11
12
|
export const s3LevelAtom = atom({ kind: "buckets" });
|
|
12
13
|
export const s3BackStackAtom = atom([]);
|
|
13
14
|
export function createS3ServiceAdapter(endpointUrl, region) {
|
|
@@ -132,7 +133,7 @@ export function createS3ServiceAdapter(endpointUrl, region) {
|
|
|
132
133
|
return {
|
|
133
134
|
id: "s3",
|
|
134
135
|
label: "S3",
|
|
135
|
-
hudColor:
|
|
136
|
+
hudColor: SERVICE_COLORS.s3,
|
|
136
137
|
getColumns,
|
|
137
138
|
getRows,
|
|
138
139
|
onSelect,
|
|
@@ -7,6 +7,7 @@ import { createSecretsManagerDetailCapability } from "./capabilities/detailCapab
|
|
|
7
7
|
import { createSecretsManagerYankCapability } from "./capabilities/yankCapability.js";
|
|
8
8
|
import { createSecretsManagerActionCapability } from "./capabilities/actionCapability.js";
|
|
9
9
|
import { createSecretsManagerEditCapability } from "./capabilities/editCapability.js";
|
|
10
|
+
import { SERVICE_COLORS } from "../../constants/theme.js";
|
|
10
11
|
export const secretLevelAtom = atom({ kind: "secrets" });
|
|
11
12
|
export const secretBackStackAtom = atom([]);
|
|
12
13
|
function tryParseFields(secretString) {
|
|
@@ -166,7 +167,7 @@ export function createSecretsManagerServiceAdapter(endpointUrl, region) {
|
|
|
166
167
|
return {
|
|
167
168
|
id: "secretsmanager",
|
|
168
169
|
label: "Secrets Manager",
|
|
169
|
-
hudColor:
|
|
170
|
+
hudColor: SERVICE_COLORS.secretsmanager,
|
|
170
171
|
getColumns,
|
|
171
172
|
getRows,
|
|
172
173
|
onSelect,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a9s/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "k9s-style TUI navigator for AWS services",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"open": "^11.0.0",
|
|
59
59
|
"open-editor": "^6.0.0",
|
|
60
60
|
"react": "^19.2.4",
|
|
61
|
+
"yaml": "^2.8.2",
|
|
61
62
|
"zod": "^4.3.6"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|