@kumori/aurora-backend-handler 1.1.73 → 1.1.75

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.
@@ -686,9 +686,10 @@ export const processRevisionData = (
686
686
  const schemaResult = revisionData.revision
687
687
  ? extractStructuredSchema(revisionData)
688
688
  : {};
689
+ console.log("DEBUG schemaResult", schemaResult);
689
690
  const schema =
690
691
  schemaResult && "parameters" in schemaResult ? schemaResult : {};
691
-
692
+ console.log("DEBUG schema", schema);
692
693
  if (
693
694
  revisionsMap &&
694
695
  serviceId &&
@@ -696,10 +697,13 @@ export const processRevisionData = (
696
697
  "parameters" in schema
697
698
  ) {
698
699
  const revisionId: string = revisionData.revision;
699
- const revisionKey = `${serviceId}-${revisionId}`;
700
+ const [tenantId, serviceName] = serviceId.split('/');
701
+ const revisionKey = `/tenant/${tenantId}/service/${serviceName}/revision/${revisionId}`;
700
702
  const existing = revisionsMap.get(revisionKey);
701
703
  if (existing) {
704
+ console.log("DEBUG: Updating existing revision in revisionsMap", revisionKey, existing);
702
705
  revisionsMap.set(revisionKey, { ...existing, schema });
706
+ console.log("DEBUG: Updated revision in revisionsMap", revisionKey, revisionsMap.get(revisionKey));
703
707
  } else {
704
708
  revisionsMap.set(revisionKey, {
705
709
  id: revisionId,
@@ -740,6 +744,7 @@ export const processRevisionData = (
740
744
  errorMsg: "",
741
745
  createdAt: "",
742
746
  });
747
+ console.log("DEBUG: Added new revision to revisionsMap", revisionKey, revisionsMap.get(revisionKey));
743
748
  }
744
749
  }
745
750
 
@@ -808,6 +813,11 @@ export const processRevisionData = (
808
813
  ),
809
814
  );
810
815
  }
816
+ console.log("DEBUG: No deployment found in revisionData, applying schema to service with top-level parameters and resources.", service, topLevelParameters, topLevelResources, applySchemaToService({
817
+ ...service,
818
+ parameters: topLevelParameters,
819
+ resources: topLevelResources,
820
+ }));
811
821
  return applySchemaToService({
812
822
  ...service,
813
823
  parameters: topLevelParameters,
@@ -188,7 +188,7 @@ export const handleServiceEvent = ({
188
188
  }: HandleServiceEventParams): HandleServiceEventResult => {
189
189
  const serviceFullKey = `${parentParts.tenant}/${entityId}`;
190
190
  const serviceTenantId = parentParts.tenant;
191
- const currentRevisionKey = `${eventData.id.parent.name}/service/${entityId}/revision/${eventData.status.revision}`;
191
+ const currentRevisionKey = `${eventData.id.parent.name}/service/${entityId}/revision/${eventData.spec.ctstamp || eventData.status.revision}`;
192
192
  const currentRevision = revisionsMap.get(currentRevisionKey);
193
193
 
194
194
  const projectLabel = eventData.meta?.labels?.project;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.73",
3
+ "version": "1.1.75",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {