Skip to content

Commit

Permalink
chore(cac): fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
flamestro committed Dec 20, 2023
1 parent 41e78f4 commit 7e7f190
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions packages/compose-as-code/src/compiler/serviceCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,15 @@ const compileService = (service: Service) => {
serviceTextBlock += compileList(service.capAdd, baseIndentation + 2);
}
if (service.securityOpt && service.securityOpt) {
serviceTextBlock += compileKeyValuePair('security_opt', '', baseIndentation + 1);
serviceTextBlock += compileList(service.securityOpt.map(entry => `${entry.key}:${entry.value}`), baseIndentation + 2);
serviceTextBlock += compileKeyValuePair(
'security_opt',
'',
baseIndentation + 1
);
serviceTextBlock += compileList(
service.securityOpt.map(entry => `${entry.key}:${entry.value}`),
baseIndentation + 2
);
}
if (service.capDrop) {
serviceTextBlock += compileKeyValuePair(
Expand Down
4 changes: 2 additions & 2 deletions packages/compose-as-code/src/composition/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type ServiceProps = {
weight?: number;
weightDevice?: { path: string; weight: number };

securityOpt?: {key: 'seccomp', value: string}[];
securityOpt?: { key: 'seccomp'; value: string }[];
capAdd?: string[];
capDrop?: string[];
cgroupParent?: string;
Expand Down Expand Up @@ -85,7 +85,7 @@ export class Service {
};
labels?: { [key: string]: string };
};
securityOpt?: {key: 'seccomp', value: string}[];
securityOpt?: { key: 'seccomp'; value: string }[];
memReservation?: string;
memLimit?: string;
command?: string;
Expand Down

0 comments on commit 7e7f190

Please sign in to comment.