From 7c74e184df6f5d2c1d0872b9db86da51365b5e47 Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Thu, 16 Apr 2020 13:25:22 +0300 Subject: [PATCH] fix: Removing daf-data-store from examples --- examples/expressjs-ethr/package.json | 1 - examples/expressjs-ethr/src/framework.ts | 1 - examples/expressjs-ethr/tsconfig.json | 1 - examples/expressjs-ethr/yarn.lock | 71 ++++++------------- examples/id-hub/yarn.lock | 55 ++++---------- .../react-graphql/client/src/gql/queries.ts | 6 +- examples/react-graphql/client/src/queries.ts | 4 +- examples/react-graphql/server/index.ts | 5 +- examples/react-graphql/server/package.json | 1 - examples/react-graphql/server/yarn.lock | 58 ++++----------- examples/send-vc/tsconfig.json | 1 - 11 files changed, 54 insertions(+), 150 deletions(-) diff --git a/examples/expressjs-ethr/package.json b/examples/expressjs-ethr/package.json index de1f029f1..1981435f9 100644 --- a/examples/expressjs-ethr/package.json +++ b/examples/expressjs-ethr/package.json @@ -15,7 +15,6 @@ "license": "Apache-2.0", "dependencies": { "daf-core": "../../packages/daf-core", - "daf-data-store": "../../packages/daf-data-store", "daf-did-comm": "../../packages/daf-did-comm", "daf-did-jwt": "../../packages/daf-did-jwt", "daf-ethr-did": "../../packages/daf-ethr-did", diff --git a/examples/expressjs-ethr/src/framework.ts b/examples/expressjs-ethr/src/framework.ts index afdf7a559..82a4a0562 100644 --- a/examples/expressjs-ethr/src/framework.ts +++ b/examples/expressjs-ethr/src/framework.ts @@ -10,7 +10,6 @@ import { SdrMessageHandler, SdrActionHandler } from 'daf-selective-disclosure' import { DIDCommMessageHandler, DIDCommActionHandler } from 'daf-did-comm' import { UrlMessageHandler } from 'daf-url' import { createConnection } from 'typeorm' -import { DataStore } from 'daf-data-store' const infuraProjectId = process.env.DAF_INFURA_ID ?? '5ffc47f65c4042ce847ef66a3fa70d4c' diff --git a/examples/expressjs-ethr/tsconfig.json b/examples/expressjs-ethr/tsconfig.json index 82fabb1fc..0bee86c1e 100644 --- a/examples/expressjs-ethr/tsconfig.json +++ b/examples/expressjs-ethr/tsconfig.json @@ -15,7 +15,6 @@ "references": [ { "path": "../../packages/daf-cli" }, { "path": "../../packages/daf-core" }, - { "path": "../../packages/daf-data-store" }, { "path": "../../packages/daf-did-comm" }, { "path": "../../packages/daf-did-jwt" }, { "path": "../../packages/daf-ethr-did" }, diff --git a/examples/expressjs-ethr/yarn.lock b/examples/expressjs-ethr/yarn.lock index 3e777dedf..066592305 100644 --- a/examples/expressjs-ethr/yarn.lock +++ b/examples/expressjs-ethr/yarn.lock @@ -613,51 +613,43 @@ cross-fetch@^3.0.4: node-fetch "2.6.0" whatwg-fetch "3.0.0" -daf-core@../../packages/daf-core, daf-core@^4.0.0-beta.42: - version "4.0.0-beta.42" +daf-core@../../packages/daf-core, daf-core@^4.0.0-beta.45: + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" debug "^4.1.1" events "^3.0.0" typeorm "^0.2.24" -daf-data-store@../../packages/daf-data-store, daf-data-store@^4.0.0-beta.42: - version "4.0.0-beta.42" - dependencies: - blakejs "^1.1.0" - daf-core "^4.0.0-beta.42" - debug "^4.1.1" - sql-bricks-sqlite "^0.1.0" - daf-did-comm@../../packages/daf-did-comm: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: - daf-core "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" debug "^4.1.1" uuid "^3.3.3" -daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.42: - version "4.0.0-beta.42" +daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.45: + version "4.0.0-beta.45" dependencies: - daf-core "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" did-resolver "^1.1.0" daf-ethr-did@../../packages/daf-ethr-did: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: - daf-core "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" 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 "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: base-58 "^0.0.1" - daf-core "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" elliptic "^6.5.2" @@ -665,13 +657,13 @@ daf-libsodium@../../packages/daf-libsodium: libsodium-wrappers "^0.7.6" daf-resolver-universal@../../packages/daf-resolver-universal: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: cross-fetch "^3.0.4" debug "^4.1.1" daf-resolver@../../packages/daf-resolver: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: debug "^4.1.1" did-resolver "^1.1.0" @@ -680,29 +672,28 @@ daf-resolver@../../packages/daf-resolver: web-did-resolver "^1.2.0" daf-selective-disclosure@../../packages/daf-selective-disclosure: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" - daf-core "^4.0.0-beta.42" - daf-data-store "^4.0.0-beta.42" - daf-did-jwt "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" + daf-did-jwt "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" typeorm "^0.2.24" daf-url@../../packages/daf-url: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: - daf-core "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" debug "^4.1.1" url-parse "^1.4.7" daf-w3c@../../packages/daf-w3c: - version "4.0.0-beta.42" + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" - daf-core "^4.0.0-beta.42" - daf-did-jwt "^4.0.0-beta.42" + daf-core "^4.0.0-beta.45" + daf-did-jwt "^4.0.0-beta.45" debug "^4.1.1" did-jwt-vc "^0.1.3" did-resolver "^1.1.0" @@ -2472,21 +2463,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-bricks-sqlite@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/sql-bricks-sqlite/-/sql-bricks-sqlite-0.1.0.tgz#5d193589e512e8f8176fdecf19c5bdae5f352550" - integrity sha1-XRk1ieUS6PgXb97PGcW9rl81JVA= - dependencies: - sql-bricks "1.0.0-beta.2" - underscore "1.4.x" - -sql-bricks@1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/sql-bricks/-/sql-bricks-1.0.0-beta.2.tgz#c5b180b943c189f9fe40a71431459b625141b2c0" - integrity sha1-xbGAuUPBifn+QKcUMUWbYlFBssA= - dependencies: - underscore "1.4.x" - sqlite3@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-4.1.1.tgz#539a42e476640796578e22d589b3283c28055242" @@ -2749,11 +2725,6 @@ uid-safe@~2.1.5: dependencies: random-bytes "~1.0.0" -underscore@1.4.x: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= - unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" diff --git a/examples/id-hub/yarn.lock b/examples/id-hub/yarn.lock index 809c00622..6faba4b00 100644 --- a/examples/id-hub/yarn.lock +++ b/examples/id-hub/yarn.lock @@ -861,34 +861,24 @@ cross-fetch@^3.0.4: node-fetch "2.6.0" whatwg-fetch "3.0.0" -daf-core@../../packages/daf-core, daf-core@^4.0.0-beta.39+63dd12d: - version "4.0.0-beta.39" +daf-core@../../packages/daf-core, daf-core@^4.0.0-beta.45: + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" debug "^4.1.1" events "^3.0.0" typeorm "^0.2.24" -daf-data-store@^4.0.0-beta.39+63dd12d: - version "4.0.0-beta.39" - resolved "https://registry.yarnpkg.com/daf-data-store/-/daf-data-store-4.0.0-beta.39.tgz#e328aa8b5583a07a2e279f5e3da0df65721b31ff" - integrity sha512-DaOeBUZo5l9Dlg2vrFLuxCMMqZGofkFK7q72tmOMdTDUkKfP0BtacB4wmr5PeTSDOtJosKcHI3uVAHI4Ksq0Wg== +daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.45: + version "4.0.0-beta.45" dependencies: - blakejs "^1.1.0" - daf-core "^4.0.0-beta.39+63dd12d" - debug "^4.1.1" - sql-bricks-sqlite "^0.1.0" - -daf-did-jwt@../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.39+63dd12d: - version "4.0.0-beta.39" - dependencies: - daf-core "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" did-resolver "^1.1.0" daf-resolver@../../packages/daf-resolver: - version "3.0.1" + version "4.0.0-beta.45" dependencies: debug "^4.1.1" did-resolver "^1.1.0" @@ -897,22 +887,21 @@ daf-resolver@../../packages/daf-resolver: web-did-resolver "^1.2.0" daf-selective-disclosure@../../packages/daf-selective-disclosure: - version "4.0.0-beta.41" + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" - daf-core "^4.0.0-beta.39+63dd12d" - daf-data-store "^4.0.0-beta.39+63dd12d" - daf-did-jwt "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" + daf-did-jwt "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" typeorm "^0.2.24" daf-w3c@../../packages/daf-w3c: - version "4.0.0-beta.39" + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" - daf-core "^4.0.0-beta.39+63dd12d" - daf-did-jwt "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" + daf-did-jwt "^4.0.0-beta.45" debug "^4.1.1" did-jwt-vc "^0.1.3" did-resolver "^1.1.0" @@ -2401,21 +2390,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-bricks-sqlite@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/sql-bricks-sqlite/-/sql-bricks-sqlite-0.1.0.tgz#5d193589e512e8f8176fdecf19c5bdae5f352550" - integrity sha1-XRk1ieUS6PgXb97PGcW9rl81JVA= - dependencies: - sql-bricks "1.0.0-beta.2" - underscore "1.4.x" - -sql-bricks@1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/sql-bricks/-/sql-bricks-1.0.0-beta.2.tgz#c5b180b943c189f9fe40a71431459b625141b2c0" - integrity sha1-xbGAuUPBifn+QKcUMUWbYlFBssA= - dependencies: - underscore "1.4.x" - sqlite3@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-4.1.1.tgz#539a42e476640796578e22d589b3283c28055242" @@ -2702,11 +2676,6 @@ typescript@^3.8.3: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== -underscore@1.4.x: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= - unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" diff --git a/examples/react-graphql/client/src/gql/queries.ts b/examples/react-graphql/client/src/gql/queries.ts index e9ef50aca..2cdf22f01 100644 --- a/examples/react-graphql/client/src/gql/queries.ts +++ b/examples/react-graphql/client/src/gql/queries.ts @@ -28,7 +28,7 @@ export const credential = gql` ` export const identity = gql` - query identity($did: ID!) { + query identity($did: String!) { identity(did: $did) { did provider @@ -67,7 +67,7 @@ export const managedIdentities = gql` ` export const queryMessage = gql` - query message($id: ID!, $defaultDid: ID!) { + query message($id: ID!, $defaultDid: String!) { message(id: $id) { id threadId @@ -121,7 +121,7 @@ export const queryMessage = gql` ` export const allMessages = gql` - query allMessages($activeDid: ID!) { + query allMessages($activeDid: String!) { identity(did: $activeDid) { did messagesAll { diff --git a/examples/react-graphql/client/src/queries.ts b/examples/react-graphql/client/src/queries.ts index 04379461f..cfd39a63d 100644 --- a/examples/react-graphql/client/src/queries.ts +++ b/examples/react-graphql/client/src/queries.ts @@ -26,7 +26,7 @@ export const credential = gql` ` export const identity = gql` - query identity($did: ID!) { + query identity($did: String!) { identity(did: $did) { did provider @@ -94,7 +94,7 @@ export const actionSendJwt = gql` ` export const allMessages = gql` - query allMessages($activeDid: ID!) { + query allMessages($activeDid: String!) { identity(did: $activeDid) { did messagesAll { diff --git a/examples/react-graphql/server/index.ts b/examples/react-graphql/server/index.ts index 2c4f0b2af..a7d85c75c 100644 --- a/examples/react-graphql/server/index.ts +++ b/examples/react-graphql/server/index.ts @@ -1,5 +1,4 @@ import * as Daf from 'daf-core' -import * as DS from 'daf-data-store' import { JwtMessageHandler } from 'daf-did-jwt' import { W3cMessageHandler, W3cActionHandler, W3cGql } from 'daf-w3c' import { SdrMessageHandler, SdrActionHandler, SdrGql } from 'daf-selective-disclosure' @@ -54,8 +53,6 @@ export const agent = new Daf.Agent({ actionHandler, }) -const dataStore = new DS.DataStore() - const server = new ApolloServer({ typeDefs: [ Daf.Gql.baseTypeDefs, @@ -80,7 +77,7 @@ const server = new ApolloServer({ throw Error('Auth error') } - return { agent, dataStore } + return { agent } }, introspection: true, }) diff --git a/examples/react-graphql/server/package.json b/examples/react-graphql/server/package.json index 1dc98b62b..d8aeb00ba 100644 --- a/examples/react-graphql/server/package.json +++ b/examples/react-graphql/server/package.json @@ -13,7 +13,6 @@ "dependencies": { "apollo-server": "^2.9.16", "daf-core": "../../../packages/daf-core", - "daf-data-store": "../../../packages/daf-data-store", "daf-did-jwt": "../../../packages/daf-did-jwt", "daf-ethr-did": "../../../packages/daf-ethr-did", "daf-libsodium": "../../../packages/daf-libsodium", diff --git a/examples/react-graphql/server/yarn.lock b/examples/react-graphql/server/yarn.lock index 98caab9f8..741b85282 100644 --- a/examples/react-graphql/server/yarn.lock +++ b/examples/react-graphql/server/yarn.lock @@ -867,44 +867,36 @@ cross-fetch@^3.0.4: node-fetch "2.6.0" whatwg-fetch "3.0.0" -daf-core@../../../packages/daf-core, daf-core@^4.0.0-beta.39+63dd12d: - version "4.0.0-beta.39" +daf-core@../../../packages/daf-core, daf-core@^4.0.0-beta.45: + version "4.0.0-beta.45" 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 "4.0.0-beta.39" +daf-did-jwt@../../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.45: + version "4.0.0-beta.45" dependencies: - blakejs "^1.1.0" - daf-core "^4.0.0-beta.39+63dd12d" - debug "^4.1.1" - sql-bricks-sqlite "^0.1.0" - -daf-did-jwt@../../../packages/daf-did-jwt, daf-did-jwt@^4.0.0-beta.39+63dd12d: - version "4.0.0-beta.39" - dependencies: - daf-core "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" did-resolver "^1.1.0" daf-ethr-did@../../../packages/daf-ethr-did: - version "4.0.0-beta.39" + version "4.0.0-beta.45" dependencies: - daf-core "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" 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 "4.0.0-beta.39" + version "4.0.0-beta.45" dependencies: base-58 "^0.0.1" - daf-core "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" elliptic "^6.5.2" @@ -912,7 +904,7 @@ daf-libsodium@../../../packages/daf-libsodium: libsodium-wrappers "^0.7.6" daf-resolver@../../../packages/daf-resolver: - version "3.0.1" + version "4.0.0-beta.45" dependencies: debug "^4.1.1" did-resolver "^1.1.0" @@ -921,7 +913,7 @@ daf-resolver@../../../packages/daf-resolver: web-did-resolver "^1.2.0" daf-trust-graph@../../../packages/daf-trust-graph: - version "4.0.0-beta.39" + version "4.0.0-beta.45" dependencies: apollo-cache-inmemory "^1.6.3" apollo-client "^2.6.4" @@ -930,7 +922,7 @@ 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 "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" debug "^4.1.1" did-jwt "^4.0.0" graphql "^14.0.0" @@ -938,11 +930,11 @@ daf-trust-graph@../../../packages/daf-trust-graph: subscriptions-transport-ws "^0.9.0" daf-w3c@../../../packages/daf-w3c: - version "4.0.0-beta.39" + version "4.0.0-beta.45" dependencies: blakejs "^1.1.0" - daf-core "^4.0.0-beta.39+63dd12d" - daf-did-jwt "^4.0.0-beta.39+63dd12d" + daf-core "^4.0.0-beta.45" + daf-did-jwt "^4.0.0-beta.45" debug "^4.1.1" did-jwt-vc "^0.1.3" did-resolver "^1.1.0" @@ -2244,21 +2236,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sql-bricks-sqlite@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/sql-bricks-sqlite/-/sql-bricks-sqlite-0.1.0.tgz#5d193589e512e8f8176fdecf19c5bdae5f352550" - integrity sha1-XRk1ieUS6PgXb97PGcW9rl81JVA= - dependencies: - sql-bricks "1.0.0-beta.2" - underscore "1.4.x" - -sql-bricks@1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/sql-bricks/-/sql-bricks-1.0.0-beta.2.tgz#c5b180b943c189f9fe40a71431459b625141b2c0" - integrity sha1-xbGAuUPBifn+QKcUMUWbYlFBssA= - dependencies: - underscore "1.4.x" - "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" @@ -2452,11 +2429,6 @@ typescript@^3.7.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== -underscore@1.4.x: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= - unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" diff --git a/examples/send-vc/tsconfig.json b/examples/send-vc/tsconfig.json index ced4593de..9418d9021 100644 --- a/examples/send-vc/tsconfig.json +++ b/examples/send-vc/tsconfig.json @@ -16,7 +16,6 @@ "exclude": ["**/__tests__/**/*", "**/build/**/*"], "references": [ { "path": "../../packages/daf-core" }, - { "path": "../../packages/daf-data-store" }, { "path": "../../packages/daf-did-comm" }, { "path": "../../packages/daf-did-jwt" }, { "path": "../../packages/daf-ethr-did" },