@liquidmetal-ai/raindrop 0.5.2 → 0.6.1
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 +427 -45
- package/dist/commands/dns/create.d.ts +25 -0
- package/dist/commands/dns/create.d.ts.map +1 -0
- package/dist/commands/dns/create.js +120 -0
- package/dist/commands/dns/delete.d.ts +20 -0
- package/dist/commands/dns/delete.d.ts.map +1 -0
- package/dist/commands/dns/delete.js +59 -0
- package/dist/commands/dns/get.d.ts +20 -0
- package/dist/commands/dns/get.d.ts.map +1 -0
- package/dist/commands/dns/get.js +101 -0
- package/dist/commands/dns/list.d.ts +21 -0
- package/dist/commands/dns/list.d.ts.map +1 -0
- package/dist/commands/dns/list.js +112 -0
- package/dist/commands/dns/records/create.d.ts +28 -0
- package/dist/commands/dns/records/create.d.ts.map +1 -0
- package/dist/commands/dns/records/create.js +140 -0
- package/dist/commands/dns/records/delete.d.ts +21 -0
- package/dist/commands/dns/records/delete.d.ts.map +1 -0
- package/dist/commands/dns/records/delete.js +64 -0
- package/dist/commands/dns/records/get.d.ts +21 -0
- package/dist/commands/dns/records/get.d.ts.map +1 -0
- package/dist/commands/dns/records/get.js +102 -0
- package/dist/commands/dns/records/list.d.ts +24 -0
- package/dist/commands/dns/records/list.d.ts.map +1 -0
- package/dist/commands/dns/records/list.js +132 -0
- package/dist/commands/dns/records/update.d.ts +29 -0
- package/dist/commands/dns/records/update.d.ts.map +1 -0
- package/dist/commands/dns/records/update.js +137 -0
- package/dist/commands/mcp/install-claude.d.ts +22 -0
- package/dist/commands/mcp/install-claude.d.ts.map +1 -0
- package/dist/commands/mcp/install-claude.js +233 -0
- package/dist/commands/mcp/status.d.ts +21 -0
- package/dist/commands/mcp/status.d.ts.map +1 -0
- package/dist/commands/mcp/status.js +150 -0
- package/dist/commands/query/chunk-search.d.ts.map +1 -1
- package/dist/commands/query/chunk-search.js +5 -1
- package/dist/commands/query/document.d.ts.map +1 -1
- package/dist/commands/query/document.js +5 -1
- package/dist/commands/query/reindex.d.ts +21 -0
- package/dist/commands/query/reindex.d.ts.map +1 -0
- package/dist/commands/query/reindex.js +145 -0
- package/dist/commands/query/search.d.ts.map +1 -1
- package/dist/commands/query/search.js +5 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +3279 -1004
- package/package.json +6 -3
- package/templates/claude-code/new-raindrop-app.md +5 -0
- package/templates/claude-code/raindrop-guidelines.md +127 -0
- package/templates/claude-code/reattach-raindrop-session.md +12 -0
- package/templates/claude-code/update-raindrop-app.md +11 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Create extends BaseCommand<typeof Create> {
|
|
3
|
+
static args: {
|
|
4
|
+
domain: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
jumpStart: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
zoneType: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
tags: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
};
|
|
23
|
+
run(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/dns/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;MAiCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwE3B"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
export default class Create extends BaseCommand {
|
|
4
|
+
static args = {
|
|
5
|
+
domain: Args.string({
|
|
6
|
+
description: 'Fully qualified domain name (e.g., example.com)',
|
|
7
|
+
required: true,
|
|
8
|
+
}),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Create a new DNS zone';
|
|
11
|
+
static examples = [
|
|
12
|
+
`<%= config.bin %> <%= command.id %> example.com
|
|
13
|
+
Creates a new full DNS zone for example.com
|
|
14
|
+
`,
|
|
15
|
+
`<%= config.bin %> <%= command.id %> subdomain.example.com --description "My subdomain zone"
|
|
16
|
+
Creates a new DNS zone with a description
|
|
17
|
+
`,
|
|
18
|
+
`<%= config.bin %> <%= command.id %> example.com --type partial --jump-start
|
|
19
|
+
Creates a partial DNS zone with jump start enabled
|
|
20
|
+
`,
|
|
21
|
+
];
|
|
22
|
+
static flags = {
|
|
23
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
24
|
+
description: Flags.string({
|
|
25
|
+
char: 'd',
|
|
26
|
+
description: 'Description for the DNS zone',
|
|
27
|
+
}),
|
|
28
|
+
jumpStart: Flags.boolean({
|
|
29
|
+
char: 'j',
|
|
30
|
+
description: 'Enable CloudFlare jump start (automatically detect and create DNS records)',
|
|
31
|
+
default: false,
|
|
32
|
+
}),
|
|
33
|
+
type: Flags.string({
|
|
34
|
+
description: 'DNS zone type configuration (full or partial)',
|
|
35
|
+
default: 'full',
|
|
36
|
+
options: ['full', 'partial'],
|
|
37
|
+
}),
|
|
38
|
+
zoneType: Flags.string({
|
|
39
|
+
char: 't',
|
|
40
|
+
description: 'Legacy zone type for internal use',
|
|
41
|
+
default: 'custom',
|
|
42
|
+
options: ['custom', 'tenant'],
|
|
43
|
+
hidden: true,
|
|
44
|
+
}),
|
|
45
|
+
tags: Flags.string({
|
|
46
|
+
description: 'Comma-separated list of tags',
|
|
47
|
+
multiple: true,
|
|
48
|
+
}),
|
|
49
|
+
output: Flags.string({
|
|
50
|
+
char: 'o',
|
|
51
|
+
description: 'output format',
|
|
52
|
+
default: 'text',
|
|
53
|
+
options: ['text', 'json'],
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
async run() {
|
|
57
|
+
const { client: dnsService, userId, organizationId } = await this.dnsService();
|
|
58
|
+
try {
|
|
59
|
+
this.log(`Creating DNS zone for ${this.args.domain}...`);
|
|
60
|
+
// Convert string type to proto enum
|
|
61
|
+
const typeEnum = this.flags.type === 'partial' ? 2 : 1; // TYPE_PARTIAL = 2, TYPE_FULL = 1
|
|
62
|
+
const response = await dnsService.createDNSZone({
|
|
63
|
+
organizationId,
|
|
64
|
+
userId,
|
|
65
|
+
fullyQualifiedDomainName: this.args.domain,
|
|
66
|
+
jumpStart: this.flags.jumpStart,
|
|
67
|
+
type: typeEnum,
|
|
68
|
+
description: this.flags.description,
|
|
69
|
+
});
|
|
70
|
+
if (!response.zone) {
|
|
71
|
+
this.error('Failed to create DNS zone: No zone returned', { exit: 1 });
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
switch (this.flags.output) {
|
|
75
|
+
case 'json':
|
|
76
|
+
console.log(JSON.stringify({
|
|
77
|
+
zone: {
|
|
78
|
+
zoneId: response.zone.zoneId,
|
|
79
|
+
organizationId: response.zone.organizationId,
|
|
80
|
+
fullyQualifiedDomainName: response.zone.fullyQualifiedDomainName,
|
|
81
|
+
zoneType: response.zone.zoneType,
|
|
82
|
+
status: response.zone.status,
|
|
83
|
+
nameServers: response.zone.nameServers,
|
|
84
|
+
cloudflareZoneId: response.zone.cloudflareZoneId,
|
|
85
|
+
cloudflareAccountId: response.zone.cloudflareAccountId,
|
|
86
|
+
description: response.zone.description,
|
|
87
|
+
createdAt: response.zone.createdAt,
|
|
88
|
+
updatedAt: response.zone.updatedAt,
|
|
89
|
+
tags: response.zone.tags,
|
|
90
|
+
}
|
|
91
|
+
}, null, 2));
|
|
92
|
+
break;
|
|
93
|
+
case 'text':
|
|
94
|
+
default:
|
|
95
|
+
this.log('\n✅ DNS zone created successfully!\n');
|
|
96
|
+
this.log(`Zone ID: ${response.zone.zoneId}`);
|
|
97
|
+
this.log(`Domain: ${response.zone.fullyQualifiedDomainName}`);
|
|
98
|
+
this.log(`Status: ${response.zone.status}`);
|
|
99
|
+
this.log(`Type: ${response.zone.zoneType}`);
|
|
100
|
+
if (response.zone.nameServers && response.zone.nameServers.length > 0) {
|
|
101
|
+
this.log('\nNameservers:');
|
|
102
|
+
for (const ns of response.zone.nameServers) {
|
|
103
|
+
this.log(` - ${ns}`);
|
|
104
|
+
}
|
|
105
|
+
this.log('\n📝 Update your domain registrar to use these nameservers.');
|
|
106
|
+
}
|
|
107
|
+
if (response.zone.description) {
|
|
108
|
+
this.log(`\nDescription: ${response.zone.description}`);
|
|
109
|
+
}
|
|
110
|
+
if (response.zone.tags && response.zone.tags.length > 0) {
|
|
111
|
+
this.log(`Tags: ${response.zone.tags.join(', ')}`);
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
this.error(`Failed to create DNS zone: ${error}`, { exit: 1 });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Delete extends BaseCommand<typeof Delete> {
|
|
3
|
+
static args: {
|
|
4
|
+
zoneId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/dns/delete.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAuB;IAEzC,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAOV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkC3B"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { confirm } from '@inquirer/prompts';
|
|
3
|
+
import { BaseCommand } from '../../base-command.js';
|
|
4
|
+
export default class Delete extends BaseCommand {
|
|
5
|
+
static args = {
|
|
6
|
+
zoneId: Args.string({
|
|
7
|
+
description: 'Zone ID to delete',
|
|
8
|
+
required: true,
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Delete a DNS zone';
|
|
12
|
+
static examples = [
|
|
13
|
+
`<%= config.bin %> <%= command.id %> zone-123
|
|
14
|
+
Deletes the DNS zone with ID zone-123
|
|
15
|
+
`,
|
|
16
|
+
`<%= config.bin %> <%= command.id %> zone-456 --force
|
|
17
|
+
Deletes the DNS zone without confirmation prompt
|
|
18
|
+
`,
|
|
19
|
+
];
|
|
20
|
+
static flags = {
|
|
21
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
22
|
+
force: Flags.boolean({
|
|
23
|
+
char: 'f',
|
|
24
|
+
description: 'Skip confirmation prompt',
|
|
25
|
+
default: false,
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { client: dnsService, userId, organizationId } = await this.dnsService();
|
|
30
|
+
try {
|
|
31
|
+
// Unless forced, ask for confirmation
|
|
32
|
+
if (!this.flags.force) {
|
|
33
|
+
const shouldDelete = await confirm({
|
|
34
|
+
message: `Are you sure you want to delete zone ${this.args.zoneId}? This action cannot be undone.`,
|
|
35
|
+
default: false,
|
|
36
|
+
});
|
|
37
|
+
if (!shouldDelete) {
|
|
38
|
+
this.log('Deletion cancelled');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
this.log(`Deleting DNS zone ${this.args.zoneId}...`);
|
|
43
|
+
const response = await dnsService.deleteDNSZone({
|
|
44
|
+
organizationId,
|
|
45
|
+
userId,
|
|
46
|
+
zoneId: this.args.zoneId,
|
|
47
|
+
});
|
|
48
|
+
if (response.success) {
|
|
49
|
+
this.log(`✅ DNS zone ${this.args.zoneId} deleted successfully`);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.error('Failed to delete DNS zone', { exit: 1 });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
this.error(`Failed to delete DNS zone: ${error}`, { exit: 1 });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Get extends BaseCommand<typeof Get> {
|
|
3
|
+
static args: {
|
|
4
|
+
zoneId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/commands/dns/get.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAwC;IAE1D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAQV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0F3B"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
export default class Get extends BaseCommand {
|
|
4
|
+
static args = {
|
|
5
|
+
zoneId: Args.string({
|
|
6
|
+
description: 'Zone ID to get details for',
|
|
7
|
+
required: true,
|
|
8
|
+
}),
|
|
9
|
+
};
|
|
10
|
+
static description = 'Get details of a specific DNS zone';
|
|
11
|
+
static examples = [
|
|
12
|
+
`<%= config.bin %> <%= command.id %> zone-123
|
|
13
|
+
Shows details for DNS zone with ID zone-123
|
|
14
|
+
`,
|
|
15
|
+
`<%= config.bin %> <%= command.id %> zone-456 --output json
|
|
16
|
+
Shows zone details in JSON format
|
|
17
|
+
`,
|
|
18
|
+
];
|
|
19
|
+
static flags = {
|
|
20
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
21
|
+
output: Flags.string({
|
|
22
|
+
char: 'o',
|
|
23
|
+
description: 'output format',
|
|
24
|
+
default: 'text',
|
|
25
|
+
options: ['text', 'json'],
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { client: dnsService, userId, organizationId } = await this.dnsService();
|
|
30
|
+
try {
|
|
31
|
+
const response = await dnsService.getDNSZone({
|
|
32
|
+
organizationId,
|
|
33
|
+
userId,
|
|
34
|
+
zoneId: this.args.zoneId,
|
|
35
|
+
});
|
|
36
|
+
if (!response.zone) {
|
|
37
|
+
this.error(`DNS zone ${this.args.zoneId} not found`, { exit: 1 });
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
switch (this.flags.output) {
|
|
41
|
+
case 'json':
|
|
42
|
+
console.log(JSON.stringify({
|
|
43
|
+
zone: {
|
|
44
|
+
zoneId: response.zone.zoneId,
|
|
45
|
+
organizationId: response.zone.organizationId,
|
|
46
|
+
fullyQualifiedDomainName: response.zone.fullyQualifiedDomainName,
|
|
47
|
+
zoneType: response.zone.zoneType,
|
|
48
|
+
status: response.zone.status,
|
|
49
|
+
nameServers: response.zone.nameServers,
|
|
50
|
+
cloudflareZoneId: response.zone.cloudflareZoneId,
|
|
51
|
+
cloudflareAccountId: response.zone.cloudflareAccountId,
|
|
52
|
+
description: response.zone.description,
|
|
53
|
+
createdAt: response.zone.createdAt,
|
|
54
|
+
updatedAt: response.zone.updatedAt,
|
|
55
|
+
tags: response.zone.tags,
|
|
56
|
+
verificationKey: response.zone.verificationKey,
|
|
57
|
+
},
|
|
58
|
+
}, null, 2));
|
|
59
|
+
break;
|
|
60
|
+
case 'text':
|
|
61
|
+
default:
|
|
62
|
+
this.log('DNS Zone Details\n');
|
|
63
|
+
this.log(`Zone ID: ${response.zone.zoneId}`);
|
|
64
|
+
this.log(`Domain: ${response.zone.fullyQualifiedDomainName}`);
|
|
65
|
+
this.log(`Status: ${response.zone.status}`);
|
|
66
|
+
this.log(`Type: ${response.zone.zoneType || 'custom'}`);
|
|
67
|
+
if (response.zone.nameServers && response.zone.nameServers.length > 0) {
|
|
68
|
+
this.log('\nNameservers:');
|
|
69
|
+
for (const ns of response.zone.nameServers) {
|
|
70
|
+
this.log(` - ${ns}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (response.zone.verificationKey) {
|
|
74
|
+
this.log(`\nVerification Key: ${response.zone.verificationKey}`);
|
|
75
|
+
}
|
|
76
|
+
if (response.zone.description) {
|
|
77
|
+
this.log(`\nDescription: ${response.zone.description}`);
|
|
78
|
+
}
|
|
79
|
+
if (response.zone.tags && response.zone.tags.length > 0) {
|
|
80
|
+
this.log(`\nTags: ${response.zone.tags.join(', ')}`);
|
|
81
|
+
}
|
|
82
|
+
if (response.zone.cloudflareZoneId) {
|
|
83
|
+
this.log(`\nCloudFlare Zone ID: ${response.zone.cloudflareZoneId}`);
|
|
84
|
+
}
|
|
85
|
+
if (response.zone.cloudflareAccountId) {
|
|
86
|
+
this.log(`CloudFlare Account ID: ${response.zone.cloudflareAccountId}`);
|
|
87
|
+
}
|
|
88
|
+
if (response.zone.createdAt) {
|
|
89
|
+
this.log(`\nCreated: ${response.zone.createdAt}`);
|
|
90
|
+
}
|
|
91
|
+
if (response.zone.updatedAt) {
|
|
92
|
+
this.log(`Updated: ${response.zone.updatedAt}`);
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
this.error(`Failed to get DNS zone: ${error}`, { exit: 1 });
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class List extends BaseCommand<typeof List> {
|
|
3
|
+
static args: {};
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
pageSize: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
pageToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
zoneType: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/dns/list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAA0C;IAE5D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MAmBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0F3B"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
export default class List extends BaseCommand {
|
|
4
|
+
static args = {};
|
|
5
|
+
static description = 'List DNS zones for your organization';
|
|
6
|
+
static examples = [
|
|
7
|
+
`<%= config.bin %> <%= command.id %>
|
|
8
|
+
Lists all DNS zones in your organization
|
|
9
|
+
`,
|
|
10
|
+
`<%= config.bin %> <%= command.id %> --output json
|
|
11
|
+
Lists all DNS zones in JSON format
|
|
12
|
+
`,
|
|
13
|
+
];
|
|
14
|
+
static flags = {
|
|
15
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
16
|
+
output: Flags.string({
|
|
17
|
+
char: 'o',
|
|
18
|
+
description: 'output format',
|
|
19
|
+
default: 'table',
|
|
20
|
+
options: ['text', 'table', 'json'],
|
|
21
|
+
}),
|
|
22
|
+
pageSize: Flags.integer({
|
|
23
|
+
description: 'number of zones to return per page',
|
|
24
|
+
default: 20,
|
|
25
|
+
}),
|
|
26
|
+
pageToken: Flags.string({
|
|
27
|
+
description: 'page token for pagination',
|
|
28
|
+
}),
|
|
29
|
+
zoneType: Flags.string({
|
|
30
|
+
description: 'filter by zone type',
|
|
31
|
+
options: ['custom', 'tenant'],
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { client: dnsService, userId, organizationId } = await this.dnsService();
|
|
36
|
+
try {
|
|
37
|
+
const response = await dnsService.listDNSZones({
|
|
38
|
+
organizationId,
|
|
39
|
+
userId,
|
|
40
|
+
pageSize: this.flags.pageSize,
|
|
41
|
+
pageToken: this.flags.pageToken,
|
|
42
|
+
zoneType: this.flags.zoneType,
|
|
43
|
+
});
|
|
44
|
+
if (!response.zones || response.zones.length === 0) {
|
|
45
|
+
this.log('No DNS zones found');
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
switch (this.flags.output) {
|
|
49
|
+
case 'text':
|
|
50
|
+
for (const zone of response.zones) {
|
|
51
|
+
this.log(`${zone.fullyQualifiedDomainName} (${zone.zoneId})`);
|
|
52
|
+
this.log(` Status: ${zone.status}`);
|
|
53
|
+
this.log(` Type: ${zone.zoneType}`);
|
|
54
|
+
if (zone.nameServers && zone.nameServers.length > 0) {
|
|
55
|
+
this.log(` Nameservers: ${zone.nameServers.join(', ')}`);
|
|
56
|
+
}
|
|
57
|
+
if (zone.description) {
|
|
58
|
+
this.log(` Description: ${zone.description}`);
|
|
59
|
+
}
|
|
60
|
+
this.log('');
|
|
61
|
+
}
|
|
62
|
+
if (response.nextPageToken) {
|
|
63
|
+
this.log(`Next page token: ${response.nextPageToken}`);
|
|
64
|
+
}
|
|
65
|
+
if (response.totalCount !== undefined) {
|
|
66
|
+
this.log(`Total zones: ${response.totalCount}`);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
case 'json':
|
|
70
|
+
console.log(JSON.stringify({
|
|
71
|
+
zones: response.zones.map((zone) => ({
|
|
72
|
+
zoneId: zone.zoneId,
|
|
73
|
+
organizationId: zone.organizationId,
|
|
74
|
+
fullyQualifiedDomainName: zone.fullyQualifiedDomainName,
|
|
75
|
+
verificationKey: zone.verificationKey,
|
|
76
|
+
zoneType: zone.zoneType,
|
|
77
|
+
status: zone.status,
|
|
78
|
+
nameServers: zone.nameServers,
|
|
79
|
+
cloudflareZoneId: zone.cloudflareZoneId,
|
|
80
|
+
cloudflareAccountId: zone.cloudflareAccountId,
|
|
81
|
+
description: zone.description,
|
|
82
|
+
createdAt: zone.createdAt,
|
|
83
|
+
updatedAt: zone.updatedAt,
|
|
84
|
+
tags: zone.tags,
|
|
85
|
+
})),
|
|
86
|
+
nextPageToken: response.nextPageToken,
|
|
87
|
+
totalCount: response.totalCount,
|
|
88
|
+
}, null, 2));
|
|
89
|
+
break;
|
|
90
|
+
case 'table':
|
|
91
|
+
console.table(response.zones.map((zone) => ({
|
|
92
|
+
Domain: zone.fullyQualifiedDomainName,
|
|
93
|
+
'Zone ID': zone.zoneId,
|
|
94
|
+
Type: zone.zoneType || 'custom',
|
|
95
|
+
Status: zone.status,
|
|
96
|
+
Nameservers: zone.nameServers?.join(', ') || '',
|
|
97
|
+
Description: zone.description || '',
|
|
98
|
+
})));
|
|
99
|
+
if (response.nextPageToken) {
|
|
100
|
+
this.log(`\nNext page token: ${response.nextPageToken}`);
|
|
101
|
+
}
|
|
102
|
+
if (response.totalCount !== undefined) {
|
|
103
|
+
this.log(`Total zones: ${response.totalCount}`);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
this.error(`Failed to list DNS zones: ${error}`, { exit: 1 });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command.js';
|
|
2
|
+
export default class Create extends BaseCommand<typeof Create> {
|
|
3
|
+
static args: {
|
|
4
|
+
zoneId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
type: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
content: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static description: string;
|
|
10
|
+
static examples: string[];
|
|
11
|
+
static flags: {
|
|
12
|
+
ttl: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
priority: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
proxied: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
comment: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
tags: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
24
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
25
|
+
};
|
|
26
|
+
run(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../src/commands/dns/records/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;;;;MAiBT;IAEF,MAAM,CAAC,WAAW,SAA6B;IAE/C,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;MA4BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuF3B"}
|