-
Notifications
You must be signed in to change notification settings - Fork 1
/
.projenrc.ts
112 lines (100 loc) · 3.45 KB
/
.projenrc.ts
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
101
102
103
104
105
106
107
108
109
110
111
112
import { awscdk, javascript, JsonPatch } from 'projen';
import { ArrowParens, TrailingComma } from 'projen/lib/javascript';
const project = new awscdk.AwsCdkConstructLibrary({
author: 'DataChefHQ',
authorAddress: '[email protected]',
cdkVersion: '2.133.0',
defaultReleaseBranch: 'main',
jsiiVersion: '~5.5.0',
typescriptVersion: '~5.5.0',
name: 'aws-data-landing-zone',
description: 'AWS CDK Data Landing Zone construct',
packageManager: javascript.NodePackageManager.NPM,
projenrcTs: true,
repositoryUrl: 'https://github.com/DataChefHQ/aws-data-landing-zone.git',
tsconfig: {
compilerOptions: {
sourceMap: true,
inlineSourceMap: true,
},
},
prettierOptions: {
settings: {
printWidth: 120,
useTabs: false,
tabWidth: 2,
semi: true,
singleQuote: true,
bracketSpacing: true,
trailingComma: TrailingComma.ES5,
arrowParens: ArrowParens.ALWAYS,
},
},
pullRequestTemplate: false,
githubOptions: {
pullRequestLintOptions: {
semanticTitleOptions: {
types: ['feat', 'fix', 'docs', 'ci', 'chore'],
},
},
},
workflowNodeVersion: '20',
publishToPypi: {
distName: 'aws-data-landing-zone',
module: 'aws_data_landing_zone',
},
/* Runtime dependencies of this module that are jsii-enabled. Must be defined in peerDeps as well */
deps: [
'cdk-express-pipeline',
],
peerDeps: [
'cdk-express-pipeline',
],
/* Runtime dependencies of this module that are NOT jsii-enabled. */
bundledDeps: [
'@aws-sdk/client-sts',
'@aws-sdk/credential-providers',
'@aws-sdk/client-cost-explorer',
'table',
'@aws-sdk/client-identitystore',
'@aws-sdk/client-sso-admin',
],
/* Build dependencies for this repo/module. */
devDeps: ['husky', '@types/aws-lambda', '@types/aws-sdk', '@types/node'],
/* The "name" in package.json. */
// packageName: undefined,
jestOptions: {
jestConfig: {
moduleFileExtensions: ['ts', 'tsx', 'js', 'mjs', 'cjs', 'jsx', 'json', 'node'], // https://jestjs.io/docs/configuration#modulefileextensions-arraystring
},
},
});
project.bundler.addBundle('./src/constructs/iam-identity-center/identity-store-user-lambda/', {
platform: 'node',
target: 'node20',
sourcemap: true,
externals: ['aws-sdk'],
});
project.eslint!.addRules({
'no-bitwise': 'off',
});
project.package.addEngine('node', '~20.*');
project.package.addEngine('npm', '~10.*');
// Need to clear before compiling and packaging. Have to remove these because they are not cleared for some reason,
// only new files are added and it causes issues especially because when changing the folder structure the whole time.
const clear = project.addTask('clear-lib-and-dist');
clear.exec('rm -rf lib/ dist/');
// Only run husky if not in CI, in the post install script
project.package.setScript('prepare', 'if [ "$CI" = "true" ]; then echo "CI detected, not running husky"; else husky; fi');
project.gitignore.addPatterns('.dlz-reports');
project.gitignore.addPatterns('.idea');
project.gitignore.addPatterns('*.js');
project.gitignore.addPatterns('*.js.map');
project.gitignore.addPatterns('*.d.ts');
project.gitignore.addPatterns('*.DS_Store');
project.gitignore.addPatterns('.vscode/');
project.tasks.tryFind('docgen')?.exec('bash post-docgen.sh');
const ghReleaseWorkflow = project.tryFindObjectFile('.github/workflows/release.yml');
ghReleaseWorkflow?.patch(JsonPatch.add('/on/push/paths-ignore', ['docs/**']));
project.synth();