@liquidmetal-ai/raindrop 0.6.3 → 0.6.4
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 +402 -78
- package/dist/base-command.d.ts +7 -1
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +23 -5
- package/dist/commands/annotation/get.js +1 -1
- package/dist/commands/annotation/list.d.ts.map +1 -1
- package/dist/commands/annotation/list.js +1 -9
- package/dist/commands/annotation/put.js +1 -1
- 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 +116 -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 +62 -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 +144 -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 +195 -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/object/delete.d.ts +1 -0
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +91 -10
- package/dist/commands/object/get.d.ts +1 -0
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +90 -13
- package/dist/commands/object/list.d.ts +1 -0
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +94 -9
- package/dist/commands/object/put.d.ts +1 -0
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +91 -10
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/lib/dns-utils.d.ts +7 -0
- package/dist/lib/dns-utils.d.ts.map +1 -0
- package/dist/lib/dns-utils.js +44 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/oclif.manifest.json +3923 -2121
- package/package.json +3 -3
- package/templates/claude-code/raindrop-guidelines.md +219 -24
- package/templates/db/node_modules/.bin/prisma +2 -2
- package/templates/db/node_modules/.bin/prisma-kysely +2 -2
- package/templates/db/node_modules/.bin/tsc +2 -2
- package/templates/db/node_modules/.bin/tsserver +2 -2
- package/templates/db/node_modules/.bin/zx +2 -2
- package/templates/gemini-code/raindrop-guidelines.md +219 -24
package/dist/base-command.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Application } from '@liquidmetal-ai/drizzle/appify/build';
|
|
2
2
|
import { CatalogService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/catalog_pb';
|
|
3
|
+
import { DnsService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/dns_pb';
|
|
3
4
|
import { ObjectService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/object_pb';
|
|
4
5
|
import { RainbowAuthService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/rainbow_auth_pb';
|
|
5
6
|
import { SearchAgentService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/search_agent_pb';
|
|
@@ -43,6 +44,11 @@ export declare abstract class BaseCommand<T extends typeof Command> extends Comm
|
|
|
43
44
|
userId: string;
|
|
44
45
|
organizationId: string;
|
|
45
46
|
}>;
|
|
47
|
+
dnsService(configDir?: string): Promise<{
|
|
48
|
+
client: StrictClient<typeof DnsService>;
|
|
49
|
+
userId: string;
|
|
50
|
+
organizationId: string;
|
|
51
|
+
}>;
|
|
46
52
|
protected searchAgentService(): Promise<{
|
|
47
53
|
client: StrictClient<typeof SearchAgentService>;
|
|
48
54
|
organizationId: string;
|
|
@@ -53,7 +59,7 @@ export declare abstract class BaseCommand<T extends typeof Command> extends Comm
|
|
|
53
59
|
organizationId: string;
|
|
54
60
|
userId: string;
|
|
55
61
|
}>;
|
|
56
|
-
protected annotationService(
|
|
62
|
+
protected annotationService(): Promise<{
|
|
57
63
|
client: StrictClient<typeof AnnotationService>;
|
|
58
64
|
organizationId: string;
|
|
59
65
|
userId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,wDAAwD,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,8DAA8D,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,4DAA4D,CAAC;AAGjG,OAAO,EAAE,OAAO,EAAS,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,MAAM,EAA0B,MAAM,aAAa,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"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"}
|
package/dist/base-command.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Command, Flags } from '@oclif/core';
|
|
|
5
5
|
import * as fs from 'node:fs/promises';
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import { loadConfig, saveConfig } from './config.js';
|
|
8
|
-
import { catalogService, objectService, rainbowAuthService, searchAgentService, selectedOrganization, annotationService, eventStreamService, riverjackService, bucketApiService, } from './index.js';
|
|
8
|
+
import { catalogService, dnsService, objectService, rainbowAuthService, searchAgentService, selectedOrganization, annotationService, eventStreamService, riverjackService, bucketApiService, } from './index.js';
|
|
9
9
|
export class BaseCommand extends Command {
|
|
10
10
|
static HIDDEN_FLAGS = {
|
|
11
11
|
config: Flags.string({
|
|
@@ -141,12 +141,30 @@ export class BaseCommand extends Command {
|
|
|
141
141
|
enableSendVersion: this.flags.sendVersionMetadata === 'true',
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
|
+
async dnsService(configDir) {
|
|
145
|
+
if (this.flags.raindropCatalogService) {
|
|
146
|
+
this.log(`[DEBUG] Using dns-service: ${this.flags.raindropCatalogService}`);
|
|
147
|
+
}
|
|
148
|
+
return dnsService({
|
|
149
|
+
rainbowAuth: (await this.rainbowAuthService()).client,
|
|
150
|
+
configDir: configDir ?? this.config.configDir,
|
|
151
|
+
identity: await this.catalogIdentity(),
|
|
152
|
+
overrideAuthToken: this.flags.rainbowAuthToken,
|
|
153
|
+
logger: this,
|
|
154
|
+
enableSendVersion: this.flags.sendVersionMetadata === 'true',
|
|
155
|
+
});
|
|
156
|
+
}
|
|
144
157
|
async searchAgentService() {
|
|
145
158
|
const { client: rainbowAuth } = await this.rainbowAuthService();
|
|
159
|
+
const identity = await this.catalogIdentity();
|
|
160
|
+
const baseUrl = `https://tenapi.${urlifyOrganizationId(identity.organizationId)}.lmapp.run`;
|
|
146
161
|
const result = await searchAgentService({
|
|
147
162
|
rainbowAuth,
|
|
148
163
|
configDir: this.config.configDir,
|
|
149
|
-
identity:
|
|
164
|
+
identity: {
|
|
165
|
+
...identity,
|
|
166
|
+
baseUrl,
|
|
167
|
+
},
|
|
150
168
|
logger: this,
|
|
151
169
|
enableSendVersion: this.flags.sendVersionMetadata === 'true',
|
|
152
170
|
});
|
|
@@ -155,7 +173,7 @@ export class BaseCommand extends Command {
|
|
|
155
173
|
async objectService() {
|
|
156
174
|
const { client: rainbowAuth } = await this.rainbowAuthService();
|
|
157
175
|
const identity = await this.catalogIdentity();
|
|
158
|
-
const baseUrl = `https://
|
|
176
|
+
const baseUrl = `https://tenapi.${urlifyOrganizationId(identity.organizationId)}.lmapp.run`;
|
|
159
177
|
const result = await objectService({
|
|
160
178
|
rainbowAuth,
|
|
161
179
|
configDir: this.config.configDir,
|
|
@@ -168,10 +186,10 @@ export class BaseCommand extends Command {
|
|
|
168
186
|
});
|
|
169
187
|
return result;
|
|
170
188
|
}
|
|
171
|
-
async annotationService(
|
|
189
|
+
async annotationService() {
|
|
172
190
|
const { client: rainbowAuth } = await this.rainbowAuthService();
|
|
173
191
|
const identity = await this.catalogIdentity();
|
|
174
|
-
const baseUrl = `https://
|
|
192
|
+
const baseUrl = `https://tenapi.${urlifyOrganizationId(identity.organizationId)}.lmapp.run`;
|
|
175
193
|
const result = await annotationService({
|
|
176
194
|
rainbowAuth,
|
|
177
195
|
configDir: this.config.configDir,
|
|
@@ -85,7 +85,7 @@ Get annotation by partial MRN and output as JSON
|
|
|
85
85
|
this.error(`Invalid MRN format: ${error}`);
|
|
86
86
|
}
|
|
87
87
|
// Get annotation service client
|
|
88
|
-
const { client: annotationServiceClient, userId, organizationId, } = await this.annotationService(
|
|
88
|
+
const { client: annotationServiceClient, userId, organizationId, } = await this.annotationService();
|
|
89
89
|
try {
|
|
90
90
|
// Create annotation locator from MRN parts
|
|
91
91
|
const locator = create(AnnotationLocatorSchema, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/annotation/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAUpD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW,CAAC,OAAO,cAAc,CAAC;IAC5E,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,WAAW,SAAoC;IAEtD,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MA0BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/annotation/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAUpD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW,CAAC,OAAO,cAAc,CAAC;IAC5E,MAAM,CAAC,IAAI;;MAMT;IAEF,MAAM,CAAC,WAAW,SAAoC;IAEtD,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MA0BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuL3B"}
|
|
@@ -53,8 +53,6 @@ List annotations for a specific module using full MRN prefix in JSON format
|
|
|
53
53
|
async run() {
|
|
54
54
|
const { args, flags } = await this.parse(AnnotationList);
|
|
55
55
|
// Parse MRN prefix if provided to extract application info for service connection
|
|
56
|
-
let appName = '';
|
|
57
|
-
let versionId = '';
|
|
58
56
|
let mrnParts = {};
|
|
59
57
|
let fullMrnPrefix = args.mrnPrefix || '';
|
|
60
58
|
if (args.mrnPrefix) {
|
|
@@ -80,15 +78,11 @@ List annotations for a specific module using full MRN prefix in JSON format
|
|
|
80
78
|
try {
|
|
81
79
|
// Try to parse as full MRN first
|
|
82
80
|
mrnParts = parseMRN(fullMrnPrefix);
|
|
83
|
-
appName = mrnParts.applicationName;
|
|
84
|
-
versionId = mrnParts.versionId;
|
|
85
81
|
}
|
|
86
82
|
catch {
|
|
87
83
|
// If it fails, try to extract at least app:version from prefix
|
|
88
84
|
const parts = fullMrnPrefix.split(':');
|
|
89
85
|
if (parts.length >= 3 && parts[0] === 'annotation') {
|
|
90
|
-
appName = parts[1];
|
|
91
|
-
versionId = parts[2];
|
|
92
86
|
mrnParts = {
|
|
93
87
|
type: parts[0],
|
|
94
88
|
applicationName: parts[1],
|
|
@@ -119,8 +113,6 @@ List annotations for a specific module using full MRN prefix in JSON format
|
|
|
119
113
|
if (!configVersionId) {
|
|
120
114
|
this.error('Version ID not found in config. Run a build or deployment first to set the version.');
|
|
121
115
|
}
|
|
122
|
-
appName = manifestAppName;
|
|
123
|
-
versionId = configVersionId;
|
|
124
116
|
fullMrnPrefix = `annotation:${manifestAppName}:${configVersionId}`;
|
|
125
117
|
mrnParts = {
|
|
126
118
|
type: 'annotation',
|
|
@@ -129,7 +121,7 @@ List annotations for a specific module using full MRN prefix in JSON format
|
|
|
129
121
|
};
|
|
130
122
|
}
|
|
131
123
|
// Get annotation service client
|
|
132
|
-
const { client: annotationServiceClient, userId, organizationId, } = await this.annotationService(
|
|
124
|
+
const { client: annotationServiceClient, userId, organizationId, } = await this.annotationService();
|
|
133
125
|
try {
|
|
134
126
|
// Create annotation locator from MRN parts
|
|
135
127
|
const locator = create(AnnotationLocatorSchema, {
|
|
@@ -116,7 +116,7 @@ Create an annotation from stdin using partial MRN
|
|
|
116
116
|
this.error('Annotation content cannot be empty');
|
|
117
117
|
}
|
|
118
118
|
// Get annotation service client
|
|
119
|
-
const { client: annotationServiceClient, userId, organizationId, } = await this.annotationService(
|
|
119
|
+
const { client: annotationServiceClient, userId, organizationId, } = await this.annotationService();
|
|
120
120
|
try {
|
|
121
121
|
// Create annotation locator from MRN parts
|
|
122
122
|
const locator = create(AnnotationLocatorSchema, {
|
|
@@ -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;CAoE3B"}
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
organizationId: response.zone.organizationId,
|
|
79
|
+
fullyQualifiedDomainName: response.zone.fullyQualifiedDomainName,
|
|
80
|
+
zoneType: response.zone.zoneType,
|
|
81
|
+
status: response.zone.status,
|
|
82
|
+
nameServers: response.zone.nameServers,
|
|
83
|
+
description: response.zone.description,
|
|
84
|
+
createdAt: response.zone.createdAt,
|
|
85
|
+
updatedAt: response.zone.updatedAt,
|
|
86
|
+
tags: response.zone.tags,
|
|
87
|
+
}
|
|
88
|
+
}, null, 2));
|
|
89
|
+
break;
|
|
90
|
+
case 'text':
|
|
91
|
+
default:
|
|
92
|
+
this.log('\n✅ DNS zone created successfully!\n');
|
|
93
|
+
this.log(`Domain: ${response.zone.fullyQualifiedDomainName}`);
|
|
94
|
+
this.log(`Status: ${response.zone.status}`);
|
|
95
|
+
this.log(`Type: ${response.zone.zoneType}`);
|
|
96
|
+
if (response.zone.nameServers && response.zone.nameServers.length > 0) {
|
|
97
|
+
this.log('\nNameservers:');
|
|
98
|
+
for (const ns of response.zone.nameServers) {
|
|
99
|
+
this.log(` - ${ns}`);
|
|
100
|
+
}
|
|
101
|
+
this.log('\n📝 Update your domain registrar to use these nameservers.');
|
|
102
|
+
}
|
|
103
|
+
if (response.zone.description) {
|
|
104
|
+
this.log(`\nDescription: ${response.zone.description}`);
|
|
105
|
+
}
|
|
106
|
+
if (response.zone.tags && response.zone.tags.length > 0) {
|
|
107
|
+
this.log(`Tags: ${response.zone.tags.join(', ')}`);
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
this.error(`Failed to create DNS zone: ${error}`, { exit: 1 });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Delete extends BaseCommand<typeof Delete> {
|
|
3
|
+
static args: {
|
|
4
|
+
dnsName: 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;AAGpD,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;CA0C3B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { confirm } from '@inquirer/prompts';
|
|
3
|
+
import { BaseCommand } from '../../base-command.js';
|
|
4
|
+
import { resolveDnsNameToZoneId } from '../../lib/dns-utils.js';
|
|
5
|
+
export default class Delete extends BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
dnsName: Args.string({
|
|
8
|
+
description: 'DNS name to delete (e.g., example.com)',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Delete a DNS zone';
|
|
13
|
+
static examples = [
|
|
14
|
+
`<%= config.bin %> <%= command.id %> example.com
|
|
15
|
+
Deletes the DNS zone for example.com
|
|
16
|
+
`,
|
|
17
|
+
`<%= config.bin %> <%= command.id %> subdomain.example.com --force
|
|
18
|
+
Deletes the DNS zone without confirmation prompt
|
|
19
|
+
`,
|
|
20
|
+
];
|
|
21
|
+
static flags = {
|
|
22
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
23
|
+
force: Flags.boolean({
|
|
24
|
+
char: 'f',
|
|
25
|
+
description: 'Skip confirmation prompt',
|
|
26
|
+
default: false,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
const { client: dnsService, userId, organizationId } = await this.dnsService();
|
|
31
|
+
try {
|
|
32
|
+
// Resolve DNS name to zone ID
|
|
33
|
+
const zoneId = await resolveDnsNameToZoneId(dnsService, organizationId, userId, this.args.dnsName);
|
|
34
|
+
// Unless forced, ask for confirmation
|
|
35
|
+
if (!this.flags.force) {
|
|
36
|
+
const shouldDelete = await confirm({
|
|
37
|
+
message: `Are you sure you want to delete DNS zone for ${this.args.dnsName}? This action cannot be undone.`,
|
|
38
|
+
default: false,
|
|
39
|
+
});
|
|
40
|
+
if (!shouldDelete) {
|
|
41
|
+
this.log('Deletion cancelled');
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
this.log(`Deleting DNS zone for ${this.args.dnsName}...`);
|
|
46
|
+
const response = await dnsService.deleteDNSZone({
|
|
47
|
+
organizationId,
|
|
48
|
+
userId,
|
|
49
|
+
zoneId,
|
|
50
|
+
});
|
|
51
|
+
if (response.success) {
|
|
52
|
+
this.log(`✅ DNS zone for ${this.args.dnsName} deleted successfully`);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.error('Failed to delete DNS zone', { exit: 1 });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
this.error(`Failed to delete DNS zone: ${error}`, { exit: 1 });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class Get extends BaseCommand<typeof Get> {
|
|
3
|
+
static args: {
|
|
4
|
+
dnsName: 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":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,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;CAwI3B"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { BaseCommand } from '../../base-command.js';
|
|
4
|
+
import { resolveDnsNameToZoneId } from '../../lib/dns-utils.js';
|
|
5
|
+
export default class Get extends BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
dnsName: Args.string({
|
|
8
|
+
description: 'DNS name to get details for (e.g., example.com)',
|
|
9
|
+
required: true,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Get details of a specific DNS zone';
|
|
13
|
+
static examples = [
|
|
14
|
+
`<%= config.bin %> <%= command.id %> example.com
|
|
15
|
+
Shows details for DNS zone for example.com
|
|
16
|
+
`,
|
|
17
|
+
`<%= config.bin %> <%= command.id %> subdomain.example.com --output json
|
|
18
|
+
Shows zone details in JSON format
|
|
19
|
+
`,
|
|
20
|
+
];
|
|
21
|
+
static flags = {
|
|
22
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
23
|
+
output: Flags.string({
|
|
24
|
+
char: 'o',
|
|
25
|
+
description: 'output format',
|
|
26
|
+
default: 'text',
|
|
27
|
+
options: ['text', 'json'],
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
async run() {
|
|
31
|
+
const { client: dnsService, userId, organizationId } = await this.dnsService();
|
|
32
|
+
try {
|
|
33
|
+
// Resolve DNS name to zone ID
|
|
34
|
+
const zoneId = await resolveDnsNameToZoneId(dnsService, organizationId, userId, this.args.dnsName);
|
|
35
|
+
const response = await dnsService.getDNSZone({
|
|
36
|
+
organizationId,
|
|
37
|
+
userId,
|
|
38
|
+
zoneId,
|
|
39
|
+
});
|
|
40
|
+
if (!response.zone) {
|
|
41
|
+
this.error(`DNS zone for ${this.args.dnsName} not found`, { exit: 1 });
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
switch (this.flags.output) {
|
|
45
|
+
case 'json':
|
|
46
|
+
console.log(JSON.stringify({
|
|
47
|
+
zone: {
|
|
48
|
+
organizationId: response.zone.organizationId,
|
|
49
|
+
fullyQualifiedDomainName: response.zone.fullyQualifiedDomainName,
|
|
50
|
+
zoneType: response.zone.zoneType,
|
|
51
|
+
status: response.zone.status,
|
|
52
|
+
nameServers: response.zone.nameServers,
|
|
53
|
+
description: response.zone.description,
|
|
54
|
+
createdAt: response.zone.createdAt,
|
|
55
|
+
updatedAt: response.zone.updatedAt,
|
|
56
|
+
tags: response.zone.tags,
|
|
57
|
+
verificationKey: response.zone.verificationKey,
|
|
58
|
+
},
|
|
59
|
+
}, null, 2));
|
|
60
|
+
break;
|
|
61
|
+
case 'text':
|
|
62
|
+
default: {
|
|
63
|
+
// Header with domain name
|
|
64
|
+
console.log(`\n${chalk.bold.underline(`DNS Zone: ${response.zone.fullyQualifiedDomainName}`)}\n`);
|
|
65
|
+
// Status with color coding
|
|
66
|
+
let statusColor;
|
|
67
|
+
if (response.zone.status === 'active') {
|
|
68
|
+
statusColor = chalk.green;
|
|
69
|
+
}
|
|
70
|
+
else if (response.zone.status === 'pending') {
|
|
71
|
+
statusColor = chalk.yellow;
|
|
72
|
+
}
|
|
73
|
+
else if (response.zone.status === 'error') {
|
|
74
|
+
statusColor = chalk.red;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
statusColor = chalk.gray;
|
|
78
|
+
}
|
|
79
|
+
console.log(`${chalk.bold('Status:')} ${statusColor(response.zone.status || 'unknown')}`);
|
|
80
|
+
console.log(`${chalk.bold('Type:')} ${chalk.cyan(response.zone.zoneType || 'custom')}`);
|
|
81
|
+
// Nameservers with improved formatting
|
|
82
|
+
if (response.zone.nameServers && response.zone.nameServers.length > 0) {
|
|
83
|
+
console.log(`\n${chalk.bold('Nameservers:')}`);
|
|
84
|
+
for (const ns of response.zone.nameServers) {
|
|
85
|
+
console.log(` ${chalk.green('•')} ${ns}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
// Verification key
|
|
89
|
+
if (response.zone.verificationKey) {
|
|
90
|
+
console.log(`\n${chalk.bold('Verification Key:')}`);
|
|
91
|
+
console.log(` ${chalk.yellow(response.zone.verificationKey)}`);
|
|
92
|
+
}
|
|
93
|
+
// Description
|
|
94
|
+
if (response.zone.description) {
|
|
95
|
+
console.log(`\n${chalk.bold('Description:')}`);
|
|
96
|
+
console.log(` ${response.zone.description}`);
|
|
97
|
+
}
|
|
98
|
+
// Tags with color
|
|
99
|
+
if (response.zone.tags && response.zone.tags.length > 0) {
|
|
100
|
+
console.log(`\n${chalk.bold('Tags:')}`);
|
|
101
|
+
console.log(` ${response.zone.tags.map(tag => chalk.magenta(tag)).join(', ')}`);
|
|
102
|
+
}
|
|
103
|
+
// Timestamps with better formatting
|
|
104
|
+
if (response.zone.createdAt || response.zone.updatedAt) {
|
|
105
|
+
console.log(`\n${chalk.bold('Timestamps:')}`);
|
|
106
|
+
if (response.zone.createdAt) {
|
|
107
|
+
const createdDate = new Date(response.zone.createdAt);
|
|
108
|
+
const formattedCreated = createdDate.toLocaleString('en-US', {
|
|
109
|
+
weekday: 'short',
|
|
110
|
+
year: 'numeric',
|
|
111
|
+
month: 'short',
|
|
112
|
+
day: 'numeric',
|
|
113
|
+
hour: '2-digit',
|
|
114
|
+
minute: '2-digit',
|
|
115
|
+
second: '2-digit',
|
|
116
|
+
timeZoneName: 'short'
|
|
117
|
+
});
|
|
118
|
+
console.log(` ${chalk.dim('Created:')} ${formattedCreated}`);
|
|
119
|
+
}
|
|
120
|
+
if (response.zone.updatedAt) {
|
|
121
|
+
const updatedDate = new Date(response.zone.updatedAt);
|
|
122
|
+
const formattedUpdated = updatedDate.toLocaleString('en-US', {
|
|
123
|
+
weekday: 'short',
|
|
124
|
+
year: 'numeric',
|
|
125
|
+
month: 'short',
|
|
126
|
+
day: 'numeric',
|
|
127
|
+
hour: '2-digit',
|
|
128
|
+
minute: '2-digit',
|
|
129
|
+
second: '2-digit',
|
|
130
|
+
timeZoneName: 'short'
|
|
131
|
+
});
|
|
132
|
+
console.log(` ${chalk.dim('Updated:')} ${formattedUpdated}`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
console.log(''); // Add some space at the end
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
this.error(`Failed to get DNS zone: ${error}`, { exit: 1 });
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -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":"AAGA,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,WAmBb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MAmBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyK3B"}
|