@liquidmetal-ai/raindrop 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +408 -73
- package/bin/cjs-shims.js +7 -0
- package/bin/run.js +20 -2
- package/bundle/chunk-5GH4FS6C.js +12148 -0
- package/bundle/chunk-6B4I2CKP.js +231 -0
- package/bundle/chunk-6UE75KX2.js +4481 -0
- package/bundle/chunk-AU3EGGJP.js +44 -0
- package/bundle/chunk-CDQRD3JA.js +75 -0
- package/bundle/chunk-CMCEP64V.js +380 -0
- package/bundle/chunk-CW5ZHVPX.js +292 -0
- package/bundle/chunk-G6NE675D.js +238720 -0
- package/bundle/chunk-GLIYVKQA.js +48 -0
- package/bundle/chunk-KXEV6E63.js +133 -0
- package/bundle/chunk-MCRKUPJY.js +4515 -0
- package/bundle/chunk-MGM2L2T3.js +805 -0
- package/bundle/chunk-MVQYQJHI.js +502 -0
- package/bundle/chunk-NG7CZTTE.js +147 -0
- package/bundle/chunk-PU4RCSXF.js +22452 -0
- package/bundle/chunk-VXAZKB3J.js +292 -0
- package/bundle/chunk-W2L3MYN6.js +4480 -0
- package/bundle/chunk-XYJACVNA.js +231 -0
- package/bundle/commands/annotation/get.js +153 -0
- package/bundle/commands/annotation/list.js +226 -0
- package/bundle/commands/annotation/put.js +177 -0
- package/bundle/commands/auth/list.js +75 -0
- package/bundle/commands/auth/login.js +1654 -0
- package/bundle/commands/auth/logout.js +27 -0
- package/bundle/commands/auth/select.js +53 -0
- package/bundle/commands/bucket/create-credential.js +173 -0
- package/bundle/commands/bucket/delete-credential.js +140 -0
- package/bundle/commands/bucket/get-credential.js +151 -0
- package/bundle/commands/bucket/list-credentials.js +148 -0
- package/bundle/commands/build/branch.js +126 -0
- package/bundle/commands/build/checkout.js +198 -0
- package/bundle/commands/build/clone.js +153 -0
- package/bundle/commands/build/delete.js +227 -0
- package/bundle/commands/build/deploy.js +160 -0
- package/bundle/commands/build/env/get.js +105 -0
- package/bundle/commands/build/env/set.js +115 -0
- package/bundle/commands/build/find.js +333 -0
- package/bundle/commands/build/generate.js +75 -0
- package/bundle/commands/build/init.js +76 -0
- package/bundle/commands/build/list.js +11 -0
- package/bundle/commands/build/sandbox.js +65 -0
- package/bundle/commands/build/start.js +84 -0
- package/bundle/commands/build/status.js +1839 -0
- package/bundle/commands/build/stop.js +84 -0
- package/bundle/commands/build/tools/check.js +32 -0
- package/bundle/commands/build/tools/fmt.js +49 -0
- package/bundle/commands/build/unsandbox.js +65 -0
- package/bundle/commands/build/upload.js +83 -0
- package/bundle/commands/build/validate.js +71 -0
- package/bundle/commands/build/workos/delete.js +86 -0
- package/bundle/commands/build/workos/env/attach.js +134 -0
- package/bundle/commands/build/workos/env/create.js +176 -0
- package/bundle/commands/build/workos/env/delete.js +84 -0
- package/bundle/commands/build/workos/env/detach.js +115 -0
- package/bundle/commands/build/workos/env/get.js +117 -0
- package/bundle/commands/build/workos/env/list.js +139 -0
- package/bundle/commands/build/workos/env/set.js +138 -0
- package/bundle/commands/build/workos/invite.js +91 -0
- package/bundle/commands/build/workos/setup.js +124 -0
- package/bundle/commands/build/workos/status.js +93 -0
- package/bundle/commands/dns/create.js +128 -0
- package/bundle/commands/dns/delete.js +80 -0
- package/bundle/commands/dns/get.js +167 -0
- package/bundle/commands/dns/list.js +193 -0
- package/bundle/commands/dns/records/create.js +150 -0
- package/bundle/commands/dns/records/delete.js +76 -0
- package/bundle/commands/dns/records/get.js +118 -0
- package/bundle/commands/dns/records/list.js +153 -0
- package/bundle/commands/dns/records/update.js +146 -0
- package/bundle/commands/logs/query.js +237 -0
- package/bundle/commands/logs/tail.js +155 -0
- package/bundle/commands/mcp/install-claude.js +220 -0
- package/bundle/commands/mcp/install-gemini.js +220 -0
- package/bundle/commands/mcp/install-goose.js +232 -0
- package/bundle/commands/mcp/status.js +153 -0
- package/bundle/commands/object/delete.js +180 -0
- package/bundle/commands/object/get.js +209 -0
- package/bundle/commands/object/list.js +206 -0
- package/bundle/commands/object/put.js +211 -0
- package/bundle/commands/query/chunk-search.js +123 -0
- package/bundle/commands/query/document.js +126 -0
- package/bundle/commands/query/events.js +98 -0
- package/bundle/commands/query/reindex.js +147 -0
- package/bundle/commands/query/search.js +169 -0
- package/bundle/commands/tail.js +31 -0
- package/bundle/index.js +51 -0
- package/dist/base-command.d.ts +6 -0
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +14 -1
- package/dist/build.d.ts +2 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +169 -51
- package/dist/codegen.d.ts +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +17 -3
- package/dist/codegen.test.js +44 -0
- package/dist/commands/build/checkout.d.ts.map +1 -1
- package/dist/commands/build/checkout.js +4 -0
- package/dist/commands/build/delete.d.ts.map +1 -1
- package/dist/commands/build/delete.js +6 -3
- package/dist/commands/build/deploy.d.ts.map +1 -1
- package/dist/commands/build/deploy.js +10 -2
- package/dist/commands/build/find.d.ts +1 -0
- package/dist/commands/build/find.d.ts.map +1 -1
- package/dist/commands/build/find.js +33 -2
- package/dist/commands/build/validate.d.ts.map +1 -1
- package/dist/commands/build/validate.js +0 -1
- package/dist/commands/build/workos/delete.d.ts +18 -0
- package/dist/commands/build/workos/delete.d.ts.map +1 -0
- package/dist/commands/build/workos/delete.js +72 -0
- package/dist/commands/build/workos/env/attach.d.ts +24 -0
- package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
- package/dist/commands/build/workos/env/attach.js +111 -0
- package/dist/commands/build/workos/env/create.d.ts +26 -0
- package/dist/commands/build/workos/env/create.d.ts.map +1 -0
- package/dist/commands/build/workos/env/create.js +156 -0
- package/dist/commands/build/workos/env/delete.d.ts +20 -0
- package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
- package/dist/commands/build/workos/env/delete.js +61 -0
- package/dist/commands/build/workos/env/detach.d.ts +21 -0
- package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
- package/dist/commands/build/workos/env/detach.js +94 -0
- package/dist/commands/build/workos/env/get.d.ts +20 -0
- package/dist/commands/build/workos/env/get.d.ts.map +1 -0
- package/dist/commands/build/workos/env/get.js +94 -0
- package/dist/commands/build/workos/env/list.d.ts +18 -0
- package/dist/commands/build/workos/env/list.d.ts.map +1 -0
- package/dist/commands/build/workos/env/list.js +114 -0
- package/dist/commands/build/workos/env/set.d.ts +27 -0
- package/dist/commands/build/workos/env/set.d.ts.map +1 -0
- package/dist/commands/build/workos/env/set.js +115 -0
- package/dist/commands/build/workos/invite.d.ts +21 -0
- package/dist/commands/build/workos/invite.d.ts.map +1 -0
- package/dist/commands/build/workos/invite.js +68 -0
- package/dist/commands/build/workos/setup.d.ts +20 -0
- package/dist/commands/build/workos/setup.d.ts.map +1 -0
- package/dist/commands/build/workos/setup.js +106 -0
- package/dist/commands/build/workos/status.d.ts +18 -0
- package/dist/commands/build/workos/status.d.ts.map +1 -0
- package/dist/commands/build/workos/status.js +70 -0
- package/dist/commands/mcp/install-claude.d.ts.map +1 -1
- package/dist/commands/mcp/install-claude.js +0 -2
- package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
- package/dist/commands/mcp/install-gemini.js +0 -2
- package/dist/commands/mcp/install-goose.d.ts.map +1 -1
- package/dist/commands/mcp/install-goose.js +0 -2
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/oclif.manifest.json +4544 -2466
- package/package.json +8 -5
- package/templates/claude-code/debug-raindrop-app.md +89 -0
- package/templates/claude-code/new-raindrop-app.md +10 -6
- package/templates/claude-code/reattach-raindrop-session.md +50 -12
- package/templates/claude-code/update-raindrop-app.md +61 -9
- 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/debug-raindrop-app.toml +86 -0
- package/templates/gemini-code/new-raindrop-app.toml +9 -5
- package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
- package/templates/gemini-code/update-raindrop-app.toml +55 -10
- package/templates/goose/debug-raindrop-app.yaml +91 -0
- package/templates/goose/new-raindrop-app.yaml +12 -7
- package/templates/goose/reattach-raindrop-session.yaml +11 -4
- package/templates/goose/update-raindrop-app.yaml +57 -5
- package/templates/init/src/_app/auth.ts +18 -0
- package/templates/init/src/_app/cors.ts +64 -0
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/templates/claude-code/raindrop-guidelines.md +0 -322
- package/templates/gemini-code/raindrop-guidelines.md +0 -322
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseMRN
|
|
3
|
+
} from "../../chunk-AU3EGGJP.js";
|
|
4
|
+
import {
|
|
5
|
+
BaseCommand
|
|
6
|
+
} from "../../chunk-MCRKUPJY.js";
|
|
7
|
+
import {
|
|
8
|
+
AnnotationLocatorSchema,
|
|
9
|
+
PutAnnotationRequestSchema,
|
|
10
|
+
__toESM,
|
|
11
|
+
create,
|
|
12
|
+
init_cjs_shims,
|
|
13
|
+
require_lib,
|
|
14
|
+
valueOf
|
|
15
|
+
} from "../../chunk-G6NE675D.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/annotation/put.ts
|
|
18
|
+
init_cjs_shims();
|
|
19
|
+
var import_core = __toESM(require_lib(), 1);
|
|
20
|
+
import * as fs from "node:fs/promises";
|
|
21
|
+
var AnnotationPut = class _AnnotationPut extends BaseCommand {
|
|
22
|
+
static args = {
|
|
23
|
+
mrn: import_core.Args.string({
|
|
24
|
+
description: "MRN (Machine Resource Name) of the annotation to create/update. Can be partial (e.g., my-module:my-key:) or full (e.g., annotation:app:v1:my-module:my-key:)",
|
|
25
|
+
required: true
|
|
26
|
+
}),
|
|
27
|
+
annotation: import_core.Args.string({
|
|
28
|
+
description: 'annotation content (use "-" to read from stdin)',
|
|
29
|
+
required: true
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
static description = "Create or update an annotation by MRN";
|
|
33
|
+
static examples = [
|
|
34
|
+
`<%= config.bin %> annotation put my-module:my-key: "This is my annotation"
|
|
35
|
+
Create an annotation with partial MRN (prefilled with app/version from manifest and config)
|
|
36
|
+
`,
|
|
37
|
+
`<%= config.bin %> annotation put annotation:my-app:v1.0.0:my-module:my-item^my-key: @file.txt
|
|
38
|
+
Create an annotation from file contents using full MRN
|
|
39
|
+
`,
|
|
40
|
+
`<%= config.bin %> annotation put my-module:my-key: - < input.txt
|
|
41
|
+
Create an annotation from stdin using partial MRN
|
|
42
|
+
`
|
|
43
|
+
];
|
|
44
|
+
static flags = {
|
|
45
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
46
|
+
output: import_core.Flags.string({
|
|
47
|
+
char: "o",
|
|
48
|
+
description: "output format",
|
|
49
|
+
default: "text",
|
|
50
|
+
options: ["text", "json"]
|
|
51
|
+
}),
|
|
52
|
+
impersonate: import_core.Flags.string({
|
|
53
|
+
char: "i",
|
|
54
|
+
description: "impersonate organization",
|
|
55
|
+
required: false,
|
|
56
|
+
hidden: true
|
|
57
|
+
}),
|
|
58
|
+
manifest: import_core.Flags.string({
|
|
59
|
+
char: "M",
|
|
60
|
+
description: "project manifest",
|
|
61
|
+
required: false,
|
|
62
|
+
default: "raindrop.manifest",
|
|
63
|
+
hidden: true
|
|
64
|
+
})
|
|
65
|
+
};
|
|
66
|
+
async run() {
|
|
67
|
+
const { args, flags } = await this.parse(_AnnotationPut);
|
|
68
|
+
let fullMrn = args.mrn;
|
|
69
|
+
let mrnParts;
|
|
70
|
+
if (!args.mrn.startsWith("annotation:") && !args.mrn.startsWith("label:")) {
|
|
71
|
+
const apps = await this.loadManifest();
|
|
72
|
+
const config = await this.loadConfig();
|
|
73
|
+
if (apps.length === 0) {
|
|
74
|
+
this.error("No applications found in manifest");
|
|
75
|
+
}
|
|
76
|
+
const app = apps[0];
|
|
77
|
+
const appName = valueOf(app.name);
|
|
78
|
+
const versionId = config.versionId;
|
|
79
|
+
if (!appName) {
|
|
80
|
+
this.error("Application name not found in manifest");
|
|
81
|
+
}
|
|
82
|
+
if (!versionId) {
|
|
83
|
+
this.error("Version ID not found in config. Run a build or deployment first to set the version.");
|
|
84
|
+
}
|
|
85
|
+
fullMrn = `annotation:${appName}:${versionId}:${args.mrn}`;
|
|
86
|
+
}
|
|
87
|
+
const parts = fullMrn.split(":");
|
|
88
|
+
if (parts.length < 6) {
|
|
89
|
+
const colonsToAdd = 6 - parts.length;
|
|
90
|
+
fullMrn += ":".repeat(colonsToAdd);
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
mrnParts = parseMRN(fullMrn);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
this.error(`Invalid MRN format: ${error}`);
|
|
96
|
+
}
|
|
97
|
+
let annotationContent;
|
|
98
|
+
if (args.annotation === "-") {
|
|
99
|
+
const chunks = [];
|
|
100
|
+
for await (const chunk of process.stdin) {
|
|
101
|
+
chunks.push(chunk);
|
|
102
|
+
}
|
|
103
|
+
annotationContent = Buffer.concat(chunks).toString("utf8").trim();
|
|
104
|
+
} else if (args.annotation.startsWith("@")) {
|
|
105
|
+
const filePath = args.annotation.slice(1);
|
|
106
|
+
try {
|
|
107
|
+
annotationContent = await fs.readFile(filePath, "utf8");
|
|
108
|
+
} catch (error) {
|
|
109
|
+
this.error(`Failed to read file "${filePath}": ${error}`);
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
annotationContent = args.annotation;
|
|
113
|
+
}
|
|
114
|
+
if (!annotationContent.trim()) {
|
|
115
|
+
this.error("Annotation content cannot be empty");
|
|
116
|
+
}
|
|
117
|
+
const {
|
|
118
|
+
client: annotationServiceClient,
|
|
119
|
+
userId,
|
|
120
|
+
organizationId
|
|
121
|
+
} = await this.annotationService();
|
|
122
|
+
try {
|
|
123
|
+
const locator = create(AnnotationLocatorSchema, {
|
|
124
|
+
applicationName: mrnParts.applicationName,
|
|
125
|
+
applicationVersionId: mrnParts.versionId,
|
|
126
|
+
moduleName: mrnParts.module,
|
|
127
|
+
item: mrnParts.item,
|
|
128
|
+
key: mrnParts.key,
|
|
129
|
+
revision: mrnParts.revision
|
|
130
|
+
});
|
|
131
|
+
const request = create(PutAnnotationRequestSchema, {
|
|
132
|
+
userId,
|
|
133
|
+
organizationId,
|
|
134
|
+
locator,
|
|
135
|
+
annotation: annotationContent
|
|
136
|
+
});
|
|
137
|
+
const response = await annotationServiceClient.putAnnotation(request);
|
|
138
|
+
switch (flags.output) {
|
|
139
|
+
case "json":
|
|
140
|
+
console.log(
|
|
141
|
+
JSON.stringify(
|
|
142
|
+
{
|
|
143
|
+
mrn: fullMrn,
|
|
144
|
+
inputMrn: args.mrn,
|
|
145
|
+
...mrnParts,
|
|
146
|
+
annotation: annotationContent,
|
|
147
|
+
locator: response.locator,
|
|
148
|
+
success: true
|
|
149
|
+
},
|
|
150
|
+
null,
|
|
151
|
+
2
|
|
152
|
+
)
|
|
153
|
+
);
|
|
154
|
+
break;
|
|
155
|
+
case "text":
|
|
156
|
+
console.log(`Successfully created/updated annotation for MRN: ${fullMrn}`);
|
|
157
|
+
if (fullMrn !== args.mrn) {
|
|
158
|
+
console.log(`Input: ${args.mrn} (prefilled with app/version)`);
|
|
159
|
+
}
|
|
160
|
+
console.log(`Content length: ${annotationContent.length} characters`);
|
|
161
|
+
console.log(`Type: ${mrnParts.type}`);
|
|
162
|
+
console.log(`Application: ${mrnParts.applicationName}`);
|
|
163
|
+
console.log(`Version: ${mrnParts.versionId}`);
|
|
164
|
+
if (mrnParts.module) console.log(`Module: ${mrnParts.module}`);
|
|
165
|
+
if (mrnParts.item) console.log(`Item: ${mrnParts.item}`);
|
|
166
|
+
if (mrnParts.key) console.log(`Key: ${mrnParts.key}`);
|
|
167
|
+
console.log("\nAnnotation saved successfully!");
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
} catch (error) {
|
|
171
|
+
this.error(`Failed to save annotation: ${error}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
export {
|
|
176
|
+
AnnotationPut as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseCommand
|
|
3
|
+
} from "../../chunk-MCRKUPJY.js";
|
|
4
|
+
import {
|
|
5
|
+
__toESM,
|
|
6
|
+
init_cjs_shims,
|
|
7
|
+
readState,
|
|
8
|
+
require_lib
|
|
9
|
+
} from "../../chunk-G6NE675D.js";
|
|
10
|
+
|
|
11
|
+
// src/commands/auth/list.ts
|
|
12
|
+
init_cjs_shims();
|
|
13
|
+
var import_core = __toESM(require_lib(), 1);
|
|
14
|
+
var List = class extends BaseCommand {
|
|
15
|
+
static args = {};
|
|
16
|
+
static description = "List authentications";
|
|
17
|
+
static flags = {
|
|
18
|
+
output: import_core.Flags.string({
|
|
19
|
+
char: "o",
|
|
20
|
+
description: "output format",
|
|
21
|
+
default: "table",
|
|
22
|
+
options: ["text", "table", "json"]
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
async run() {
|
|
26
|
+
const state = await readState(this.config.configDir);
|
|
27
|
+
switch (this.flags.output) {
|
|
28
|
+
case "text":
|
|
29
|
+
for (const [orgId, token] of Object.entries(state.organizationIdToBearerToken)) {
|
|
30
|
+
const isSelected = token.organizationId === state.currentOrganizationId;
|
|
31
|
+
console.log(`${orgId}${isSelected ? " (current)" : ""} - ${token.userEmail} ${token.organizationName}`);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
case "json":
|
|
35
|
+
console.log(
|
|
36
|
+
JSON.stringify(
|
|
37
|
+
Object.entries(state.organizationIdToBearerToken).map(([_, token]) => {
|
|
38
|
+
const isSelected = token.organizationId === state.currentOrganizationId;
|
|
39
|
+
return {
|
|
40
|
+
organizationId: token.organizationId,
|
|
41
|
+
organizationName: token.organizationName,
|
|
42
|
+
userEmail: token.userEmail,
|
|
43
|
+
isSelected
|
|
44
|
+
};
|
|
45
|
+
})
|
|
46
|
+
)
|
|
47
|
+
);
|
|
48
|
+
break;
|
|
49
|
+
case "table":
|
|
50
|
+
console.table(
|
|
51
|
+
Object.entries(state.organizationIdToBearerToken).map(([_, token]) => {
|
|
52
|
+
const isSelected = token.organizationId === state.currentOrganizationId;
|
|
53
|
+
return {
|
|
54
|
+
organizationId: token.organizationId,
|
|
55
|
+
organizationName: token.organizationName,
|
|
56
|
+
userEmail: token.userEmail,
|
|
57
|
+
isSelected
|
|
58
|
+
};
|
|
59
|
+
}).reduce(
|
|
60
|
+
(memo, row) => {
|
|
61
|
+
memo[row.organizationId] = row;
|
|
62
|
+
return memo;
|
|
63
|
+
},
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
{}
|
|
66
|
+
),
|
|
67
|
+
["organizationName", "userEmail", "isSelected"]
|
|
68
|
+
);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
List as default
|
|
75
|
+
};
|