@kapeta/local-cluster-service 0.54.4 → 0.54.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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/src/storm/codegen.js +14 -2
- package/dist/cjs/src/storm/events.d.ts +7 -1
- package/dist/esm/src/storm/codegen.js +14 -2
- package/dist/esm/src/storm/events.d.ts +7 -1
- package/package.json +1 -1
- package/src/storm/codegen.ts +22 -10
- package/src/storm/events.ts +8 -0
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.54.5](https://github.com/kapetacom/local-cluster-service/compare/v0.54.4...v0.54.5) (2024-06-21)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* enable filesToBeFixed inclusion list in codefix ([4eaf272](https://github.com/kapetacom/local-cluster-service/commit/4eaf2720bc49b5709c170f88a85614b1a1a8bb8b))
|
7
|
+
* forward FILE_FAILED events from streams ([fc22b68](https://github.com/kapetacom/local-cluster-service/commit/fc22b68e129546166c117ea5d13efeebf4bd9d72))
|
8
|
+
|
1
9
|
## [0.54.4](https://github.com/kapetacom/local-cluster-service/compare/v0.54.3...v0.54.4) (2024-06-20)
|
2
10
|
|
3
11
|
|
@@ -195,6 +195,17 @@ class StormCodegen {
|
|
195
195
|
},
|
196
196
|
});
|
197
197
|
return true;
|
198
|
+
case 'FILE_FAILED':
|
199
|
+
this.out.emit('data', {
|
200
|
+
...data,
|
201
|
+
payload: {
|
202
|
+
...data.payload,
|
203
|
+
path: (0, path_2.join)(basePath, data.payload.filename),
|
204
|
+
blockName,
|
205
|
+
blockRef,
|
206
|
+
instanceId,
|
207
|
+
},
|
208
|
+
});
|
198
209
|
}
|
199
210
|
return false;
|
200
211
|
}
|
@@ -428,8 +439,9 @@ class StormCodegen {
|
|
428
439
|
if (errors.size > 0) {
|
429
440
|
this.emitBlockStatus(blockUri, blockName, events_1.StormEventBlockStatusType.FIXING);
|
430
441
|
const promises = Array.from(errors.entries()).map(([filename, fileErrors]) => {
|
431
|
-
|
432
|
-
|
442
|
+
if (filesToBeFixed.some((file) => file.filename === filename)) {
|
443
|
+
return this.tryToFixFile(blockUri, blockName, basePath, filename, fileErrors, allFiles, codeGenerator);
|
444
|
+
}
|
433
445
|
});
|
434
446
|
await Promise.all(promises);
|
435
447
|
}
|
@@ -200,6 +200,12 @@ export interface StormEventFileDone extends StormEventFileBase {
|
|
200
200
|
content: string;
|
201
201
|
};
|
202
202
|
}
|
203
|
+
export interface StormEventFileFailed extends StormEventFileBase {
|
204
|
+
type: 'FILE_FAILED';
|
205
|
+
payload: StormEventFileBasePayload & {
|
206
|
+
error: string;
|
207
|
+
};
|
208
|
+
}
|
203
209
|
export interface StormEventFileChunk extends StormEventFileBase {
|
204
210
|
type: 'FILE_CHUNK';
|
205
211
|
payload: StormEventFileBasePayload & {
|
@@ -259,4 +265,4 @@ export interface StormEventPhases {
|
|
259
265
|
phaseType: StormEventPhaseType;
|
260
266
|
};
|
261
267
|
}
|
262
|
-
export type StormEvent = StormEventCreateBlock | StormEventCreateConnection | StormEventCreatePlanProperties | StormEventInvalidResponse | StormEventPlanRetry | StormEventCreateDSL | StormEventCreateDSLResource | StormEventError | StormEventScreen | StormEventScreenCandidate | StormEventFileLogical | StormEventFileState | StormEventFileDone | StormEventFileChunk | StormEventDone | StormEventDefinitionChange | StormEventErrorClassifier | StormEventCodeFix | StormEventErrorDetails | StormEventBlockReady | StormEventPhases | StormEventBlockStatus | StormEventCreateDSLRetry;
|
268
|
+
export type StormEvent = StormEventCreateBlock | StormEventCreateConnection | StormEventCreatePlanProperties | StormEventInvalidResponse | StormEventPlanRetry | StormEventCreateDSL | StormEventCreateDSLResource | StormEventError | StormEventScreen | StormEventScreenCandidate | StormEventFileLogical | StormEventFileState | StormEventFileDone | StormEventFileFailed | StormEventFileChunk | StormEventDone | StormEventDefinitionChange | StormEventErrorClassifier | StormEventCodeFix | StormEventErrorDetails | StormEventBlockReady | StormEventPhases | StormEventBlockStatus | StormEventCreateDSLRetry;
|
@@ -195,6 +195,17 @@ class StormCodegen {
|
|
195
195
|
},
|
196
196
|
});
|
197
197
|
return true;
|
198
|
+
case 'FILE_FAILED':
|
199
|
+
this.out.emit('data', {
|
200
|
+
...data,
|
201
|
+
payload: {
|
202
|
+
...data.payload,
|
203
|
+
path: (0, path_2.join)(basePath, data.payload.filename),
|
204
|
+
blockName,
|
205
|
+
blockRef,
|
206
|
+
instanceId,
|
207
|
+
},
|
208
|
+
});
|
198
209
|
}
|
199
210
|
return false;
|
200
211
|
}
|
@@ -428,8 +439,9 @@ class StormCodegen {
|
|
428
439
|
if (errors.size > 0) {
|
429
440
|
this.emitBlockStatus(blockUri, blockName, events_1.StormEventBlockStatusType.FIXING);
|
430
441
|
const promises = Array.from(errors.entries()).map(([filename, fileErrors]) => {
|
431
|
-
|
432
|
-
|
442
|
+
if (filesToBeFixed.some((file) => file.filename === filename)) {
|
443
|
+
return this.tryToFixFile(blockUri, blockName, basePath, filename, fileErrors, allFiles, codeGenerator);
|
444
|
+
}
|
433
445
|
});
|
434
446
|
await Promise.all(promises);
|
435
447
|
}
|
@@ -200,6 +200,12 @@ export interface StormEventFileDone extends StormEventFileBase {
|
|
200
200
|
content: string;
|
201
201
|
};
|
202
202
|
}
|
203
|
+
export interface StormEventFileFailed extends StormEventFileBase {
|
204
|
+
type: 'FILE_FAILED';
|
205
|
+
payload: StormEventFileBasePayload & {
|
206
|
+
error: string;
|
207
|
+
};
|
208
|
+
}
|
203
209
|
export interface StormEventFileChunk extends StormEventFileBase {
|
204
210
|
type: 'FILE_CHUNK';
|
205
211
|
payload: StormEventFileBasePayload & {
|
@@ -259,4 +265,4 @@ export interface StormEventPhases {
|
|
259
265
|
phaseType: StormEventPhaseType;
|
260
266
|
};
|
261
267
|
}
|
262
|
-
export type StormEvent = StormEventCreateBlock | StormEventCreateConnection | StormEventCreatePlanProperties | StormEventInvalidResponse | StormEventPlanRetry | StormEventCreateDSL | StormEventCreateDSLResource | StormEventError | StormEventScreen | StormEventScreenCandidate | StormEventFileLogical | StormEventFileState | StormEventFileDone | StormEventFileChunk | StormEventDone | StormEventDefinitionChange | StormEventErrorClassifier | StormEventCodeFix | StormEventErrorDetails | StormEventBlockReady | StormEventPhases | StormEventBlockStatus | StormEventCreateDSLRetry;
|
268
|
+
export type StormEvent = StormEventCreateBlock | StormEventCreateConnection | StormEventCreatePlanProperties | StormEventInvalidResponse | StormEventPlanRetry | StormEventCreateDSL | StormEventCreateDSLResource | StormEventError | StormEventScreen | StormEventScreenCandidate | StormEventFileLogical | StormEventFileState | StormEventFileDone | StormEventFileFailed | StormEventFileChunk | StormEventDone | StormEventDefinitionChange | StormEventErrorClassifier | StormEventCodeFix | StormEventErrorDetails | StormEventBlockReady | StormEventPhases | StormEventBlockStatus | StormEventCreateDSLRetry;
|
package/package.json
CHANGED
package/src/storm/codegen.ts
CHANGED
@@ -217,6 +217,17 @@ export class StormCodegen {
|
|
217
217
|
},
|
218
218
|
});
|
219
219
|
return true;
|
220
|
+
case 'FILE_FAILED':
|
221
|
+
this.out.emit('data', {
|
222
|
+
...data,
|
223
|
+
payload: {
|
224
|
+
...data.payload,
|
225
|
+
path: join(basePath, data.payload.filename),
|
226
|
+
blockName,
|
227
|
+
blockRef,
|
228
|
+
instanceId,
|
229
|
+
},
|
230
|
+
});
|
220
231
|
}
|
221
232
|
|
222
233
|
return false;
|
@@ -524,16 +535,17 @@ export class StormCodegen {
|
|
524
535
|
this.emitBlockStatus(blockUri, blockName, StormEventBlockStatusType.FIXING);
|
525
536
|
|
526
537
|
const promises = Array.from(errors.entries()).map(([filename, fileErrors]) => {
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
538
|
+
if (filesToBeFixed.some((file) => file.filename === filename)) {
|
539
|
+
return this.tryToFixFile(
|
540
|
+
blockUri,
|
541
|
+
blockName,
|
542
|
+
basePath,
|
543
|
+
filename,
|
544
|
+
fileErrors,
|
545
|
+
allFiles,
|
546
|
+
codeGenerator
|
547
|
+
);
|
548
|
+
}
|
537
549
|
});
|
538
550
|
|
539
551
|
await Promise.all(promises);
|
package/src/storm/events.ts
CHANGED
@@ -241,6 +241,13 @@ export interface StormEventFileDone extends StormEventFileBase {
|
|
241
241
|
};
|
242
242
|
}
|
243
243
|
|
244
|
+
export interface StormEventFileFailed extends StormEventFileBase {
|
245
|
+
type: 'FILE_FAILED';
|
246
|
+
payload: StormEventFileBasePayload & {
|
247
|
+
error: string;
|
248
|
+
};
|
249
|
+
}
|
250
|
+
|
244
251
|
export interface StormEventFileChunk extends StormEventFileBase {
|
245
252
|
type: 'FILE_CHUNK';
|
246
253
|
payload: StormEventFileBasePayload & {
|
@@ -322,6 +329,7 @@ export type StormEvent =
|
|
322
329
|
| StormEventFileLogical
|
323
330
|
| StormEventFileState
|
324
331
|
| StormEventFileDone
|
332
|
+
| StormEventFileFailed
|
325
333
|
| StormEventFileChunk
|
326
334
|
| StormEventDone
|
327
335
|
| StormEventDefinitionChange
|