@liquidmetal-ai/raindrop 0.0.8 → 0.1.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 (70) hide show
  1. package/README.md +51 -24
  2. package/dist/base-command.d.ts +2 -1
  3. package/dist/base-command.d.ts.map +1 -1
  4. package/dist/base-command.js +15 -3
  5. package/dist/build.d.ts.map +1 -1
  6. package/dist/build.js +52 -19
  7. package/dist/build.test.js +44 -39
  8. package/dist/codegen.d.ts +3 -0
  9. package/dist/codegen.d.ts.map +1 -1
  10. package/dist/codegen.js +27 -10
  11. package/dist/codegen.test.js +10 -1
  12. package/dist/commands/build/branch.d.ts +1 -0
  13. package/dist/commands/build/branch.d.ts.map +1 -1
  14. package/dist/commands/build/branch.js +5 -0
  15. package/dist/commands/build/delete.d.ts +1 -0
  16. package/dist/commands/build/delete.d.ts.map +1 -1
  17. package/dist/commands/build/delete.js +5 -0
  18. package/dist/commands/build/deploy.d.ts +1 -0
  19. package/dist/commands/build/deploy.d.ts.map +1 -1
  20. package/dist/commands/build/deploy.js +11 -0
  21. package/dist/commands/build/env/get.d.ts +1 -0
  22. package/dist/commands/build/env/get.d.ts.map +1 -1
  23. package/dist/commands/build/env/get.js +5 -0
  24. package/dist/commands/build/env/set.d.ts +1 -0
  25. package/dist/commands/build/env/set.d.ts.map +1 -1
  26. package/dist/commands/build/env/set.js +10 -4
  27. package/dist/commands/build/find.d.ts +1 -0
  28. package/dist/commands/build/find.d.ts.map +1 -1
  29. package/dist/commands/build/find.js +5 -0
  30. package/dist/commands/build/list.d.ts +2 -0
  31. package/dist/commands/build/list.d.ts.map +1 -1
  32. package/dist/commands/build/list.js +12 -0
  33. package/dist/commands/build/sandbox.d.ts +1 -0
  34. package/dist/commands/build/sandbox.d.ts.map +1 -1
  35. package/dist/commands/build/sandbox.js +5 -0
  36. package/dist/commands/build/start.d.ts +1 -0
  37. package/dist/commands/build/start.d.ts.map +1 -1
  38. package/dist/commands/build/start.js +5 -0
  39. package/dist/commands/build/status.d.ts +36 -0
  40. package/dist/commands/build/status.d.ts.map +1 -0
  41. package/dist/commands/build/status.js +149 -0
  42. package/dist/commands/build/stop.d.ts +1 -0
  43. package/dist/commands/build/stop.d.ts.map +1 -1
  44. package/dist/commands/build/stop.js +5 -0
  45. package/dist/commands/build/unsandbox.d.ts +1 -0
  46. package/dist/commands/build/unsandbox.d.ts.map +1 -1
  47. package/dist/commands/build/unsandbox.js +5 -0
  48. package/dist/commands/build/upload.d.ts +1 -0
  49. package/dist/commands/build/upload.d.ts.map +1 -1
  50. package/dist/commands/build/upload.js +5 -0
  51. package/dist/commands/build/validate.d.ts.map +1 -1
  52. package/dist/commands/build/validate.js +25 -0
  53. package/dist/commands/tail.d.ts.map +1 -1
  54. package/dist/commands/tail.js +15 -3
  55. package/dist/index.d.ts +2 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +3 -6
  58. package/dist/tsconfig.tsbuildinfo +1 -1
  59. package/oclif.manifest.json +245 -1
  60. package/package.json +3 -3
  61. package/templates/handlers/actor/index.test.ts +0 -1
  62. package/templates/handlers/actor/index.ts.hbs +3 -3
  63. package/templates/handlers/http-service/index.test.ts +0 -1
  64. package/templates/handlers/http-service/index.ts.hbs +2 -2
  65. package/templates/handlers/queue-consumer/index.test.ts +0 -1
  66. package/templates/handlers/queue-consumer/index.ts.hbs +1 -1
  67. package/templates/handlers/r2-event-notification/index.test.ts +0 -1
  68. package/templates/handlers/r2-event-notification/index.ts.hbs +2 -2
  69. package/templates/init/package.json.hbs +2 -2
  70. package/templates/init/tsconfig.json +1 -2
@@ -48,6 +48,11 @@ Created new branch 1234
48
48
  hidden: true,
49
49
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
50
50
  }),
51
+ raindropCatalogService: Flags.string({
52
+ env: 'RAINDROP_CATALOG_SERVICE',
53
+ description: 'URL of the catalog service',
54
+ hidden: true,
55
+ }),
51
56
  show: Flags.boolean({ description: 'show the current branch', required: false }),
52
57
  };
53
58
  async run() {
@@ -14,6 +14,7 @@ export default class Delete extends BaseCommand<typeof Delete> {
14
14
  all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
15
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
16
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
18
  };
18
19
  run(): Promise<void>;
19
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/build/delete.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,WAAW,SAAkC;IAEpD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MA4CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqD3B"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/build/delete.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,WAAW,SAAkC;IAEpD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;MAiDV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqD3B"}
@@ -56,6 +56,11 @@ Deleted (application) at version (version)
56
56
  hidden: true,
57
57
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
58
58
  }),
59
+ raindropCatalogService: Flags.string({
60
+ env: 'RAINDROP_CATALOG_SERVICE',
61
+ description: 'URL of the catalog service',
62
+ hidden: true,
63
+ }),
59
64
  };
60
65
  async run() {
61
66
  const { client: catalogService, userId, organizationId } = await this.catalogService();
@@ -11,6 +11,7 @@ export default class Deploy extends BaseCommand<typeof Deploy> {
11
11
  versionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
13
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  start: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
16
  amend: import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
17
  };
@@ -1 +1 @@
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;;;;;;;;;;MAwCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0H3B"}
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;;;;;;;;;;;MA6CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiI3B"}
@@ -50,6 +50,11 @@ Deploy a Raindrop application.
50
50
  hidden: true,
51
51
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
52
52
  }),
53
+ raindropCatalogService: Flags.string({
54
+ env: 'RAINDROP_CATALOG_SERVICE',
55
+ description: 'URL of the catalog service',
56
+ hidden: true,
57
+ }),
53
58
  start: Flags.boolean({
54
59
  char: 's',
55
60
  description: 'start the application after deploying',
@@ -83,12 +88,17 @@ Deploy a Raindrop application.
83
88
  }
84
89
  const { client: catalogService, userId, organizationId: defaultOrganizationId } = await this.catalogService();
85
90
  const organizationId = this.flags.impersonate ?? defaultOrganizationId;
91
+ // The raindrop-framework version is pinned to the raindrop-runtime version
92
+ const runtimeVersion = await this.raindropFrameworkVersion();
86
93
  let changed = [];
87
94
  if (this.flags.amend) {
88
95
  const manifests = apps.map((app) => ({
89
96
  name: valueOf(app.name),
90
97
  versionId,
91
98
  manifest: manifestContents,
99
+ metadata: {
100
+ runtimeVersion,
101
+ },
92
102
  }));
93
103
  const appsResp = await catalogService.setApplicationManifests({
94
104
  manifests,
@@ -110,6 +120,7 @@ Deploy a Raindrop application.
110
120
  value: versionId,
111
121
  },
112
122
  isActive: this.flags.start,
123
+ metadata: { runtimeVersion },
113
124
  }));
114
125
  const appsResp = await catalogService.createApplications({
115
126
  applications,
@@ -8,6 +8,7 @@ export default class Get extends BaseCommand<typeof Get> {
8
8
  static flags: {
9
9
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
10
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
13
  versionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
14
  application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -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;;;;;;;;MAqCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0D3B"}
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;;;;;;;;;MA0CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0D3B"}
@@ -18,6 +18,11 @@ sets an env var/secret.
18
18
  hidden: true,
19
19
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
20
20
  }),
21
+ raindropCatalogService: Flags.string({
22
+ env: 'RAINDROP_CATALOG_SERVICE',
23
+ description: 'URL of the catalog service',
24
+ hidden: true,
25
+ }),
21
26
  manifest: Flags.string({
22
27
  char: 'm',
23
28
  description: 'project manifest',
@@ -15,6 +15,7 @@ export default class Set extends BaseCommand<typeof Set> {
15
15
  application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
16
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
17
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
18
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
19
  };
19
20
  run(): Promise<void>;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/env/set.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;;;MAGT;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAsCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoE3B"}
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/env/set.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;;;MAGT;IAEF,MAAM,CAAC,WAAW,SAA2B;IAE7C,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;MA2CV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqE3B"}
@@ -50,6 +50,11 @@ sets an env var/secret.
50
50
  hidden: true,
51
51
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
52
52
  }),
53
+ raindropCatalogService: Flags.string({
54
+ env: 'RAINDROP_CATALOG_SERVICE',
55
+ description: 'URL of the catalog service',
56
+ hidden: true,
57
+ }),
53
58
  };
54
59
  async run() {
55
60
  const apps = await this.loadManifest();
@@ -98,13 +103,14 @@ sets an env var/secret.
98
103
  this.error('variable must be an env variable or secret', { exit: 1 });
99
104
  }
100
105
  // Read stdin if no value is supplied.
101
- if (this.args.value === undefined) {
102
- this.log('no value supplied, reading stdin...');
106
+ let secretValue = this.args.value;
107
+ if (secretValue === '-') {
108
+ this.log('reading stdin (ctrl+D to finish)...');
103
109
  const chunks = [];
104
110
  for await (const chunk of process.stdin) {
105
- chunk.push(chunk);
111
+ chunks.push(chunk);
106
112
  }
107
- this.args.value = Buffer.concat(chunks).toString('utf8');
113
+ secretValue = Buffer.concat(chunks).toString('utf8');
108
114
  }
109
115
  const config = await this.loadConfig();
110
116
  await catalogService.setEnv({
@@ -13,6 +13,7 @@ export default class Find extends BaseCommand<typeof Find> {
13
13
  sudo: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
14
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
15
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
17
  };
17
18
  queryResources(flags: {
18
19
  output: string;
@@ -1 +1 @@
1
- {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/commands/build/find.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAgC;IAElD,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;MAiDV;IAEI,cAAc,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IA4D5G,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAO3B"}
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/commands/build/find.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAgC;IAElD,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;MAsDV;IAEI,cAAc,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IA4D5G,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAO3B"}
@@ -57,6 +57,11 @@ export default class Find extends BaseCommand {
57
57
  hidden: true,
58
58
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
59
59
  }),
60
+ raindropCatalogService: Flags.string({
61
+ env: 'RAINDROP_CATALOG_SERVICE',
62
+ description: 'URL of the catalog service',
63
+ hidden: true,
64
+ }),
60
65
  };
61
66
  async queryResources(flags) {
62
67
  if (!flags.version) {
@@ -8,7 +8,9 @@ export default class List extends BaseCommand<typeof List> {
8
8
  all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
9
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
10
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
12
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
14
  };
13
15
  listVersions(): Promise<void>;
14
16
  listApplications(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/build/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,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;IA+BZ,gBAAgB;IAqChB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW3B"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/build/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,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;;;;;;;;MAgCV;IAEI,YAAY;IA+BZ,gBAAgB;IAqChB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW3B"}
@@ -23,11 +23,23 @@ List Raindrop catalog resources.
23
23
  required: false,
24
24
  hidden: true,
25
25
  }),
26
+ manifest: Flags.string({
27
+ char: 'm',
28
+ description: 'project manifest',
29
+ required: false,
30
+ default: 'raindrop.manifest',
31
+ hidden: true,
32
+ }),
26
33
  rainbowAuthService: Flags.string({
27
34
  default: 'https://liquidmetal.run/api/connect',
28
35
  hidden: true,
29
36
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
30
37
  }),
38
+ raindropCatalogService: Flags.string({
39
+ env: 'RAINDROP_CATALOG_SERVICE',
40
+ description: 'URL of the catalog service',
41
+ hidden: true,
42
+ }),
31
43
  };
32
44
  async listVersions() {
33
45
  const { client: catalogService, organizationId: defaultOrganizationId, userId } = await this.catalogService();
@@ -8,6 +8,7 @@ export default class Sandbox extends BaseCommand<typeof Sandbox> {
8
8
  static flags: {
9
9
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
10
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
13
  manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
14
  };
@@ -1 +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"}
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;;;;;;MAsBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyB3B"}
@@ -21,6 +21,11 @@ export default class Sandbox extends BaseCommand {
21
21
  hidden: true,
22
22
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
23
23
  }),
24
+ raindropCatalogService: Flags.string({
25
+ env: 'RAINDROP_CATALOG_SERVICE',
26
+ description: 'URL of the catalog service',
27
+ hidden: true,
28
+ }),
24
29
  config: Flags.string({
25
30
  default: '.raindrop/config.json',
26
31
  hidden: true,
@@ -11,6 +11,7 @@ export default class Start extends BaseCommand<typeof Start> {
11
11
  version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
13
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  };
15
16
  run(): Promise<void>;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/build/start.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW,CAAC,OAAO,KAAK,CAAC;IAC1D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAkC;IAEpD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+B3B"}
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/build/start.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW,CAAC,OAAO,KAAK,CAAC;IAC1D,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAkC;IAEpD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAyCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+B3B"}
@@ -45,6 +45,11 @@ Start a Raindrop application.
45
45
  hidden: true,
46
46
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
47
47
  }),
48
+ raindropCatalogService: Flags.string({
49
+ env: 'RAINDROP_CATALOG_SERVICE',
50
+ description: 'URL of the catalog service',
51
+ hidden: true,
52
+ }),
48
53
  };
49
54
  async run() {
50
55
  const { client: catalogService, userId, organizationId } = await this.catalogService();
@@ -0,0 +1,36 @@
1
+ import { BaseCommand } from '../../base-command.js';
2
+ type ApplicationState = 'running' | 'stopped' | 'pending' | 'deleting' | 'deleted' | 'failed' | 'unknown';
3
+ export default class Status extends BaseCommand<typeof Status> {
4
+ static args: {};
5
+ static description: string;
6
+ static examples: string[];
7
+ static flags: {
8
+ root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ sudo: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
+ impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
17
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ };
19
+ applicationStatuses(flags: {
20
+ output: string;
21
+ rainbowAuthService: string;
22
+ application?: string;
23
+ version?: string;
24
+ impersonate?: string;
25
+ }): Promise<{
26
+ [key: string]: {
27
+ name: string;
28
+ url?: string;
29
+ status: ApplicationState;
30
+ reason: string;
31
+ };
32
+ }>;
33
+ run(): Promise<void>;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/build/status.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,KAAK,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1G,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;;;;;;;;;;;MAsDV;IAEI,mBAAmB,CAAC,KAAK,EAAE;QAC/B,MAAM,EAAE,MAAM,CAAC;QACf,kBAAkB,EAAE,MAAM,CAAC;QAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,gBAAgB,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IA6ElG,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkB3B"}
@@ -0,0 +1,149 @@
1
+ import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
2
+ import { Flags } from '@oclif/core';
3
+ import { BaseCommand } from '../../base-command.js';
4
+ import { urlifyOrganizationId } from '@liquidmetal-ai/drizzle/raindrop/index';
5
+ export default class Status extends BaseCommand {
6
+ static args = {};
7
+ static description = 'show the status of applications in Raindrop';
8
+ static examples = [
9
+ `<%= config.bin %> <%= command.id %> .
10
+ `,
11
+ ];
12
+ static flags = {
13
+ root: Flags.string({ char: 'r', description: 'root directory', required: false, default: process.cwd() }),
14
+ manifest: Flags.string({
15
+ char: 'm',
16
+ description: 'project manifest',
17
+ required: false,
18
+ default: 'raindrop.manifest',
19
+ }),
20
+ config: Flags.string({
21
+ char: 'c',
22
+ description: 'config file',
23
+ required: false,
24
+ hidden: true,
25
+ default: '.raindrop/config.json',
26
+ }),
27
+ application: Flags.string({
28
+ char: 'a',
29
+ description: 'application',
30
+ required: false,
31
+ }),
32
+ version: Flags.string({
33
+ char: 'v',
34
+ description: 'application version',
35
+ required: false,
36
+ }),
37
+ output: Flags.string({
38
+ char: 'o',
39
+ description: 'output format',
40
+ default: 'table',
41
+ options: ['text', 'table', 'json'],
42
+ }),
43
+ sudo: Flags.boolean({
44
+ char: 's',
45
+ default: false,
46
+ description: 'superuser mode',
47
+ required: false,
48
+ hidden: true,
49
+ }),
50
+ impersonate: Flags.string({
51
+ char: 'i',
52
+ description: 'impersonate organization',
53
+ required: false,
54
+ hidden: true,
55
+ }),
56
+ rainbowAuthService: Flags.string({
57
+ default: 'https://liquidmetal.run/api/connect',
58
+ hidden: true,
59
+ env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
60
+ }),
61
+ raindropCatalogService: Flags.string({
62
+ env: 'RAINDROP_CATALOG_SERVICE',
63
+ description: 'URL of the catalog service',
64
+ hidden: true,
65
+ }),
66
+ };
67
+ async applicationStatuses(flags) {
68
+ const statuses = {};
69
+ if (!flags.version) {
70
+ const config = await this.loadConfig();
71
+ flags.version = config.versionId;
72
+ }
73
+ if (!flags.application) {
74
+ const apps = await this.loadManifest();
75
+ const app = apps[0];
76
+ if (app === undefined) {
77
+ this.error('No application provided or found in manifest', { exit: 1 });
78
+ }
79
+ flags.application = valueOf(app.name);
80
+ }
81
+ const { client: catalogService, userId, organizationId: defaultOrganizationId } = await this.catalogService();
82
+ const organizationId = flags.impersonate ?? defaultOrganizationId;
83
+ const appsResp = await catalogService.applications({ userId, organizationId });
84
+ // Get the status for the application in question
85
+ if (appsResp.applications.length === 0) {
86
+ this.error(`No matching applications found for ${flags.application}@${flags.version}`, { exit: 1 });
87
+ }
88
+ const matchingApps = appsResp.applications.filter((a) => a.name === flags.application && a.versionId === flags.version);
89
+ if (matchingApps.length > 1) {
90
+ this.error(`Multiple matching applications found for ${flags.application}@${flags.version}`, { exit: 1 });
91
+ }
92
+ const app = matchingApps[0];
93
+ if (app === undefined) {
94
+ this.error(`No matching applications found for ${flags.application}@${flags.version}`, { exit: 1 });
95
+ }
96
+ if (!app.isActive) {
97
+ statuses[app.versionId] = {
98
+ name: app.name,
99
+ status: 'stopped',
100
+ reason: 'application is inactive',
101
+ };
102
+ return statuses;
103
+ }
104
+ // Get resources relevant to application & version
105
+ const resp = await catalogService.queryResources({
106
+ userId,
107
+ applicationName: flags.application,
108
+ applicationVersionId: flags.version,
109
+ organizationId,
110
+ });
111
+ // Filter out custom_domain resources to determine if the application is ready to receive traffic
112
+ const domains = resp.resources.filter((r) => r.type === 'custom_domain');
113
+ if (domains.length === 0) {
114
+ statuses[app.versionId] = {
115
+ name: app.name,
116
+ status: 'pending',
117
+ reason: 'application is not ready to receive traffic',
118
+ };
119
+ return statuses;
120
+ }
121
+ const urls = domains.map((d) => {
122
+ const attrs = d.attributes?.fields ?? {};
123
+ const fqdn = ('fqdn' in attrs ? attrs['fqdn'].kind.value : '');
124
+ const cname = ('cname' in attrs ? attrs['cname'].kind.value : '');
125
+ return fqdn ? fqdn : `${cname}.${urlifyOrganizationId(organizationId)}.lmapp.run`;
126
+ });
127
+ statuses[app.versionId] = {
128
+ name: app.name,
129
+ status: 'running',
130
+ url: urls.join(' '),
131
+ reason: 'application is ready to receive traffic',
132
+ };
133
+ return statuses;
134
+ }
135
+ async run() {
136
+ const statuses = await this.applicationStatuses(this.flags);
137
+ if (this.flags.output === 'table') {
138
+ console.table(statuses, ['name', 'status', 'reason', 'url']);
139
+ }
140
+ else if (this.flags.output === 'json') {
141
+ this.log(JSON.stringify(statuses, null, 2));
142
+ }
143
+ else {
144
+ for (const [versionId, status] of Object.entries(statuses)) {
145
+ console.log(versionId, status);
146
+ }
147
+ }
148
+ }
149
+ }
@@ -11,6 +11,7 @@ export default class Stop extends BaseCommand<typeof Stop> {
11
11
  version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
13
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  };
15
16
  run(): Promise<void>;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../../src/commands/build/stop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAiC;IAEnD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAoCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiC3B"}
1
+ {"version":3,"file":"stop.d.ts","sourceRoot":"","sources":["../../../src/commands/build/stop.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAiC;IAEnD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAyCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiC3B"}
@@ -45,6 +45,11 @@ Stop a Raindrop application.
45
45
  hidden: true,
46
46
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
47
47
  }),
48
+ raindropCatalogService: Flags.string({
49
+ env: 'RAINDROP_CATALOG_SERVICE',
50
+ description: 'URL of the catalog service',
51
+ hidden: true,
52
+ }),
48
53
  };
49
54
  async run() {
50
55
  const { client: catalogService, userId, organizationId } = await this.catalogService();
@@ -8,6 +8,7 @@ export default class Unsandbox extends BaseCommand<typeof Unsandbox> {
8
8
  static flags: {
9
9
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
10
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
13
  manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"unsandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/unsandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;MAiBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyB3B"}
1
+ {"version":3,"file":"unsandbox.d.ts","sourceRoot":"","sources":["../../../src/commands/build/unsandbox.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW,CAAC,OAAO,SAAS,CAAC;IAClE,MAAM,CAAC,IAAI;;MAET;IAEF,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;MAsBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyB3B"}
@@ -21,6 +21,11 @@ export default class Unsandbox extends BaseCommand {
21
21
  hidden: true,
22
22
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
23
23
  }),
24
+ raindropCatalogService: Flags.string({
25
+ env: 'RAINDROP_CATALOG_SERVICE',
26
+ description: 'URL of the catalog service',
27
+ hidden: true,
28
+ }),
24
29
  config: Flags.string({
25
30
  default: '.raindrop/config.json',
26
31
  hidden: true,
@@ -11,6 +11,7 @@ export default class Upload extends BaseCommand<typeof Upload> {
11
11
  versionId: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
12
  impersonate: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
13
  rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  };
15
16
  run(): Promise<void>;
16
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/commands/build/upload.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,IAAI,KAAM;IAE1B,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK;;;;;;;;MA4BnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwClC"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/commands/build/upload.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,OAAgB,IAAI,KAAM;IAE1B,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK;;;;;;;;;MAiCnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwClC"}
@@ -38,6 +38,11 @@ export default class Upload extends BaseCommand {
38
38
  hidden: true,
39
39
  env: 'LIQUIDMETAL_RAINBOW_AUTH_SERVICE',
40
40
  }),
41
+ raindropCatalogService: Flags.string({
42
+ env: 'RAINDROP_CATALOG_SERVICE',
43
+ description: 'URL of the catalog service',
44
+ hidden: true,
45
+ }),
41
46
  };
42
47
  async run() {
43
48
  const apps = await this.loadManifest();
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/build/validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW,CAAC,OAAO,KAAK,CAAC;IAC1D,OAAgB,IAAI,KAAM;IAE1B,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK;;;;;MAgBnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAQlC"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/commands/build/validate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAiBpD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW,CAAC,OAAO,KAAK,CAAC;IAC1D,OAAgB,IAAI,KAAM;IAE1B,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,QAAQ,WAA2C;IAEnE,OAAgB,KAAK;;;;;MAgBnB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsBlC"}
@@ -1,7 +1,20 @@
1
1
  import { Flags } from '@oclif/core';
2
+ import { spawn } from 'node:child_process';
2
3
  import path from 'node:path';
3
4
  import { BaseCommand } from '../../base-command.js';
4
5
  import { buildHandlers } from '../../build.js';
6
+ async function runTypeCheck(root) {
7
+ return new Promise((resolve) => {
8
+ const tsc = spawn('npx', ['tsc', '--noEmit'], {
9
+ cwd: root,
10
+ stdio: 'inherit', // Inherit stdio to show compiler output in real-time
11
+ shell: true,
12
+ });
13
+ tsc.on('exit', (code) => {
14
+ resolve(code === 0);
15
+ });
16
+ });
17
+ }
5
18
  export default class Build extends BaseCommand {
6
19
  static args = {};
7
20
  static description = 'build and validate a LiquidMetal.AI project';
@@ -25,6 +38,18 @@ export default class Build extends BaseCommand {
25
38
  };
26
39
  async run() {
27
40
  const apps = await this.loadManifest();
41
+ const version = await this.raindropFrameworkVersion();
42
+ if (version === null) {
43
+ this.error('Failed to determine @liquidmetal-ai/raindrop-framework version; is it installed?', { exit: 1 });
44
+ }
45
+ this.log(`Using @liquidmetal-ai/raindrop-framework version ${version}`);
46
+ // Run TypeScript type checking
47
+ this.log('Running type check...');
48
+ const typeCheckPassed = await runTypeCheck(this.flags.root);
49
+ if (!typeCheckPassed) {
50
+ this.error('Type check failed. Please fix the TypeScript errors before building.');
51
+ }
52
+ this.log('Type check passed');
28
53
  const buildDir = path.isAbsolute(this.flags.output)
29
54
  ? this.flags.output
30
55
  : path.join(this.flags.root, this.flags.output);
@@ -1 +1 @@
1
- {"version":3,"file":"tail.d.ts","sourceRoot":"","sources":["../../src/commands/tail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAwC;IAE1D,MAAM,CAAC,KAAK;;;;MAiBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuB3B"}
1
+ {"version":3,"file":"tail.d.ts","sourceRoot":"","sources":["../../src/commands/tail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAwC;IAE1D,MAAM,CAAC,KAAK;;;;MAiBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkC3B"}