From 38088d3fa09221e50d290ebf47ac31e31ad584d7 Mon Sep 17 00:00:00 2001 From: Kaustav Ghosh Date: Wed, 14 Jul 2021 18:04:19 -0700 Subject: [PATCH] feat: add helper util package for overrides (#7726) * feat: add helper util package for overrides * fix: remove lib files * fix: add overrides helper lib to gitignore * fix: namespace overrides package * fix: fix eslint errors in lib/ files Co-authored-by: Ghosh --- .eslintrc.js | 1 + .gitignore | 1 + .../amplify-cli-overrides-helper/.npmignore | 5 ++ .../amplify-cli-overrides-helper/README.md | 1 + .../amplify-cli-overrides-helper/package.json | 47 +++++++++++++++++++ .../amplify-cli-overrides-helper/src/index.ts | 11 +++++ .../tsconfig.json | 8 ++++ 7 files changed, 74 insertions(+) create mode 100644 packages/amplify-cli-overrides-helper/.npmignore create mode 100644 packages/amplify-cli-overrides-helper/README.md create mode 100644 packages/amplify-cli-overrides-helper/package.json create mode 100644 packages/amplify-cli-overrides-helper/src/index.ts create mode 100644 packages/amplify-cli-overrides-helper/tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js index e32ce1c8e59..14884ff52b1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -321,6 +321,7 @@ module.exports = { '/packages/amplify-graphql-*transformer*/lib', '/packages/amplify-provider-awscloudformation/lib', '/packages/amplify-console-integration-tests/lib', + '/packages/amplify-cli-overrides-helper/lib', // Ignore CHANGELOG.md files '/packages/*/CHANGELOG.md', diff --git a/.gitignore b/.gitignore index 7ef57f62877..4a58ea74193 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ packages/**/reports/junit/* test.out.log *.tsbuildinfo packages/amplify-graphiql-explorer/.eslintcache +packages/amplify-cli-overrides-helper/lib diff --git a/packages/amplify-cli-overrides-helper/.npmignore b/packages/amplify-cli-overrides-helper/.npmignore new file mode 100644 index 00000000000..3ee5d55b0b8 --- /dev/null +++ b/packages/amplify-cli-overrides-helper/.npmignore @@ -0,0 +1,5 @@ +**/__mocks__/** +**/__tests__/** +src +tsconfig.json +tsconfig.tsbuildinfo diff --git a/packages/amplify-cli-overrides-helper/README.md b/packages/amplify-cli-overrides-helper/README.md new file mode 100644 index 00000000000..c8c495d77b7 --- /dev/null +++ b/packages/amplify-cli-overrides-helper/README.md @@ -0,0 +1 @@ +EMPTY SKELETON FOR NOW. diff --git a/packages/amplify-cli-overrides-helper/package.json b/packages/amplify-cli-overrides-helper/package.json new file mode 100644 index 00000000000..d74ee903d1a --- /dev/null +++ b/packages/amplify-cli-overrides-helper/package.json @@ -0,0 +1,47 @@ +{ + "name": "@aws-amplify/cli-overrides-helper", + "version": "1.0.0", + "description": "Amplify CLI Overrides Helper utility package", + "repository": { + "type": "git", + "url": "https://github.com/aws-amplify/amplify-cli.git", + "directory": "packages/amplify-cli-overrides-helper" + }, + "author": "Amazon Web Services", + "license": "Apache-2.0", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "keywords": [ + "graphql", + "cli", + "cloudformation", + "aws", + "amplify" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "clean": "rimraf ./lib" + }, + "dependencies": {}, + "devDependencies": {}, + "jest": { + "transform": { + "^.+\\.(ts|tsx)?$": "ts-jest" + }, + "testRegex": "(src/__tests__/.*.test.ts)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json", + "node" + ], + "collectCoverage": true + } + } + \ No newline at end of file diff --git a/packages/amplify-cli-overrides-helper/src/index.ts b/packages/amplify-cli-overrides-helper/src/index.ts new file mode 100644 index 00000000000..172f00513ab --- /dev/null +++ b/packages/amplify-cli-overrides-helper/src/index.ts @@ -0,0 +1,11 @@ +function getProjectInfo(): void { + console.log('Hello from the skeleton of get project info'); + return; +} + +function addDependency(): void { + console.log('Hello from the skeleton of add dependency'); + return; +} + +export { getProjectInfo, addDependency }; diff --git a/packages/amplify-cli-overrides-helper/tsconfig.json b/packages/amplify-cli-overrides-helper/tsconfig.json new file mode 100644 index 00000000000..4db720dc27c --- /dev/null +++ b/packages/amplify-cli-overrides-helper/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./lib", + "rootDir": "./src", + } + } + \ No newline at end of file