@kapeta/local-cluster-service 0.61.0 → 0.61.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,17 @@
1
+ ## [0.61.2](https://github.com/kapetacom/local-cluster-service/compare/v0.61.1...v0.61.2) (2024-08-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * silence codegen internal errors for demo purposes ([3892ed3](https://github.com/kapetacom/local-cluster-service/commit/3892ed3817a73c5ac4564dcad05f50ffd86d221f))
7
+
8
+ ## [0.61.1](https://github.com/kapetacom/local-cluster-service/compare/v0.61.0...v0.61.1) (2024-08-09)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * Directly add to the queue without awaiting ([d0929f0](https://github.com/kapetacom/local-cluster-service/commit/d0929f023c7441684711e9b98c053e6a7e77a02a))
14
+
1
15
  # [0.61.0](https://github.com/kapetacom/local-cluster-service/compare/v0.60.3...v0.61.0) (2024-08-09)
2
16
 
3
17
 
@@ -185,7 +185,7 @@ router.post('/:handle/ui', async (req, res) => {
185
185
  queue.cancel();
186
186
  });
187
187
  for (const screen of Object.values(uniqueUserJourneyScreens)) {
188
- await queue.add(() => new Promise(async (resolve, reject) => {
188
+ void queue.add(() => new Promise(async (resolve, reject) => {
189
189
  try {
190
190
  const innerConversationId = node_uuid_1.default.v4();
191
191
  const screenStream = await stormClient_1.stormClient.createUIPage({
@@ -484,6 +484,12 @@ function waitForStormStream(result) {
484
484
  function streamStormPartialResponse(result, res) {
485
485
  return new Promise((resolve) => {
486
486
  result.on('data', (data) => {
487
+ switch (data.type) {
488
+ // todo: temporarily (for demo purposes) disable error messages when codegen fails
489
+ case 'ERROR_INTERNAL':
490
+ console.log("Error internal", data);
491
+ return;
492
+ }
487
493
  sendEvent(res, data);
488
494
  });
489
495
  resolve(result.waitForDone());
@@ -185,7 +185,7 @@ router.post('/:handle/ui', async (req, res) => {
185
185
  queue.cancel();
186
186
  });
187
187
  for (const screen of Object.values(uniqueUserJourneyScreens)) {
188
- await queue.add(() => new Promise(async (resolve, reject) => {
188
+ void queue.add(() => new Promise(async (resolve, reject) => {
189
189
  try {
190
190
  const innerConversationId = node_uuid_1.default.v4();
191
191
  const screenStream = await stormClient_1.stormClient.createUIPage({
@@ -484,6 +484,12 @@ function waitForStormStream(result) {
484
484
  function streamStormPartialResponse(result, res) {
485
485
  return new Promise((resolve) => {
486
486
  result.on('data', (data) => {
487
+ switch (data.type) {
488
+ // todo: temporarily (for demo purposes) disable error messages when codegen fails
489
+ case 'ERROR_INTERNAL':
490
+ console.log("Error internal", data);
491
+ return;
492
+ }
487
493
  sendEvent(res, data);
488
494
  });
489
495
  resolve(result.waitForDone());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapeta/local-cluster-service",
3
- "version": "0.61.0",
3
+ "version": "0.61.2",
4
4
  "description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -230,7 +230,7 @@ router.post('/:handle/ui', async (req: KapetaBodyRequest, res: Response) => {
230
230
  });
231
231
 
232
232
  for (const screen of Object.values(uniqueUserJourneyScreens)) {
233
- await queue.add(
233
+ void queue.add(
234
234
  () =>
235
235
  new Promise(async (resolve, reject) => {
236
236
  try {
@@ -588,6 +588,12 @@ function waitForStormStream(result: StormStream) {
588
588
  function streamStormPartialResponse(result: StormStream, res: Response) {
589
589
  return new Promise<void>((resolve) => {
590
590
  result.on('data', (data) => {
591
+ switch (data.type) {
592
+ // todo: temporarily (for demo purposes) disable error messages when codegen fails
593
+ case 'ERROR_INTERNAL':
594
+ console.log("Error internal", data);
595
+ return;
596
+ }
591
597
  sendEvent(res, data);
592
598
  });
593
599