@liquidmetal-ai/raindrop 0.8.1 → 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.
Files changed (208) hide show
  1. package/README.md +254 -207
  2. package/bundle/chunk-5AOMZVOJ.js +48 -0
  3. package/bundle/chunk-5AP5HNN3.js +133 -0
  4. package/bundle/chunk-6CDCK5IP.js +58 -0
  5. package/bundle/chunk-6GTBXHHK.js +502 -0
  6. package/bundle/chunk-A26NDSVL.js +12148 -0
  7. package/bundle/{chunk-6UE75KX2.js → chunk-AKNNZNIC.js} +1 -2
  8. package/bundle/{chunk-CW5ZHVPX.js → chunk-DOTQ3CSX.js} +2 -2
  9. package/bundle/chunk-FO7VH4GU.js +75 -0
  10. package/bundle/chunk-HEOY5F6W.js +147 -0
  11. package/bundle/chunk-HMD2JXLE.js +238722 -0
  12. package/bundle/chunk-KGZ7KWP4.js +44 -0
  13. package/bundle/chunk-MNUILM7W.js +380 -0
  14. package/bundle/chunk-OROAB5YF.js +805 -0
  15. package/bundle/chunk-OZWZILJX.js +4539 -0
  16. package/bundle/{chunk-6B4I2CKP.js → chunk-YDVG2SA2.js} +4 -4
  17. package/bundle/chunk-ZQQFKWNC.js +22452 -0
  18. package/bundle/commands/annotation/get.js +4 -4
  19. package/bundle/commands/annotation/list.js +4 -4
  20. package/bundle/commands/annotation/put.js +4 -4
  21. package/bundle/commands/auth/list.js +2 -2
  22. package/bundle/commands/auth/login.js +3 -3
  23. package/bundle/commands/auth/logout.js +2 -2
  24. package/bundle/commands/auth/select.js +3 -3
  25. package/bundle/commands/bucket/create-credential.js +3 -3
  26. package/bundle/commands/bucket/delete-credential.js +3 -3
  27. package/bundle/commands/bucket/get-credential.js +3 -3
  28. package/bundle/commands/bucket/list-credentials.js +3 -3
  29. package/bundle/commands/build/branch.js +26 -14
  30. package/bundle/commands/build/checkout.js +6 -6
  31. package/bundle/commands/build/clone.js +5 -5
  32. package/bundle/commands/build/delete.js +24 -14
  33. package/bundle/commands/build/deploy.js +25 -13
  34. package/bundle/commands/build/env/get.js +19 -6
  35. package/bundle/commands/build/env/set.js +19 -6
  36. package/bundle/commands/build/find.js +18 -10
  37. package/bundle/commands/build/generate.js +4 -4
  38. package/bundle/commands/build/init.js +3 -3
  39. package/bundle/commands/build/list-templates.js +63 -0
  40. package/bundle/commands/build/list.js +4 -4
  41. package/bundle/commands/build/package-template.js +238 -0
  42. package/bundle/commands/build/sandbox.js +16 -10
  43. package/bundle/commands/build/start.js +10 -6
  44. package/bundle/commands/build/status.js +16 -11
  45. package/bundle/commands/build/stop.js +10 -6
  46. package/bundle/commands/build/tools/check.js +2 -2
  47. package/bundle/commands/build/tools/fmt.js +2 -2
  48. package/bundle/commands/build/unsandbox.js +16 -10
  49. package/bundle/commands/build/upload.js +23 -9
  50. package/bundle/commands/build/validate.js +5 -5
  51. package/bundle/commands/build/workos/delete.js +4 -4
  52. package/bundle/commands/build/workos/env/attach.js +20 -8
  53. package/bundle/commands/build/workos/env/create.js +60 -11
  54. package/bundle/commands/build/workos/env/delete.js +3 -3
  55. package/bundle/commands/build/workos/env/detach.js +20 -8
  56. package/bundle/commands/build/workos/env/get.js +21 -3
  57. package/bundle/commands/build/workos/env/list.js +3 -3
  58. package/bundle/commands/build/workos/env/set.js +91 -25
  59. package/bundle/commands/build/workos/invite.js +3 -3
  60. package/bundle/commands/build/workos/setup.js +14 -5
  61. package/bundle/commands/build/workos/status.js +116 -25
  62. package/bundle/commands/dns/create.js +2 -2
  63. package/bundle/commands/dns/delete.js +4 -4
  64. package/bundle/commands/dns/get.js +4 -4
  65. package/bundle/commands/dns/list.js +3 -3
  66. package/bundle/commands/dns/records/create.js +2 -2
  67. package/bundle/commands/dns/records/delete.js +3 -3
  68. package/bundle/commands/dns/records/get.js +2 -2
  69. package/bundle/commands/dns/records/list.js +2 -2
  70. package/bundle/commands/dns/records/update.js +2 -2
  71. package/bundle/commands/logs/query.js +15 -10
  72. package/bundle/commands/logs/tail.js +16 -11
  73. package/bundle/commands/mcp/install-claude.js +2 -2
  74. package/bundle/commands/mcp/install-gemini.js +2 -2
  75. package/bundle/commands/mcp/install-goose.js +2 -2
  76. package/bundle/commands/mcp/status.js +2 -2
  77. package/bundle/commands/object/delete.js +27 -14
  78. package/bundle/commands/object/get.js +27 -14
  79. package/bundle/commands/object/list.js +28 -15
  80. package/bundle/commands/object/put.js +27 -14
  81. package/bundle/commands/query/chunk-search.js +24 -10
  82. package/bundle/commands/query/document.js +39 -16
  83. package/bundle/commands/query/events.js +13 -8
  84. package/bundle/commands/query/reindex.js +14 -6
  85. package/bundle/commands/query/search.js +40 -17
  86. package/bundle/commands/tail.js +2 -2
  87. package/bundle/index.js +1 -1
  88. package/dist/base-command.d.ts.map +1 -1
  89. package/dist/base-command.js +27 -0
  90. package/dist/commands/annotation/get.js +1 -1
  91. package/dist/commands/annotation/list.js +1 -1
  92. package/dist/commands/annotation/put.js +1 -1
  93. package/dist/commands/bucket/create-credential.js +1 -1
  94. package/dist/commands/bucket/delete-credential.js +1 -1
  95. package/dist/commands/bucket/get-credential.js +1 -1
  96. package/dist/commands/bucket/list-credentials.js +1 -1
  97. package/dist/commands/build/branch.d.ts +2 -0
  98. package/dist/commands/build/branch.d.ts.map +1 -1
  99. package/dist/commands/build/branch.js +18 -5
  100. package/dist/commands/build/checkout.js +1 -1
  101. package/dist/commands/build/delete.d.ts +1 -0
  102. package/dist/commands/build/delete.d.ts.map +1 -1
  103. package/dist/commands/build/delete.js +25 -12
  104. package/dist/commands/build/deploy.d.ts +2 -0
  105. package/dist/commands/build/deploy.d.ts.map +1 -1
  106. package/dist/commands/build/deploy.js +17 -4
  107. package/dist/commands/build/env/get.d.ts +2 -0
  108. package/dist/commands/build/env/get.d.ts.map +1 -1
  109. package/dist/commands/build/env/get.js +18 -4
  110. package/dist/commands/build/env/set.d.ts +2 -0
  111. package/dist/commands/build/env/set.d.ts.map +1 -1
  112. package/dist/commands/build/env/set.js +18 -4
  113. package/dist/commands/build/find.d.ts +1 -0
  114. package/dist/commands/build/find.d.ts.map +1 -1
  115. package/dist/commands/build/find.js +18 -7
  116. package/dist/commands/build/generate.js +1 -1
  117. package/dist/commands/build/list-templates.d.ts +11 -0
  118. package/dist/commands/build/list-templates.d.ts.map +1 -0
  119. package/dist/commands/build/list-templates.js +47 -0
  120. package/dist/commands/build/list.js +1 -1
  121. package/dist/commands/build/package-template.d.ts +28 -0
  122. package/dist/commands/build/package-template.d.ts.map +1 -0
  123. package/dist/commands/build/package-template.js +256 -0
  124. package/dist/commands/build/sandbox.d.ts +1 -0
  125. package/dist/commands/build/sandbox.d.ts.map +1 -1
  126. package/dist/commands/build/sandbox.js +10 -3
  127. package/dist/commands/build/start.d.ts +1 -0
  128. package/dist/commands/build/start.d.ts.map +1 -1
  129. package/dist/commands/build/start.js +9 -4
  130. package/dist/commands/build/status.d.ts +1 -0
  131. package/dist/commands/build/status.d.ts.map +1 -1
  132. package/dist/commands/build/status.js +13 -7
  133. package/dist/commands/build/stop.d.ts +1 -0
  134. package/dist/commands/build/stop.d.ts.map +1 -1
  135. package/dist/commands/build/stop.js +9 -4
  136. package/dist/commands/build/unsandbox.d.ts +1 -0
  137. package/dist/commands/build/unsandbox.d.ts.map +1 -1
  138. package/dist/commands/build/unsandbox.js +10 -3
  139. package/dist/commands/build/upload.d.ts +3 -1
  140. package/dist/commands/build/upload.d.ts.map +1 -1
  141. package/dist/commands/build/upload.js +19 -4
  142. package/dist/commands/build/validate.js +1 -1
  143. package/dist/commands/build/workos/env/attach.d.ts +2 -0
  144. package/dist/commands/build/workos/env/attach.d.ts.map +1 -1
  145. package/dist/commands/build/workos/env/attach.js +17 -5
  146. package/dist/commands/build/workos/env/create.d.ts +3 -0
  147. package/dist/commands/build/workos/env/create.d.ts.map +1 -1
  148. package/dist/commands/build/workos/env/create.js +61 -8
  149. package/dist/commands/build/workos/env/detach.d.ts +2 -0
  150. package/dist/commands/build/workos/env/detach.d.ts.map +1 -1
  151. package/dist/commands/build/workos/env/detach.js +17 -5
  152. package/dist/commands/build/workos/env/get.d.ts.map +1 -1
  153. package/dist/commands/build/workos/env/get.js +19 -0
  154. package/dist/commands/build/workos/env/set.d.ts +12 -6
  155. package/dist/commands/build/workos/env/set.d.ts.map +1 -1
  156. package/dist/commands/build/workos/env/set.js +83 -22
  157. package/dist/commands/build/workos/setup.d.ts +1 -0
  158. package/dist/commands/build/workos/setup.d.ts.map +1 -1
  159. package/dist/commands/build/workos/setup.js +12 -3
  160. package/dist/commands/build/workos/status.d.ts +5 -0
  161. package/dist/commands/build/workos/status.d.ts.map +1 -1
  162. package/dist/commands/build/workos/status.js +128 -21
  163. package/dist/commands/logs/query.d.ts +1 -0
  164. package/dist/commands/logs/query.d.ts.map +1 -1
  165. package/dist/commands/logs/query.js +13 -7
  166. package/dist/commands/logs/tail.d.ts +1 -0
  167. package/dist/commands/logs/tail.d.ts.map +1 -1
  168. package/dist/commands/logs/tail.js +14 -8
  169. package/dist/commands/object/delete.d.ts +1 -0
  170. package/dist/commands/object/delete.d.ts.map +1 -1
  171. package/dist/commands/object/delete.js +25 -11
  172. package/dist/commands/object/get.d.ts +1 -0
  173. package/dist/commands/object/get.d.ts.map +1 -1
  174. package/dist/commands/object/get.js +25 -11
  175. package/dist/commands/object/list.d.ts +1 -0
  176. package/dist/commands/object/list.d.ts.map +1 -1
  177. package/dist/commands/object/list.js +26 -12
  178. package/dist/commands/object/put.d.ts +1 -0
  179. package/dist/commands/object/put.d.ts.map +1 -1
  180. package/dist/commands/object/put.js +25 -11
  181. package/dist/commands/query/chunk-search.d.ts +1 -0
  182. package/dist/commands/query/chunk-search.d.ts.map +1 -1
  183. package/dist/commands/query/chunk-search.js +21 -6
  184. package/dist/commands/query/document.d.ts +3 -1
  185. package/dist/commands/query/document.d.ts.map +1 -1
  186. package/dist/commands/query/document.js +36 -13
  187. package/dist/commands/query/events.d.ts +1 -0
  188. package/dist/commands/query/events.d.ts.map +1 -1
  189. package/dist/commands/query/events.js +12 -6
  190. package/dist/commands/query/reindex.d.ts +1 -0
  191. package/dist/commands/query/reindex.d.ts.map +1 -1
  192. package/dist/commands/query/reindex.js +13 -4
  193. package/dist/commands/query/search.d.ts +2 -0
  194. package/dist/commands/query/search.d.ts.map +1 -1
  195. package/dist/commands/query/search.js +37 -13
  196. package/dist/index.d.ts.map +1 -1
  197. package/dist/index.js +3 -1
  198. package/dist/templates/registry.d.ts +38 -0
  199. package/dist/templates/registry.d.ts.map +1 -0
  200. package/dist/templates/registry.js +72 -0
  201. package/dist/tsconfig.tsbuildinfo +1 -0
  202. package/oclif.manifest.json +3066 -2290
  203. package/package.json +3 -3
  204. package/templates/db/node_modules/.bin/prisma +2 -2
  205. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  206. package/templates/db/node_modules/.bin/tsc +2 -2
  207. package/templates/db/node_modules/.bin/tsserver +2 -2
  208. package/templates/db/node_modules/.bin/zx +2 -2
@@ -5,7 +5,7 @@ import {
5
5
  init_cjs_shims,
6
6
  require_source_map,
7
7
  valueOf
8
- } from "./chunk-G6NE675D.js";
8
+ } from "./chunk-HMD2JXLE.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({
@@ -4410,7 +4410,6 @@ function gatherEnvForHandler(handler, app) {
4410
4410
  for (const env of handler.env) {
4411
4411
  bindings[kebabCaseToConstantCase(valueOf(env.name))] = "string";
4412
4412
  }
4413
- bindings["WORKOS_ENVIRONMENT"] = "string | undefined";
4414
4413
  if ("visibility" in handler && handler.visibility && valueOf(handler.visibility) === "protected") {
4415
4414
  bindings["LM_AUTH_ALLOWED_ORIGINS"] = "string";
4416
4415
  bindings["LM_AUTH_ALLOWED_ISSUERS"] = "string";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  HANDLERS_DIR
3
- } from "./chunk-6UE75KX2.js";
3
+ } from "./chunk-AKNNZNIC.js";
4
4
  import {
5
5
  Actor,
6
6
  Service,
7
7
  init_cjs_shims,
8
8
  valueOf
9
- } from "./chunk-G6NE675D.js";
9
+ } from "./chunk-HMD2JXLE.js";
10
10
 
11
11
  // src/build.ts
12
12
  init_cjs_shims();
@@ -0,0 +1,75 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-HMD2JXLE.js";
4
+
5
+ // ../drizzle/dist/ulid.js
6
+ init_cjs_shims();
7
+ var BASE32_ENCODING = "0123456789abcdefghjkmnpqrstvwxyz";
8
+ var ENCODING_LEN = BASE32_ENCODING.length;
9
+ var TIME_MAX = Math.pow(2, 48) - 1;
10
+ var TIME_LEN = 10;
11
+ var RANDOM_LEN = 16;
12
+ function monotonic() {
13
+ let lastTime = 0;
14
+ let lastRandom;
15
+ return function ulid2() {
16
+ const seed = (/* @__PURE__ */ new Date()).getTime();
17
+ if (seed <= lastTime) {
18
+ lastRandom = incrementBase32(lastRandom);
19
+ return encodeTime(lastTime) + lastRandom;
20
+ }
21
+ lastTime = seed;
22
+ lastRandom = encodeRandom();
23
+ return encodeTime(seed) + lastRandom;
24
+ };
25
+ }
26
+ var ulid = monotonic();
27
+ function encodeRandom() {
28
+ const bytes = crypto.getRandomValues(new Uint8Array(RANDOM_LEN));
29
+ let str = "";
30
+ for (let i = 0; i < RANDOM_LEN; i++) {
31
+ str = str + BASE32_ENCODING[bytes[i] % ENCODING_LEN];
32
+ }
33
+ return str;
34
+ }
35
+ function encodeTime(ms) {
36
+ if (ms > TIME_MAX)
37
+ throw new Error("cannot encode time greater than " + TIME_MAX);
38
+ if (ms < 0)
39
+ throw new Error("time must be positive");
40
+ let mod;
41
+ let str = "";
42
+ for (let len = TIME_LEN; len > 0; len--) {
43
+ mod = ms % ENCODING_LEN;
44
+ str = BASE32_ENCODING[mod] + str;
45
+ ms = (ms - mod) / ENCODING_LEN;
46
+ }
47
+ return str;
48
+ }
49
+ function incrementBase32(str) {
50
+ function replaceCharAt(str2, index2, char2) {
51
+ if (index2 > str2.length - 1)
52
+ return str2;
53
+ return str2.substring(0, index2) + char2 + str2.substring(index2 + 1);
54
+ }
55
+ const maxCharIndex = ENCODING_LEN - 1;
56
+ let index = str ? str.length : 0;
57
+ let char;
58
+ let charIndex;
59
+ while (index-- >= 0) {
60
+ char = str[index];
61
+ charIndex = BASE32_ENCODING.indexOf(char);
62
+ if (charIndex === -1)
63
+ throw new Error("incorrectly encoded string");
64
+ if (charIndex === maxCharIndex) {
65
+ str = replaceCharAt(str, index, BASE32_ENCODING[0]);
66
+ continue;
67
+ }
68
+ return replaceCharAt(str, index, BASE32_ENCODING[charIndex + 1]);
69
+ }
70
+ return str;
71
+ }
72
+
73
+ export {
74
+ ulid
75
+ };
@@ -0,0 +1,147 @@
1
+ import {
2
+ source_default
3
+ } from "./chunk-6GTBXHHK.js";
4
+ import {
5
+ UnitState,
6
+ init_cjs_shims,
7
+ valueOf
8
+ } from "./chunk-HMD2JXLE.js";
9
+
10
+ // src/status.ts
11
+ init_cjs_shims();
12
+ import * as readline from "readline";
13
+ var statusString = {
14
+ [UnitState.UNSPECIFIED]: "<unknown>",
15
+ [UnitState.PENDING]: "pending...",
16
+ [UnitState.STARTING]: "starting...",
17
+ [UnitState.RUNNING]: "running",
18
+ [UnitState.STOPPING]: "stopping...",
19
+ [UnitState.STOPPED]: "stopped",
20
+ [UnitState.DELETING]: "deleting...",
21
+ [UnitState.DELETED]: "deleted"
22
+ };
23
+ async function getStatus(options) {
24
+ const { command, impersonate } = options;
25
+ let applicationName = options.applicationName;
26
+ let versionId = options.versionId;
27
+ if (!versionId) {
28
+ const config = await command.loadConfig();
29
+ versionId = config.versionId;
30
+ }
31
+ if (!applicationName) {
32
+ const apps = await command.loadManifest();
33
+ const app = apps[0];
34
+ if (app === void 0) {
35
+ command.error("No application provided or found in manifest");
36
+ }
37
+ applicationName = valueOf(app.name);
38
+ }
39
+ const { client: catalogService, userId, organizationId: defaultOrganizationId } = await command.catalogService();
40
+ const organizationId = impersonate ?? defaultOrganizationId;
41
+ const status = await catalogService.status({
42
+ userId,
43
+ organizationId,
44
+ applicationName,
45
+ currentVersionId: versionId || ""
46
+ });
47
+ if (status === void 0) {
48
+ command.error(`Application ${applicationName} not found`);
49
+ }
50
+ return status;
51
+ }
52
+ async function watchStatus(options) {
53
+ const { command } = options;
54
+ const renderer = new StatusRenderer();
55
+ let applicationName = options.applicationName;
56
+ let versionId = options.versionId;
57
+ if (!applicationName) {
58
+ const apps = await command.loadManifest();
59
+ const app = apps[0];
60
+ if (app) {
61
+ applicationName = valueOf(app.name);
62
+ }
63
+ }
64
+ if (!versionId) {
65
+ const config = await command.loadConfig();
66
+ versionId = config.versionId;
67
+ }
68
+ let status = await getStatus(options);
69
+ while (true) {
70
+ renderer.renderLive(status, applicationName, versionId);
71
+ if (status.state === UnitState.RUNNING || status.state === UnitState.STOPPED) {
72
+ break;
73
+ }
74
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
75
+ status = await getStatus(options);
76
+ }
77
+ }
78
+ var StatusRenderer = class {
79
+ linesLastRendered = 0;
80
+ getStatusColor(state) {
81
+ switch (state) {
82
+ case UnitState.RUNNING:
83
+ return source_default.green;
84
+ case UnitState.PENDING:
85
+ case UnitState.STARTING:
86
+ return source_default.yellow;
87
+ case UnitState.STOPPING:
88
+ case UnitState.DELETING:
89
+ return source_default.yellow;
90
+ case UnitState.STOPPED:
91
+ case UnitState.DELETED:
92
+ return source_default.red;
93
+ default:
94
+ return source_default.gray;
95
+ }
96
+ }
97
+ renderLive(status, applicationName, versionId) {
98
+ if (this.linesLastRendered > 0) {
99
+ readline.moveCursor(process.stdout, 0, -this.linesLastRendered);
100
+ readline.clearScreenDown(process.stdout);
101
+ }
102
+ const lines = [];
103
+ lines.push("");
104
+ lines.push(`${source_default.bold(applicationName)} ${source_default.dim(versionId ? `@${versionId.substring(0, 8)}...` : "")}`);
105
+ lines.push(source_default.dim(`Status: ${this.getStatusColor(status.state)(statusString[status.state])}`));
106
+ lines.push("");
107
+ lines.push(`${source_default.bold("Modules")} ${source_default.dim(`(${status.modules.length})`)}`);
108
+ for (const module of status.modules) {
109
+ const statusColor = this.getStatusColor(module.state);
110
+ const notification = module.notification ? ` - ${source_default.cyan(module.notification)}` : "";
111
+ lines.push(` \u2514\u2500 ${source_default.yellow(module.name)} - ${statusColor(statusString[module.state])}${notification}`);
112
+ }
113
+ const runningModules = status.modules.filter((m) => m.state === UnitState.RUNNING).length;
114
+ const totalModules = status.modules.length;
115
+ lines.push("");
116
+ lines.push(source_default.dim("\u2500".repeat(50)));
117
+ lines.push(source_default.dim(`Total: ${totalModules} modules (${runningModules} running)`));
118
+ for (const line of lines) {
119
+ console.log(line);
120
+ }
121
+ this.linesLastRendered = lines.length;
122
+ }
123
+ renderCompact(status, applicationName, versionId) {
124
+ console.log(`
125
+ ${source_default.bold(applicationName)} ${source_default.dim(versionId ? `@${versionId.substring(0, 8)}...` : "")}`);
126
+ console.log(source_default.dim(`Status: ${this.getStatusColor(status.state)(statusString[status.state])}`));
127
+ console.log(`
128
+ ${source_default.bold("Modules")} ${source_default.dim(`(${status.modules.length})`)}`);
129
+ for (const module of status.modules) {
130
+ const statusColor = this.getStatusColor(module.state);
131
+ const notification = module.notification ? ` - ${source_default.cyan(module.notification)}` : "";
132
+ console.log(` \u2514\u2500 ${source_default.yellow(module.name)} - ${statusColor(statusString[module.state])}${notification}`);
133
+ }
134
+ const runningModules = status.modules.filter((m) => m.state === UnitState.RUNNING).length;
135
+ const totalModules = status.modules.length;
136
+ console.log("");
137
+ console.log(source_default.dim("\u2500".repeat(50)));
138
+ console.log(source_default.dim(`Total: ${totalModules} modules (${runningModules} running)`));
139
+ }
140
+ };
141
+
142
+ export {
143
+ statusString,
144
+ getStatus,
145
+ watchStatus,
146
+ StatusRenderer
147
+ };