-
Notifications
You must be signed in to change notification settings - Fork 1
/
.projenrc.js
100 lines (82 loc) · 2.41 KB
/
.projenrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
const { awscdk } = require('projen');
const { ReleaseTrigger } = require('projen/lib/release');
const PROJECT_NAME = 'cdk-s3-upload-presignedurl-api';
const PYTHON_MODULE_NAME = 'cdk_s3_upload_presignedurl_api';
const project = new awscdk.AwsCdkConstructLibrary({
author: 'Jerome Van Der Linden',
authorAddress: '[email protected]',
cdkVersion: '2.54.0',
defaultReleaseBranch: 'main',
name: PROJECT_NAME,
packageName: PROJECT_NAME,
description: 'API to get an S3 presigned url for file uploads',
keywords: ['aws', 'cdk', 's3', 'upload', 'presigned', 'api gateway'],
repositoryUrl: `https://github.com/jeromevdl/${PROJECT_NAME}.git`,
licensed: true,
license: 'Apache-2.0',
gitpod: true,
docgen: true,
docgenFilePath: 'API.md',
dependabot: true,
eslint: true,
mergify: true,
githubOptions: {
pullRequestLint: false,
},
// Build Trigger
buildWorkflow: true,
buildWorkflowTriggers: { pullRequest: {}, push: {} },
// Publish to Npm
releaseToNpm: true,
packageName: PROJECT_NAME,
// Publish to Pypi
publishToPypi: {
distName: PROJECT_NAME,
module: PYTHON_MODULE_NAME,
},
// Publish to Maven Central
publishToMaven: {
javaPackage: 'io.github.jeromevdl.awscdk.s3uploadpresignedurlapi',
mavenGroupId: 'io.github.jeromevdl.awscdk',
mavenArtifactId: 's3-upload-presignedurl-api',
mavenEndpoint: 'https://s01.oss.sonatype.org',
},
// Release Trigger
release: true,
releaseEveryCommit: false,
releaseTrigger: ReleaseTrigger.manual,
defaultReleaseBranch: 'main',
releaseWorkflow: true,
lambdaOptions: {
runtime: awscdk.LambdaRuntime.NODEJS_18_X,
},
devDeps: [
'ts-node',
'@jest/globals',
'es-mime-types',
'esbuild',
'@aws-sdk/s3-request-presigner',
'@aws-sdk/client-s3',
],
tsconfig: {
compilerOptions: {
lib: ['es2020', 'dom'],
},
},
});
project.gitpod.addDockerImage({
image: 'jsii/superchain:1-buster-slim-node14',
});
project.gitpod.addCustomTask({
name: 'ConfigAlias',
command: 'echo \'alias pj="npx projen"\' >> ~/.bashrc && echo \'alias cdk="npx cdk"\' >> ~/.bashrc',
});
project.gitpod.addVscodeExtensions(
'dbaeumer.vscode-eslint',
'ms-azuretools.vscode-docker',
'AmazonWebServices.aws-toolkit-vscode',
);
const common_exclude = ['.DS_Store', 'cdk.out'];
project.npmignore.exclude(...common_exclude, 'front', 'images');
project.gitignore.exclude(...common_exclude);
project.synth();