Skip to content

Commit 74ff66e

Browse files
committed
core refactor complete
1 parent ec36181 commit 74ff66e

File tree

116 files changed

+13554
-10920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+13554
-10920
lines changed

.vscode/launch.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach by Process ID",
6+
"processId": "${command:PickProcess}",
7+
"request": "attach",
8+
"skipFiles": [
9+
"<node_internals>/**"
10+
],
11+
"type": "pwa-node"
12+
},
13+
{
14+
"type": "aws-sam",
15+
"request": "direct-invoke",
16+
"name": "updateGithubAuth",
17+
"aws": {
18+
"credentials": "profile:ts"
19+
},
20+
"invokeTarget": {
21+
"target": "code",
22+
"projectRoot": "lib/lambda",
23+
"lambdaHandler": "src/auth-z-service/updateGithubAuth.handler"
24+
},
25+
"lambda": {
26+
"runtime": "nodejs12.x",
27+
"payload": {
28+
"json": {
29+
"headers": {
30+
"authorization": "Bearer eyJraWQiOiJ3bXAzUXdLaGNqR1RDUHpvQVUrWUNhb0dkazFwMWtaZEhpU1Z6RXN3NUVJPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIxNGMwMGNmOS1hMDIwLTQ2NWEtYTI5Yy0zOWQ0MGYwNGJkYjkiLCJldmVudF9pZCI6IjcwNTQ4YzRmLTgxZTgtNDI4YS05OGViLTk1MjFiNmZhNmNmNCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MTU0MTgzMjYsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy1lYXN0LTEuYW1hem9uYXdzLmNvbVwvdXMtZWFzdC0xX2lCclhxYU9FdiIsImV4cCI6MTYxNTg2NzUwMywiaWF0IjoxNjE1ODYzOTAzLCJqdGkiOiI4NWQwNjRlMS1jNTRmLTQ3OGUtYTRhOS1kNGUxNTliOTczMGMiLCJjbGllbnRfaWQiOiJnZmI1YWJiOGkxaHVzdGdmN3ZwcmVucHIzIiwidXNlcm5hbWUiOiIxNGMwMGNmOS1hMDIwLTQ2NWEtYTI5Yy0zOWQ0MGYwNGJkYjkifQ.jg2kYzNtSpP2qMyiLfP-PXAv97dIZij825MIRqS7oEpMTDkzVaQKUUdlmip_aN6xpeaZlyUN7zmnN710C36BmFEQ4QudRenCjMkOKjFld-iPPRDuk9hn4VG1MJy0i6NPADNJ8rx7uIaqWpRUHwOTYgw6T2MetVcz3DoMzvkmOQpak-UhPkPlrE4HRjzRBQuenBgLHYcs1DFzacTPt4cERSiQ7d7IcO_gduPGxhg3DIbp_yyr2B1piyYnIASMxH_TOBSt1JS0XuXMEutkFTu0Qu-aV0iT1l6QP0O0Y5x_4LwJ06IG7g9iXdWkpJy9Ztmi0hp6hOzFQiUMTSqwwXn8ew"
31+
},
32+
"body": "{}"
33+
}
34+
},
35+
"environmentVariables": {
36+
"USER_TABLE_NAME": "user-auth"
37+
}
38+
}
39+
},
40+
{
41+
"type": "aws-sam",
42+
"request": "direct-invoke",
43+
"name": "getGithubAuth",
44+
"aws": {
45+
"credentials": "profile:ts"
46+
},
47+
"invokeTarget": {
48+
"target": "code",
49+
"projectRoot": "lib/lambda",
50+
"lambdaHandler": "src/auth-z-service/getGithubAuth.handler"
51+
},
52+
"lambda": {
53+
"runtime": "nodejs12.x",
54+
"payload": {
55+
"json": {
56+
"headers": {
57+
"authorization": "Bearer eyJraWQiOiJ3bXAzUXdLaGNqR1RDUHpvQVUrWUNhb0dkazFwMWtaZEhpU1Z6RXN3NUVJPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIxNGMwMGNmOS1hMDIwLTQ2NWEtYTI5Yy0zOWQ0MGYwNGJkYjkiLCJldmVudF9pZCI6IjcwNTQ4YzRmLTgxZTgtNDI4YS05OGViLTk1MjFiNmZhNmNmNCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE2MTU0MTgzMjYsImlzcyI6Imh0dHBzOlwvXC9jb2duaXRvLWlkcC51cy1lYXN0LTEuYW1hem9uYXdzLmNvbVwvdXMtZWFzdC0xX2lCclhxYU9FdiIsImV4cCI6MTYxNTg2NzUwMywiaWF0IjoxNjE1ODYzOTAzLCJqdGkiOiI4NWQwNjRlMS1jNTRmLTQ3OGUtYTRhOS1kNGUxNTliOTczMGMiLCJjbGllbnRfaWQiOiJnZmI1YWJiOGkxaHVzdGdmN3ZwcmVucHIzIiwidXNlcm5hbWUiOiIxNGMwMGNmOS1hMDIwLTQ2NWEtYTI5Yy0zOWQ0MGYwNGJkYjkifQ.jg2kYzNtSpP2qMyiLfP-PXAv97dIZij825MIRqS7oEpMTDkzVaQKUUdlmip_aN6xpeaZlyUN7zmnN710C36BmFEQ4QudRenCjMkOKjFld-iPPRDuk9hn4VG1MJy0i6NPADNJ8rx7uIaqWpRUHwOTYgw6T2MetVcz3DoMzvkmOQpak-UhPkPlrE4HRjzRBQuenBgLHYcs1DFzacTPt4cERSiQ7d7IcO_gduPGxhg3DIbp_yyr2B1piyYnIASMxH_TOBSt1JS0XuXMEutkFTu0Qu-aV0iT1l6QP0O0Y5x_4LwJ06IG7g9iXdWkpJy9Ztmi0hp6hOzFQiUMTSqwwXn8ew"
58+
}
59+
}
60+
},
61+
"environmentVariables": {
62+
"USER_TABLE_NAME": "user-auth"
63+
}
64+
}
65+
},
66+
{
67+
"command": "cd lib/cdk-service/docker; npm i; npm run build; AWS_PROFILE=ts STAGE=dev STACKS_TABLE=stacks USER_TABLE=user-auth node build/server.js",
68+
"name": "Build and launch cdk builder",
69+
"request": "launch",
70+
"type": "node-terminal"
71+
}
72+
]
73+
}

basicexample.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
Console:
2+
name: console
3+
providers:
4+
AwsLocalProvider:
5+
id: AwsLocalProvider
6+
type: AwsCredentialsProvider
7+
credentials:
8+
profileName: ts-dev
9+
pages:
10+
MainPage:
11+
id: MainPage
12+
route: main
13+
widgets:
14+
- $ref: '#/Console/widgets/SmallMarkdown'
15+
- $ref: '#/Console/widgets/BasicMarkdown'
16+
widgets:
17+
SmallMarkdown:
18+
id: SmallMarkdown
19+
type: Markdown
20+
displayName: A smaller markdown window
21+
text: Well well well what we've got here is some downright straightforward markdown
22+
markdown: >
23+
### Just a little link tree
24+
25+
1. [Introduction](https://github.com/tinystacks/precloud/blob/main/README.md#introduction)
26+
1. [Use cases](https://github.com/tinystacks/precloud/blob/main/README.md#use-cases)
27+
28+
BasicMarkdown:
29+
id: BasicMarkdown
30+
type: Markdown
31+
displayName: Some Basic Markdown
32+
text: Well well well what we've got here is some downright straightforward markdown
33+
markdown: >
34+
# precloud - Dynamic tests for infrastructure-as-code
35+
36+
1. [Introduction](https://github.com/tinystacks/precloud/blob/main/README.md#introduction)
37+
1. [Use cases](https://github.com/tinystacks/precloud/blob/main/README.md#use-cases)
38+
1. [How it works](https://github.com/tinystacks/precloud/blob/main/README.md#how-it-works)
39+
1. [Contributing](https://github.com/tinystacks/precloud/blob/main/README.md#contributing)
40+
1. [Installation](https://github.com/tinystacks/precloud/blob/main/README.md#installation)
41+
1. [Install from the Global NPM registry](https://github.com/tinystacks/precloud/blob/main/README.md#install-from-the-global-npm-registry)
42+
1. [Try it out](https://github.com/tinystacks/precloud/blob/main/README.md#try-it-out)
43+
1. [Local Installation](https://github.com/tinystacks/precloud/blob/main/README.md#local-installation)
44+
1. [Usage](https://github.com/tinystacks/precloud/blob/main/README.md#usage)
45+
1. [precloud](https://github.com/tinystacks/precloud/blob/main/README.md#precloud)
46+
1. [precloud --version](https://github.com/tinystacks/precloud/blob/main/README.md#precloud---version)
47+
1. [precloud --help](https://github.com/tinystacks/precloud/blob/main/README.md#precloud---help)
48+
1. [Available Commands](https://github.com/tinystacks/precloud/blob/main/README.md#Available-Commands)
49+
1. [precloud help](https://github.com/tinystacks/precloud/blob/main/README.md#precloud-help)
50+
1. [precloud check](https://github.com/tinystacks/precloud/blob/main/README.md#precloud-check)
51+
1. [Options](https://github.com/tinystacks/precloud/blob/main/README.md#Options)
52+
1. [Config File](https://github.com/tinystacks/precloud/blob/main/README.md#Config-File)
53+
1. [Example Config File](https://github.com/tinystacks/precloud/blob/main/README.md#Example-Config-File)
54+
1. [Check Behaviour](https://github.com/tinystacks/precloud/blob/main/README.md#Check-Behaviour)
55+
1. [Authentication](https://github.com/tinystacks/precloud/blob/main/README.md#Authentication)
56+
1. [AWS](https://github.com/tinystacks/precloud/blob/main/README.md#AWS)
57+
1. [GCP](https://github.com/tinystacks/precloud/blob/main/README.md#GCP)
58+
1. [Microsoft Azure](https://github.com/tinystacks/precloud/blob/main/README.md#Microsoft-Azure)
59+
1. [Community](https://github.com/tinystacks/precloud/blob/main/README.md#community)
60+
61+
## Introduction
62+
63+
<img src="https://github.com/tinystacks/precloud/blob/main/example.gif"
64+
alt="example-gif"
65+
style="float: left; margin-right: 10px;" />
66+
67+
Infrastructure code deployments often fail due to mismatched constraints over resource fields between the infrastructure code, the deployment engine, and the target cloud. For example, you may be able to pass any arbitrary string as a resource name to terraform or AWS CDK, and `plan` or `synth` go through fine, but the deployment may fail because that string failed a naming constraint on the target cloud.
68+
69+
This package is an open source command line interface that is run before deploying to the cloud. It contains rules that check for names, quotas, and resource-specific constraints to make sure that your infrastructure code can be deployed successfully.
70+
71+
#### Example Config File
72+
73+
```json
74+
75+
{
76+
"awsCdkParsers": [
77+
"@tinystacks/aws-cdk-parser"
78+
],
79+
"terraformParsers": [
80+
"@tinystacks/terraform-resource-parser",
81+
"@tinystacks/terraform-module-parser"
82+
],
83+
"templateChecks": [
84+
"@tinystacks/aws-template-checks"
85+
],
86+
"resourceChecks": [
87+
"@tinystacks/aws-resource-checks"
88+
]
89+
}
90+
91+
```
92+
dependencies:
93+
Markdown: '@tinystacks/ops-core-widgets'
94+
AwsCredentialsProvider: '@tinystacks/ops-aws-core-plugins'

local-deps/aws-credentials-provider/.eslintrc

Lines changed: 0 additions & 89 deletions
This file was deleted.

local-deps/aws-credentials-provider/.eslintrc.test.json

Lines changed: 0 additions & 91 deletions
This file was deleted.

local-deps/aws-credentials-provider/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

local-deps/aws-credentials-provider/dist/credential-providers/aws-assumed-role.d.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)