From 2a3b31e679f6613d822a36c5e77c7eeba2d58f00 Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 21 Nov 2024 10:32:33 +0100 Subject: [PATCH 1/2] fix build - add missing deps - fix export paths for esm build --- packages/js-sdk/package.json | 14 +++++++++++--- packages/js-sdk/src/index.ts | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 packages/js-sdk/src/index.ts diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 785cbc41d..b6903ad5d 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -2,8 +2,13 @@ "name": "@dm3-org/dm3-js-sdk", "license": "BSD-2-Clause", "version": "0.0.1", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./lib/esm/index.js", + "types": "./lib/esm/index.d.ts", + "exports": { + ".": { + "import": "./lib/esm/index.js" + } + }, "dependencies": { "@dm3-org/dm3-lib-crypto": "workspace:^", "@dm3-org/dm3-lib-delivery": "workspace:^", @@ -11,12 +16,15 @@ "@dm3-org/dm3-lib-profile": "workspace:^", "@dm3-org/dm3-lib-server-side": "workspace:^", "@dm3-org/dm3-lib-shared": "workspace:^", + "@dm3-org/dm3-lib-smart-account": "workspace:^", "@dm3-org/dm3-lib-storage": "workspace:^", "@dm3-org/dm3-lib-test-helper": "workspace:^", "@web3-name-sdk/core": "^0.2.0", "axios": "^0.27.2", "dotenv": "^16.0.1", - "ethers": "5.7.2" + "ethers": "5", + "siwe": "^2.3.2", + "socket.io-client": "^4.8.1" }, "scripts": { "test": "jest --coverage --transformIgnorePatterns 'node_modules/(?!(dm3-lib-\\w*)/)'", diff --git a/packages/js-sdk/src/index.ts b/packages/js-sdk/src/index.ts new file mode 100644 index 000000000..3d7651c78 --- /dev/null +++ b/packages/js-sdk/src/index.ts @@ -0,0 +1,2 @@ +export * from './Dm3Sdk'; +export * from './Dm3'; From 85e0f2e459435defa578cd28e5d52916dc3c7f39 Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 21 Nov 2024 10:39:59 +0100 Subject: [PATCH 2/2] update yarn.lock --- yarn.lock | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 618697925..9f5862fc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2224,6 +2224,7 @@ __metadata: "@dm3-org/dm3-lib-profile": "workspace:^" "@dm3-org/dm3-lib-server-side": "workspace:^" "@dm3-org/dm3-lib-shared": "workspace:^" + "@dm3-org/dm3-lib-smart-account": "workspace:^" "@dm3-org/dm3-lib-storage": "workspace:^" "@dm3-org/dm3-lib-test-helper": "workspace:^" "@types/supertest": ^2.0.12 @@ -2233,10 +2234,12 @@ __metadata: babel-jest: ^29.2.2 babel-preset-env: ^1.7.0 dotenv: ^16.0.1 - ethers: 5.7.2 + ethers: 5 jest: ^29.2.2 jest-mock-extended: 2.0.4 prettier: ^2.6.2 + siwe: ^2.3.2 + socket.io-client: ^4.8.1 superagent: ^8.0.3 ts-jest: ^28.0.4 typescript: ^4.4.2 @@ -15100,6 +15103,19 @@ __metadata: languageName: node linkType: hard +"engine.io-client@npm:~6.6.1": + version: 6.6.2 + resolution: "engine.io-client@npm:6.6.2" + dependencies: + "@socket.io/component-emitter": ~3.1.0 + debug: ~4.3.1 + engine.io-parser: ~5.2.1 + ws: ~8.17.1 + xmlhttprequest-ssl: ~2.1.1 + checksum: f80565ea034fd0ab0bebbd65dd9419cd49fb1e625d8fbd21b8ffb59c7d0575481906e9d85c5a603272badd718e65abf0ef1e3e080b5b177d698b2ea9aa20f6af + languageName: node + linkType: hard + "engine.io-parser@npm:~5.2.1": version: 5.2.1 resolution: "engine.io-parser@npm:5.2.1" @@ -16633,7 +16649,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:5.7.2, ethers@npm:^5.0.13, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2": +"ethers@npm:5, ethers@npm:5.7.2, ethers@npm:^5.0.13, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -29724,6 +29740,18 @@ __metadata: languageName: node linkType: hard +"socket.io-client@npm:^4.8.1": + version: 4.8.1 + resolution: "socket.io-client@npm:4.8.1" + dependencies: + "@socket.io/component-emitter": ~3.1.0 + debug: ~4.3.2 + engine.io-client: ~6.6.1 + socket.io-parser: ~4.2.4 + checksum: 0ac31d224c7a8567d95bb0522214cc0d3dfa1fbf6de38e63d9aa8e806526e27381d06a527d39e02f173199c48ad112737107148d2e60e1c48a6a8e15391dce8d + languageName: node + linkType: hard + "socket.io-parser@npm:~4.2.4": version: 4.2.4 resolution: "socket.io-parser@npm:4.2.4" @@ -34972,6 +35000,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:~8.17.1": + version: 8.17.1 + resolution: "ws@npm:8.17.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf + languageName: node + linkType: hard + "xhr-request-promise@npm:^0.1.2": version: 0.1.3 resolution: "xhr-request-promise@npm:0.1.3" @@ -35038,6 +35081,13 @@ __metadata: languageName: node linkType: hard +"xmlhttprequest-ssl@npm:~2.1.1": + version: 2.1.2 + resolution: "xmlhttprequest-ssl@npm:2.1.2" + checksum: f8ecb894301dd024804669245888b3d5ceed2dfcdb4fddb0e38d811a07a2e3c227535f29b269eccf92005819457db3f270d2ff98df516abf95cfad1b9759512d + languageName: node + linkType: hard + "xmlhttprequest@npm:1.8.0": version: 1.8.0 resolution: "xmlhttprequest@npm:1.8.0"