@liquidmetal-ai/raindrop 0.0.3 → 0.0.5

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 (45) hide show
  1. package/README.md +116 -22
  2. package/dist/base-command.d.ts.map +1 -1
  3. package/dist/base-command.js +5 -7
  4. package/dist/commands/build/branch.d.ts +1 -0
  5. package/dist/commands/build/branch.d.ts.map +1 -1
  6. package/dist/commands/build/branch.js +12 -3
  7. package/dist/commands/build/deploy.d.ts +1 -0
  8. package/dist/commands/build/deploy.d.ts.map +1 -1
  9. package/dist/commands/build/deploy.js +43 -25
  10. package/dist/commands/build/env/get.d.ts.map +1 -1
  11. package/dist/commands/build/env/get.js +5 -2
  12. package/dist/commands/build/env/set.d.ts.map +1 -1
  13. package/dist/commands/build/env/set.js +5 -2
  14. package/dist/commands/build/list.d.ts.map +1 -1
  15. package/dist/commands/build/list.js +3 -1
  16. package/dist/commands/build/sandbox.d.ts +16 -0
  17. package/dist/commands/build/sandbox.d.ts.map +1 -0
  18. package/dist/commands/build/sandbox.js +54 -0
  19. package/dist/commands/build/start.js +2 -2
  20. package/dist/commands/build/stop.js +2 -2
  21. package/dist/commands/build/tools/check.d.ts +12 -0
  22. package/dist/commands/build/tools/check.d.ts.map +1 -0
  23. package/dist/commands/build/tools/check.js +19 -0
  24. package/dist/commands/build/tools/fmt.d.ts +12 -0
  25. package/dist/commands/build/tools/fmt.d.ts.map +1 -0
  26. package/dist/commands/build/tools/fmt.js +36 -0
  27. package/dist/commands/build/unsandbox.d.ts +16 -0
  28. package/dist/commands/build/unsandbox.d.ts.map +1 -0
  29. package/dist/commands/build/unsandbox.js +54 -0
  30. package/dist/commands/build/upload.d.ts.map +1 -1
  31. package/dist/commands/build/upload.js +1 -2
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/oclif.manifest.json +241 -2
  34. package/package.json +3 -2
  35. package/templates/handlers/actor/index.test.ts +5 -0
  36. package/templates/handlers/actor/index.ts.hbs +8 -0
  37. package/templates/handlers/http-service/index.test.ts +5 -0
  38. package/templates/handlers/http-service/index.ts.hbs +8 -0
  39. package/templates/handlers/queue-consumer/index.test.ts +5 -0
  40. package/templates/handlers/queue-consumer/index.ts.hbs +11 -0
  41. package/templates/handlers/r2-event-notification/index.test.ts +5 -0
  42. package/templates/handlers/r2-event-notification/index.ts.hbs +8 -0
  43. package/templates/init/package.json.hbs +23 -0
  44. package/templates/init/raindrop.manifest.hbs +3 -0
  45. package/templates/init/tsconfig.json +29 -0
package/README.md CHANGED
@@ -20,7 +20,7 @@ $ npm install -g @liquidmetal-ai/raindrop
20
20
  $ raindrop COMMAND
21
21
  running command...
22
22
  $ raindrop (--version)
23
- @liquidmetal-ai/raindrop/0.0.3 darwin-arm64 node-v22.10.0
23
+ @liquidmetal-ai/raindrop/0.0.5 darwin-arm64 node-v22.10.0
24
24
  $ raindrop --help [COMMAND]
25
25
  USAGE
26
26
  $ raindrop COMMAND
@@ -44,9 +44,13 @@ USAGE
44
44
  * [`raindrop build generate`](#raindrop-build-generate)
45
45
  * [`raindrop build init [PATH]`](#raindrop-build-init-path)
46
46
  * [`raindrop build list`](#raindrop-build-list)
47
+ * [`raindrop build sandbox [VERSIONID]`](#raindrop-build-sandbox-versionid)
47
48
  * [`raindrop build start`](#raindrop-build-start)
48
49
  * [`raindrop build stop`](#raindrop-build-stop)
49
50
  * [`raindrop build token`](#raindrop-build-token)
51
+ * [`raindrop build tools check`](#raindrop-build-tools-check)
52
+ * [`raindrop build tools fmt`](#raindrop-build-tools-fmt)
53
+ * [`raindrop build unsandbox [VERSIONID]`](#raindrop-build-unsandbox-versionid)
50
54
  * [`raindrop build upload`](#raindrop-build-upload)
51
55
  * [`raindrop build validate`](#raindrop-build-validate)
52
56
  * [`raindrop help [COMMAND]`](#raindrop-help-command)
@@ -77,7 +81,7 @@ DESCRIPTION
77
81
  List authentications
78
82
  ```
79
83
 
80
- _See code: [src/commands/auth/list.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/auth/list.ts)_
84
+ _See code: [src/commands/auth/list.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/auth/list.ts)_
81
85
 
82
86
  ## `raindrop auth login`
83
87
 
@@ -91,7 +95,7 @@ DESCRIPTION
91
95
  Logs a user into the LiquidMetal platform. Supports browser-based authentication.
92
96
  ```
93
97
 
94
- _See code: [src/commands/auth/login.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/auth/login.ts)_
98
+ _See code: [src/commands/auth/login.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/auth/login.ts)_
95
99
 
96
100
  ## `raindrop auth logout`
97
101
 
@@ -105,7 +109,7 @@ DESCRIPTION
105
109
  Logout authentications
106
110
  ```
107
111
 
108
- _See code: [src/commands/auth/logout.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/auth/logout.ts)_
112
+ _See code: [src/commands/auth/logout.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/auth/logout.ts)_
109
113
 
110
114
  ## `raindrop auth select`
111
115
 
@@ -122,7 +126,7 @@ DESCRIPTION
122
126
  Select active organization
123
127
  ```
124
128
 
125
- _See code: [src/commands/auth/select.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/auth/select.ts)_
129
+ _See code: [src/commands/auth/select.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/auth/select.ts)_
126
130
 
127
131
  ## `raindrop build branch`
128
132
 
@@ -130,22 +134,23 @@ create a new branch in the Raindrop catalog
130
134
 
131
135
  ```
132
136
  USAGE
133
- $ raindrop build branch [-p <value> | -s <value>] [--manifest <value>]
137
+ $ raindrop build branch [-p <value> | -s <value>] [--manifest <value>] [--show]
134
138
 
135
139
  FLAGS
136
140
  -p, --previousVersionId=<value> previous version ID
137
141
  -s, --select=<value> select a specific version ID
138
142
  --manifest=<value> [default: raindrop.manifest] project manifest
143
+ --show show the current branch
139
144
 
140
145
  DESCRIPTION
141
146
  create a new branch in the Raindrop catalog
142
147
 
143
148
  EXAMPLES
144
149
  $ raindrop build branch .
145
- Create a new branch in the Raindrop catalog.
150
+ Created new branch 1234
146
151
  ```
147
152
 
148
- _See code: [src/commands/build/branch.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/branch.ts)_
153
+ _See code: [src/commands/build/branch.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/branch.ts)_
149
154
 
150
155
  ## `raindrop build delete [APPLICATION]`
151
156
 
@@ -173,7 +178,7 @@ EXAMPLES
173
178
  Deleted (application) at version (version)
174
179
  ```
175
180
 
176
- _See code: [src/commands/build/delete.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/delete.ts)_
181
+ _See code: [src/commands/build/delete.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/delete.ts)_
177
182
 
178
183
  ## `raindrop build deploy`
179
184
 
@@ -181,9 +186,10 @@ deploy a Raindrop application
181
186
 
182
187
  ```
183
188
  USAGE
184
- $ raindrop build deploy [-r <value>] [-m <value>] [-o <value>] [-v <value>] [-s]
189
+ $ raindrop build deploy [-r <value>] [-m <value>] [-o <value>] [-v <value>] [-s] [-a]
185
190
 
186
191
  FLAGS
192
+ -a, --amend amend an existing application
187
193
  -m, --manifest=<value> [default: raindrop.manifest] project manifest
188
194
  -o, --output=<value> [default: dist] output directory
189
195
  -r, --root=<value> [default: /Users/ian/liquidmetal/packages/raindrop] root directory
@@ -198,7 +204,7 @@ EXAMPLES
198
204
  Deploy a Raindrop application.
199
205
  ```
200
206
 
201
- _See code: [src/commands/build/deploy.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/deploy.ts)_
207
+ _See code: [src/commands/build/deploy.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/deploy.ts)_
202
208
 
203
209
  ## `raindrop build env get VAR`
204
210
 
@@ -226,7 +232,7 @@ EXAMPLES
226
232
  sets an env var/secret.
227
233
  ```
228
234
 
229
- _See code: [src/commands/build/env/get.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/env/get.ts)_
235
+ _See code: [src/commands/build/env/get.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/env/get.ts)_
230
236
 
231
237
  ## `raindrop build env set VAR [VALUE]`
232
238
 
@@ -255,7 +261,7 @@ EXAMPLES
255
261
  sets an env var/secret.
256
262
  ```
257
263
 
258
- _See code: [src/commands/build/env/set.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/env/set.ts)_
264
+ _See code: [src/commands/build/env/set.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/env/set.ts)_
259
265
 
260
266
  ## `raindrop build find`
261
267
 
@@ -279,7 +285,7 @@ EXAMPLES
279
285
  $ raindrop build find .
280
286
  ```
281
287
 
282
- _See code: [src/commands/build/find.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/find.ts)_
288
+ _See code: [src/commands/build/find.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/find.ts)_
283
289
 
284
290
  ## `raindrop build generate`
285
291
 
@@ -301,7 +307,7 @@ EXAMPLES
301
307
  $ raindrop build generate
302
308
  ```
303
309
 
304
- _See code: [src/commands/build/generate.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/generate.ts)_
310
+ _See code: [src/commands/build/generate.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/generate.ts)_
305
311
 
306
312
  ## `raindrop build init [PATH]`
307
313
 
@@ -325,7 +331,7 @@ EXAMPLES
325
331
  Initialize a project in the current directory.
326
332
  ```
327
333
 
328
- _See code: [src/commands/build/init.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/init.ts)_
334
+ _See code: [src/commands/build/init.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/init.ts)_
329
335
 
330
336
  ## `raindrop build list`
331
337
 
@@ -349,7 +355,30 @@ EXAMPLES
349
355
  List Raindrop catalog resources.
350
356
  ```
351
357
 
352
- _See code: [src/commands/build/list.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/list.ts)_
358
+ _See code: [src/commands/build/list.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/list.ts)_
359
+
360
+ ## `raindrop build sandbox [VERSIONID]`
361
+
362
+ mark a version as sandboxed in the Raindrop catalog
363
+
364
+ ```
365
+ USAGE
366
+ $ raindrop build sandbox [VERSIONID] [--manifest <value>]
367
+
368
+ ARGUMENTS
369
+ VERSIONID version to sandbox
370
+
371
+ FLAGS
372
+ --manifest=<value> [default: raindrop.manifest] project manifest
373
+
374
+ DESCRIPTION
375
+ mark a version as sandboxed in the Raindrop catalog
376
+
377
+ EXAMPLES
378
+ $ raindrop build sandbox
379
+ ```
380
+
381
+ _See code: [src/commands/build/sandbox.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/sandbox.ts)_
353
382
 
354
383
  ## `raindrop build start`
355
384
 
@@ -373,7 +402,7 @@ EXAMPLES
373
402
  Start a Raindrop application.
374
403
  ```
375
404
 
376
- _See code: [src/commands/build/start.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/start.ts)_
405
+ _See code: [src/commands/build/start.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/start.ts)_
377
406
 
378
407
  ## `raindrop build stop`
379
408
 
@@ -395,7 +424,7 @@ EXAMPLES
395
424
  Stop a Raindrop application.
396
425
  ```
397
426
 
398
- _See code: [src/commands/build/stop.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/stop.ts)_
427
+ _See code: [src/commands/build/stop.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/stop.ts)_
399
428
 
400
429
  ## `raindrop build token`
401
430
 
@@ -409,7 +438,72 @@ DESCRIPTION
409
438
  generate a link to create a Cloudflare API token
410
439
  ```
411
440
 
412
- _See code: [src/commands/build/token.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/token.ts)_
441
+ _See code: [src/commands/build/token.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/token.ts)_
442
+
443
+ ## `raindrop build tools check`
444
+
445
+ validate a LiquidMetal.AI raindrop.manifest
446
+
447
+ ```
448
+ USAGE
449
+ $ raindrop build tools check [-r <value>] [-m <value>]
450
+
451
+ FLAGS
452
+ -m, --manifest=<value> [default: raindrop.manifest] project manifest
453
+ -r, --root=<value> [default: /Users/ian/liquidmetal/packages/raindrop] root directory
454
+
455
+ DESCRIPTION
456
+ validate a LiquidMetal.AI raindrop.manifest
457
+
458
+ EXAMPLES
459
+ $ raindrop build tools check
460
+ ```
461
+
462
+ _See code: [src/commands/build/tools/check.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/tools/check.ts)_
463
+
464
+ ## `raindrop build tools fmt`
465
+
466
+ format a LiquidMetal.AI raindrop.manifest
467
+
468
+ ```
469
+ USAGE
470
+ $ raindrop build tools fmt [-r <value>] [-m <value>]
471
+
472
+ FLAGS
473
+ -m, --manifest=<value> [default: raindrop.manifest] project manifest
474
+ -r, --root=<value> [default: /Users/ian/liquidmetal/packages/raindrop] root directory
475
+
476
+ DESCRIPTION
477
+ format a LiquidMetal.AI raindrop.manifest
478
+
479
+ EXAMPLES
480
+ $ raindrop build tools fmt
481
+ ```
482
+
483
+ _See code: [src/commands/build/tools/fmt.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/tools/fmt.ts)_
484
+
485
+ ## `raindrop build unsandbox [VERSIONID]`
486
+
487
+ mark a version as unsandboxed in the Raindrop catalog
488
+
489
+ ```
490
+ USAGE
491
+ $ raindrop build unsandbox [VERSIONID] [--manifest <value>]
492
+
493
+ ARGUMENTS
494
+ VERSIONID version to sandbox
495
+
496
+ FLAGS
497
+ --manifest=<value> [default: raindrop.manifest] project manifest
498
+
499
+ DESCRIPTION
500
+ mark a version as unsandboxed in the Raindrop catalog
501
+
502
+ EXAMPLES
503
+ $ raindrop build unsandbox
504
+ ```
505
+
506
+ _See code: [src/commands/build/unsandbox.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/unsandbox.ts)_
413
507
 
414
508
  ## `raindrop build upload`
415
509
 
@@ -433,7 +527,7 @@ EXAMPLES
433
527
  $ raindrop build upload
434
528
  ```
435
529
 
436
- _See code: [src/commands/build/upload.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/upload.ts)_
530
+ _See code: [src/commands/build/upload.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/upload.ts)_
437
531
 
438
532
  ## `raindrop build validate`
439
533
 
@@ -455,7 +549,7 @@ EXAMPLES
455
549
  $ raindrop build validate
456
550
  ```
457
551
 
458
- _See code: [src/commands/build/validate.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.3/src/commands/build/validate.ts)_
552
+ _See code: [src/commands/build/validate.ts](https://github.com/liquidmetal-ai/liquidmetal/blob/v0.0.5/src/commands/build/validate.ts)_
459
553
 
460
554
  ## `raindrop help [COMMAND]`
461
555
 
@@ -1 +1 @@
1
- {"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../src/base-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE9F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C,IAAI,CAAC;cAIzC,YAAY,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;cAuBtC,cAAc,IAAI,OAAO,CAAC;QACxC,MAAM,EAAE,aAAa,CAAC,OAAO,cAAc,CAAC,CAAC;QAC7C,MAAM,EAAE,MAAM,CAAC;QACf,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CAIH"}
@@ -47,15 +47,13 @@ export class BaseCommand extends Command {
47
47
  }
48
48
  const contents = await fs.readFile(manifestPath, 'utf-8');
49
49
  const [apps, errors] = await manifestFromString(contents);
50
- const allErrors = errors.some((e) => "severity" in e && e.severity !== 'warning');
50
+ const noErrors = errors.every((e) => "severity" in e && e.severity !== 'error');
51
51
  for (const error of errors) {
52
- this.log(`${this.flags.manifest}:${error.line}:${error.column} - ${error.message}`);
52
+ const severity = "severity" in error ? error.severity : 'error';
53
+ this.log(`${this.flags.manifest}:${error.line}:${error.column}: ${severity}: ${error.message}`);
53
54
  }
54
- if (allErrors && errors.length > 0) {
55
- this.error('Manifest loaded with errors', { exit: 1 });
56
- }
57
- else if (errors.length > 0) {
58
- this.warn('Manifest loaded with warnings');
55
+ if (!noErrors && errors.length > 0) {
56
+ this.exit(1);
59
57
  }
60
58
  if (apps.length === 0) {
61
59
  this.error('No applications found in manifest', { exit: 1 });
@@ -10,6 +10,7 @@ export default class Branch extends BaseCommand<typeof Branch> {
10
10
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
11
  config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
12
  manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ show: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
14
  };
14
15
  run(): Promise<void>;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/commands/build/branch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAiD;IAEnE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;MA8BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2C3B"}
1
+ {"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../../src/commands/build/branch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAiD;IAEnE,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA+BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmD3B"}
@@ -6,7 +6,8 @@ export default class Branch extends BaseCommand {
6
6
  static description = 'create a new branch in the Raindrop catalog';
7
7
  static examples = [
8
8
  `<%= config.bin %> <%= command.id %> .
9
- Create a new branch in the Raindrop catalog.`,
9
+ Created new branch 1234
10
+ `,
10
11
  ];
11
12
  static flags = {
12
13
  previousVersionId: Flags.string({
@@ -38,11 +39,17 @@ Create a new branch in the Raindrop catalog.`,
38
39
  hidden: true,
39
40
  }),
40
41
  manifest: Flags.string({ default: 'raindrop.manifest', description: 'project manifest' }),
42
+ show: Flags.boolean({ description: 'show the current branch', required: false }),
41
43
  };
42
44
  async run() {
43
45
  const { client: catalogService, userId, organizationId: defaultOrganizationId } = await this.catalogService();
44
46
  const organizationId = this.flags.impersonate ?? defaultOrganizationId;
45
47
  const config = await this.loadConfig();
48
+ // Allow the user to see the currently selected version
49
+ if (this.flags.show) {
50
+ this.log(`Current branch: ${config.versionId}`);
51
+ return;
52
+ }
46
53
  // If we're selecting a version, just update config.
47
54
  if (this.flags.select) {
48
55
  // Check if this is a valid version.
@@ -63,19 +70,21 @@ Create a new branch in the Raindrop catalog.`,
63
70
  this.error('No application found in manifest', { exit: 1 });
64
71
  }
65
72
  const applicationResp = await catalogService.applications({ userId, organizationId });
66
- if (applicationResp.applications.some((a) => (a.name !== valueOf(app.name) && a.versionId === this.flags.select))) {
73
+ if (applicationResp.applications.some((a) => a.name !== valueOf(app.name) && a.versionId === this.flags.select)) {
67
74
  this.error(`Cannot select version ${this.flags.select} belonging to another application`, { exit: 1 });
68
75
  }
69
76
  config.versionId = this.flags.select;
70
77
  await this.saveConfig(config);
71
78
  return;
72
79
  }
80
+ const previousVersionId = this.flags.previousVersionId || config.versionId;
73
81
  const resp = await catalogService.createVersion({
74
82
  userId,
75
83
  organizationId,
76
- previousVersionId: this.flags.previousVersionId || config.versionId,
84
+ previousVersionId,
77
85
  });
78
86
  config.versionId = resp.versionId;
79
87
  await this.saveConfig(config);
88
+ console.log(`Created new branch ${config.versionId}`);
80
89
  }
81
90
  }
@@ -12,6 +12,7 @@ export default class Deploy extends BaseCommand<typeof Deploy> {
12
12
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
13
  start: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
14
  config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
15
+ amend: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
16
  };
16
17
  run(): Promise<void>;
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/build/deploy.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,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;;;;;;;;;MAiCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkG3B"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/build/deploy.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD,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;;;;;;;;;;MAkCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwH3B"}
@@ -1,7 +1,7 @@
1
1
  import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
2
2
  import { JSONTranslator, Parser, Tokenizer } from '@liquidmetal-ai/drizzle/appify/parse';
3
3
  import { archive } from '@liquidmetal-ai/drizzle/codestore';
4
- import { BundleArchiveType } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/catalog_pb';
4
+ import { BundleArchiveType, } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/catalog_pb';
5
5
  import { FileSystemBundle } from '@liquidmetal-ai/drizzle/unsafe/codestore';
6
6
  import { Flags } from '@oclif/core';
7
7
  import fs from 'node:fs/promises';
@@ -50,6 +50,7 @@ Deploy a Raindrop application.
50
50
  default: false,
51
51
  }),
52
52
  config: Flags.string({ default: '.raindrop/config.json', hidden: true }),
53
+ amend: Flags.boolean({ char: 'a', description: 'amend an existing application', required: false, default: false }),
53
54
  };
54
55
  async run() {
55
56
  // Build then deploy
@@ -76,33 +77,51 @@ Deploy a Raindrop application.
76
77
  }
77
78
  const { client: catalogService, userId, organizationId: defaultOrganizationId } = await this.catalogService();
78
79
  const organizationId = this.flags.impersonate ?? defaultOrganizationId;
79
- const applications = apps.map((app) => ({
80
- name: valueOf(app.name),
81
- manifest: manifestContents,
82
- manifestJson: JSON.stringify(manifestJson),
83
- version: {
84
- case: 'versionId',
85
- value: versionId,
86
- },
87
- isActive: this.flags.start,
88
- }));
89
- const appsResp = await catalogService.createApplications({
90
- applications,
91
- userId,
92
- organizationId,
93
- suite: undefined, // TODO [bosgood] Provide suite name once available
94
- });
80
+ let changed = [];
81
+ if (this.flags.amend) {
82
+ const manifests = apps.map((app) => ({
83
+ name: valueOf(app.name),
84
+ versionId,
85
+ manifest: manifestContents,
86
+ }));
87
+ const appsResp = await catalogService.setApplicationManifests({
88
+ manifests,
89
+ userId,
90
+ organizationId,
91
+ });
92
+ changed = appsResp.success;
93
+ if (appsResp.failure.length > 0) {
94
+ this.error(`Failed to amend applications: ${appsResp.failure.map((a) => `${a.name}@${a.versionId}`).join(', ')}. Make sure the application exists and the version is sandboxed.`, { exit: 1 });
95
+ }
96
+ }
97
+ else {
98
+ const applications = apps.map((app) => ({
99
+ name: valueOf(app.name),
100
+ manifest: manifestContents,
101
+ manifestJson: JSON.stringify(manifestJson),
102
+ version: {
103
+ case: 'versionId',
104
+ value: versionId,
105
+ },
106
+ isActive: this.flags.start,
107
+ }));
108
+ const appsResp = await catalogService.createApplications({
109
+ applications,
110
+ userId,
111
+ organizationId,
112
+ suite: undefined, // TODO [bosgood] Provide suite name once available
113
+ });
114
+ changed = appsResp.applications;
115
+ }
95
116
  // Upload bundle to this version's store.
96
117
  for (const [i, app] of apps.entries()) {
97
- const appResp = appsResp.applications[i];
118
+ const appResp = changed[i];
98
119
  if (!appResp) {
99
- // TODO [bosgood] We'll be able to basically eliminate the possibility of this happening
100
- // by converting createApplications in the API and State to a createMany function.
101
120
  this.error(`Failed to create application ${valueOf(app.name)}, not uploading code bundle`, { exit: false });
102
121
  continue;
103
122
  }
104
123
  const versionId = appResp.versionId;
105
- this.log(`Created application "${valueOf(app.name)}" with version ID "${versionId}"`);
124
+ this.log(`${this.flags.amend ? 'Updated' : 'Created'} application "${valueOf(app.name)}" with version ID "${versionId}"`);
106
125
  for (const handler of app.handlers()) {
107
126
  const bundle = new FileSystemBundle(path.join(buildDir, valueOf(handler.name)));
108
127
  await catalogService.uploadBundle({
@@ -113,12 +132,11 @@ Deploy a Raindrop application.
113
132
  bundleName: valueOf(handler.name),
114
133
  archive: Buffer.from(await archive(bundle)),
115
134
  });
116
- this.log(`Uploaded bundle "${handler}"`);
135
+ this.log(`Uploaded bundle "${valueOf(handler.name)}"`);
117
136
  }
118
137
  // Per above, each application gets the same db bundle, which is
119
138
  // boneheaded. src/db is pretty arbitrary.
120
- const srcDir = path.join(this.flags.root, 'src');
121
- const dbDir = path.join(srcDir, 'db');
139
+ const dbDir = path.join(this.flags.root, 'db');
122
140
  let dbExists = false;
123
141
  try {
124
142
  const stat = await fs.lstat(dbDir);
@@ -128,7 +146,7 @@ Deploy a Raindrop application.
128
146
  // Nothing to do
129
147
  }
130
148
  if (dbExists) {
131
- const dbBundle = new FileSystemBundle(path.join(srcDir, 'db'));
149
+ const dbBundle = new FileSystemBundle(path.join(this.flags.root, 'db'));
132
150
  await catalogService.uploadBundle({
133
151
  organizationId,
134
152
  applicationName: valueOf(app.name),
@@ -1 +1 @@
1
- {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/env/get.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA+BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwD3B"}
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/env/get.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA+BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0D3B"}
@@ -61,7 +61,7 @@ sets an env var/secret.
61
61
  this.error('variable name not specified', { exit: 1 });
62
62
  }
63
63
  // If there's anything left in the path, it's nested.
64
- if (path.length == 0) {
64
+ if (path.length == 1) {
65
65
  // It's a top level variable.
66
66
  const envStanza = app.env.find((env) => valueOf(env.name) === envVarName);
67
67
  if (envStanza === undefined) {
@@ -69,7 +69,7 @@ sets an env var/secret.
69
69
  }
70
70
  isSecret = envStanza.secret && valueOf(envStanza.secret) || false;
71
71
  }
72
- else {
72
+ else if (path.length > 1) {
73
73
  // It's nested on some scripted module.
74
74
  const scriptModules = app.handlers();
75
75
  const scriptModule = scriptModules.find((module) => valueOf(module.name) === path[0]);
@@ -82,6 +82,9 @@ sets an env var/secret.
82
82
  }
83
83
  isSecret = envStanza.secret && valueOf(envStanza.secret) || false;
84
84
  }
85
+ else {
86
+ this.error('variable must be an env variable or secret', { exit: 1 });
87
+ }
85
88
  const config = await this.loadConfig();
86
89
  const { client: catalogService, userId, organizationId } = await this.catalogService();
87
90
  const resp = await catalogService.getEnv({
@@ -1 +1 @@
1
- {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/env/set.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;;MAGT;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA+BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuE3B"}
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/env/set.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;;MAGT;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA+BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyE3B"}
@@ -70,7 +70,7 @@ sets an env var/secret.
70
70
  this.error('variable name not specified', { exit: 1 });
71
71
  }
72
72
  // If there's anything left in the path, it's nested.
73
- if (path.length == 0) {
73
+ if (path.length == 1) {
74
74
  // It's a top level variable.
75
75
  const envStanza = app.env.find((env) => valueOf(env.name) === envVarName);
76
76
  if (envStanza === undefined) {
@@ -78,7 +78,7 @@ sets an env var/secret.
78
78
  }
79
79
  isSecret = envStanza.secret && valueOf(envStanza.secret) || false;
80
80
  }
81
- else {
81
+ else if (path.length > 1) {
82
82
  // It's nested on some scripted module.
83
83
  const scriptModules = app.handlers();
84
84
  const scriptModule = scriptModules.find((module) => valueOf(module.name) === path[0]);
@@ -91,6 +91,9 @@ sets an env var/secret.
91
91
  }
92
92
  isSecret = envStanza.secret && valueOf(envStanza.secret) || false;
93
93
  }
94
+ else {
95
+ this.error('variable must be an env variable or secret', { exit: 1 });
96
+ }
94
97
  // Read stdin if no value is supplied.
95
98
  if (this.args.value === undefined) {
96
99
  this.log('no value supplied, reading stdin...');
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/build/list.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAqC;IAEvD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;MAoBV;IAEI,YAAY;IAmCZ,gBAAgB;IA0ChB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW3B"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/build/list.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAqC;IAEvD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;MAoBV;IAEI,YAAY;IAoCZ,gBAAgB;IA0ChB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW3B"}
@@ -45,7 +45,9 @@ List Raindrop catalog resources.
45
45
  const dateStr = v.createdAt ? v.createdAt.toDate().toISOString() : '';
46
46
  acc[dateStr] = v;
47
47
  return acc;
48
- }, {}), ['versionId', 'previousVersionId']);
48
+ },
49
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
+ {}), ['versionId', 'previousVersionId', 'isSandboxed']);
49
51
  }
50
52
  else if (this.flags.output === 'json') {
51
53
  this.log(JSON.stringify(resp, null, 2));
@@ -0,0 +1,16 @@
1
+ import { BaseCommand } from '../../base-command.js';
2
+ export default class Sandbox extends BaseCommand<typeof Sandbox> {
3
+ static args: {
4
+ versionId: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
+ manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=sandbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/sandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW,CAAC,OAAO,OAAO,CAAC;IAC9D,MAAM,CAAC,IAAI;;MAET;IACF,MAAM,CAAC,WAAW,SAAyD;IAE3E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;MAiBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyB3B"}