@kumori/aurora-backend-handler 1.1.88 → 1.1.90

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.
@@ -100,6 +100,7 @@ export interface ServiceSpecForm {
100
100
  certificateResource?: string;
101
101
  withMtls?: boolean;
102
102
  caResource?: string;
103
+ gatewayName?: string;
103
104
  }>;
104
105
  clientChannelsExtra?: Array<{ name: string }>;
105
106
  defaultExecutable: { cmd?: string; entryPoint?: string };
@@ -465,6 +466,7 @@ export function transformServiceToForm(service: Service): ServiceSpecForm {
465
466
  certificateResource: ch.certificateResource,
466
467
  withMtls: ch.withMtls,
467
468
  caResource: ch.caResource,
469
+ gatewayName: ch.gatewayName,
468
470
  })),
469
471
  clientChannelsExtra: service.duplexChannels.map((ch) => ({
470
472
  name: ch.name,
@@ -631,7 +633,7 @@ export async function generateServiceSpec(
631
633
  .map((channel) => {
632
634
  if (channel.protocol === "HTTPS") {
633
635
  return {
634
- name: `${channel.channelName}_inbound`,
636
+ name: channel.gatewayName || `${channel.channelName}_inbound`,
635
637
  artifact: {
636
638
  artifactKind: "service",
637
639
  moduleDomain: "kumori.systems",
@@ -674,7 +676,7 @@ export async function generateServiceSpec(
674
676
  };
675
677
  }
676
678
  return {
677
- name: `${channel.channelName}_inbound`,
679
+ name: channel.gatewayName || `${channel.channelName}_inbound`,
678
680
  artifact: {
679
681
  artifactKind: "service",
680
682
  moduleDomain: " ",
@@ -708,7 +710,7 @@ export async function generateServiceSpec(
708
710
  ];
709
711
  if (channel.isPublic) {
710
712
  result.push({
711
- clientRole: `${channel.channelName}_inbound`,
713
+ clientRole: channel.gatewayName || `${channel.channelName}_inbound`,
712
714
  clientChannel: "inbound",
713
715
  serverRole: withDefaultValue(form.serviceId, ""),
714
716
  serverChannel: channel.channelName,
@@ -1245,7 +1247,7 @@ async function generateServiceSpecDSL(
1245
1247
  .map((channel) => {
1246
1248
  if (channel.protocol === "HTTPS") {
1247
1249
  return {
1248
- name: `${channel.channelName}_inbound`,
1250
+ name: channel.gatewayName || `${channel.channelName}_inbound`,
1249
1251
  artifact: {
1250
1252
  artifactKind: "service" as const,
1251
1253
  moduleDomain: "kumori",
@@ -1288,7 +1290,7 @@ async function generateServiceSpecDSL(
1288
1290
  };
1289
1291
  }
1290
1292
  return {
1291
- name: `${channel.channelName}_inbound`,
1293
+ name: channel.gatewayName || `${channel.channelName}_inbound`,
1292
1294
  artifact: {
1293
1295
  artifactKind: "service" as const,
1294
1296
  moduleDomain: "kumori",
@@ -1323,7 +1325,7 @@ async function generateServiceSpecDSL(
1323
1325
  ];
1324
1326
  if (channel.isPublic) {
1325
1327
  result.push({
1326
- clientRole: `${channel.channelName}_inbound`,
1328
+ clientRole: channel.gatewayName || `${channel.channelName}_inbound`,
1327
1329
  clientChannel: "inbound",
1328
1330
  serverRole: withDefaultValue(form.serviceId, ""),
1329
1331
  serverChannel: channel.channelName,
@@ -241,6 +241,8 @@ export const updateTenant = async (tenant: Tenant, security: string) => {
241
241
  console.error("Error in tenant update WebSocket request:", err);
242
242
  const { code: contentMessage, content: errorContent } =
243
243
  extractWsErrorInfo(err);
244
+ const { plan, ...tenantWithoutPlan } = tenant;
245
+ eventHelper.tenant.publish.updateError(tenantWithoutPlan as Tenant);
244
246
  const tenantUpdateErrorNotification: Notification = {
245
247
  type: "error",
246
248
  subtype: errors.tenant.updateError.subtype,
@@ -473,7 +475,9 @@ export const updateTenantHTTP = async (tenant: Tenant) => {
473
475
  };
474
476
  eventHelper.notification.publish.creation(tenantCreatedNotification);
475
477
  } else {
476
- eventHelper.tenant.publish.updateError(tenant);
478
+ // The request failed, so the plan change must not be reflected as applied.
479
+ const { plan, ...tenantWithoutPlan } = tenant;
480
+ eventHelper.tenant.publish.updateError(tenantWithoutPlan as Tenant);
477
481
 
478
482
  let errorCode = "Unknown error";
479
483
  let errorMessage = "Unknown error";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.88",
3
+ "version": "1.1.90",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "glob": "^11.0.0"
12
12
  },
13
13
  "dependencies": {
14
- "@kumori/aurora-interfaces": "^1.0.20",
14
+ "@kumori/aurora-interfaces": "^1.0.21",
15
15
  "@kumori/kumori-dsl-generator": "1.0.7",
16
16
  "@kumori/kumori-module-generator": "^1.1.6",
17
17
  "ts-node": "^10.9.2",