Skip to content

Commit

Permalink
Merge branch 'master' into feat/null-connections
Browse files Browse the repository at this point in the history
  • Loading branch information
SwaySway committed Jan 21, 2021
2 parents 3352eea + e28035a commit df8108f
Show file tree
Hide file tree
Showing 896 changed files with 64,068 additions and 8,493 deletions.
466 changes: 342 additions & 124 deletions .circleci/config.base.yml

Large diffs are not rendered by default.

2,329 changes: 1,820 additions & 509 deletions .circleci/config.yml

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions .circleci/enable_api.exp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ expect "Provide a path (e.g., /items)"
send -- "\r"
expect "Choose a Lambda source"
send -- "\r"
expect "Provide a friendly name for your resource to be used as a label for this category in the project:"
send -- "\r"
expect "Provide the AWS Lambda function name:"
expect "Provide an AWS Lambda function name:"
send -- "\r"
expect "Choose the function runtime that you want to use:"
send -- "\r"
Expand All @@ -36,11 +34,7 @@ expect "Do you want to add global secondary indexes to your table?"
send -- "n\r"
expect "Do you want to add a Lambda Trigger for your Table?"
send -- "n\r"
expect "Do you want to access other resources created in this project from your Lambda function?"
send -- "n\r"
expect "Do you want to invoke this function on a recurring schedule?"
send -- "n\r"
expect "Do you want to configure Lambda layers for this function?"
expect "Do you want to configure advanced settings?"
send -- "n\r"
expect "Do you want to edit the local lambda function now?"
send -- "n\r"
Expand Down
20 changes: 19 additions & 1 deletion .circleci/local_publish_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,37 @@ function loginToLocalRegistry {
}

function unsetNpmRegistryUrl {
# Restore the original NPM and Yarn registry URLs and stop Verdaccio
# Restore the original NPM and Yarn registry URLs
npm set registry "https://registry.npmjs.org/"
yarn config set registry "https://registry.npmjs.org/"
}

function unsetSudoNpmRegistryUrl {
# Restore the original NPM and Yarn registry URLs
sudo npm set registry "https://registry.npmjs.org/"
sudo yarn config set registry "https://registry.npmjs.org/"
}

function changeNpmGlobalPath {
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
}

function changeSudoNpmGlobalPath {
mkdir -p ~/.npm-global-sudo
npm config set prefix '~/.npm-global-sudo'
export PATH=~/.npm-global/bin:$PATH
}

function setNpmRegistryUrlToLocal {
# Set registry to local registry
npm set registry "$custom_registry_url"
yarn config set registry "$custom_registry_url"
}

function setSudoNpmRegistryUrlToLocal {
# Set registry to local registry
sudo npm set registry "$custom_registry_url"
sudo yarn config set registry "$custom_registry_url"
}
153 changes: 104 additions & 49 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,28 @@ module.exports = {
'airbnb',
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/eslint-recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/eslint-recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
],
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
env: {
es6: true,
node: true,
jest: true,
},
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Allows for the parsing of JSX
jsx: true, // Allows for the parsing of JSX
arrowFunctions: true,
modules: true,
module: true,
},
},
plugins: [
'@typescript-eslint',
'prettier',
'spellcheck',
],
plugins: ['@typescript-eslint', 'prettier', 'spellcheck'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
Expand All @@ -38,34 +34,27 @@ module.exports = {
typescript: {},
},
react: {
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
rules: {
"spellcheck/spell-checker": [1,
'spellcheck/spell-checker': [
1,
{
"comments": false,
"strings": true,
"identifiers": false,
"lang": "en_US",
"skipWords": [
"dict",
"aff",
"hunspellchecker",
"hunspell",
"utils",
"aws",
"sdk",
],
"skipIfMatch": [
"http://[^s]*",
"^[-\\w]+\/[-\\w\\.]+$" //For MIME Types
comments: false,
strings: true,
identifiers: false,
lang: 'en_US',
skipWords: ['dict', 'aff', 'hunspellchecker', 'hunspell', 'utils', 'aws', 'sdk'],
skipIfMatch: [
'http://[^s]*',
'^[-\\w]+/[-\\w\\.]+$', //For MIME Types
],
"skipWordIfMatch": [
"^foobar.*$" // words that begin with foobar will not be checked
skipWordIfMatch: [
'^foobar.*$', // words that begin with foobar will not be checked
],
"minLength": 3
}
minLength: 3,
},
],
// Existing rules
'comma-dangle': 'off', // https://eslint.org/docs/rules/comma-dangle
Expand All @@ -83,7 +72,7 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',

// TODO Rules to enable linter pass for upgrade, fix them first
'eqeqeq': 'off',
eqeqeq: 'off',
'func-names': 'off',
'lines-between-class-members': 'off',
'max-classes-per-file': 'off',
Expand Down Expand Up @@ -112,7 +101,7 @@ module.exports = {
'prettier/prettier': 'off',

// TODO needs to be enabled when fixing valid warnings of this error
'no-constant-condition': ['error', { 'checkLoops': false }],
'no-constant-condition': ['error', { checkLoops: false }],
//'no-param-reassign': ['error', { 'props': false }],
'no-param-reassign': 'off', // https://eslint.org/docs/rules/no-param-reassign
//'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }], // https://eslint.org/docs/rules/no-plusplus
Expand All @@ -139,9 +128,9 @@ module.exports = {

// TSLint existing rules
'@typescript-eslint/class-name-casing': 'error',
'curly': 'off', // Enable later
curly: 'off', // Enable later
'guard-for-in': 'error',
'indent': 'off', // Enable later
indent: 'off', // Enable later
//'indent': ['error', 2],
'no-labels': 'error',
'no-caller': 'error',
Expand All @@ -153,7 +142,7 @@ module.exports = {
'dot-notation': 'off', // Enable later
'no-trailing-spaces': 'error',
'no-unused-expressions': 'error',
'semi': 'off', // Enable later,
semi: 'off', // Enable later,
'@typescript-eslint/typedef': 'off', // Enable later
//'@typescript-eslint/typedef': ['error', { propertyDeclaration:true, variableDeclaration: true, memberVariableDeclaration: true }],

Expand All @@ -167,12 +156,12 @@ module.exports = {
'no-template-curly-in-string': 'off', // Review one-by-one
'import/first': 'off',
'no-case-declarations': 'off',
'yoda': 'off',
yoda: 'off',
'no-undef-init': 'off',
'vars-on-top': 'off',
'no-var': 'off',
'lines-around-directive': 'off',
'strict': 'off',
strict: 'off',
'import/export': 'off',
'default-case': 'off',
'no-return-assign': 'off',
Expand Down Expand Up @@ -215,7 +204,66 @@ module.exports = {
'operator-assignment': 'off',
'import/no-named-default': 'off',
},
'ignorePatterns': [
overrides: [
{
files: ['packages/amplify-graphql-transformer-*/**/*.ts', 'packages/amplify-graphql-model-transformer/**/*.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/no-namespace': 'error',
'no-template-curly-in-string': 'error', // Review one-by-one
'import/first': 'error',
yoda: 'error',
'no-undef-init': 'error',
'vars-on-top': 'error',
'no-var': 'error',
'lines-around-directive': 'error',
strict: 'error',
'import/export': 'error',
'default-case': 'error',
'no-return-assign': 'error',
'import/no-duplicates': 'error',
'@typescript-eslint/interface-name-prefix': 'error',
'no-throw-literal': 'error',
'react/static-property-placement': 'error',
'import/no-extraneous-dependencies': 'error',
'spaced-comment': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'prefer-rest-params': 'error',
'no-useless-escape': 'error',
'eol-last': 'error',
'no-useless-concat': 'error',
'no-multi-str': 'error',
'array-callback-return': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'no-extra-boolean-cast': 'error',
'no-async-promise-executor': 'error',
'no-nested-ternary': 'error',
'no-unused-expressions': 'error',
'no-sequences': 'error',
'react/jsx-filename-extension': 'error',
'react/state-in-constructor': 'error',
'react/no-access-state-in-setstate': 'error',
'react/jsx-closing-tag-location': 'error',
'react/sort-comp': 'error',
'jsx-a11y/label-has-associated-control': 'error',
'no-empty': 'error',
'import/no-unresolved': 'error',
'no-useless-constructor': 'error',
'import/no-useless-path-segments': 'error',
'no-cond-assign': 'error',
'new-cap': 'error',
'no-new': 'error',
'no-restricted-globals': 'error',
'no-constant-condition': 'error',
'operator-assignment': 'error',
'import/no-named-default': 'error',
},
},
],
ignorePatterns: [
'node_modules',
'dist',
'build',
Expand All @@ -241,29 +289,36 @@ module.exports = {
'/packages/graphql-predictions-transformer/lambdaFunction',

// Ignore output directories of typescript project until move to tsc and fixing src locations
'/packages/amplify-*-function-*/lib',
'/packages/amplify-appsync-simulator/lib',
'/packages/amplify-category-api/lib',
'/packages/amplify-category-auth/lib',
'/packages/amplify-category-function/lib',
'/packages/amplify-*-function-*/lib',
'/packages/amplify-cli/lib',
'/packages/amplify-category-storage/lib',
'/packages/amplify-cli-core/lib',
'/packages/amplify-cli/lib',
'/packages/amplify-cli-logger/lib',
'/packages/amplify-codegen-appsync-model-plugin/lib',
'/packages/amplify-e2e-core/lib',
'/packages/amplify-migration-tests/lib',
'/packages/amplify-graphql-docs-generator/lib',
'/packages/amplify-graphql-types-generator/lib',
'/packages/amplify-headless-interface/lib',
'/packages/amplify-migration-tests/lib',
'/packages/amplify-provider-awscloudformation/lib',
'/packages/amplify-storage-simulator/lib',
'/packages/amplify-ui-tests/lib',
'/packages/amplify-util-headless-input/lib',
'/packages/amplify-util-mock/lib',
'/packages/graphql-mapping-template/lib',
'/packages/graphql-*-transformer/lib',
'/packages/graphql-mapping-template/lib',
'/packages/graphql-transformer-*/lib',
'/packages/amplify-headless-interface/lib',
'/packages/amplify-util-headless-input/lib',
'packages/amplify-graphql-*transformer*/lib',
'/packages/amplify-provider-awscloudformation/lib',
'/packages/amplify-console-integration-tests/lib',

// Ignore CHANGELOG.md files
'/packages/*/CHANGELOG.md'
]
'/packages/*/CHANGELOG.md',
],
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @aws-amplify/amplify-cli
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
name: Bug report
about: Create a report to help us improve

---

>**Note**: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
[Amplify Console GitHub Issue Tracker](https://github.com/aws-amplify/amplify-console/issues)
> **Note**: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
> [Amplify Console GitHub Issue Tracker](https://github.com/aws-amplify/amplify-console/issues)
**Describe the bug**
A clear and concise description of what the bug is.
Expand All @@ -23,9 +22,12 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Mac/Windows/Ubuntu]
- Node Version. You can use `node -v` to check the node version on your system

- OS: [e.g. Mac/Windows/Ubuntu]
- Node Version. You can use `node -v` to check the node version on your system

**Log output**
Include any relevant log output under `~/.amplify/logs/amplify-cli-<issue-date>.log`

**Additional context**
Add any other context about the problem here.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
**/.DS_Store
build
node_modules
out
pkg/node_modules
pkg/yarn.lock
lerna-debug.log
npm-debug.log
yarn-error.log
coverage
.nyc_output
.env
UNIFIED_CHANGELOG.md
package-lock.json
packages/amplify-cli/amplify/.config/
packages/amplify-appsync-simulator/public
Expand All @@ -15,8 +20,10 @@ packages/amplify-dynamodb-simulator/__test__/dynamodb-data
!.vscode/settings.json
!.vscode/extensions.json
packages/graphql*/lib
packages/amplify-graphql-transformer-*/lib
packages/amplify-cli/lib
packages/amplify-cli-core/lib
packages/amplify-cli-logger/lib
packages/amplify-mqtt-server/lib
packages/amplify-appsync-simulator/lib
packages/amplify-codegen-appsync-model-plugin/lib
Expand All @@ -27,7 +34,9 @@ packages/amplify-e2e-tests/lib
packages/amplify-category-function/lib
packages/amplify-category-api/lib
packages/amplify-category-auth/lib
packages/amplify-category-storage/lib
packages/amplify-e2e-tests/amplify-e2e-reports
packages/amplify-console-integration-tests/lib
packages/amplify-console-integration-tests/console-integration-reports
packages/amplify-migration-tests/amplify-migration-reports
packages/amplify-migration-tests/lib
Expand Down

0 comments on commit df8108f

Please sign in to comment.