@kumori/aurora-backend-handler 1.1.14 → 1.1.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -1291,7 +1291,7 @@ const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1291
1291
  svcSuccessResult.revisionData
1292
1292
  ) {
1293
1293
  try {
1294
- const updatedService = processRevisionData(
1294
+ let updatedService = processRevisionData(
1295
1295
  svcSuccessResult.updatedService!,
1296
1296
  svcSuccessResult.revisionData,
1297
1297
  revisionsMap,
@@ -1311,6 +1311,28 @@ const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1311
1311
  };
1312
1312
  }
1313
1313
 
1314
+ const resources = updatedService.resources || [];
1315
+ if (resources.length > 0) {
1316
+ const applyIsPublic = (channels: Channel[]): Channel[] =>
1317
+ channels.map((ch) => ({
1318
+ ...ch,
1319
+ isPublic:
1320
+ ch.isPublic ||
1321
+ resources.some(
1322
+ (r) =>
1323
+ (r.type === "port" || r.type === "domain") &&
1324
+ (r.name === `${ch.name}_port` || r.name === `${ch.name}_domain`),
1325
+ ),
1326
+ }));
1327
+
1328
+ updatedService = {
1329
+ ...updatedService,
1330
+ serverChannels: applyIsPublic(updatedService.serverChannels || []),
1331
+ clientChannels: applyIsPublic(updatedService.clientChannels || []),
1332
+ duplexChannels: applyIsPublic(updatedService.duplexChannels || []),
1333
+ };
1334
+ }
1335
+
1314
1336
  servicesMap.set(svcSuccessResult.serviceId, updatedService);
1315
1337
 
1316
1338
  if (updatedService.role && updatedService.role.length > 0) {