Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Browser Exports #68

Merged
merged 6 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/crypto/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable-source-maps": true
}
8 changes: 4 additions & 4 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/crypto",
"version": "0.1.0",
"version": "0.1.1",
"description": "TBD crypto library",
"type": "module",
"main": "./dist/cjs/main.cjs",
Expand Down Expand Up @@ -52,8 +52,8 @@
}
},
"browser": {
"./dist/esm/index.js": "./dist/browser.mjs",
"./dist/cjs/index.js": "./dist/browser.js",
"./dist/esm/main.mjs": "./dist/browser.mjs",
"./dist/cjs/main.cjs": "./dist/browser.js",
"types": "./dist/types/main.d.ts"
},
"keywords": [
Expand Down Expand Up @@ -96,4 +96,4 @@
"rimraf": "4.4.0",
"typescript": "5.0.4"
}
}
}
3 changes: 3 additions & 0 deletions packages/dids/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable-source-maps": true
}
10 changes: 5 additions & 5 deletions packages/dids/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/dids",
"version": "0.1.0",
"version": "0.1.1",
"description": "TBD DIDs library",
"type": "module",
"main": "./dist/cjs/main.cjs",
Expand Down Expand Up @@ -52,8 +52,8 @@
}
},
"browser": {
"./dist/esm/index.js": "./dist/browser.mjs",
"./dist/cjs/index.js": "./dist/browser.js",
"./dist/esm/main.mjs": "./dist/browser.mjs",
"./dist/cjs/main.cjs": "./dist/browser.js",
"types": "./dist/types/main.d.ts"
},
"keywords": [
Expand All @@ -74,8 +74,8 @@
},
"dependencies": {
"@decentralized-identity/ion-tools": "1.0.7",
"@tbd54566975/crypto": "0.1.0",
"@tbd54566975/dwn-sdk-js": "0.0.32-unstable-2023-05-15-1350300",
"@tbd54566975/crypto": "0.1.1",
"@tbd54566975/dwn-sdk-js": "0.0.32",
"cross-fetch": "3.1.5"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/web5-agent/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable-source-maps": true
}
8 changes: 4 additions & 4 deletions packages/web5-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/web5-agent",
"version": "0.1.0",
"version": "0.1.1",
"description": "Web5 Agent",
"type": "module",
"main": "./dist/cjs/main.cjs",
Expand Down Expand Up @@ -52,8 +52,8 @@
}
},
"browser": {
"./dist/esm/index.js": "./dist/browser.mjs",
"./dist/cjs/index.js": "./dist/browser.js",
"./dist/esm/main.mjs": "./dist/browser.mjs",
"./dist/cjs/main.cjs": "./dist/browser.js",
"types": "./dist/types/main.d.ts"
},
"keywords": [
Expand All @@ -71,7 +71,7 @@
},
"dependencies": {
"readable-stream": "4.4.0",
"@tbd54566975/dwn-sdk-js": "0.0.32-unstable-2023-05-15-1350300"
"@tbd54566975/dwn-sdk-js": "0.0.32"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.59.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/web5-proxy-agent/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable-source-maps": true
}
8 changes: 4 additions & 4 deletions packages/web5-proxy-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/web5-proxy-agent",
"version": "0.1.0",
"version": "0.1.1",
"description": "Web5 Proxy Agent",
"type": "module",
"main": "./dist/cjs/main.cjs",
Expand Down Expand Up @@ -52,8 +52,8 @@
}
},
"browser": {
"./dist/esm/index.js": "./dist/browser.mjs",
"./dist/cjs/index.js": "./dist/browser.js",
"./dist/esm/main.mjs": "./dist/browser.mjs",
"./dist/cjs/main.cjs": "./dist/browser.js",
"types": "./dist/types/main.d.ts"
},
"keywords": [
Expand All @@ -70,7 +70,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@tbd54566975/web5-agent": "0.1.0"
"@tbd54566975/web5-agent": "0.1.1"
},
"devDependencies": {
"@types/chai": "4.3.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/web5-user-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/web5-user-agent",
"version": "0.1.0",
"version": "0.1.1",
"description": "Web5 User Agent",
"type": "module",
"main": "./dist/cjs/main.cjs",
Expand Down Expand Up @@ -52,8 +52,8 @@
}
},
"browser": {
"./dist/esm/index.js": "./dist/browser.mjs",
"./dist/cjs/index.js": "./dist/browser.js",
"./dist/esm/main.mjs": "./dist/browser.mjs",
"./dist/cjs/main.cjs": "./dist/browser.js",
"types": "./dist/types/main.d.ts"
},
"keywords": [
Expand All @@ -71,8 +71,8 @@
},
"dependencies": {
"@decentralized-identity/ion-tools": "1.0.7",
"@tbd54566975/dids": "0.1.0",
"@tbd54566975/dwn-sdk-js": "0.0.32-unstable-2023-05-15-1350300",
"@tbd54566975/dids": "0.1.1",
"@tbd54566975/dwn-sdk-js": "0.0.32",
"abstract-level": "1.0.3",
"cross-fetch": "3.1.5",
"flat": "5.0.2",
Expand Down
18 changes: 9 additions & 9 deletions packages/web5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/web5",
"version": "0.7.0",
"version": "0.7.1",
"description": "SDK for accessing the features and capabilities of Web5",
"type": "module",
"main": "./dist/cjs/main.cjs",
Expand Down Expand Up @@ -52,8 +52,8 @@
}
},
"browser": {
"./dist/esm/index.js": "./dist/browser.mjs",
"./dist/cjs/index.js": "./dist/browser.js",
"./dist/esm/main.mjs": "./dist/browser.mjs",
"./dist/cjs/main.cjs": "./dist/browser.js",
"types": "./dist/types/main.d.ts"
},
"keywords": [
Expand All @@ -75,12 +75,12 @@
},
"dependencies": {
"@decentralized-identity/ion-tools": "1.0.7",
"@tbd54566975/crypto": "0.1.0",
"@tbd54566975/dids": "0.1.0",
"@tbd54566975/dwn-sdk-js": "0.0.32-unstable-2023-05-15-1350300",
"@tbd54566975/web5-agent": "0.1.0",
"@tbd54566975/web5-proxy-agent": "0.1.0",
"@tbd54566975/web5-user-agent": "0.1.0",
"@tbd54566975/crypto": "0.1.1",
"@tbd54566975/dids": "0.1.1",
"@tbd54566975/dwn-sdk-js": "0.0.32",
"@tbd54566975/web5-agent": "0.1.1",
"@tbd54566975/web5-proxy-agent": "0.1.1",
"@tbd54566975/web5-user-agent": "0.1.1",
"cross-fetch": "3.1.5",
"level": "8.0.0",
"ms": "2.1.3",
Expand Down
10 changes: 8 additions & 2 deletions packages/web5/src/dwn-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type ProtocolsQueryRequest = {
}

export type ProtocolsQueryResponse = {
protocols: ProtocolsQueryReplyEntry[];
protocols: Protocol[];
status: MessageReply['status'];
}

Expand Down Expand Up @@ -158,7 +158,13 @@ export class DwnApi {
});

const { reply: { entries, status } } = agentResponse;
const protocols = entries as ProtocolsQueryReplyEntry[];
// const protocols = entries as ProtocolsQueryReplyEntry[];

const protocols = entries.map((entry: ProtocolsQueryReplyEntry) => {
const metadata = { author: this.connectedDid, };

return new Protocol(this.web5Agent, entry, metadata);
});

return { protocols, status };
}
Expand Down
Loading