@liquidmetal-ai/raindrop 0.6.4 → 0.8.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 +440 -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 +21 -8
- 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 +20 -3
- package/dist/codegen.test.js +59 -1
- package/dist/commands/build/checkout.d.ts +17 -0
- package/dist/commands/build/checkout.d.ts.map +1 -1
- package/dist/commands/build/checkout.js +144 -7
- package/dist/commands/build/delete.d.ts +15 -0
- package/dist/commands/build/delete.d.ts.map +1 -1
- package/dist/commands/build/delete.js +133 -0
- 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 +2 -2
- package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
- package/dist/commands/mcp/install-gemini.js +2 -2
- package/dist/commands/mcp/install-goose.d.ts +22 -0
- package/dist/commands/mcp/install-goose.d.ts.map +1 -0
- package/dist/commands/mcp/install-goose.js +252 -0
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +20 -12
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +20 -12
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +20 -12
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +20 -12
- 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 +37 -4
- package/dist/index.test.js +54 -2
- package/oclif.manifest.json +4533 -2284
- package/package.json +8 -5
- package/templates/claude-code/debug-raindrop-app.md +89 -0
- package/templates/claude-code/new-raindrop-app.md +12 -4
- 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 +10 -3
- 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 +21 -0
- package/templates/goose/reattach-raindrop-session.yaml +20 -0
- package/templates/goose/update-raindrop-app.yaml +65 -0
- 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
|
@@ -16,7 +16,6 @@ This command will:
|
|
|
16
16
|
- Check if Gemini CLI is installed and accessible
|
|
17
17
|
- Verify if raindrop-mcp server already exists (prevents duplicates)
|
|
18
18
|
- Add the raindrop-mcp server to your Gemini CLI MCP configuration
|
|
19
|
-
- Create ~/.gemini/RAINDROP.md with complete Raindrop workflow guidelines
|
|
20
19
|
- Create Gemini CLI slash commands in ~/.gemini/commands/ (TOML format):
|
|
21
20
|
• /new-raindrop-app - Start new Raindrop application development
|
|
22
21
|
• /update-raindrop-app - Update existing Raindrop applications
|
|
@@ -90,9 +89,11 @@ Requirements:
|
|
|
90
89
|
async createGeminiConfigFiles() {
|
|
91
90
|
try {
|
|
92
91
|
const home = homedir();
|
|
92
|
+
const raindropDir = join(home, '.raindrop');
|
|
93
93
|
const geminiDir = join(home, '.gemini');
|
|
94
94
|
const commandsDir = join(geminiDir, 'commands');
|
|
95
95
|
// Create directories if they don't exist
|
|
96
|
+
await mkdir(raindropDir, { recursive: true });
|
|
96
97
|
await mkdir(geminiDir, { recursive: true });
|
|
97
98
|
await mkdir(commandsDir, { recursive: true });
|
|
98
99
|
// Get templates directory from package root
|
|
@@ -112,7 +113,6 @@ Requirements:
|
|
|
112
113
|
const templatesDir = join(packageRoot, 'templates', 'gemini-code');
|
|
113
114
|
// File mappings: [template file, destination file, description]
|
|
114
115
|
const fileMap = [
|
|
115
|
-
['raindrop-guidelines.md', join(geminiDir, 'RAINDROP.md'), 'Raindrop workflow guidelines'],
|
|
116
116
|
['new-raindrop-app.toml', join(commandsDir, 'new-raindrop-app.toml'), 'New app command'],
|
|
117
117
|
['update-raindrop-app.toml', join(commandsDir, 'update-raindrop-app.toml'), 'Update app command'],
|
|
118
118
|
['reattach-raindrop-session.toml', join(commandsDir, 'reattach-raindrop-session.toml'), 'Reattach session command'],
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class McpInstallGoose extends BaseCommand<typeof McpInstallGoose> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
private installGooseIntegration;
|
|
16
|
+
private updateGooseConfig;
|
|
17
|
+
private createGooseConfigFiles;
|
|
18
|
+
private checkGooseInstalled;
|
|
19
|
+
private parseYaml;
|
|
20
|
+
private stringifyYaml;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=install-goose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-goose.d.ts","sourceRoot":"","sources":["../../../src/commands/mcp/install-goose.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAapD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW,CAAC,OAAO,eAAe,CAAC;IAC9E,MAAM,CAAC,WAAW,SAAqD;IAEvE,MAAM,CAAC,QAAQ,WAiBb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAEV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YAKZ,uBAAuB;YAiCvB,iBAAiB;YAyDjB,sBAAsB;YA6EtB,mBAAmB;IAQjC,OAAO,CAAC,SAAS;IAyDjB,OAAO,CAAC,aAAa;CAiBtB"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { urlifyOrganizationId } from '@liquidmetal-ai/drizzle/raindrop/index';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { readFile, writeFile, mkdir, access } from 'node:fs/promises';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { homedir } from 'node:os';
|
|
7
|
+
import { constants } from 'node:fs';
|
|
8
|
+
import { BaseCommand } from '../../base-command.js';
|
|
9
|
+
export default class McpInstallGoose extends BaseCommand {
|
|
10
|
+
static description = 'Install complete Raindrop integration for Goose';
|
|
11
|
+
static examples = [
|
|
12
|
+
`<%= config.bin %> mcp install-goose
|
|
13
|
+
Install Raindrop MCP server and Goose configuration files
|
|
14
|
+
|
|
15
|
+
This command will:
|
|
16
|
+
- Check if Goose is installed and accessible
|
|
17
|
+
- Verify if raindrop-mcp server already exists (prevents duplicates)
|
|
18
|
+
- Add the raindrop-mcp extension to your Goose configuration
|
|
19
|
+
- Create Goose recipe files in ~/.config/goose/recipes/:
|
|
20
|
+
• new-raindrop-app.yaml - Start new Raindrop application development
|
|
21
|
+
• update-raindrop-app.yaml - Update existing Raindrop applications
|
|
22
|
+
• reattach-raindrop-session.yaml - Resume previous development sessions
|
|
23
|
+
|
|
24
|
+
Requirements:
|
|
25
|
+
- Goose must be installed (https://block.github.io/goose/)
|
|
26
|
+
- You must be logged into your Raindrop organization via 'raindrop auth login'
|
|
27
|
+
`,
|
|
28
|
+
];
|
|
29
|
+
static flags = {
|
|
30
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
31
|
+
};
|
|
32
|
+
async run() {
|
|
33
|
+
await this.installGooseIntegration();
|
|
34
|
+
await this.createGooseConfigFiles();
|
|
35
|
+
}
|
|
36
|
+
async installGooseIntegration() {
|
|
37
|
+
console.log('🔍 Checking if Goose is installed...');
|
|
38
|
+
// Check if Goose is installed
|
|
39
|
+
if (!(await this.checkGooseInstalled())) {
|
|
40
|
+
this.error('Goose is not installed. Please install it first: https://block.github.io/goose/', { exit: 1 });
|
|
41
|
+
}
|
|
42
|
+
console.log('Goose is installed');
|
|
43
|
+
console.log('🔍 Getting organization identity...');
|
|
44
|
+
// Use existing pattern to get organization identity (already handles "not logged in")
|
|
45
|
+
let identity;
|
|
46
|
+
try {
|
|
47
|
+
identity = await this.catalogIdentity();
|
|
48
|
+
console.log(`Organization ID: ${identity.organizationId}`);
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.log(`Failed to get identity: ${error.message}`);
|
|
52
|
+
this.error(`Failed to get organization identity: ${error.message}`, { exit: 1 });
|
|
53
|
+
}
|
|
54
|
+
// Use existing utility to convert org ID to URL-safe format
|
|
55
|
+
const urlSafeOrgId = urlifyOrganizationId(identity.organizationId);
|
|
56
|
+
// Construct MCP server URL
|
|
57
|
+
const mcpUrl = `https://raindrop-mcp.${urlSafeOrgId}.lmapp.run/mcp`;
|
|
58
|
+
console.log(`🔍 MCP URL: ${mcpUrl}`);
|
|
59
|
+
// Update Goose config.yaml
|
|
60
|
+
await this.updateGooseConfig(mcpUrl);
|
|
61
|
+
}
|
|
62
|
+
async updateGooseConfig(mcpUrl) {
|
|
63
|
+
const home = homedir();
|
|
64
|
+
const configPath = join(home, '.config', 'goose', 'config.yaml');
|
|
65
|
+
try {
|
|
66
|
+
// Create config directory if it doesn't exist
|
|
67
|
+
await mkdir(dirname(configPath), { recursive: true });
|
|
68
|
+
let configContent = {};
|
|
69
|
+
// Try to read existing config
|
|
70
|
+
try {
|
|
71
|
+
const existingConfig = await readFile(configPath, 'utf-8');
|
|
72
|
+
configContent = this.parseYaml(existingConfig);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
// Config file doesn't exist, start with empty config
|
|
76
|
+
console.log('Creating new Goose config.yaml file...');
|
|
77
|
+
}
|
|
78
|
+
// Initialize extensions object if it doesn't exist
|
|
79
|
+
if (!configContent.extensions) {
|
|
80
|
+
configContent.extensions = {};
|
|
81
|
+
}
|
|
82
|
+
// Check if raindrop-mcp already exists
|
|
83
|
+
if (configContent.extensions['raindrop-mcp']) {
|
|
84
|
+
console.log('MCP extension "raindrop-mcp" already exists in Goose configuration');
|
|
85
|
+
console.log('');
|
|
86
|
+
console.log('To update the existing extension:');
|
|
87
|
+
console.log(' 1. Edit ~/.config/goose/config.yaml manually');
|
|
88
|
+
console.log(' 2. Update the raindrop-mcp extension URL');
|
|
89
|
+
console.log('');
|
|
90
|
+
this.error('MCP extension already exists. Please update it manually if needed.', { exit: 1 });
|
|
91
|
+
}
|
|
92
|
+
// Add raindrop-mcp extension
|
|
93
|
+
configContent.extensions['raindrop-mcp'] = {
|
|
94
|
+
enabled: true,
|
|
95
|
+
name: 'raindrop-mcp',
|
|
96
|
+
timeout: 300,
|
|
97
|
+
type: 'http',
|
|
98
|
+
url: mcpUrl,
|
|
99
|
+
};
|
|
100
|
+
// Write updated config
|
|
101
|
+
const yamlContent = this.stringifyYaml(configContent);
|
|
102
|
+
await writeFile(configPath, yamlContent, 'utf-8');
|
|
103
|
+
console.log('MCP integration for Goose installed successfully');
|
|
104
|
+
console.log(`Configuration updated: ${configPath}`);
|
|
105
|
+
console.log(`Server URL: ${mcpUrl}`);
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
console.log(`Failed to update Goose config: ${error.message}`);
|
|
109
|
+
this.error(`Failed to configure Goose MCP integration: ${error.message}`, { exit: 1 });
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async createGooseConfigFiles() {
|
|
113
|
+
try {
|
|
114
|
+
const home = homedir();
|
|
115
|
+
const raindropDir = join(home, '.raindrop');
|
|
116
|
+
const gooseRecipesDir = join(home, '.config', 'goose', 'recipes');
|
|
117
|
+
// Create directories if they don't exist
|
|
118
|
+
await mkdir(raindropDir, { recursive: true });
|
|
119
|
+
await mkdir(gooseRecipesDir, { recursive: true });
|
|
120
|
+
// Get templates directory from package root
|
|
121
|
+
const currentFileUrl = import.meta.url;
|
|
122
|
+
const currentDir = dirname(fileURLToPath(currentFileUrl));
|
|
123
|
+
// Find package root by looking for package.json
|
|
124
|
+
let packageRoot = currentDir;
|
|
125
|
+
while (packageRoot !== dirname(packageRoot)) {
|
|
126
|
+
try {
|
|
127
|
+
await access(join(packageRoot, 'package.json'), constants.F_OK);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
catch {
|
|
131
|
+
packageRoot = dirname(packageRoot);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const templatesDir = join(packageRoot, 'templates');
|
|
135
|
+
// File mappings: [template file, destination file, description]
|
|
136
|
+
const fileMap = [
|
|
137
|
+
[join('goose', 'new-raindrop-app.yaml'), join(gooseRecipesDir, 'new-raindrop-app.yaml'), 'New app recipe'],
|
|
138
|
+
[join('goose', 'update-raindrop-app.yaml'), join(gooseRecipesDir, 'update-raindrop-app.yaml'), 'Update app recipe'],
|
|
139
|
+
[join('goose', 'reattach-raindrop-session.yaml'), join(gooseRecipesDir, 'reattach-raindrop-session.yaml'), 'Reattach session recipe'],
|
|
140
|
+
];
|
|
141
|
+
const createdFiles = [];
|
|
142
|
+
const skippedFiles = [];
|
|
143
|
+
// Create each file from template
|
|
144
|
+
for (const [templateFile, destPath, description] of fileMap) {
|
|
145
|
+
try {
|
|
146
|
+
const templatePath = join(templatesDir, templateFile);
|
|
147
|
+
const content = await readFile(templatePath, 'utf-8');
|
|
148
|
+
await writeFile(destPath, content, 'utf-8');
|
|
149
|
+
createdFiles.push(destPath);
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
console.log(`Failed to create ${description}: ${error.message}`);
|
|
153
|
+
skippedFiles.push(destPath);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (createdFiles.length > 0) {
|
|
157
|
+
console.log('📝 Created Goose configuration files:');
|
|
158
|
+
for (const filePath of createdFiles) {
|
|
159
|
+
console.log(` ${filePath}`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (skippedFiles.length > 0) {
|
|
163
|
+
console.log('Skipped files due to errors:');
|
|
164
|
+
for (const filePath of skippedFiles) {
|
|
165
|
+
console.log(` ${filePath}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (createdFiles.length > 0) {
|
|
169
|
+
console.log('');
|
|
170
|
+
console.log('To use Raindrop with Goose:');
|
|
171
|
+
console.log(' goose session --recipe ~/.config/goose/recipes/new-raindrop-app.yaml');
|
|
172
|
+
console.log(' goose session --recipe ~/.config/goose/recipes/update-raindrop-app.yaml');
|
|
173
|
+
console.log(' goose session --recipe ~/.config/goose/recipes/reattach-raindrop-session.yaml');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
this.error(`Failed to create Goose configuration files: ${error.message}`, { exit: 1 });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async checkGooseInstalled() {
|
|
181
|
+
return new Promise((resolve) => {
|
|
182
|
+
const childProcess = spawn('goose', ['--version'], { stdio: 'ignore' });
|
|
183
|
+
childProcess.on('close', (code) => resolve(code === 0));
|
|
184
|
+
childProcess.on('error', () => resolve(false));
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
parseYaml(content) {
|
|
188
|
+
const lines = content.split('\n');
|
|
189
|
+
const config = {};
|
|
190
|
+
const extensions = {};
|
|
191
|
+
let currentExtension = null;
|
|
192
|
+
let inExtensions = false;
|
|
193
|
+
for (const line of lines) {
|
|
194
|
+
const trimmed = line.trim();
|
|
195
|
+
if (trimmed.startsWith('extensions:')) {
|
|
196
|
+
inExtensions = true;
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (inExtensions) {
|
|
200
|
+
if (trimmed && !trimmed.startsWith(' ') && !line.startsWith(' ')) {
|
|
201
|
+
inExtensions = false;
|
|
202
|
+
}
|
|
203
|
+
else if (trimmed.match(/^[\w-]+:$/)) {
|
|
204
|
+
currentExtension = trimmed.slice(0, -1);
|
|
205
|
+
extensions[currentExtension] = {
|
|
206
|
+
enabled: true,
|
|
207
|
+
name: currentExtension,
|
|
208
|
+
timeout: 300,
|
|
209
|
+
type: 'http',
|
|
210
|
+
url: ''
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
else if (currentExtension && trimmed.includes(':')) {
|
|
214
|
+
const ext = extensions[currentExtension];
|
|
215
|
+
if (!ext)
|
|
216
|
+
continue;
|
|
217
|
+
const [key, ...valueParts] = trimmed.split(':');
|
|
218
|
+
const value = valueParts.join(':').trim().replace(/^["']|["']$/g, '');
|
|
219
|
+
if (key === 'enabled')
|
|
220
|
+
ext.enabled = value === 'true';
|
|
221
|
+
if (key === 'name')
|
|
222
|
+
ext.name = value;
|
|
223
|
+
if (key === 'timeout')
|
|
224
|
+
ext.timeout = Number.parseInt(value, 10);
|
|
225
|
+
if (key === 'type')
|
|
226
|
+
ext.type = value;
|
|
227
|
+
if (key === 'url')
|
|
228
|
+
ext.url = value;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (Object.keys(extensions).length > 0) {
|
|
233
|
+
config.extensions = extensions;
|
|
234
|
+
}
|
|
235
|
+
return config;
|
|
236
|
+
}
|
|
237
|
+
stringifyYaml(config) {
|
|
238
|
+
const lines = [];
|
|
239
|
+
if (config.extensions) {
|
|
240
|
+
lines.push('extensions:');
|
|
241
|
+
for (const [name, ext] of Object.entries(config.extensions)) {
|
|
242
|
+
lines.push(` ${name}:`);
|
|
243
|
+
lines.push(` enabled: ${ext.enabled}`);
|
|
244
|
+
lines.push(` name: ${ext.name}`);
|
|
245
|
+
lines.push(` timeout: ${ext.timeout}`);
|
|
246
|
+
lines.push(` type: ${ext.type}`);
|
|
247
|
+
lines.push(` url: "${ext.url}"`);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return lines.join('\n') + '\n';
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -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;;;;;;;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
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;;;;;;;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoI3B"}
|
|
@@ -81,15 +81,16 @@ Delete file with key 'my-key' from my-bucket within my-app
|
|
|
81
81
|
// Application + bucket - find specific bucket within application
|
|
82
82
|
const applicationName = this.flags.application;
|
|
83
83
|
const config = await this.loadConfig();
|
|
84
|
-
const applicationVersionId = config.versionId ||
|
|
84
|
+
const applicationVersionId = config.versionId || undefined;
|
|
85
85
|
const { client: catalogService } = await this.catalogService();
|
|
86
|
-
const
|
|
86
|
+
const queryParams = {
|
|
87
87
|
userId,
|
|
88
88
|
applicationName,
|
|
89
|
-
applicationVersionId,
|
|
90
89
|
organizationId,
|
|
91
90
|
moduleType: 'smartbucket',
|
|
92
|
-
|
|
91
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
92
|
+
};
|
|
93
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
93
94
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
94
95
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
95
96
|
}
|
|
@@ -108,8 +109,11 @@ Delete file with key 'my-key' from my-bucket within my-app
|
|
|
108
109
|
}
|
|
109
110
|
bucketLocation = {
|
|
110
111
|
bucketLocation: {
|
|
111
|
-
case: '
|
|
112
|
-
value:
|
|
112
|
+
case: 'bucket',
|
|
113
|
+
value: {
|
|
114
|
+
name: bucketName,
|
|
115
|
+
version: bucketModule.applicationVersionId,
|
|
116
|
+
},
|
|
113
117
|
},
|
|
114
118
|
};
|
|
115
119
|
}
|
|
@@ -132,15 +136,16 @@ Delete file with key 'my-key' from my-bucket within my-app
|
|
|
132
136
|
// Application only - use first bucket found
|
|
133
137
|
const applicationName = this.flags.application;
|
|
134
138
|
const config = await this.loadConfig();
|
|
135
|
-
const applicationVersionId = config.versionId ||
|
|
139
|
+
const applicationVersionId = config.versionId || undefined;
|
|
136
140
|
const { client: catalogService } = await this.catalogService();
|
|
137
|
-
const
|
|
141
|
+
const queryParams = {
|
|
138
142
|
userId,
|
|
139
143
|
applicationName,
|
|
140
|
-
applicationVersionId,
|
|
141
144
|
organizationId,
|
|
142
145
|
moduleType: 'smartbucket',
|
|
143
|
-
|
|
146
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
147
|
+
};
|
|
148
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
144
149
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
145
150
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
146
151
|
}
|
|
@@ -150,8 +155,11 @@ Delete file with key 'my-key' from my-bucket within my-app
|
|
|
150
155
|
}
|
|
151
156
|
bucketLocation = {
|
|
152
157
|
bucketLocation: {
|
|
153
|
-
case: '
|
|
154
|
-
value:
|
|
158
|
+
case: 'bucket',
|
|
159
|
+
value: {
|
|
160
|
+
name: bucketModule.name,
|
|
161
|
+
version: bucketModule.applicationVersionId,
|
|
162
|
+
},
|
|
155
163
|
},
|
|
156
164
|
};
|
|
157
165
|
}
|
|
@@ -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;;;;;;;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
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;;;;;;;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+J3B"}
|
|
@@ -85,15 +85,16 @@ Download file with key 'my-key' from my-bucket within my-app to output.txt
|
|
|
85
85
|
// Application + bucket - find specific bucket within application
|
|
86
86
|
const applicationName = this.flags.application;
|
|
87
87
|
const config = await this.loadConfig();
|
|
88
|
-
const applicationVersionId = config.versionId ||
|
|
88
|
+
const applicationVersionId = config.versionId || undefined;
|
|
89
89
|
const { client: catalogService } = await this.catalogService();
|
|
90
|
-
const
|
|
90
|
+
const queryParams = {
|
|
91
91
|
userId,
|
|
92
92
|
applicationName,
|
|
93
|
-
applicationVersionId,
|
|
94
93
|
organizationId,
|
|
95
94
|
moduleType: 'smartbucket',
|
|
96
|
-
|
|
95
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
96
|
+
};
|
|
97
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
97
98
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
98
99
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
99
100
|
}
|
|
@@ -112,8 +113,11 @@ Download file with key 'my-key' from my-bucket within my-app to output.txt
|
|
|
112
113
|
}
|
|
113
114
|
bucketLocation = {
|
|
114
115
|
bucketLocation: {
|
|
115
|
-
case: '
|
|
116
|
-
value:
|
|
116
|
+
case: 'bucket',
|
|
117
|
+
value: {
|
|
118
|
+
name: bucketName,
|
|
119
|
+
version: bucketModule.applicationVersionId,
|
|
120
|
+
},
|
|
117
121
|
},
|
|
118
122
|
};
|
|
119
123
|
}
|
|
@@ -136,15 +140,16 @@ Download file with key 'my-key' from my-bucket within my-app to output.txt
|
|
|
136
140
|
// Application only - use first bucket found
|
|
137
141
|
const applicationName = this.flags.application;
|
|
138
142
|
const config = await this.loadConfig();
|
|
139
|
-
const applicationVersionId = config.versionId ||
|
|
143
|
+
const applicationVersionId = config.versionId || undefined;
|
|
140
144
|
const { client: catalogService } = await this.catalogService();
|
|
141
|
-
const
|
|
145
|
+
const queryParams = {
|
|
142
146
|
userId,
|
|
143
147
|
applicationName,
|
|
144
|
-
applicationVersionId,
|
|
145
148
|
organizationId,
|
|
146
149
|
moduleType: 'smartbucket',
|
|
147
|
-
|
|
150
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
151
|
+
};
|
|
152
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
148
153
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
149
154
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
150
155
|
}
|
|
@@ -154,8 +159,11 @@ Download file with key 'my-key' from my-bucket within my-app to output.txt
|
|
|
154
159
|
}
|
|
155
160
|
bucketLocation = {
|
|
156
161
|
bucketLocation: {
|
|
157
|
-
case: '
|
|
158
|
-
value:
|
|
162
|
+
case: 'bucket',
|
|
163
|
+
value: {
|
|
164
|
+
name: bucketModule.name,
|
|
165
|
+
version: bucketModule.applicationVersionId,
|
|
166
|
+
},
|
|
159
167
|
},
|
|
160
168
|
};
|
|
161
169
|
}
|
|
@@ -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;AAEpD,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;;;;;;;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/object/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,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;;;;;;;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkK3B"}
|
|
@@ -79,15 +79,16 @@ List objects in my-bucket within my-app
|
|
|
79
79
|
// Application + bucket - find specific bucket within application
|
|
80
80
|
const applicationName = this.flags.application;
|
|
81
81
|
const config = await this.loadConfig();
|
|
82
|
-
const applicationVersionId = config.versionId ||
|
|
82
|
+
const applicationVersionId = config.versionId || undefined;
|
|
83
83
|
const { client: catalogService } = await this.catalogService();
|
|
84
|
-
const
|
|
84
|
+
const queryParams = {
|
|
85
85
|
userId,
|
|
86
86
|
applicationName,
|
|
87
|
-
applicationVersionId,
|
|
88
87
|
organizationId,
|
|
89
88
|
moduleType: 'smartbucket',
|
|
90
|
-
|
|
89
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
90
|
+
};
|
|
91
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
91
92
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
92
93
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
93
94
|
}
|
|
@@ -107,8 +108,11 @@ List objects in my-bucket within my-app
|
|
|
107
108
|
}
|
|
108
109
|
bucketLocation = {
|
|
109
110
|
bucketLocation: {
|
|
110
|
-
case: '
|
|
111
|
-
value:
|
|
111
|
+
case: 'bucket',
|
|
112
|
+
value: {
|
|
113
|
+
name: bucketName,
|
|
114
|
+
version: bucketModule.applicationVersionId,
|
|
115
|
+
},
|
|
112
116
|
},
|
|
113
117
|
};
|
|
114
118
|
}
|
|
@@ -131,15 +135,16 @@ List objects in my-bucket within my-app
|
|
|
131
135
|
// Application only - use first bucket found
|
|
132
136
|
const applicationName = this.flags.application;
|
|
133
137
|
const config = await this.loadConfig();
|
|
134
|
-
const applicationVersionId = config.versionId ||
|
|
138
|
+
const applicationVersionId = config.versionId || undefined;
|
|
135
139
|
const { client: catalogService } = await this.catalogService();
|
|
136
|
-
const
|
|
140
|
+
const queryParams = {
|
|
137
141
|
userId,
|
|
138
142
|
applicationName,
|
|
139
|
-
applicationVersionId,
|
|
140
143
|
organizationId,
|
|
141
144
|
moduleType: 'smartbucket',
|
|
142
|
-
|
|
145
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
146
|
+
};
|
|
147
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
143
148
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
144
149
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
145
150
|
}
|
|
@@ -149,8 +154,11 @@ List objects in my-bucket within my-app
|
|
|
149
154
|
}
|
|
150
155
|
bucketLocation = {
|
|
151
156
|
bucketLocation: {
|
|
152
|
-
case: '
|
|
153
|
-
value:
|
|
157
|
+
case: 'bucket',
|
|
158
|
+
value: {
|
|
159
|
+
name: bucketModule.name,
|
|
160
|
+
version: bucketModule.applicationVersionId,
|
|
161
|
+
},
|
|
154
162
|
},
|
|
155
163
|
};
|
|
156
164
|
}
|
|
@@ -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;;;;;;;;;;;;;;;MAyCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
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;;;;;;;;;;;;;;;MAyCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA8I1B,OAAO,CAAC,cAAc;CAevB"}
|
|
@@ -93,15 +93,16 @@ Upload myfile.txt to my-bucket within my-app with key 'my-key'
|
|
|
93
93
|
// Application + bucket - find specific bucket within application
|
|
94
94
|
const applicationName = this.flags.application;
|
|
95
95
|
const config = await this.loadConfig();
|
|
96
|
-
const applicationVersionId = config.versionId ||
|
|
96
|
+
const applicationVersionId = config.versionId || undefined;
|
|
97
97
|
const { client: catalogService } = await this.catalogService();
|
|
98
|
-
const
|
|
98
|
+
const queryParams = {
|
|
99
99
|
userId,
|
|
100
100
|
applicationName,
|
|
101
|
-
applicationVersionId,
|
|
102
101
|
organizationId,
|
|
103
102
|
moduleType: 'smartbucket',
|
|
104
|
-
|
|
103
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
104
|
+
};
|
|
105
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
105
106
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
106
107
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
107
108
|
}
|
|
@@ -120,8 +121,11 @@ Upload myfile.txt to my-bucket within my-app with key 'my-key'
|
|
|
120
121
|
}
|
|
121
122
|
bucketLocation = {
|
|
122
123
|
bucketLocation: {
|
|
123
|
-
case: '
|
|
124
|
-
value:
|
|
124
|
+
case: 'bucket',
|
|
125
|
+
value: {
|
|
126
|
+
name: bucketName,
|
|
127
|
+
version: bucketModule.applicationVersionId,
|
|
128
|
+
},
|
|
125
129
|
},
|
|
126
130
|
};
|
|
127
131
|
}
|
|
@@ -144,15 +148,16 @@ Upload myfile.txt to my-bucket within my-app with key 'my-key'
|
|
|
144
148
|
// Application only - use first bucket found
|
|
145
149
|
const applicationName = this.flags.application;
|
|
146
150
|
const config = await this.loadConfig();
|
|
147
|
-
const applicationVersionId = config.versionId ||
|
|
151
|
+
const applicationVersionId = config.versionId || undefined;
|
|
148
152
|
const { client: catalogService } = await this.catalogService();
|
|
149
|
-
const
|
|
153
|
+
const queryParams = {
|
|
150
154
|
userId,
|
|
151
155
|
applicationName,
|
|
152
|
-
applicationVersionId,
|
|
153
156
|
organizationId,
|
|
154
157
|
moduleType: 'smartbucket',
|
|
155
|
-
|
|
158
|
+
...(applicationVersionId && { applicationVersionId }),
|
|
159
|
+
};
|
|
160
|
+
const modulesResp = await catalogService.queryModules(queryParams);
|
|
156
161
|
if (!modulesResp.modules || modulesResp.modules.length === 0) {
|
|
157
162
|
this.error(`No bucket modules found for application '${applicationName}'`);
|
|
158
163
|
}
|
|
@@ -162,8 +167,11 @@ Upload myfile.txt to my-bucket within my-app with key 'my-key'
|
|
|
162
167
|
}
|
|
163
168
|
bucketLocation = {
|
|
164
169
|
bucketLocation: {
|
|
165
|
-
case: '
|
|
166
|
-
value:
|
|
170
|
+
case: 'bucket',
|
|
171
|
+
value: {
|
|
172
|
+
name: bucketModule.name,
|
|
173
|
+
version: bucketModule.applicationVersionId,
|
|
174
|
+
},
|
|
167
175
|
},
|
|
168
176
|
};
|
|
169
177
|
}
|
package/dist/deploy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,WAAW;IAEzD,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAGxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,MAAM,CAAC,CAAC,SAAS,OAAO,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,OAAO,WAAW;IAEzD,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAGxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,MAAM,CAAC,CAAC,SAAS,OAAO,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAoHrG;AAoID,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,OAAO,WAAW;IAE1D,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAExB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,OAAO,CAAC,CAAC,SAAS,OAAO,WAAW,EACxD,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GACzB,OAAO,CACR;IACE,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB,EAAE,CACJ,CA6BA"}
|
package/dist/deploy.js
CHANGED
|
@@ -137,7 +137,7 @@ async function checkEnvironmentVariables(command, app, catalogService, userId, o
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
async function uploadBundles(command, app, buildDir, catalogService, userId, organizationId, currentVersionId) {
|
|
140
|
-
|
|
140
|
+
await Promise.all(app.handlers().map(async (handler) => {
|
|
141
141
|
const bundle = new FileSystemBundle(path.join(buildDir, valueOf(handler.name)));
|
|
142
142
|
await catalogService.uploadBundle({
|
|
143
143
|
userId,
|
|
@@ -149,7 +149,7 @@ async function uploadBundles(command, app, buildDir, catalogService, userId, org
|
|
|
149
149
|
archive: Buffer.from(await archive(bundle)),
|
|
150
150
|
});
|
|
151
151
|
command.log(`Uploaded bundle "${valueOf(handler.name)}"`);
|
|
152
|
-
}
|
|
152
|
+
}));
|
|
153
153
|
}
|
|
154
154
|
async function uploadDbBundle(command, root, catalogService, userId, organizationId, app, currentVersionId) {
|
|
155
155
|
const dbDir = path.join(root, 'db');
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { AnnotationService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/
|
|
|
12
12
|
import { EventStreamService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/events_pb';
|
|
13
13
|
import { RiverjackService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/riverjack_pb';
|
|
14
14
|
import { S3CredentialService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/bucket_api_pb';
|
|
15
|
+
import { WorkOSIntegrationService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/workos_integration_pb';
|
|
15
16
|
export { run } from '@oclif/core';
|
|
16
17
|
export declare const EPOCH_TS: import("@bufbuild/protobuf/wkt").Timestamp;
|
|
17
18
|
export declare function configFromAppFile(appFile: string): Promise<Application[]>;
|
|
@@ -45,6 +46,7 @@ export declare function annotationService(opts: ServiceClientOptions): Promise<S
|
|
|
45
46
|
export declare function eventStreamService(opts: ServiceClientOptions): Promise<ServiceClient<typeof EventStreamService>>;
|
|
46
47
|
export declare function riverjackService(opts: ServiceClientOptions): Promise<ServiceClient<typeof RiverjackService>>;
|
|
47
48
|
export declare function bucketApiService(opts: ServiceClientOptions): Promise<ServiceClient<typeof S3CredentialService>>;
|
|
49
|
+
export declare function workosIntegrationService(opts: ServiceClientOptions): Promise<ServiceClient<typeof WorkOSIntegrationService>>;
|
|
48
50
|
export type ServiceClientOptions = {
|
|
49
51
|
rainbowAuth: StrictClient<typeof RainbowAuthService>;
|
|
50
52
|
configDir: string;
|