diff --git a/libs/shared/data-access/authorization/.babelrc b/libs/shared/data-access/authorization/.babelrc new file mode 100644 index 0000000000000000000000000000000000000000..cf7ddd99c615a064ac18eb3109eee4f394ab1faf --- /dev/null +++ b/libs/shared/data-access/authorization/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]] +} diff --git a/libs/shared/data-access/authorization/.eslintrc.json b/libs/shared/data-access/authorization/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..632e9b0e22253922989d1153e06f7ba996c72d38 --- /dev/null +++ b/libs/shared/data-access/authorization/.eslintrc.json @@ -0,0 +1,18 @@ +{ + "extends": ["../../../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": {} + }, + { + "files": ["*.ts", "*.tsx"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "rules": {} + } + ] +} diff --git a/libs/shared/data-access/authorization/README.md b/libs/shared/data-access/authorization/README.md new file mode 100644 index 0000000000000000000000000000000000000000..009a2ead17f3f87e2bc4b246ad9ceae1423f9813 --- /dev/null +++ b/libs/shared/data-access/authorization/README.md @@ -0,0 +1,7 @@ +# shared-data-access-authorization + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test shared-data-access-authorization` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/shared/data-access/authorization/jest.config.js b/libs/shared/data-access/authorization/jest.config.js new file mode 100644 index 0000000000000000000000000000000000000000..6bae255b477a179c550eade1547895b0cd8372d0 --- /dev/null +++ b/libs/shared/data-access/authorization/jest.config.js @@ -0,0 +1,15 @@ +module.exports = { + displayName: 'shared-data-access-authorization', + preset: '../../../../jest.preset.js', + globals: { + 'ts-jest': { + tsconfig: '<rootDir>/tsconfig.spec.json', + }, + }, + transform: { + '^.+\\.[tj]sx?$': 'ts-jest', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], + coverageDirectory: + '../../../../coverage/libs/shared/data-access/authorization', +}; diff --git a/libs/shared/data-access/authorization/project.json b/libs/shared/data-access/authorization/project.json new file mode 100644 index 0000000000000000000000000000000000000000..7225438fd977b6401038fbabfffa797328d1b7c1 --- /dev/null +++ b/libs/shared/data-access/authorization/project.json @@ -0,0 +1,23 @@ +{ + "root": "libs/shared/data-access/authorization", + "sourceRoot": "libs/shared/data-access/authorization/src", + "projectType": "library", + "targets": { + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["libs/shared/data-access/authorization/**/*.ts"] + } + }, + "test": { + "executor": "@nrwl/jest:jest", + "outputs": ["coverage/libs/shared/data-access/authorization"], + "options": { + "jestConfig": "libs/shared/data-access/authorization/jest.config.js", + "passWithNoTests": true + } + } + }, + "tags": [] +} diff --git a/libs/shared/data-access/authorization/src/index.ts b/libs/shared/data-access/authorization/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..39bd8dd1793a1fe9e8d172a1e4a5eb1d91fd36da --- /dev/null +++ b/libs/shared/data-access/authorization/src/index.ts @@ -0,0 +1 @@ +export * from './lib/authorizationHandler'; diff --git a/libs/shared/data-access/authorization/src/lib/authorizationHandler.ts b/libs/shared/data-access/authorization/src/lib/authorizationHandler.ts new file mode 100644 index 0000000000000000000000000000000000000000..68ae8fb2560c07f3fa69cb8f3bdceccd41b9efeb --- /dev/null +++ b/libs/shared/data-access/authorization/src/lib/authorizationHandler.ts @@ -0,0 +1 @@ +export const test = 'hey!'; diff --git a/libs/shared/data-access/authorization/tsconfig.json b/libs/shared/data-access/authorization/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..d0953a0f8b8084fd7ca99de4a00f82435f8679cd --- /dev/null +++ b/libs/shared/data-access/authorization/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "../../../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "compilerOptions": { + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + } +} diff --git a/libs/shared/data-access/authorization/tsconfig.lib.json b/libs/shared/data-access/authorization/tsconfig.lib.json new file mode 100644 index 0000000000000000000000000000000000000000..2ef844c42b4d526dd97ef3b18591cc5c652781e5 --- /dev/null +++ b/libs/shared/data-access/authorization/tsconfig.lib.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../../dist/out-tsc", + "declaration": true, + "types": [] + }, + "include": ["**/*.ts"], + "exclude": ["**/*.spec.ts"] +} diff --git a/libs/shared/data-access/authorization/tsconfig.spec.json b/libs/shared/data-access/authorization/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..315a5b0bbebaca96617a8dd5353901287ebd8e68 --- /dev/null +++ b/libs/shared/data-access/authorization/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../../../dist/out-tsc", + "module": "commonjs", + "types": ["jest", "node"] + }, + "include": [ + "**/*.test.ts", + "**/*.spec.ts", + "**/*.test.tsx", + "**/*.spec.tsx", + "**/*.test.js", + "**/*.spec.js", + "**/*.test.jsx", + "**/*.spec.jsx", + "**/*.d.ts" + ] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 5a2caf532de87019c51c475c16870bedb9fb4e9e..564029806d3fac03a42d662f3e0475c1bf465ed3 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -15,6 +15,9 @@ "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { + "@graphpolaris/shared/data-access/authorization": [ + "libs/shared/data-access/authorization/src/index.ts" + ], "@graphpolaris/shared/data-access/store": [ "libs/shared/data-access/store/src/index.ts" ] diff --git a/workspace.json b/workspace.json index c0773e3b412c1a570025f410938329c7b744738b..1de30256ad3e41cf07c7149eebd57462e24a003f 100644 --- a/workspace.json +++ b/workspace.json @@ -3,6 +3,7 @@ "projects": { "graphpolaris": "apps/graphpolaris", "graphpolaris-e2e": "apps/graphpolaris-e2e", + "shared-data-access-authorization": "libs/shared/data-access/authorization", "shared-data-access-store": "libs/shared/data-access/store" } }