ddd-node 30.1.0 → 30.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { ModelOptions } from "../../base";
1
2
  import { AnyCommand, CommandClass } from "../../core";
2
3
  import { CommandType } from "../../meta";
3
- export declare const Command: (commandType: CommandType) => <T extends AnyCommand>(target: CommandClass<T, any[]>) => void;
4
+ export declare const Command: (commandType: CommandType, modelOptions?: ModelOptions) => <T extends AnyCommand>(target: CommandClass<T, any[]>) => void;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Command = void 0;
4
+ const base_1 = require("../../base");
4
5
  const meta_1 = require("../../meta");
5
- const Command = (commandType) => {
6
+ const Command = (commandType, modelOptions) => {
6
7
  return (target) => {
7
8
  (0, meta_1.defineCommandType)(target, commandType);
9
+ (0, base_1.Model)(modelOptions)(target);
8
10
  };
9
11
  };
10
12
  exports.Command = Command;
@@ -1,3 +1,4 @@
1
+ import { ModelOptions } from "../../base";
1
2
  import { AnyEvent, EventClass } from "../../core";
2
3
  import { EventType } from "../../meta";
3
- export declare const Event: (eventType: EventType) => <T extends AnyEvent>(target: EventClass<T, any[]>) => void;
4
+ export declare const Event: (eventType: EventType, modelOptions?: ModelOptions) => <T extends AnyEvent>(target: EventClass<T, any[]>) => void;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Event = void 0;
4
+ const base_1 = require("../../base");
4
5
  const meta_1 = require("../../meta");
5
- const Event = (eventType) => {
6
+ const Event = (eventType, modelOptions) => {
6
7
  return (target) => {
7
8
  (0, meta_1.defineEventType)(target, eventType);
9
+ (0, base_1.Model)(modelOptions)(target);
8
10
  };
9
11
  };
10
12
  exports.Event = Event;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"ddd-node","version":"30.1.0","description":"Domain Driven Design base for NodeJs","type":"commonjs","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"https://github.com/nqd881/ddd-node"},"keywords":["ddd","ddd-node","ddd-base","ddd-ts","ddd-js"],"author":"Quoc Dai","license":"ISC","devDependencies":{"@types/chai":"^4.3.16","@types/lodash":"^4.14.200","@types/mocha":"^10.0.6","@types/uuid":"^9.0.6","chai":"^5.1.1","chai-deep-match":"^1.2.1","ddd-node":"file:dist","mocha":"^10.4.0","tsconfig-paths":"^4.2.0","typescript":"^5.2.2"},"dependencies":{"lodash":"^4.17.21","reflect-metadata":"^0.1.13","ts-node":"^10.9.2","tsc-alias":"^1.8.8","type-fest":"^4.20.1","uuid":"^9.0.1"}}
1
+ {"name":"ddd-node","version":"30.1.2","description":"Domain Driven Design base for NodeJs","type":"commonjs","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"https://github.com/nqd881/ddd-node"},"keywords":["ddd","ddd-node","ddd-base","ddd-ts","ddd-js"],"author":"Quoc Dai","license":"ISC","devDependencies":{"@types/chai":"^4.3.16","@types/lodash":"^4.14.200","@types/mocha":"^10.0.6","@types/uuid":"^9.0.6","chai":"^5.1.1","chai-deep-match":"^1.2.1","ddd-node":"file:dist","mocha":"^10.4.0","tsconfig-paths":"^4.2.0","typescript":"^5.2.2"},"dependencies":{"lodash":"^4.17.21","reflect-metadata":"^0.1.13","ts-node":"^10.9.2","tsc-alias":"^1.8.8","type-fest":"^4.20.1","uuid":"^9.0.1"}}