Skip to content

Commit

Permalink
fix(synth): fix various synth errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed Jan 30, 2024
1 parent 9628060 commit 828ffd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion skeleton/templates/cdk/src/api-stack.ts.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { fileURLToPath } from "url";
import { Duration, Stack, type StackProps } from "aws-cdk-lib";
import { Certificate } from "aws-cdk-lib/aws-certificatemanager";
import {
type CfnVPCCidrBlock,
InstanceClass,
InstanceSize,
InstanceType,
Expand Down Expand Up @@ -148,7 +149,6 @@ export class ApiStack extends Stack {
APPCONFIG_CONFIGURATION_PROFILE_IDENTIFIER: appConfig.configurationProfileId,
{{/if}}
},
taskRole,
},
certificate: certificate,
// As long as there are 11 or less docker instances running in the VPC, assigning public IPs is cheaper
Expand Down
4 changes: 2 additions & 2 deletions skeleton/templates/src/index.ts.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ gracefulShutdown(server, {
await orm.close();
{{/if}}
},
};
});
{{else}}
gracefulShutdown(server);
{{/if}})
{{/if}}

logger.info(`Server started on port ${port}`);
6 changes: 3 additions & 3 deletions src/synth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ export const synthProject = async (
}

await execute(context.stdout, "pnpm", ["install"], { cwd: projectPath });
await execute(context.stdout, "pnpm", ["exec", "biome", "check", ".", "--apply"], {
cwd: projectPath,
});
await execute(context.stdout, "pnpm", ["install"], { cwd: path.join(projectPath, "cdk") });
await execute(context.stdout, "pnpm", ["run", "build"], { cwd: path.join(projectPath, "cdk") });
await execute(context.stdout, "pnpm", ["exec", "cdk", "synth", "--app", "dist/env-uat.js"], {
cwd: path.join(projectPath, "cdk"),
});
await execute(context.stdout, "pnpm", ["exec", "biome", "check", ".", "--apply"], {
cwd: projectPath,
});
};

0 comments on commit 828ffd8

Please sign in to comment.