From bc9dbd24e088f18c486fb54e41297065efbf9a33 Mon Sep 17 00:00:00 2001 From: Andrey Kernichniy Date: Sun, 8 Mar 2026 12:40:57 +0700 Subject: [PATCH] Added dependencies --- lib/src/executers/abstract-executor.ts | 4 ++-- lib/src/executers/executor.ts | 2 +- lib/src/executers/parallel-executor.ts | 3 ++- lib/src/executers/serial-executor-2.ts | 5 +++-- lib/src/executers/serial-executor.ts | 3 ++- lib/src/interfaces/executer.ts | 2 +- lib/src/interfaces/index.ts | 1 - lib/src/interfaces/indexer.ts | 2 +- lib/src/interfaces/model.ts | 6 ------ lib/src/package.json | 1 + package-lock.json | 6 ++++++ package.json | 1 + 12 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 lib/src/interfaces/model.ts diff --git a/lib/src/executers/abstract-executor.ts b/lib/src/executers/abstract-executor.ts index 276281b..fdecf6b 100644 --- a/lib/src/executers/abstract-executor.ts +++ b/lib/src/executers/abstract-executor.ts @@ -1,7 +1,7 @@ -import { isIgnorableKey, isImmutableKey } from "@gxc-solutions/model/decorators"; +import { isIgnorableKey, isImmutableKey } from "@gxc-solutions/model-base/decorators"; +import { IModel } from "@gxc-solutions/model-base/interfaces"; import { Subject } from "rxjs"; import { ICommand, ICommandExecuter, ICommandResult } from "../interfaces"; -import { IModel } from "../interfaces/model"; export abstract class AbstractExecutor implements ICommandExecuter { protected _changes$ = new Subject[]>(); diff --git a/lib/src/executers/executor.ts b/lib/src/executers/executor.ts index 2972a81..6e5a704 100644 --- a/lib/src/executers/executor.ts +++ b/lib/src/executers/executor.ts @@ -1,4 +1,4 @@ -import { IModel } from "@gxc-solutions/model/interfaces"; +import { IModel } from "@gxc-solutions/model-base/interfaces"; import { IIndexer } from "../interfaces"; import { ParallelCommandExecutor } from "./parallel-executor"; import { Queue } from "./queue"; diff --git a/lib/src/executers/parallel-executor.ts b/lib/src/executers/parallel-executor.ts index 9ecfcc8..9995d0a 100644 --- a/lib/src/executers/parallel-executor.ts +++ b/lib/src/executers/parallel-executor.ts @@ -1,4 +1,5 @@ -import { ICommand, ICommandResult, IIndexer, IModel } from "../interfaces"; +import { IModel } from "@gxc-solutions/model-base/interfaces"; +import { ICommand, ICommandResult, IIndexer } from "../interfaces"; import { AbstractExecutor } from "./abstract-executor"; import { Queue } from "./queue"; diff --git a/lib/src/executers/serial-executor-2.ts b/lib/src/executers/serial-executor-2.ts index 151afc7..ce1f3dc 100644 --- a/lib/src/executers/serial-executor-2.ts +++ b/lib/src/executers/serial-executor-2.ts @@ -1,4 +1,5 @@ -import { ICommand, IIndexer, IModel } from "../interfaces"; +import { IModel } from "@gxc-solutions/model-base/interfaces"; +import { ICommand, IIndexer } from "../interfaces"; import { AbstractExecutor } from "./abstract-executor"; interface ICommandAndArg { @@ -27,7 +28,7 @@ export class SerialExecutor extends AbstractExecutor { this._isFlushed = true; for (const { command, object } of this._commands) { const commandResult = await command.execute(object); - const isChanged = commandResult.map(({ id, result, /*type */ }) => { + const isChanged = commandResult.map(({ id, result /*type */ }) => { const object = this._indexer.get(id); return this._apply(object, result); }); diff --git a/lib/src/executers/serial-executor.ts b/lib/src/executers/serial-executor.ts index 38bc820..09e71bc 100644 --- a/lib/src/executers/serial-executor.ts +++ b/lib/src/executers/serial-executor.ts @@ -1,4 +1,5 @@ -import { ICommand, ICommandResult, IIndexer, IModel } from "../interfaces"; +import { IModel } from "@gxc-solutions/model-base/interfaces"; +import { ICommand, ICommandResult, IIndexer } from "../interfaces"; import { AbstractExecutor } from "./abstract-executor"; interface ICommandAndArg { diff --git a/lib/src/interfaces/executer.ts b/lib/src/interfaces/executer.ts index d559241..5c4d42d 100644 --- a/lib/src/interfaces/executer.ts +++ b/lib/src/interfaces/executer.ts @@ -1,5 +1,5 @@ +import { IModel } from "@gxc-solutions/model-base/interfaces"; import { Observable } from "rxjs"; -import { IModel } from "./model"; export interface ICommandExecuter { changes$: Observable[]>; diff --git a/lib/src/interfaces/index.ts b/lib/src/interfaces/index.ts index 70d4725..3536962 100644 --- a/lib/src/interfaces/index.ts +++ b/lib/src/interfaces/index.ts @@ -1,3 +1,2 @@ export * from "./executer"; export * from "./indexer"; -export * from "./model"; diff --git a/lib/src/interfaces/indexer.ts b/lib/src/interfaces/indexer.ts index 451cbb6..123f896 100644 --- a/lib/src/interfaces/indexer.ts +++ b/lib/src/interfaces/indexer.ts @@ -1,4 +1,4 @@ -import { IModel } from "./model"; +import { IModel } from "@gxc-solutions/model-base/interfaces"; export interface IIndexer { index(page: T): void; diff --git a/lib/src/interfaces/model.ts b/lib/src/interfaces/model.ts deleted file mode 100644 index ccf1c18..0000000 --- a/lib/src/interfaces/model.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type TypeOfModel = "collection"; - -export interface IModel { - readonly id: string; - readonly type: TypeOfModel; -} diff --git a/lib/src/package.json b/lib/src/package.json index 0487f5f..019cfdc 100644 --- a/lib/src/package.json +++ b/lib/src/package.json @@ -8,6 +8,7 @@ "registry": "https://npm.gxc-solutions.ru" }, "peerDependencies": { + "@gxc-solutions/model-base": "^0.0.1", "rxjs": "^7.8.2" } } diff --git a/package-lock.json b/package-lock.json index 6a035f1..cfd8c04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.0.0", "license": "ISC", "dependencies": { + "@gxc-solutions/model-base": "^0.0.1", "rxjs": "^7.8.2" }, "devDependencies": { @@ -694,6 +695,11 @@ "node": "^20.19.0 || ^22.13.0 || >=24" } }, + "node_modules/@gxc-solutions/model-base": { + "version": "0.0.1", + "resolved": "https://npm.gxc-solutions.ru/@gxc-solutions/model-base/-/model-base-0.0.1.tgz", + "integrity": "sha512-qVx4zlSL+4dE+1fB0Jcqsh/El2ZPd+3SRsQ4iePCBgeKmmD1UUjV5qKStYoBfWYIKF9ttLsnDKvKdHREetRCDg==" + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", diff --git a/package.json b/package.json index e44d720..700abbd 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "vite": "^7.3.1" }, "dependencies": { + "@gxc-solutions/model-base": "^0.0.1", "rxjs": "^7.8.2" } }