From 80735fde1bfde0b8d7c3e270ef3bbbfe359bff91 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Mon, 27 Nov 2023 22:22:16 +0330 Subject: [PATCH] fix(demo): build --- demo/package.json | 11 ++++++++--- demo/storage-client/benchmark.ts | 4 ++-- demo/storage-client/index.ts | 4 ++-- demo/tsconfig.json | 3 ++- package.json | 3 ++- tsconfig.json | 2 +- yarn.lock | 19 ++++++++++++++++++- 7 files changed, 35 insertions(+), 11 deletions(-) diff --git a/demo/package.json b/demo/package.json index 7cf33ca0..1ed5a3a8 100644 --- a/demo/package.json +++ b/demo/package.json @@ -5,17 +5,22 @@ "author": "S. Ali Mihandoost (https://ali.mihandoost.com)", "type": "module", "private": true, + "scripts": { + "b": "yarn run build", + "build": "tsc --build" + }, "dependencies": { "@alwatr/logger": "^2.3.0", "@alwatr/math": "^1.2.1", - "@alwatr/signal": "^2.0.3", "@alwatr/storage-engine": "workspace:^", "@alwatr/storage-sdk": "workspace:^", - "@alwatr/type": "^1.2.1", "@alwatr/util": "^1.3.1", "tslib": "^2.6.2" }, "devDependencies": { - "@types/node": "^20.10.0" + "@alwatr/type": "^1.2.1", + "@types/node": "^20.10.0", + "npm-run-all": "^4.1.5", + "typescript": "^5.3.2" } } diff --git a/demo/storage-client/benchmark.ts b/demo/storage-client/benchmark.ts index 4a75655d..e55c5bea 100644 --- a/demo/storage-client/benchmark.ts +++ b/demo/storage-client/benchmark.ts @@ -1,5 +1,5 @@ import {random} from '@alwatr/math'; -import {AlwatrStorageClient} from '@alwatr/storage-sdk'; +import {AlwatrStorage} from '@alwatr/storage-sdk'; import type {AlwatrDocumentObject} from '@alwatr/type'; @@ -12,7 +12,7 @@ type User = AlwatrDocumentObject & { const token = process.env.TOKEN ?? 'YOUR_SECRET_TOKEN'; -const db = new AlwatrStorageClient({ +const db = new AlwatrStorage({ name: 'junk-data', host: '127.0.0.1', port: 9000, diff --git a/demo/storage-client/index.ts b/demo/storage-client/index.ts index 3f99713f..9e345ab1 100644 --- a/demo/storage-client/index.ts +++ b/demo/storage-client/index.ts @@ -1,4 +1,4 @@ -import {AlwatrStorageClient} from '@alwatr/storage-sdk'; +import {AlwatrStorage} from '@alwatr/storage-sdk'; import type {AlwatrDocumentObject} from '@alwatr/type'; @@ -11,7 +11,7 @@ type User = AlwatrDocumentObject & { const token = process.env.TOKEN ?? 'YOUR_SECRET_TOKEN'; -const db = new AlwatrStorageClient({ +const db = new AlwatrStorage({ name: 'user-list', host: '127.0.0.1', port: 9000, diff --git a/demo/tsconfig.json b/demo/tsconfig.json index 995ae133..17f40322 100644 --- a/demo/tsconfig.json +++ b/demo/tsconfig.json @@ -4,7 +4,8 @@ "composite": true, "tsBuildInfoFile": ".tsbuildinfo", "rootDir": ".", - "outDir": "." + "outDir": ".", + "declarationMap": false, }, "include": ["**/*.ts"], diff --git a/package.json b/package.json index 967b8ed2..933ab4c2 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "yarn": ">=4.0.0" }, "workspaces": [ - "packages/*" + "packages/*", + "demo" ], "scripts": { "b": "yarn run build", diff --git a/tsconfig.json b/tsconfig.json index fbbe5e68..8ddb28ba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,6 @@ {"path": "./packages/engine"}, {"path": "./packages/sdk"}, {"path": "./packages/api"}, - // {"path": "./demo"} + {"path": "./demo"} ] } diff --git a/yarn.lock b/yarn.lock index b711cb98..6ee73646 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,23 @@ __metadata: languageName: node linkType: hard +"@alwatr/demo@workspace:demo": + version: 0.0.0-use.local + resolution: "@alwatr/demo@workspace:demo" + dependencies: + "@alwatr/logger": "npm:^2.3.0" + "@alwatr/math": "npm:^1.2.1" + "@alwatr/storage-engine": "workspace:^" + "@alwatr/storage-sdk": "workspace:^" + "@alwatr/type": "npm:^1.2.1" + "@alwatr/util": "npm:^1.3.1" + "@types/node": "npm:^20.10.0" + npm-run-all: "npm:^4.1.5" + tslib: "npm:^2.6.2" + typescript: "npm:^5.3.2" + languageName: unknown + linkType: soft + "@alwatr/fetch@npm:^2.1.1": version: 2.1.1 resolution: "@alwatr/fetch@npm:2.1.1" @@ -87,7 +104,7 @@ __metadata: languageName: unknown linkType: soft -"@alwatr/storage-sdk@workspace:packages/sdk": +"@alwatr/storage-sdk@workspace:^, @alwatr/storage-sdk@workspace:packages/sdk": version: 0.0.0-use.local resolution: "@alwatr/storage-sdk@workspace:packages/sdk" dependencies: