-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
serverless-appsync-plugin
v2 (#183)
feat: Support serverless-appsync-plugin v2 feat: Added support for Node 20 feat: Rewrite in TypeScript BREAKING CHANGE: Dropped support for serverless-appsync-plugin v1 BREAKING CHANGE: Dropped support for Node < 18 --------- Co-authored-by: Pierre Lezan <[email protected]>
- Loading branch information
Showing
37 changed files
with
6,717 additions
and
4,215 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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,42 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"jest": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": "./tsconfig_test.json" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"prettier" | ||
], | ||
"plugins": ["@typescript-eslint", "import", "unused-imports"], | ||
"rules": { | ||
"prefer-const": "error", | ||
"no-var": "error", | ||
"no-console": "off", | ||
"sort-imports": "off", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"class-methods-use-this": "error", | ||
"unused-imports/no-unused-imports": "error", | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/no-unused-vars": "off" | ||
}, | ||
"ignorePatterns": [ | ||
"lib/**/*", | ||
"node_modules" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- master | ||
- beta | ||
|
||
jobs: | ||
publish: | ||
|
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,11 @@ | ||
import { JestConfigWithTsJest } from 'ts-jest'; | ||
|
||
const config: JestConfigWithTsJest = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
silent: true, | ||
moduleDirectories: ['node_modules', 'src'], | ||
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$'], | ||
}; | ||
|
||
export default config; |
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,127 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`resolveConfiguration should generate a valid config 1`] = ` | ||
{ | ||
"additionalAuthentications": [ | ||
{ | ||
"config": { | ||
"userPoolId": "us-west-2_123456789", | ||
}, | ||
"type": "AMAZON_COGNITO_USER_POOLS", | ||
}, | ||
], | ||
"apiKeys": { | ||
"foo-bar": { | ||
"name": "foo-bar", | ||
}, | ||
}, | ||
"authentication": { | ||
"type": "API_KEY", | ||
}, | ||
"dataSources": { | ||
"dynamodb": { | ||
"config": { | ||
"tableName": "myTable", | ||
}, | ||
"name": "dynamodb", | ||
"type": "AMAZON_DYNAMODB", | ||
}, | ||
"http": { | ||
"config": { | ||
"endpoint": "http://127.0.0.1", | ||
}, | ||
"name": "http", | ||
"type": "HTTP", | ||
}, | ||
"lambda": { | ||
"config": { | ||
"functionName": "resolver", | ||
}, | ||
"name": "lambda", | ||
"type": "AWS_LAMBDA", | ||
}, | ||
"none": { | ||
"name": "none", | ||
"type": "NONE", | ||
}, | ||
}, | ||
"name": "myAPI", | ||
"pipelineFunctions": { | ||
"func": { | ||
"dataSource": "lambda", | ||
"name": "func", | ||
"request": "src/__tests__/files/mapping-templates/templates.request.vtl", | ||
"response": "src/__tests__/files/mapping-templates/templates.response.vtl", | ||
"substitutions": { | ||
"mySubVar": "template-function", | ||
}, | ||
}, | ||
"funcDirect": { | ||
"dataSource": "lambda", | ||
"name": "funcDirect", | ||
}, | ||
}, | ||
"resolvers": { | ||
"Mutation.updateNode": { | ||
"dataSource": "lambda", | ||
"field": "updateNode", | ||
"kind": "UNIT", | ||
"type": "Mutation", | ||
}, | ||
"Query.node": { | ||
"dataSource": "lambda", | ||
"field": "node", | ||
"kind": "UNIT", | ||
"type": "Query", | ||
}, | ||
"Query.pipeline": { | ||
"field": "pipeline", | ||
"functions": [ | ||
"func", | ||
"funcDirect", | ||
], | ||
"kind": "PIPELINE", | ||
"type": "Query", | ||
}, | ||
"Query.templates": { | ||
"dataSource": "lambda", | ||
"field": "templates", | ||
"kind": "UNIT", | ||
"request": "src/__tests__/files/mapping-templates/templates.request.vtl", | ||
"response": "src/__tests__/files/mapping-templates/templates.response.vtl", | ||
"substitutions": { | ||
"mySubVar": "lambda", | ||
}, | ||
"type": "Query", | ||
}, | ||
}, | ||
"schema": [ | ||
"src/__tests__/files/*.graphql", | ||
], | ||
} | ||
`; | ||
|
||
exports[`resolveConfiguration should generate a valid config 2`] = ` | ||
{ | ||
"apiKey": "0123456789", | ||
"dynamoDb": { | ||
"accessKeyId": "DEFAULT_ACCESS_KEY", | ||
"endpoint": "http://localhost:8000", | ||
"region": "localhost", | ||
"secretAccessKey": "DEFAULT_SECRET", | ||
}, | ||
"getAttMap": {}, | ||
"importValueMap": {}, | ||
"lambdaPort": 3002, | ||
"location": ".", | ||
"openSearch": {}, | ||
"port": 20002, | ||
"rds": {}, | ||
"refMap": {}, | ||
"watch": [ | ||
"*.graphql", | ||
"*.vtl", | ||
], | ||
"wsPort": 20003, | ||
} | ||
`; |
Oops, something went wrong.