@kumori/aurora-backend-handler 1.0.10 → 1.0.11

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.
@@ -25,10 +25,6 @@ interface HandleResourceEventResult {
25
25
  secretsToStore: Array<{ key: string; value: any }>;
26
26
  }
27
27
 
28
- // ============================================
29
- // RESOURCE BUILDERS
30
- // ============================================
31
-
32
28
  /**
33
29
  * Build a domain resource
34
30
  */
@@ -402,11 +402,6 @@ const updateAccountConsumption = (
402
402
 
403
403
  return account;
404
404
  };
405
-
406
- // ============================================
407
- // MAIN HANDLER FUNCTION
408
- // ============================================
409
-
410
405
  /**
411
406
  * Handles the "revision" event from WebSocket messages
412
407
  * Processes revision data, updates services, environments, and accounts
@@ -423,15 +418,11 @@ export const handleRevisionEvent = ({
423
418
  }: HandleRevisionEventParams): HandleRevisionEventResult => {
424
419
  const serviceId = `${parentParts.tenant}/${parentParts.service}`;
425
420
  const revisionKey = `${serviceId}-${entityId}`;
426
-
427
- // Process roles and instances
428
421
  const { roles, instances, usedCpu, usedMemory } = processRolesAndInstances(
429
422
  eventData,
430
423
  serviceId,
431
424
  roleMap,
432
425
  );
433
-
434
- // Create new revision
435
426
  const newRevision = createRevision(
436
427
  entityId,
437
428
  parentParts,
@@ -439,8 +430,6 @@ export const handleRevisionEvent = ({
439
430
  usedCpu,
440
431
  usedMemory,
441
432
  );
442
-
443
- // Initialize result
444
433
  let updatedService: Service | null = null;
445
434
  let updatedEnvironment: Environment | null = null;
446
435
  let updatedAccount: Account | null = null;
@@ -745,9 +734,14 @@ export const extractResourcesFromFilesystem = (
745
734
  );
746
735
  resources.push({
747
736
  type: "volume",
748
- name: value.path || existingResource?.name,
737
+ name: existingResource?.name || value.volume,
749
738
  value: existingResource?.value || value.volume,
750
- kind: (existingResource?.kind as "persistent" | "volatile" | "nonReplicated") || "storage",
739
+ key: value.path,
740
+ kind:
741
+ (existingResource?.kind as
742
+ | "persistent"
743
+ | "volatile"
744
+ | "nonReplicated") || "storage",
751
745
  status: existingResource?.status || "available",
752
746
  tenant: "",
753
747
  });
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "ws": "^8.18.2"
24
24
  },
25
25
  "name": "@kumori/aurora-backend-handler",
26
- "version": "1.0.10",
26
+ "version": "1.0.11",
27
27
  "description": "backend handler",
28
28
  "main": "backend-handler.ts",
29
29
  "repository": {