@kumori/aurora-backend-handler 1.0.61 → 1.0.62

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.
@@ -16,13 +16,13 @@ let pendingLinks = new Map<string, Link[]>();
16
16
  export const deployService = async (data: Service, token: string) => {
17
17
  try {
18
18
  const url = new URL(
19
- `${environment.apiServer.baseUrl}/api/${environment.apiServer.apiVersion}/tenant/${data.tenant}/service/${data.name}`
19
+ `${environment.apiServer.baseUrl}/api/${environment.apiServer.apiVersion}/tenant/${data.tenant}/service/${data.name}`,
20
20
  );
21
21
  url.searchParams.append("dryrun", "false");
22
22
  url.searchParams.append("accept", "true");
23
23
  url.searchParams.append("wait", "30000");
24
24
  url.searchParams.append("validate", "true");
25
- if(data.dsl){
25
+ if (data.dsl) {
26
26
  url.searchParams.append("dsl", "true");
27
27
  }
28
28
  if (data.serviceData) {
@@ -33,7 +33,7 @@ export const deployService = async (data: Service, token: string) => {
33
33
  JSON.stringify({
34
34
  targetAccount: data.account,
35
35
  targetEnvironment: data.environment,
36
- })
36
+ }),
37
37
  );
38
38
  formData.append("labels", JSON.stringify({ project: data.project }));
39
39
  formData.append("comment", " ");
@@ -48,7 +48,7 @@ export const deployService = async (data: Service, token: string) => {
48
48
  const jsonResponse = await response.json();
49
49
 
50
50
  const isTimeout = jsonResponse?.events?.some(
51
- (event: any) => event.content === "_timeout_"
51
+ (event: any) => event.content === "_timeout_",
52
52
  );
53
53
 
54
54
  if (isTimeout) {
@@ -81,7 +81,7 @@ export const deployService = async (data: Service, token: string) => {
81
81
  const jsonResponse = await response.json();
82
82
 
83
83
  const isTimeout = jsonResponse?.events?.some(
84
- (event: any) => event.content === "_timeout_"
84
+ (event: any) => event.content === "_timeout_",
85
85
  );
86
86
 
87
87
  if (isTimeout) {
@@ -111,7 +111,7 @@ export const redeployService = async (data: Service) => {
111
111
  try {
112
112
  const formData = await deployServiceHelper(data);
113
113
  const url = new URL(
114
- `${environment.apiServer.baseUrl}/api/${environment.apiServer.apiVersion}/tenant/${data.tenant}/service/${data.name}/revision/${data.currentRevision}`
114
+ `${environment.apiServer.baseUrl}/api/${environment.apiServer.apiVersion}/tenant/${data.tenant}/service/${data.name}/revision/${data.currentRevision}`,
115
115
  );
116
116
  url.searchParams.append("dryrun", "false");
117
117
  url.searchParams.append("accept", "true");
@@ -130,7 +130,7 @@ export const redeployService = async (data: Service) => {
130
130
  const jsonResponse = await response.json();
131
131
 
132
132
  const isTimeout = jsonResponse?.events?.some(
133
- (event: any) => event.content === "_timeout_"
133
+ (event: any) => event.content === "_timeout_",
134
134
  );
135
135
 
136
136
  if (isTimeout) {
@@ -163,7 +163,7 @@ export const deleteService = async (data: Service, security: string) => {
163
163
  deleteBody,
164
164
  30000,
165
165
  "DELETE",
166
- data.name
166
+ data.name,
167
167
  );
168
168
  return response;
169
169
  } catch (err) {
@@ -188,7 +188,7 @@ export const restartService = async (data: Service, security: string) => {
188
188
  restartBody,
189
189
  30000,
190
190
  "RESTART",
191
- data.name
191
+ data.name,
192
192
  );
193
193
 
194
194
  const updatedService: Service = {
@@ -319,7 +319,7 @@ export const linkPendingServices = async (service: Service, token: string) => {
319
319
  linkBody,
320
320
  30000,
321
321
  "LINK",
322
- service.name
322
+ service.name,
323
323
  );
324
324
 
325
325
  const notification: Notification = {
@@ -353,7 +353,7 @@ export const linkPendingServices = async (service: Service, token: string) => {
353
353
  };
354
354
  eventHelper.notification.publish.creation(notification);
355
355
  }
356
- })
356
+ }),
357
357
  );
358
358
  }
359
359
  };
@@ -375,7 +375,7 @@ export const requestRevisionData = async (service: Service, token: string) => {
375
375
  "GET_REVISION",
376
376
  service.name,
377
377
  "service",
378
- service
378
+ service,
379
379
  );
380
380
  return response;
381
381
  } catch (err) {
@@ -623,7 +623,7 @@ export const updateService = async (
623
623
  };
624
624
  export const unlinkServices = async (service: Service, token: string) => {
625
625
  const deleteLinks: Link[] = service.links.filter(
626
- (link) => link.delete === true
626
+ (link) => link.delete === true,
627
627
  );
628
628
  if (deleteLinks.length > 0) {
629
629
  await Promise.all(
@@ -638,7 +638,7 @@ export const unlinkServices = async (service: Service, token: string) => {
638
638
  unlinkBody,
639
639
  30000,
640
640
  "UNLINK",
641
- service.name
641
+ service.name,
642
642
  );
643
643
 
644
644
  const unlinkNotification: Notification = {
@@ -674,7 +674,7 @@ export const unlinkServices = async (service: Service, token: string) => {
674
674
  };
675
675
  eventHelper.notification.publish.creation(notification);
676
676
  }
677
- })
677
+ }),
678
678
  );
679
679
  }
680
680
  };
@@ -699,7 +699,7 @@ export const updateServiceLinks = async (link: Link, token: string) => {
699
699
  linkBody,
700
700
  30000,
701
701
  "UNLINK",
702
- link.origin
702
+ link.origin,
703
703
  );
704
704
 
705
705
  // const unlinkNotification: Notification = {
@@ -745,7 +745,7 @@ export const updateServiceLinks = async (link: Link, token: string) => {
745
745
  linkBody,
746
746
  30000,
747
747
  "LINK",
748
- link.origin
748
+ link.origin,
749
749
  );
750
750
 
751
751
  const notification: Notification = {
@@ -801,7 +801,7 @@ export const changeRevision = async (data: Service, token: string) => {
801
801
  revisionBody,
802
802
  30000,
803
803
  "UPDATE_REVISION",
804
- data.name
804
+ data.name,
805
805
  );
806
806
  const notification: Notification = {
807
807
  type: "success",
@@ -886,4 +886,4 @@ export async function restartInstance(service: Service, roleId: string, instance
886
886
  };
887
887
  eventHelper.notification.publish.creation(notification);
888
888
  }
889
- }
889
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {