@liquidmetal-ai/raindrop 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +327 -89
- package/bundle/build-CBEGQPJT.js +62 -0
- package/bundle/{chunk-IEF2XC25.js → chunk-2PH3PHH3.js} +5 -3
- package/bundle/{chunk-4HZ22KOV.js → chunk-3CMR7ES5.js} +4 -4
- package/bundle/{chunk-JSBM2JYW.js → chunk-3EYKCHIK.js} +1 -1
- package/bundle/chunk-5XHDP4VK.js +1697 -0
- package/bundle/{chunk-TSQK4HH6.js → chunk-674GMSXY.js} +1 -1
- package/bundle/{chunk-PS3WZBDF.js → chunk-6L4V66WZ.js} +1105 -2728
- package/bundle/{chunk-5245CEUM.js → chunk-AGG7JZVH.js} +2 -2
- package/bundle/{chunk-3GFKUF5D.js → chunk-B3IY2XS6.js} +4 -2
- package/bundle/{chunk-WIDI65NO.js → chunk-CBAXTRCS.js} +1 -1
- package/bundle/{chunk-JLVDTXO2.js → chunk-DPV5HIG7.js} +4 -4
- package/bundle/{chunk-36GNZK4A.js → chunk-EVXLXWP7.js} +1 -1
- package/bundle/{chunk-4YVU5KEQ.js → chunk-HN3AAKRY.js} +4 -2
- package/bundle/{chunk-NVNEQXHN.js → chunk-IGLE4Y3B.js} +7 -5
- package/bundle/{chunk-FGSYWVBA.js → chunk-IQ6HFRA6.js} +1 -1
- package/bundle/{chunk-O3QZDJ75.js → chunk-JQONDSHY.js} +2 -2
- package/bundle/{chunk-W4IPOFZC.js → chunk-KADMFJLN.js} +8 -6
- package/bundle/chunk-KG5BLUGU.js +246 -0
- package/bundle/{chunk-V5LHJTYS.js → chunk-KLOYSTZY.js} +13 -2
- package/bundle/{chunk-ETC5VU7H.js → chunk-KXHVSLAI.js} +1 -1
- package/bundle/{chunk-Y4WFGNPM.js → chunk-L6FRQULN.js} +1 -1
- package/bundle/{chunk-3QCVYSRU.js → chunk-LT3BFQ4O.js} +1 -1
- package/bundle/{chunk-KQZJHBNG.js → chunk-MBLKVNI5.js} +1 -1
- package/bundle/{chunk-6AIUQUUM.js → chunk-MFMVJZW6.js} +71 -15
- package/bundle/{chunk-25T7MEKO.js → chunk-MJBLNWG3.js} +1 -1
- package/bundle/{chunk-MSJ33O5Y.js → chunk-NRCQIE3Z.js} +95 -115
- package/bundle/{chunk-XKKPPSPC.js → chunk-OCYTN4IH.js} +2 -2
- package/bundle/{chunk-2GAMWFJE.js → chunk-QEF5D4VE.js} +1 -1
- package/bundle/{chunk-4B3QYXBA.js → chunk-T7MQCLXF.js} +5 -3
- package/bundle/{chunk-LDFYPOXJ.js → chunk-TFQY5TSY.js} +1 -1
- package/bundle/{chunk-BWK4MC7Y.js → chunk-USZXZZAR.js} +8 -6
- package/bundle/{chunk-ER2RCPCY.js → chunk-V54KHS5B.js} +2 -2
- package/bundle/{chunk-YSKASURB.js → chunk-V6J23FL2.js} +1 -1
- package/bundle/{chunk-UHSTDJ7X.js → chunk-VN2QYX4C.js} +1 -1
- package/bundle/{chunk-Z4OWKG7J.js → chunk-VOT5MMEY.js} +1 -1
- package/bundle/{chunk-W6GU26WO.js → chunk-WG6BDFPZ.js} +1 -1
- package/bundle/{chunk-AK77X5GL.js → chunk-XX74I5RK.js} +4 -2
- package/bundle/{chunk-6BT265R3.js → chunk-YQCRWPNI.js} +1 -1
- package/bundle/commands/annotation/get.js +3 -3
- package/bundle/commands/annotation/list.js +3 -3
- package/bundle/commands/annotation/put.js +3 -3
- package/bundle/commands/auth/apikey.js +2 -2
- package/bundle/commands/auth/list.js +2 -2
- package/bundle/commands/auth/login.js +2 -2
- package/bundle/commands/auth/logout.js +2 -2
- package/bundle/commands/auth/select.js +3 -3
- package/bundle/commands/bucket/create-credential.js +2 -2
- package/bundle/commands/bucket/delete-credential.js +2 -2
- package/bundle/commands/bucket/get-credential.js +2 -2
- package/bundle/commands/bucket/list-credentials.js +2 -2
- package/bundle/commands/build/actor/setup.js +124 -0
- package/bundle/commands/build/branch.js +10 -10
- package/bundle/commands/build/bucket-events/setup.js +146 -0
- package/bundle/commands/build/checkout.js +8 -8
- package/bundle/commands/build/clone.js +6 -6
- package/bundle/commands/build/delete.js +8 -8
- package/bundle/commands/build/deploy.js +10 -10
- package/bundle/commands/build/env/get.js +3 -3
- package/bundle/commands/build/env/list.js +2 -2
- package/bundle/commands/build/env/set.js +3 -3
- package/bundle/commands/build/env.js +2 -2
- package/bundle/commands/build/features.js +192 -0
- package/bundle/commands/build/find.js +4 -4
- package/bundle/commands/build/generate.js +52 -3
- package/bundle/commands/build/init-workspace.js +3 -3
- package/bundle/commands/build/init.js +15 -3
- package/bundle/commands/build/list.js +5 -5
- package/bundle/commands/build/queue/setup.js +133 -0
- package/bundle/commands/build/sandbox.js +6 -6
- package/bundle/commands/build/smartbucket/setup.js +165 -0
- package/bundle/commands/build/smartmemory/setup.js +171 -0
- package/bundle/commands/build/smartsql/setup.js +167 -0
- package/bundle/commands/build/start.js +2 -2
- package/bundle/commands/build/status.js +5 -5
- package/bundle/commands/build/stop.js +2 -2
- package/bundle/commands/build/stripe/dashboard.js +3 -3
- package/bundle/commands/build/stripe/onboard.js +3 -3
- package/bundle/commands/build/stripe/setup.js +3 -3
- package/bundle/commands/build/stripe/start.js +14 -14
- package/bundle/commands/build/stripe/status.js +3 -3
- package/bundle/commands/build/stripe/subscription/create.js +4 -4
- package/bundle/commands/build/stripe/subscription/get.js +4 -4
- package/bundle/commands/build/stripe/subscription/update.js +4 -4
- package/bundle/commands/build/tools/check.js +2 -2
- package/bundle/commands/build/tools/fmt.js +2 -2
- package/bundle/commands/build/unsandbox.js +6 -6
- package/bundle/commands/build/upload.js +5 -5
- package/bundle/commands/build/validate.js +85 -14
- package/bundle/commands/build/workos/delete.js +6 -6
- package/bundle/commands/build/workos/env/attach.js +3 -3
- package/bundle/commands/build/workos/env/attached.js +3 -3
- package/bundle/commands/build/workos/env/create.js +3 -3
- package/bundle/commands/build/workos/env/delete.js +3 -3
- package/bundle/commands/build/workos/env/detach.js +3 -3
- package/bundle/commands/build/workos/env/dev-login.js +3 -3
- package/bundle/commands/build/workos/env/get.js +3 -3
- package/bundle/commands/build/workos/env/list.js +3 -3
- package/bundle/commands/build/workos/env/set.js +3 -3
- package/bundle/commands/build/workos/invite.js +3 -3
- package/bundle/commands/build/workos/jwt.js +172 -0
- package/bundle/commands/build/workos/setup.js +3 -3
- package/bundle/commands/build/workos/status.js +3 -3
- package/bundle/commands/dns/create.js +2 -2
- package/bundle/commands/dns/delete.js +6 -6
- package/bundle/commands/dns/get.js +6 -6
- package/bundle/commands/dns/list.js +3 -3
- package/bundle/commands/dns/records/create.js +2 -2
- package/bundle/commands/dns/records/delete.js +3 -3
- package/bundle/commands/dns/records/get.js +2 -2
- package/bundle/commands/dns/records/list.js +2 -2
- package/bundle/commands/dns/records/update.js +2 -2
- package/bundle/commands/doctor.js +309 -0
- package/bundle/commands/logs/query.js +3 -3
- package/bundle/commands/logs/tail.js +3 -3
- package/bundle/commands/mcp/install-claude.js +2 -2
- package/bundle/commands/mcp/install-gemini.js +2 -2
- package/bundle/commands/mcp/install-goose.js +2 -2
- package/bundle/commands/mcp/status.js +2 -2
- package/bundle/commands/object/delete.js +5 -37
- package/bundle/commands/object/get.js +5 -37
- package/bundle/commands/object/list.js +7 -39
- package/bundle/commands/object/put.js +5 -37
- package/bundle/commands/query/chunk-search.js +14 -46
- package/bundle/commands/query/document.js +17 -55
- package/bundle/commands/query/events.js +2 -2
- package/bundle/commands/query/reindex.js +2 -2
- package/bundle/commands/query/search.js +14 -46
- package/bundle/commands/tail.js +2 -2
- package/bundle/index.js +1 -1
- package/dist/commands/build/actor/setup.d.ts +22 -0
- package/dist/commands/build/actor/setup.d.ts.map +1 -0
- package/dist/commands/build/actor/setup.js +116 -0
- package/dist/commands/build/bucket-events/setup.d.ts +22 -0
- package/dist/commands/build/bucket-events/setup.d.ts.map +1 -0
- package/dist/commands/build/bucket-events/setup.js +134 -0
- package/dist/commands/build/features.d.ts +19 -0
- package/dist/commands/build/features.d.ts.map +1 -0
- package/dist/commands/build/features.js +97 -0
- package/dist/commands/build/generate.d.ts +2 -0
- package/dist/commands/build/generate.d.ts.map +1 -1
- package/dist/commands/build/generate.js +52 -0
- package/dist/commands/build/init.d.ts.map +1 -1
- package/dist/commands/build/init.js +10 -0
- package/dist/commands/build/queue/setup.d.ts +21 -0
- package/dist/commands/build/queue/setup.d.ts.map +1 -0
- package/dist/commands/build/queue/setup.js +120 -0
- package/dist/commands/build/smartbucket/setup.d.ts +23 -0
- package/dist/commands/build/smartbucket/setup.d.ts.map +1 -0
- package/dist/commands/build/smartbucket/setup.js +167 -0
- package/dist/commands/build/smartmemory/setup.d.ts +23 -0
- package/dist/commands/build/smartmemory/setup.d.ts.map +1 -0
- package/dist/commands/build/smartmemory/setup.js +172 -0
- package/dist/commands/build/smartsql/setup.d.ts +23 -0
- package/dist/commands/build/smartsql/setup.d.ts.map +1 -0
- package/dist/commands/build/smartsql/setup.js +169 -0
- package/dist/commands/build/validate.d.ts +2 -0
- package/dist/commands/build/validate.d.ts.map +1 -1
- package/dist/commands/build/validate.js +80 -8
- package/dist/commands/build/workos/jwt.d.ts +23 -0
- package/dist/commands/build/workos/jwt.d.ts.map +1 -0
- package/dist/commands/build/workos/jwt.js +172 -0
- package/dist/commands/doctor.d.ts +27 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +328 -0
- package/dist/commands/object/delete.d.ts +0 -2
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +3 -38
- package/dist/commands/object/get.d.ts +0 -2
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +3 -38
- package/dist/commands/object/list.d.ts +0 -2
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +5 -40
- package/dist/commands/object/put.d.ts +0 -2
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +3 -38
- package/dist/commands/query/chunk-search.d.ts +0 -2
- package/dist/commands/query/chunk-search.d.ts.map +1 -1
- package/dist/commands/query/chunk-search.js +12 -46
- package/dist/commands/query/document.d.ts +1 -3
- package/dist/commands/query/document.d.ts.map +1 -1
- package/dist/commands/query/document.js +16 -60
- package/dist/commands/query/search.d.ts +0 -2
- package/dist/commands/query/search.d.ts.map +1 -1
- package/dist/commands/query/search.js +12 -46
- package/dist/feature-catalog.d.ts +28 -0
- package/dist/feature-catalog.d.ts.map +1 -0
- package/dist/feature-catalog.js +104 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/oclif.manifest.json +4811 -3433
- package/package.json +3 -3
- package/templates/examples/smartbucket-minimal.ts.hbs +87 -0
- package/templates/examples/smartmemory-minimal.ts.hbs +82 -0
- package/templates/examples/smartsql-minimal.ts.hbs +69 -0
- package/templates/handlers/actor/index.test.ts.hbs +48 -85
- package/templates/handlers/actor/index.ts.hbs +16 -316
- package/templates/handlers/bucket-event-notification/index.ts.hbs +32 -235
- package/templates/handlers/bucket-event-observer.ts.hbs +79 -0
- package/templates/handlers/http-service/index.test.ts.hbs +3 -0
- package/templates/handlers/http-service/index.ts.hbs +43 -15
- package/templates/handlers/queue-consumer-setup.ts.hbs +45 -0
- package/templates/handlers/task/index.test.ts.hbs +30 -112
- package/templates/handlers/task/index.ts.hbs +19 -58
- package/templates/init/RAINDROP.md.hbs +97 -1
- package/templates/init/eslint.config.js +43 -0
- package/templates/init/package.json.hbs +4 -1
- package/templates/init/tsconfig.json +3 -3
- package/bundle/chunk-23UBI7BN.js +0 -48
- package/bundle/chunk-2QWMBNE3.js +0 -384
- package/bundle/chunk-45IYWQDC.js +0 -384
- package/bundle/chunk-5YUO23QU.js +0 -4585
- package/bundle/chunk-6MIGCNUO.js +0 -75
- package/bundle/chunk-7ZJWA6HP.js +0 -805
- package/bundle/chunk-AIYVX2M7.js +0 -44
- package/bundle/chunk-BB5TNIEM.js +0 -48
- package/bundle/chunk-BUR3HFKH.js +0 -488
- package/bundle/chunk-BYSBS7KT.js +0 -488
- package/bundle/chunk-CX3RWI62.js +0 -28658
- package/bundle/chunk-DLH7MI57.js +0 -305
- package/bundle/chunk-E3WJIYJZ.js +0 -12148
- package/bundle/chunk-EX7NOPRF.js +0 -12148
- package/bundle/chunk-F76JQS2J.js +0 -231
- package/bundle/chunk-FBOXMVKD.js +0 -28679
- package/bundle/chunk-FTPZ6SQW.js +0 -238909
- package/bundle/chunk-H3CFZ7ZH.js +0 -74
- package/bundle/chunk-HXOILVWA.js +0 -384
- package/bundle/chunk-IMP7O5AC.js +0 -22452
- package/bundle/chunk-IPYOAKRE.js +0 -231
- package/bundle/chunk-J7HN6XF2.js +0 -4461
- package/bundle/chunk-JOLOAALA.js +0 -231
- package/bundle/chunk-JZ2G4Q35.js +0 -4585
- package/bundle/chunk-KVAWPWF7.js +0 -231
- package/bundle/chunk-MEUAAIXV.js +0 -28657
- package/bundle/chunk-QBWFE57Z.js +0 -384
- package/bundle/chunk-SP3LOXPC.js +0 -46
- package/bundle/chunk-T7C564PR.js +0 -28678
- package/bundle/chunk-UFH545WJ.js +0 -22452
- package/bundle/chunk-UHVMPWM5.js +0 -315
- package/bundle/chunk-VB7ZTSZV.js +0 -1089
- package/bundle/chunk-VBIJDFMJ.js +0 -384
- package/bundle/chunk-VR7RLTE3.js +0 -231
- package/bundle/chunk-WFZUJLEC.js +0 -231
- package/bundle/chunk-YDGJTLVZ.js +0 -133
- package/bundle/chunk-YPNQ7UFK.js +0 -502
- package/bundle/chunk-YXFDRMSN.js +0 -384
- package/dist/lib/dns-utils.d.ts +0 -7
- package/dist/lib/dns-utils.d.ts.map +0 -1
- package/dist/lib/dns-utils.js +0 -44
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import {
|
|
2
|
+
source_default
|
|
3
|
+
} from "../../chunk-V6J23FL2.js";
|
|
4
|
+
import {
|
|
5
|
+
BaseCommand
|
|
6
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
7
|
+
import {
|
|
8
|
+
__toESM,
|
|
9
|
+
init_cjs_shims,
|
|
10
|
+
require_lib
|
|
11
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
12
|
+
|
|
13
|
+
// src/commands/build/features.ts
|
|
14
|
+
init_cjs_shims();
|
|
15
|
+
var import_core = __toESM(require_lib(), 1);
|
|
16
|
+
|
|
17
|
+
// src/feature-catalog.ts
|
|
18
|
+
init_cjs_shims();
|
|
19
|
+
var FEATURE_CATALOG = [
|
|
20
|
+
// === Data & Storage ===
|
|
21
|
+
{
|
|
22
|
+
id: "smartbucket",
|
|
23
|
+
name: "SmartBucket",
|
|
24
|
+
description: "File storage with AI-powered search",
|
|
25
|
+
category: "data",
|
|
26
|
+
available: true,
|
|
27
|
+
command: "raindrop build smartbucket setup"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "smartsql",
|
|
31
|
+
name: "SmartSQL",
|
|
32
|
+
description: "PostgreSQL with natural language queries",
|
|
33
|
+
category: "data",
|
|
34
|
+
available: true,
|
|
35
|
+
command: "raindrop build smartsql setup"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "smartmemory",
|
|
39
|
+
name: "SmartMemory",
|
|
40
|
+
description: "AI conversation memory management",
|
|
41
|
+
category: "data",
|
|
42
|
+
available: true,
|
|
43
|
+
command: "raindrop build smartmemory setup"
|
|
44
|
+
},
|
|
45
|
+
// === Architecture Patterns ===
|
|
46
|
+
{
|
|
47
|
+
id: "actor",
|
|
48
|
+
name: "Stateful Actor",
|
|
49
|
+
description: "Durable objects with state management",
|
|
50
|
+
category: "architecture",
|
|
51
|
+
available: true,
|
|
52
|
+
command: "raindrop build actor setup"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "queue",
|
|
56
|
+
name: "Queue Consumer",
|
|
57
|
+
description: "Background queue message processing",
|
|
58
|
+
category: "architecture",
|
|
59
|
+
available: true,
|
|
60
|
+
command: "raindrop build queue setup"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "bucket-events",
|
|
64
|
+
name: "Bucket Events",
|
|
65
|
+
description: "React to file upload/delete events",
|
|
66
|
+
category: "architecture",
|
|
67
|
+
available: true,
|
|
68
|
+
command: "raindrop build bucket-events setup"
|
|
69
|
+
},
|
|
70
|
+
// === Integrations ===
|
|
71
|
+
{
|
|
72
|
+
id: "workos",
|
|
73
|
+
name: "WorkOS Auth",
|
|
74
|
+
description: "Authentication with WorkOS",
|
|
75
|
+
category: "integration",
|
|
76
|
+
available: true,
|
|
77
|
+
command: "raindrop build workos setup"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "stripe",
|
|
81
|
+
name: "Stripe Payments",
|
|
82
|
+
description: "Payment processing with Stripe",
|
|
83
|
+
category: "integration",
|
|
84
|
+
available: true,
|
|
85
|
+
command: "raindrop build stripe setup"
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
function getFeatures(onlyAvailable = false) {
|
|
89
|
+
if (onlyAvailable) {
|
|
90
|
+
return FEATURE_CATALOG.filter((f) => f.available);
|
|
91
|
+
}
|
|
92
|
+
return FEATURE_CATALOG;
|
|
93
|
+
}
|
|
94
|
+
function getFeaturesByCategory() {
|
|
95
|
+
const grouped = {
|
|
96
|
+
data: [],
|
|
97
|
+
architecture: [],
|
|
98
|
+
integration: []
|
|
99
|
+
};
|
|
100
|
+
for (const feature of FEATURE_CATALOG) {
|
|
101
|
+
grouped[feature.category].push(feature);
|
|
102
|
+
}
|
|
103
|
+
return grouped;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// src/commands/build/features.ts
|
|
107
|
+
var Features = class extends BaseCommand {
|
|
108
|
+
static args = {};
|
|
109
|
+
static description = "List available features and integrations for Raindrop apps";
|
|
110
|
+
static examples = [
|
|
111
|
+
`<%= config.bin %> <%= command.id %>
|
|
112
|
+
List all available features grouped by category
|
|
113
|
+
|
|
114
|
+
<%= config.bin %> <%= command.id %> --available-only
|
|
115
|
+
Show only features that are currently ready to use
|
|
116
|
+
|
|
117
|
+
<%= config.bin %> <%= command.id %> --output json
|
|
118
|
+
Get machine-readable JSON output
|
|
119
|
+
`
|
|
120
|
+
];
|
|
121
|
+
static flags = {
|
|
122
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
123
|
+
"available-only": import_core.Flags.boolean({
|
|
124
|
+
description: "show only features that are currently available",
|
|
125
|
+
default: false
|
|
126
|
+
}),
|
|
127
|
+
output: import_core.Flags.string({
|
|
128
|
+
char: "o",
|
|
129
|
+
description: "output format",
|
|
130
|
+
default: "text",
|
|
131
|
+
options: ["text", "json"]
|
|
132
|
+
})
|
|
133
|
+
};
|
|
134
|
+
async run() {
|
|
135
|
+
const onlyAvailable = this.flags["available-only"];
|
|
136
|
+
if (this.flags.output === "json") {
|
|
137
|
+
const features = getFeatures(onlyAvailable);
|
|
138
|
+
console.log(JSON.stringify(features, null, 2));
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
this.log("");
|
|
142
|
+
this.log(source_default.bold.underline("Available Features for Raindrop Apps"));
|
|
143
|
+
this.log("");
|
|
144
|
+
const grouped = getFeaturesByCategory();
|
|
145
|
+
this.log(source_default.bold.cyan("\u{1F4E6} Data & Storage"));
|
|
146
|
+
this.log("");
|
|
147
|
+
for (const feature of grouped.data) {
|
|
148
|
+
if (onlyAvailable && !feature.available) continue;
|
|
149
|
+
const command = feature.command ? source_default.dim(`
|
|
150
|
+
$ ${feature.command}`) : source_default.yellow(" (planned)");
|
|
151
|
+
this.log(` ${source_default.bold(feature.name.padEnd(20))} ${feature.description}${command}`);
|
|
152
|
+
this.log("");
|
|
153
|
+
}
|
|
154
|
+
this.log(source_default.bold.magenta("\u{1F3D7} Architecture Patterns"));
|
|
155
|
+
this.log("");
|
|
156
|
+
for (const feature of grouped.architecture) {
|
|
157
|
+
if (onlyAvailable && !feature.available) continue;
|
|
158
|
+
const command = feature.command ? source_default.dim(`
|
|
159
|
+
$ ${feature.command}`) : source_default.yellow(" (planned)");
|
|
160
|
+
this.log(` ${source_default.bold(feature.name.padEnd(20))} ${feature.description}${command}`);
|
|
161
|
+
this.log("");
|
|
162
|
+
}
|
|
163
|
+
this.log(source_default.bold.blue("\u{1F50C} Integrations"));
|
|
164
|
+
this.log("");
|
|
165
|
+
for (const feature of grouped.integration) {
|
|
166
|
+
if (onlyAvailable && !feature.available) continue;
|
|
167
|
+
const command = feature.command ? source_default.dim(`
|
|
168
|
+
$ ${feature.command}`) : source_default.yellow(" (planned)");
|
|
169
|
+
this.log(` ${source_default.bold(feature.name.padEnd(20))} ${feature.description}${command}`);
|
|
170
|
+
this.log("");
|
|
171
|
+
}
|
|
172
|
+
this.log(source_default.dim("\u2500".repeat(60)));
|
|
173
|
+
const availableCount = getFeatures(true).length;
|
|
174
|
+
const totalCount = getFeatures(false).length;
|
|
175
|
+
this.log(source_default.dim(`${availableCount} available, ${totalCount - availableCount} planned`));
|
|
176
|
+
this.log("");
|
|
177
|
+
this.log(source_default.bold("How to add features:"));
|
|
178
|
+
this.log(source_default.dim(" Use the setup command for any feature above, for example:"));
|
|
179
|
+
this.log(source_default.dim(" $ raindrop build smartmemory setup"));
|
|
180
|
+
this.log(source_default.dim(" $ raindrop build smartsql setup"));
|
|
181
|
+
this.log(source_default.dim(" $ raindrop build smartbucket setup"));
|
|
182
|
+
this.log("");
|
|
183
|
+
this.log(source_default.bold("Common combinations:"));
|
|
184
|
+
this.log(source_default.dim(" Chatbot: smartmemory + smartsql + ai"));
|
|
185
|
+
this.log(source_default.dim(" File API: smartbucket + queue"));
|
|
186
|
+
this.log(source_default.dim(" Auth App: workos + smartmemory"));
|
|
187
|
+
this.log("");
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
export {
|
|
191
|
+
Features as default
|
|
192
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkAndDisplayKillswitchStatus
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-V54KHS5B.js";
|
|
4
4
|
import {
|
|
5
5
|
source_default
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-V6J23FL2.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseCommand
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
10
10
|
import {
|
|
11
11
|
EPOCH_TS,
|
|
12
12
|
QueryModulesResponseSchema,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
timestampDate,
|
|
18
18
|
toJsonString,
|
|
19
19
|
valueOf
|
|
20
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/build/find.ts
|
|
23
23
|
init_cjs_shims();
|
|
@@ -4,17 +4,20 @@ import {
|
|
|
4
4
|
codegenPlan,
|
|
5
5
|
gatherEnvForHandler,
|
|
6
6
|
renderCodegenPlan
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-L6FRQULN.js";
|
|
8
|
+
import {
|
|
9
|
+
source_default
|
|
10
|
+
} from "../../chunk-V6J23FL2.js";
|
|
8
11
|
import {
|
|
9
12
|
BaseCommand
|
|
10
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
11
14
|
import {
|
|
12
15
|
__toESM,
|
|
13
16
|
getFrameworkVersion,
|
|
14
17
|
init_cjs_shims,
|
|
15
18
|
require_lib,
|
|
16
19
|
valueOf
|
|
17
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
18
21
|
|
|
19
22
|
// src/commands/build/generate.ts
|
|
20
23
|
init_cjs_shims();
|
|
@@ -68,6 +71,52 @@ var Generate = class extends BaseCommand {
|
|
|
68
71
|
await fs.mkdir(path.dirname(dest), { recursive: true });
|
|
69
72
|
await fs.writeFile(dest, gatherEnvForHandler(handler, app));
|
|
70
73
|
}
|
|
74
|
+
await this.suggestFeatures();
|
|
75
|
+
}
|
|
76
|
+
async suggestFeatures() {
|
|
77
|
+
const manifestPath = path.join(this.flags.root, this.flags.manifest);
|
|
78
|
+
let manifestContent = "";
|
|
79
|
+
try {
|
|
80
|
+
manifestContent = await fs.readFile(manifestPath, "utf-8");
|
|
81
|
+
} catch {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const hasSmartMemory = /^\s*smartmemory\s+"/m.test(manifestContent);
|
|
85
|
+
const hasSmartSQL = /^\s*smartsql\s+"/m.test(manifestContent);
|
|
86
|
+
const hasSmartBucket = /^\s*smartbucket\s+"/m.test(manifestContent);
|
|
87
|
+
const hasQueue = /^\s*queue\s+"/m.test(manifestContent);
|
|
88
|
+
const suggestions = [];
|
|
89
|
+
if (hasSmartMemory && !await this.hasExampleFile("smartmemory-minimal.ts")) {
|
|
90
|
+
suggestions.push("raindrop build smartmemory setup");
|
|
91
|
+
}
|
|
92
|
+
if (hasSmartSQL && !await this.hasExampleFile("smartsql-minimal.ts")) {
|
|
93
|
+
suggestions.push("raindrop build smartsql setup");
|
|
94
|
+
}
|
|
95
|
+
if (hasSmartBucket && !await this.hasExampleFile("smartbucket-minimal.ts")) {
|
|
96
|
+
suggestions.push("raindrop build smartbucket setup");
|
|
97
|
+
}
|
|
98
|
+
if (hasQueue && !await this.hasExampleFile("queue-minimal.ts")) {
|
|
99
|
+
suggestions.push("raindrop build queue setup");
|
|
100
|
+
}
|
|
101
|
+
if (suggestions.length > 0) {
|
|
102
|
+
console.log("");
|
|
103
|
+
console.log(source_default.bold("Tip:") + " Get working examples with setup commands:");
|
|
104
|
+
suggestions.forEach((cmd) => console.log(source_default.dim(` ${cmd}`)));
|
|
105
|
+
console.log("");
|
|
106
|
+
}
|
|
107
|
+
if (suggestions.length === 0 && (hasSmartMemory || hasSmartSQL || hasSmartBucket || hasQueue)) {
|
|
108
|
+
console.log("");
|
|
109
|
+
console.log(source_default.dim("Tip: Explore available features with: raindrop build features"));
|
|
110
|
+
console.log("");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async hasExampleFile(filename) {
|
|
114
|
+
try {
|
|
115
|
+
await fs.access(path.join(this.flags.root, "src", "examples", filename));
|
|
116
|
+
return true;
|
|
117
|
+
} catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
71
120
|
}
|
|
72
121
|
};
|
|
73
122
|
export {
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
TEMPLATES_DIR,
|
|
3
3
|
fileExists,
|
|
4
4
|
renderTemplateFromFile
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-L6FRQULN.js";
|
|
6
6
|
import {
|
|
7
7
|
BaseCommand
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
9
9
|
import {
|
|
10
10
|
__toESM,
|
|
11
11
|
init_cjs_shims,
|
|
12
12
|
require_lib
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/build/init-workspace.ts
|
|
16
16
|
init_cjs_shims();
|
|
@@ -2,17 +2,20 @@ import {
|
|
|
2
2
|
codegenPlan,
|
|
3
3
|
fileExists,
|
|
4
4
|
renderCodegenPlan
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-L6FRQULN.js";
|
|
6
|
+
import {
|
|
7
|
+
source_default
|
|
8
|
+
} from "../../chunk-V6J23FL2.js";
|
|
6
9
|
import {
|
|
7
10
|
BaseCommand
|
|
8
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
9
12
|
import {
|
|
10
13
|
__toESM,
|
|
11
14
|
getFrameworkVersion,
|
|
12
15
|
init_cjs_shims,
|
|
13
16
|
mustManifestFromString,
|
|
14
17
|
require_lib
|
|
15
|
-
} from "../../chunk-
|
|
18
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
16
19
|
|
|
17
20
|
// src/commands/build/init.ts
|
|
18
21
|
init_cjs_shims();
|
|
@@ -69,6 +72,15 @@ Initialize a project in the current directory.
|
|
|
69
72
|
this.error(`Could not initialize project at ${this.args.path}: ${error}`, { exit: 1 });
|
|
70
73
|
}
|
|
71
74
|
console.log(`Initialized LiquidMetal.AI in ${this.args.path}`);
|
|
75
|
+
console.log("");
|
|
76
|
+
console.log(source_default.bold("Next steps:"));
|
|
77
|
+
console.log(" 1. cd", this.args.path);
|
|
78
|
+
console.log(" 2. npm install");
|
|
79
|
+
console.log(" 3. raindrop build generate");
|
|
80
|
+
console.log(" 4. raindrop build features");
|
|
81
|
+
console.log(" 5. raindrop build deploy --start");
|
|
82
|
+
console.log("");
|
|
83
|
+
console.log(source_default.dim('Tip: Discover available features with "raindrop build features"'));
|
|
72
84
|
}
|
|
73
85
|
};
|
|
74
86
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
List,
|
|
3
3
|
statusString
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-3CMR7ES5.js";
|
|
5
|
+
import "../../chunk-V54KHS5B.js";
|
|
6
|
+
import "../../chunk-V6J23FL2.js";
|
|
7
|
+
import "../../chunk-TFQY5TSY.js";
|
|
8
|
+
import "../../chunk-KLOYSTZY.js";
|
|
9
9
|
export {
|
|
10
10
|
List as default,
|
|
11
11
|
statusString
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TEMPLATES_DIR,
|
|
3
|
+
renderTemplateFromFile
|
|
4
|
+
} from "../../../chunk-L6FRQULN.js";
|
|
5
|
+
import {
|
|
6
|
+
source_default
|
|
7
|
+
} from "../../../chunk-V6J23FL2.js";
|
|
8
|
+
import {
|
|
9
|
+
BaseCommand
|
|
10
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
11
|
+
import {
|
|
12
|
+
__toESM,
|
|
13
|
+
init_cjs_shims,
|
|
14
|
+
require_lib
|
|
15
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
16
|
+
|
|
17
|
+
// src/commands/build/queue/setup.ts
|
|
18
|
+
init_cjs_shims();
|
|
19
|
+
var import_core = __toESM(require_lib(), 1);
|
|
20
|
+
import * as fs from "node:fs/promises";
|
|
21
|
+
import * as path from "node:path";
|
|
22
|
+
var QueueSetup = class extends BaseCommand {
|
|
23
|
+
static args = {};
|
|
24
|
+
static description = "Add a queue with consumer (observer) to your Raindrop app";
|
|
25
|
+
static examples = [
|
|
26
|
+
`<%= config.bin %> <%= command.id %>
|
|
27
|
+
Add queue with default name "my-queue"
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> --name tasks
|
|
30
|
+
Add queue with custom name "tasks"
|
|
31
|
+
`
|
|
32
|
+
];
|
|
33
|
+
static flags = {
|
|
34
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
35
|
+
name: import_core.Flags.string({
|
|
36
|
+
description: "Name for the queue",
|
|
37
|
+
default: "my-queue"
|
|
38
|
+
}),
|
|
39
|
+
"dry-run": import_core.Flags.boolean({
|
|
40
|
+
description: "Preview changes without applying them",
|
|
41
|
+
default: false
|
|
42
|
+
})
|
|
43
|
+
};
|
|
44
|
+
async run() {
|
|
45
|
+
const queueName = this.flags.name;
|
|
46
|
+
const observerName = `${queueName}-consumer`;
|
|
47
|
+
const dryRun = this.flags["dry-run"];
|
|
48
|
+
if (dryRun) {
|
|
49
|
+
this.log(source_default.blue.bold("DRY RUN - Preview of changes (no files will be modified)"));
|
|
50
|
+
this.log("");
|
|
51
|
+
this.log(source_default.blue("Would create:") + " " + source_default.bold(`src/${observerName}/index.ts`));
|
|
52
|
+
this.log(source_default.dim(" - 50 lines of queue consumer code"));
|
|
53
|
+
this.log(source_default.dim(" - Message processing, error handling, retry logic"));
|
|
54
|
+
this.log("");
|
|
55
|
+
this.log(source_default.blue("Would update:") + " " + source_default.bold("raindrop.manifest"));
|
|
56
|
+
this.log(source_default.dim(` + queue "${queueName}" {}`));
|
|
57
|
+
this.log(source_default.dim(` + observer "${observerName}" {`));
|
|
58
|
+
this.log(source_default.dim(` source { queue = "${queueName}" ... }`));
|
|
59
|
+
this.log(source_default.dim(` }`));
|
|
60
|
+
this.log("");
|
|
61
|
+
this.log(source_default.blue("Environment binding:") + " " + source_default.bold(`this.env.${queueName.toUpperCase().replace(/-/g, "_")}`));
|
|
62
|
+
this.log("");
|
|
63
|
+
this.log(source_default.yellow("Run without --dry-run to apply these changes"));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
const observerDir = path.join(process.cwd(), "src", observerName);
|
|
68
|
+
await fs.mkdir(observerDir, { recursive: true });
|
|
69
|
+
const observerContent = await this.generateObserverFile(queueName);
|
|
70
|
+
const observerPath = path.join(observerDir, "index.ts");
|
|
71
|
+
await fs.writeFile(observerPath, observerContent);
|
|
72
|
+
this.log(source_default.green("\u2713") + " Created " + source_default.bold(`src/${observerName}/index.ts`));
|
|
73
|
+
await this.updateManifest(queueName, observerName);
|
|
74
|
+
this.log(source_default.green("\u2713") + " Updated " + source_default.bold("raindrop.manifest"));
|
|
75
|
+
this.log("");
|
|
76
|
+
this.log(source_default.bold.cyan("Next Steps:"));
|
|
77
|
+
this.log("");
|
|
78
|
+
this.log("1. Run " + source_default.bold("raindrop build generate") + " to update types");
|
|
79
|
+
this.log("2. Check out " + source_default.bold(`src/${observerName}/index.ts`) + " for the consumer code");
|
|
80
|
+
this.log("3. Send messages to the queue from your services:");
|
|
81
|
+
this.log("");
|
|
82
|
+
this.log(source_default.dim("Example usage:"));
|
|
83
|
+
this.log(source_default.dim(` await this.env.${queueName.toUpperCase().replace(/-/g, "_")}.send({`));
|
|
84
|
+
this.log(source_default.dim(` task: 'process-order',`));
|
|
85
|
+
this.log(source_default.dim(` orderId: '12345'`));
|
|
86
|
+
this.log(source_default.dim(` });`));
|
|
87
|
+
this.log("");
|
|
88
|
+
} catch (error) {
|
|
89
|
+
this.error(`Failed to set up queue: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async generateObserverFile(queueName) {
|
|
93
|
+
const templatePath = path.join(TEMPLATES_DIR, "handlers", "queue-consumer-setup.ts.hbs");
|
|
94
|
+
return renderTemplateFromFile(templatePath, { queueName });
|
|
95
|
+
}
|
|
96
|
+
async updateManifest(queueName, observerName) {
|
|
97
|
+
const manifestPath = path.join(process.cwd(), "raindrop.manifest");
|
|
98
|
+
try {
|
|
99
|
+
let content = await fs.readFile(manifestPath, "utf-8");
|
|
100
|
+
if (content.includes(`queue "${queueName}"`)) {
|
|
101
|
+
this.log(source_default.yellow("\u26A0") + " Queue already exists in manifest");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const appMatch = content.match(/application\s+"[^"]+"\s+\{/);
|
|
105
|
+
if (appMatch) {
|
|
106
|
+
const insertPos = appMatch.index + appMatch[0].length;
|
|
107
|
+
const binding = `
|
|
108
|
+
queue "${queueName}" {}
|
|
109
|
+
|
|
110
|
+
observer "${observerName}" {
|
|
111
|
+
source {
|
|
112
|
+
queue = "${queueName}"
|
|
113
|
+
max_retries = 5
|
|
114
|
+
batch_size = 1
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
content = content.slice(0, insertPos) + binding + content.slice(insertPos);
|
|
119
|
+
await fs.writeFile(manifestPath, content);
|
|
120
|
+
} else {
|
|
121
|
+
throw new Error("Could not find application block in raindrop.manifest");
|
|
122
|
+
}
|
|
123
|
+
} catch (error) {
|
|
124
|
+
if (error.code === "ENOENT") {
|
|
125
|
+
throw new Error("raindrop.manifest not found. Are you in a Raindrop project directory?");
|
|
126
|
+
}
|
|
127
|
+
throw error;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
export {
|
|
132
|
+
QueueSetup as default
|
|
133
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sandbox
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-DPV5HIG7.js";
|
|
4
|
+
import "../../chunk-MJBLNWG3.js";
|
|
5
|
+
import "../../chunk-JQONDSHY.js";
|
|
6
|
+
import "../../chunk-L6FRQULN.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseCommand
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM,
|
|
12
12
|
init_cjs_shims,
|
|
13
13
|
require_lib
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/build/sandbox.ts
|
|
17
17
|
init_cjs_shims();
|