@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-OZWZILJX.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib,
|
|
8
8
|
valueOf
|
|
9
|
-
} from "../../../chunk-
|
|
9
|
+
} from "../../../chunk-HMD2JXLE.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/build/env/set.ts
|
|
12
12
|
init_cjs_shims();
|
|
@@ -26,18 +26,30 @@ sets an env var/secret.
|
|
|
26
26
|
...BaseCommand.HIDDEN_FLAGS,
|
|
27
27
|
root: import_core.Flags.string({ char: "r", description: "root directory", required: false, default: process.cwd() }),
|
|
28
28
|
manifest: import_core.Flags.string({
|
|
29
|
-
char: "M",
|
|
30
29
|
description: "project manifest",
|
|
31
30
|
required: false,
|
|
32
31
|
default: "raindrop.manifest"
|
|
33
32
|
}),
|
|
34
33
|
output: import_core.Flags.string({ char: "o", description: "output format", default: "table" }),
|
|
35
|
-
|
|
34
|
+
"version-id": import_core.Flags.string({
|
|
36
35
|
char: "v",
|
|
37
|
-
aliases: ["version"],
|
|
38
36
|
description: "version ID",
|
|
39
37
|
required: false
|
|
40
38
|
}),
|
|
39
|
+
version: import_core.Flags.string({
|
|
40
|
+
description: "version ID (alias for --version-id)",
|
|
41
|
+
required: false,
|
|
42
|
+
hidden: true
|
|
43
|
+
}),
|
|
44
|
+
versionId: import_core.Flags.string({
|
|
45
|
+
description: "version ID (deprecated, use --version-id)",
|
|
46
|
+
required: false,
|
|
47
|
+
hidden: true,
|
|
48
|
+
deprecated: {
|
|
49
|
+
message: "use --version-id instead",
|
|
50
|
+
version: "2.0.0"
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
41
53
|
application: import_core.Flags.string({
|
|
42
54
|
char: "a",
|
|
43
55
|
description: "application to start",
|
|
@@ -94,13 +106,14 @@ sets an env var/secret.
|
|
|
94
106
|
secretValue = Buffer.concat(chunks).toString("utf8");
|
|
95
107
|
}
|
|
96
108
|
const config = await this.loadConfig();
|
|
109
|
+
const versionId = this.flags["version-id"] || this.flags.version || this.flags.versionId || config.versionId || "";
|
|
97
110
|
await catalogService.setEnvs({
|
|
98
111
|
userId,
|
|
99
112
|
organizationId,
|
|
100
113
|
envs: [
|
|
101
114
|
{
|
|
102
115
|
applicationName: valueOf(app.name),
|
|
103
|
-
currentVersionId:
|
|
116
|
+
currentVersionId: versionId,
|
|
104
117
|
key: this.args.var,
|
|
105
118
|
value: secretValue || "",
|
|
106
119
|
isSecret
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
source_default
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-6GTBXHHK.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-OZWZILJX.js";
|
|
7
7
|
import {
|
|
8
8
|
EPOCH_TS,
|
|
9
9
|
QueryModulesResponseSchema,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
timestampDate,
|
|
15
15
|
toJsonString,
|
|
16
16
|
valueOf
|
|
17
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-HMD2JXLE.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/build/find.ts
|
|
20
20
|
init_cjs_shims();
|
|
@@ -46,7 +46,6 @@ Find modules for a specific application and version.
|
|
|
46
46
|
...BaseCommand.HIDDEN_FLAGS,
|
|
47
47
|
root: import_core.Flags.string({ char: "r", description: "root directory", required: false, default: process.cwd() }),
|
|
48
48
|
manifest: import_core.Flags.string({
|
|
49
|
-
char: "M",
|
|
50
49
|
description: "project manifest",
|
|
51
50
|
required: false,
|
|
52
51
|
default: "raindrop.manifest"
|
|
@@ -56,11 +55,16 @@ Find modules for a specific application and version.
|
|
|
56
55
|
description: "application",
|
|
57
56
|
required: false
|
|
58
57
|
}),
|
|
59
|
-
version: import_core.Flags.string({
|
|
58
|
+
"version-id": import_core.Flags.string({
|
|
60
59
|
char: "v",
|
|
61
|
-
description: "application version",
|
|
60
|
+
description: "application version ID",
|
|
62
61
|
required: false
|
|
63
62
|
}),
|
|
63
|
+
version: import_core.Flags.string({
|
|
64
|
+
description: "application version ID (alias for --version-id)",
|
|
65
|
+
required: false,
|
|
66
|
+
hidden: true
|
|
67
|
+
}),
|
|
64
68
|
moduleType: import_core.Flags.string({
|
|
65
69
|
description: "filter by module type (e.g. smartbucket)",
|
|
66
70
|
required: false
|
|
@@ -112,9 +116,12 @@ Find modules for a specific application and version.
|
|
|
112
116
|
let applicationName;
|
|
113
117
|
let applicationVersionId;
|
|
114
118
|
if (!flags.all) {
|
|
115
|
-
|
|
119
|
+
const normalizedVersion = this.flags["version-id"] || this.flags.version;
|
|
120
|
+
if (!normalizedVersion) {
|
|
116
121
|
const config = await this.loadConfig();
|
|
117
122
|
applicationVersionId = config.versionId;
|
|
123
|
+
} else {
|
|
124
|
+
applicationVersionId = normalizedVersion;
|
|
118
125
|
}
|
|
119
126
|
if (!flags.application) {
|
|
120
127
|
const apps = await this.loadManifest();
|
|
@@ -276,9 +283,10 @@ ${source_default.bold(appKey)}${workosInfo} ${source_default.dim(`(${modules.len
|
|
|
276
283
|
return result;
|
|
277
284
|
}
|
|
278
285
|
async queryResources(flags) {
|
|
279
|
-
|
|
286
|
+
let versionId = this.flags["version-id"] || this.flags.version;
|
|
287
|
+
if (!versionId) {
|
|
280
288
|
const config = await this.loadConfig();
|
|
281
|
-
|
|
289
|
+
versionId = config.versionId;
|
|
282
290
|
}
|
|
283
291
|
if (!flags.application) {
|
|
284
292
|
const apps = await this.loadManifest();
|
|
@@ -293,7 +301,7 @@ ${source_default.bold(appKey)}${workosInfo} ${source_default.dim(`(${modules.len
|
|
|
293
301
|
const resp = await catalogService.queryResources({
|
|
294
302
|
userId,
|
|
295
303
|
applicationName: flags.application,
|
|
296
|
-
applicationVersionId:
|
|
304
|
+
applicationVersionId: versionId || "",
|
|
297
305
|
organizationId
|
|
298
306
|
});
|
|
299
307
|
if (flags.output === "table") {
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
codegenPlan,
|
|
5
5
|
gatherEnvForHandler,
|
|
6
6
|
renderCodegenPlan
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-AKNNZNIC.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseCommand
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-OZWZILJX.js";
|
|
11
11
|
import {
|
|
12
12
|
__toESM,
|
|
13
13
|
getCurrentVersion,
|
|
14
14
|
init_cjs_shims,
|
|
15
15
|
require_lib,
|
|
16
16
|
valueOf
|
|
17
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-HMD2JXLE.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/build/generate.ts
|
|
20
20
|
init_cjs_shims();
|
|
@@ -28,7 +28,7 @@ var Generate = class extends BaseCommand {
|
|
|
28
28
|
static flags = {
|
|
29
29
|
root: import_core.Flags.string({ char: "r", description: "root directory", required: false, default: process.cwd() }),
|
|
30
30
|
manifest: import_core.Flags.string({
|
|
31
|
-
char: "
|
|
31
|
+
char: "m",
|
|
32
32
|
description: "project manifest",
|
|
33
33
|
required: false,
|
|
34
34
|
default: "raindrop.manifest"
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
codegenPlan,
|
|
3
3
|
fileExists,
|
|
4
4
|
renderCodegenPlan
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-AKNNZNIC.js";
|
|
6
6
|
import {
|
|
7
7
|
BaseCommand
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-OZWZILJX.js";
|
|
9
9
|
import {
|
|
10
10
|
__toESM,
|
|
11
11
|
getCurrentVersion,
|
|
12
12
|
init_cjs_shims,
|
|
13
13
|
mustManifestFromString,
|
|
14
14
|
require_lib
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-HMD2JXLE.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/build/init.ts
|
|
18
18
|
init_cjs_shims();
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listTemplates
|
|
3
|
+
} from "../../chunk-6CDCK5IP.js";
|
|
4
|
+
import {
|
|
5
|
+
source_default
|
|
6
|
+
} from "../../chunk-MVQYQJHI.js";
|
|
7
|
+
import {
|
|
8
|
+
BaseCommand
|
|
9
|
+
} from "../../chunk-MCRKUPJY.js";
|
|
10
|
+
import {
|
|
11
|
+
__toESM,
|
|
12
|
+
init_cjs_shims,
|
|
13
|
+
require_lib
|
|
14
|
+
} from "../../chunk-G6NE675D.js";
|
|
15
|
+
|
|
16
|
+
// src/commands/build/list-templates.ts
|
|
17
|
+
init_cjs_shims();
|
|
18
|
+
var import_core = __toESM(require_lib(), 1);
|
|
19
|
+
var ListTemplates = class extends BaseCommand {
|
|
20
|
+
static args = {};
|
|
21
|
+
static description = "list available Raindrop templates";
|
|
22
|
+
static examples = [
|
|
23
|
+
`<%= config.bin %> <%= command.id %>
|
|
24
|
+
List all available templates in text format.
|
|
25
|
+
`,
|
|
26
|
+
`<%= config.bin %> <%= command.id %> -o json
|
|
27
|
+
List templates in JSON format.
|
|
28
|
+
`
|
|
29
|
+
];
|
|
30
|
+
static flags = {
|
|
31
|
+
output: import_core.Flags.string({
|
|
32
|
+
char: "o",
|
|
33
|
+
description: "output format",
|
|
34
|
+
default: "text",
|
|
35
|
+
options: ["text", "json"]
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
async run() {
|
|
39
|
+
const templates = listTemplates();
|
|
40
|
+
if (this.flags.output === "json") {
|
|
41
|
+
console.log(JSON.stringify(templates, null, 2));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.log(source_default.bold.underline("\nAvailable Raindrop Templates\n"));
|
|
45
|
+
for (const template of templates) {
|
|
46
|
+
this.log(source_default.bold.cyan(`${template.id}`));
|
|
47
|
+
this.log(` ${source_default.bold("Name:")} ${template.name}`);
|
|
48
|
+
this.log(` ${source_default.bold("Type:")} ${template.type}`);
|
|
49
|
+
this.log(` ${source_default.bold("Description:")} ${template.description}`);
|
|
50
|
+
if (template.type === "clone" && template.githubPath) {
|
|
51
|
+
this.log(` ${source_default.dim(`Source: ${template.githubPath}`)}`);
|
|
52
|
+
}
|
|
53
|
+
this.log("");
|
|
54
|
+
}
|
|
55
|
+
this.log(source_default.dim(`Total: ${templates.length} template${templates.length !== 1 ? "s" : ""}`));
|
|
56
|
+
this.log(source_default.dim("\nTo clone a template, run:"));
|
|
57
|
+
this.log(source_default.dim(" raindrop build clone <template-id> <directory>"));
|
|
58
|
+
this.log("");
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
ListTemplates as default
|
|
63
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
List,
|
|
3
3
|
statusString
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-MNUILM7W.js";
|
|
5
|
+
import "../../chunk-6GTBXHHK.js";
|
|
6
|
+
import "../../chunk-OZWZILJX.js";
|
|
7
|
+
import "../../chunk-HMD2JXLE.js";
|
|
8
8
|
export {
|
|
9
9
|
List as default,
|
|
10
10
|
statusString
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseCommand
|
|
3
|
+
} from "../../chunk-MCRKUPJY.js";
|
|
4
|
+
import {
|
|
5
|
+
__toESM,
|
|
6
|
+
init_cjs_shims,
|
|
7
|
+
require_lib
|
|
8
|
+
} from "../../chunk-G6NE675D.js";
|
|
9
|
+
|
|
10
|
+
// src/commands/build/package-template.ts
|
|
11
|
+
init_cjs_shims();
|
|
12
|
+
var import_core = __toESM(require_lib(), 1);
|
|
13
|
+
import * as fs from "node:fs/promises";
|
|
14
|
+
import * as path from "node:path";
|
|
15
|
+
import os from "node:os";
|
|
16
|
+
var PackageTemplate = class extends BaseCommand {
|
|
17
|
+
static args = {
|
|
18
|
+
"app-name": import_core.Args.string({ description: "Name for the template application (kebab-case)", required: true }),
|
|
19
|
+
description: import_core.Args.string({ description: "Description of the template", required: true }),
|
|
20
|
+
path: import_core.Args.string({ description: "Destination path for the template", required: true })
|
|
21
|
+
};
|
|
22
|
+
static description = "Package the current raindrop project as a template";
|
|
23
|
+
static examples = [
|
|
24
|
+
'<%= config.bin %> <%= command.id %> my-app "A sample application" ./templates'
|
|
25
|
+
];
|
|
26
|
+
static flags = {
|
|
27
|
+
...BaseCommand.HIDDEN_FLAGS
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
const { "app-name": appName, description, path: destPath } = this.args;
|
|
31
|
+
if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(appName)) {
|
|
32
|
+
this.error("App name must be in kebab-case format (e.g., my-app-name)", { exit: 1 });
|
|
33
|
+
}
|
|
34
|
+
const projectRoot = process.cwd();
|
|
35
|
+
const destDir = path.resolve(destPath, appName);
|
|
36
|
+
try {
|
|
37
|
+
await fs.access(destDir);
|
|
38
|
+
this.warn(`Directory ${destDir} already exists. It will be overwritten.`);
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
await fs.mkdir(destDir, { recursive: true });
|
|
42
|
+
this.log(`Packaging template from ${projectRoot} to ${destDir}...`);
|
|
43
|
+
await this.copyProjectFiles(projectRoot, destDir);
|
|
44
|
+
await this.updatePackageJson(destDir, appName);
|
|
45
|
+
await this.updateManifest(destDir, appName);
|
|
46
|
+
await this.copyRaindropDocs(destDir);
|
|
47
|
+
await this.removeGitInfo(destDir);
|
|
48
|
+
await this.createDocsReadme(destDir, appName, description);
|
|
49
|
+
await this.createGitignore(destDir);
|
|
50
|
+
this.log(`
|
|
51
|
+
Template packaged successfully at ${destDir}`);
|
|
52
|
+
}
|
|
53
|
+
async copyProjectFiles(source, dest) {
|
|
54
|
+
const excludeDirs = ["node_modules", "dist", "build", ".git"];
|
|
55
|
+
const excludeFiles = [".env", ".env.local", ".env.production", "secrets.json"];
|
|
56
|
+
const copyRecursive = async (src, dst) => {
|
|
57
|
+
const entries = await fs.readdir(src, { withFileTypes: true });
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const srcPath = path.join(src, entry.name);
|
|
60
|
+
const dstPath = path.join(dst, entry.name);
|
|
61
|
+
if (entry.isDirectory()) {
|
|
62
|
+
if (excludeDirs.includes(entry.name)) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
await fs.mkdir(dstPath, { recursive: true });
|
|
66
|
+
await copyRecursive(srcPath, dstPath);
|
|
67
|
+
} else {
|
|
68
|
+
if (excludeFiles.includes(entry.name)) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
await fs.copyFile(srcPath, dstPath);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
await copyRecursive(source, dest);
|
|
76
|
+
}
|
|
77
|
+
async updatePackageJson(destDir, appName) {
|
|
78
|
+
const packageJsonPath = path.join(destDir, "package.json");
|
|
79
|
+
try {
|
|
80
|
+
const content = await fs.readFile(packageJsonPath, "utf-8");
|
|
81
|
+
const packageJson = JSON.parse(content);
|
|
82
|
+
packageJson.name = appName;
|
|
83
|
+
await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + "\n", "utf-8");
|
|
84
|
+
this.log(`Updated package.json with name: ${appName}`);
|
|
85
|
+
} catch (_error) {
|
|
86
|
+
this.warn(`Could not update package.json: ${_error}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async updateManifest(destDir, appName) {
|
|
90
|
+
const manifestPath = path.join(destDir, "raindrop.manifest");
|
|
91
|
+
try {
|
|
92
|
+
const content = await fs.readFile(manifestPath, "utf-8");
|
|
93
|
+
const updated = content.replace(/^application\s+"[^"]+"\s*{/m, `application "${appName}" {`);
|
|
94
|
+
await fs.writeFile(manifestPath, updated, "utf-8");
|
|
95
|
+
this.log(`Updated raindrop.manifest with application: ${appName}`);
|
|
96
|
+
} catch (_error) {
|
|
97
|
+
this.warn(`Could not update raindrop.manifest: ${_error}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async copyRaindropDocs(destDir) {
|
|
101
|
+
const raindropDir = path.join(os.homedir(), ".raindrop");
|
|
102
|
+
const indexPath = path.join(raindropDir, "index.json");
|
|
103
|
+
try {
|
|
104
|
+
const manifestPath = path.join(process.cwd(), "raindrop.manifest");
|
|
105
|
+
const manifestContent = await fs.readFile(manifestPath, "utf-8");
|
|
106
|
+
const appNameMatch = manifestContent.match(/^application\s+"([^"]+)"\s*{/m);
|
|
107
|
+
if (!appNameMatch) {
|
|
108
|
+
this.warn("Could not parse application name from raindrop.manifest");
|
|
109
|
+
await fs.mkdir(path.join(destDir, "docs"), { recursive: true });
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const currentAppName = appNameMatch[1];
|
|
113
|
+
const indexContent = await fs.readFile(indexPath, "utf-8");
|
|
114
|
+
const index = JSON.parse(indexContent);
|
|
115
|
+
let sessionId = null;
|
|
116
|
+
if (index.applications && index.applications[currentAppName]) {
|
|
117
|
+
sessionId = index.applications[currentAppName].latest_session_id;
|
|
118
|
+
}
|
|
119
|
+
if (!sessionId) {
|
|
120
|
+
this.warn(`Could not find raindrop session for application: ${currentAppName}`);
|
|
121
|
+
await fs.mkdir(path.join(destDir, "docs"), { recursive: true });
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const appDocsDir = path.join(raindropDir, sessionId);
|
|
125
|
+
try {
|
|
126
|
+
await fs.access(appDocsDir);
|
|
127
|
+
} catch {
|
|
128
|
+
this.warn(`Raindrop docs directory not found: ${appDocsDir}`);
|
|
129
|
+
await fs.mkdir(path.join(destDir, "docs"), { recursive: true });
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const destDocsDir = path.join(destDir, "docs");
|
|
133
|
+
await fs.mkdir(destDocsDir, { recursive: true });
|
|
134
|
+
const entries = await fs.readdir(appDocsDir, { withFileTypes: true });
|
|
135
|
+
for (const entry of entries) {
|
|
136
|
+
const srcPath = path.join(appDocsDir, entry.name);
|
|
137
|
+
const dstPath = path.join(destDocsDir, entry.name);
|
|
138
|
+
if (entry.isDirectory()) {
|
|
139
|
+
await fs.mkdir(dstPath, { recursive: true });
|
|
140
|
+
const copyDir = async (src, dst) => {
|
|
141
|
+
const subEntries = await fs.readdir(src, { withFileTypes: true });
|
|
142
|
+
for (const subEntry of subEntries) {
|
|
143
|
+
const subSrc = path.join(src, subEntry.name);
|
|
144
|
+
const subDst = path.join(dst, subEntry.name);
|
|
145
|
+
if (subEntry.isDirectory()) {
|
|
146
|
+
await fs.mkdir(subDst, { recursive: true });
|
|
147
|
+
await copyDir(subSrc, subDst);
|
|
148
|
+
} else {
|
|
149
|
+
await fs.copyFile(subSrc, subDst);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
await copyDir(srcPath, dstPath);
|
|
154
|
+
} else {
|
|
155
|
+
await fs.copyFile(srcPath, dstPath);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
this.log(`Copied raindrop docs from ${appDocsDir}`);
|
|
159
|
+
} catch (_error) {
|
|
160
|
+
this.warn(`Could not copy raindrop docs: ${_error}`);
|
|
161
|
+
await fs.mkdir(path.join(destDir, "docs"), { recursive: true });
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
async removeGitInfo(destDir) {
|
|
165
|
+
const gitDir = path.join(destDir, ".git");
|
|
166
|
+
try {
|
|
167
|
+
await fs.rm(gitDir, { recursive: true, force: true });
|
|
168
|
+
this.log("Removed .git directory");
|
|
169
|
+
} catch {
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async createDocsReadme(destDir, appName, description) {
|
|
173
|
+
const docsDir = path.join(destDir, "docs");
|
|
174
|
+
const readmePath = path.join(docsDir, "README.md");
|
|
175
|
+
const readmeContent = `# ${appName}
|
|
176
|
+
|
|
177
|
+
## Description
|
|
178
|
+
|
|
179
|
+
${description}
|
|
180
|
+
|
|
181
|
+
## Usage
|
|
182
|
+
|
|
183
|
+
Instructions for using this template will be added here.
|
|
184
|
+
`;
|
|
185
|
+
await fs.writeFile(readmePath, readmeContent, "utf-8");
|
|
186
|
+
this.log("Created docs/README.md");
|
|
187
|
+
}
|
|
188
|
+
async createGitignore(destDir) {
|
|
189
|
+
const gitignorePath = path.join(destDir, ".gitignore");
|
|
190
|
+
const gitignoreContent = `# Dependencies
|
|
191
|
+
node_modules/
|
|
192
|
+
.pnpm-store/
|
|
193
|
+
|
|
194
|
+
# Build outputs
|
|
195
|
+
dist/
|
|
196
|
+
build/
|
|
197
|
+
*.tsbuildinfo
|
|
198
|
+
|
|
199
|
+
# Environment variables
|
|
200
|
+
.env
|
|
201
|
+
.env.local
|
|
202
|
+
.env.production
|
|
203
|
+
.env.*.local
|
|
204
|
+
|
|
205
|
+
# Secrets
|
|
206
|
+
secrets.json
|
|
207
|
+
*.key
|
|
208
|
+
*.pem
|
|
209
|
+
|
|
210
|
+
# IDE
|
|
211
|
+
.vscode/
|
|
212
|
+
.idea/
|
|
213
|
+
*.swp
|
|
214
|
+
*.swo
|
|
215
|
+
*~
|
|
216
|
+
|
|
217
|
+
# OS
|
|
218
|
+
.DS_Store
|
|
219
|
+
Thumbs.db
|
|
220
|
+
|
|
221
|
+
# Logs
|
|
222
|
+
*.log
|
|
223
|
+
logs/
|
|
224
|
+
|
|
225
|
+
# Testing
|
|
226
|
+
coverage/
|
|
227
|
+
.nyc_output/
|
|
228
|
+
|
|
229
|
+
# Raindrop local config
|
|
230
|
+
.raindrop/
|
|
231
|
+
`;
|
|
232
|
+
await fs.writeFile(gitignorePath, gitignoreContent, "utf-8");
|
|
233
|
+
this.log("Created .gitignore");
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
export {
|
|
237
|
+
PackageTemplate as default
|
|
238
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sandbox
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-YDVG2SA2.js";
|
|
4
|
+
import "../../chunk-OROAB5YF.js";
|
|
5
|
+
import "../../chunk-DOTQ3CSX.js";
|
|
6
|
+
import "../../chunk-AKNNZNIC.js";
|
|
7
|
+
import "../../chunk-ZQQFKWNC.js";
|
|
8
8
|
import {
|
|
9
9
|
BaseCommand
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-OZWZILJX.js";
|
|
11
11
|
import {
|
|
12
12
|
__toESM,
|
|
13
13
|
init_cjs_shims,
|
|
14
14
|
require_lib
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-HMD2JXLE.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/build/sandbox.ts
|
|
18
18
|
init_cjs_shims();
|
|
@@ -33,20 +33,26 @@ var Sandbox = class extends BaseCommand {
|
|
|
33
33
|
hidden: true
|
|
34
34
|
}),
|
|
35
35
|
manifest: import_core.Flags.string({ default: "raindrop.manifest", description: "project manifest" }),
|
|
36
|
-
version: import_core.Flags.string({
|
|
36
|
+
"version-id": import_core.Flags.string({
|
|
37
37
|
char: "v",
|
|
38
|
-
description: "application version to sandbox",
|
|
38
|
+
description: "application version ID to sandbox",
|
|
39
39
|
required: false
|
|
40
|
+
}),
|
|
41
|
+
version: import_core.Flags.string({
|
|
42
|
+
description: "application version ID to sandbox (alias for --version-id)",
|
|
43
|
+
required: false,
|
|
44
|
+
hidden: true
|
|
40
45
|
})
|
|
41
46
|
};
|
|
42
47
|
async run() {
|
|
48
|
+
const versionId = this.flags["version-id"] || this.flags.version;
|
|
43
49
|
let applications;
|
|
44
50
|
try {
|
|
45
51
|
applications = await sandbox({
|
|
46
52
|
command: this,
|
|
47
53
|
isSandboxed: true,
|
|
48
54
|
impersonate: this.flags.impersonate,
|
|
49
|
-
versionId
|
|
55
|
+
versionId
|
|
50
56
|
});
|
|
51
57
|
} catch (error) {
|
|
52
58
|
if (error instanceof Error) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-OZWZILJX.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib,
|
|
8
8
|
valueOf
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-HMD2JXLE.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/build/start.ts
|
|
12
12
|
init_cjs_shims();
|
|
@@ -23,7 +23,6 @@ Start a Raindrop application.
|
|
|
23
23
|
...BaseCommand.HIDDEN_FLAGS,
|
|
24
24
|
root: import_core.Flags.string({ char: "r", description: "root directory", required: false, default: process.cwd() }),
|
|
25
25
|
manifest: import_core.Flags.string({
|
|
26
|
-
char: "M",
|
|
27
26
|
description: "project manifest",
|
|
28
27
|
required: false,
|
|
29
28
|
default: "raindrop.manifest"
|
|
@@ -33,11 +32,16 @@ Start a Raindrop application.
|
|
|
33
32
|
description: "application to start",
|
|
34
33
|
required: false
|
|
35
34
|
}),
|
|
36
|
-
version: import_core.Flags.string({
|
|
35
|
+
"version-id": import_core.Flags.string({
|
|
37
36
|
char: "v",
|
|
38
|
-
description: "application version to start",
|
|
37
|
+
description: "application version ID to start",
|
|
39
38
|
required: false
|
|
40
39
|
}),
|
|
40
|
+
version: import_core.Flags.string({
|
|
41
|
+
description: "application version ID to start (alias for --version-id)",
|
|
42
|
+
required: false,
|
|
43
|
+
hidden: true
|
|
44
|
+
}),
|
|
41
45
|
impersonate: import_core.Flags.string({
|
|
42
46
|
char: "i",
|
|
43
47
|
description: "impersonate organization",
|
|
@@ -61,7 +65,7 @@ Start a Raindrop application.
|
|
|
61
65
|
}
|
|
62
66
|
applicationName = valueOf(app.name);
|
|
63
67
|
}
|
|
64
|
-
const currentVersionId = this.flags.version ?? config.versionId;
|
|
68
|
+
const currentVersionId = (this.flags["version-id"] || this.flags.version) ?? config.versionId;
|
|
65
69
|
if (!currentVersionId) {
|
|
66
70
|
this.error("Expected a --version flag to be provided when a version is not currently set");
|
|
67
71
|
}
|