-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add new serverless-framework-sqs-dynamodb kit #709
base: main
Are you sure you want to change the base?
Changes from all commits
567ff6a
f0fed2e
fd662b2
916f815
0f2bd12
734e6bf
92fea91
b94767c
873a7e6
154e8b1
53bfa47
c5cec69
0ff732d
055cb96
2858ec5
c204411
a071b26
74c90c8
0fc18c6
7c32890
e1b9c89
9dac4e5
6f617ab
047280f
7a20a73
ebbe95c
2905aca
1c00f24
f0726d9
b634c66
17423d1
2c59c35
b2eb850
f45bf79
368e1fd
e45ff75
398eac5
08ed410
ce12f61
ad0f533
0f1c5ae
8536b17
8e2467c
97bddbc
ee9398d
2a6151a
2efcd59
2c7ec1e
858ca82
7144919
cfee852
f507499
3d3d021
8a090f5
f6f373d
f6ea679
c54d859
b33cd7b
5012a6a
c960a81
d3c47ba
fea8909
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Props } from './types'; | ||
|
||
export function DynamoDBIcon({ className }: Props) { | ||
return ( | ||
<svg | ||
width="55" | ||
height="63" | ||
viewBox="0 0 256 289" | ||
xmlns="http://www.w3.org/2000/svg" | ||
preserveAspectRatio="xMidYMid" | ||
className={className} | ||
> | ||
<path | ||
d="M165.258 288.501h3.508l57.261-28.634.953-1.347V29.964l-.953-1.354L168.766 0h-3.551l.043 288.501" | ||
fill="#5294CF" | ||
/> | ||
<path | ||
d="M90.741 288.501h-3.557l-57.212-28.634-1.161-1.997-.589-226.742 1.75-2.518L87.184 0h3.601l-.044 288.501" | ||
fill="#1F5B98" | ||
/> | ||
<path d="M87.285 0h81.426v288.501H87.285V0z" fill="#2D72B8" /> | ||
<path | ||
d="M256 137.769l-1.935-.429-27.628-2.576-.41.204-57.312-2.292h-81.43l-57.313 2.292V91.264l-.06.032.06-.128 57.313-13.28h81.43l57.312 13.28 21.069 11.199v-7.2l8.904-.974-.922-1.798-28.192-20.159-.859.279-57.312-17.759h-81.43L29.972 72.515V28.61L0 63.723v30.666l.232-.168 8.672.946v7.348L0 107.28v30.513l.232-.024 8.672.128v12.807l-7.482.112L0 150.68v30.525l8.904 4.788v7.433l-8.531.942-.373-.28v30.661l29.972 35.118v-43.901l57.313 17.759h81.43l57.481-17.811.764.335 27.821-19.862 1.219-1.979-8.904-.982v-7.284l-1.167-.466-19.043 10.265-.69 1.44-57.481 13.203v.016h-81.43v-.016l-57.313-13.259v-43.864l57.313 2.284v.056h81.43l57.312-2.34 1.305.6 26.779-2.306 1.889-.923-8.904-.128v-12.807l8.904-.128" | ||
fill="#1A476F" | ||
/> | ||
<path | ||
d="M226.027 215.966v43.901L256 224.749v-30.461l-29.8 21.626-.173.052M226.027 197.421l.173-.04 29.8-16.028v-30.649l-29.973 2.757v43.96M226.2 91.208l-.173-.04v43.8L256 137.769v-30.634l-29.8-15.927M226.2 72.687L256 94.193V63.731L226.027 28.61v43.905l.173.06v.112" | ||
fill="#2D72B8" | ||
/> | ||
</svg> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { Props } from './types'; | ||
|
||
export function SQSIcon({ className }: Props) { | ||
return ( | ||
<svg | ||
width="51" | ||
height="63" | ||
viewBox="0 0 256 309" | ||
xmlns="http://www.w3.org/2000/svg" | ||
preserveAspectRatio="xMidYMid" | ||
className={className} | ||
> | ||
<path | ||
d="M255.991 100.211l-4.112-.069-123.792-36.65-.074-1.696V0L256 64.006l-.009 36.205" | ||
fill="#D9A741" | ||
/> | ||
<path | ||
d="M128 65.5l.013-65.5L.017 63.981 0 244.996l.064.032v.002l127.923 63.973.425-.591-.165-60.871-.251-.339L120 241.5 21 212l.5-114.5 106.5-32" | ||
fill="#876929" | ||
/> | ||
<path | ||
d="M147.141 195.298l-130.79 18.399.009-118.417 130.79 18.424-.009 81.594" | ||
fill="#D9A741" | ||
/> | ||
<path | ||
d="M80.864 187.813l47.132 6 .008-78.658-47.131 5.995-.009 66.663M33.385 181.771l30.587 3.888.009-62.363-30.596 3.897v54.578" | ||
fill="#876929" | ||
/> | ||
<path | ||
d="M16.36 95.28l111.653-33.484 127.978 38.415-108.76 13.502L16.36 95.28" | ||
fill="#624A1E" | ||
/> | ||
<path | ||
d="M255.927 177.376l-127.931 16.145.008-78.366 127.923 16.296v45.925M255.918 208.834l-2.753.119-124.776 37.77-.393.479-.009 61.801 127.931-63.951v-36.218" | ||
fill="#D9A741" | ||
/> | ||
<path | ||
d="M16.351 213.697l111.645 33.505 127.922-38.368-108.777-13.536-130.79 18.399" | ||
fill="#FAD791" | ||
/> | ||
</svg> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Props } from './types'; | ||
|
||
export function ServerlessFrameworkIcon({ className }: Props) { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="64" | ||
height="64" | ||
className={className} | ||
> | ||
<path | ||
d="M0 46.85h11.328l-3.5 10.6H0zM0 26.7h18l-3.5 10.6H0zM0 6.55h24.673l-3.5 10.6H0zm35.838 0H64v10.6H32.328zM25.656 37.3l3.5-10.6H64v10.6zm-3.163 9.552H64v10.6H18.983z" | ||
fill="#fd5750" | ||
fillRule="evenodd" | ||
/> | ||
</svg> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = tab | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.yml] | ||
indent_style = space |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# indicate to serverless if you're offline mode or not | ||
IS_OFFLINE=true | ||
# connection info for Redis used for caching | ||
REDIS_CACHE_URL=redis://:sOmE_sEcUrE_pAsS@localhost:6379 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just wondering, since we have SQS and other docker containers running, don't we need env variables for those as well? I'm not that acquainted with serverless-framework on how that's done. Is it automatically connecting to the default ports? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note to self: document in readme that this is only for jest, not for run time. |
||
# how long should items last in the cache by default | ||
DEFAULT_CACHE_TIME=300000 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage | ||
node_modules | ||
.esbuild | ||
.dynamodb | ||
.redis | ||
.serverless | ||
swagger | ||
|
||
# yaml | ||
*.yaml | ||
*.yml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
module.exports = { | ||
env: { | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
overrides: [ | ||
{ | ||
files: ['**/*.test.ts', 'jest.setupEnvironment.js'], | ||
env: { | ||
jest: true, | ||
}, | ||
rules: { | ||
'no-unused-expressions': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint', 'import', 'promise'], | ||
rules: { | ||
'array-callback-return': 'error', | ||
'block-scoped-var': 'error', | ||
'camelcase': ['error', { properties: 'never' }], | ||
'consistent-return': 'error', | ||
'curly': ['error', 'multi-line'], | ||
'dot-notation': 'error', | ||
'eqeqeq': ['error', 'allow-null'], | ||
'guard-for-in': 'error', | ||
'indent': ['error', 'tab'], | ||
'linebreak-style': ['error', 'unix'], | ||
'new-cap': 'error', | ||
'no-array-constructor': 'error', | ||
'no-caller': 'error', | ||
'no-confusing-arrow': ['error', { allowParens: false }], | ||
'no-duplicate-imports': 'error', | ||
'no-else-return': 'error', | ||
'no-eval': 'error', | ||
'no-extra-bind': 'error', | ||
'no-extra-label': 'error', | ||
'no-implied-eval': 'error', | ||
'no-iterator': 'error', | ||
'no-label-var': 'error', | ||
'no-lone-blocks': 'error', | ||
'no-lonely-if': 'error', | ||
'no-loop-func': 'error', | ||
'no-multi-str': 'error', | ||
'no-nested-ternary': 'error', | ||
'no-new': 'error', | ||
'no-new-func': 'error', | ||
'no-new-object': 'error', | ||
'no-new-wrappers': 'error', | ||
'no-octal-escape': 'error', | ||
'no-proto': 'error', | ||
'no-restricted-syntax': ['error', 'ForInStatement', 'WithStatement'], | ||
'no-return-assign': 'error', | ||
'no-script-url': 'error', | ||
'no-self-compare': 'error', | ||
'no-sequences': 'error', | ||
'no-shadow': 'error', | ||
'no-throw-literal': 'error', | ||
'no-undef-init': 'error', | ||
'no-unneeded-ternary': ['error'], | ||
'no-unused-expressions': ['error'], | ||
'no-unused-vars': ['error', { vars: 'local', args: 'after-used' }], | ||
'no-useless-computed-key': 'error', | ||
'no-useless-concat': 'error', | ||
'no-useless-constructor': 'error', | ||
'no-useless-rename': [ | ||
'error', | ||
{ ignoreDestructuring: false, ignoreImport: false, ignoreExport: false }, | ||
], | ||
'no-var': 'error', | ||
'no-void': 'error', | ||
'object-shorthand': ['error', 'always', { ignoreConstructors: false, avoidQuotes: true }], | ||
'one-var': ['error', 'never'], | ||
'operator-assignment': ['error', 'always'], | ||
'prefer-arrow-callback': ['error', { allowNamedFunctions: false, allowUnboundThis: true }], | ||
'prefer-const': ['error', { destructuring: 'any', ignoreReadBeforeAssign: true }], | ||
'prefer-rest-params': 'error', | ||
'prefer-spread': 'error', | ||
'prefer-template': 'error', | ||
'quotes': ['error', 'single', { avoidEscape: true }], | ||
'radix': 'error', | ||
'require-atomic-updates': 'off', // Reports false positives: https://github.com/eslint/eslint/issues/11899 | ||
'semi': ['error', 'always'], | ||
'spaced-comment': ['error', 'always'], | ||
'strict': ['error', 'safe'], | ||
'vars-on-top': 'error', | ||
'yoda': 'error', | ||
|
||
// import plugin settings | ||
'import/export': 'error', | ||
'import/first': ['error', 'absolute-first'], | ||
'import/newline-after-import': 'error', | ||
'import/no-duplicates': 'error', | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: [ | ||
'**/*.test.ts', | ||
'prettier.config.js', | ||
'jest.config.ts', | ||
'jest.setup.ts', | ||
'esbuild-plugins.ts', | ||
], | ||
}, | ||
], | ||
'import/no-mutable-exports': 'error', | ||
'import/no-named-as-default': 'error', | ||
'import/no-named-as-default-member': 'error', | ||
'import/no-unresolved': ['error', { commonjs: false }], | ||
|
||
// typescript settings | ||
'@typescript-eslint/no-empty-function': 'off', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
typescript: {}, | ||
}, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
coverage | ||
node_modules | ||
jspm_packages | ||
|
||
.dynamodb | ||
.esbuild | ||
.env | ||
.redis | ||
.serverless | ||
swagger |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lts/gallium |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage | ||
node_modules | ||
.esbuild | ||
.dynamodb | ||
.redis | ||
.serverless | ||
swagger | ||
|
||
# yaml | ||
*.yaml | ||
*.yml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"printWidth": 100, | ||
"quoteProps": "consistent", | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"useTabs": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch