@liquidmetal-ai/raindrop 0.7.0 → 0.8.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 (178) hide show
  1. package/README.md +408 -73
  2. package/bin/cjs-shims.js +7 -0
  3. package/bin/run.js +20 -2
  4. package/bundle/chunk-5GH4FS6C.js +12148 -0
  5. package/bundle/chunk-6B4I2CKP.js +231 -0
  6. package/bundle/chunk-6UE75KX2.js +4481 -0
  7. package/bundle/chunk-AU3EGGJP.js +44 -0
  8. package/bundle/chunk-CDQRD3JA.js +75 -0
  9. package/bundle/chunk-CMCEP64V.js +380 -0
  10. package/bundle/chunk-CW5ZHVPX.js +292 -0
  11. package/bundle/chunk-G6NE675D.js +238720 -0
  12. package/bundle/chunk-GLIYVKQA.js +48 -0
  13. package/bundle/chunk-KXEV6E63.js +133 -0
  14. package/bundle/chunk-MCRKUPJY.js +4515 -0
  15. package/bundle/chunk-MGM2L2T3.js +805 -0
  16. package/bundle/chunk-MVQYQJHI.js +502 -0
  17. package/bundle/chunk-NG7CZTTE.js +147 -0
  18. package/bundle/chunk-PU4RCSXF.js +22452 -0
  19. package/bundle/chunk-VXAZKB3J.js +292 -0
  20. package/bundle/chunk-W2L3MYN6.js +4480 -0
  21. package/bundle/chunk-XYJACVNA.js +231 -0
  22. package/bundle/commands/annotation/get.js +153 -0
  23. package/bundle/commands/annotation/list.js +226 -0
  24. package/bundle/commands/annotation/put.js +177 -0
  25. package/bundle/commands/auth/list.js +75 -0
  26. package/bundle/commands/auth/login.js +1654 -0
  27. package/bundle/commands/auth/logout.js +27 -0
  28. package/bundle/commands/auth/select.js +53 -0
  29. package/bundle/commands/bucket/create-credential.js +173 -0
  30. package/bundle/commands/bucket/delete-credential.js +140 -0
  31. package/bundle/commands/bucket/get-credential.js +151 -0
  32. package/bundle/commands/bucket/list-credentials.js +148 -0
  33. package/bundle/commands/build/branch.js +126 -0
  34. package/bundle/commands/build/checkout.js +198 -0
  35. package/bundle/commands/build/clone.js +153 -0
  36. package/bundle/commands/build/delete.js +227 -0
  37. package/bundle/commands/build/deploy.js +160 -0
  38. package/bundle/commands/build/env/get.js +105 -0
  39. package/bundle/commands/build/env/set.js +115 -0
  40. package/bundle/commands/build/find.js +333 -0
  41. package/bundle/commands/build/generate.js +75 -0
  42. package/bundle/commands/build/init.js +76 -0
  43. package/bundle/commands/build/list.js +11 -0
  44. package/bundle/commands/build/sandbox.js +65 -0
  45. package/bundle/commands/build/start.js +84 -0
  46. package/bundle/commands/build/status.js +1839 -0
  47. package/bundle/commands/build/stop.js +84 -0
  48. package/bundle/commands/build/tools/check.js +32 -0
  49. package/bundle/commands/build/tools/fmt.js +49 -0
  50. package/bundle/commands/build/unsandbox.js +65 -0
  51. package/bundle/commands/build/upload.js +83 -0
  52. package/bundle/commands/build/validate.js +71 -0
  53. package/bundle/commands/build/workos/delete.js +86 -0
  54. package/bundle/commands/build/workos/env/attach.js +134 -0
  55. package/bundle/commands/build/workos/env/create.js +176 -0
  56. package/bundle/commands/build/workos/env/delete.js +84 -0
  57. package/bundle/commands/build/workos/env/detach.js +115 -0
  58. package/bundle/commands/build/workos/env/get.js +117 -0
  59. package/bundle/commands/build/workos/env/list.js +139 -0
  60. package/bundle/commands/build/workos/env/set.js +138 -0
  61. package/bundle/commands/build/workos/invite.js +91 -0
  62. package/bundle/commands/build/workos/setup.js +124 -0
  63. package/bundle/commands/build/workos/status.js +93 -0
  64. package/bundle/commands/dns/create.js +128 -0
  65. package/bundle/commands/dns/delete.js +80 -0
  66. package/bundle/commands/dns/get.js +167 -0
  67. package/bundle/commands/dns/list.js +193 -0
  68. package/bundle/commands/dns/records/create.js +150 -0
  69. package/bundle/commands/dns/records/delete.js +76 -0
  70. package/bundle/commands/dns/records/get.js +118 -0
  71. package/bundle/commands/dns/records/list.js +153 -0
  72. package/bundle/commands/dns/records/update.js +146 -0
  73. package/bundle/commands/logs/query.js +237 -0
  74. package/bundle/commands/logs/tail.js +155 -0
  75. package/bundle/commands/mcp/install-claude.js +220 -0
  76. package/bundle/commands/mcp/install-gemini.js +220 -0
  77. package/bundle/commands/mcp/install-goose.js +232 -0
  78. package/bundle/commands/mcp/status.js +153 -0
  79. package/bundle/commands/object/delete.js +180 -0
  80. package/bundle/commands/object/get.js +209 -0
  81. package/bundle/commands/object/list.js +206 -0
  82. package/bundle/commands/object/put.js +211 -0
  83. package/bundle/commands/query/chunk-search.js +123 -0
  84. package/bundle/commands/query/document.js +126 -0
  85. package/bundle/commands/query/events.js +98 -0
  86. package/bundle/commands/query/reindex.js +147 -0
  87. package/bundle/commands/query/search.js +169 -0
  88. package/bundle/commands/tail.js +31 -0
  89. package/bundle/index.js +51 -0
  90. package/dist/base-command.d.ts +6 -0
  91. package/dist/base-command.d.ts.map +1 -1
  92. package/dist/base-command.js +14 -1
  93. package/dist/build.d.ts +2 -1
  94. package/dist/build.d.ts.map +1 -1
  95. package/dist/build.js +169 -51
  96. package/dist/codegen.d.ts +1 -1
  97. package/dist/codegen.d.ts.map +1 -1
  98. package/dist/codegen.js +17 -3
  99. package/dist/codegen.test.js +44 -0
  100. package/dist/commands/build/checkout.d.ts.map +1 -1
  101. package/dist/commands/build/checkout.js +4 -0
  102. package/dist/commands/build/delete.d.ts.map +1 -1
  103. package/dist/commands/build/delete.js +6 -3
  104. package/dist/commands/build/deploy.d.ts.map +1 -1
  105. package/dist/commands/build/deploy.js +10 -2
  106. package/dist/commands/build/find.d.ts +1 -0
  107. package/dist/commands/build/find.d.ts.map +1 -1
  108. package/dist/commands/build/find.js +33 -2
  109. package/dist/commands/build/validate.d.ts.map +1 -1
  110. package/dist/commands/build/validate.js +0 -1
  111. package/dist/commands/build/workos/delete.d.ts +18 -0
  112. package/dist/commands/build/workos/delete.d.ts.map +1 -0
  113. package/dist/commands/build/workos/delete.js +72 -0
  114. package/dist/commands/build/workos/env/attach.d.ts +24 -0
  115. package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
  116. package/dist/commands/build/workos/env/attach.js +111 -0
  117. package/dist/commands/build/workos/env/create.d.ts +26 -0
  118. package/dist/commands/build/workos/env/create.d.ts.map +1 -0
  119. package/dist/commands/build/workos/env/create.js +156 -0
  120. package/dist/commands/build/workos/env/delete.d.ts +20 -0
  121. package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
  122. package/dist/commands/build/workos/env/delete.js +61 -0
  123. package/dist/commands/build/workos/env/detach.d.ts +21 -0
  124. package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
  125. package/dist/commands/build/workos/env/detach.js +94 -0
  126. package/dist/commands/build/workos/env/get.d.ts +20 -0
  127. package/dist/commands/build/workos/env/get.d.ts.map +1 -0
  128. package/dist/commands/build/workos/env/get.js +94 -0
  129. package/dist/commands/build/workos/env/list.d.ts +18 -0
  130. package/dist/commands/build/workos/env/list.d.ts.map +1 -0
  131. package/dist/commands/build/workos/env/list.js +114 -0
  132. package/dist/commands/build/workos/env/set.d.ts +27 -0
  133. package/dist/commands/build/workos/env/set.d.ts.map +1 -0
  134. package/dist/commands/build/workos/env/set.js +115 -0
  135. package/dist/commands/build/workos/invite.d.ts +21 -0
  136. package/dist/commands/build/workos/invite.d.ts.map +1 -0
  137. package/dist/commands/build/workos/invite.js +68 -0
  138. package/dist/commands/build/workos/setup.d.ts +20 -0
  139. package/dist/commands/build/workos/setup.d.ts.map +1 -0
  140. package/dist/commands/build/workos/setup.js +106 -0
  141. package/dist/commands/build/workos/status.d.ts +18 -0
  142. package/dist/commands/build/workos/status.d.ts.map +1 -0
  143. package/dist/commands/build/workos/status.js +70 -0
  144. package/dist/commands/mcp/install-claude.d.ts.map +1 -1
  145. package/dist/commands/mcp/install-claude.js +0 -2
  146. package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
  147. package/dist/commands/mcp/install-gemini.js +0 -2
  148. package/dist/commands/mcp/install-goose.d.ts.map +1 -1
  149. package/dist/commands/mcp/install-goose.js +0 -2
  150. package/dist/deploy.d.ts.map +1 -1
  151. package/dist/deploy.js +2 -2
  152. package/dist/index.d.ts +2 -0
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +4 -0
  155. package/oclif.manifest.json +4286 -2208
  156. package/package.json +8 -5
  157. package/templates/claude-code/debug-raindrop-app.md +89 -0
  158. package/templates/claude-code/new-raindrop-app.md +10 -6
  159. package/templates/claude-code/reattach-raindrop-session.md +50 -12
  160. package/templates/claude-code/update-raindrop-app.md +61 -9
  161. package/templates/db/node_modules/.bin/prisma +2 -2
  162. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  163. package/templates/db/node_modules/.bin/tsc +2 -2
  164. package/templates/db/node_modules/.bin/tsserver +2 -2
  165. package/templates/db/node_modules/.bin/zx +2 -2
  166. package/templates/gemini-code/debug-raindrop-app.toml +86 -0
  167. package/templates/gemini-code/new-raindrop-app.toml +9 -5
  168. package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
  169. package/templates/gemini-code/update-raindrop-app.toml +55 -10
  170. package/templates/goose/debug-raindrop-app.yaml +91 -0
  171. package/templates/goose/new-raindrop-app.yaml +12 -7
  172. package/templates/goose/reattach-raindrop-session.yaml +11 -4
  173. package/templates/goose/update-raindrop-app.yaml +57 -5
  174. package/templates/init/src/_app/auth.ts +18 -0
  175. package/templates/init/src/_app/cors.ts +64 -0
  176. package/dist/tsconfig.tsbuildinfo +0 -1
  177. package/templates/claude-code/raindrop-guidelines.md +0 -322
  178. package/templates/gemini-code/raindrop-guidelines.md +0 -322
@@ -0,0 +1,51 @@
1
+ import {
2
+ EPOCH_TS,
3
+ annotationService,
4
+ bucketApiService,
5
+ catalogService,
6
+ configFromAppFile,
7
+ createAuthenticateInterceptor,
8
+ createTraceInterceptor,
9
+ dnsService,
10
+ ensureDirectory,
11
+ eventStreamService,
12
+ getCurrentVersion,
13
+ import_core,
14
+ joinPath,
15
+ objectService,
16
+ rainbowAuthService,
17
+ readState,
18
+ replaceState,
19
+ riverjackService,
20
+ searchAgentService,
21
+ selectedOrganization,
22
+ serviceClient,
23
+ versionInterceptor,
24
+ workosIntegrationService
25
+ } from "./chunk-G6NE675D.js";
26
+ var export_run = import_core.run;
27
+ export {
28
+ EPOCH_TS,
29
+ annotationService,
30
+ bucketApiService,
31
+ catalogService,
32
+ configFromAppFile,
33
+ createAuthenticateInterceptor,
34
+ createTraceInterceptor,
35
+ dnsService,
36
+ ensureDirectory,
37
+ eventStreamService,
38
+ getCurrentVersion,
39
+ joinPath,
40
+ objectService,
41
+ rainbowAuthService,
42
+ readState,
43
+ replaceState,
44
+ riverjackService,
45
+ export_run as run,
46
+ searchAgentService,
47
+ selectedOrganization,
48
+ serviceClient,
49
+ versionInterceptor,
50
+ workosIntegrationService
51
+ };
@@ -8,6 +8,7 @@ import { AnnotationService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/
8
8
  import { EventStreamService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/events_pb';
9
9
  import { RiverjackService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/riverjack_pb';
10
10
  import { S3CredentialService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/bucket_api_pb';
11
+ import { WorkOSIntegrationService } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/workos_integration_pb';
11
12
  import { Command, Interfaces } from '@oclif/core';
12
13
  import { Config } from './config.js';
13
14
  import { ServiceIdentity } from './index.js';
@@ -79,6 +80,11 @@ export declare abstract class BaseCommand<T extends typeof Command> extends Comm
79
80
  organizationId: string;
80
81
  userId: string;
81
82
  }>;
83
+ workosIntegrationService(configDir?: string): Promise<{
84
+ client: StrictClient<typeof WorkOSIntegrationService>;
85
+ userId: string;
86
+ organizationId: string;
87
+ }>;
82
88
  protected rainbowAuthService(): Promise<{
83
89
  client: StrictClient<typeof RainbowAuthService>;
84
90
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,C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AAE,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;QAC/C,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;cAiBc,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC9D,MAAM,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;QAChD,MAAM,EAAE,MAAM,CAAC;QACf,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;cAec,sBAAsB,IAAI,OAAO,CAAC;QAChD,MAAM,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;QAC9C,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;cAiBc,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QACzD,MAAM,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;QACjD,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IAgBI,wBAAwB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAC1D,MAAM,EAAE,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;QACtD,MAAM,EAAE,MAAM,CAAC;QACf,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;cAec,kBAAkB,IAAI,OAAO,CAAC;QAC5C,MAAM,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;KACjD,CAAC;IAMI,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC;IAWjD,GAAG,CAAC,OAAO,GAAE,MAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;CAGhD"}
@@ -5,7 +5,7 @@ import { Command, Flags } from '@oclif/core';
5
5
  import * as fs from 'node:fs/promises';
6
6
  import path from 'node:path';
7
7
  import { loadConfig, saveConfig } from './config.js';
8
- import { catalogService, dnsService, objectService, rainbowAuthService, searchAgentService, selectedOrganization, annotationService, eventStreamService, riverjackService, bucketApiService, } from './index.js';
8
+ import { catalogService, dnsService, objectService, rainbowAuthService, searchAgentService, selectedOrganization, annotationService, eventStreamService, riverjackService, bucketApiService, workosIntegrationService, } from './index.js';
9
9
  export class BaseCommand extends Command {
10
10
  static HIDDEN_FLAGS = {
11
11
  config: Flags.string({
@@ -246,6 +246,19 @@ export class BaseCommand extends Command {
246
246
  });
247
247
  return result;
248
248
  }
249
+ async workosIntegrationService(configDir) {
250
+ if (this.flags.raindropCatalogService) {
251
+ this.log(`[DEBUG] Using workos-integration-service: ${this.flags.raindropCatalogService}`);
252
+ }
253
+ return workosIntegrationService({
254
+ rainbowAuth: (await this.rainbowAuthService()).client,
255
+ configDir: configDir ?? this.config.configDir,
256
+ identity: await this.catalogIdentity(),
257
+ overrideAuthToken: this.flags.rainbowAuthToken,
258
+ logger: this,
259
+ enableSendVersion: false,
260
+ });
261
+ }
249
262
  async rainbowAuthService() {
250
263
  const baseUrl = this.flags.rainbowAuthService;
251
264
  return rainbowAuthService(baseUrl);
package/dist/build.d.ts CHANGED
@@ -3,8 +3,9 @@ import { PrettyPrintableError } from '@oclif/core/interfaces';
3
3
  import * as esbuild from 'esbuild';
4
4
  export default function build(options: {
5
5
  root: string;
6
- entryPoints: string[];
6
+ handlerDir: string;
7
7
  outdir: string;
8
+ isProtected: boolean;
8
9
  }): Promise<esbuild.BuildResult>;
9
10
  export interface Cmd {
10
11
  log: (message?: string, ...args: any[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAW,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAqBnC,wBAA8B,KAAK,CAAC,OAAO,EAAE;IAC3C,IAAI,EAAE,MAAM,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AC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,oBAAoB,GACvB,KAAK,CAAC;CACV;AAGD,wBAAsB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAoHhG"}
package/dist/build.js CHANGED
@@ -1,49 +1,113 @@
1
- import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
1
+ import { Actor, Service, valueOf } from '@liquidmetal-ai/drizzle/appify/build';
2
+ import { init, parse } from 'es-module-lexer';
2
3
  import * as esbuild from 'esbuild';
3
- import { exec } from 'node:child_process';
4
+ import { exec, spawn } from 'node:child_process';
4
5
  import fs from 'node:fs/promises';
5
6
  import * as path from 'node:path';
6
7
  import { promisify } from 'node:util';
7
8
  import { HANDLERS_DIR } from './codegen.js';
8
9
  const execAsync = promisify(exec);
9
- async function typeCheck(cwd) {
10
+ // Plugin to selectively rewrite raindrop-framework imports
11
+ function raindropFrameworkPlugin() {
12
+ return {
13
+ name: 'raindrop-framework-resolver',
14
+ setup(build) {
15
+ // Handle bare package imports - rewrite to ./runtime.js
16
+ build.onResolve({ filter: /^@liquidmetal-ai\/raindrop-framework$/ }, (_args) => {
17
+ return {
18
+ path: './runtime.js',
19
+ external: true,
20
+ };
21
+ });
22
+ // Handle subpath imports - bundle them.
23
+ build.onResolve({ filter: /^@liquidmetal-ai\/raindrop-framework\/.+/ }, (_args) => {
24
+ // Let esbuild handle these normally (will bundle them)
25
+ return undefined;
26
+ });
27
+ },
28
+ };
29
+ }
30
+ // Analyze what exports the user has in their index.ts using es-module-lexer
31
+ async function analyzeExports(indexPath) {
10
32
  try {
11
- await execAsync('npx tsc --noEmit', {
12
- cwd,
13
- });
14
- return true;
33
+ // Initialize es-module-lexer (required once)
34
+ await init;
35
+ // Read the source file
36
+ const content = await fs.readFile(indexPath, 'utf-8');
37
+ // Parse to get exports
38
+ const [, exports] = parse(content);
39
+ // Convert export names to a Set
40
+ const exportNames = new Set();
41
+ for (const exp of exports) {
42
+ if (exp.n) {
43
+ // Named export
44
+ exportNames.add(exp.n);
45
+ }
46
+ }
47
+ return exportNames;
48
+ }
49
+ catch (_error) {
50
+ // If we can't read or parse the file, assume no exports
51
+ return new Set();
52
+ }
53
+ }
54
+ // Generate the entry point content based on what the user has exported
55
+ async function generateEntryPoint(handlerDir, isProtected) {
56
+ const indexPath = path.join(handlerDir, 'index.ts');
57
+ const userExports = await analyzeExports(indexPath);
58
+ let content = '';
59
+ // Only inject auth exports for protected handlers
60
+ if (isProtected) {
61
+ const authExports = ['verify', 'authorize'];
62
+ const missingAuthExports = authExports.filter(exp => !userExports.has(exp));
63
+ // Only export auth functions that the user hasn't already exported
64
+ if (missingAuthExports.length > 0) {
65
+ content += `export { ${missingAuthExports.join(', ')} } from '../_app/auth.js';\n`;
66
+ }
15
67
  }
16
- catch (err) {
17
- console.error(err);
18
- return false;
68
+ // Inject cors export if user hasn't exported it
69
+ // CORS is available for all handlers (not just protected ones)
70
+ if (!userExports.has('cors')) {
71
+ // Try to check if _app/cors.ts exists to avoid import errors
72
+ content += `export { cors } from '../_app/cors.js';\n`;
19
73
  }
74
+ // Explicitly export all user's exports to ensure they get bundled
75
+ content += `export * from './index.js';\n`;
76
+ content += `import * as userDefault from './index.js';\n`;
77
+ content += `export default userDefault.default;\n`;
78
+ return content;
79
+ }
80
+ async function typeCheck(cwd) {
81
+ return new Promise((resolve) => {
82
+ const tsc = spawn('npx', ['tsc', '--noEmit'], {
83
+ cwd,
84
+ stdio: 'inherit', // Inherit stdio to show compiler output in real-time
85
+ });
86
+ tsc.on('exit', (code) => {
87
+ resolve(code === 0);
88
+ });
89
+ });
20
90
  }
21
91
  export default async function build(options) {
22
92
  // Ensure that TypeScript errors are fixed before building
23
93
  const typeCheckPassed = await typeCheck(options.root);
24
94
  if (!typeCheckPassed) {
25
- throw new Error(`TypeScript type checking failed. Run 'raindrop build validate' and fix all errors before building.`);
95
+ throw new Error(`TypeScript type checking failed.Run 'raindrop build validate' and fix all errors before building.`);
26
96
  }
27
97
  // Customize outbase so that even when only one entryPoint is provided,
28
98
  // the output file is placed in the same directory as it would if
29
99
  // another entryPoint were provided later.
30
- let outbase;
31
- if (options.entryPoints.length === 1) {
32
- outbase = path.join(options.root, HANDLERS_DIR);
33
- }
34
100
  const gitCommitSha = await currentGitCommitSha();
101
+ // Generate entry point dynamically based on user's exports and handler visibility
102
+ const entryPointContent = await generateEntryPoint(options.handlerDir, options.isProtected);
35
103
  const buildResult = await esbuild.build({
36
- entryPoints: options.entryPoints,
37
- external: ['node:crypto', 'crypto', '@liquidmetal-ai/raindrop-framework', './runtime.js'],
38
- alias: {
39
- '@liquidmetal-ai/raindrop-framework': './runtime.js',
40
- },
104
+ external: ['node:crypto', 'crypto', './runtime.js'],
105
+ plugins: [raindropFrameworkPlugin()],
41
106
  banner: {
42
- js: `globalThis.__RAINDROP_GIT_COMMIT_SHA = "${gitCommitSha}";`,
107
+ js: `globalThis.__RAINDROP_GIT_COMMIT_SHA = "${gitCommitSha}"; `,
43
108
  },
44
109
  bundle: true,
45
- outdir: options.outdir,
46
- outbase,
110
+ outfile: `${options.outdir}/index.js`,
47
111
  tsconfig: `${options.root}/tsconfig.json`,
48
112
  // TODO [bosgood] Add support for middleware/code injection from wrangler
49
113
  inject: [],
@@ -51,7 +115,11 @@ export default async function build(options) {
51
115
  // Until we switch to fflate for compression, we need to disable
52
116
  // sourcemaps (JSZip uses ~10x memory).
53
117
  sourcemap: false,
54
- sourceRoot: options.outdir,
118
+ stdin: {
119
+ contents: entryPointContent,
120
+ loader: 'ts',
121
+ resolveDir: options.handlerDir,
122
+ },
55
123
  // Experiment: let's see how far we can get without minification because:
56
124
  // 1) It should be slightly faster to build
57
125
  // 2) It should be easier to debug
@@ -82,46 +150,96 @@ export async function buildHandlers(cmd, apps, buildDir, root) {
82
150
  // Wipe out the output directory then rebuild
83
151
  await fs.rm(buildDir, { force: true, recursive: true });
84
152
  cmd.log(`Building to ${buildDir}`);
85
- // Discover entrypoints from manifest
86
- let entryPoints = [];
153
+ const buildTasks = [];
87
154
  for (const app of apps) {
88
- entryPoints = entryPoints.concat(app.handlers().map((handler) => path.join(root, HANDLERS_DIR, valueOf(handler.name), 'index.ts')));
89
- }
90
- if (entryPoints.length === 0) {
91
- cmd.log('Nothing to build');
92
- return;
155
+ for (const handler of app.handlers()) {
156
+ const handlerName = valueOf(handler.name);
157
+ // Check if this handler is protected (only for Service and Actor types)
158
+ let isProtected = false;
159
+ if (handler instanceof Service || handler instanceof Actor) {
160
+ isProtected = handler.visibility !== undefined && valueOf(handler.visibility) === 'protected';
161
+ }
162
+ buildTasks.push({
163
+ handlerName,
164
+ isProtected,
165
+ handlerDir: `${root}/${HANDLERS_DIR}/${handlerName}`,
166
+ outdir: path.join(buildDir, handlerName),
167
+ });
168
+ }
93
169
  }
94
- cmd.log(`Building entry points:\n${entryPoints.join('\n')}`);
95
- try {
170
+ // Run all builds in parallel
171
+ const results = await Promise.allSettled(buildTasks.map(async (task) => {
96
172
  const buildResult = await build({
97
173
  root: root,
98
- entryPoints,
99
- outdir: buildDir,
174
+ handlerDir: task.handlerDir,
175
+ outdir: task.outdir,
176
+ isProtected: task.isProtected,
100
177
  });
101
- if (buildResult.errors.length > 0 || buildResult.warnings.length > 0) {
102
- cmd.log('Build results');
178
+ return { task, buildResult };
179
+ }));
180
+ // Aggregate results
181
+ const successful = [];
182
+ const failed = [];
183
+ for (const result of results) {
184
+ if (result.status === 'fulfilled') {
185
+ const { task, buildResult } = result.value;
186
+ if (buildResult.errors.length === 0) {
187
+ successful.push({ task, buildResult });
188
+ }
189
+ else {
190
+ failed.push({ task, error: buildResult });
191
+ }
103
192
  }
104
- if (buildResult.errors.length > 0) {
105
- cmd.log(buildResult.errors.map((e) => e.text).join('\n'));
106
- }
107
- if (buildResult.warnings.length > 0) {
108
- cmd.log(buildResult.warnings.map((w) => w.text).join('\n'));
193
+ else {
194
+ // Extract task from the rejection - this is tricky, we need to match by index
195
+ const index = results.indexOf(result);
196
+ const task = buildTasks[index];
197
+ failed.push({ task, error: result.reason });
109
198
  }
110
- if (buildResult.errors.length === 0) {
111
- cmd.log('Build successful');
199
+ }
200
+ // Log results
201
+ cmd.log(`\nBuild Summary: ${successful.length}/${buildTasks.length} handlers built successfully`);
202
+ // Log successful builds
203
+ if (successful.length > 0) {
204
+ cmd.log('\nSuccessful builds:');
205
+ for (const { task } of successful) {
206
+ cmd.log(` ✓ ${task.handlerName}`);
112
207
  }
113
- else {
114
- cmd.error('Build failed', { exit: 1 });
208
+ }
209
+ // Log warnings across all builds
210
+ const buildsWithWarnings = [];
211
+ for (const { task, buildResult } of successful) {
212
+ if (buildResult.warnings.length > 0) {
213
+ buildsWithWarnings.push({ handler: task.handlerName, warnings: buildResult.warnings });
115
214
  }
116
215
  }
117
- catch (error) {
118
- if (error instanceof Error) {
119
- cmd.error(`Build failed: ${error.message}`, { exit: 1 });
216
+ if (buildsWithWarnings.length > 0) {
217
+ cmd.log('\nWarnings:');
218
+ for (const { handler, warnings } of buildsWithWarnings) {
219
+ cmd.log(` ${handler}:`);
220
+ for (const warning of warnings) {
221
+ cmd.log(` ${warning.text}`);
222
+ }
120
223
  }
121
- else {
122
- cmd.error('Build failed with unknown error', { exit: 1 });
224
+ }
225
+ // Log errors
226
+ if (failed.length > 0) {
227
+ cmd.log('\nFailed builds:');
228
+ for (const { task, error } of failed) {
229
+ cmd.log(` ✗ ${task.handlerName}:`);
230
+ if (error instanceof Error) {
231
+ cmd.log(` ${error.message}`);
232
+ }
233
+ else {
234
+ // esbuild.BuildResult with errors
235
+ for (const err of error.errors) {
236
+ cmd.log(` ${err.text}`);
237
+ }
238
+ }
123
239
  }
240
+ cmd.error(`Build failed for ${failed.length} handler(s)`, { exit: 1 });
124
241
  }
242
+ cmd.log('\nBuild completed successfully');
125
243
  }
126
244
  async function currentGitCommitSha() {
127
245
  try {
package/dist/codegen.d.ts CHANGED
@@ -39,7 +39,7 @@ export declare function codegenPlan(apps: Application[]): CodegenPlan;
39
39
  export declare function gatherEnvForHandler(handler: Actor | Service | Observer | Task, app: Application): string;
40
40
  export declare function fileExists(path: string): Promise<boolean>;
41
41
  export type DirWalkCallback = (relPath: string) => void | Promise<void>;
42
- export declare function dirWalk(dir: string, visitFn: DirWalkCallback): Promise<void>;
42
+ export declare function dirWalk(dir: string, visitFn: DirWalkCallback, relativeBase?: string): Promise<void>;
43
43
  export declare function kebabCaseToConstantCase(s: string): string;
44
44
  export declare function kebabCaseToCamelCase(s: string): string;
45
45
  export declare function kebabCaseToUpperCamelCase(s: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAW,MAAM,sCAAsC,CAAC;AAK5G,eAAO,MAAM,SAAS,mBAAmB,CAAC;AAC1C,eAAO,MAAM,aAAa,QAA6E,CAAC;AACxG,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C,eAAO,MAAM,YAAY,QAAQ,CAAC;AAClC,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,eAAO,MAAM,MAAM,OAAO,CAAC;AAC3B,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AAoBzD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEvD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAG3F;AAED,wBAAsB,sBAAsB,CAAC,YAAY,EAAE,MAAM,E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AE,CAAC;AAGJ,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,WAAW,CAgF5D;AAoBD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,IAAI,EAAE,GAAG,EAAE,WAAW,GAAG,MAAM,CA2HxG;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAGxE,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,GAAE,MAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB7G;AAED,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3D"}
package/dist/codegen.js CHANGED
@@ -301,6 +301,19 @@ export function gatherEnvForHandler(handler, app) {
301
301
  for (const env of handler.env) {
302
302
  bindings[kebabCaseToConstantCase(valueOf(env.name))] = 'string';
303
303
  }
304
+ // Add auth environment variables for protected handlers
305
+ if ('visibility' in handler && handler.visibility && valueOf(handler.visibility) === 'protected') {
306
+ // Core auth bindings (provider-agnostic)
307
+ bindings['LM_AUTH_ALLOWED_ORIGINS'] = 'string';
308
+ bindings['LM_AUTH_ALLOWED_ISSUERS'] = 'string';
309
+ // WorkOS provider-specific bindings (optional)
310
+ bindings['LM_PROVIDER_WORKOS_ORG_ID?'] = 'string';
311
+ bindings['LM_PROVIDER_WORKOS_CLIENT_ID?'] = 'string';
312
+ bindings['LM_PROVIDER_WORKOS_API_KEY?'] = 'string';
313
+ // Add optional jwt field populated by auth middleware
314
+ bindings['jwt?'] = 'JWTVerifyResult';
315
+ types.add('JWTVerifyResult');
316
+ }
304
317
  //
305
318
  // (nothing to do for Tasks)
306
319
  //
@@ -342,15 +355,16 @@ export async function fileExists(path) {
342
355
  }
343
356
  }
344
357
  // dirWalk walks a directory tree and calls the callback for each file it encounters
345
- export async function dirWalk(dir, visitFn) {
358
+ export async function dirWalk(dir, visitFn, relativeBase = '') {
346
359
  const entries = await fs.readdir(dir, { withFileTypes: true });
347
360
  const tasks = entries.map(async (entry) => {
361
+ const relativePath = relativeBase ? path.join(relativeBase, entry.name) : entry.name;
348
362
  if (entry.isDirectory()) {
349
- await dirWalk(path.join(dir, entry.name), visitFn);
363
+ await dirWalk(path.join(dir, entry.name), visitFn, relativePath);
350
364
  }
351
365
  else {
352
366
  // Process encountered file
353
- await visitFn(entry.name);
367
+ await visitFn(relativePath);
354
368
  }
355
369
  });
356
370
  const settled = await Promise.allSettled(tasks);
@@ -121,6 +121,14 @@ test('codegens template files', async () => {
121
121
  renderNonUserModifiableCode: true,
122
122
  },
123
123
  });
124
+ // Verify nested directory structure is preserved
125
+ const authFilePath = path.join(outPath, 'src', '_app', 'auth.ts');
126
+ const authFileExists = await fs.access(authFilePath).then(() => true, () => false);
127
+ expect(authFileExists).toBe(true);
128
+ // Verify the file content was copied correctly
129
+ const authFileContent = await fs.readFile(authFilePath, 'utf-8');
130
+ expect(authFileContent).toContain('verifyIssuer');
131
+ expect(authFileContent).toContain('requireAuthenticated');
124
132
  });
125
133
  test('kebabCaseToConstantCase', () => {
126
134
  expect(kebabCaseToConstantCase('my-variable')).toEqual('MY_VARIABLE');
@@ -177,3 +185,39 @@ test('always includes mem KvCache binding', async () => {
177
185
  // Should include mem type binding
178
186
  expect(generated).toMatch(/mem:\s*KvCache/);
179
187
  });
188
+ test('includes auth env vars for protected service', async () => {
189
+ const apps = await mustManifestFromString(`
190
+ application "test-app" {
191
+ service "protected-service" {
192
+ visibility = "protected"
193
+ }
194
+ }
195
+ `);
196
+ const app = apps[0];
197
+ const service = app.service[0];
198
+ const generated = gatherEnvForHandler(service, app);
199
+ // Should include core auth bindings and WorkOS provider bindings for protected services
200
+ expect(generated).toMatch(/LM_AUTH_ALLOWED_ORIGINS:\s*string/);
201
+ expect(generated).toMatch(/LM_AUTH_ALLOWED_ISSUERS:\s*string/);
202
+ expect(generated).toMatch(/LM_PROVIDER_WORKOS_ORG_ID\?:\s*string/);
203
+ expect(generated).toMatch(/LM_PROVIDER_WORKOS_CLIENT_ID\?:\s*string/);
204
+ expect(generated).toMatch(/LM_PROVIDER_WORKOS_API_KEY\?:\s*string/);
205
+ });
206
+ test('does not include auth env vars for public service', async () => {
207
+ const apps = await mustManifestFromString(`
208
+ application "test-app" {
209
+ service "public-service" {
210
+ visibility = "public"
211
+ }
212
+ }
213
+ `);
214
+ const app = apps[0];
215
+ const service = app.service[0];
216
+ const generated = gatherEnvForHandler(service, app);
217
+ // Should NOT include auth env vars for non-protected services
218
+ expect(generated).not.toMatch(/LM_AUTH_ALLOWED_ORIGINS/);
219
+ expect(generated).not.toMatch(/LM_AUTH_ALLOWED_ISSUERS/);
220
+ expect(generated).not.toMatch(/LM_PROVIDER_WORKOS_ORG_ID/);
221
+ expect(generated).not.toMatch(/LM_PROVIDER_WORKOS_CLIENT_ID/);
222
+ expect(generated).not.toMatch(/LM_PROVIDER_WORKOS_API_KEY/);
223
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../../src/commands/build/checkout.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,gCAAgC,EAEjC,MAAM,yDAAyD,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,gCAAgC,CAAC;IAC9C,QAAQ,EAAE,WAAW,EAAE,CAAC;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wBAAwB,CAC5B,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,gCAAgC,EAAE,CAAC;IAaxC,sBAAsB,CAAC,QAAQ,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAyDjG,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA8E3B"}
@@ -158,12 +158,16 @@ Switched to version: 01jux6z20m4gbhn5kaa4mcm2jr
158
158
  // Filter out versions marked for deletion (exclude apps where deletedAt is set)
159
159
  const activeVersions = allVersions.filter((app) => !app.deletedAt);
160
160
  if (activeVersions.length === 0) {
161
+ config.sandbox = false;
162
+ await this.saveConfig(config);
161
163
  console.log('No versions found.');
162
164
  return;
163
165
  }
164
166
  console.log(`\nFound ${activeVersions.length} version${activeVersions.length !== 1 ? 's' : ''}:`);
165
167
  const selectedVersion = await this.promptVersionSelection(activeVersions);
168
+ const activeApp = activeVersions.find((a) => a.versionId === selectedVersion);
166
169
  config.versionId = selectedVersion;
170
+ config.sandbox = activeApp?.isSandboxed === true;
167
171
  await this.saveConfig(config);
168
172
  if (selectedVersion) {
169
173
  console.log(`\nSwitched to version: ${selectedVersion}`);
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/build/delete.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gCAAgC,EAEjC,MAAM,yDAAyD,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,UAAU,WAAW;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,gCAAgC,CAAC;IAC9C,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OA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,EACd,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,gCAAgC,EAAE,CAAC;IAaxC,sBAAsB,CAC1B,QAAQ,EAAE,gCAAgC,EAAE,EAC5C,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IA4DxB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA6F3B"}
@@ -1,12 +1,12 @@
1
- import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
2
1
  import { timestampDate } from '@bufbuild/protobuf/wkt';
3
- import { UnitState, } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/catalog_pb';
4
2
  import { select } from '@inquirer/prompts';
3
+ import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
4
+ import { UnitState } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/catalog_pb';
5
5
  import { Args, Flags } from '@oclif/core';
6
6
  import chalk from 'chalk';
7
7
  import { BaseCommand } from '../../base-command.js';
8
- import { statusString } from './list.js';
9
8
  import { EPOCH_TS } from '../../index.js';
9
+ import { statusString } from './list.js';
10
10
  export default class Delete extends BaseCommand {
11
11
  static args = {
12
12
  application: Args.string({ char: 'a', description: 'application name', required: false }),
@@ -199,6 +199,7 @@ Deleted (application) at version (version)
199
199
  // No undeleted versions left, clear the config
200
200
  console.log('No undeleted versions remaining.');
201
201
  config.versionId = undefined;
202
+ config.sandbox = false;
202
203
  await this.saveConfig(config);
203
204
  console.log('Cleared version from config.');
204
205
  }
@@ -207,7 +208,9 @@ Deleted (application) at version (version)
207
208
  // Default to the parent of the deleted version if available
208
209
  console.log(`\nFound ${activeVersions.length} undeleted version${activeVersions.length !== 1 ? 's' : ''}:`);
209
210
  const selectedVersion = await this.promptVersionSelection(activeVersions, parentVersionId);
211
+ const activeApp = activeVersions.find((a) => a.versionId === selectedVersion);
210
212
  config.versionId = selectedVersion;
213
+ config.sandbox = activeApp?.isSandboxed === true;
211
214
  await this.saveConfig(config);
212
215
  if (selectedVersion) {
213
216
  console.log(`\nChecked out version: ${selectedVersion}`);
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/build/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAmC;IAErD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;MAsCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmD3B"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/build/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAmC;IAErD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;MAsCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4D3B"}
@@ -3,6 +3,7 @@ import { BaseCommand } from '../../base-command.js';
3
3
  import { deploy } from '../../deploy.js';
4
4
  import { watchStatus } from '../../status.js';
5
5
  import { validateRaindropDirectory, isDirectoryValidationError } from '../../utils/directory-validation.js';
6
+ import { sandbox } from '../../deploy.js';
6
7
  export default class Deploy extends BaseCommand {
7
8
  static args = {};
8
9
  static description = 'deploy a Raindrop application';
@@ -56,7 +57,9 @@ Deploy a Raindrop application version.
56
57
  }
57
58
  catch (error) {
58
59
  if (isDirectoryValidationError(error)) {
59
- this.error(error.message + '\n\nSuggested actions:\n' + error.suggestedActions?.map(action => ` • ${action}`).join('\n'), { exit: 1 });
60
+ this.error(error.message +
61
+ '\n\nSuggested actions:\n' +
62
+ error.suggestedActions?.map((action) => ` • ${action}`).join('\n'), { exit: 1 });
60
63
  }
61
64
  throw error;
62
65
  }
@@ -82,7 +85,12 @@ Deploy a Raindrop application version.
82
85
  impersonate: this.flags.impersonate,
83
86
  });
84
87
  if (!amend) {
85
- this.log(`🔔 You deployed a full version, updates will require a full versioned deployment to work`);
88
+ this.log(`🔔 You deployed a full version update and are now in Sandbox mode, future deploys will amend`);
89
+ // Mark version as sandboxed
90
+ await sandbox({
91
+ command: this,
92
+ isSandboxed: true,
93
+ });
86
94
  }
87
95
  // Show status with watch output
88
96
  if (!this.flags['no-watch']) {