@liquidmetal-ai/raindrop 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +327 -89
- package/bundle/build-CBEGQPJT.js +62 -0
- package/bundle/{chunk-IEF2XC25.js → chunk-2PH3PHH3.js} +5 -3
- package/bundle/{chunk-4HZ22KOV.js → chunk-3CMR7ES5.js} +4 -4
- package/bundle/{chunk-JSBM2JYW.js → chunk-3EYKCHIK.js} +1 -1
- package/bundle/chunk-5XHDP4VK.js +1697 -0
- package/bundle/{chunk-TSQK4HH6.js → chunk-674GMSXY.js} +1 -1
- package/bundle/{chunk-PS3WZBDF.js → chunk-6L4V66WZ.js} +1105 -2728
- package/bundle/{chunk-5245CEUM.js → chunk-AGG7JZVH.js} +2 -2
- package/bundle/{chunk-3GFKUF5D.js → chunk-B3IY2XS6.js} +4 -2
- package/bundle/{chunk-WIDI65NO.js → chunk-CBAXTRCS.js} +1 -1
- package/bundle/{chunk-JLVDTXO2.js → chunk-DPV5HIG7.js} +4 -4
- package/bundle/{chunk-36GNZK4A.js → chunk-EVXLXWP7.js} +1 -1
- package/bundle/{chunk-4YVU5KEQ.js → chunk-HN3AAKRY.js} +4 -2
- package/bundle/{chunk-NVNEQXHN.js → chunk-IGLE4Y3B.js} +7 -5
- package/bundle/{chunk-FGSYWVBA.js → chunk-IQ6HFRA6.js} +1 -1
- package/bundle/{chunk-O3QZDJ75.js → chunk-JQONDSHY.js} +2 -2
- package/bundle/{chunk-W4IPOFZC.js → chunk-KADMFJLN.js} +8 -6
- package/bundle/chunk-KG5BLUGU.js +246 -0
- package/bundle/{chunk-V5LHJTYS.js → chunk-KLOYSTZY.js} +13 -2
- package/bundle/{chunk-ETC5VU7H.js → chunk-KXHVSLAI.js} +1 -1
- package/bundle/{chunk-Y4WFGNPM.js → chunk-L6FRQULN.js} +1 -1
- package/bundle/{chunk-3QCVYSRU.js → chunk-LT3BFQ4O.js} +1 -1
- package/bundle/{chunk-KQZJHBNG.js → chunk-MBLKVNI5.js} +1 -1
- package/bundle/{chunk-6AIUQUUM.js → chunk-MFMVJZW6.js} +71 -15
- package/bundle/{chunk-25T7MEKO.js → chunk-MJBLNWG3.js} +1 -1
- package/bundle/{chunk-MSJ33O5Y.js → chunk-NRCQIE3Z.js} +95 -115
- package/bundle/{chunk-XKKPPSPC.js → chunk-OCYTN4IH.js} +2 -2
- package/bundle/{chunk-2GAMWFJE.js → chunk-QEF5D4VE.js} +1 -1
- package/bundle/{chunk-4B3QYXBA.js → chunk-T7MQCLXF.js} +5 -3
- package/bundle/{chunk-LDFYPOXJ.js → chunk-TFQY5TSY.js} +1 -1
- package/bundle/{chunk-BWK4MC7Y.js → chunk-USZXZZAR.js} +8 -6
- package/bundle/{chunk-ER2RCPCY.js → chunk-V54KHS5B.js} +2 -2
- package/bundle/{chunk-YSKASURB.js → chunk-V6J23FL2.js} +1 -1
- package/bundle/{chunk-UHSTDJ7X.js → chunk-VN2QYX4C.js} +1 -1
- package/bundle/{chunk-Z4OWKG7J.js → chunk-VOT5MMEY.js} +1 -1
- package/bundle/{chunk-W6GU26WO.js → chunk-WG6BDFPZ.js} +1 -1
- package/bundle/{chunk-AK77X5GL.js → chunk-XX74I5RK.js} +4 -2
- package/bundle/{chunk-6BT265R3.js → chunk-YQCRWPNI.js} +1 -1
- package/bundle/commands/annotation/get.js +3 -3
- package/bundle/commands/annotation/list.js +3 -3
- package/bundle/commands/annotation/put.js +3 -3
- package/bundle/commands/auth/apikey.js +2 -2
- package/bundle/commands/auth/list.js +2 -2
- package/bundle/commands/auth/login.js +2 -2
- package/bundle/commands/auth/logout.js +2 -2
- package/bundle/commands/auth/select.js +3 -3
- package/bundle/commands/bucket/create-credential.js +2 -2
- package/bundle/commands/bucket/delete-credential.js +2 -2
- package/bundle/commands/bucket/get-credential.js +2 -2
- package/bundle/commands/bucket/list-credentials.js +2 -2
- package/bundle/commands/build/actor/setup.js +124 -0
- package/bundle/commands/build/branch.js +10 -10
- package/bundle/commands/build/bucket-events/setup.js +146 -0
- package/bundle/commands/build/checkout.js +8 -8
- package/bundle/commands/build/clone.js +6 -6
- package/bundle/commands/build/delete.js +8 -8
- package/bundle/commands/build/deploy.js +10 -10
- package/bundle/commands/build/env/get.js +3 -3
- package/bundle/commands/build/env/list.js +2 -2
- package/bundle/commands/build/env/set.js +3 -3
- package/bundle/commands/build/env.js +2 -2
- package/bundle/commands/build/features.js +192 -0
- package/bundle/commands/build/find.js +4 -4
- package/bundle/commands/build/generate.js +52 -3
- package/bundle/commands/build/init-workspace.js +3 -3
- package/bundle/commands/build/init.js +15 -3
- package/bundle/commands/build/list.js +5 -5
- package/bundle/commands/build/queue/setup.js +133 -0
- package/bundle/commands/build/sandbox.js +6 -6
- package/bundle/commands/build/smartbucket/setup.js +165 -0
- package/bundle/commands/build/smartmemory/setup.js +171 -0
- package/bundle/commands/build/smartsql/setup.js +167 -0
- package/bundle/commands/build/start.js +2 -2
- package/bundle/commands/build/status.js +5 -5
- package/bundle/commands/build/stop.js +2 -2
- package/bundle/commands/build/stripe/dashboard.js +3 -3
- package/bundle/commands/build/stripe/onboard.js +3 -3
- package/bundle/commands/build/stripe/setup.js +3 -3
- package/bundle/commands/build/stripe/start.js +14 -14
- package/bundle/commands/build/stripe/status.js +3 -3
- package/bundle/commands/build/stripe/subscription/create.js +4 -4
- package/bundle/commands/build/stripe/subscription/get.js +4 -4
- package/bundle/commands/build/stripe/subscription/update.js +4 -4
- package/bundle/commands/build/tools/check.js +2 -2
- package/bundle/commands/build/tools/fmt.js +2 -2
- package/bundle/commands/build/unsandbox.js +6 -6
- package/bundle/commands/build/upload.js +5 -5
- package/bundle/commands/build/validate.js +85 -14
- package/bundle/commands/build/workos/delete.js +6 -6
- package/bundle/commands/build/workos/env/attach.js +3 -3
- package/bundle/commands/build/workos/env/attached.js +3 -3
- package/bundle/commands/build/workos/env/create.js +3 -3
- package/bundle/commands/build/workos/env/delete.js +3 -3
- package/bundle/commands/build/workos/env/detach.js +3 -3
- package/bundle/commands/build/workos/env/dev-login.js +3 -3
- package/bundle/commands/build/workos/env/get.js +3 -3
- package/bundle/commands/build/workos/env/list.js +3 -3
- package/bundle/commands/build/workos/env/set.js +3 -3
- package/bundle/commands/build/workos/invite.js +3 -3
- package/bundle/commands/build/workos/jwt.js +172 -0
- package/bundle/commands/build/workos/setup.js +3 -3
- package/bundle/commands/build/workos/status.js +3 -3
- package/bundle/commands/dns/create.js +2 -2
- package/bundle/commands/dns/delete.js +6 -6
- package/bundle/commands/dns/get.js +6 -6
- package/bundle/commands/dns/list.js +3 -3
- package/bundle/commands/dns/records/create.js +2 -2
- package/bundle/commands/dns/records/delete.js +3 -3
- package/bundle/commands/dns/records/get.js +2 -2
- package/bundle/commands/dns/records/list.js +2 -2
- package/bundle/commands/dns/records/update.js +2 -2
- package/bundle/commands/doctor.js +309 -0
- package/bundle/commands/logs/query.js +3 -3
- package/bundle/commands/logs/tail.js +3 -3
- package/bundle/commands/mcp/install-claude.js +2 -2
- package/bundle/commands/mcp/install-gemini.js +2 -2
- package/bundle/commands/mcp/install-goose.js +2 -2
- package/bundle/commands/mcp/status.js +2 -2
- package/bundle/commands/object/delete.js +5 -37
- package/bundle/commands/object/get.js +5 -37
- package/bundle/commands/object/list.js +7 -39
- package/bundle/commands/object/put.js +5 -37
- package/bundle/commands/query/chunk-search.js +14 -46
- package/bundle/commands/query/document.js +17 -55
- package/bundle/commands/query/events.js +2 -2
- package/bundle/commands/query/reindex.js +2 -2
- package/bundle/commands/query/search.js +14 -46
- package/bundle/commands/tail.js +2 -2
- package/bundle/index.js +1 -1
- package/dist/commands/build/actor/setup.d.ts +22 -0
- package/dist/commands/build/actor/setup.d.ts.map +1 -0
- package/dist/commands/build/actor/setup.js +116 -0
- package/dist/commands/build/bucket-events/setup.d.ts +22 -0
- package/dist/commands/build/bucket-events/setup.d.ts.map +1 -0
- package/dist/commands/build/bucket-events/setup.js +134 -0
- package/dist/commands/build/features.d.ts +19 -0
- package/dist/commands/build/features.d.ts.map +1 -0
- package/dist/commands/build/features.js +97 -0
- package/dist/commands/build/generate.d.ts +2 -0
- package/dist/commands/build/generate.d.ts.map +1 -1
- package/dist/commands/build/generate.js +52 -0
- package/dist/commands/build/init.d.ts.map +1 -1
- package/dist/commands/build/init.js +10 -0
- package/dist/commands/build/queue/setup.d.ts +21 -0
- package/dist/commands/build/queue/setup.d.ts.map +1 -0
- package/dist/commands/build/queue/setup.js +120 -0
- package/dist/commands/build/smartbucket/setup.d.ts +23 -0
- package/dist/commands/build/smartbucket/setup.d.ts.map +1 -0
- package/dist/commands/build/smartbucket/setup.js +167 -0
- package/dist/commands/build/smartmemory/setup.d.ts +23 -0
- package/dist/commands/build/smartmemory/setup.d.ts.map +1 -0
- package/dist/commands/build/smartmemory/setup.js +172 -0
- package/dist/commands/build/smartsql/setup.d.ts +23 -0
- package/dist/commands/build/smartsql/setup.d.ts.map +1 -0
- package/dist/commands/build/smartsql/setup.js +169 -0
- package/dist/commands/build/validate.d.ts +2 -0
- package/dist/commands/build/validate.d.ts.map +1 -1
- package/dist/commands/build/validate.js +80 -8
- package/dist/commands/build/workos/jwt.d.ts +23 -0
- package/dist/commands/build/workos/jwt.d.ts.map +1 -0
- package/dist/commands/build/workos/jwt.js +172 -0
- package/dist/commands/doctor.d.ts +27 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +328 -0
- package/dist/commands/object/delete.d.ts +0 -2
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +3 -38
- package/dist/commands/object/get.d.ts +0 -2
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +3 -38
- package/dist/commands/object/list.d.ts +0 -2
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +5 -40
- package/dist/commands/object/put.d.ts +0 -2
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +3 -38
- package/dist/commands/query/chunk-search.d.ts +0 -2
- package/dist/commands/query/chunk-search.d.ts.map +1 -1
- package/dist/commands/query/chunk-search.js +12 -46
- package/dist/commands/query/document.d.ts +1 -3
- package/dist/commands/query/document.d.ts.map +1 -1
- package/dist/commands/query/document.js +16 -60
- package/dist/commands/query/search.d.ts +0 -2
- package/dist/commands/query/search.d.ts.map +1 -1
- package/dist/commands/query/search.js +12 -46
- package/dist/feature-catalog.d.ts +28 -0
- package/dist/feature-catalog.d.ts.map +1 -0
- package/dist/feature-catalog.js +104 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/oclif.manifest.json +4811 -3433
- package/package.json +3 -3
- package/templates/examples/smartbucket-minimal.ts.hbs +87 -0
- package/templates/examples/smartmemory-minimal.ts.hbs +82 -0
- package/templates/examples/smartsql-minimal.ts.hbs +69 -0
- package/templates/handlers/actor/index.test.ts.hbs +48 -85
- package/templates/handlers/actor/index.ts.hbs +16 -316
- package/templates/handlers/bucket-event-notification/index.ts.hbs +32 -235
- package/templates/handlers/bucket-event-observer.ts.hbs +79 -0
- package/templates/handlers/http-service/index.test.ts.hbs +3 -0
- package/templates/handlers/http-service/index.ts.hbs +43 -15
- package/templates/handlers/queue-consumer-setup.ts.hbs +45 -0
- package/templates/handlers/task/index.test.ts.hbs +30 -112
- package/templates/handlers/task/index.ts.hbs +19 -58
- package/templates/init/RAINDROP.md.hbs +97 -1
- package/templates/init/eslint.config.js +43 -0
- package/templates/init/package.json.hbs +4 -1
- package/templates/init/tsconfig.json +3 -3
- package/bundle/chunk-23UBI7BN.js +0 -48
- package/bundle/chunk-2QWMBNE3.js +0 -384
- package/bundle/chunk-45IYWQDC.js +0 -384
- package/bundle/chunk-5YUO23QU.js +0 -4585
- package/bundle/chunk-6MIGCNUO.js +0 -75
- package/bundle/chunk-7ZJWA6HP.js +0 -805
- package/bundle/chunk-AIYVX2M7.js +0 -44
- package/bundle/chunk-BB5TNIEM.js +0 -48
- package/bundle/chunk-BUR3HFKH.js +0 -488
- package/bundle/chunk-BYSBS7KT.js +0 -488
- package/bundle/chunk-CX3RWI62.js +0 -28658
- package/bundle/chunk-DLH7MI57.js +0 -305
- package/bundle/chunk-E3WJIYJZ.js +0 -12148
- package/bundle/chunk-EX7NOPRF.js +0 -12148
- package/bundle/chunk-F76JQS2J.js +0 -231
- package/bundle/chunk-FBOXMVKD.js +0 -28679
- package/bundle/chunk-FTPZ6SQW.js +0 -238909
- package/bundle/chunk-H3CFZ7ZH.js +0 -74
- package/bundle/chunk-HXOILVWA.js +0 -384
- package/bundle/chunk-IMP7O5AC.js +0 -22452
- package/bundle/chunk-IPYOAKRE.js +0 -231
- package/bundle/chunk-J7HN6XF2.js +0 -4461
- package/bundle/chunk-JOLOAALA.js +0 -231
- package/bundle/chunk-JZ2G4Q35.js +0 -4585
- package/bundle/chunk-KVAWPWF7.js +0 -231
- package/bundle/chunk-MEUAAIXV.js +0 -28657
- package/bundle/chunk-QBWFE57Z.js +0 -384
- package/bundle/chunk-SP3LOXPC.js +0 -46
- package/bundle/chunk-T7C564PR.js +0 -28678
- package/bundle/chunk-UFH545WJ.js +0 -22452
- package/bundle/chunk-UHVMPWM5.js +0 -315
- package/bundle/chunk-VB7ZTSZV.js +0 -1089
- package/bundle/chunk-VBIJDFMJ.js +0 -384
- package/bundle/chunk-VR7RLTE3.js +0 -231
- package/bundle/chunk-WFZUJLEC.js +0 -231
- package/bundle/chunk-YDGJTLVZ.js +0 -133
- package/bundle/chunk-YPNQ7UFK.js +0 -502
- package/bundle/chunk-YXFDRMSN.js +0 -384
- package/dist/lib/dns-utils.d.ts +0 -7
- package/dist/lib/dns-utils.d.ts.map +0 -1
- package/dist/lib/dns-utils.js +0 -44
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import * as os from 'os';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import { BaseCommand } from '../base-command.js';
|
|
5
|
+
import { readState } from '../index.js';
|
|
6
|
+
export default class Doctor extends BaseCommand {
|
|
7
|
+
static description = 'Display diagnostic information for troubleshooting and support';
|
|
8
|
+
static examples = [
|
|
9
|
+
`<%= config.bin %> <%= command.id %>`,
|
|
10
|
+
`<%= config.bin %> <%= command.id %> --output json`,
|
|
11
|
+
`<%= config.bin %> <%= command.id %> --root /path/to/project`,
|
|
12
|
+
];
|
|
13
|
+
static flags = {
|
|
14
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
15
|
+
root: Flags.string({
|
|
16
|
+
char: 'r',
|
|
17
|
+
description: 'root directory of the project',
|
|
18
|
+
required: false,
|
|
19
|
+
default: process.cwd(),
|
|
20
|
+
}),
|
|
21
|
+
manifest: Flags.string({
|
|
22
|
+
description: 'project manifest file',
|
|
23
|
+
required: false,
|
|
24
|
+
default: 'raindrop.manifest',
|
|
25
|
+
}),
|
|
26
|
+
output: Flags.string({
|
|
27
|
+
char: 'o',
|
|
28
|
+
description: 'output format',
|
|
29
|
+
default: 'text',
|
|
30
|
+
options: ['text', 'json'],
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
async run() {
|
|
34
|
+
const { flags } = await this.parse(Doctor);
|
|
35
|
+
// Ask user which AI agent they're using (unless outputting JSON for automation)
|
|
36
|
+
let aiAgent;
|
|
37
|
+
let aiAgentVersion;
|
|
38
|
+
if (flags.output !== 'json') {
|
|
39
|
+
const result = await this.promptForAIAgent();
|
|
40
|
+
aiAgent = result.agent;
|
|
41
|
+
aiAgentVersion = result.version;
|
|
42
|
+
}
|
|
43
|
+
const diagnostics = await this.collectDiagnostics(flags, aiAgent, aiAgentVersion);
|
|
44
|
+
if (flags.output === 'json') {
|
|
45
|
+
console.log(JSON.stringify(diagnostics, null, 2));
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.displayDiagnostics(diagnostics);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async promptForAIAgent() {
|
|
52
|
+
const { createInterface } = await import('readline');
|
|
53
|
+
const { execSync } = await import('child_process');
|
|
54
|
+
this.log('');
|
|
55
|
+
this.log('Which AI coding assistant are you using? (This helps our support team)');
|
|
56
|
+
this.log('Examples: Claude Code, Cursor, Windsurf, GitHub Copilot, VS Code, etc.');
|
|
57
|
+
this.log('');
|
|
58
|
+
const rl = createInterface({
|
|
59
|
+
input: process.stdin,
|
|
60
|
+
output: process.stderr, // Use stderr to match BaseCommand.log behavior
|
|
61
|
+
});
|
|
62
|
+
return new Promise((resolve) => {
|
|
63
|
+
rl.question('AI Agent (or press Enter to skip): ', (answer) => {
|
|
64
|
+
rl.close();
|
|
65
|
+
const agent = answer.trim() || undefined;
|
|
66
|
+
if (!agent) {
|
|
67
|
+
resolve({ agent: undefined, version: undefined });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// Try to get the version by running '{agent} --version'
|
|
71
|
+
let version;
|
|
72
|
+
try {
|
|
73
|
+
// Extract the command name (first word, lowercase, no spaces)
|
|
74
|
+
const commandName = agent.split(' ')[0]?.toLowerCase().trim();
|
|
75
|
+
if (commandName) {
|
|
76
|
+
const versionOutput = execSync(`${commandName} --version`, {
|
|
77
|
+
encoding: 'utf-8',
|
|
78
|
+
timeout: 2000, // 2 second timeout
|
|
79
|
+
stdio: ['ignore', 'pipe', 'ignore'], // Ignore stdin and stderr
|
|
80
|
+
}).trim();
|
|
81
|
+
version = versionOutput;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// If command fails, version remains undefined
|
|
86
|
+
}
|
|
87
|
+
resolve({ agent, version });
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async collectDiagnostics(flags, aiAgent, aiAgentVersion) {
|
|
92
|
+
const diagnostics = {
|
|
93
|
+
timestamp: new Date().toISOString(),
|
|
94
|
+
versions: await this.collectVersionInfo(flags),
|
|
95
|
+
authentication: await this.collectAuthInfo(),
|
|
96
|
+
environment: this.collectEnvironmentInfo(aiAgent, aiAgentVersion),
|
|
97
|
+
};
|
|
98
|
+
// Try to collect project info if we're in a project directory
|
|
99
|
+
try {
|
|
100
|
+
diagnostics.project = await this.collectProjectInfo(flags);
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// Project info is optional
|
|
104
|
+
}
|
|
105
|
+
return diagnostics;
|
|
106
|
+
}
|
|
107
|
+
async collectVersionInfo(flags) {
|
|
108
|
+
const versions = {
|
|
109
|
+
cli: this.config.version,
|
|
110
|
+
node: process.version,
|
|
111
|
+
os: `${os.type()} ${os.release()}`,
|
|
112
|
+
platform: os.platform(),
|
|
113
|
+
arch: os.arch(),
|
|
114
|
+
};
|
|
115
|
+
// Try to get framework version
|
|
116
|
+
try {
|
|
117
|
+
versions.framework = await this.raindropFrameworkVersion(flags.root);
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// Framework version is optional
|
|
121
|
+
}
|
|
122
|
+
// Try to get npm version
|
|
123
|
+
try {
|
|
124
|
+
const { execSync } = await import('child_process');
|
|
125
|
+
const npmVersion = execSync('npm --version', { encoding: 'utf-8' }).trim();
|
|
126
|
+
versions.npm = npmVersion;
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// npm version is optional
|
|
130
|
+
}
|
|
131
|
+
return versions;
|
|
132
|
+
}
|
|
133
|
+
async collectProjectInfo(flags) {
|
|
134
|
+
const { existsSync, readFileSync } = await import('fs');
|
|
135
|
+
const manifestPath = path.isAbsolute(flags.manifest)
|
|
136
|
+
? flags.manifest
|
|
137
|
+
: path.join(flags.root, flags.manifest);
|
|
138
|
+
const projectInfo = {
|
|
139
|
+
root: flags.root,
|
|
140
|
+
manifest: manifestPath,
|
|
141
|
+
manifestExists: existsSync(manifestPath),
|
|
142
|
+
manifestValid: false,
|
|
143
|
+
};
|
|
144
|
+
if (projectInfo.manifestExists) {
|
|
145
|
+
// Read the raw manifest content
|
|
146
|
+
try {
|
|
147
|
+
projectInfo.manifestContent = readFileSync(manifestPath, 'utf-8');
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
projectInfo.manifestContent = `Error reading manifest: ${error instanceof Error ? error.message : String(error)}`;
|
|
151
|
+
}
|
|
152
|
+
// Validate the manifest
|
|
153
|
+
try {
|
|
154
|
+
const apps = await this.loadManifest();
|
|
155
|
+
projectInfo.manifestValid = apps.length > 0;
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
projectInfo.manifestValid = false;
|
|
159
|
+
projectInfo.manifestErrors = [error instanceof Error ? error.message : String(error)];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// Try to load config
|
|
163
|
+
try {
|
|
164
|
+
projectInfo.config = await this.loadConfig();
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
// Config is optional
|
|
168
|
+
}
|
|
169
|
+
return projectInfo;
|
|
170
|
+
}
|
|
171
|
+
async collectAuthInfo() {
|
|
172
|
+
const configDir = this.config.configDir;
|
|
173
|
+
const authInfo = {
|
|
174
|
+
configDir,
|
|
175
|
+
tokenStatus: 'unknown',
|
|
176
|
+
organizationCount: 0,
|
|
177
|
+
};
|
|
178
|
+
try {
|
|
179
|
+
const state = await readState(configDir);
|
|
180
|
+
authInfo.organizationCount = Object.keys(state.organizationIdToBearerToken).length;
|
|
181
|
+
if (state.currentOrganizationId) {
|
|
182
|
+
const currentOrg = state.organizationIdToBearerToken[state.currentOrganizationId];
|
|
183
|
+
if (currentOrg) {
|
|
184
|
+
// Show full org ID
|
|
185
|
+
authInfo.organizationId = state.currentOrganizationId;
|
|
186
|
+
// Mask email for privacy: show first 2 chars + *** + @domain
|
|
187
|
+
authInfo.userEmailMasked = this.maskEmail(currentOrg.userEmail);
|
|
188
|
+
authInfo.tokenStatus = 'valid';
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
authInfo.tokenStatus = 'missing';
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
authInfo.tokenStatus = 'missing';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
authInfo.tokenStatus = 'missing';
|
|
200
|
+
}
|
|
201
|
+
return authInfo;
|
|
202
|
+
}
|
|
203
|
+
maskEmail(email) {
|
|
204
|
+
if (!email || !email.includes('@')) {
|
|
205
|
+
return '***';
|
|
206
|
+
}
|
|
207
|
+
const [localPart, domain] = email.split('@');
|
|
208
|
+
if (!localPart || !domain) {
|
|
209
|
+
return '***';
|
|
210
|
+
}
|
|
211
|
+
// Show first 2 characters of local part, then ***, then @domain
|
|
212
|
+
const visibleChars = Math.min(2, localPart.length);
|
|
213
|
+
const masked = localPart.slice(0, visibleChars) + '***';
|
|
214
|
+
return `${masked}@${domain}`;
|
|
215
|
+
}
|
|
216
|
+
collectEnvironmentInfo(aiAgent, aiAgentVersion) {
|
|
217
|
+
const env = process.env;
|
|
218
|
+
const relevantEnvVars = {};
|
|
219
|
+
// Collect relevant env vars (sanitized)
|
|
220
|
+
const varsToCheck = [
|
|
221
|
+
'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
|
|
222
|
+
'RAINDROP_CATALOG_SERVICE',
|
|
223
|
+
'TERM_PROGRAM',
|
|
224
|
+
'TERM',
|
|
225
|
+
'SHELL',
|
|
226
|
+
'CI',
|
|
227
|
+
'GITHUB_ACTIONS',
|
|
228
|
+
'GITLAB_CI',
|
|
229
|
+
'CIRCLECI',
|
|
230
|
+
];
|
|
231
|
+
for (const varName of varsToCheck) {
|
|
232
|
+
if (env[varName]) {
|
|
233
|
+
relevantEnvVars[varName] = env[varName];
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return {
|
|
237
|
+
aiAgent,
|
|
238
|
+
aiAgentVersion,
|
|
239
|
+
terminal: env.TERM_PROGRAM || env.TERM || 'unknown',
|
|
240
|
+
shell: env.SHELL || 'unknown',
|
|
241
|
+
relevantEnvVars,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
displayDiagnostics(diagnostics) {
|
|
245
|
+
this.log('');
|
|
246
|
+
this.log('╔════════════════════════════════════════════════════════════════╗');
|
|
247
|
+
this.log('║ Raindrop CLI Diagnostic Information ║');
|
|
248
|
+
this.log('╚════════════════════════════════════════════════════════════════╝');
|
|
249
|
+
this.log('');
|
|
250
|
+
// Versions
|
|
251
|
+
this.log('📦 Versions:');
|
|
252
|
+
this.log(` CLI: ${diagnostics.versions.cli}`);
|
|
253
|
+
this.log(` Node.js: ${diagnostics.versions.node}`);
|
|
254
|
+
if (diagnostics.versions.npm) {
|
|
255
|
+
this.log(` npm: ${diagnostics.versions.npm}`);
|
|
256
|
+
}
|
|
257
|
+
if (diagnostics.versions.framework) {
|
|
258
|
+
this.log(` Framework: ${diagnostics.versions.framework}`);
|
|
259
|
+
}
|
|
260
|
+
this.log(` OS: ${diagnostics.versions.os}`);
|
|
261
|
+
this.log(` Platform: ${diagnostics.versions.platform}`);
|
|
262
|
+
this.log(` Arch: ${diagnostics.versions.arch}`);
|
|
263
|
+
this.log('');
|
|
264
|
+
// AI Agent
|
|
265
|
+
if (diagnostics.environment.aiAgent) {
|
|
266
|
+
this.log('🤖 AI Agent:');
|
|
267
|
+
this.log(` Name: ${diagnostics.environment.aiAgent}`);
|
|
268
|
+
if (diagnostics.environment.aiAgentVersion) {
|
|
269
|
+
this.log(` Version: ${diagnostics.environment.aiAgentVersion}`);
|
|
270
|
+
}
|
|
271
|
+
this.log('');
|
|
272
|
+
}
|
|
273
|
+
// Authentication
|
|
274
|
+
this.log('🔐 Authentication:');
|
|
275
|
+
this.log(` Config Dir: ${diagnostics.authentication.configDir}`);
|
|
276
|
+
this.log(` Status: ${diagnostics.authentication.tokenStatus}`);
|
|
277
|
+
if (diagnostics.authentication.organizationId) {
|
|
278
|
+
this.log(` Org ID: ${diagnostics.authentication.organizationId}`);
|
|
279
|
+
}
|
|
280
|
+
if (diagnostics.authentication.userEmailMasked) {
|
|
281
|
+
this.log(` User: ${diagnostics.authentication.userEmailMasked}`);
|
|
282
|
+
}
|
|
283
|
+
this.log(` Orgs: ${diagnostics.authentication.organizationCount}`);
|
|
284
|
+
this.log('');
|
|
285
|
+
// Project info
|
|
286
|
+
if (diagnostics.project) {
|
|
287
|
+
this.log('📁 Project:');
|
|
288
|
+
this.log(` Root: ${diagnostics.project.root}`);
|
|
289
|
+
this.log(` Manifest: ${diagnostics.project.manifest}`);
|
|
290
|
+
this.log(` Exists: ${diagnostics.project.manifestExists ? '✓' : '✗'}`);
|
|
291
|
+
if (diagnostics.project.manifestExists) {
|
|
292
|
+
this.log(` Valid: ${diagnostics.project.manifestValid ? '✓' : '✗'}`);
|
|
293
|
+
if (diagnostics.project.manifestErrors && diagnostics.project.manifestErrors.length > 0) {
|
|
294
|
+
this.log(' Errors:');
|
|
295
|
+
for (const error of diagnostics.project.manifestErrors) {
|
|
296
|
+
this.log(` ${error}`);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (diagnostics.project.manifestContent) {
|
|
300
|
+
this.log('');
|
|
301
|
+
this.log(' Manifest Content:');
|
|
302
|
+
this.log(' ─────────────────────────────────────────────────────────');
|
|
303
|
+
const lines = diagnostics.project.manifestContent.split('\n');
|
|
304
|
+
for (const line of lines) {
|
|
305
|
+
this.log(` ${line}`);
|
|
306
|
+
}
|
|
307
|
+
this.log(' ─────────────────────────────────────────────────────────');
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (diagnostics.project.config) {
|
|
311
|
+
this.log(' Config:');
|
|
312
|
+
if (diagnostics.project.config.versionId) {
|
|
313
|
+
this.log(` Version ID: ${diagnostics.project.config.versionId}`);
|
|
314
|
+
}
|
|
315
|
+
if (diagnostics.project.config.lock) {
|
|
316
|
+
this.log(` Lock: ${diagnostics.project.config.lock}`);
|
|
317
|
+
}
|
|
318
|
+
this.log(` Sandbox: ${diagnostics.project.config.sandbox ? 'enabled' : 'disabled'}`);
|
|
319
|
+
}
|
|
320
|
+
this.log('');
|
|
321
|
+
}
|
|
322
|
+
this.log('───────────────────────────────────────────────────────────────');
|
|
323
|
+
this.log('');
|
|
324
|
+
this.log('💡 To output as JSON: raindrop doctor --output json');
|
|
325
|
+
this.log('');
|
|
326
|
+
this.log(`Collected at: ${diagnostics.timestamp}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
@@ -7,8 +7,6 @@ export default class ObjectDelete extends BaseCommand<typeof ObjectDelete> {
|
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
9
|
bucket: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
'module-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
moduleId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
10
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
11
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
12
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/object/delete.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW,CAAC,OAAO,YAAY,CAAC;IACxE,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAA2C;IAE7D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/object/delete.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW,CAAC,OAAO,YAAY,CAAC;IACxE,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAA2C;IAE7D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;MA8BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyH3B"}
|
|
@@ -25,24 +25,6 @@ Delete file with key 'my-key' from my-bucket within my-app
|
|
|
25
25
|
description: 'bucket name version can be specified with #, e.g. my-bucket#versionId',
|
|
26
26
|
required: false,
|
|
27
27
|
}),
|
|
28
|
-
'module-id': Flags.string({
|
|
29
|
-
description: 'module ID (deprecated, use --bucket with smartbucket names)',
|
|
30
|
-
required: false,
|
|
31
|
-
hidden: true,
|
|
32
|
-
deprecated: {
|
|
33
|
-
message: 'use --bucket with smartbucket names instead',
|
|
34
|
-
version: '3.0.0',
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
moduleId: Flags.string({
|
|
38
|
-
description: 'module ID (deprecated, use --module-id)',
|
|
39
|
-
required: false,
|
|
40
|
-
hidden: true,
|
|
41
|
-
deprecated: {
|
|
42
|
-
message: 'use --module-id instead',
|
|
43
|
-
version: '2.0.0',
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
28
|
application: Flags.string({
|
|
47
29
|
char: 'a',
|
|
48
30
|
description: 'application name',
|
|
@@ -68,30 +50,13 @@ Delete file with key 'my-key' from my-bucket within my-app
|
|
|
68
50
|
}),
|
|
69
51
|
};
|
|
70
52
|
async run() {
|
|
71
|
-
// Normalize flags (support both old and new names)
|
|
72
|
-
const moduleId = this.flags['module-id'] || this.flags.moduleId;
|
|
73
53
|
// Validate flag combinations
|
|
74
|
-
if (this.flags.bucket &&
|
|
75
|
-
this.error('
|
|
76
|
-
}
|
|
77
|
-
if (moduleId && this.flags.application) {
|
|
78
|
-
this.error('Cannot specify both --module-id and --application flags.');
|
|
79
|
-
}
|
|
80
|
-
if (!this.flags.bucket && !moduleId && !this.flags.application) {
|
|
81
|
-
this.error('Must specify one of: --bucket, --module-id, or --application');
|
|
54
|
+
if (!this.flags.bucket && !this.flags.application) {
|
|
55
|
+
this.error('Must specify --bucket or --application');
|
|
82
56
|
}
|
|
83
57
|
const { client: objectService, userId, organizationId } = await this.objectService();
|
|
84
58
|
let bucketLocation;
|
|
85
|
-
if (
|
|
86
|
-
// Direct moduleId - simplest case
|
|
87
|
-
bucketLocation = {
|
|
88
|
-
bucketLocation: {
|
|
89
|
-
case: 'moduleId',
|
|
90
|
-
value: moduleId,
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
else if (this.flags.application && this.flags.bucket) {
|
|
59
|
+
if (this.flags.application && this.flags.bucket) {
|
|
95
60
|
// Application + bucket - find specific bucket within application
|
|
96
61
|
const applicationName = this.flags.application;
|
|
97
62
|
const config = await this.loadConfig();
|
|
@@ -10,8 +10,6 @@ export default class ObjectGet extends BaseCommand<typeof ObjectGet> {
|
|
|
10
10
|
static examples: string[];
|
|
11
11
|
static flags: {
|
|
12
12
|
bucket: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
'module-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
moduleId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
13
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
14
|
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
15
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/commands/object/get.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;;;;MAST;IAEF,MAAM,CAAC,WAAW,SAA6C;IAE/D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/commands/object/get.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;;;;MAST;IAEF,MAAM,CAAC,WAAW,SAA6C;IAE/D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;MA8BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoJ3B"}
|
|
@@ -29,24 +29,6 @@ Download file with key 'my-key' from my-bucket within my-app to output.txt
|
|
|
29
29
|
description: 'bucket name version can be specified with #, e.g. my-bucket#versionId',
|
|
30
30
|
required: false,
|
|
31
31
|
}),
|
|
32
|
-
'module-id': Flags.string({
|
|
33
|
-
description: 'module ID (deprecated, use --bucket with smartbucket names)',
|
|
34
|
-
required: false,
|
|
35
|
-
hidden: true,
|
|
36
|
-
deprecated: {
|
|
37
|
-
message: 'use --bucket with smartbucket names instead',
|
|
38
|
-
version: '3.0.0',
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
moduleId: Flags.string({
|
|
42
|
-
description: 'module ID (deprecated, use --module-id)',
|
|
43
|
-
required: false,
|
|
44
|
-
hidden: true,
|
|
45
|
-
deprecated: {
|
|
46
|
-
message: 'use --module-id instead',
|
|
47
|
-
version: '2.0.0',
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
32
|
application: Flags.string({
|
|
51
33
|
char: 'a',
|
|
52
34
|
description: 'application name',
|
|
@@ -72,30 +54,13 @@ Download file with key 'my-key' from my-bucket within my-app to output.txt
|
|
|
72
54
|
}),
|
|
73
55
|
};
|
|
74
56
|
async run() {
|
|
75
|
-
// Normalize flags (support both old and new names)
|
|
76
|
-
const moduleId = this.flags['module-id'] || this.flags.moduleId;
|
|
77
57
|
// Validate flag combinations
|
|
78
|
-
if (this.flags.bucket &&
|
|
79
|
-
this.error('
|
|
80
|
-
}
|
|
81
|
-
if (moduleId && this.flags.application) {
|
|
82
|
-
this.error('Cannot specify both --module-id and --application flags.');
|
|
83
|
-
}
|
|
84
|
-
if (!this.flags.bucket && !moduleId && !this.flags.application) {
|
|
85
|
-
this.error('Must specify one of: --bucket, --module-id, or --application');
|
|
58
|
+
if (!this.flags.bucket && !this.flags.application) {
|
|
59
|
+
this.error('Must specify --bucket or --application');
|
|
86
60
|
}
|
|
87
61
|
const { client: objectService, userId, organizationId } = await this.objectService();
|
|
88
62
|
let bucketLocation;
|
|
89
|
-
if (
|
|
90
|
-
// Direct moduleId - simplest case
|
|
91
|
-
bucketLocation = {
|
|
92
|
-
bucketLocation: {
|
|
93
|
-
case: 'moduleId',
|
|
94
|
-
value: moduleId,
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
else if (this.flags.application && this.flags.bucket) {
|
|
63
|
+
if (this.flags.application && this.flags.bucket) {
|
|
99
64
|
// Application + bucket - find specific bucket within application
|
|
100
65
|
const applicationName = this.flags.application;
|
|
101
66
|
const config = await this.loadConfig();
|
|
@@ -4,8 +4,6 @@ export default class ObjectList extends BaseCommand<typeof ObjectList> {
|
|
|
4
4
|
static examples: string[];
|
|
5
5
|
static flags: {
|
|
6
6
|
bucket: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
-
'module-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
moduleId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
7
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
8
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
9
|
status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/object/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAyDpD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW,CAAC,OAAO,UAAU,CAAC;IACpE,MAAM,CAAC,WAAW,SAA8B;IAEhD,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/object/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAyDpD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW,CAAC,OAAO,UAAU,CAAC;IACpE,MAAM,CAAC,WAAW,SAA8B;IAEhD,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;MA6CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkQ3B"}
|
|
@@ -66,24 +66,6 @@ List objects in my-bucket within my-app
|
|
|
66
66
|
description: 'bucket name version can be specified with #, e.g. my-bucket#versionId',
|
|
67
67
|
required: false,
|
|
68
68
|
}),
|
|
69
|
-
'module-id': Flags.string({
|
|
70
|
-
description: 'module ID (deprecated, use --bucket with smartbucket names)',
|
|
71
|
-
required: false,
|
|
72
|
-
hidden: true,
|
|
73
|
-
deprecated: {
|
|
74
|
-
message: 'use --bucket with smartbucket names instead',
|
|
75
|
-
version: '3.0.0',
|
|
76
|
-
},
|
|
77
|
-
}),
|
|
78
|
-
moduleId: Flags.string({
|
|
79
|
-
description: 'module ID (deprecated, use --module-id)',
|
|
80
|
-
required: false,
|
|
81
|
-
hidden: true,
|
|
82
|
-
deprecated: {
|
|
83
|
-
message: 'use --module-id instead',
|
|
84
|
-
version: '2.0.0',
|
|
85
|
-
},
|
|
86
|
-
}),
|
|
87
69
|
application: Flags.string({
|
|
88
70
|
char: 'a',
|
|
89
71
|
description: 'application name',
|
|
@@ -124,30 +106,13 @@ List objects in my-bucket within my-app
|
|
|
124
106
|
}),
|
|
125
107
|
};
|
|
126
108
|
async run() {
|
|
127
|
-
// Normalize flags (support both old and new names)
|
|
128
|
-
const moduleId = this.flags['module-id'] || this.flags.moduleId;
|
|
129
109
|
// Validate flag combinations
|
|
130
|
-
if (this.flags.bucket &&
|
|
131
|
-
this.error('
|
|
132
|
-
}
|
|
133
|
-
if (moduleId && this.flags.application) {
|
|
134
|
-
this.error('Cannot specify both --module-id and --application flags.');
|
|
135
|
-
}
|
|
136
|
-
if (!this.flags.bucket && !moduleId && !this.flags.application) {
|
|
137
|
-
this.error('Must specify one of: --bucket, --module-id, or --application');
|
|
110
|
+
if (!this.flags.bucket && !this.flags.application) {
|
|
111
|
+
this.error('Must specify --bucket or --application');
|
|
138
112
|
}
|
|
139
113
|
const { client: objectService, userId, organizationId } = await this.objectService();
|
|
140
114
|
let bucketLocation;
|
|
141
|
-
if (
|
|
142
|
-
// Direct moduleId - simplest case
|
|
143
|
-
bucketLocation = {
|
|
144
|
-
bucketLocation: {
|
|
145
|
-
case: 'moduleId',
|
|
146
|
-
value: moduleId,
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
else if (this.flags.application && this.flags.bucket) {
|
|
115
|
+
if (this.flags.application && this.flags.bucket) {
|
|
151
116
|
// Application + bucket - find specific bucket within application
|
|
152
117
|
const applicationName = this.flags.application;
|
|
153
118
|
const config = await this.loadConfig();
|
|
@@ -282,8 +247,8 @@ List objects in my-bucket within my-app
|
|
|
282
247
|
}
|
|
283
248
|
catch (error) {
|
|
284
249
|
const err = error;
|
|
285
|
-
const location = this.flags.bucket ||
|
|
286
|
-
this.error(`Failed to list objects in ${
|
|
250
|
+
const location = this.flags.bucket || this.flags.application;
|
|
251
|
+
this.error(`Failed to list objects in ${location}: ${err.message}`);
|
|
287
252
|
}
|
|
288
253
|
if (!response.objects?.length) {
|
|
289
254
|
console.log('No objects found in bucket');
|
|
@@ -10,8 +10,6 @@ export default class ObjectPut extends BaseCommand<typeof ObjectPut> {
|
|
|
10
10
|
static examples: string[];
|
|
11
11
|
static flags: {
|
|
12
12
|
bucket: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
'module-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
moduleId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
13
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
14
|
contentType: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
15
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"put.d.ts","sourceRoot":"","sources":["../../../src/commands/object/put.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;;;;MAUT;IAEF,MAAM,CAAC,WAAW,SAAyC;IAE3D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"put.d.ts","sourceRoot":"","sources":["../../../src/commands/object/put.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;;;;MAUT;IAEF,MAAM,CAAC,WAAW,SAAyC;IAE3D,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;MAmCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAmI1B,OAAO,CAAC,cAAc;CAevB"}
|
|
@@ -32,24 +32,6 @@ Upload myfile.txt to my-bucket within my-app with key 'my-key'
|
|
|
32
32
|
description: 'bucket name version can be specified with #, e.g. my-bucket#versionId',
|
|
33
33
|
required: false,
|
|
34
34
|
}),
|
|
35
|
-
'module-id': Flags.string({
|
|
36
|
-
description: 'module ID (deprecated, use --bucket with smartbucket names)',
|
|
37
|
-
required: false,
|
|
38
|
-
hidden: true,
|
|
39
|
-
deprecated: {
|
|
40
|
-
message: 'use --bucket with smartbucket names instead',
|
|
41
|
-
version: '3.0.0',
|
|
42
|
-
},
|
|
43
|
-
}),
|
|
44
|
-
moduleId: Flags.string({
|
|
45
|
-
description: 'module ID (deprecated, use --module-id)',
|
|
46
|
-
required: false,
|
|
47
|
-
hidden: true,
|
|
48
|
-
deprecated: {
|
|
49
|
-
message: 'use --module-id instead',
|
|
50
|
-
version: '2.0.0',
|
|
51
|
-
},
|
|
52
|
-
}),
|
|
53
35
|
application: Flags.string({
|
|
54
36
|
char: 'a',
|
|
55
37
|
description: 'application name',
|
|
@@ -80,30 +62,13 @@ Upload myfile.txt to my-bucket within my-app with key 'my-key'
|
|
|
80
62
|
}),
|
|
81
63
|
};
|
|
82
64
|
async run() {
|
|
83
|
-
// Normalize flags (support both old and new names)
|
|
84
|
-
const moduleId = this.flags['module-id'] || this.flags.moduleId;
|
|
85
65
|
// Validate flag combinations
|
|
86
|
-
if (this.flags.bucket &&
|
|
87
|
-
this.error('
|
|
88
|
-
}
|
|
89
|
-
if (moduleId && this.flags.application) {
|
|
90
|
-
this.error('Cannot specify both --module-id and --application flags.');
|
|
91
|
-
}
|
|
92
|
-
if (!this.flags.bucket && !moduleId && !this.flags.application) {
|
|
93
|
-
this.error('Must specify one of: --bucket, --module-id, or --application');
|
|
66
|
+
if (!this.flags.bucket && !this.flags.application) {
|
|
67
|
+
this.error('Must specify --bucket or --application');
|
|
94
68
|
}
|
|
95
69
|
const { client: objectService, userId, organizationId } = await this.objectService();
|
|
96
70
|
let bucketLocation;
|
|
97
|
-
if (
|
|
98
|
-
// Direct moduleId - simplest case
|
|
99
|
-
bucketLocation = {
|
|
100
|
-
bucketLocation: {
|
|
101
|
-
case: 'moduleId',
|
|
102
|
-
value: moduleId,
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
else if (this.flags.application && this.flags.bucket) {
|
|
71
|
+
if (this.flags.application && this.flags.bucket) {
|
|
107
72
|
// Application + bucket - find specific bucket within application
|
|
108
73
|
const applicationName = this.flags.application;
|
|
109
74
|
const config = await this.loadConfig();
|
|
@@ -7,8 +7,6 @@ export default class RagSearch extends BaseCommand<typeof RagSearch> {
|
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
9
|
buckets: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
'module-ids': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
moduleIds: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
10
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
11
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
12
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-search.d.ts","sourceRoot":"","sources":["../../../src/commands/query/chunk-search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAoF;IAEtG,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"chunk-search.d.ts","sourceRoot":"","sources":["../../../src/commands/query/chunk-search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAoF;IAEtG,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MA0BV;IAEI,WAAW,CAAC,KAAK,EAAE,MAAM;IAuDzB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAI3B"}
|