From 671a566797b3daad4048604b17d3f467f814cd7d Mon Sep 17 00:00:00 2001 From: Maycon Date: Tue, 8 Oct 2024 14:01:07 -0300 Subject: [PATCH 1/4] update release scripts --- package.json | 1 - packages/core/package.json | 4 +- packages/data-store-typeorm/package.json | 2 +- packages/data-store-web/.npmignore | 1 + packages/data-store-web/package.json | 4 +- .../data-store-web/src/localStorageJSON.ts | 16 +++++++- packages/data-store/.npmignore | 1 + packages/data-store/package.json | 4 +- packages/dids/.npmignore | 3 ++ packages/dids/package.json | 4 +- packages/relay-service/.npmignore | 2 + packages/relay-service/package.json | 4 +- packages/request-logger/lib/request-logger.js | 2 +- packages/wasm/.npmignore | 3 +- packages/wasm/package.json | 8 +++- scripts/fix-build-imports.js | 39 +++++++++++++++++++ yarn.lock | 32 ++++++++++++++- 17 files changed, 111 insertions(+), 19 deletions(-) create mode 100644 packages/dids/.npmignore create mode 100644 packages/relay-service/.npmignore create mode 100644 scripts/fix-build-imports.js diff --git a/package.json b/package.json index 3a026ff6..6b48a2ec 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,6 @@ "titleTemplate": "{title}" }, "dependencies": { - "@astronautlabs/jsonpath": "^1.1.2", "@babel/node": "^7.22.10", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-private-methods": "^7.18.6", diff --git a/packages/core/package.json b/packages/core/package.json index 59e6be95..32f3b0c5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-core", - "version": "0.4.19", + "version": "0.4.22", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -10,7 +10,7 @@ "scripts": { "test": "jest", "prepublishOnly": "npm run build", - "build": "tsc -p tsconfig.build.json" + "build": "rm -rf lib && rm -rf tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json && node ../../scripts/fix-build-imports.js ./lib" }, "peerDependencies": { "typeorm": "^0.3.15", diff --git a/packages/data-store-typeorm/package.json b/packages/data-store-typeorm/package.json index 46fdbc01..8f250df1 100644 --- a/packages/data-store-typeorm/package.json +++ b/packages/data-store-typeorm/package.json @@ -11,7 +11,7 @@ }, "scripts": { "test": "jest", - "build": "tsc -p tsconfig.build.json" + "build": "rm -rf lib && rm -rf tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json && node ../../scripts/fix-build-imports.js ./lib" }, "peerDependencies": { "typeorm": "^0.3.15" diff --git a/packages/data-store-web/.npmignore b/packages/data-store-web/.npmignore index 56353081..7648afca 100644 --- a/packages/data-store-web/.npmignore +++ b/packages/data-store-web/.npmignore @@ -1,2 +1,3 @@ node_modules/ sqlite/ +.rollup.cache/ \ No newline at end of file diff --git a/packages/data-store-web/package.json b/packages/data-store-web/package.json index 0cb7cceb..bd3736f1 100644 --- a/packages/data-store-web/package.json +++ b/packages/data-store-web/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-data-store-web", - "version": "0.4.19", + "version": "0.4.22", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -11,7 +11,7 @@ }, "scripts": { "test": "jest", - "build": "tsc -p tsconfig.build.json" + "build": "rm -rf lib && rm -rf tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json && node ../../scripts/fix-build-imports.js ./lib" }, "peerDependencies": { "typeorm": "^0.3.15" diff --git a/packages/data-store-web/src/localStorageJSON.ts b/packages/data-store-web/src/localStorageJSON.ts index 3d7649cc..45c8c515 100644 --- a/packages/data-store-web/src/localStorageJSON.ts +++ b/packages/data-store-web/src/localStorageJSON.ts @@ -1,4 +1,18 @@ -let _localStorage; +let _localStorage = (() => { + let data = {}; + + return { + getItem: (key) => { + return data[key]; + }, + setItem: (key, value) => { + data[key] = value; + }, + removeItem: (key) => { + delete data[key]; + }, + }; +})(); export const setLocalStorageImpl = (impl: any) => { _localStorage = impl; diff --git a/packages/data-store/.npmignore b/packages/data-store/.npmignore index 56353081..7648afca 100644 --- a/packages/data-store/.npmignore +++ b/packages/data-store/.npmignore @@ -1,2 +1,3 @@ node_modules/ sqlite/ +.rollup.cache/ \ No newline at end of file diff --git a/packages/data-store/package.json b/packages/data-store/package.json index b5344be6..54494480 100644 --- a/packages/data-store/package.json +++ b/packages/data-store/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-data-store", - "version": "0.4.19", + "version": "0.4.22", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -11,7 +11,7 @@ }, "scripts": { "test": "jest", - "build": "tsc -p tsconfig.build.json" + "build": "rm -rf lib && rm -rf tsconfig.build.tsbuildinfo && tsc -p tsconfig.build.json && node ../../scripts/fix-build-imports.js ./lib" }, "peerDependencies": { "typeorm": "^0.3.15" diff --git a/packages/dids/.npmignore b/packages/dids/.npmignore new file mode 100644 index 00000000..7648afca --- /dev/null +++ b/packages/dids/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +sqlite/ +.rollup.cache/ \ No newline at end of file diff --git a/packages/dids/package.json b/packages/dids/package.json index 57bc3e65..8e3f5bbc 100644 --- a/packages/dids/package.json +++ b/packages/dids/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-dids", - "version": "0.4.19", + "version": "0.4.22", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -14,7 +14,7 @@ }, "scripts": { "prepublishOnly": "npm run build", - "build": "rm -rf lib && NODE_ENV=production babel src/ --out-dir lib --copy-files" + "build": "rm -rf lib && NODE_ENV=production babel src/ --out-dir lib --copy-files && node ../../scripts/fix-build-imports.js ./lib" }, "devDependencies": { "@babel/cli": "^7.17.10", diff --git a/packages/relay-service/.npmignore b/packages/relay-service/.npmignore new file mode 100644 index 00000000..3d5d84c5 --- /dev/null +++ b/packages/relay-service/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +.rollup.cache/ \ No newline at end of file diff --git a/packages/relay-service/package.json b/packages/relay-service/package.json index 4d5b7d6e..8939b5ec 100644 --- a/packages/relay-service/package.json +++ b/packages/relay-service/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-relay-service", - "version": "0.4.19", + "version": "0.4.22", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -8,7 +8,7 @@ "directory": "packages/relay-service" }, "scripts": { - "build": "rm -rf lib && rollup -c" + "build": "rm -rf lib && rollup -c && node ../../scripts/fix-build-imports.js ./lib" }, "dependencies": { "uuid": "^9.0.0", diff --git a/packages/request-logger/lib/request-logger.js b/packages/request-logger/lib/request-logger.js index 912d7d93..d864e054 100644 --- a/packages/request-logger/lib/request-logger.js +++ b/packages/request-logger/lib/request-logger.js @@ -2,7 +2,7 @@ import assert from 'assert'; import {v4 as uuidv4} from 'uuid'; -import { getLocalStorage } from '@docknetwork/wallet-sdk-data-store/src'; +import { getLocalStorage } from '@docknetwork/wallet-sdk-data-store/lib'; async function getAllLogs() { diff --git a/packages/wasm/.npmignore b/packages/wasm/.npmignore index 40b878db..3d5d84c5 100644 --- a/packages/wasm/.npmignore +++ b/packages/wasm/.npmignore @@ -1 +1,2 @@ -node_modules/ \ No newline at end of file +node_modules/ +.rollup.cache/ \ No newline at end of file diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 3eae5e9c..7088892f 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-wasm", - "version": "0.4.19", + "version": "0.4.23", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -10,7 +10,7 @@ "scripts": { "prepublishOnly": "npm run build", "build:babel": "rm -rf lib && NODE_ENV=production babel src/ --out-dir lib --copy-files", - "build": "rm -rf lib && rollup -c" + "build": "rm -rf lib && rollup -c && node ../../scripts/fix-build-imports.js ./lib" }, "resolutions": { "@polkadot/wasm-crypto": "6.3.1", @@ -25,7 +25,9 @@ "@polkadot/util-crypto": "10.1.11" }, "dependencies": { + "@astronautlabs/jsonpath": "^1.1.2", "@docknetwork/universal-wallet": "^2.0.1", + "@docknetwork/wallet-sdk-dids": "^0.4.22", "@polkadot/api": "9.7.1", "@polkadot/keyring": "10.1.11", "@polkadot/rpc-core": "9.7.1", @@ -37,6 +39,8 @@ "@polkadot/util-crypto": "10.1.11", "@polkadot/wasm-crypto": "6.3.1", "@docknetwork/sdk": "8.6.0", + "@sphereon/oid4vci-client": "^0.16.0", + "@sphereon/oid4vci-common": "^0.16.0", "axios": "^0.25.0", "babel-node": "^0.0.1-security", "bignumber.js": "^9.0.1", diff --git a/scripts/fix-build-imports.js b/scripts/fix-build-imports.js new file mode 100644 index 00000000..95130079 --- /dev/null +++ b/scripts/fix-build-imports.js @@ -0,0 +1,39 @@ +const fs = require('fs'); +const path = require('path'); + +// Get directory from command-line argument +const directory = process.argv[2]; + +if (!directory) { + console.error('Usage: node fix-build-imports.js '); + process.exit(1); +} + +// Regular expression to match any occurrence of `@docknetwork/wallet-sdk-[any package]/src` +const referenceRegex = /(@docknetwork\/wallet-sdk-[^/]+)\/src\b/g; + +// Function to replace paths in files +function replacePathsInFile(filePath) { + let fileContent = fs.readFileSync(filePath, 'utf8'); + const newContent = fileContent.replace(referenceRegex, '$1/lib'); + + if (newContent !== fileContent) { + fs.writeFileSync(filePath, newContent, 'utf8'); + console.log(`Updated: ${filePath}`); + } +} + +// Function to recursively process files in the directory +function processDirectory(directory) { + fs.readdirSync(directory).forEach((file) => { + const filePath = path.join(directory, file); + if (fs.statSync(filePath).isDirectory()) { + processDirectory(filePath); + } else if (filePath.endsWith('.js') || filePath.endsWith('.ts') || filePath.endsWith('.jsx') || filePath.endsWith('.tsx')) { + replacePathsInFile(filePath); + } + }); +} + +processDirectory(directory); +console.log('Replacement complete!'); diff --git a/yarn.lock b/yarn.lock index d678aec2..2de7d394 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3138,7 +3138,7 @@ resolved "https://registry.yarnpkg.com/@docknetwork/node-types/-/node-types-0.17.0.tgz#ca0ddb5b819e012e8f2f112353008325de4f3e33" integrity sha512-aSRFtCwLhdhcY1wqX3WfhPpY2QXVqaB9kNB3e5+ajCWXtc0wuKJePpnSZEO4RqUEUKV5Y3LcsQ52ZB+aJ1PpFw== -"@docknetwork/sdk@8.6.0": +"@docknetwork/sdk@8.0.0", "@docknetwork/sdk@8.6.0": version "8.6.0" resolved "https://registry.yarnpkg.com/@docknetwork/sdk/-/sdk-8.6.0.tgz#aac2e0097ff79c74ea9d8836eea2cb8a2b8a71c7" integrity sha512-aPW6f915n5fl4a1/kxe4J52Polqxg7/H0LJSRCeGbLpQntKRVkJ3u9x1aaKSRPnYvsFEgao/skuiFetupn64hg== @@ -3202,6 +3202,34 @@ babel-polyfill "^6.26.0" base58-universal "1.0.0" +"@docknetwork/wallet-sdk-wasm@0.4.19": + version "0.4.19" + resolved "https://registry.yarnpkg.com/@docknetwork/wallet-sdk-wasm/-/wallet-sdk-wasm-0.4.19.tgz#d591b1c1d88453542a11adfeca51b79127512187" + integrity sha512-du4a945CK0dzceOStCneF9xdtS/PSxeGY+YlBDqKWLpZ0vz0mKoWCu5BW55Kog1FpjpJvXEKrffHWPgG0iRfIw== + dependencies: + "@docknetwork/sdk" "8.0.0" + "@docknetwork/universal-wallet" "^2.0.1" + "@polkadot/api" "9.7.1" + "@polkadot/keyring" "10.1.11" + "@polkadot/rpc-core" "9.7.1" + "@polkadot/rpc-provider" "9.7.1" + "@polkadot/types" "9.7.1" + "@polkadot/types-known" "9.7.1" + "@polkadot/ui-shared" "3.4.1" + "@polkadot/util" "10.1.11" + "@polkadot/util-crypto" "10.1.11" + "@polkadot/wasm-crypto" "6.3.1" + "@sphereon/pex" "^1.1.4" + axios "^0.25.0" + axios-retry "^3.2.5" + babel-node "^0.0.1-security" + bignumber.js "^9.0.1" + cwait "1.1.2" + json-rpc-2.0 "^0.2.16" + react-native-keychain "^8.0.0" + uuid "^8.3.2" + winston "^3.3.3" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" @@ -4588,7 +4616,7 @@ cross-fetch "^3.1.8" debug "^4.3.5" -"@sphereon/oid4vci-common@0.16.0": +"@sphereon/oid4vci-common@0.16.0", "@sphereon/oid4vci-common@^0.16.0": version "0.16.0" resolved "https://registry.yarnpkg.com/@sphereon/oid4vci-common/-/oid4vci-common-0.16.0.tgz#57cb1241ff618a5b61d25b67aa4d0914259246a9" integrity sha512-Bf937YsOP7XkI8vgQSPh4e8bwxnkMQAanEtfPv27HSQPEcHpsFtrlQ9T5TRzmb6k66E+n1k0XJXK2WzOrOt7Eg== From d6c40d81f16946e485cb0a14973ac1c4bcd31c3b Mon Sep 17 00:00:00 2001 From: Maycon Date: Tue, 8 Oct 2024 14:09:58 -0300 Subject: [PATCH 2/4] update release scripts --- packages/cli/package.json | 6 +++--- packages/core/.npmignore | 2 +- packages/core/package.json | 8 ++++---- packages/credentials/package.json | 2 +- packages/data-store-typeorm/package.json | 4 ++-- packages/data-store-web/.npmignore | 2 +- packages/data-store-web/package.json | 4 ++-- packages/data-store/.npmignore | 2 +- packages/data-store/package.json | 4 ++-- packages/dids/.npmignore | 2 +- packages/dids/package.json | 2 +- packages/react-native/package.json | 2 +- packages/relay-service/.npmignore | 2 +- packages/relay-service/package.json | 4 ++-- packages/request-logger/package.json | 2 +- packages/transactions/package.json | 2 +- packages/wasm/.npmignore | 2 +- packages/wasm/package.json | 4 ++-- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 6019d162..e2e1c892 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-cli", - "version": "0.4.19", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -13,8 +13,8 @@ "test:revocation": "ts-node src/bbs-revocation.ts" }, "dependencies": { - "@docknetwork/wallet-sdk-core": "^0.4.19", - "@docknetwork/wallet-sdk-data-store": "^0.4.19", + "@docknetwork/wallet-sdk-core": "^1.4.0", + "@docknetwork/wallet-sdk-data-store": "^1.4.0", "commander": "11.0.0", "typeorm": "^0.3.15", "sqlite3": "^5.0.2", diff --git a/packages/core/.npmignore b/packages/core/.npmignore index 40b878db..c2658d7d 100644 --- a/packages/core/.npmignore +++ b/packages/core/.npmignore @@ -1 +1 @@ -node_modules/ \ No newline at end of file +node_modules/ diff --git a/packages/core/package.json b/packages/core/package.json index 32f3b0c5..e79baa2c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-core", - "version": "0.4.22", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -16,13 +16,13 @@ "typeorm": "^0.3.15", "reflect-metadata": "^0.1.13", "sqlite3": "^5.0.2", - "@docknetwork/wallet-sdk-data-store": "^0.4.19" + "@docknetwork/wallet-sdk-data-store": "^1.4.0" }, "dependencies": { - "@docknetwork/wallet-sdk-wasm": "^0.4.19" + "@docknetwork/wallet-sdk-wasm": "^1.4.0" }, "devDependencies": { - "@docknetwork/wallet-sdk-data-store": "^0.4.19", + "@docknetwork/wallet-sdk-data-store": "^1.4.0", "jest": "29.1.0", "ts-jest": "29.1.0", "ts-node": "^10.9.1", diff --git a/packages/credentials/package.json b/packages/credentials/package.json index 9e5aee9a..d0f7dc89 100644 --- a/packages/credentials/package.json +++ b/packages/credentials/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-credentials", - "version": "0.4.19", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", diff --git a/packages/data-store-typeorm/package.json b/packages/data-store-typeorm/package.json index 8f250df1..870e0cba 100644 --- a/packages/data-store-typeorm/package.json +++ b/packages/data-store-typeorm/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-data-store-typeorm", - "version": "0.4.19", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -17,7 +17,7 @@ "typeorm": "^0.3.15" }, "dependencies": { - "@docknetwork/wallet-sdk-wasm": "^0.4.19", + "@docknetwork/wallet-sdk-wasm": "^1.4.0", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/data-store-web/.npmignore b/packages/data-store-web/.npmignore index 7648afca..2a2f0d71 100644 --- a/packages/data-store-web/.npmignore +++ b/packages/data-store-web/.npmignore @@ -1,3 +1,3 @@ node_modules/ sqlite/ -.rollup.cache/ \ No newline at end of file +.rollup.cache/ diff --git a/packages/data-store-web/package.json b/packages/data-store-web/package.json index bd3736f1..e540dd70 100644 --- a/packages/data-store-web/package.json +++ b/packages/data-store-web/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-data-store-web", - "version": "0.4.22", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -17,7 +17,7 @@ "typeorm": "^0.3.15" }, "dependencies": { - "@docknetwork/wallet-sdk-wasm": "^0.4.19", + "@docknetwork/wallet-sdk-wasm": "^1.4.0", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/data-store/.npmignore b/packages/data-store/.npmignore index 7648afca..2a2f0d71 100644 --- a/packages/data-store/.npmignore +++ b/packages/data-store/.npmignore @@ -1,3 +1,3 @@ node_modules/ sqlite/ -.rollup.cache/ \ No newline at end of file +.rollup.cache/ diff --git a/packages/data-store/package.json b/packages/data-store/package.json index 54494480..425505d2 100644 --- a/packages/data-store/package.json +++ b/packages/data-store/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-data-store", - "version": "0.4.22", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -17,7 +17,7 @@ "typeorm": "^0.3.15" }, "dependencies": { - "@docknetwork/wallet-sdk-wasm": "^0.4.19", + "@docknetwork/wallet-sdk-wasm": "^1.4.0", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/dids/.npmignore b/packages/dids/.npmignore index 7648afca..2a2f0d71 100644 --- a/packages/dids/.npmignore +++ b/packages/dids/.npmignore @@ -1,3 +1,3 @@ node_modules/ sqlite/ -.rollup.cache/ \ No newline at end of file +.rollup.cache/ diff --git a/packages/dids/package.json b/packages/dids/package.json index 8e3f5bbc..8fd17481 100644 --- a/packages/dids/package.json +++ b/packages/dids/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-dids", - "version": "0.4.22", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index d84c3568..55d90a4c 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-react-native", - "version": "0.4.19", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", diff --git a/packages/relay-service/.npmignore b/packages/relay-service/.npmignore index 3d5d84c5..fb972e1f 100644 --- a/packages/relay-service/.npmignore +++ b/packages/relay-service/.npmignore @@ -1,2 +1,2 @@ node_modules/ -.rollup.cache/ \ No newline at end of file +.rollup.cache/ diff --git a/packages/relay-service/package.json b/packages/relay-service/package.json index 8939b5ec..efe5ba17 100644 --- a/packages/relay-service/package.json +++ b/packages/relay-service/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-relay-service", - "version": "0.4.22", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -14,7 +14,7 @@ "uuid": "^9.0.0", "@docknetwork/minimal-cipher": "^5.2.1", "@docknetwork/sdk": "8.6.0", - "@docknetwork/wallet-sdk-wasm": "0.4.19" + "@docknetwork/wallet-sdk-wasm": "1.4.0" }, "devDependencies": { "jest": "29.1.0", diff --git a/packages/request-logger/package.json b/packages/request-logger/package.json index 41ef8362..29ffae81 100644 --- a/packages/request-logger/package.json +++ b/packages/request-logger/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-request-logger", - "version": "0.4.19", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", diff --git a/packages/transactions/package.json b/packages/transactions/package.json index 7584b5fe..d6cf2c0d 100644 --- a/packages/transactions/package.json +++ b/packages/transactions/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-transactions", - "version": "0.4.19", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", diff --git a/packages/wasm/.npmignore b/packages/wasm/.npmignore index 3d5d84c5..fb972e1f 100644 --- a/packages/wasm/.npmignore +++ b/packages/wasm/.npmignore @@ -1,2 +1,2 @@ node_modules/ -.rollup.cache/ \ No newline at end of file +.rollup.cache/ diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 7088892f..bcbc8d2b 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@docknetwork/wallet-sdk-wasm", - "version": "0.4.23", + "version": "1.4.0", "license": "https://github.com/docknetwork/react-native-sdk/LICENSE", "repository": { "type": "git", @@ -27,7 +27,7 @@ "dependencies": { "@astronautlabs/jsonpath": "^1.1.2", "@docknetwork/universal-wallet": "^2.0.1", - "@docknetwork/wallet-sdk-dids": "^0.4.22", + "@docknetwork/wallet-sdk-dids": "^1.4.0", "@polkadot/api": "9.7.1", "@polkadot/keyring": "10.1.11", "@polkadot/rpc-core": "9.7.1", From de82447cc17f82b534d2c8e79dfbe05012b4d3e1 Mon Sep 17 00:00:00 2001 From: Maycon Date: Tue, 8 Oct 2024 14:32:36 -0300 Subject: [PATCH 3/4] update release scripts --- packages/core/src/credential-provider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/credential-provider.ts b/packages/core/src/credential-provider.ts index 40bdb37b..ef41e3d3 100644 --- a/packages/core/src/credential-provider.ts +++ b/packages/core/src/credential-provider.ts @@ -7,6 +7,7 @@ import {IDIDProvider} from './did-provider'; export type Credential = any; + export interface ICredentialProvider { getCredentials(type?: string): Credential[]; getById(id: string): Credential; From 445ca36427821603bd192a14bfdae7d42128c004 Mon Sep 17 00:00:00 2001 From: Maycon Date: Tue, 3 Dec 2024 09:42:59 -0300 Subject: [PATCH 4/4] update dependencies --- package.json | 6 +++--- packages/core/src/cloud-wallet.ts | 4 ++++ packages/wasm/package.json | 5 ++++- scripts/fix-build-imports.js | 11 +++++++++-- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6b48a2ec..59d380ec 100644 --- a/package.json +++ b/package.json @@ -108,9 +108,9 @@ "@babel/preset-flow": "^7.16.7", "@babel/preset-typescript": "^7.22.5", "@digitalbazaar/x25519-key-agreement-key-2020": "2.1.0", - "@docknetwork/credential-sdk": "^0.6.0", - "@docknetwork/dock-blockchain-api": "^0.4.1", - "@docknetwork/dock-blockchain-modules": "^0.5.1", + "@docknetwork/credential-sdk": "0.12.0", + "@docknetwork/dock-blockchain-api": "0.6.1", + "@docknetwork/dock-blockchain-modules": "0.8.0", "@inquirer/checkbox": "^1.3.8", "@inquirer/input": "^1.2.8", "@inquirer/prompts": "^3.0.3", diff --git a/packages/core/src/cloud-wallet.ts b/packages/core/src/cloud-wallet.ts index 25eb05fa..b17bc940 100644 --- a/packages/core/src/cloud-wallet.ts +++ b/packages/core/src/cloud-wallet.ts @@ -7,6 +7,10 @@ import {edvService} from '@docknetwork/wallet-sdk-wasm/src/services/edv'; export const SYNC_MARKER_TYPE = 'SyncMarkerDocument'; +export function generateEDVKeys() { + return edvService.generateKeys() +} + export async function initializeCloudWallet({ dataStore, edvUrl, diff --git a/packages/wasm/package.json b/packages/wasm/package.json index bcbc8d2b..59794f87 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -50,7 +50,10 @@ "winston": "^3.3.3", "cwait": "1.1.2", "axios-retry": "^3.2.5", - "@sphereon/pex": "^1.1.4" + "@sphereon/pex": "^1.1.4", + "@docknetwork/credential-sdk": "0.12.0", + "@docknetwork/dock-blockchain-api": "0.6.1", + "@docknetwork/dock-blockchain-modules": "0.8.0" }, "devDependencies": { "@babel/node": "^7.16.0", diff --git a/scripts/fix-build-imports.js b/scripts/fix-build-imports.js index 95130079..d97acab8 100644 --- a/scripts/fix-build-imports.js +++ b/scripts/fix-build-imports.js @@ -25,11 +25,18 @@ function replacePathsInFile(filePath) { // Function to recursively process files in the directory function processDirectory(directory) { - fs.readdirSync(directory).forEach((file) => { + fs.readdirSync(directory).forEach(file => { const filePath = path.join(directory, file); if (fs.statSync(filePath).isDirectory()) { processDirectory(filePath); - } else if (filePath.endsWith('.js') || filePath.endsWith('.ts') || filePath.endsWith('.jsx') || filePath.endsWith('.tsx')) { + } else if ( + filePath.endsWith('.js') || + filePath.endsWith('.ts') || + filePath.endsWith('.jsx') || + filePath.endsWith('.tsx') || + filePath.endsWith('.mjs') || + filePath.endsWith('.cjs') + ) { replacePathsInFile(filePath); } });