-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.projenrc.js
76 lines (72 loc) · 2.13 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
const fs = require('fs');
const { awscdk } = require('projen');
const project = new awscdk.AwsCdkConstructLibrary({
authorAddress: '[email protected]',
authorName: 'Jonathan Goldwasser',
description: 'High-level constructs for AWS CDK',
jsiiVersion: '5.x',
cdkVersion: '2.133.0',
name: 'cloudstructs',
repository: 'https://github.com/jogold/cloudstructs.git',
peerDeps: [],
bundledDeps: [
'got',
'@slack/web-api',
'mjml',
],
devDeps: [
'@aws-sdk/client-cloudformation',
'@aws-sdk/client-dynamodb',
'@aws-sdk/client-ecr',
'@aws-sdk/client-ecs',
'@aws-sdk/client-eventbridge',
'@aws-sdk/client-iam',
'@aws-sdk/client-s3',
'@aws-sdk/client-secrets-manager',
'@aws-sdk/client-sfn',
'@aws-sdk/client-textract',
'@aws-sdk/lib-dynamodb',
'@types/aws-lambda',
'@types/mjml',
'@types/tsscmp',
'aws-sdk-client-mock',
'aws-sdk-client-mock-jest',
'nock',
],
defaultReleaseBranch: 'master',
releaseToNpm: true,
publishToPypi: {
distName: 'cloudstructs',
module: 'cloudstructs',
},
publishToGo: {
moduleName: 'github.com/jogold/cloudstructs-go',
},
publishToMaven: {
mavenGroupId: 'io.github.jogold',
javaPackage: 'io.github.jogold.cloudstructs',
mavenArtifactId: 'cloudstructs',
mavenEndpoint: 'https://s01.oss.sonatype.org',
},
lambdaOptions: {
runtime: awscdk.LambdaRuntime.NODEJS_20_X,
},
});
// Update integ test snapshots after upgrade
project.upgradeWorkflow?.postUpgradeTask.spawn(project.tasks.tryFind('bundle'));
project.upgradeWorkflow?.postUpgradeTask.spawn(project.tasks.tryFind('integ:snapshot-all'));
// Add "exports"
const packageExports = {
'.': './lib/index.js',
'./package.json': './package.json',
'./.jsii': './.jsii',
};
for (const dirent of fs.readdirSync('./src', { withFileTypes: true })) {
if (dirent.isDirectory()) {
const construct = dirent.name;
// TODO: remove "lib" when TypeScript supports "exports"
packageExports[`./lib/${construct}`] = `./lib/${construct}/index.js`;
}
}
project.tryFindObjectFile('package.json').addOverride('exports', packageExports);
project.synth();