From 6e74e9e5ea9d9937e70acb423fa4aaab6715378f Mon Sep 17 00:00:00 2001 From: "S. Amir Mohammad Najafi" Date: Tue, 26 Dec 2023 15:10:43 +0330 Subject: [PATCH] feat(engine5): import from workspace package --- packages/engine5/package.json | 2 ++ packages/engine5/src/alwatr-store.ts | 15 ++++++--------- packages/engine5/src/lib/store-file-stat.ts | 2 +- yarn.lock | 4 +++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/engine5/package.json b/packages/engine5/package.json index 414085dd..b7691c22 100644 --- a/packages/engine5/package.json +++ b/packages/engine5/package.json @@ -68,6 +68,8 @@ "devDependencies": { "@alwatr/nano-build": "^1.2.1", "@alwatr/prettier-config": "^1.0.4", + "@alwatr/store-reference": "workspace:^", + "@alwatr/store-types": "workspace:^", "@alwatr/tsconfig-base": "^1.0.5", "@alwatr/type": "^1.2.4", "@types/node": "^20.10.5", diff --git a/packages/engine5/src/alwatr-store.ts b/packages/engine5/src/alwatr-store.ts index 8989937a..b13fc31a 100644 --- a/packages/engine5/src/alwatr-store.ts +++ b/packages/engine5/src/alwatr-store.ts @@ -1,20 +1,17 @@ -import {CollectionReference} from './lib/collection-reference.js'; -import {DocumentReference} from './lib/document-reference.js'; -import {WriteFileMode, existsSync, readJsonFile, resolve, unlink, writeJsonFile} from './lib/util.js'; -import {logger} from './logger.js'; +import {CollectionReference, DocumentReference} from '@alwatr/store-reference'; import { StoreFileType, StoreFileExtension, Region, - StoreFileTTL, type StoreFileStat, - type AlwatrStoreConfig, type StoreFileContext, type CollectionContext, - type DocumentContext, -} from './type.js'; + DocumentContext, +} from '@alwatr/store-types'; -export {Region, StoreFileTTL}; +import {StoreFileStatModel} from './lib/store-file-stat.js' +import {WriteFileMode, existsSync, readJsonFile, resolve, unlink, writeJsonFile} from './lib/util.js'; +import {logger} from './logger.js'; logger.logModule?.('alwatr-store'); diff --git a/packages/engine5/src/lib/store-file-stat.ts b/packages/engine5/src/lib/store-file-stat.ts index 2b46e01f..42fa766f 100644 --- a/packages/engine5/src/lib/store-file-stat.ts +++ b/packages/engine5/src/lib/store-file-stat.ts @@ -1,6 +1,6 @@ import {flatString} from '@alwatr/flat-string'; -import {StoreFileStat} from '../type'; +import type {StoreFileStat} from '@alwatr/store-types'; export class StoreFileStatModel { public readonly id: string; diff --git a/yarn.lock b/yarn.lock index 9f408539..2efdd426 100644 --- a/yarn.lock +++ b/yarn.lock @@ -172,6 +172,8 @@ __metadata: "@alwatr/logger": "npm:^2.4.1" "@alwatr/nano-build": "npm:^1.2.1" "@alwatr/prettier-config": "npm:^1.0.4" + "@alwatr/store-reference": "workspace:^" + "@alwatr/store-types": "workspace:^" "@alwatr/tsconfig-base": "npm:^1.0.5" "@alwatr/type": "npm:^1.2.4" "@alwatr/util": "npm:^1.4.1" @@ -181,7 +183,7 @@ __metadata: languageName: unknown linkType: soft -"@alwatr/store-reference@workspace:packages/store-reference": +"@alwatr/store-reference@workspace:^, @alwatr/store-reference@workspace:packages/store-reference": version: 0.0.0-use.local resolution: "@alwatr/store-reference@workspace:packages/store-reference" dependencies: