definition-generator-framework 1.3.4 → 1.3.5

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,6 +1,6 @@
1
1
  import Joi from 'joi';
2
2
  import { Output } from './framework.model';
3
- export type DefinitionComponentClassType<T> = new (...args: any[]) => DefinitionComponent<T>;
3
+ export type DefinitionComponentClassType<T> = new (...args: any[]) => DefinitionComponent<T> | SingleDefinitionComponent<T>;
4
4
  export interface DefinitionComponentMeta {
5
5
  definitionName: string;
6
6
  keyName?: string;
@@ -12,6 +12,10 @@ export declare abstract class DefinitionComponent<T> {
12
12
  static getSchema(): Joi.Schema;
13
13
  abstract process(definitions: T[], context: Output): Promise<void>;
14
14
  }
15
+ export declare abstract class SingleDefinitionComponent<T> {
16
+ static getSchema(): Joi.Schema;
17
+ abstract process(definitions: T, context: Output): Promise<void>;
18
+ }
15
19
  interface DefinitionModuleMeta {
16
20
  modules: DefinitionComponentClassType<any>[];
17
21
  interfaces: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefinitionModule = exports.DefinitionModuleDecorator = exports.DefinitionComponent = exports.DefinitionComponentDecorator = void 0;
3
+ exports.DefinitionModule = exports.DefinitionModuleDecorator = exports.SingleDefinitionComponent = exports.DefinitionComponent = exports.DefinitionComponentDecorator = void 0;
4
4
  const framework_data_1 = require("./framework.data");
5
5
  const kernel_1 = require("./kernel");
6
6
  function DefinitionComponentDecorator(meta) {
@@ -21,6 +21,12 @@ class DefinitionComponent {
21
21
  }
22
22
  }
23
23
  exports.DefinitionComponent = DefinitionComponent;
24
+ class SingleDefinitionComponent {
25
+ static getSchema() {
26
+ return this.$meta.validationSchema;
27
+ }
28
+ }
29
+ exports.SingleDefinitionComponent = SingleDefinitionComponent;
24
30
  let ModuleIsRegistered = false;
25
31
  function DefinitionModuleDecorator(meta) {
26
32
  return function (ModuleClass) {
@@ -1 +1 @@
1
- {"version":3,"file":"framework.js","sourceRoot":"","sources":["../../src/framework/framework.ts"],"names":[],"mappings":";;;AAEA,qDAAiD;AAEjD,qCAAkC;AAWlC,SAAgB,4BAA4B,CAAC,IAA6B;IACxE,OAAO,UAAU,cAAiD;QAChE,8BAAa,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAEjD,cAAe,CAAC,KAAK,GAAG;YAC5B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAXD,oEAWC;AAED,MAAsB,mBAAmB;IACvC,MAAM,CAAC,SAAS;QACd,OAAa,IAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAC5C,CAAC;CAGF;AAND,kDAMC;AAQD,IAAI,kBAAkB,GAAG,KAAK,CAAC;AAC/B,SAAgB,yBAAyB,CAAC,IAA0B;IAClE,OAAO,UAAU,WAAsC;QACrD,IAAI,kBAAkB,EAAE,CAAC;YACvB,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,kBAAkB,GAAG,IAAI,CAAC;YAC1B,8BAAa,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,8BAAa,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAE3C,eAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAZD,8DAYC;AAID,MAAsB,gBAAgB;CAAG;AAAzC,4CAAyC"}
1
+ {"version":3,"file":"framework.js","sourceRoot":"","sources":["../../src/framework/framework.ts"],"names":[],"mappings":";;;AAEA,qDAAiD;AAEjD,qCAAkC;AAWlC,SAAgB,4BAA4B,CAAC,IAA6B;IACxE,OAAO,UAAU,cAAiD;QAChE,8BAAa,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAEjD,cAAe,CAAC,KAAK,GAAG;YAC5B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAXD,oEAWC;AAED,MAAsB,mBAAmB;IACvC,MAAM,CAAC,SAAS;QACd,OAAa,IAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAC5C,CAAC;CAGF;AAND,kDAMC;AAED,MAAsB,yBAAyB;IAC7C,MAAM,CAAC,SAAS;QACd,OAAa,IAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC;IAC5C,CAAC;CAGF;AAND,8DAMC;AAQD,IAAI,kBAAkB,GAAG,KAAK,CAAC;AAC/B,SAAgB,yBAAyB,CAAC,IAA0B;IAClE,OAAO,UAAU,WAAsC;QACrD,IAAI,kBAAkB,EAAE,CAAC;YACvB,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,kBAAkB,GAAG,IAAI,CAAC;YAC1B,8BAAa,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,8BAAa,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAE3C,eAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAZD,8DAYC;AAID,MAAsB,gBAAgB;CAAG;AAAzC,4CAAyC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Validator } from './helpers/validator/validator';
2
2
  export { JoiCustomValidators } from './helpers/validator/joi-custom-validators';
3
3
  export { DefinitionStore } from './framework/definition-store';
4
- export { DefinitionModule, DefinitionModuleDecorator, DefinitionComponent, DefinitionComponentDecorator } from './framework/framework';
4
+ export { DefinitionModule, DefinitionModuleDecorator, DefinitionComponent, SingleDefinitionComponent, DefinitionComponentDecorator } from './framework/framework';
5
5
  export { OutputHelper } from './helpers/output-helper/output-helper';
6
6
  export { Output, ErrorLog } from './framework/framework.model';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OutputHelper = exports.DefinitionComponentDecorator = exports.DefinitionComponent = exports.DefinitionModuleDecorator = exports.DefinitionModule = exports.DefinitionStore = exports.JoiCustomValidators = exports.Validator = void 0;
3
+ exports.OutputHelper = exports.DefinitionComponentDecorator = exports.SingleDefinitionComponent = exports.DefinitionComponent = exports.DefinitionModuleDecorator = exports.DefinitionModule = exports.DefinitionStore = exports.JoiCustomValidators = exports.Validator = void 0;
4
4
  var validator_1 = require("./helpers/validator/validator");
5
5
  Object.defineProperty(exports, "Validator", { enumerable: true, get: function () { return validator_1.Validator; } });
6
6
  var joi_custom_validators_1 = require("./helpers/validator/joi-custom-validators");
@@ -11,6 +11,7 @@ var framework_1 = require("./framework/framework");
11
11
  Object.defineProperty(exports, "DefinitionModule", { enumerable: true, get: function () { return framework_1.DefinitionModule; } });
12
12
  Object.defineProperty(exports, "DefinitionModuleDecorator", { enumerable: true, get: function () { return framework_1.DefinitionModuleDecorator; } });
13
13
  Object.defineProperty(exports, "DefinitionComponent", { enumerable: true, get: function () { return framework_1.DefinitionComponent; } });
14
+ Object.defineProperty(exports, "SingleDefinitionComponent", { enumerable: true, get: function () { return framework_1.SingleDefinitionComponent; } });
14
15
  Object.defineProperty(exports, "DefinitionComponentDecorator", { enumerable: true, get: function () { return framework_1.DefinitionComponentDecorator; } });
15
16
  var output_helper_1 = require("./helpers/output-helper/output-helper");
16
17
  Object.defineProperty(exports, "OutputHelper", { enumerable: true, get: function () { return output_helper_1.OutputHelper; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,sGAAA,SAAS,OAAA;AAClB,mFAAgF;AAAvE,4HAAA,mBAAmB,OAAA;AAC5B,iEAA+D;AAAtD,mHAAA,eAAe,OAAA;AACxB,mDAK+B;AAJ7B,6GAAA,gBAAgB,OAAA;AAChB,sHAAA,yBAAyB,OAAA;AACzB,gHAAA,mBAAmB,OAAA;AACnB,yHAAA,4BAA4B,OAAA;AAE9B,uEAAqE;AAA5D,6GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAAjD,sGAAA,SAAS,OAAA;AAClB,mFAAgF;AAAvE,4HAAA,mBAAmB,OAAA;AAC5B,iEAA+D;AAAtD,mHAAA,eAAe,OAAA;AACxB,mDAM+B;AAL7B,6GAAA,gBAAgB,OAAA;AAChB,sHAAA,yBAAyB,OAAA;AACzB,gHAAA,mBAAmB,OAAA;AACnB,sHAAA,yBAAyB,OAAA;AACzB,yHAAA,4BAA4B,OAAA;AAE9B,uEAAqE;AAA5D,6GAAA,YAAY,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "definition-generator-framework",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Definition Generator Framework",
5
5
  "main": "dist/index.js",
6
6
  "repository": {