@prostojs/mate 0.1.4 → 0.1.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.
@@ -82,14 +82,17 @@ class Mate {
82
82
  }
83
83
  set(args, key, value, isArray) {
84
84
  var _a;
85
- let meta = Reflect.getOwnMetadata(this.workspace, args.target, args.propKey) || {};
86
- if (args.propKey && this.options.readReturnType && !meta.returnType) {
87
- meta.returnType = Reflect.getOwnMetadata('design:returntype', args.target, args.propKey);
85
+ const newArgs = args.level === 'CLASS' ? { target: args.target }
86
+ : args.level === 'PROPERTY' ? { target: args.target, propKey: args.propKey }
87
+ : args;
88
+ let meta = Reflect.getOwnMetadata(this.workspace, newArgs.target, newArgs.propKey) || {};
89
+ if (newArgs.propKey && this.options.readReturnType && !meta.returnType) {
90
+ meta.returnType = Reflect.getOwnMetadata('design:returntype', newArgs.target, newArgs.propKey);
88
91
  }
89
- if (args.propKey && this.options.readType && !meta.type) {
90
- meta.type = Reflect.getOwnMetadata('design:type', args.target, args.propKey);
92
+ if (newArgs.propKey && this.options.readType && !meta.type) {
93
+ meta.type = Reflect.getOwnMetadata('design:type', newArgs.target, newArgs.propKey);
91
94
  }
92
- const { index } = args;
95
+ const { index } = newArgs;
93
96
  const cb = typeof key === 'function' ? key : undefined;
94
97
  let data = meta;
95
98
  if (!data.params) {
@@ -101,7 +104,7 @@ class Mate {
101
104
  type: undefined,
102
105
  };
103
106
  if (cb) {
104
- data.params[index] = cb(data.params[index]);
107
+ data.params[index] = cb(data.params[index], args.propKey);
105
108
  }
106
109
  else {
107
110
  data = data.params[index];
@@ -121,9 +124,9 @@ class Mate {
121
124
  }
122
125
  }
123
126
  else if (cb && typeof index !== 'number') {
124
- meta = cb(data);
127
+ meta = cb(data, args.propKey);
125
128
  }
126
- Reflect.defineMetadata(this.workspace, meta, args.target, args.propKey);
129
+ Reflect.defineMetadata(this.workspace, meta, newArgs.target, newArgs.propKey);
127
130
  }
128
131
  read(target, propKey) {
129
132
  const isConstr = isConstructor(target);
@@ -161,13 +164,12 @@ class Mate {
161
164
  }
162
165
  decorate(key, value, isArray, level) {
163
166
  return ((target, propKey, descriptor) => {
164
- const args = level === 'CLASS' ? {
165
- target,
166
- } : {
167
+ const args = {
167
168
  target,
168
169
  propKey,
169
170
  descriptor: typeof descriptor === 'number' ? undefined : descriptor,
170
171
  index: typeof descriptor === 'number' ? descriptor : undefined,
172
+ level,
171
173
  };
172
174
  this.set(args, key, value, isArray);
173
175
  });
package/dist/mate.d.ts CHANGED
@@ -6,16 +6,16 @@ export declare class Mate<T extends TProstoMetadata = TProstoMetadata> {
6
6
  protected workspace: string;
7
7
  protected options: TMateOptions<T>;
8
8
  constructor(workspace: string, options?: TMateOptions<T>);
9
- set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, cb: ((meta: R & RP) => R & RP)): void;
9
+ set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, cb: ((meta: R & RP, propKey?: string | symbol) => R & RP)): void;
10
10
  set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, key: keyof R | keyof RP, value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined): void;
11
11
  set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, key: keyof R | keyof RP, value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined): void;
12
12
  read<R extends T = T>(target: TFunction | TObject, propKey?: string | symbol): R | undefined;
13
13
  apply(...decorators: (MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator)[]): MethodDecorator & ClassDecorator & ParameterDecorator;
14
- decorate<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
14
+ decorate<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP, propKey?: string | symbol) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
15
15
  decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
16
16
  decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
17
- decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined, level: 'CLASS' | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
18
- decorateClass<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
17
+ decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined, level: TMergedDecoratorArgs['level']): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
18
+ decorateClass<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP, propKey?: string | symbol) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
19
19
  decorateClass<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
20
20
  decorateClass<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
21
21
  }
@@ -37,6 +37,7 @@ export declare interface TMergedDecoratorArgs {
37
37
  propKey?: string | symbol;
38
38
  descriptor?: TypedPropertyDescriptor<TAny>;
39
39
  index?: number;
40
+ level?: 'CLASS' | 'PROPERTY';
40
41
  }
41
42
 
42
43
  declare type TObject = object;
@@ -1 +1 @@
1
- function t(t){return e(t)?t:t.constructor?t.constructor:Object.getPrototypeOf(t).constructor}function e(t){return"function"==typeof t&&Object.getOwnPropertyNames(t).includes("prototype")&&!Object.getOwnPropertyNames(t).includes("caller")&&!!t.name}const o=()=>`[prostojs/mate][${(new Date).toISOString().replace("T"," ").replace(/\.\d{3}z$/i,"")}] `;const a={},r={},n="object"==typeof global?global:"object"==typeof self?self:{};function s(e,o){const n=void 0!==o,s=n?r:a,i=Symbol.for(t(e));let p=s[i]=s[i]||{};return n&&(p=p[o]=p[o]||{}),p}const i={getOwnMetadata:(t,e,o)=>s(e,o)[t],defineMetadata(t,e,o,a){s(o,a)[t]=e},metadata:(t,e)=>(o,a)=>{c.defineMetadata(t,e,o,a)}};if(n.Reflect){const t=["getOwnMetadata","defineMetadata","metadata"],e=n.Reflect;let a=!0;for(const o of t)"function"!=typeof e[o]&&(Object.defineProperty(e,o,{configurable:!0,writable:!0,value:i[o]}),a=!1);a||(p="A limited 'reflect-metadata' implementation is used. In case of any issues include original 'reflect-metadata' package and require it before any @prostojs/mate import.",console.log(""+o()+p+""))}else n.Reflect=i;var p;const c=i;function f(t){return function(t){console.error(""+o()+t+"")}(t),new Error(t)}const l=(null===global||void 0===global?void 0:global.Reflect)||(null===self||void 0===self?void 0:self.Reflect)||c;class d{constructor(t,e={}){this.workspace=t,this.options=e}set(t,e,o,a){var r;let n=l.getOwnMetadata(this.workspace,t.target,t.propKey)||{};t.propKey&&this.options.readReturnType&&!n.returnType&&(n.returnType=l.getOwnMetadata("design:returntype",t.target,t.propKey)),t.propKey&&this.options.readType&&!n.type&&(n.type=l.getOwnMetadata("design:type",t.target,t.propKey));const{index:s}=t,i="function"==typeof e?e:void 0;let p=n;if(p.params||(p.params=null===(r=l.getOwnMetadata("design:paramtypes",t.target,t.propKey))||void 0===r?void 0:r.map((t=>({type:t})))),"number"==typeof s&&(p.params=p.params||[],p.params[s]=p.params[s]||{type:void 0},i?p.params[s]=i(p.params[s]):p=p.params[s]),"function"!=typeof e)if(a){const t=p[e]||[];Array.isArray(t)||f("Mate.add (isArray=true) called for non-array metadata"),t.unshift(o),p[e]=t}else p[e]=o;else i&&"number"!=typeof s&&(n=i(p));l.defineMetadata(this.workspace,n,t.target,t.propKey)}read(o,a){const r=e(o)?o:t(o);let n=l.getOwnMetadata(this.workspace,"string"==typeof a?r.prototype:r,a);if(this.options.inherit){const t="function"==typeof this.options.inherit?this.options.inherit:void 0;let e=this.options.inherit;if(t)if("string"==typeof a){e=t(l.getOwnMetadata(this.workspace,r),a,n)}else e=t(n);if(e){const t=Object.getPrototypeOf(r);if("function"==typeof t&&t!==y&&t!==r){n={...this.read(t,a),...n,params:null==n?void 0:n.params}}}}return n}apply(...t){return(e,o,a)=>{for(const r of t)r(e,o,a)}}decorate(t,e,o,a){return(r,n,s)=>{this.set("CLASS"===a?{target:r}:{target:r,propKey:n,descriptor:"number"==typeof s?void 0:s,index:"number"==typeof s?s:void 0},t,e,o)}}decorateClass(t,e,o){return this.decorate(t,e,o,"CLASS")}}const y=Object.getPrototypeOf(Function);export{d as Mate,t as getConstructor,e as isConstructor};
1
+ function e(e){return t(e)?e:e.constructor?e.constructor:Object.getPrototypeOf(e).constructor}function t(e){return"function"==typeof e&&Object.getOwnPropertyNames(e).includes("prototype")&&!Object.getOwnPropertyNames(e).includes("caller")&&!!e.name}const o=()=>`[prostojs/mate][${(new Date).toISOString().replace("T"," ").replace(/\.\d{3}z$/i,"")}] `;const r={},a={},n="object"==typeof global?global:"object"==typeof self?self:{};function s(t,o){const n=void 0!==o,s=n?a:r,i=Symbol.for(e(t));let p=s[i]=s[i]||{};return n&&(p=p[o]=p[o]||{}),p}const i={getOwnMetadata:(e,t,o)=>s(t,o)[e],defineMetadata(e,t,o,r){s(o,r)[e]=t},metadata:(e,t)=>(o,r)=>{c.defineMetadata(e,t,o,r)}};if(n.Reflect){const e=["getOwnMetadata","defineMetadata","metadata"],t=n.Reflect;let r=!0;for(const o of e)"function"!=typeof t[o]&&(Object.defineProperty(t,o,{configurable:!0,writable:!0,value:i[o]}),r=!1);r||(p="A limited 'reflect-metadata' implementation is used. In case of any issues include original 'reflect-metadata' package and require it before any @prostojs/mate import.",console.log(""+o()+p+""))}else n.Reflect=i;var p;const c=i;function l(e){return function(e){console.error(""+o()+e+"")}(e),new Error(e)}const f=(null===global||void 0===global?void 0:global.Reflect)||(null===self||void 0===self?void 0:self.Reflect)||c;class d{constructor(e,t={}){this.workspace=e,this.options=t}set(e,t,o,r){var a;const n="CLASS"===e.level?{target:e.target}:"PROPERTY"===e.level?{target:e.target,propKey:e.propKey}:e;let s=f.getOwnMetadata(this.workspace,n.target,n.propKey)||{};n.propKey&&this.options.readReturnType&&!s.returnType&&(s.returnType=f.getOwnMetadata("design:returntype",n.target,n.propKey)),n.propKey&&this.options.readType&&!s.type&&(s.type=f.getOwnMetadata("design:type",n.target,n.propKey));const{index:i}=n,p="function"==typeof t?t:void 0;let c=s;if(c.params||(c.params=null===(a=f.getOwnMetadata("design:paramtypes",e.target,e.propKey))||void 0===a?void 0:a.map((e=>({type:e})))),"number"==typeof i&&(c.params=c.params||[],c.params[i]=c.params[i]||{type:void 0},p?c.params[i]=p(c.params[i],e.propKey):c=c.params[i]),"function"!=typeof t)if(r){const e=c[t]||[];Array.isArray(e)||l("Mate.add (isArray=true) called for non-array metadata"),e.unshift(o),c[t]=e}else c[t]=o;else p&&"number"!=typeof i&&(s=p(c,e.propKey));f.defineMetadata(this.workspace,s,n.target,n.propKey)}read(o,r){const a=t(o)?o:e(o);let n=f.getOwnMetadata(this.workspace,"string"==typeof r?a.prototype:a,r);if(this.options.inherit){const e="function"==typeof this.options.inherit?this.options.inherit:void 0;let t=this.options.inherit;if(e)if("string"==typeof r){t=e(f.getOwnMetadata(this.workspace,a),r,n)}else t=e(n);if(t){const e=Object.getPrototypeOf(a);if("function"==typeof e&&e!==y&&e!==a){n={...this.read(e,r),...n,params:null==n?void 0:n.params}}}}return n}apply(...e){return(t,o,r)=>{for(const a of e)a(t,o,r)}}decorate(e,t,o,r){return(a,n,s)=>{this.set({target:a,propKey:n,descriptor:"number"==typeof s?void 0:s,index:"number"==typeof s?s:void 0,level:r},e,t,o)}}decorateClass(e,t,o){return this.decorate(e,t,o,"CLASS")}}const y=Object.getPrototypeOf(Function);export{d as Mate,e as getConstructor,t as isConstructor};
@@ -78,14 +78,17 @@ class Mate {
78
78
  }
79
79
  set(args, key, value, isArray) {
80
80
  var _a;
81
- let meta = Reflect.getOwnMetadata(this.workspace, args.target, args.propKey) || {};
82
- if (args.propKey && this.options.readReturnType && !meta.returnType) {
83
- meta.returnType = Reflect.getOwnMetadata('design:returntype', args.target, args.propKey);
81
+ const newArgs = args.level === 'CLASS' ? { target: args.target }
82
+ : args.level === 'PROPERTY' ? { target: args.target, propKey: args.propKey }
83
+ : args;
84
+ let meta = Reflect.getOwnMetadata(this.workspace, newArgs.target, newArgs.propKey) || {};
85
+ if (newArgs.propKey && this.options.readReturnType && !meta.returnType) {
86
+ meta.returnType = Reflect.getOwnMetadata('design:returntype', newArgs.target, newArgs.propKey);
84
87
  }
85
- if (args.propKey && this.options.readType && !meta.type) {
86
- meta.type = Reflect.getOwnMetadata('design:type', args.target, args.propKey);
88
+ if (newArgs.propKey && this.options.readType && !meta.type) {
89
+ meta.type = Reflect.getOwnMetadata('design:type', newArgs.target, newArgs.propKey);
87
90
  }
88
- const { index } = args;
91
+ const { index } = newArgs;
89
92
  const cb = typeof key === 'function' ? key : undefined;
90
93
  let data = meta;
91
94
  if (!data.params) {
@@ -97,7 +100,7 @@ class Mate {
97
100
  type: undefined,
98
101
  };
99
102
  if (cb) {
100
- data.params[index] = cb(data.params[index]);
103
+ data.params[index] = cb(data.params[index], args.propKey);
101
104
  }
102
105
  else {
103
106
  data = data.params[index];
@@ -117,9 +120,9 @@ class Mate {
117
120
  }
118
121
  }
119
122
  else if (cb && typeof index !== 'number') {
120
- meta = cb(data);
123
+ meta = cb(data, args.propKey);
121
124
  }
122
- Reflect.defineMetadata(this.workspace, meta, args.target, args.propKey);
125
+ Reflect.defineMetadata(this.workspace, meta, newArgs.target, newArgs.propKey);
123
126
  }
124
127
  read(target, propKey) {
125
128
  const isConstr = isConstructor(target);
@@ -157,13 +160,12 @@ class Mate {
157
160
  }
158
161
  decorate(key, value, isArray, level) {
159
162
  return ((target, propKey, descriptor) => {
160
- const args = level === 'CLASS' ? {
161
- target,
162
- } : {
163
+ const args = {
163
164
  target,
164
165
  propKey,
165
166
  descriptor: typeof descriptor === 'number' ? undefined : descriptor,
166
167
  index: typeof descriptor === 'number' ? descriptor : undefined,
168
+ level,
167
169
  };
168
170
  this.set(args, key, value, isArray);
169
171
  });
@@ -1 +1 @@
1
- var ProstoMate=function(t){"use strict";function e(t){return o(t)?t:t.constructor?t.constructor:Object.getPrototypeOf(t).constructor}function o(t){return"function"==typeof t&&Object.getOwnPropertyNames(t).includes("prototype")&&!Object.getOwnPropertyNames(t).includes("caller")&&!!t.name}const r=()=>`[prostojs/mate][${(new Date).toISOString().replace("T"," ").replace(/\.\d{3}z$/i,"")}] `;const a={},n={},s="object"==typeof global?global:"object"==typeof self?self:{};function i(t,o){const r=void 0!==o,s=r?n:a,i=Symbol.for(e(t));let p=s[i]=s[i]||{};return r&&(p=p[o]=p[o]||{}),p}const p={getOwnMetadata:(t,e,o)=>i(e,o)[t],defineMetadata(t,e,o,r){i(o,r)[t]=e},metadata:(t,e)=>(o,r)=>{f.defineMetadata(t,e,o,r)}};if(s.Reflect){const t=["getOwnMetadata","defineMetadata","metadata"],e=s.Reflect;let o=!0;for(const r of t)"function"!=typeof e[r]&&(Object.defineProperty(e,r,{configurable:!0,writable:!0,value:p[r]}),o=!1);o||(c="A limited 'reflect-metadata' implementation is used. In case of any issues include original 'reflect-metadata' package and require it before any @prostojs/mate import.",console.log(""+r()+c+""))}else s.Reflect=p;var c;const f=p;function l(t){return function(t){console.error(""+r()+t+"")}(t),new Error(t)}const d=(null===global||void 0===global?void 0:global.Reflect)||(null===self||void 0===self?void 0:self.Reflect)||f;const u=Object.getPrototypeOf(Function);return t.Mate=class{constructor(t,e={}){this.workspace=t,this.options=e}set(t,e,o,r){var a;let n=d.getOwnMetadata(this.workspace,t.target,t.propKey)||{};t.propKey&&this.options.readReturnType&&!n.returnType&&(n.returnType=d.getOwnMetadata("design:returntype",t.target,t.propKey)),t.propKey&&this.options.readType&&!n.type&&(n.type=d.getOwnMetadata("design:type",t.target,t.propKey));const{index:s}=t,i="function"==typeof e?e:void 0;let p=n;if(p.params||(p.params=null===(a=d.getOwnMetadata("design:paramtypes",t.target,t.propKey))||void 0===a?void 0:a.map((t=>({type:t})))),"number"==typeof s&&(p.params=p.params||[],p.params[s]=p.params[s]||{type:void 0},i?p.params[s]=i(p.params[s]):p=p.params[s]),"function"!=typeof e)if(r){const t=p[e]||[];Array.isArray(t)||l("Mate.add (isArray=true) called for non-array metadata"),t.unshift(o),p[e]=t}else p[e]=o;else i&&"number"!=typeof s&&(n=i(p));d.defineMetadata(this.workspace,n,t.target,t.propKey)}read(t,r){const a=o(t)?t:e(t);let n=d.getOwnMetadata(this.workspace,"string"==typeof r?a.prototype:a,r);if(this.options.inherit){const t="function"==typeof this.options.inherit?this.options.inherit:void 0;let e=this.options.inherit;if(t)if("string"==typeof r){e=t(d.getOwnMetadata(this.workspace,a),r,n)}else e=t(n);if(e){const t=Object.getPrototypeOf(a);if("function"==typeof t&&t!==u&&t!==a){n={...this.read(t,r),...n,params:null==n?void 0:n.params}}}}return n}apply(...t){return(e,o,r)=>{for(const a of t)a(e,o,r)}}decorate(t,e,o,r){return(a,n,s)=>{this.set("CLASS"===r?{target:a}:{target:a,propKey:n,descriptor:"number"==typeof s?void 0:s,index:"number"==typeof s?s:void 0},t,e,o)}}decorateClass(t,e,o){return this.decorate(t,e,o,"CLASS")}},t.getConstructor=e,t.isConstructor=o,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
1
+ var ProstoMate=function(t){"use strict";function e(t){return o(t)?t:t.constructor?t.constructor:Object.getPrototypeOf(t).constructor}function o(t){return"function"==typeof t&&Object.getOwnPropertyNames(t).includes("prototype")&&!Object.getOwnPropertyNames(t).includes("caller")&&!!t.name}const r=()=>`[prostojs/mate][${(new Date).toISOString().replace("T"," ").replace(/\.\d{3}z$/i,"")}] `;const a={},n={},s="object"==typeof global?global:"object"==typeof self?self:{};function i(t,o){const r=void 0!==o,s=r?n:a,i=Symbol.for(e(t));let p=s[i]=s[i]||{};return r&&(p=p[o]=p[o]||{}),p}const p={getOwnMetadata:(t,e,o)=>i(e,o)[t],defineMetadata(t,e,o,r){i(o,r)[t]=e},metadata:(t,e)=>(o,r)=>{l.defineMetadata(t,e,o,r)}};if(s.Reflect){const t=["getOwnMetadata","defineMetadata","metadata"],e=s.Reflect;let o=!0;for(const r of t)"function"!=typeof e[r]&&(Object.defineProperty(e,r,{configurable:!0,writable:!0,value:p[r]}),o=!1);o||(c="A limited 'reflect-metadata' implementation is used. In case of any issues include original 'reflect-metadata' package and require it before any @prostojs/mate import.",console.log(""+r()+c+""))}else s.Reflect=p;var c;const l=p;function f(t){return function(t){console.error(""+r()+t+"")}(t),new Error(t)}const d=(null===global||void 0===global?void 0:global.Reflect)||(null===self||void 0===self?void 0:self.Reflect)||l;const y=Object.getPrototypeOf(Function);return t.Mate=class{constructor(t,e={}){this.workspace=t,this.options=e}set(t,e,o,r){var a;const n="CLASS"===t.level?{target:t.target}:"PROPERTY"===t.level?{target:t.target,propKey:t.propKey}:t;let s=d.getOwnMetadata(this.workspace,n.target,n.propKey)||{};n.propKey&&this.options.readReturnType&&!s.returnType&&(s.returnType=d.getOwnMetadata("design:returntype",n.target,n.propKey)),n.propKey&&this.options.readType&&!s.type&&(s.type=d.getOwnMetadata("design:type",n.target,n.propKey));const{index:i}=n,p="function"==typeof e?e:void 0;let c=s;if(c.params||(c.params=null===(a=d.getOwnMetadata("design:paramtypes",t.target,t.propKey))||void 0===a?void 0:a.map((t=>({type:t})))),"number"==typeof i&&(c.params=c.params||[],c.params[i]=c.params[i]||{type:void 0},p?c.params[i]=p(c.params[i],t.propKey):c=c.params[i]),"function"!=typeof e)if(r){const t=c[e]||[];Array.isArray(t)||f("Mate.add (isArray=true) called for non-array metadata"),t.unshift(o),c[e]=t}else c[e]=o;else p&&"number"!=typeof i&&(s=p(c,t.propKey));d.defineMetadata(this.workspace,s,n.target,n.propKey)}read(t,r){const a=o(t)?t:e(t);let n=d.getOwnMetadata(this.workspace,"string"==typeof r?a.prototype:a,r);if(this.options.inherit){const t="function"==typeof this.options.inherit?this.options.inherit:void 0;let e=this.options.inherit;if(t)if("string"==typeof r){e=t(d.getOwnMetadata(this.workspace,a),r,n)}else e=t(n);if(e){const t=Object.getPrototypeOf(a);if("function"==typeof t&&t!==y&&t!==a){n={...this.read(t,r),...n,params:null==n?void 0:n.params}}}}return n}apply(...t){return(e,o,r)=>{for(const a of t)a(e,o,r)}}decorate(t,e,o,r){return(a,n,s)=>{this.set({target:a,propKey:n,descriptor:"number"==typeof s?void 0:s,index:"number"==typeof s?s:void 0,level:r},t,e,o)}}decorateClass(t,e,o){return this.decorate(t,e,o,"CLASS")}},t.getConstructor=e,t.isConstructor=o,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
@@ -4,6 +4,7 @@ export interface TMergedDecoratorArgs {
4
4
  propKey?: string | symbol;
5
5
  descriptor?: TypedPropertyDescriptor<TAny>;
6
6
  index?: number;
7
+ level?: 'CLASS' | 'PROPERTY';
7
8
  }
8
9
  export interface TProstoMetadata<TParams extends TProstoParamsMetadata = TProstoParamsMetadata> {
9
10
  params: TParams[];
@@ -22,16 +23,16 @@ export declare class Mate<T extends TProstoMetadata = TProstoMetadata> {
22
23
  protected workspace: string;
23
24
  protected options: TMateOptions<T>;
24
25
  constructor(workspace: string, options?: TMateOptions<T>);
25
- set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, cb: ((meta: R & RP) => R & RP)): void;
26
+ set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, cb: ((meta: R & RP, propKey?: string | symbol) => R & RP)): void;
26
27
  set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, key: keyof R | keyof RP, value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined): void;
27
28
  set<R extends T = T, RP = R['params'][0]>(args: TMergedDecoratorArgs, key: keyof R | keyof RP, value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined): void;
28
29
  read<R extends T = T>(target: TFunction | TObject, propKey?: string | symbol): R | undefined;
29
30
  apply(...decorators: (MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator)[]): MethodDecorator & ClassDecorator & ParameterDecorator;
30
- decorate<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
31
+ decorate<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP, propKey?: string | symbol) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
31
32
  decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
32
33
  decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
33
- decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined, level: 'CLASS' | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
34
- decorateClass<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
34
+ decorate<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined, level: TMergedDecoratorArgs['level']): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
35
+ decorateClass<R extends T = T, RP = R['params'][0]>(cb: ((meta: R & RP, propKey?: string | symbol) => R & RP)): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
35
36
  decorateClass<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
36
37
  decorateClass<R extends T = T, RP = R['params'][0]>(key: keyof R | keyof RP | ((meta: R & RP) => R & RP), value: ((R & RP)[keyof R] & (R & RP)[keyof RP]) | undefined, isArray: boolean | undefined): MethodDecorator & ClassDecorator & ParameterDecorator & PropertyDecorator;
37
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mate.d.ts","sourceRoot":"","sources":["../../src/mate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAK,SAAS,CAAA;AAMjD,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAA;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,qBAAqB,GAAG,qBAAqB;IAC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,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC9C,GAAG,EAAG,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,EACrD,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,EAC3D,OAAO,EAAE,OAAO,GAAG,SAAS,GAC7B,eAAe,GAAG,cAAc,GAAG,kBAAkB,GAAG,iBAAiB;CAS/E"}
@@ -1,6 +1,7 @@
1
1
  import { Mate, TProstoMetadata } from '..';
2
2
  export declare const mate: Mate<{
3
3
  inherit?: boolean | undefined;
4
+ fromPropertyCb?: string[] | undefined;
4
5
  } & TProstoMetadata<import("..").TProstoParamsMetadata>>;
5
6
  export declare class MateTestClass {
6
7
  constructor(_a: string);
@@ -1 +1 @@
1
- {"version":3,"file":"mate.artifacts.d.ts","sourceRoot":"","sources":["../../../src/tests/mate.artifacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAE1C,eAAO,MAAM,IAAI;;wDASf,CAAA;AAMF,qBAGa,aAAa;gBAKd,EAAE,EAAE,MAAM;IAQlB,IAAI,CAII,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB3B,KAAK,CAMG,EAAE,EAAE,MAAM;IAMlB,KAAK,EAAE,MAAM,CAAK;CACrB;AAED,qBACa,cAAc;gBACX,CAAC,EAAE,MAAM;IAOrB,IAAI;IAMJ,eAAe;CAGlB;AAED,qBACa,cAAe,SAAQ,cAAc;;IAM9C,KAAK;IAML,eAAe;CAGlB;AAED,qBACa,cAAe,SAAQ,cAAc;;IAM9C,KAAK;IAKL,eAAe;CAGlB"}
1
+ {"version":3,"file":"mate.artifacts.d.ts","sourceRoot":"","sources":["../../../src/tests/mate.artifacts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAE1C,eAAO,MAAM,IAAI;;;wDASf,CAAA;AAMF,qBAGa,aAAa;gBAKd,EAAE,EAAE,MAAM;IAQlB,IAAI,CAII,EAAE,EAAE,MAAM,GAAG,MAAM;IAgB3B,KAAK,CAMG,EAAE,EAAE,MAAM;IAWlB,KAAK,EAAE,MAAM,CAAK;CACrB;AAED,qBACa,cAAc;gBACX,CAAC,EAAE,MAAM;IAOrB,IAAI;IAMJ,eAAe;CAGlB;AAED,qBACa,cAAe,SAAQ,cAAc;;IAM9C,KAAK;IAML,eAAe;CAGlB;AAED,qBACa,cAAe,SAAQ,cAAc;;IAM9C,KAAK;IAKL,eAAe;CAGlB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prostojs/mate",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MATE is TS Metadata Organizer",
5
5
  "main": "index.js",
6
6
  "module": "dist/mate.esm-bundler.js",