forked from chanzuckerberg/fogg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add example envtio component (#348)
PoC for demo purposes
- Loading branch information
1 parent
e55619b
commit c1c155c
Showing
68 changed files
with
2,706 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"env": { | ||
"node": true | ||
}, | ||
"root": true, | ||
"plugins": ["@typescript-eslint", "import"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "commonjs", | ||
"project": "./tsconfig.dev.json" | ||
}, | ||
"extends": ["plugin:import/typescript", "plugin:prettier/recommended"], | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"] | ||
}, | ||
"import/resolver": { | ||
"node": {}, | ||
"typescript": { | ||
"project": "./tsconfig.dev.json", | ||
"alwaysTryTypes": true | ||
} | ||
} | ||
}, | ||
"ignorePatterns": ["*.js", "*.d.ts", "node_modules/", "*.generated.ts"], | ||
"rules": { | ||
"@typescript-eslint/no-require-imports": ["error"], | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": ["**/test/**"], | ||
"optionalDependencies": false, | ||
"peerDependencies": true | ||
} | ||
], | ||
"import/no-unresolved": ["error"], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"groups": ["builtin", "external"], | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"no-duplicate-imports": ["error"], | ||
"no-shadow": ["off"], | ||
"@typescript-eslint/no-shadow": ["error"], | ||
"key-spacing": ["error"], | ||
"no-multiple-empty-lines": ["error"], | ||
"@typescript-eslint/no-floating-promises": ["error"], | ||
"no-return-await": ["off"], | ||
"@typescript-eslint/return-await": ["error"], | ||
"no-trailing-spaces": ["error"], | ||
"dot-notation": ["error"], | ||
"no-bitwise": ["error"], | ||
"@typescript-eslint/member-ordering": [ | ||
"error", | ||
{ | ||
"default": [ | ||
"public-static-field", | ||
"public-static-method", | ||
"protected-static-field", | ||
"protected-static-method", | ||
"private-static-field", | ||
"private-static-method", | ||
"field", | ||
"constructor", | ||
"method" | ||
] | ||
} | ||
], | ||
"eol-last": ["error", "always"], | ||
"space-in-parens": ["error", "never"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.eslintrc.json linguist-generated | ||
/.prettierrc.json linguist-generated | ||
/.gitattributes linguist-generated | ||
/.fogg-component.yaml linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
*.d.ts | ||
*.js | ||
node_modules | ||
cdktf.out | ||
cdktf.log | ||
*terraform.*.tfstate* | ||
.gen | ||
.terraform | ||
.terraform.lock.hcl | ||
tsconfig.tsbuildinfo | ||
!jest.config.js | ||
!setup.js | ||
|
||
// build outputs | ||
cdk.tf.json | ||
assets | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"overrides": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{ template "fogg_header" }} | ||
lint: | ||
pnpm run eslint | ||
.PHONY: lint | ||
|
||
fmt: | ||
pnpm run prettier | ||
.PHONY: fmt | ||
|
||
check-plan: cdk.tf.json | ||
terraform init | ||
terraform plan | ||
.PHONY: check-plan | ||
|
||
docs: | ||
.PHONY: docs | ||
|
||
clean: | ||
rm -rf cdk.tf.json | ||
rm -rf assets | ||
rm -rf node_modules | ||
.PHONY: clean | ||
|
||
cdk.tf.json: | ||
pnpm i | ||
pnpm turbo synth | ||
.PHONY: cdk.tf.json | ||
|
||
check-updates: | ||
pnpx npm-check-updates@latest --target=minor | ||
@echo "WARNING: update fogg.yml for target package versions" | ||
.PHONY: check-updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Envtio Component | ||
|
||
```console | ||
make check-plan | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "{{ list .Env .Name | join "-" }}", | ||
"author": "{{ .Owner }}", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"eslint": "eslint . --ext .ts", | ||
"prettier": "prettier --write .", | ||
"synth": "npx ts-node --swc -P ./tsconfig.dev.json src/index.ts" | ||
}, | ||
"dependencies": {{ .CdktfDependencies | toPrettyJson | indent 2 }}, | ||
"devDependencies": {{ .CdktfDevDependencies | toPrettyJson | indent 2 }}, | ||
"//" : "Auto-generated by fogg. Do not edit" | ||
} |
Oops, something went wrong.