Skip to content

Commit

Permalink
Merge pull request #21 from kirnberger1980/master
Browse files Browse the repository at this point in the history
Major Refactoring for Code Base
  • Loading branch information
daknhh authored Feb 28, 2022
2 parents d578b48 + 54aa2f6 commit c52d9a3
Show file tree
Hide file tree
Showing 17 changed files with 1,396 additions and 1,230 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
cdk.out
45 changes: 45 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"semi": [2, "always"],
"eqeqeq": 2,
"indent": [2, 2, {"SwitchCase": 1}],
"quotes": ["error", "double"],
"linebreak-style": "off",
"array-bracket-newline": "off",
"array-bracket-spacing": ["error", "never"],
"no-trailing-spaces": "off",
"padded-blocks": "off",
"arrow-body-style": "off",
"init-declarations": "off",
"comma-dangle": "off",
"keyword-spacing": [0, {"before": true, "after": true, "overrides": null}],
"prefer-template": "off",
"id-blacklist": "off",
"no-console": "off",
"no-sync": "off",
"complexity": "off",
"max-statements": "off",
"array-element-newline": "off",
"object-curly-spacing": "off",
"template-curly-spacing": "off",
"camelcase": "off",
"no-use-before-define": "off",
"id-length": "off",
"id-match": "off",
"max-len": "off",
"no-magic-numbers": "off",
"no-underscore-dangle": "off",
"no-process-env": "off",
"func-style": ["error", "declaration", { "allowArrowFunctions": true }]
}
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.js
!jest.config.js
*.d.ts
node_modules

# CDK asset staging directory
.cdk.staging
cdk.out
cdk.context.json
package-lock.json
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.ts
!*.d.ts

# CDK asset staging directory
.cdk.staging
cdk.out
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## Released

## 2.1.0

### Added

- Added Linting with typescript-eslint
- Added .gitignore and .npmignore file
- Added 2 functions for building service data (managed & custom rules) to remove redundant code

### Changed

- Refactoring bin file: outsource capacity checks & other functions to helpers.ts
- Transform capacity.json to Typescript Type Rule
- Start refactoring lib file: get rid of redundant code and use JS shortcuts
- Extend types of the Config interface
- Restructuring runtime properties: introduce separate layer for PreProcess and PostProcess
- New types for Firewall Manager API and CDK mapping
## 2.0.0

### Added
Expand Down
7 changes: 6 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,9 @@ tasks:
silent: true
preconditions:
- sh: if [[ {{.WAF_TEST}} = true ]] ; then exit 0; else exit 1; fi
msg: ⏭ Skipping WAF Testing 🧪
msg: ⏭ Skipping WAF Testing 🧪
validateconfig:
desc: Validation of the current config
cmds:
- ts-node test/config-loader.ts
silent: true
416 changes: 60 additions & 356 deletions bin/plattform-wafv2-cdk-automation.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cdk.out/cdk.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"14.0.0"}
{"version":"16.0.0"}
Loading

0 comments on commit c52d9a3

Please sign in to comment.