@liquidmetal-ai/raindrop 0.6.3 → 0.7.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.
Files changed (85) hide show
  1. package/README.md +436 -80
  2. package/dist/base-command.d.ts +7 -1
  3. package/dist/base-command.d.ts.map +1 -1
  4. package/dist/base-command.js +29 -11
  5. package/dist/codegen.d.ts.map +1 -1
  6. package/dist/codegen.js +3 -0
  7. package/dist/codegen.test.js +15 -1
  8. package/dist/commands/annotation/get.js +1 -1
  9. package/dist/commands/annotation/list.d.ts.map +1 -1
  10. package/dist/commands/annotation/list.js +1 -9
  11. package/dist/commands/annotation/put.js +1 -1
  12. package/dist/commands/build/checkout.d.ts +17 -0
  13. package/dist/commands/build/checkout.d.ts.map +1 -1
  14. package/dist/commands/build/checkout.js +140 -7
  15. package/dist/commands/build/delete.d.ts +15 -0
  16. package/dist/commands/build/delete.d.ts.map +1 -1
  17. package/dist/commands/build/delete.js +130 -0
  18. package/dist/commands/dns/create.d.ts +25 -0
  19. package/dist/commands/dns/create.d.ts.map +1 -0
  20. package/dist/commands/dns/create.js +116 -0
  21. package/dist/commands/dns/delete.d.ts +20 -0
  22. package/dist/commands/dns/delete.d.ts.map +1 -0
  23. package/dist/commands/dns/delete.js +62 -0
  24. package/dist/commands/dns/get.d.ts +20 -0
  25. package/dist/commands/dns/get.d.ts.map +1 -0
  26. package/dist/commands/dns/get.js +144 -0
  27. package/dist/commands/dns/list.d.ts +21 -0
  28. package/dist/commands/dns/list.d.ts.map +1 -0
  29. package/dist/commands/dns/list.js +195 -0
  30. package/dist/commands/dns/records/create.d.ts +28 -0
  31. package/dist/commands/dns/records/create.d.ts.map +1 -0
  32. package/dist/commands/dns/records/create.js +140 -0
  33. package/dist/commands/dns/records/delete.d.ts +21 -0
  34. package/dist/commands/dns/records/delete.d.ts.map +1 -0
  35. package/dist/commands/dns/records/delete.js +64 -0
  36. package/dist/commands/dns/records/get.d.ts +21 -0
  37. package/dist/commands/dns/records/get.d.ts.map +1 -0
  38. package/dist/commands/dns/records/get.js +102 -0
  39. package/dist/commands/dns/records/list.d.ts +24 -0
  40. package/dist/commands/dns/records/list.d.ts.map +1 -0
  41. package/dist/commands/dns/records/list.js +132 -0
  42. package/dist/commands/dns/records/update.d.ts +29 -0
  43. package/dist/commands/dns/records/update.d.ts.map +1 -0
  44. package/dist/commands/dns/records/update.js +137 -0
  45. package/dist/commands/mcp/install-claude.d.ts.map +1 -1
  46. package/dist/commands/mcp/install-claude.js +3 -1
  47. package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
  48. package/dist/commands/mcp/install-gemini.js +3 -1
  49. package/dist/commands/mcp/install-goose.d.ts +22 -0
  50. package/dist/commands/mcp/install-goose.d.ts.map +1 -0
  51. package/dist/commands/mcp/install-goose.js +254 -0
  52. package/dist/commands/object/delete.d.ts +1 -0
  53. package/dist/commands/object/delete.d.ts.map +1 -1
  54. package/dist/commands/object/delete.js +100 -11
  55. package/dist/commands/object/get.d.ts +1 -0
  56. package/dist/commands/object/get.d.ts.map +1 -1
  57. package/dist/commands/object/get.js +99 -14
  58. package/dist/commands/object/list.d.ts +1 -0
  59. package/dist/commands/object/list.d.ts.map +1 -1
  60. package/dist/commands/object/list.js +103 -10
  61. package/dist/commands/object/put.d.ts +1 -0
  62. package/dist/commands/object/put.d.ts.map +1 -1
  63. package/dist/commands/object/put.js +100 -11
  64. package/dist/index.d.ts +2 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +37 -4
  67. package/dist/index.test.js +54 -2
  68. package/dist/lib/dns-utils.d.ts +7 -0
  69. package/dist/lib/dns-utils.d.ts.map +1 -0
  70. package/dist/lib/dns-utils.js +44 -0
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/oclif.manifest.json +4041 -2068
  73. package/package.json +3 -3
  74. package/templates/claude-code/new-raindrop-app.md +6 -2
  75. package/templates/claude-code/raindrop-guidelines.md +219 -24
  76. package/templates/db/node_modules/.bin/prisma +2 -2
  77. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  78. package/templates/db/node_modules/.bin/tsc +2 -2
  79. package/templates/db/node_modules/.bin/tsserver +2 -2
  80. package/templates/db/node_modules/.bin/zx +2 -2
  81. package/templates/gemini-code/new-raindrop-app.toml +4 -1
  82. package/templates/gemini-code/raindrop-guidelines.md +219 -24
  83. package/templates/goose/new-raindrop-app.yaml +16 -0
  84. package/templates/goose/reattach-raindrop-session.yaml +13 -0
  85. package/templates/goose/update-raindrop-app.yaml +13 -0
@@ -0,0 +1,195 @@
1
+ import { Flags } from '@oclif/core';
2
+ import chalk from 'chalk';
3
+ import { BaseCommand } from '../../base-command.js';
4
+ export default class List extends BaseCommand {
5
+ static args = {};
6
+ static description = 'List DNS zones for your organization';
7
+ static examples = [
8
+ `<%= config.bin %> <%= command.id %>
9
+ Lists all DNS zones in compact format (default)
10
+
11
+ <%= config.bin %> <%= command.id %> --output table
12
+ Lists all DNS zones in table format
13
+
14
+ <%= config.bin %> <%= command.id %> --output text
15
+ Lists all DNS zones with detailed information
16
+
17
+ <%= config.bin %> <%= command.id %> --output json
18
+ Lists all DNS zones in JSON format
19
+
20
+ <%= config.bin %> <%= command.id %> --zone-type custom
21
+ Lists only custom DNS zones
22
+
23
+ <%= config.bin %> <%= command.id %> --page-size 10
24
+ Lists DNS zones with pagination (10 per page)
25
+ `,
26
+ ];
27
+ static flags = {
28
+ ...BaseCommand.HIDDEN_FLAGS,
29
+ output: Flags.string({
30
+ char: 'o',
31
+ description: 'output format',
32
+ default: 'compact',
33
+ options: ['text', 'table', 'json', 'compact'],
34
+ }),
35
+ pageSize: Flags.integer({
36
+ description: 'number of zones to return per page',
37
+ default: 20,
38
+ }),
39
+ pageToken: Flags.string({
40
+ description: 'page token for pagination',
41
+ }),
42
+ zoneType: Flags.string({
43
+ description: 'filter by zone type',
44
+ options: ['custom', 'tenant'],
45
+ }),
46
+ };
47
+ async run() {
48
+ const { client: dnsService, userId, organizationId } = await this.dnsService();
49
+ try {
50
+ const response = await dnsService.listDNSZones({
51
+ organizationId,
52
+ userId,
53
+ pageSize: this.flags.pageSize,
54
+ pageToken: this.flags.pageToken,
55
+ zoneType: this.flags.zoneType,
56
+ });
57
+ if (!response.zones || response.zones.length === 0) {
58
+ this.log(chalk.dim('No DNS zones found in this organization'));
59
+ this.log(chalk.dim('Create a new DNS zone with: raindrop dns create <domain>'));
60
+ return;
61
+ }
62
+ switch (this.flags.output) {
63
+ case 'compact':
64
+ // Compact view similar to build list
65
+ for (const zone of response.zones) {
66
+ // Status color coding
67
+ let statusColor;
68
+ if (zone.status === 'active') {
69
+ statusColor = chalk.green;
70
+ }
71
+ else if (zone.status === 'pending') {
72
+ statusColor = chalk.yellow;
73
+ }
74
+ else if (zone.status === 'error') {
75
+ statusColor = chalk.red;
76
+ }
77
+ else {
78
+ statusColor = chalk.gray;
79
+ }
80
+ const createdAt = zone.createdAt ?
81
+ new Date(zone.createdAt).toLocaleDateString() :
82
+ 'N/A';
83
+ // Show domain name with type info
84
+ const typeInfo = zone.zoneType && zone.zoneType !== 'custom' ?
85
+ chalk.dim(` (${zone.zoneType})`) : '';
86
+ console.log(`\n${chalk.bold(zone.fullyQualifiedDomainName)}${typeInfo}`);
87
+ console.log(` └─ ${statusColor(zone.status || 'unknown')} - ${chalk.dim(createdAt)}`);
88
+ // Show nameservers if available
89
+ if (zone.nameServers && zone.nameServers.length > 0) {
90
+ const nsDisplay = zone.nameServers.length > 2
91
+ ? `${zone.nameServers.slice(0, 2).join(', ')} (+${zone.nameServers.length - 2} more)`
92
+ : zone.nameServers.join(', ');
93
+ console.log(` ${chalk.dim(`NS: ${nsDisplay}`)}`);
94
+ }
95
+ // Show description if available
96
+ if (zone.description) {
97
+ const desc = zone.description.length > 60
98
+ ? zone.description.substring(0, 57) + '...'
99
+ : zone.description;
100
+ console.log(` ${chalk.dim(desc)}`);
101
+ }
102
+ }
103
+ // Add summary at the end like build list
104
+ console.log('');
105
+ console.log(chalk.dim('─'.repeat(50)));
106
+ console.log(chalk.dim(`Total: ${response.zones.length} DNS zones`));
107
+ break;
108
+ case 'text':
109
+ for (const zone of response.zones) {
110
+ // Status color coding
111
+ let statusColor;
112
+ if (zone.status === 'active') {
113
+ statusColor = chalk.green;
114
+ }
115
+ else if (zone.status === 'pending') {
116
+ statusColor = chalk.yellow;
117
+ }
118
+ else if (zone.status === 'error') {
119
+ statusColor = chalk.red;
120
+ }
121
+ else {
122
+ statusColor = chalk.gray;
123
+ }
124
+ // Format creation date if available
125
+ const createdAt = zone.createdAt ?
126
+ new Date(zone.createdAt).toLocaleDateString() :
127
+ 'N/A';
128
+ console.log(`Domain: ${chalk.bold(zone.fullyQualifiedDomainName)}`);
129
+ console.log(` Status: ${statusColor(zone.status || 'unknown')}`);
130
+ console.log(` Type: ${chalk.cyan(zone.zoneType || 'custom')}`);
131
+ console.log(` Created: ${chalk.dim(createdAt)}`);
132
+ if (zone.nameServers && zone.nameServers.length > 0) {
133
+ console.log(` Nameservers:`);
134
+ for (const ns of zone.nameServers) {
135
+ console.log(` - ${chalk.dim(ns)}`);
136
+ }
137
+ }
138
+ if (zone.description) {
139
+ console.log(` Description: ${zone.description}`);
140
+ }
141
+ if (zone.tags && zone.tags.length > 0) {
142
+ console.log(` Tags: ${chalk.magenta(zone.tags.join(', '))}`);
143
+ }
144
+ console.log(chalk.dim('─'.repeat(50)));
145
+ }
146
+ // Summary information
147
+ if (response.nextPageToken) {
148
+ this.log(chalk.dim(`\nNext page token: ${response.nextPageToken}`));
149
+ }
150
+ this.log(chalk.bold(`\nTotal DNS zones: ${response.zones.length}`));
151
+ break;
152
+ case 'json':
153
+ console.log(JSON.stringify({
154
+ zones: response.zones.map((zone) => ({
155
+ organizationId: zone.organizationId,
156
+ fullyQualifiedDomainName: zone.fullyQualifiedDomainName,
157
+ verificationKey: zone.verificationKey,
158
+ zoneType: zone.zoneType,
159
+ status: zone.status,
160
+ nameServers: zone.nameServers,
161
+ description: zone.description,
162
+ createdAt: zone.createdAt,
163
+ updatedAt: zone.updatedAt,
164
+ tags: zone.tags,
165
+ })),
166
+ nextPageToken: response.nextPageToken,
167
+ totalCount: response.totalCount,
168
+ }, null, 2));
169
+ break;
170
+ case 'table':
171
+ console.table(response.zones.map((zone) => ({
172
+ Domain: zone.fullyQualifiedDomainName,
173
+ Type: zone.zoneType || 'custom',
174
+ Status: zone.status || 'unknown',
175
+ Created: zone.createdAt ?
176
+ new Date(zone.createdAt).toLocaleDateString() :
177
+ 'N/A',
178
+ Nameservers: zone.nameServers?.slice(0, 2).join(', ') +
179
+ (zone.nameServers && zone.nameServers.length > 2 ? '...' : '') || '',
180
+ Description: zone.description ? zone.description.substring(0, 30) +
181
+ (zone.description.length > 30 ? '...' : '') : '',
182
+ })));
183
+ // Summary information with consistent styling
184
+ if (response.nextPageToken) {
185
+ this.log(chalk.dim(`\nNext page token: ${response.nextPageToken}`));
186
+ }
187
+ this.log(chalk.bold(`\nTotal DNS zones: ${response.zones.length}`));
188
+ break;
189
+ }
190
+ }
191
+ catch (error) {
192
+ this.error(`Failed to list DNS zones: ${error}`, { exit: 1 });
193
+ }
194
+ }
195
+ }
@@ -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"}
@@ -0,0 +1,140 @@
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
+ zoneId: Args.string({
6
+ description: 'Zone ID to create record in',
7
+ required: true,
8
+ }),
9
+ type: Args.string({
10
+ description: 'Record type (A, AAAA, CNAME, MX, TXT, NS, etc.)',
11
+ required: true,
12
+ }),
13
+ name: Args.string({
14
+ description: 'Record name (e.g., www, @, subdomain)',
15
+ required: true,
16
+ }),
17
+ content: Args.string({
18
+ description: 'Record content (IP address, domain, text value, etc.)',
19
+ required: true,
20
+ }),
21
+ };
22
+ static description = 'Create a new DNS record';
23
+ static examples = [
24
+ `<%= config.bin %> <%= command.id %> zone-123 A www 192.0.2.1
25
+ Creates an A record for www pointing to 192.0.2.1
26
+ `,
27
+ `<%= config.bin %> <%= command.id %> zone-123 MX @ mail.example.com --priority 10
28
+ Creates an MX record with priority 10
29
+ `,
30
+ `<%= config.bin %> <%= command.id %> zone-123 TXT @ "v=spf1 include:_spf.google.com ~all"
31
+ Creates a TXT record for SPF
32
+ `,
33
+ ];
34
+ static flags = {
35
+ ...BaseCommand.HIDDEN_FLAGS,
36
+ ttl: Flags.integer({
37
+ description: 'Time to live in seconds (1 = automatic)',
38
+ default: 1,
39
+ }),
40
+ priority: Flags.integer({
41
+ char: 'p',
42
+ description: 'Priority (for MX and SRV records)',
43
+ }),
44
+ proxied: Flags.boolean({
45
+ description: 'Whether the record should be proxied through CloudFlare',
46
+ default: false,
47
+ }),
48
+ comment: Flags.string({
49
+ char: 'c',
50
+ description: 'Comment for the record',
51
+ }),
52
+ tags: Flags.string({
53
+ description: 'Comma-separated list of tags',
54
+ multiple: true,
55
+ }),
56
+ output: Flags.string({
57
+ char: 'o',
58
+ description: 'output format',
59
+ default: 'text',
60
+ options: ['text', 'json'],
61
+ }),
62
+ };
63
+ async run() {
64
+ const { client: dnsService, userId, organizationId } = await this.dnsService();
65
+ try {
66
+ // Validate record type
67
+ const validTypes = ['A', 'AAAA', 'CNAME', 'MX', 'TXT', 'NS', 'SOA', 'SRV', 'CAA', 'PTR'];
68
+ if (!validTypes.includes(this.args.type.toUpperCase())) {
69
+ this.warn(`Record type ${this.args.type} may not be supported`);
70
+ }
71
+ // Validate priority for MX records
72
+ if (this.args.type.toUpperCase() === 'MX' && this.flags.priority === undefined) {
73
+ this.error('MX records require a priority value', { exit: 1 });
74
+ }
75
+ this.log(`Creating ${this.args.type} record...`);
76
+ const response = await dnsService.createDNSRecord({
77
+ organizationId,
78
+ userId,
79
+ zoneId: this.args.zoneId,
80
+ type: this.args.type.toUpperCase(),
81
+ name: this.args.name,
82
+ content: this.args.content,
83
+ ttl: this.flags.ttl,
84
+ priority: this.flags.priority,
85
+ proxied: this.flags.proxied,
86
+ comment: this.flags.comment,
87
+ tags: this.flags.tags || [],
88
+ });
89
+ if (!response.record) {
90
+ this.error('Failed to create DNS record: No record returned', { exit: 1 });
91
+ return;
92
+ }
93
+ switch (this.flags.output) {
94
+ case 'json':
95
+ console.log(JSON.stringify({
96
+ record: {
97
+ recordId: response.record.recordId,
98
+ zoneId: response.record.zoneId,
99
+ name: response.record.name,
100
+ type: response.record.type,
101
+ content: response.record.content,
102
+ ttl: response.record.ttl,
103
+ priority: response.record.priority,
104
+ proxied: response.record.proxied,
105
+ cloudflareRecordId: response.record.cloudflareRecordId,
106
+ comment: response.record.comment,
107
+ tags: response.record.tags,
108
+ createdAt: response.record.createdAt,
109
+ updatedAt: response.record.updatedAt,
110
+ }
111
+ }, null, 2));
112
+ break;
113
+ case 'text':
114
+ default:
115
+ this.log('\n✅ DNS record created successfully!\n');
116
+ this.log(`Record ID: ${response.record.recordId}`);
117
+ this.log(`Name: ${response.record.name}`);
118
+ this.log(`Type: ${response.record.type}`);
119
+ this.log(`Content: ${response.record.content}`);
120
+ this.log(`TTL: ${response.record.ttl === 1 ? 'Auto' : `${response.record.ttl} seconds`}`);
121
+ if (response.record.priority !== undefined) {
122
+ this.log(`Priority: ${response.record.priority}`);
123
+ }
124
+ if (response.record.proxied !== undefined) {
125
+ this.log(`Proxied: ${response.record.proxied ? 'Yes' : 'No'}`);
126
+ }
127
+ if (response.record.comment) {
128
+ this.log(`Comment: ${response.record.comment}`);
129
+ }
130
+ if (response.record.tags && response.record.tags.length > 0) {
131
+ this.log(`Tags: ${response.record.tags.join(', ')}`);
132
+ }
133
+ break;
134
+ }
135
+ }
136
+ catch (error) {
137
+ this.error(`Failed to create DNS record: ${error}`, { exit: 1 });
138
+ }
139
+ }
140
+ }
@@ -0,0 +1,21 @@
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
+ recordId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static description: string;
8
+ static examples: string[];
9
+ static flags: {
10
+ force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
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=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/commands/dns/records/delete.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;;MAST;IAEF,MAAM,CAAC,WAAW,SAAyB;IAE3C,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAOV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmC3B"}
@@ -0,0 +1,64 @@
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 containing the record',
8
+ required: true,
9
+ }),
10
+ recordId: Args.string({
11
+ description: 'Record ID to delete',
12
+ required: true,
13
+ }),
14
+ };
15
+ static description = 'Delete a DNS record';
16
+ static examples = [
17
+ `<%= config.bin %> <%= command.id %> zone-123 record-456
18
+ Deletes the DNS record with ID record-456 from zone-123
19
+ `,
20
+ `<%= config.bin %> <%= command.id %> zone-123 record-789 --force
21
+ Deletes the DNS record without confirmation prompt
22
+ `,
23
+ ];
24
+ static flags = {
25
+ ...BaseCommand.HIDDEN_FLAGS,
26
+ force: Flags.boolean({
27
+ char: 'f',
28
+ description: 'Skip confirmation prompt',
29
+ default: false,
30
+ }),
31
+ };
32
+ async run() {
33
+ const { client: dnsService, userId, organizationId } = await this.dnsService();
34
+ try {
35
+ // Unless forced, ask for confirmation
36
+ if (!this.flags.force) {
37
+ const shouldDelete = await confirm({
38
+ message: `Are you sure you want to delete record ${this.args.recordId}? This action cannot be undone.`,
39
+ default: false,
40
+ });
41
+ if (!shouldDelete) {
42
+ this.log('Deletion cancelled');
43
+ return;
44
+ }
45
+ }
46
+ this.log(`Deleting DNS record ${this.args.recordId}...`);
47
+ const response = await dnsService.deleteDNSRecord({
48
+ organizationId,
49
+ userId,
50
+ zoneId: this.args.zoneId,
51
+ recordId: this.args.recordId,
52
+ });
53
+ if (response.success) {
54
+ this.log(`✅ DNS record ${this.args.recordId} deleted successfully`);
55
+ }
56
+ else {
57
+ this.error('Failed to delete DNS record', { exit: 1 });
58
+ }
59
+ }
60
+ catch (error) {
61
+ this.error(`Failed to delete DNS record: ${error}`, { exit: 1 });
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,21 @@
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
+ recordId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static description: string;
8
+ static examples: string[];
9
+ static flags: {
10
+ output: import("@oclif/core/interfaces").OptionFlag<string, 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=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/commands/dns/records/get.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;;MAST;IAEF,MAAM,CAAC,WAAW,SAA0C;IAE5D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAQV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAgF3B"}
@@ -0,0 +1,102 @@
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 containing the record',
7
+ required: true,
8
+ }),
9
+ recordId: Args.string({
10
+ description: 'Record ID to get details for',
11
+ required: true,
12
+ }),
13
+ };
14
+ static description = 'Get details of a specific DNS record';
15
+ static examples = [
16
+ `<%= config.bin %> <%= command.id %> zone-123 record-456
17
+ Shows details for DNS record with ID record-456
18
+ `,
19
+ `<%= config.bin %> <%= command.id %> zone-123 record-789 --output json
20
+ Shows record details in JSON format
21
+ `,
22
+ ];
23
+ static flags = {
24
+ ...BaseCommand.HIDDEN_FLAGS,
25
+ output: Flags.string({
26
+ char: 'o',
27
+ description: 'output format',
28
+ default: 'text',
29
+ options: ['text', 'json'],
30
+ }),
31
+ };
32
+ async run() {
33
+ const { client: dnsService, userId, organizationId } = await this.dnsService();
34
+ try {
35
+ const response = await dnsService.getDNSRecord({
36
+ organizationId,
37
+ userId,
38
+ zoneId: this.args.zoneId,
39
+ recordId: this.args.recordId,
40
+ });
41
+ if (!response.record) {
42
+ this.error(`DNS record ${this.args.recordId} not found`, { exit: 1 });
43
+ return;
44
+ }
45
+ switch (this.flags.output) {
46
+ case 'json':
47
+ console.log(JSON.stringify({
48
+ record: {
49
+ recordId: response.record.recordId,
50
+ zoneId: response.record.zoneId,
51
+ name: response.record.name,
52
+ type: response.record.type,
53
+ content: response.record.content,
54
+ ttl: response.record.ttl,
55
+ priority: response.record.priority,
56
+ proxied: response.record.proxied,
57
+ cloudflareRecordId: response.record.cloudflareRecordId,
58
+ comment: response.record.comment,
59
+ tags: response.record.tags,
60
+ createdAt: response.record.createdAt,
61
+ updatedAt: response.record.updatedAt,
62
+ }
63
+ }, null, 2));
64
+ break;
65
+ case 'text':
66
+ default:
67
+ this.log('DNS Record Details\n');
68
+ this.log(`Record ID: ${response.record.recordId}`);
69
+ this.log(`Zone ID: ${response.record.zoneId}`);
70
+ this.log(`Name: ${response.record.name}`);
71
+ this.log(`Type: ${response.record.type}`);
72
+ this.log(`Content: ${response.record.content}`);
73
+ this.log(`TTL: ${response.record.ttl === 1 ? 'Auto' : `${response.record.ttl} seconds`}`);
74
+ if (response.record.priority !== undefined) {
75
+ this.log(`Priority: ${response.record.priority}`);
76
+ }
77
+ if (response.record.proxied !== undefined) {
78
+ this.log(`Proxied: ${response.record.proxied ? 'Yes' : 'No'}`);
79
+ }
80
+ if (response.record.comment) {
81
+ this.log(`\nComment: ${response.record.comment}`);
82
+ }
83
+ if (response.record.tags && response.record.tags.length > 0) {
84
+ this.log(`\nTags: ${response.record.tags.join(', ')}`);
85
+ }
86
+ if (response.record.cloudflareRecordId) {
87
+ this.log(`\nCloudFlare Record ID: ${response.record.cloudflareRecordId}`);
88
+ }
89
+ if (response.record.createdAt) {
90
+ this.log(`\nCreated: ${response.record.createdAt}`);
91
+ }
92
+ if (response.record.updatedAt) {
93
+ this.log(`Updated: ${response.record.updatedAt}`);
94
+ }
95
+ break;
96
+ }
97
+ }
98
+ catch (error) {
99
+ this.error(`Failed to get DNS record: ${error}`, { exit: 1 });
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,24 @@
1
+ import { BaseCommand } from '../../../base-command.js';
2
+ export default class List extends BaseCommand<typeof List> {
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
+ type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ pageSize: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
13
+ pageToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
+ rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
21
+ };
22
+ run(): Promise<void>;
23
+ }
24
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/dns/records/list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAgC;IAElD,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;MAuBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkG3B"}