forked from passportxyz/passport
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(identity-providers): add base identity provider package
1 parent
8d2e3b0
commit 1aa2881
Showing
11 changed files
with
155 additions
and
0 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,9 @@ | ||
/*.js | ||
/*.ts | ||
/dist/* | ||
/coverage/* | ||
/node_modules/* | ||
/src/didkit-node/* | ||
/src/didkit-browser/* | ||
/__mocks__/**/* | ||
/__tests__/**/* |
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,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", | ||
}, | ||
}, | ||
}; |
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,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? |
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,5 @@ | ||
/dist/* | ||
/coverage/* | ||
/node_modules/* | ||
/src/didkit-node/* | ||
/src/didkit-browser/* |
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,3 @@ | ||
module.exports = { | ||
...require("../.prettierrc.js"), | ||
}; |
Empty file.
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,7 @@ | ||
module.exports = { | ||
testEnvironment: "node", | ||
transform: { | ||
"^.+\\.tsx?$": "ts-jest", | ||
}, | ||
modulePathIgnorePatterns: ["<rootDir>/dist/"], | ||
}; |
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,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 ." | ||
} | ||
} |
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 @@ | ||
export default {}; |
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,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__"] | ||
} |
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 |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
"database-client", | ||
"iam", | ||
"identity", | ||
"identity-providers", | ||
"schemas", | ||
"types", | ||
"signer" | ||
|