@liquidmetal-ai/raindrop 0.8.0 → 0.9.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 +254 -207
- package/bundle/chunk-5AOMZVOJ.js +48 -0
- package/bundle/chunk-5AP5HNN3.js +133 -0
- package/bundle/chunk-6CDCK5IP.js +58 -0
- package/bundle/chunk-6GTBXHHK.js +502 -0
- package/bundle/chunk-A26NDSVL.js +12148 -0
- package/bundle/{chunk-6UE75KX2.js → chunk-AKNNZNIC.js} +1 -2
- package/bundle/{chunk-CW5ZHVPX.js → chunk-DOTQ3CSX.js} +2 -2
- package/bundle/chunk-FO7VH4GU.js +75 -0
- package/bundle/chunk-HEOY5F6W.js +147 -0
- package/bundle/chunk-HMD2JXLE.js +238722 -0
- package/bundle/chunk-KGZ7KWP4.js +44 -0
- package/bundle/chunk-MNUILM7W.js +380 -0
- package/bundle/chunk-OROAB5YF.js +805 -0
- package/bundle/chunk-OZWZILJX.js +4539 -0
- package/bundle/{chunk-6B4I2CKP.js → chunk-YDVG2SA2.js} +4 -4
- package/bundle/chunk-ZQQFKWNC.js +22452 -0
- package/bundle/commands/annotation/get.js +4 -4
- package/bundle/commands/annotation/list.js +4 -4
- package/bundle/commands/annotation/put.js +4 -4
- package/bundle/commands/auth/list.js +2 -2
- package/bundle/commands/auth/login.js +3 -3
- package/bundle/commands/auth/logout.js +2 -2
- package/bundle/commands/auth/select.js +3 -3
- package/bundle/commands/bucket/create-credential.js +3 -3
- package/bundle/commands/bucket/delete-credential.js +3 -3
- package/bundle/commands/bucket/get-credential.js +3 -3
- package/bundle/commands/bucket/list-credentials.js +3 -3
- package/bundle/commands/build/branch.js +26 -14
- package/bundle/commands/build/checkout.js +6 -6
- package/bundle/commands/build/clone.js +5 -5
- package/bundle/commands/build/delete.js +24 -14
- package/bundle/commands/build/deploy.js +25 -13
- package/bundle/commands/build/env/get.js +19 -6
- package/bundle/commands/build/env/set.js +19 -6
- package/bundle/commands/build/find.js +18 -10
- package/bundle/commands/build/generate.js +4 -4
- package/bundle/commands/build/init.js +3 -3
- package/bundle/commands/build/list-templates.js +63 -0
- package/bundle/commands/build/list.js +4 -4
- package/bundle/commands/build/package-template.js +238 -0
- package/bundle/commands/build/sandbox.js +16 -10
- package/bundle/commands/build/start.js +10 -6
- package/bundle/commands/build/status.js +16 -11
- package/bundle/commands/build/stop.js +10 -6
- package/bundle/commands/build/tools/check.js +2 -2
- package/bundle/commands/build/tools/fmt.js +2 -2
- package/bundle/commands/build/unsandbox.js +16 -10
- package/bundle/commands/build/upload.js +23 -9
- package/bundle/commands/build/validate.js +5 -5
- package/bundle/commands/build/workos/delete.js +4 -4
- package/bundle/commands/build/workos/env/attach.js +20 -8
- package/bundle/commands/build/workos/env/create.js +60 -11
- package/bundle/commands/build/workos/env/delete.js +3 -3
- package/bundle/commands/build/workos/env/detach.js +20 -8
- package/bundle/commands/build/workos/env/get.js +21 -3
- package/bundle/commands/build/workos/env/list.js +3 -3
- package/bundle/commands/build/workos/env/set.js +91 -25
- package/bundle/commands/build/workos/invite.js +3 -3
- package/bundle/commands/build/workos/setup.js +14 -5
- package/bundle/commands/build/workos/status.js +116 -25
- package/bundle/commands/dns/create.js +2 -2
- package/bundle/commands/dns/delete.js +4 -4
- package/bundle/commands/dns/get.js +4 -4
- 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/logs/query.js +15 -10
- package/bundle/commands/logs/tail.js +16 -11
- 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 +27 -14
- package/bundle/commands/object/get.js +27 -14
- package/bundle/commands/object/list.js +28 -15
- package/bundle/commands/object/put.js +27 -14
- package/bundle/commands/query/chunk-search.js +24 -10
- package/bundle/commands/query/document.js +39 -16
- package/bundle/commands/query/events.js +13 -8
- package/bundle/commands/query/reindex.js +14 -6
- package/bundle/commands/query/search.js +40 -17
- package/bundle/commands/tail.js +2 -2
- package/bundle/index.js +1 -1
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +27 -0
- package/dist/commands/annotation/get.js +1 -1
- package/dist/commands/annotation/list.js +1 -1
- package/dist/commands/annotation/put.js +1 -1
- package/dist/commands/bucket/create-credential.js +1 -1
- package/dist/commands/bucket/delete-credential.js +1 -1
- package/dist/commands/bucket/get-credential.js +1 -1
- package/dist/commands/bucket/list-credentials.js +1 -1
- package/dist/commands/build/branch.d.ts +2 -0
- package/dist/commands/build/branch.d.ts.map +1 -1
- package/dist/commands/build/branch.js +18 -5
- package/dist/commands/build/checkout.js +1 -1
- package/dist/commands/build/delete.d.ts +1 -0
- package/dist/commands/build/delete.d.ts.map +1 -1
- package/dist/commands/build/delete.js +25 -12
- package/dist/commands/build/deploy.d.ts +2 -0
- package/dist/commands/build/deploy.d.ts.map +1 -1
- package/dist/commands/build/deploy.js +17 -4
- package/dist/commands/build/env/get.d.ts +2 -0
- package/dist/commands/build/env/get.d.ts.map +1 -1
- package/dist/commands/build/env/get.js +18 -4
- package/dist/commands/build/env/set.d.ts +2 -0
- package/dist/commands/build/env/set.d.ts.map +1 -1
- package/dist/commands/build/env/set.js +18 -4
- 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 +18 -7
- package/dist/commands/build/generate.js +1 -1
- package/dist/commands/build/list-templates.d.ts +11 -0
- package/dist/commands/build/list-templates.d.ts.map +1 -0
- package/dist/commands/build/list-templates.js +47 -0
- package/dist/commands/build/list.js +1 -1
- package/dist/commands/build/package-template.d.ts +28 -0
- package/dist/commands/build/package-template.d.ts.map +1 -0
- package/dist/commands/build/package-template.js +256 -0
- package/dist/commands/build/sandbox.d.ts +1 -0
- package/dist/commands/build/sandbox.d.ts.map +1 -1
- package/dist/commands/build/sandbox.js +10 -3
- package/dist/commands/build/start.d.ts +1 -0
- package/dist/commands/build/start.d.ts.map +1 -1
- package/dist/commands/build/start.js +9 -4
- package/dist/commands/build/status.d.ts +1 -0
- package/dist/commands/build/status.d.ts.map +1 -1
- package/dist/commands/build/status.js +13 -7
- package/dist/commands/build/stop.d.ts +1 -0
- package/dist/commands/build/stop.d.ts.map +1 -1
- package/dist/commands/build/stop.js +9 -4
- package/dist/commands/build/unsandbox.d.ts +1 -0
- package/dist/commands/build/unsandbox.d.ts.map +1 -1
- package/dist/commands/build/unsandbox.js +10 -3
- package/dist/commands/build/upload.d.ts +3 -1
- package/dist/commands/build/upload.d.ts.map +1 -1
- package/dist/commands/build/upload.js +19 -4
- package/dist/commands/build/validate.js +1 -1
- package/dist/commands/build/workos/env/attach.d.ts +2 -0
- package/dist/commands/build/workos/env/attach.d.ts.map +1 -1
- package/dist/commands/build/workos/env/attach.js +17 -5
- package/dist/commands/build/workos/env/create.d.ts +3 -0
- package/dist/commands/build/workos/env/create.d.ts.map +1 -1
- package/dist/commands/build/workos/env/create.js +61 -8
- package/dist/commands/build/workos/env/detach.d.ts +2 -0
- package/dist/commands/build/workos/env/detach.d.ts.map +1 -1
- package/dist/commands/build/workos/env/detach.js +17 -5
- package/dist/commands/build/workos/env/get.d.ts.map +1 -1
- package/dist/commands/build/workos/env/get.js +19 -0
- package/dist/commands/build/workos/env/set.d.ts +12 -6
- package/dist/commands/build/workos/env/set.d.ts.map +1 -1
- package/dist/commands/build/workos/env/set.js +83 -22
- package/dist/commands/build/workos/setup.d.ts +1 -0
- package/dist/commands/build/workos/setup.d.ts.map +1 -1
- package/dist/commands/build/workos/setup.js +12 -3
- package/dist/commands/build/workos/status.d.ts +5 -0
- package/dist/commands/build/workos/status.d.ts.map +1 -1
- package/dist/commands/build/workos/status.js +128 -21
- package/dist/commands/logs/query.d.ts +1 -0
- package/dist/commands/logs/query.d.ts.map +1 -1
- package/dist/commands/logs/query.js +13 -7
- package/dist/commands/logs/tail.d.ts +1 -0
- package/dist/commands/logs/tail.d.ts.map +1 -1
- package/dist/commands/logs/tail.js +14 -8
- package/dist/commands/object/delete.d.ts +1 -0
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +25 -11
- package/dist/commands/object/get.d.ts +1 -0
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +25 -11
- package/dist/commands/object/list.d.ts +1 -0
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +26 -12
- package/dist/commands/object/put.d.ts +1 -0
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +25 -11
- package/dist/commands/query/chunk-search.d.ts +1 -0
- package/dist/commands/query/chunk-search.d.ts.map +1 -1
- package/dist/commands/query/chunk-search.js +21 -6
- package/dist/commands/query/document.d.ts +3 -1
- package/dist/commands/query/document.d.ts.map +1 -1
- package/dist/commands/query/document.js +36 -13
- package/dist/commands/query/events.d.ts +1 -0
- package/dist/commands/query/events.d.ts.map +1 -1
- package/dist/commands/query/events.js +12 -6
- package/dist/commands/query/reindex.d.ts +1 -0
- package/dist/commands/query/reindex.d.ts.map +1 -1
- package/dist/commands/query/reindex.js +13 -4
- package/dist/commands/query/search.d.ts +2 -0
- package/dist/commands/query/search.d.ts.map +1 -1
- package/dist/commands/query/search.js +37 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/templates/registry.d.ts +38 -0
- package/dist/templates/registry.d.ts.map +1 -0
- package/dist/templates/registry.js +72 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/oclif.manifest.json +2823 -2047
- package/package.json +3 -3
- 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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import * as fs from 'node:fs/promises';
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import { BaseCommand } from '../../base-command.js';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
export default class PackageTemplate extends BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
'app-name': Args.string({ description: 'Name for the template application (kebab-case)', required: true }),
|
|
9
|
+
description: Args.string({ description: 'Description of the template', required: true }),
|
|
10
|
+
path: Args.string({ description: 'Destination path for the template', required: true }),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Package the current raindrop project as a template';
|
|
13
|
+
static examples = [
|
|
14
|
+
'<%= config.bin %> <%= command.id %> my-app "A sample application" ./templates',
|
|
15
|
+
];
|
|
16
|
+
static flags = {
|
|
17
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { 'app-name': appName, description, path: destPath } = this.args;
|
|
21
|
+
// Validate app-name is kebab-case
|
|
22
|
+
if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(appName)) {
|
|
23
|
+
this.error('App name must be in kebab-case format (e.g., my-app-name)', { exit: 1 });
|
|
24
|
+
}
|
|
25
|
+
// Get the current working directory (project root)
|
|
26
|
+
const projectRoot = process.cwd();
|
|
27
|
+
// Construct destination directory
|
|
28
|
+
const destDir = path.resolve(destPath, appName);
|
|
29
|
+
// Check if destination exists and warn user
|
|
30
|
+
try {
|
|
31
|
+
await fs.access(destDir);
|
|
32
|
+
this.warn(`Directory ${destDir} already exists. It will be overwritten.`);
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Directory doesn't exist, which is fine
|
|
36
|
+
}
|
|
37
|
+
// Create destination directory
|
|
38
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
39
|
+
this.log(`Packaging template from ${projectRoot} to ${destDir}...`);
|
|
40
|
+
// Copy project files with exclusions
|
|
41
|
+
await this.copyProjectFiles(projectRoot, destDir);
|
|
42
|
+
// Update package.json
|
|
43
|
+
await this.updatePackageJson(destDir, appName);
|
|
44
|
+
// Update raindrop.manifest
|
|
45
|
+
await this.updateManifest(destDir, appName);
|
|
46
|
+
// Copy ~/.raindrop/ docs
|
|
47
|
+
await this.copyRaindropDocs(destDir);
|
|
48
|
+
// Remove .git directory
|
|
49
|
+
await this.removeGitInfo(destDir);
|
|
50
|
+
// Create docs/README.md
|
|
51
|
+
await this.createDocsReadme(destDir, appName, description);
|
|
52
|
+
// Create .gitignore
|
|
53
|
+
await this.createGitignore(destDir);
|
|
54
|
+
this.log(`\nTemplate packaged successfully at ${destDir}`);
|
|
55
|
+
}
|
|
56
|
+
async copyProjectFiles(source, dest) {
|
|
57
|
+
const excludeDirs = ['node_modules', 'dist', 'build', '.git'];
|
|
58
|
+
const excludeFiles = ['.env', '.env.local', '.env.production', 'secrets.json'];
|
|
59
|
+
const copyRecursive = async (src, dst) => {
|
|
60
|
+
const entries = await fs.readdir(src, { withFileTypes: true });
|
|
61
|
+
for (const entry of entries) {
|
|
62
|
+
const srcPath = path.join(src, entry.name);
|
|
63
|
+
const dstPath = path.join(dst, entry.name);
|
|
64
|
+
if (entry.isDirectory()) {
|
|
65
|
+
if (excludeDirs.includes(entry.name)) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
await fs.mkdir(dstPath, { recursive: true });
|
|
69
|
+
await copyRecursive(srcPath, dstPath);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (excludeFiles.includes(entry.name)) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
await fs.copyFile(srcPath, dstPath);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
await copyRecursive(source, dest);
|
|
80
|
+
}
|
|
81
|
+
async updatePackageJson(destDir, appName) {
|
|
82
|
+
const packageJsonPath = path.join(destDir, 'package.json');
|
|
83
|
+
try {
|
|
84
|
+
const content = await fs.readFile(packageJsonPath, 'utf-8');
|
|
85
|
+
const packageJson = JSON.parse(content);
|
|
86
|
+
packageJson.name = appName;
|
|
87
|
+
await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
|
|
88
|
+
this.log(`Updated package.json with name: ${appName}`);
|
|
89
|
+
}
|
|
90
|
+
catch (_error) {
|
|
91
|
+
this.warn(`Could not update package.json: ${_error}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
async updateManifest(destDir, appName) {
|
|
95
|
+
const manifestPath = path.join(destDir, 'raindrop.manifest');
|
|
96
|
+
try {
|
|
97
|
+
const content = await fs.readFile(manifestPath, 'utf-8');
|
|
98
|
+
// Replace the application name in HCL format
|
|
99
|
+
const updated = content.replace(/^application\s+"[^"]+"\s*{/m, `application "${appName}" {`);
|
|
100
|
+
await fs.writeFile(manifestPath, updated, 'utf-8');
|
|
101
|
+
this.log(`Updated raindrop.manifest with application: ${appName}`);
|
|
102
|
+
}
|
|
103
|
+
catch (_error) {
|
|
104
|
+
this.warn(`Could not update raindrop.manifest: ${_error}`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async copyRaindropDocs(destDir) {
|
|
108
|
+
const raindropDir = path.join(os.homedir(), '.raindrop');
|
|
109
|
+
const indexPath = path.join(raindropDir, 'index.json');
|
|
110
|
+
try {
|
|
111
|
+
// Read the current project's raindrop.manifest to get the application name
|
|
112
|
+
const manifestPath = path.join(process.cwd(), 'raindrop.manifest');
|
|
113
|
+
const manifestContent = await fs.readFile(manifestPath, 'utf-8');
|
|
114
|
+
const appNameMatch = manifestContent.match(/^application\s+"([^"]+)"\s*{/m);
|
|
115
|
+
if (!appNameMatch) {
|
|
116
|
+
this.warn('Could not parse application name from raindrop.manifest');
|
|
117
|
+
await fs.mkdir(path.join(destDir, 'docs'), { recursive: true });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const currentAppName = appNameMatch[1];
|
|
121
|
+
// Read index.json to find the session for this application
|
|
122
|
+
const indexContent = await fs.readFile(indexPath, 'utf-8');
|
|
123
|
+
const index = JSON.parse(indexContent);
|
|
124
|
+
// Find the application and get its latest_session_id
|
|
125
|
+
let sessionId = null;
|
|
126
|
+
if (index.applications && index.applications[currentAppName]) {
|
|
127
|
+
sessionId = index.applications[currentAppName].latest_session_id;
|
|
128
|
+
}
|
|
129
|
+
if (!sessionId) {
|
|
130
|
+
this.warn(`Could not find raindrop session for application: ${currentAppName}`);
|
|
131
|
+
await fs.mkdir(path.join(destDir, 'docs'), { recursive: true });
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
// The docs are stored in ~/.raindrop/<session_id>/
|
|
135
|
+
const appDocsDir = path.join(raindropDir, sessionId);
|
|
136
|
+
// Verify the directory exists
|
|
137
|
+
try {
|
|
138
|
+
await fs.access(appDocsDir);
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
this.warn(`Raindrop docs directory not found: ${appDocsDir}`);
|
|
142
|
+
await fs.mkdir(path.join(destDir, 'docs'), { recursive: true });
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const destDocsDir = path.join(destDir, 'docs');
|
|
146
|
+
await fs.mkdir(destDocsDir, { recursive: true });
|
|
147
|
+
// Copy all files from the application docs directory
|
|
148
|
+
const entries = await fs.readdir(appDocsDir, { withFileTypes: true });
|
|
149
|
+
for (const entry of entries) {
|
|
150
|
+
const srcPath = path.join(appDocsDir, entry.name);
|
|
151
|
+
const dstPath = path.join(destDocsDir, entry.name);
|
|
152
|
+
if (entry.isDirectory()) {
|
|
153
|
+
await fs.mkdir(dstPath, { recursive: true });
|
|
154
|
+
// Simple recursive copy for subdirectories
|
|
155
|
+
const copyDir = async (src, dst) => {
|
|
156
|
+
const subEntries = await fs.readdir(src, { withFileTypes: true });
|
|
157
|
+
for (const subEntry of subEntries) {
|
|
158
|
+
const subSrc = path.join(src, subEntry.name);
|
|
159
|
+
const subDst = path.join(dst, subEntry.name);
|
|
160
|
+
if (subEntry.isDirectory()) {
|
|
161
|
+
await fs.mkdir(subDst, { recursive: true });
|
|
162
|
+
await copyDir(subSrc, subDst);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
await fs.copyFile(subSrc, subDst);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
await copyDir(srcPath, dstPath);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
await fs.copyFile(srcPath, dstPath);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
this.log(`Copied raindrop docs from ${appDocsDir}`);
|
|
176
|
+
}
|
|
177
|
+
catch (_error) {
|
|
178
|
+
this.warn(`Could not copy raindrop docs: ${_error}`);
|
|
179
|
+
// Create empty docs directory
|
|
180
|
+
await fs.mkdir(path.join(destDir, 'docs'), { recursive: true });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async removeGitInfo(destDir) {
|
|
184
|
+
const gitDir = path.join(destDir, '.git');
|
|
185
|
+
try {
|
|
186
|
+
await fs.rm(gitDir, { recursive: true, force: true });
|
|
187
|
+
this.log('Removed .git directory');
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
// .git directory might not exist, which is fine
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
async createDocsReadme(destDir, appName, description) {
|
|
194
|
+
const docsDir = path.join(destDir, 'docs');
|
|
195
|
+
const readmePath = path.join(docsDir, 'README.md');
|
|
196
|
+
const readmeContent = `# ${appName}
|
|
197
|
+
|
|
198
|
+
## Description
|
|
199
|
+
|
|
200
|
+
${description}
|
|
201
|
+
|
|
202
|
+
## Usage
|
|
203
|
+
|
|
204
|
+
Instructions for using this template will be added here.
|
|
205
|
+
`;
|
|
206
|
+
await fs.writeFile(readmePath, readmeContent, 'utf-8');
|
|
207
|
+
this.log('Created docs/README.md');
|
|
208
|
+
}
|
|
209
|
+
async createGitignore(destDir) {
|
|
210
|
+
const gitignorePath = path.join(destDir, '.gitignore');
|
|
211
|
+
const gitignoreContent = `# Dependencies
|
|
212
|
+
node_modules/
|
|
213
|
+
.pnpm-store/
|
|
214
|
+
|
|
215
|
+
# Build outputs
|
|
216
|
+
dist/
|
|
217
|
+
build/
|
|
218
|
+
*.tsbuildinfo
|
|
219
|
+
|
|
220
|
+
# Environment variables
|
|
221
|
+
.env
|
|
222
|
+
.env.local
|
|
223
|
+
.env.production
|
|
224
|
+
.env.*.local
|
|
225
|
+
|
|
226
|
+
# Secrets
|
|
227
|
+
secrets.json
|
|
228
|
+
*.key
|
|
229
|
+
*.pem
|
|
230
|
+
|
|
231
|
+
# IDE
|
|
232
|
+
.vscode/
|
|
233
|
+
.idea/
|
|
234
|
+
*.swp
|
|
235
|
+
*.swo
|
|
236
|
+
*~
|
|
237
|
+
|
|
238
|
+
# OS
|
|
239
|
+
.DS_Store
|
|
240
|
+
Thumbs.db
|
|
241
|
+
|
|
242
|
+
# Logs
|
|
243
|
+
*.log
|
|
244
|
+
logs/
|
|
245
|
+
|
|
246
|
+
# Testing
|
|
247
|
+
coverage/
|
|
248
|
+
.nyc_output/
|
|
249
|
+
|
|
250
|
+
# Raindrop local config
|
|
251
|
+
.raindrop/
|
|
252
|
+
`;
|
|
253
|
+
await fs.writeFile(gitignorePath, gitignoreContent, 'utf-8');
|
|
254
|
+
this.log('Created .gitignore');
|
|
255
|
+
}
|
|
256
|
+
}
|
|
@@ -6,6 +6,7 @@ export default class Sandbox extends BaseCommand<typeof Sandbox> {
|
|
|
6
6
|
static flags: {
|
|
7
7
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/sandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW,CAAC,OAAO,OAAO,CAAC;IAC9D,MAAM,CAAC,IAAI,KAAM;IACjB,MAAM,CAAC,WAAW,SAAyD;IAE3E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/sandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW,CAAC,OAAO,OAAO,CAAC;IAC9D,MAAM,CAAC,IAAI,KAAM;IACjB,MAAM,CAAC,WAAW,SAAyD;IAE3E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MAmBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwB3B"}
|
|
@@ -17,20 +17,27 @@ export default class Sandbox extends BaseCommand {
|
|
|
17
17
|
hidden: true,
|
|
18
18
|
}),
|
|
19
19
|
manifest: Flags.string({ default: 'raindrop.manifest', description: 'project manifest' }),
|
|
20
|
-
version: Flags.string({
|
|
20
|
+
'version-id': Flags.string({
|
|
21
21
|
char: 'v',
|
|
22
|
-
description: 'application version to sandbox',
|
|
22
|
+
description: 'application version ID to sandbox',
|
|
23
23
|
required: false,
|
|
24
24
|
}),
|
|
25
|
+
version: Flags.string({
|
|
26
|
+
description: 'application version ID to sandbox (alias for --version-id)',
|
|
27
|
+
required: false,
|
|
28
|
+
hidden: true,
|
|
29
|
+
}),
|
|
25
30
|
};
|
|
26
31
|
async run() {
|
|
32
|
+
// Normalize flags (support both old and new names)
|
|
33
|
+
const versionId = this.flags['version-id'] || this.flags.version;
|
|
27
34
|
let applications;
|
|
28
35
|
try {
|
|
29
36
|
applications = await sandbox({
|
|
30
37
|
command: this,
|
|
31
38
|
isSandboxed: true,
|
|
32
39
|
impersonate: this.flags.impersonate,
|
|
33
|
-
versionId
|
|
40
|
+
versionId,
|
|
34
41
|
});
|
|
35
42
|
}
|
|
36
43
|
catch (error) {
|
|
@@ -7,6 +7,7 @@ export default class Start extends BaseCommand<typeof Start> {
|
|
|
7
7
|
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/build/start.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW,CAAC,OAAO,KAAK,CAAC;IAC1D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAkC;IAEpD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/build/start.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW,CAAC,OAAO,KAAK,CAAC;IAC1D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAkC;IAEpD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;MA6BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkC3B"}
|
|
@@ -13,7 +13,6 @@ Start a Raindrop application.
|
|
|
13
13
|
...BaseCommand.HIDDEN_FLAGS,
|
|
14
14
|
root: Flags.string({ char: 'r', description: 'root directory', required: false, default: process.cwd() }),
|
|
15
15
|
manifest: Flags.string({
|
|
16
|
-
char: 'M',
|
|
17
16
|
description: 'project manifest',
|
|
18
17
|
required: false,
|
|
19
18
|
default: 'raindrop.manifest',
|
|
@@ -23,11 +22,16 @@ Start a Raindrop application.
|
|
|
23
22
|
description: 'application to start',
|
|
24
23
|
required: false,
|
|
25
24
|
}),
|
|
26
|
-
version: Flags.string({
|
|
25
|
+
'version-id': Flags.string({
|
|
27
26
|
char: 'v',
|
|
28
|
-
description: 'application version to start',
|
|
27
|
+
description: 'application version ID to start',
|
|
29
28
|
required: false,
|
|
30
29
|
}),
|
|
30
|
+
version: Flags.string({
|
|
31
|
+
description: 'application version ID to start (alias for --version-id)',
|
|
32
|
+
required: false,
|
|
33
|
+
hidden: true,
|
|
34
|
+
}),
|
|
31
35
|
impersonate: Flags.string({
|
|
32
36
|
char: 'i',
|
|
33
37
|
description: 'impersonate organization',
|
|
@@ -51,7 +55,8 @@ Start a Raindrop application.
|
|
|
51
55
|
}
|
|
52
56
|
applicationName = valueOf(app.name);
|
|
53
57
|
}
|
|
54
|
-
|
|
58
|
+
// Normalize flags (support both old and new names)
|
|
59
|
+
const currentVersionId = (this.flags['version-id'] || this.flags.version) ?? config.versionId;
|
|
55
60
|
if (!currentVersionId) {
|
|
56
61
|
this.error('Expected a --version flag to be provided when a version is not currently set');
|
|
57
62
|
}
|
|
@@ -7,6 +7,7 @@ export default class Status extends BaseCommand<typeof Status> {
|
|
|
7
7
|
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
sudo: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/build/status.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAmD;IAErE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/build/status.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAmD;IAErE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;MA0CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsD3B"}
|
|
@@ -15,7 +15,6 @@ export default class Status extends BaseCommand {
|
|
|
15
15
|
...BaseCommand.HIDDEN_FLAGS,
|
|
16
16
|
root: Flags.string({ char: 'r', description: 'root directory', required: false, default: process.cwd() }),
|
|
17
17
|
manifest: Flags.string({
|
|
18
|
-
char: 'M',
|
|
19
18
|
description: 'project manifest',
|
|
20
19
|
required: false,
|
|
21
20
|
default: 'raindrop.manifest',
|
|
@@ -25,11 +24,16 @@ export default class Status extends BaseCommand {
|
|
|
25
24
|
description: 'application',
|
|
26
25
|
required: false,
|
|
27
26
|
}),
|
|
28
|
-
version: Flags.string({
|
|
27
|
+
'version-id': Flags.string({
|
|
29
28
|
char: 'v',
|
|
30
|
-
description: 'application version',
|
|
29
|
+
description: 'application version ID',
|
|
31
30
|
required: false,
|
|
32
31
|
}),
|
|
32
|
+
version: Flags.string({
|
|
33
|
+
description: 'application version ID (alias for --version-id)',
|
|
34
|
+
required: false,
|
|
35
|
+
hidden: true,
|
|
36
|
+
}),
|
|
33
37
|
output: Flags.string({
|
|
34
38
|
char: 'o',
|
|
35
39
|
description: 'output format',
|
|
@@ -52,20 +56,22 @@ export default class Status extends BaseCommand {
|
|
|
52
56
|
};
|
|
53
57
|
async run() {
|
|
54
58
|
const flags = (await this.parse(Status)).flags;
|
|
59
|
+
// Normalize flags (support both old and new names)
|
|
60
|
+
const versionId = flags['version-id'] || flags.version;
|
|
55
61
|
const status = await getStatus({
|
|
56
62
|
command: this,
|
|
57
63
|
root: flags.root,
|
|
58
64
|
manifest: flags.manifest,
|
|
59
65
|
applicationName: flags.application,
|
|
60
|
-
versionId
|
|
66
|
+
versionId,
|
|
61
67
|
impersonate: flags.impersonate,
|
|
62
68
|
});
|
|
63
69
|
if (flags.output === 'compact') {
|
|
64
70
|
// Get application name and version for display
|
|
65
71
|
const applicationName = flags.application || (await this.loadManifest())[0]?.name.value || 'unknown';
|
|
66
|
-
const
|
|
72
|
+
const displayVersionId = versionId || (await this.loadConfig()).versionId;
|
|
67
73
|
const renderer = new StatusRenderer();
|
|
68
|
-
renderer.renderCompact(status, applicationName,
|
|
74
|
+
renderer.renderCompact(status, applicationName, displayVersionId);
|
|
69
75
|
return;
|
|
70
76
|
}
|
|
71
77
|
if (flags.output === 'table') {
|
|
@@ -92,7 +98,7 @@ export default class Status extends BaseCommand {
|
|
|
92
98
|
root: flags.root,
|
|
93
99
|
manifest: flags.manifest,
|
|
94
100
|
applicationName: flags.application,
|
|
95
|
-
versionId
|
|
101
|
+
versionId,
|
|
96
102
|
impersonate: flags.impersonate,
|
|
97
103
|
});
|
|
98
104
|
}
|
|
@@ -7,6 +7,7 @@ export default class Stop extends BaseCommand<typeof Stop> {
|
|
|
7
7
|
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../../src/commands/build/stop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAiC;IAEnD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../../src/commands/build/stop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAiC;IAEnD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;MA6BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkC3B"}
|
|
@@ -13,7 +13,6 @@ Stop a Raindrop application.
|
|
|
13
13
|
...BaseCommand.HIDDEN_FLAGS,
|
|
14
14
|
root: Flags.string({ char: 'r', description: 'root directory', required: false, default: process.cwd() }),
|
|
15
15
|
manifest: Flags.string({
|
|
16
|
-
char: 'M',
|
|
17
16
|
description: 'project manifest',
|
|
18
17
|
required: false,
|
|
19
18
|
default: 'raindrop.manifest',
|
|
@@ -23,11 +22,16 @@ Stop a Raindrop application.
|
|
|
23
22
|
description: 'application to stop',
|
|
24
23
|
required: false,
|
|
25
24
|
}),
|
|
26
|
-
version: Flags.string({
|
|
25
|
+
'version-id': Flags.string({
|
|
27
26
|
char: 'v',
|
|
28
|
-
description: 'application version to
|
|
27
|
+
description: 'application version ID to stop',
|
|
29
28
|
required: false,
|
|
30
29
|
}),
|
|
30
|
+
version: Flags.string({
|
|
31
|
+
description: 'application version ID to stop (alias for --version-id)',
|
|
32
|
+
required: false,
|
|
33
|
+
hidden: true,
|
|
34
|
+
}),
|
|
31
35
|
impersonate: Flags.string({
|
|
32
36
|
char: 'i',
|
|
33
37
|
description: 'impersonate organization',
|
|
@@ -51,7 +55,8 @@ Stop a Raindrop application.
|
|
|
51
55
|
}
|
|
52
56
|
applicationName = valueOf(app.name);
|
|
53
57
|
}
|
|
54
|
-
|
|
58
|
+
// Normalize flags (support both old and new names)
|
|
59
|
+
const currentVersionId = (this.flags['version-id'] || this.flags.version) ?? config.versionId;
|
|
55
60
|
if (!currentVersionId) {
|
|
56
61
|
this.error('Expected a --version flag to be provided when a version is not currently set');
|
|
57
62
|
}
|
|
@@ -6,6 +6,7 @@ export default class Unsandbox extends BaseCommand<typeof Unsandbox> {
|
|
|
6
6
|
static flags: {
|
|
7
7
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unsandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/unsandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI,KAAM;IACjB,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"unsandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/unsandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI,KAAM;IACjB,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;MAmBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwB3B"}
|
|
@@ -17,20 +17,27 @@ export default class Unsandbox extends BaseCommand {
|
|
|
17
17
|
hidden: true,
|
|
18
18
|
}),
|
|
19
19
|
manifest: Flags.string({ default: 'raindrop.manifest', description: 'project manifest' }),
|
|
20
|
-
version: Flags.string({
|
|
20
|
+
'version-id': Flags.string({
|
|
21
21
|
char: 'v',
|
|
22
|
-
description: 'application version to unsandbox',
|
|
22
|
+
description: 'application version ID to unsandbox',
|
|
23
23
|
required: false,
|
|
24
24
|
}),
|
|
25
|
+
version: Flags.string({
|
|
26
|
+
description: 'application version ID to unsandbox (alias for --version-id)',
|
|
27
|
+
required: false,
|
|
28
|
+
hidden: true,
|
|
29
|
+
}),
|
|
25
30
|
};
|
|
26
31
|
async run() {
|
|
32
|
+
// Normalize flags (support both old and new names)
|
|
33
|
+
const versionId = this.flags['version-id'] || this.flags.version;
|
|
27
34
|
let applications;
|
|
28
35
|
try {
|
|
29
36
|
applications = await sandbox({
|
|
30
37
|
command: this,
|
|
31
38
|
isSandboxed: false,
|
|
32
39
|
impersonate: this.flags.impersonate,
|
|
33
|
-
versionId
|
|
40
|
+
versionId,
|
|
34
41
|
});
|
|
35
42
|
}
|
|
36
43
|
catch (error) {
|
|
@@ -7,7 +7,9 @@ export default class Upload extends BaseCommand<typeof Upload> {
|
|
|
7
7
|
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
|
|
10
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
versionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
13
|
impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
14
|
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
15
|
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/commands/build/upload.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,IAAI,KAAM;IAE1B,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/commands/build/upload.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,IAAI,KAAM;IAE1B,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK;;;;;;;;;;;;;;;MA8BnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2ClC"}
|
|
@@ -14,13 +14,26 @@ export default class Upload extends BaseCommand {
|
|
|
14
14
|
...BaseCommand.HIDDEN_FLAGS,
|
|
15
15
|
root: Flags.string({ char: 'r', description: 'root directory', required: false, default: process.cwd() }),
|
|
16
16
|
manifest: Flags.string({
|
|
17
|
-
char: 'M',
|
|
18
17
|
description: 'project manifest',
|
|
19
18
|
required: false,
|
|
20
19
|
default: 'raindrop.manifest',
|
|
21
20
|
}),
|
|
22
21
|
output: Flags.string({ char: 'o', description: 'output directory', required: false, default: 'dist' }),
|
|
23
|
-
|
|
22
|
+
'version-id': Flags.string({ char: 'v', description: 'version ID', required: true }),
|
|
23
|
+
version: Flags.string({
|
|
24
|
+
description: 'version ID (alias for --version-id)',
|
|
25
|
+
required: false,
|
|
26
|
+
hidden: true,
|
|
27
|
+
}),
|
|
28
|
+
versionId: Flags.string({
|
|
29
|
+
description: 'version ID (deprecated, use --version-id)',
|
|
30
|
+
required: false,
|
|
31
|
+
hidden: true,
|
|
32
|
+
deprecated: {
|
|
33
|
+
message: 'use --version-id instead',
|
|
34
|
+
version: '2.0.0',
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
24
37
|
impersonate: Flags.string({
|
|
25
38
|
char: 'i',
|
|
26
39
|
description: 'impersonate organization',
|
|
@@ -37,6 +50,8 @@ export default class Upload extends BaseCommand {
|
|
|
37
50
|
const { client: catalogService, organizationId: defaultOrganizationId, userId } = await this.catalogService();
|
|
38
51
|
const organizationId = this.flags.impersonate ?? defaultOrganizationId;
|
|
39
52
|
const config = await this.loadConfig();
|
|
53
|
+
// Normalize flags (support both old and new names)
|
|
54
|
+
const versionId = (this.flags['version-id'] || this.flags.version || this.flags.versionId) || config.versionId || '';
|
|
40
55
|
const app = apps[0];
|
|
41
56
|
if (!app) {
|
|
42
57
|
this.error('No application found in manifest', { exit: 1 });
|
|
@@ -47,7 +62,7 @@ export default class Upload extends BaseCommand {
|
|
|
47
62
|
userId,
|
|
48
63
|
organizationId,
|
|
49
64
|
applicationName: valueOf(app.name),
|
|
50
|
-
applicationVersionId:
|
|
65
|
+
applicationVersionId: versionId,
|
|
51
66
|
archiveType: BundleArchiveType.ZIP,
|
|
52
67
|
bundleName: valueOf(handler.name),
|
|
53
68
|
archive: Buffer.from(await archive(bundle)),
|
|
@@ -60,7 +75,7 @@ export default class Upload extends BaseCommand {
|
|
|
60
75
|
userId,
|
|
61
76
|
organizationId,
|
|
62
77
|
applicationName: valueOf(app.name),
|
|
63
|
-
applicationVersionId:
|
|
78
|
+
applicationVersionId: versionId,
|
|
64
79
|
archiveType: BundleArchiveType.ZIP,
|
|
65
80
|
bundleName: 'db',
|
|
66
81
|
archive: Buffer.from(await archive(dbBundle)),
|
|
@@ -21,7 +21,7 @@ export default class Build extends BaseCommand {
|
|
|
21
21
|
static flags = {
|
|
22
22
|
root: Flags.string({ char: 'r', description: 'root directory', required: false, default: process.cwd() }),
|
|
23
23
|
manifest: Flags.string({
|
|
24
|
-
char: '
|
|
24
|
+
char: 'm',
|
|
25
25
|
description: 'project manifest',
|
|
26
26
|
required: false,
|
|
27
27
|
default: 'raindrop.manifest',
|
|
@@ -9,6 +9,8 @@ export default class Attach extends BaseCommand<typeof Attach> {
|
|
|
9
9
|
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'version-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
14
|
versionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
15
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
16
|
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/attach.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"attach.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/attach.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;MA2CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwE3B"}
|