Skip to content

Commit

Permalink
feat: Removing daf-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Mar 30, 2020
1 parent b832b7c commit a1ebe1d
Show file tree
Hide file tree
Showing 38 changed files with 63 additions and 587 deletions.
4 changes: 1 addition & 3 deletions docs/MessageValidator.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ import * as Daf from 'daf-core'
import * as DidJwt from 'daf-did-jwt'
import * as W3c from 'daf-w3c'
import * as SD from 'daf-selective-disclosure'
import * as DBG from 'daf-debug'
import * as URL from 'daf-url'
import { DafUniversalResolver } from 'daf-resolver-universal'
import Debug from 'debug'

Debug.enable('*')

const messageValidator = new DBG.MessageValidator()
const messageValidator = new URL.MessageValidator()
messageValidator
.setNext(new URL.MessageValidator())
.setNext(new DidJwt.MessageValidator())
.setNext(new W3c.MessageValidator())
.setNext(new SD.MessageValidator())
Expand Down
9 changes: 3 additions & 6 deletions docs/QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,10 @@ const didResolver = new DafResolver({ infuraProjectId })
Setting up Message Validator Chain

```typescript
import { MessageValidator as DebugMessageValidator } from 'daf-debug'
import { MessageValidator as JwtMessageValidator } from 'daf-did-jwt'
import { MessageValidator as W3cMessageValidator } from 'daf-w3c'
const messageValidator = new DebugMessageValidator()
messageValidator.setNext(new JwtMessageValidator()).setNext(new W3cMessageValidator())
const messageValidator = new JwtMessageValidator()
messageValidator.setNext(new W3cMessageValidator())
```

Setting up Action Handler Chain
Expand All @@ -88,10 +87,8 @@ Setting up Action Handler Chain
import { ActionHandler as DIDCommActionHandler } from 'daf-did-comm'
import { ActionHandler as TrustGraphActionHandler } from 'daf-trust-graph'
import { ActionHandler as W3cActionHandler } from 'daf-w3c'
import { ActionHandler as DebugActionHandler } from 'daf-debug'
const actionHandler = new DebugActionHandler()
const actionHandler = new W3cActionHandler()
actionHandler
.setNext(new W3cActionHandler())
.setNext(new DIDCommActionHandler())
.setNext(new TrustGraphActionHandler())
```
Expand Down
1 change: 0 additions & 1 deletion examples/expressjs-ethr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"daf-core": "../../packages/daf-core",
"daf-data-store": "../../packages/daf-data-store",
"daf-debug": "../../packages/daf-debug",
"daf-did-comm": "../../packages/daf-did-comm",
"daf-did-jwt": "../../packages/daf-did-jwt",
"daf-ethr-did": "../../packages/daf-ethr-did",
Expand Down
7 changes: 2 additions & 5 deletions examples/expressjs-ethr/src/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import * as EthrDid from 'daf-ethr-did'
import * as DafLibSodium from 'daf-libsodium'
import * as W3c from 'daf-w3c'
import * as SD from 'daf-selective-disclosure'
import * as DBG from 'daf-debug'
import * as DIDComm from 'daf-did-comm'
import * as URL from 'daf-url'
import { createConnection } from 'typeorm'
Expand Down Expand Up @@ -36,17 +35,15 @@ const identityProviders = [
]
const serviceControllers: any[] = []

const messageValidator = new DBG.MessageValidator()
const messageValidator = new URL.MessageValidator()
messageValidator
.setNext(new URL.MessageValidator())
.setNext(new DIDComm.MessageValidator())
.setNext(new DidJwt.MessageValidator())
.setNext(new W3c.MessageValidator())
.setNext(new SD.MessageValidator())

const actionHandler = new DBG.ActionHandler()
const actionHandler = new DIDComm.ActionHandler()
actionHandler
.setNext(new DIDComm.ActionHandler())
.setNext(new W3c.ActionHandler())
.setNext(new SD.ActionHandler())

Expand Down
1 change: 0 additions & 1 deletion examples/expressjs-ethr/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
{ "path": "../../packages/daf-cli" },
{ "path": "../../packages/daf-core" },
{ "path": "../../packages/daf-data-store" },
{ "path": "../../packages/daf-debug" },
{ "path": "../../packages/daf-did-comm" },
{ "path": "../../packages/daf-did-jwt" },
{ "path": "../../packages/daf-ethr-did" },
Expand Down
6 changes: 0 additions & 6 deletions examples/expressjs-ethr/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,6 @@ daf-data-store@../../packages/daf-data-store, daf-data-store@^4.0.0-beta.15+00f0
debug "^4.1.1"
sql-bricks-sqlite "^0.1.0"

daf-debug@../../packages/daf-debug:
version "4.0.0-beta.15"
dependencies:
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"

daf-did-comm@../../packages/daf-did-comm:
version "4.0.0-beta.15"
dependencies:
Expand Down
1 change: 0 additions & 1 deletion examples/id-hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"apollo-server": "^2.11.0",
"daf-core": "../../packages/daf-core",
"daf-debug": "../../packages/daf-debug",
"daf-did-jwt": "../../packages/daf-did-jwt",
"daf-resolver": "../../packages/daf-resolver",
"daf-selective-disclosure": "../../packages/daf-selective-disclosure",
Expand Down
4 changes: 1 addition & 3 deletions examples/id-hub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as Daf from 'daf-core'
import * as DidJwt from 'daf-did-jwt'
import * as W3c from 'daf-w3c'
import * as SD from 'daf-selective-disclosure'
import * as DBG from 'daf-debug'
import { DafResolver } from 'daf-resolver'
import { ApolloServer } from 'apollo-server'
import merge from 'lodash.merge'
Expand All @@ -12,9 +11,8 @@ const infuraProjectId = '5ffc47f65c4042ce847ef66a3fa70d4c'

let didResolver = new DafResolver({ infuraProjectId })

const messageValidator = new DBG.MessageValidator()
const messageValidator = new DidJwt.MessageValidator()
messageValidator
.setNext(new DidJwt.MessageValidator())
.setNext(new W3c.MessageValidator())
.setNext(new SD.MessageValidator())

Expand Down
1 change: 0 additions & 1 deletion examples/id-hub/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"exclude": ["**/__tests__/**/*", "**/build/**/*"],
"references": [
{ "path": "../../packages/daf-core" },
{ "path": "../../packages/daf-debug" },
{ "path": "../../packages/daf-did-jwt" },
{ "path": "../../packages/daf-resolver" },
{ "path": "../../packages/daf-selective-disclosure" },
Expand Down
40 changes: 17 additions & 23 deletions examples/id-hub/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -861,34 +861,28 @@ cross-fetch@^3.0.4:
node-fetch "2.6.0"
whatwg-fetch "3.0.0"

daf-core@../../packages/daf-core, daf-core@^3.4.0:
version "3.4.0"
daf-core@../../packages/daf-core, daf-core@^4.0.0-beta.15+00f0d2f:
version "4.0.0-beta.15"
dependencies:
blakejs "^1.1.0"
debug "^4.1.1"
events "^3.0.0"
typeorm "^0.2.24"

daf-data-store@^3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/daf-data-store/-/daf-data-store-3.4.0.tgz#97a693ce8bd35b1a81e43890458ea0aae9f942c7"
integrity sha512-gYDzSVljlnAfJcxRVWuVbRSzfL2V61vmQLSJ/EV3SxZLSQZGWyUFT7Kk8Nwv5LIhcZuDMEOd81uj1Tw4snuJDg==
daf-data-store@^4.0.0-beta.15+00f0d2f:
version "4.0.0-beta.15"
resolved "https://registry.yarnpkg.com/daf-data-store/-/daf-data-store-4.0.0-beta.15.tgz#47bdb81fcec83c6a18c20299f2326922ce02697a"
integrity sha512-5vyyYzdqYq4nC841xoVm62AKom6z1YPulJUBo28P95Y2JPUjOmN2+LBnMd4ZPc73Kt3ix0kUCUdZmgebZL+Nhg==
dependencies:
blakejs "^1.1.0"
daf-core "^3.4.0"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
sql-bricks-sqlite "^0.1.0"

daf-debug@../../packages/daf-debug:
version "3.4.0"
daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.15+00f0d2f:
version "4.0.0-beta.15"
dependencies:
daf-core "^3.4.0"
debug "^4.1.1"

daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^3.4.0:
version "3.4.0"
dependencies:
daf-core "^3.4.0"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt "^4.0.0"
did-resolver "^1.1.0"
Expand All @@ -903,21 +897,21 @@ daf-resolver@../../packages/daf-resolver:
web-did-resolver "^1.2.0"

daf-selective-disclosure@../../packages/daf-selective-disclosure:
version "3.4.0"
version "4.0.0-beta.15"
dependencies:
blakejs "^1.1.0"
daf-core "^3.4.0"
daf-data-store "^3.4.0"
daf-did-jwt "^3.4.0"
daf-core "^4.0.0-beta.15+00f0d2f"
daf-data-store "^4.0.0-beta.15+00f0d2f"
daf-did-jwt "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt "^4.0.0"

daf-w3c@../../packages/daf-w3c:
version "3.4.0"
version "4.0.0-beta.15"
dependencies:
blakejs "^1.1.0"
daf-core "^3.4.0"
daf-did-jwt "^3.4.0"
daf-core "^4.0.0-beta.15+00f0d2f"
daf-did-jwt "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt-vc "^0.1.3"
did-resolver "^1.1.0"
Expand Down
1 change: 0 additions & 1 deletion examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"daf-core": "../../packages/daf-core",
"daf-debug": "../../packages/daf-debug",
"daf-did-jwt": "../../packages/daf-did-jwt",
"daf-ethr-did": "../../packages/daf-ethr-did",
"daf-libsodium": "../../packages/daf-libsodium",
Expand Down
9 changes: 4 additions & 5 deletions examples/react-app/src/setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as Daf from 'daf-core'
import * as W3c from 'daf-w3c'
import * as TG from 'daf-trust-graph'
import * as DBG from 'daf-debug'
import * as DidJwt from 'daf-did-jwt'
import { DafResolver } from 'daf-resolver'
import * as EthrDid from 'daf-ethr-did'
Expand All @@ -12,11 +11,11 @@ import * as DafLibSodium from 'daf-libsodium'
import Debug from 'debug'
Debug.enable('*')

const messageValidator = new DBG.MessageValidator()
messageValidator.setNext(new DidJwt.MessageValidator()).setNext(new W3c.MessageValidator())
const messageValidator = new DidJwt.MessageValidator()
messageValidator.setNext(new W3c.MessageValidator())

const actionHandler = new DBG.ActionHandler()
actionHandler.setNext(new TG.ActionHandler()).setNext(new W3c.ActionHandler())
const actionHandler = new TG.ActionHandler()
actionHandler.setNext(new W3c.ActionHandler())

const infuraProjectId = '5ffc47f65c4042ce847ef66a3fa70d4c'

Expand Down
6 changes: 0 additions & 6 deletions examples/react-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3564,12 +3564,6 @@ daf-core@../../packages/daf-core, daf-core@^4.0.0-beta.15+00f0d2f:
events "^3.0.0"
typeorm "^0.2.24"

daf-debug@../../packages/daf-debug:
version "4.0.0-beta.15"
dependencies:
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"

daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.15+00f0d2f:
version "4.0.0-beta.15"
dependencies:
Expand Down
7 changes: 2 additions & 5 deletions examples/react-graphql/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as DidJwt from 'daf-did-jwt'
import * as W3c from 'daf-w3c'
import * as SD from 'daf-selective-disclosure'
import * as TG from 'daf-trust-graph'
import * as DBG from 'daf-debug'
import * as URL from 'daf-url'
import * as DafEthrDid from 'daf-ethr-did'
import * as DafLibSodium from 'daf-libsodium'
Expand All @@ -29,16 +28,14 @@ const identityProviders = [
]
const serviceControllers = [TG.ServiceController]

const messageValidator = new DBG.MessageValidator()
const messageValidator = new URL.MessageValidator()
messageValidator
.setNext(new URL.MessageValidator())
.setNext(new DidJwt.MessageValidator())
.setNext(new W3c.MessageValidator())
.setNext(new SD.MessageValidator())

const actionHandler = new DBG.ActionHandler()
const actionHandler = new TG.ActionHandler()
actionHandler
.setNext(new TG.ActionHandler())
.setNext(new W3c.ActionHandler())
.setNext(new SD.ActionHandler())

Expand Down
1 change: 0 additions & 1 deletion examples/react-graphql/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"apollo-server": "^2.9.16",
"daf-core": "../../../packages/daf-core",
"daf-data-store": "../../../packages/daf-data-store",
"daf-debug": "../../../packages/daf-debug",
"daf-did-jwt": "../../../packages/daf-did-jwt",
"daf-ethr-did": "../../../packages/daf-ethr-did",
"daf-libsodium": "../../../packages/daf-libsodium",
Expand Down
41 changes: 18 additions & 23 deletions examples/react-graphql/server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -867,58 +867,52 @@ cross-fetch@^3.0.4:
node-fetch "2.6.0"
whatwg-fetch "3.0.0"

daf-core@../../../packages/daf-core, daf-core@^2.3.18:
version "2.3.18"
daf-core@../../../packages/daf-core, daf-core@^4.0.0-beta.15+00f0d2f:
version "4.0.0-beta.15"
dependencies:
blakejs "^1.1.0"
debug "^4.1.1"
events "^3.0.0"
typeorm "^0.2.24"

daf-data-store@../../../packages/daf-data-store:
version "2.3.18"
version "4.0.0-beta.15"
dependencies:
blakejs "^1.1.0"
daf-core "^2.3.18"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
sql-bricks-sqlite "^0.1.0"

daf-debug@../../../packages/daf-debug:
version "2.3.18"
daf-did-jwt@../../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.15+00f0d2f:
version "4.0.0-beta.15"
dependencies:
daf-core "^2.3.18"
debug "^4.1.1"

daf-did-jwt@../../../packages/daf-did-jwt, daf-did-jwt@^2.3.18:
version "2.3.18"
dependencies:
daf-core "^2.3.18"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt "^4.0.0"
did-resolver "^1.1.0"

daf-ethr-did@../../../packages/daf-ethr-did:
version "2.3.18"
version "4.0.0-beta.15"
dependencies:
daf-core "^2.3.18"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
ethjs-provider-signer "^0.1.4"
ethr-did "^1.1.0"
js-sha3 "^0.8.0"

daf-libsodium@../../../packages/daf-libsodium:
version "2.3.18"
version "4.0.0-beta.15"
dependencies:
base-58 "^0.0.1"
daf-core "^2.3.18"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt "^4.0.0"
elliptic "^6.5.2"
ethjs-signer "^0.1.1"
libsodium-wrappers "^0.7.6"

daf-resolver@../../../packages/daf-resolver:
version "2.3.18"
version "3.0.1"
dependencies:
debug "^4.1.1"
did-resolver "^1.1.0"
Expand All @@ -927,7 +921,7 @@ daf-resolver@../../../packages/daf-resolver:
web-did-resolver "^1.2.0"

daf-trust-graph@../../../packages/daf-trust-graph:
version "2.3.18"
version "4.0.0-beta.15"
dependencies:
apollo-cache-inmemory "^1.6.3"
apollo-client "^2.6.4"
Expand All @@ -936,18 +930,19 @@ daf-trust-graph@../../../packages/daf-trust-graph:
apollo-link-ws "^1.0.19"
apollo-utilities "^1.3.2"
cross-fetch "^3.0.4"
daf-core "^2.3.18"
daf-core "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt "^4.0.0"
graphql "^14.0.0"
graphql-tag "^2.10.1"
subscriptions-transport-ws "^0.9.0"

daf-w3c@../../../packages/daf-w3c:
version "2.3.18"
version "4.0.0-beta.15"
dependencies:
daf-core "^2.3.18"
daf-did-jwt "^2.3.18"
blakejs "^1.1.0"
daf-core "^4.0.0-beta.15+00f0d2f"
daf-did-jwt "^4.0.0-beta.15+00f0d2f"
debug "^4.1.1"
did-jwt-vc "^0.1.3"
did-resolver "^1.1.0"
Expand Down
Loading

0 comments on commit a1ebe1d

Please sign in to comment.