@kapeta/local-cluster-service 0.56.1 → 0.56.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.56.2](https://github.com/kapetacom/local-cluster-service/compare/v0.56.1...v0.56.2) (2024-07-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * missing pural on MODEL RETRY ([ca33bdd](https://github.com/kapetacom/local-cluster-service/commit/ca33bdd5e47b0c601d19ddf4149de5e925aa0040))
7
+
1
8
  ## [0.56.1](https://github.com/kapetacom/local-cluster-service/compare/v0.56.0...v0.56.1) (2024-07-17)
2
9
 
3
10
 
@@ -263,11 +263,14 @@ class StormCodegen {
263
263
  }
264
264
  const kapetaYaml = yaml_1.default.stringify(block.content);
265
265
  const blockDefinition = block.content;
266
+ const basePath = this.getBasePath(blockDefinition.metadata.name);
266
267
  // Generate the code for the block using the standard codegen templates
267
268
  const generatedResult = await this.generateBlock(blockDefinition);
268
269
  if (!generatedResult) {
269
270
  return;
270
271
  }
272
+ const kapetaYmlPath = (0, path_2.join)(basePath, 'kapeta.yml');
273
+ await (0, promises_1.writeFile)(kapetaYmlPath, kapetaYaml);
271
274
  const allFiles = this.toStormFiles(generatedResult);
272
275
  // Send all the non-ai files to the stream
273
276
  await this.emitStaticFiles((0, nodejs_utils_1.parseKapetaUri)(block.uri), block.aiName, allFiles);
@@ -357,7 +360,6 @@ class StormCodegen {
357
360
  if (this.isAborted()) {
358
361
  return;
359
362
  }
360
- const basePath = this.getBasePath(blockDefinition.metadata.name);
361
363
  const screenFilesConverted = screenFiles.map((screenFile) => {
362
364
  return {
363
365
  filename: screenFile.payload.filename,
@@ -397,8 +399,6 @@ class StormCodegen {
397
399
  const filePath = (0, path_2.join)(basePath, webRouterFile.filename);
398
400
  await (0, promises_1.writeFile)(filePath, webRouterFile.content);
399
401
  }
400
- const kapetaYmlPath = (0, path_2.join)(basePath, 'kapeta.yml');
401
- await (0, promises_1.writeFile)(kapetaYmlPath, kapetaYaml);
402
402
  const blockRef = block.uri;
403
403
  this.emitBlockStatus(blockUri, block.aiName, events_1.StormEventBlockStatusType.QA);
404
404
  /* TODO: temporarily disabled - enable again when codegen is more stable
@@ -224,7 +224,7 @@ class StormEventParser {
224
224
  block.apis = [];
225
225
  });
226
226
  break;
227
- case 'MODEL_RETRY':
227
+ case 'MODELS_RETRY':
228
228
  Object.values(this.blocks).forEach((block) => {
229
229
  block.models = [];
230
230
  });
@@ -94,7 +94,7 @@ export interface StormEventCreateDSLResource extends Omit<StormEventCreateDSL, '
94
94
  };
95
95
  }
96
96
  export interface StormEventCreateDSLRetry {
97
- type: 'API_RETRY' | 'MODEL_RETRY';
97
+ type: 'API_RETRY' | 'MODELS_RETRY';
98
98
  reason: string;
99
99
  created: number;
100
100
  payload: {
@@ -263,11 +263,14 @@ class StormCodegen {
263
263
  }
264
264
  const kapetaYaml = yaml_1.default.stringify(block.content);
265
265
  const blockDefinition = block.content;
266
+ const basePath = this.getBasePath(blockDefinition.metadata.name);
266
267
  // Generate the code for the block using the standard codegen templates
267
268
  const generatedResult = await this.generateBlock(blockDefinition);
268
269
  if (!generatedResult) {
269
270
  return;
270
271
  }
272
+ const kapetaYmlPath = (0, path_2.join)(basePath, 'kapeta.yml');
273
+ await (0, promises_1.writeFile)(kapetaYmlPath, kapetaYaml);
271
274
  const allFiles = this.toStormFiles(generatedResult);
272
275
  // Send all the non-ai files to the stream
273
276
  await this.emitStaticFiles((0, nodejs_utils_1.parseKapetaUri)(block.uri), block.aiName, allFiles);
@@ -357,7 +360,6 @@ class StormCodegen {
357
360
  if (this.isAborted()) {
358
361
  return;
359
362
  }
360
- const basePath = this.getBasePath(blockDefinition.metadata.name);
361
363
  const screenFilesConverted = screenFiles.map((screenFile) => {
362
364
  return {
363
365
  filename: screenFile.payload.filename,
@@ -397,8 +399,6 @@ class StormCodegen {
397
399
  const filePath = (0, path_2.join)(basePath, webRouterFile.filename);
398
400
  await (0, promises_1.writeFile)(filePath, webRouterFile.content);
399
401
  }
400
- const kapetaYmlPath = (0, path_2.join)(basePath, 'kapeta.yml');
401
- await (0, promises_1.writeFile)(kapetaYmlPath, kapetaYaml);
402
402
  const blockRef = block.uri;
403
403
  this.emitBlockStatus(blockUri, block.aiName, events_1.StormEventBlockStatusType.QA);
404
404
  /* TODO: temporarily disabled - enable again when codegen is more stable
@@ -224,7 +224,7 @@ class StormEventParser {
224
224
  block.apis = [];
225
225
  });
226
226
  break;
227
- case 'MODEL_RETRY':
227
+ case 'MODELS_RETRY':
228
228
  Object.values(this.blocks).forEach((block) => {
229
229
  block.models = [];
230
230
  });
@@ -94,7 +94,7 @@ export interface StormEventCreateDSLResource extends Omit<StormEventCreateDSL, '
94
94
  };
95
95
  }
96
96
  export interface StormEventCreateDSLRetry {
97
- type: 'API_RETRY' | 'MODEL_RETRY';
97
+ type: 'API_RETRY' | 'MODELS_RETRY';
98
98
  reason: string;
99
99
  created: number;
100
100
  payload: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapeta/local-cluster-service",
3
- "version": "0.56.1",
3
+ "version": "0.56.2",
4
4
  "description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -299,6 +299,7 @@ export class StormCodegen {
299
299
 
300
300
  const kapetaYaml = YAML.stringify(block.content);
301
301
  const blockDefinition = block.content;
302
+ const basePath = this.getBasePath(blockDefinition.metadata.name);
302
303
 
303
304
  // Generate the code for the block using the standard codegen templates
304
305
  const generatedResult = await this.generateBlock(blockDefinition);
@@ -306,6 +307,9 @@ export class StormCodegen {
306
307
  return;
307
308
  }
308
309
 
310
+ const kapetaYmlPath = join(basePath, 'kapeta.yml');
311
+ await writeFile(kapetaYmlPath, kapetaYaml);
312
+
309
313
  const allFiles = this.toStormFiles(generatedResult);
310
314
 
311
315
  // Send all the non-ai files to the stream
@@ -421,7 +425,6 @@ export class StormCodegen {
421
425
  if (this.isAborted()) {
422
426
  return;
423
427
  }
424
- const basePath = this.getBasePath(blockDefinition.metadata.name);
425
428
 
426
429
  const screenFilesConverted = screenFiles.map((screenFile) => {
427
430
  return {
@@ -485,8 +488,6 @@ export class StormCodegen {
485
488
  await writeFile(filePath, webRouterFile.content);
486
489
  }
487
490
 
488
- const kapetaYmlPath = join(basePath, 'kapeta.yml');
489
- await writeFile(kapetaYmlPath, kapetaYaml);
490
491
 
491
492
  const blockRef = block.uri;
492
493
 
@@ -340,7 +340,7 @@ export class StormEventParser {
340
340
  block.apis = [];
341
341
  });
342
342
  break;
343
- case 'MODEL_RETRY':
343
+ case 'MODELS_RETRY':
344
344
  Object.values(this.blocks).forEach((block) => {
345
345
  block.models = [];
346
346
  });
@@ -120,7 +120,7 @@ export interface StormEventCreateDSLResource extends Omit<StormEventCreateDSL, '
120
120
  }
121
121
 
122
122
  export interface StormEventCreateDSLRetry {
123
- type: 'API_RETRY' | 'MODEL_RETRY';
123
+ type: 'API_RETRY' | 'MODELS_RETRY';
124
124
  reason: string;
125
125
  created: number;
126
126
  payload: {