@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.
Files changed (250) hide show
  1. package/README.md +327 -89
  2. package/bundle/build-CBEGQPJT.js +62 -0
  3. package/bundle/{chunk-IEF2XC25.js → chunk-2PH3PHH3.js} +5 -3
  4. package/bundle/{chunk-4HZ22KOV.js → chunk-3CMR7ES5.js} +4 -4
  5. package/bundle/{chunk-JSBM2JYW.js → chunk-3EYKCHIK.js} +1 -1
  6. package/bundle/chunk-5XHDP4VK.js +1697 -0
  7. package/bundle/{chunk-TSQK4HH6.js → chunk-674GMSXY.js} +1 -1
  8. package/bundle/{chunk-PS3WZBDF.js → chunk-6L4V66WZ.js} +1105 -2728
  9. package/bundle/{chunk-5245CEUM.js → chunk-AGG7JZVH.js} +2 -2
  10. package/bundle/{chunk-3GFKUF5D.js → chunk-B3IY2XS6.js} +4 -2
  11. package/bundle/{chunk-WIDI65NO.js → chunk-CBAXTRCS.js} +1 -1
  12. package/bundle/{chunk-JLVDTXO2.js → chunk-DPV5HIG7.js} +4 -4
  13. package/bundle/{chunk-36GNZK4A.js → chunk-EVXLXWP7.js} +1 -1
  14. package/bundle/{chunk-4YVU5KEQ.js → chunk-HN3AAKRY.js} +4 -2
  15. package/bundle/{chunk-NVNEQXHN.js → chunk-IGLE4Y3B.js} +7 -5
  16. package/bundle/{chunk-FGSYWVBA.js → chunk-IQ6HFRA6.js} +1 -1
  17. package/bundle/{chunk-O3QZDJ75.js → chunk-JQONDSHY.js} +2 -2
  18. package/bundle/{chunk-W4IPOFZC.js → chunk-KADMFJLN.js} +8 -6
  19. package/bundle/chunk-KG5BLUGU.js +246 -0
  20. package/bundle/{chunk-V5LHJTYS.js → chunk-KLOYSTZY.js} +13 -2
  21. package/bundle/{chunk-ETC5VU7H.js → chunk-KXHVSLAI.js} +1 -1
  22. package/bundle/{chunk-Y4WFGNPM.js → chunk-L6FRQULN.js} +1 -1
  23. package/bundle/{chunk-3QCVYSRU.js → chunk-LT3BFQ4O.js} +1 -1
  24. package/bundle/{chunk-KQZJHBNG.js → chunk-MBLKVNI5.js} +1 -1
  25. package/bundle/{chunk-6AIUQUUM.js → chunk-MFMVJZW6.js} +71 -15
  26. package/bundle/{chunk-25T7MEKO.js → chunk-MJBLNWG3.js} +1 -1
  27. package/bundle/{chunk-MSJ33O5Y.js → chunk-NRCQIE3Z.js} +95 -115
  28. package/bundle/{chunk-XKKPPSPC.js → chunk-OCYTN4IH.js} +2 -2
  29. package/bundle/{chunk-2GAMWFJE.js → chunk-QEF5D4VE.js} +1 -1
  30. package/bundle/{chunk-4B3QYXBA.js → chunk-T7MQCLXF.js} +5 -3
  31. package/bundle/{chunk-LDFYPOXJ.js → chunk-TFQY5TSY.js} +1 -1
  32. package/bundle/{chunk-BWK4MC7Y.js → chunk-USZXZZAR.js} +8 -6
  33. package/bundle/{chunk-ER2RCPCY.js → chunk-V54KHS5B.js} +2 -2
  34. package/bundle/{chunk-YSKASURB.js → chunk-V6J23FL2.js} +1 -1
  35. package/bundle/{chunk-UHSTDJ7X.js → chunk-VN2QYX4C.js} +1 -1
  36. package/bundle/{chunk-Z4OWKG7J.js → chunk-VOT5MMEY.js} +1 -1
  37. package/bundle/{chunk-W6GU26WO.js → chunk-WG6BDFPZ.js} +1 -1
  38. package/bundle/{chunk-AK77X5GL.js → chunk-XX74I5RK.js} +4 -2
  39. package/bundle/{chunk-6BT265R3.js → chunk-YQCRWPNI.js} +1 -1
  40. package/bundle/commands/annotation/get.js +3 -3
  41. package/bundle/commands/annotation/list.js +3 -3
  42. package/bundle/commands/annotation/put.js +3 -3
  43. package/bundle/commands/auth/apikey.js +2 -2
  44. package/bundle/commands/auth/list.js +2 -2
  45. package/bundle/commands/auth/login.js +2 -2
  46. package/bundle/commands/auth/logout.js +2 -2
  47. package/bundle/commands/auth/select.js +3 -3
  48. package/bundle/commands/bucket/create-credential.js +2 -2
  49. package/bundle/commands/bucket/delete-credential.js +2 -2
  50. package/bundle/commands/bucket/get-credential.js +2 -2
  51. package/bundle/commands/bucket/list-credentials.js +2 -2
  52. package/bundle/commands/build/actor/setup.js +124 -0
  53. package/bundle/commands/build/branch.js +10 -10
  54. package/bundle/commands/build/bucket-events/setup.js +146 -0
  55. package/bundle/commands/build/checkout.js +8 -8
  56. package/bundle/commands/build/clone.js +6 -6
  57. package/bundle/commands/build/delete.js +8 -8
  58. package/bundle/commands/build/deploy.js +10 -10
  59. package/bundle/commands/build/env/get.js +3 -3
  60. package/bundle/commands/build/env/list.js +2 -2
  61. package/bundle/commands/build/env/set.js +3 -3
  62. package/bundle/commands/build/env.js +2 -2
  63. package/bundle/commands/build/features.js +192 -0
  64. package/bundle/commands/build/find.js +4 -4
  65. package/bundle/commands/build/generate.js +52 -3
  66. package/bundle/commands/build/init-workspace.js +3 -3
  67. package/bundle/commands/build/init.js +15 -3
  68. package/bundle/commands/build/list.js +5 -5
  69. package/bundle/commands/build/queue/setup.js +133 -0
  70. package/bundle/commands/build/sandbox.js +6 -6
  71. package/bundle/commands/build/smartbucket/setup.js +165 -0
  72. package/bundle/commands/build/smartmemory/setup.js +171 -0
  73. package/bundle/commands/build/smartsql/setup.js +167 -0
  74. package/bundle/commands/build/start.js +2 -2
  75. package/bundle/commands/build/status.js +5 -5
  76. package/bundle/commands/build/stop.js +2 -2
  77. package/bundle/commands/build/stripe/dashboard.js +3 -3
  78. package/bundle/commands/build/stripe/onboard.js +3 -3
  79. package/bundle/commands/build/stripe/setup.js +3 -3
  80. package/bundle/commands/build/stripe/start.js +14 -14
  81. package/bundle/commands/build/stripe/status.js +3 -3
  82. package/bundle/commands/build/stripe/subscription/create.js +4 -4
  83. package/bundle/commands/build/stripe/subscription/get.js +4 -4
  84. package/bundle/commands/build/stripe/subscription/update.js +4 -4
  85. package/bundle/commands/build/tools/check.js +2 -2
  86. package/bundle/commands/build/tools/fmt.js +2 -2
  87. package/bundle/commands/build/unsandbox.js +6 -6
  88. package/bundle/commands/build/upload.js +5 -5
  89. package/bundle/commands/build/validate.js +85 -14
  90. package/bundle/commands/build/workos/delete.js +6 -6
  91. package/bundle/commands/build/workos/env/attach.js +3 -3
  92. package/bundle/commands/build/workos/env/attached.js +3 -3
  93. package/bundle/commands/build/workos/env/create.js +3 -3
  94. package/bundle/commands/build/workos/env/delete.js +3 -3
  95. package/bundle/commands/build/workos/env/detach.js +3 -3
  96. package/bundle/commands/build/workos/env/dev-login.js +3 -3
  97. package/bundle/commands/build/workos/env/get.js +3 -3
  98. package/bundle/commands/build/workos/env/list.js +3 -3
  99. package/bundle/commands/build/workos/env/set.js +3 -3
  100. package/bundle/commands/build/workos/invite.js +3 -3
  101. package/bundle/commands/build/workos/jwt.js +172 -0
  102. package/bundle/commands/build/workos/setup.js +3 -3
  103. package/bundle/commands/build/workos/status.js +3 -3
  104. package/bundle/commands/dns/create.js +2 -2
  105. package/bundle/commands/dns/delete.js +6 -6
  106. package/bundle/commands/dns/get.js +6 -6
  107. package/bundle/commands/dns/list.js +3 -3
  108. package/bundle/commands/dns/records/create.js +2 -2
  109. package/bundle/commands/dns/records/delete.js +3 -3
  110. package/bundle/commands/dns/records/get.js +2 -2
  111. package/bundle/commands/dns/records/list.js +2 -2
  112. package/bundle/commands/dns/records/update.js +2 -2
  113. package/bundle/commands/doctor.js +309 -0
  114. package/bundle/commands/logs/query.js +3 -3
  115. package/bundle/commands/logs/tail.js +3 -3
  116. package/bundle/commands/mcp/install-claude.js +2 -2
  117. package/bundle/commands/mcp/install-gemini.js +2 -2
  118. package/bundle/commands/mcp/install-goose.js +2 -2
  119. package/bundle/commands/mcp/status.js +2 -2
  120. package/bundle/commands/object/delete.js +5 -37
  121. package/bundle/commands/object/get.js +5 -37
  122. package/bundle/commands/object/list.js +7 -39
  123. package/bundle/commands/object/put.js +5 -37
  124. package/bundle/commands/query/chunk-search.js +14 -46
  125. package/bundle/commands/query/document.js +17 -55
  126. package/bundle/commands/query/events.js +2 -2
  127. package/bundle/commands/query/reindex.js +2 -2
  128. package/bundle/commands/query/search.js +14 -46
  129. package/bundle/commands/tail.js +2 -2
  130. package/bundle/index.js +1 -1
  131. package/dist/commands/build/actor/setup.d.ts +22 -0
  132. package/dist/commands/build/actor/setup.d.ts.map +1 -0
  133. package/dist/commands/build/actor/setup.js +116 -0
  134. package/dist/commands/build/bucket-events/setup.d.ts +22 -0
  135. package/dist/commands/build/bucket-events/setup.d.ts.map +1 -0
  136. package/dist/commands/build/bucket-events/setup.js +134 -0
  137. package/dist/commands/build/features.d.ts +19 -0
  138. package/dist/commands/build/features.d.ts.map +1 -0
  139. package/dist/commands/build/features.js +97 -0
  140. package/dist/commands/build/generate.d.ts +2 -0
  141. package/dist/commands/build/generate.d.ts.map +1 -1
  142. package/dist/commands/build/generate.js +52 -0
  143. package/dist/commands/build/init.d.ts.map +1 -1
  144. package/dist/commands/build/init.js +10 -0
  145. package/dist/commands/build/queue/setup.d.ts +21 -0
  146. package/dist/commands/build/queue/setup.d.ts.map +1 -0
  147. package/dist/commands/build/queue/setup.js +120 -0
  148. package/dist/commands/build/smartbucket/setup.d.ts +23 -0
  149. package/dist/commands/build/smartbucket/setup.d.ts.map +1 -0
  150. package/dist/commands/build/smartbucket/setup.js +167 -0
  151. package/dist/commands/build/smartmemory/setup.d.ts +23 -0
  152. package/dist/commands/build/smartmemory/setup.d.ts.map +1 -0
  153. package/dist/commands/build/smartmemory/setup.js +172 -0
  154. package/dist/commands/build/smartsql/setup.d.ts +23 -0
  155. package/dist/commands/build/smartsql/setup.d.ts.map +1 -0
  156. package/dist/commands/build/smartsql/setup.js +169 -0
  157. package/dist/commands/build/validate.d.ts +2 -0
  158. package/dist/commands/build/validate.d.ts.map +1 -1
  159. package/dist/commands/build/validate.js +80 -8
  160. package/dist/commands/build/workos/jwt.d.ts +23 -0
  161. package/dist/commands/build/workos/jwt.d.ts.map +1 -0
  162. package/dist/commands/build/workos/jwt.js +172 -0
  163. package/dist/commands/doctor.d.ts +27 -0
  164. package/dist/commands/doctor.d.ts.map +1 -0
  165. package/dist/commands/doctor.js +328 -0
  166. package/dist/commands/object/delete.d.ts +0 -2
  167. package/dist/commands/object/delete.d.ts.map +1 -1
  168. package/dist/commands/object/delete.js +3 -38
  169. package/dist/commands/object/get.d.ts +0 -2
  170. package/dist/commands/object/get.d.ts.map +1 -1
  171. package/dist/commands/object/get.js +3 -38
  172. package/dist/commands/object/list.d.ts +0 -2
  173. package/dist/commands/object/list.d.ts.map +1 -1
  174. package/dist/commands/object/list.js +5 -40
  175. package/dist/commands/object/put.d.ts +0 -2
  176. package/dist/commands/object/put.d.ts.map +1 -1
  177. package/dist/commands/object/put.js +3 -38
  178. package/dist/commands/query/chunk-search.d.ts +0 -2
  179. package/dist/commands/query/chunk-search.d.ts.map +1 -1
  180. package/dist/commands/query/chunk-search.js +12 -46
  181. package/dist/commands/query/document.d.ts +1 -3
  182. package/dist/commands/query/document.d.ts.map +1 -1
  183. package/dist/commands/query/document.js +16 -60
  184. package/dist/commands/query/search.d.ts +0 -2
  185. package/dist/commands/query/search.d.ts.map +1 -1
  186. package/dist/commands/query/search.js +12 -46
  187. package/dist/feature-catalog.d.ts +28 -0
  188. package/dist/feature-catalog.d.ts.map +1 -0
  189. package/dist/feature-catalog.js +104 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.js +16 -2
  192. package/oclif.manifest.json +4811 -3433
  193. package/package.json +3 -3
  194. package/templates/examples/smartbucket-minimal.ts.hbs +87 -0
  195. package/templates/examples/smartmemory-minimal.ts.hbs +82 -0
  196. package/templates/examples/smartsql-minimal.ts.hbs +69 -0
  197. package/templates/handlers/actor/index.test.ts.hbs +48 -85
  198. package/templates/handlers/actor/index.ts.hbs +16 -316
  199. package/templates/handlers/bucket-event-notification/index.ts.hbs +32 -235
  200. package/templates/handlers/bucket-event-observer.ts.hbs +79 -0
  201. package/templates/handlers/http-service/index.test.ts.hbs +3 -0
  202. package/templates/handlers/http-service/index.ts.hbs +43 -15
  203. package/templates/handlers/queue-consumer-setup.ts.hbs +45 -0
  204. package/templates/handlers/task/index.test.ts.hbs +30 -112
  205. package/templates/handlers/task/index.ts.hbs +19 -58
  206. package/templates/init/RAINDROP.md.hbs +97 -1
  207. package/templates/init/eslint.config.js +43 -0
  208. package/templates/init/package.json.hbs +4 -1
  209. package/templates/init/tsconfig.json +3 -3
  210. package/bundle/chunk-23UBI7BN.js +0 -48
  211. package/bundle/chunk-2QWMBNE3.js +0 -384
  212. package/bundle/chunk-45IYWQDC.js +0 -384
  213. package/bundle/chunk-5YUO23QU.js +0 -4585
  214. package/bundle/chunk-6MIGCNUO.js +0 -75
  215. package/bundle/chunk-7ZJWA6HP.js +0 -805
  216. package/bundle/chunk-AIYVX2M7.js +0 -44
  217. package/bundle/chunk-BB5TNIEM.js +0 -48
  218. package/bundle/chunk-BUR3HFKH.js +0 -488
  219. package/bundle/chunk-BYSBS7KT.js +0 -488
  220. package/bundle/chunk-CX3RWI62.js +0 -28658
  221. package/bundle/chunk-DLH7MI57.js +0 -305
  222. package/bundle/chunk-E3WJIYJZ.js +0 -12148
  223. package/bundle/chunk-EX7NOPRF.js +0 -12148
  224. package/bundle/chunk-F76JQS2J.js +0 -231
  225. package/bundle/chunk-FBOXMVKD.js +0 -28679
  226. package/bundle/chunk-FTPZ6SQW.js +0 -238909
  227. package/bundle/chunk-H3CFZ7ZH.js +0 -74
  228. package/bundle/chunk-HXOILVWA.js +0 -384
  229. package/bundle/chunk-IMP7O5AC.js +0 -22452
  230. package/bundle/chunk-IPYOAKRE.js +0 -231
  231. package/bundle/chunk-J7HN6XF2.js +0 -4461
  232. package/bundle/chunk-JOLOAALA.js +0 -231
  233. package/bundle/chunk-JZ2G4Q35.js +0 -4585
  234. package/bundle/chunk-KVAWPWF7.js +0 -231
  235. package/bundle/chunk-MEUAAIXV.js +0 -28657
  236. package/bundle/chunk-QBWFE57Z.js +0 -384
  237. package/bundle/chunk-SP3LOXPC.js +0 -46
  238. package/bundle/chunk-T7C564PR.js +0 -28678
  239. package/bundle/chunk-UFH545WJ.js +0 -22452
  240. package/bundle/chunk-UHVMPWM5.js +0 -315
  241. package/bundle/chunk-VB7ZTSZV.js +0 -1089
  242. package/bundle/chunk-VBIJDFMJ.js +0 -384
  243. package/bundle/chunk-VR7RLTE3.js +0 -231
  244. package/bundle/chunk-WFZUJLEC.js +0 -231
  245. package/bundle/chunk-YDGJTLVZ.js +0 -133
  246. package/bundle/chunk-YPNQ7UFK.js +0 -502
  247. package/bundle/chunk-YXFDRMSN.js +0 -384
  248. package/dist/lib/dns-utils.d.ts +0 -7
  249. package/dist/lib/dns-utils.d.ts.map +0 -1
  250. package/dist/lib/dns-utils.js +0 -44
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  source_default
3
- } from "./chunk-36GNZK4A.js";
3
+ } from "./chunk-V6J23FL2.js";
4
4
  import {
5
5
  UnitState,
6
6
  init_cjs_shims,
7
7
  timestampDate,
8
8
  valueOf
9
- } from "./chunk-V5LHJTYS.js";
9
+ } from "./chunk-KLOYSTZY.js";
10
10
 
11
11
  // src/status.ts
12
12
  init_cjs_shims();
@@ -1,7 +1,9 @@
1
1
  import {
2
- RecurringInterval,
2
+ RecurringInterval
3
+ } from "./chunk-6L4V66WZ.js";
4
+ import {
3
5
  init_cjs_shims
4
- } from "./chunk-V5LHJTYS.js";
6
+ } from "./chunk-5XHDP4VK.js";
5
7
 
6
8
  // src/utils/price-utils.ts
7
9
  init_cjs_shims();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_cjs_shims
3
- } from "./chunk-PS3WZBDF.js";
3
+ } from "./chunk-5XHDP4VK.js";
4
4
 
5
5
  // ../drizzle/dist/mrn.js
6
6
  init_cjs_shims();
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  FileSystemBundle,
3
3
  archive
4
- } from "./chunk-KQZJHBNG.js";
4
+ } from "./chunk-MJBLNWG3.js";
5
5
  import {
6
6
  buildHandlers
7
- } from "./chunk-DLH7MI57.js";
7
+ } from "./chunk-JQONDSHY.js";
8
8
  import {
9
9
  tmpdir
10
- } from "./chunk-LDFYPOXJ.js";
10
+ } from "./chunk-TFQY5TSY.js";
11
11
  import {
12
12
  BundleArchiveType,
13
13
  Code,
@@ -17,7 +17,7 @@ import {
17
17
  init_cjs_shims,
18
18
  listEnvVars,
19
19
  valueOf
20
- } from "./chunk-V5LHJTYS.js";
20
+ } from "./chunk-KLOYSTZY.js";
21
21
 
22
22
  // src/deploy.ts
23
23
  init_cjs_shims();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_cjs_shims
3
- } from "./chunk-V5LHJTYS.js";
3
+ } from "./chunk-5XHDP4VK.js";
4
4
 
5
5
  // ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
6
6
  init_cjs_shims();
@@ -1,7 +1,9 @@
1
1
  import {
2
- init_cjs_shims,
3
2
  timestampMs
4
- } from "./chunk-FTPZ6SQW.js";
3
+ } from "./chunk-6L4V66WZ.js";
4
+ import {
5
+ init_cjs_shims
6
+ } from "./chunk-5XHDP4VK.js";
5
7
 
6
8
  // src/log-helpers.ts
7
9
  init_cjs_shims();
@@ -1,13 +1,15 @@
1
1
  import {
2
- __commonJS,
3
- __require,
4
- __toESM,
5
- init_cjs_shims,
6
2
  require_ansi_escapes,
7
3
  require_ansi_styles,
8
4
  require_string_width,
9
5
  require_strip_ansi
10
- } from "./chunk-PS3WZBDF.js";
6
+ } from "./chunk-6L4V66WZ.js";
7
+ import {
8
+ __commonJS,
9
+ __require,
10
+ __toESM,
11
+ init_cjs_shims
12
+ } from "./chunk-5XHDP4VK.js";
11
13
 
12
14
  // ../../node_modules/.pnpm/yoctocolors-cjs@2.1.2/node_modules/yoctocolors-cjs/index.js
13
15
  var require_yoctocolors_cjs = __commonJS({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_cjs_shims,
3
3
  valueOf
4
- } from "./chunk-PS3WZBDF.js";
4
+ } from "./chunk-5XHDP4VK.js";
5
5
 
6
6
  // src/lib/env-validation.ts
7
7
  init_cjs_shims();
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  HANDLERS_DIR
3
- } from "./chunk-J7HN6XF2.js";
3
+ } from "./chunk-L6FRQULN.js";
4
4
  import {
5
5
  Actor,
6
6
  Service,
7
7
  init_cjs_shims,
8
8
  valueOf
9
- } from "./chunk-FTPZ6SQW.js";
9
+ } from "./chunk-KLOYSTZY.js";
10
10
 
11
11
  // src/build.ts
12
12
  init_cjs_shims();
@@ -1,23 +1,25 @@
1
1
  import {
2
2
  FileSystemBundle,
3
3
  archive
4
- } from "./chunk-7ZJWA6HP.js";
4
+ } from "./chunk-MBLKVNI5.js";
5
5
  import {
6
6
  buildHandlers
7
- } from "./chunk-XKKPPSPC.js";
7
+ } from "./chunk-OCYTN4IH.js";
8
8
  import {
9
9
  tmpdir
10
- } from "./chunk-MSJ33O5Y.js";
10
+ } from "./chunk-NRCQIE3Z.js";
11
11
  import {
12
12
  BundleArchiveType,
13
13
  Code,
14
14
  ConnectError,
15
15
  ReleaseRequest_LockSchema,
16
16
  create,
17
+ listEnvVars
18
+ } from "./chunk-6L4V66WZ.js";
19
+ import {
17
20
  init_cjs_shims,
18
- listEnvVars,
19
21
  valueOf
20
- } from "./chunk-PS3WZBDF.js";
22
+ } from "./chunk-5XHDP4VK.js";
21
23
 
22
24
  // src/deploy.ts
23
25
  init_cjs_shims();
@@ -35,7 +37,7 @@ async function deploy(options) {
35
37
  const app = apps[0];
36
38
  const manifestContents = await fs.readFile(manifestPath, "utf8");
37
39
  await buildHandlers(command, apps, buildDir, root);
38
- const runtimeVersion = await command.raindropFrameworkVersion();
40
+ const runtimeVersion = await command.raindropFrameworkVersion(root);
39
41
  const { client: catalogService, userId, organizationId: defaultOrganizationId } = await command.catalogService();
40
42
  const organizationId = options.impersonate ?? defaultOrganizationId;
41
43
  let deployResp;
@@ -0,0 +1,246 @@
1
+ import {
2
+ open_default
3
+ } from "./chunk-NRCQIE3Z.js";
4
+ import {
5
+ init_cjs_shims
6
+ } from "./chunk-5XHDP4VK.js";
7
+
8
+ // src/lib/workos-test-server.ts
9
+ init_cjs_shims();
10
+ import * as crypto from "node:crypto";
11
+ import * as fs from "node:fs/promises";
12
+ import * as http from "node:http";
13
+ var AUTH_URL = "https://api.workos.com/user_management/authorize";
14
+ var TOKEN_URL = "https://api.workos.com/user_management/authenticate";
15
+ function base64URLEncode(buffer) {
16
+ return buffer.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
17
+ }
18
+ function sha256(input) {
19
+ return crypto.createHash("sha256").update(input).digest();
20
+ }
21
+ async function readSession(sessionFile) {
22
+ try {
23
+ const data = await fs.readFile(sessionFile, "utf8");
24
+ return JSON.parse(data);
25
+ } catch {
26
+ return null;
27
+ }
28
+ }
29
+ async function saveSession(sessionFile, newData, oldSession = {}) {
30
+ const session = {
31
+ access_token: newData.access_token || newData.token || "",
32
+ // OAuth Spec: If new refresh token is NOT returned, keep the old one
33
+ refresh_token: newData.refresh_token || oldSession.refresh_token,
34
+ user: newData.user || oldSession.user,
35
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
36
+ };
37
+ await fs.writeFile(sessionFile, JSON.stringify(session, null, 2), "utf8");
38
+ try {
39
+ await fs.chmod(sessionFile, 384);
40
+ } catch {
41
+ }
42
+ return session;
43
+ }
44
+ async function refreshToken(options) {
45
+ const { clientId, sessionFile, onLog } = options;
46
+ const log = onLog || (() => {
47
+ });
48
+ const session = await readSession(sessionFile);
49
+ if (!session) {
50
+ throw new Error("No session file found. Run interactive login first.");
51
+ }
52
+ if (!session.refresh_token) {
53
+ throw new Error("No refresh token available in session.");
54
+ }
55
+ log("Refreshing token...");
56
+ const response = await fetch(TOKEN_URL, {
57
+ method: "POST",
58
+ headers: { "Content-Type": "application/json" },
59
+ body: JSON.stringify({
60
+ client_id: clientId,
61
+ grant_type: "refresh_token",
62
+ refresh_token: session.refresh_token
63
+ })
64
+ });
65
+ if (!response.ok) {
66
+ const errorText = await response.text();
67
+ throw new Error(`Token refresh failed: ${errorText}`);
68
+ }
69
+ const data = await response.json();
70
+ const newSession = await saveSession(sessionFile, data, session);
71
+ log("Token refreshed successfully.");
72
+ return newSession;
73
+ }
74
+ async function startTestServer(options) {
75
+ const { port, host, clientId, sessionFile, onLog } = options;
76
+ const log = onLog || (() => {
77
+ });
78
+ const verifier = base64URLEncode(crypto.randomBytes(32));
79
+ const challenge = base64URLEncode(sha256(verifier));
80
+ const state = base64URLEncode(crypto.randomBytes(16));
81
+ const redirectUri = `http://${host}:${port}/callback`;
82
+ return new Promise((resolve, reject) => {
83
+ const server = http.createServer(async (req, res) => {
84
+ const requestUrl = new URL(req.url || "", `http://${host}:${port}`);
85
+ const pathname = requestUrl.pathname;
86
+ const searchParams = requestUrl.searchParams;
87
+ if (pathname === "/callback") {
88
+ const code = searchParams.get("code");
89
+ const returnedState = searchParams.get("state");
90
+ const error = searchParams.get("error");
91
+ const error_description = searchParams.get("error_description");
92
+ if (error) {
93
+ const errorMessage = `OAuth error: ${error}${error_description ? ` - ${error_description}` : ""}`;
94
+ log(`Error: ${errorMessage}`);
95
+ res.writeHead(400, { "Content-Type": "text/html" });
96
+ res.end(`<h1>Authentication Failed</h1><p>${errorMessage}</p>`);
97
+ server.close();
98
+ reject(new Error(errorMessage));
99
+ return;
100
+ }
101
+ if (returnedState !== state) {
102
+ const errorMessage = "Security Error: State mismatch (possible CSRF attack)";
103
+ log(`Error: ${errorMessage}`);
104
+ res.writeHead(400, { "Content-Type": "text/html" });
105
+ res.end(`<h1>Security Error</h1><p>State mismatch. Please try again.</p>`);
106
+ server.close();
107
+ reject(new Error(errorMessage));
108
+ return;
109
+ }
110
+ if (!code) {
111
+ const errorMessage = "No authorization code received";
112
+ log(`Error: ${errorMessage}`);
113
+ res.writeHead(400, { "Content-Type": "text/html" });
114
+ res.end(`<h1>Error</h1><p>${errorMessage}</p>`);
115
+ server.close();
116
+ reject(new Error(errorMessage));
117
+ return;
118
+ }
119
+ try {
120
+ log("Callback received. Exchanging code for token...");
121
+ const response = await fetch(TOKEN_URL, {
122
+ method: "POST",
123
+ headers: { "Content-Type": "application/json" },
124
+ body: JSON.stringify({
125
+ client_id: clientId,
126
+ grant_type: "authorization_code",
127
+ code,
128
+ code_verifier: verifier
129
+ })
130
+ });
131
+ if (!response.ok) {
132
+ const errorText = await response.text();
133
+ throw new Error(`Token exchange failed: ${errorText}`);
134
+ }
135
+ const data = await response.json();
136
+ const session = await saveSession(sessionFile, data);
137
+ res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
138
+ res.end(`<!DOCTYPE html>
139
+ <html lang="en">
140
+ <head>
141
+ <meta charset="utf-8">
142
+ <meta name="viewport" content="width=device-width, initial-scale=1">
143
+ <title>Authentication Successful</title>
144
+ <style>
145
+ * { box-sizing: border-box; }
146
+ body {
147
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
148
+ display: flex;
149
+ justify-content: center;
150
+ align-items: center;
151
+ min-height: 100vh;
152
+ margin: 0;
153
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
154
+ }
155
+ .card {
156
+ text-align: center;
157
+ padding: 3rem 4rem;
158
+ background: white;
159
+ border-radius: 16px;
160
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
161
+ }
162
+ .checkmark {
163
+ width: 80px;
164
+ height: 80px;
165
+ margin: 0 auto 1.5rem;
166
+ background: #22c55e;
167
+ border-radius: 50%;
168
+ display: flex;
169
+ align-items: center;
170
+ justify-content: center;
171
+ }
172
+ .checkmark svg {
173
+ width: 40px;
174
+ height: 40px;
175
+ stroke: white;
176
+ stroke-width: 3;
177
+ fill: none;
178
+ }
179
+ h1 {
180
+ color: #1f2937;
181
+ font-size: 1.5rem;
182
+ font-weight: 600;
183
+ margin: 0 0 0.5rem;
184
+ }
185
+ p {
186
+ color: #6b7280;
187
+ margin: 0;
188
+ font-size: 1rem;
189
+ }
190
+ </style>
191
+ </head>
192
+ <body>
193
+ <div class="card">
194
+ <div class="checkmark">
195
+ <svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>
196
+ </div>
197
+ <h1>Authentication Successful</h1>
198
+ <p>You can close this tab and return to your terminal.</p>
199
+ </div>
200
+ </body>
201
+ </html>`);
202
+ log("Authentication complete. Session saved.");
203
+ resolve({ server, session });
204
+ } catch (err) {
205
+ const error2 = err;
206
+ log(`Error: Token exchange failed: ${error2.message}`);
207
+ res.writeHead(500, { "Content-Type": "text/html" });
208
+ res.end(`<h1>Error</h1><p>Token exchange failed: ${error2.message}</p>`);
209
+ server.close();
210
+ reject(error2);
211
+ }
212
+ } else {
213
+ res.writeHead(404, { "Content-Type": "text/plain" });
214
+ res.end("Not Found");
215
+ }
216
+ });
217
+ server.on("error", (err) => {
218
+ reject(new Error(`Server error: ${err.message}`));
219
+ });
220
+ server.listen(port, host, async () => {
221
+ const authUrl = new URL(AUTH_URL);
222
+ authUrl.searchParams.set("client_id", clientId);
223
+ authUrl.searchParams.set("redirect_uri", redirectUri);
224
+ authUrl.searchParams.set("response_type", "code");
225
+ authUrl.searchParams.set("provider", "authkit");
226
+ authUrl.searchParams.set("code_challenge", challenge);
227
+ authUrl.searchParams.set("code_challenge_method", "S256");
228
+ authUrl.searchParams.set("state", state);
229
+ log(`Server listening on http://${host}:${port}`);
230
+ log(`Authorization URL: ${authUrl.toString()}`);
231
+ log(`Opening browser for authentication...`);
232
+ try {
233
+ await open_default(authUrl.toString());
234
+ } catch (err) {
235
+ const error = err;
236
+ log(`Warning: Could not open browser automatically: ${error.message}`);
237
+ log(`Please open the URL above manually.`);
238
+ }
239
+ });
240
+ });
241
+ }
242
+
243
+ export {
244
+ refreshToken,
245
+ startTestServer
246
+ };
@@ -238777,10 +238777,21 @@ async function getFrameworkVersion() {
238777
238777
  const packageJsonPath = path2.resolve(__dirname2, "..", "package.json");
238778
238778
  const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
238779
238779
  const packageJson = JSON.parse(packageJsonContent);
238780
- return packageJson.dependencies["@liquidmetal-ai/raindrop-framework"] || "unknown";
238780
+ let version = packageJson.dependencies["@liquidmetal-ai/raindrop-framework"] || "unknown";
238781
+ if (version === "workspace:*" || version.startsWith("workspace:")) {
238782
+ try {
238783
+ const frameworkPkgPath = path2.resolve(__dirname2, "..", "..", "raindrop-framework", "package.json");
238784
+ const frameworkContent = await fs.readFile(frameworkPkgPath, "utf8");
238785
+ const frameworkPkg = JSON.parse(frameworkContent);
238786
+ version = frameworkPkg.version || version;
238787
+ } catch {
238788
+ version = "*";
238789
+ }
238790
+ }
238791
+ return version;
238781
238792
  } catch (error) {
238782
238793
  console.error("Error reading framework version:", error);
238783
- return "unknown";
238794
+ return "*";
238784
238795
  }
238785
238796
  }
238786
238797
  async function getCLIVersion() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_cjs_shims,
3
3
  valueOf
4
- } from "./chunk-V5LHJTYS.js";
4
+ } from "./chunk-KLOYSTZY.js";
5
5
 
6
6
  // src/lib/env-validation.ts
7
7
  init_cjs_shims();
@@ -5,7 +5,7 @@ import {
5
5
  init_cjs_shims,
6
6
  require_source_map,
7
7
  valueOf
8
- } from "./chunk-PS3WZBDF.js";
8
+ } from "./chunk-KLOYSTZY.js";
9
9
 
10
10
  // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js
11
11
  var require_utils = __commonJS({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_cjs_shims,
3
3
  timestampMs
4
- } from "./chunk-V5LHJTYS.js";
4
+ } from "./chunk-KLOYSTZY.js";
5
5
 
6
6
  // src/log-helpers.ts
7
7
  init_cjs_shims();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_cjs_shims
3
- } from "./chunk-V5LHJTYS.js";
3
+ } from "./chunk-5XHDP4VK.js";
4
4
 
5
5
  // ../drizzle/dist/codestore.js
6
6
  init_cjs_shims();
@@ -1,23 +1,25 @@
1
- import {
2
- tmpdir
3
- } from "./chunk-IMP7O5AC.js";
4
1
  import {
5
2
  FileSystemBundle,
6
3
  archive
7
- } from "./chunk-25T7MEKO.js";
4
+ } from "./chunk-MBLKVNI5.js";
8
5
  import {
9
6
  buildHandlers
10
- } from "./chunk-O3QZDJ75.js";
7
+ } from "./chunk-OCYTN4IH.js";
8
+ import {
9
+ tmpdir
10
+ } from "./chunk-NRCQIE3Z.js";
11
11
  import {
12
12
  BundleArchiveType,
13
13
  Code,
14
14
  ConnectError,
15
15
  ReleaseRequest_LockSchema,
16
16
  create,
17
+ listEnvVars
18
+ } from "./chunk-6L4V66WZ.js";
19
+ import {
17
20
  init_cjs_shims,
18
- listEnvVars,
19
21
  valueOf
20
- } from "./chunk-FTPZ6SQW.js";
22
+ } from "./chunk-5XHDP4VK.js";
21
23
 
22
24
  // src/deploy.ts
23
25
  init_cjs_shims();
@@ -35,7 +37,7 @@ async function deploy(options) {
35
37
  const app = apps[0];
36
38
  const manifestContents = await fs.readFile(manifestPath, "utf8");
37
39
  await buildHandlers(command, apps, buildDir, root);
38
- const runtimeVersion = await command.raindropFrameworkVersion();
40
+ const runtimeVersion = await command.raindropFrameworkVersion(root);
39
41
  const { client: catalogService, userId, organizationId: defaultOrganizationId } = await command.catalogService();
40
42
  const organizationId = options.impersonate ?? defaultOrganizationId;
41
43
  let deployResp;
@@ -122,21 +124,75 @@ async function checkEnvironmentVariables(command, app, catalogService, userId, o
122
124
  });
123
125
  let unset = false;
124
126
  const remoteEnvVars = Object.fromEntries(getEnvsResp.envs.map((env) => [env.key, env.value]));
127
+ const missingVars = [];
125
128
  for (const key of Object.keys(envVars)) {
126
129
  const manifestDefault = envVars[key]?.default;
127
130
  const remoteValue = remoteEnvVars[key];
128
131
  if (remoteValue === void 0 && manifestDefault === void 0) {
129
- if (!unset) {
130
- command.warn(`The following environment variables were not set and are required for deployment:`);
131
- }
132
132
  unset = true;
133
- command.warn(key);
133
+ missingVars.push(key);
134
134
  }
135
135
  }
136
136
  if (unset) {
137
- command.error(
138
- "Please set environment variables before deploying. You can resume using `raindrop build deploy --amend`"
139
- );
137
+ const config = await command.loadConfig();
138
+ if (!config.lock) {
139
+ config.sandbox = true;
140
+ await command.saveConfig(config);
141
+ }
142
+ const varCount = missingVars.length;
143
+ const secretCount = missingVars.filter((key) => envVars[key]?.secret).length;
144
+ const allMissing = Object.keys(envVars).length === missingVars.length;
145
+ if (allMissing) {
146
+ command.warn("First-Time Setup Required: Environment Variables Missing\n");
147
+ command.warn(`Setup Required Variables:`);
148
+ command.warn(` \u2022 ${varCount} required environment variable${varCount !== 1 ? "s" : ""}`);
149
+ if (secretCount > 0) {
150
+ command.warn(` \u2022 ${secretCount} secret${secretCount !== 1 ? "s" : ""} (will be stored securely)`);
151
+ }
152
+ command.warn(`
153
+ Missing Variables:`);
154
+ missingVars.forEach((key, index) => {
155
+ const isSecret = envVars[key]?.secret;
156
+ command.warn(` ${index + 1}. ${key} ${isSecret ? "(secret)" : ""}`);
157
+ });
158
+ command.warn(`
159
+ Quick Setup (recommended for secrets):`);
160
+ command.warn(` raindrop build env setup`);
161
+ command.warn(`
162
+ Manual Setup:`);
163
+ missingVars.forEach((key) => {
164
+ const isSecret = envVars[key]?.secret;
165
+ command.warn(` raindrop build env set ${key} ${isSecret ? "<value>" : "<value>"}`);
166
+ if (isSecret) {
167
+ command.warn(` echo "your-secret" | raindrop build env set ${key} - # Secure input`);
168
+ }
169
+ });
170
+ command.warn(`
171
+ Discovery Commands:`);
172
+ command.warn(` raindrop build env list # See count (secure)`);
173
+ command.warn(` raindrop build env list --show-details --acknowledge-risk # See names`);
174
+ } else {
175
+ command.warn(`Environment Variables Missing:`);
176
+ command.warn(` Missing: ${missingVars.length}/${Object.keys(envVars).length} variables`);
177
+ command.warn(`
178
+ Missing Variables:`);
179
+ missingVars.forEach((key, index) => {
180
+ const isSecret = envVars[key]?.secret;
181
+ command.warn(` ${index + 1}. ${key} ${isSecret ? "(secret)" : ""}`);
182
+ });
183
+ command.warn(`
184
+ Update Missing Variables:`);
185
+ missingVars.forEach((key) => {
186
+ command.warn(` raindrop build env set ${key} <value>`);
187
+ });
188
+ command.warn(`
189
+ Interactive Update:`);
190
+ command.warn(` raindrop build env setup # Will prompt for missing variables only`);
191
+ }
192
+ command.warn(`
193
+ Then resume deployment:`);
194
+ command.warn(` raindrop build deploy --amend`);
195
+ command.error("Environment variables must be set before deployment");
140
196
  }
141
197
  }
142
198
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_cjs_shims
3
- } from "./chunk-FTPZ6SQW.js";
3
+ } from "./chunk-KLOYSTZY.js";
4
4
 
5
5
  // ../drizzle/dist/codestore.js
6
6
  init_cjs_shims();