Added dependencies
All checks were successful
CI / build (push) Successful in 34s

This commit is contained in:
Andrey Kernichniy 2026-03-08 12:40:57 +07:00
parent 8360edca63
commit bc9dbd24e0
12 changed files with 20 additions and 16 deletions

View file

@ -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<T extends IModel> implements ICommandExecuter<T> {
protected _changes$ = new Subject<ICommandResult<T>[]>();

View file

@ -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";

View file

@ -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";

View file

@ -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<T extends IModel> {
@ -27,7 +28,7 @@ export class SerialExecutor<T extends IModel> extends AbstractExecutor<T> {
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);
});

View file

@ -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<T extends IModel> {

View file

@ -1,5 +1,5 @@
import { IModel } from "@gxc-solutions/model-base/interfaces";
import { Observable } from "rxjs";
import { IModel } from "./model";
export interface ICommandExecuter<T extends IModel> {
changes$: Observable<ICommandResult<T>[]>;

View file

@ -1,3 +1,2 @@
export * from "./executer";
export * from "./indexer";
export * from "./model";

View file

@ -1,4 +1,4 @@
import { IModel } from "./model";
import { IModel } from "@gxc-solutions/model-base/interfaces";
export interface IIndexer<T extends IModel> {
index(page: T): void;

View file

@ -1,6 +0,0 @@
export type TypeOfModel = "collection";
export interface IModel {
readonly id: string;
readonly type: TypeOfModel;
}

View file

@ -8,6 +8,7 @@
"registry": "https://npm.gxc-solutions.ru"
},
"peerDependencies": {
"@gxc-solutions/model-base": "^0.0.1",
"rxjs": "^7.8.2"
}
}

6
package-lock.json generated
View file

@ -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",

View file

@ -31,6 +31,7 @@
"vite": "^7.3.1"
},
"dependencies": {
"@gxc-solutions/model-base": "^0.0.1",
"rxjs": "^7.8.2"
}
}