Skip to content

Commit

Permalink
feat(identity-providers): add base identity provider package
Browse files Browse the repository at this point in the history
tim-schultz committed Sep 21, 2022
1 parent 8d2e3b0 commit 1aa2881
Showing 11 changed files with 155 additions and 0 deletions.
9 changes: 9 additions & 0 deletions identity-providers/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*.js
/*.ts
/dist/*
/coverage/*
/node_modules/*
/src/didkit-node/*
/src/didkit-browser/*
/__mocks__/**/*
/__tests__/**/*
49 changes: 49 additions & 0 deletions identity-providers/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
module.exports = {
env: {
es6: true,
browser: true,
jest: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"plugin:jest/recommended",
"plugin:react/recommended",
"prettier",
],
ignorePatterns: [".eslintrc.js", "jest.config.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
ecmaVersion: 2017,
ecmaFeatures: {
jsx: true,
},
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
plugins: ["@typescript-eslint", "prettier", "jest", "react"],
rules: {
quotes: ["error", "double"],
"no-console": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", { vars: "all", args: "after-used", ignoreRestSiblings: false }],
"@typescript-eslint/explicit-function-return-type": "warn", // Consider using explicit annotations for object literals and function return types even when they can be inferred.
"no-empty": "warn",
"@typescript-eslint/no-misused-promises": 1,
"@typescript-eslint/no-floating-promises": 1,
"@typescript-eslint/no-unsafe-assignment": "warn",
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
react: {
version: "detect",
},
},
};
25 changes: 25 additions & 0 deletions identity-providers/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
/dist
/coverage
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
5 changes: 5 additions & 0 deletions identity-providers/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/dist/*
/coverage/*
/node_modules/*
/src/didkit-node/*
/src/didkit-browser/*
3 changes: 3 additions & 0 deletions identity-providers/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require("../.prettierrc.js"),
};
Empty file added identity-providers/README.md
Empty file.
7 changes: 7 additions & 0 deletions identity-providers/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
testEnvironment: "node",
transform: {
"^.+\\.tsx?$": "ts-jest",
},
modulePathIgnorePatterns: ["<rootDir>/dist/"],
};
35 changes: 35 additions & 0 deletions identity-providers/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "@gitcoin/passport-identity-providers",
"version": "1.0.0",
"license": "MIT",
"main": "dist/commonjs/index.js",
"directories": {
"src": "src",
"dist": "dist"
},
"files": [
"src",
"dist"
],
"publishConfig": {
"access": "public"
},
"dependencies": {
"@ethersproject/base64": "^5.6.1",
"@ethersproject/providers": "^5.6.2",
"@gitcoin/passport-types": "^1.0.0",
"axios": "^0.26.1",
"typescript": "~4.6.3"
},
"devDependencies": {
"jest": "^27.5.1",
"ts-jest": "^27.1.4"
},
"scripts": {
"clean": "rimraf dist node_modules",
"build": "tsc",
"test": "jest --verbose",
"lint": "tsc --noEmit && eslint --ext .ts,.js,.tsx .",
"prettier": "prettier --write ."
}
}
1 change: 1 addition & 0 deletions identity-providers/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};
20 changes: 20 additions & 0 deletions identity-providers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../tsconfig.settings.json",
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"target": "es6",
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist/commonjs",
"allowJs": true,
"baseUrl": "src",
"paths": {
"*": ["../node_modules/*", "node_modules/*"]
}
},
"include": ["src/*", "__tests__"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
"database-client",
"iam",
"identity",
"identity-providers",
"schemas",
"types",
"signer"

0 comments on commit 1aa2881

Please sign in to comment.