-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support compiling for ESM and CJS + fix tests (#7)
* Compile for both ESM and CJS. * Fix tests * Prettier fmt whole project
- Loading branch information
Showing
8 changed files
with
843 additions
and
57 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
This file was deleted.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -1,11 +1,43 @@ | ||
{ | ||
"withoutCaps": { | ||
"message": "example.com wants you to sign in with your Ethereum account:\n0x0000000000000000000000000000000000000000\n\n\nURI: did:key:example\nVersion: 1\nChain ID: 1\nNonce: mynonce1\nIssued At: 2022-06-21T12:00:00.000Z" | ||
"message": { | ||
"domain": "example.com", | ||
"address": "0x0000000000000000000000000000000000000000", | ||
"uri": "did:key:example", | ||
"version": "1", | ||
"chainId": 1, | ||
"nonce": "mynonce1", | ||
"issuedAt": "2022-06-21T12:00:00.000Z" | ||
} | ||
}, | ||
"withStatementNoCaps": { | ||
"message": "example.com wants you to sign in with your Ethereum account:\n0x0000000000000000000000000000000000000000\n\nSome custom statement.\n\nURI: did:key:example\nVersion: 1\nChain ID: 1\nNonce: mynonce1\nIssued At: 2022-06-21T12:00:00.000Z" | ||
"message": { | ||
"domain": "example.com", | ||
"address": "0x0000000000000000000000000000000000000000", | ||
"statement": "Some custom statement.", | ||
"uri": "did:key:example", | ||
"version": "1", | ||
"chainId": 1, | ||
"nonce": "mynonce1", | ||
"issuedAt": "2022-06-21T12:00:00.000Z" | ||
} | ||
}, | ||
"interleavedResources": { | ||
"message": "example.com wants you to sign in with your Ethereum account:\n0x0000000000000000000000000000000000000000\n\nI further authorize the stated URI to perform the following actions on my behalf: (1) \"credential\": \"present\" for \"credential:*\". (2) \"kv\": \"get\", \"list\", \"metadata\" for \"kepler:ens:example.eth://default/\".\n\nURI: did:key:example\nVersion: 1\nChain ID: 1\nNonce: mynonce1\nIssued At: 2022-06-21T12:00:00.000Z\nResources:\n- http://example.com\n- urn:recap:eyJhdHQiOnsiY3JlZGVudGlhbDoqIjp7ImNyZWRlbnRpYWwvcHJlc2VudCI6W119LCJrZXBsZXI6ZW5zOmV4YW1wbGUuZXRoOi8vZGVmYXVsdC8iOnsia3YvZ2V0IjpbXSwia3YvbGlzdCI6W10sImt2L21ldGFkYXRhIjpbXX19LCJwcmYiOltdfQ\n- ftp://example.com\n- ssh://[email protected]" | ||
"message": { | ||
"domain": "example.com", | ||
"address": "0x0000000000000000000000000000000000000000", | ||
"statement": "I further authorize the stated URI to perform the following actions on my behalf: (1) \"credential\": \"present\" for \"credential:*\". (2) \"kv\": \"get\", \"list\", \"metadata\" for \"kepler:ens:example.eth://default/\".", | ||
"uri": "did:key:example", | ||
"version": "1", | ||
"chainId": 1, | ||
"nonce": "mynonce1", | ||
"issuedAt": "2022-06-21T12:00:00.000Z", | ||
"resourtes": [ | ||
"http://example.com", | ||
"urn:recap:eyJhdHQiOnsiY3JlZGVudGlhbDoqIjp7ImNyZWRlbnRpYWwvcHJlc2VudCI6W119LCJrZXBsZXI6ZW5zOmV4YW1wbGUuZXRoOi8vZGVmYXVsdC8iOnsia3YvZ2V0IjpbXSwia3YvbGlzdCI6W10sImt2L21ldGFkYXRhIjpbXX19LCJwcmYiOltdfQ", | ||
"ftp://example.com", | ||
"ssh://[email protected]" | ||
] | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
{ | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules/", "dist", "src/**/*.test.ts"], | ||
"compilerOptions": { | ||
"target": "es2015", | ||
"module": "commonjs", | ||
"baseUrl": "./src", | ||
"paths": { | ||
"multiformats": ["../node_modules/multiformats/dist"] | ||
}, | ||
"declaration": true, | ||
"outDir": "./dist", | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"strict": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src/*"], | ||
"exclude": ["src/**/*.test.ts"] | ||
"noUnusedLocals": true, | ||
"target": "ES2015", | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"esModuleInterop": true, | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"baseUrl": ".", | ||
"outDir": "dist" | ||
} | ||
} |
Oops, something went wrong.