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

update release scripts #289

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -109,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",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules/
node_modules/
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/wallet-sdk-core",
"version": "0.4.19",
"version": "1.4.0",
"license": "https://github.com/docknetwork/react-native-sdk/LICENSE",
"repository": {
"type": "git",
Expand All @@ -10,19 +10,19 @@
"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",
"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",
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/cloud-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/credential-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {IDIDProvider} from './did-provider';

export type Credential = any;


export interface ICredentialProvider {
getCredentials(type?: string): Credential[];
getById(id: string): Credential;
Expand Down
2 changes: 1 addition & 1 deletion packages/credentials/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions packages/data-store-typeorm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -11,13 +11,13 @@
},
"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"
},
"dependencies": {
"@docknetwork/wallet-sdk-wasm": "^0.4.19",
"@docknetwork/wallet-sdk-wasm": "^1.4.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/data-store-web/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
sqlite/
.rollup.cache/
6 changes: 3 additions & 3 deletions packages/data-store-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/wallet-sdk-data-store-web",
"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",
Expand All @@ -11,13 +11,13 @@
},
"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"
},
"dependencies": {
"@docknetwork/wallet-sdk-wasm": "^0.4.19",
"@docknetwork/wallet-sdk-wasm": "^1.4.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
16 changes: 15 additions & 1 deletion packages/data-store-web/src/localStorageJSON.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 1 addition & 0 deletions packages/data-store/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
sqlite/
.rollup.cache/
6 changes: 3 additions & 3 deletions packages/data-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/wallet-sdk-data-store",
"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",
Expand All @@ -11,13 +11,13 @@
},
"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"
},
"dependencies": {
"@docknetwork/wallet-sdk-wasm": "^0.4.19",
"@docknetwork/wallet-sdk-wasm": "^1.4.0",
"uuid": "^8.3.2"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions packages/dids/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
sqlite/
.rollup.cache/
4 changes: 2 additions & 2 deletions packages/dids/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/wallet-sdk-dids",
"version": "0.4.19",
"version": "1.4.0",
"license": "https://github.com/docknetwork/react-native-sdk/LICENSE",
"repository": {
"type": "git",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions packages/relay-service/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.rollup.cache/
6 changes: 3 additions & 3 deletions packages/relay-service/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "@docknetwork/wallet-sdk-relay-service",
"version": "0.4.19",
"version": "1.4.0",
"license": "https://github.com/docknetwork/react-native-sdk/LICENSE",
"repository": {
"type": "git",
"url": "git+https://github.com/docknetwork/react-native-sdk.git",
"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",
"@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",
Expand Down
2 changes: 1 addition & 1 deletion packages/request-logger/lib/request-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion packages/request-logger/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/transactions/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion packages/wasm/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
.rollup.cache/
13 changes: 10 additions & 3 deletions packages/wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/wallet-sdk-wasm",
"version": "0.4.19",
"version": "1.4.0",
"license": "https://github.com/docknetwork/react-native-sdk/LICENSE",
"repository": {
"type": "git",
Expand All @@ -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",
Expand All @@ -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": "^1.4.0",
"@polkadot/api": "9.7.1",
"@polkadot/keyring": "10.1.11",
"@polkadot/rpc-core": "9.7.1",
Expand All @@ -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",
Expand All @@ -46,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",
Expand Down
46 changes: 46 additions & 0 deletions scripts/fix-build-imports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 <directory>');
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') ||
filePath.endsWith('.mjs') ||
filePath.endsWith('.cjs')
) {
replacePathsInFile(filePath);
}
});
}

processDirectory(directory);
console.log('Replacement complete!');
Loading
Loading