Skip to content

Commit

Permalink
Merge pull request #21 from gandalf-network/staging
Browse files Browse the repository at this point in the history
Staging -> Prod [ Traits Support ]
  • Loading branch information
TosinJs authored Jun 12, 2024
2 parents 0338048 + 3bf7be3 commit 2bd972d
Show file tree
Hide file tree
Showing 25 changed files with 2,030 additions and 423 deletions.
4 changes: 4 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
UNIVERSAL_APP_CLIP_BASE_URL=https://test.network.com
IOS_APP_CLIP_BASE_URL=https://test.apple.com/id?p=test
ANDROID_APP_CLIP_BASE_URL=https://test.android.com
WATSON_URL=https://test.com/public/gql
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/tests
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'codegen.ts', 'jest.config.js', 'rollup.config.js', 'tests', 'examples'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'prettier/prettier': [
'error',
{
"endOfLine": "auto",
}
]
},
};
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
8 changes: 7 additions & 1 deletion examples/example.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import Connect from "../src/connect";
import { ActivityType, InputData, TraitLabel } from "../src/types";

const publicKey = "0x0297bb4f88a65b82c08fd20afb1259b7027dc996c8941e0c5917a452d538cd0da9";
const redirectURL = "https://example.com"
const services = {"NETFLIX": true}
const services: InputData = {
uber: {
traits: [TraitLabel.Plan],
activities: [ActivityType.Trip],
},
}

async function example() {
const connect = new Connect({publicKey, redirectURL, services})
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'^.+\\.tsx?$': 'ts-jest'
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFiles: ['<rootDir>/tests/setupEnv.ts'],
};

Loading

0 comments on commit 2bd972d

Please sign in to comment.