phecda-core 2.1.0-alpha.2 → 2.1.1
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.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -0
- package/dist/index.mjs +8 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ declare function snapShot<T extends new (...args: any) => any>(data: InstanceTyp
|
|
|
52
52
|
apply(): void;
|
|
53
53
|
};
|
|
54
54
|
declare function addDecoToClass<M extends new (...args: any) => any>(c: M, key: keyof InstanceType<M> | string, handler: ((target: any, key: PropertyKey) => void), type?: 'static' | 'class' | 'normal'): void;
|
|
55
|
+
declare function Pipeline(...decos: ((...args: any) => void)[]): (...args: any) => void;
|
|
55
56
|
|
|
56
57
|
declare function isPhecda(target: any): any;
|
|
57
58
|
declare function init(target: Phecda): void;
|
|
@@ -85,4 +86,4 @@ declare function Watcher(eventName: keyof Events, options?: {
|
|
|
85
86
|
declare function Effect(eventName: string, options?: any): (obj: any, key: string) => void;
|
|
86
87
|
declare function Storage(storeKey?: string): (target: any, key?: PropertyKey) => void;
|
|
87
88
|
|
|
88
|
-
export { Assign, Bind, ClassValue, Clear, DataMap, Effect, Empty, Err, Events, Expose, Global, Handler, Ignore, Init, Inject, InjectData, NameSpace, Nested, Phecda, Provide, Storage, Tag, To, Watcher, activeInstance, addDecoToClass, classToValue, getBind, getExposeKey, getHandler, getInitEvent, getModelState, getOwnExposeKey, getOwnHandler, getOwnIgnoreKey, getOwnInitEvent, getOwnModelState, getOwnState, getProperty, getState, getSymbol, getTag, init, injectProperty, isPhecda, plainToClass, regisHandler, regisInitEvent, register, registerAsync, setExposeKey, setIgnoreKey, setModelVar, setState, snapShot, transformClass };
|
|
89
|
+
export { Assign, Bind, ClassValue, Clear, DataMap, Effect, Empty, Err, Events, Expose, Global, Handler, Ignore, Init, Inject, InjectData, NameSpace, Nested, Phecda, Pipeline, Provide, Storage, Tag, To, Watcher, activeInstance, addDecoToClass, classToValue, getBind, getExposeKey, getHandler, getInitEvent, getModelState, getOwnExposeKey, getOwnHandler, getOwnIgnoreKey, getOwnInitEvent, getOwnModelState, getOwnState, getProperty, getState, getSymbol, getTag, init, injectProperty, isPhecda, plainToClass, regisHandler, regisInitEvent, register, registerAsync, setExposeKey, setIgnoreKey, setModelVar, setState, snapShot, transformClass };
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
Init: () => Init,
|
|
35
35
|
Inject: () => Inject,
|
|
36
36
|
Nested: () => Nested,
|
|
37
|
+
Pipeline: () => Pipeline,
|
|
37
38
|
Provide: () => Provide,
|
|
38
39
|
Storage: () => Storage,
|
|
39
40
|
Tag: () => Tag,
|
|
@@ -336,6 +337,13 @@ function addDecoToClass(c, key, handler, type = "normal") {
|
|
|
336
337
|
handler(type === "normal" ? c.prototype : c, key);
|
|
337
338
|
}
|
|
338
339
|
__name(addDecoToClass, "addDecoToClass");
|
|
340
|
+
function Pipeline(...decos) {
|
|
341
|
+
return (...args) => {
|
|
342
|
+
for (const d of decos)
|
|
343
|
+
d(...args);
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
__name(Pipeline, "Pipeline");
|
|
339
347
|
|
|
340
348
|
// src/decorators.ts
|
|
341
349
|
function Init(target, key) {
|
|
@@ -566,6 +574,7 @@ __name(Storage, "Storage");
|
|
|
566
574
|
Init,
|
|
567
575
|
Inject,
|
|
568
576
|
Nested,
|
|
577
|
+
Pipeline,
|
|
569
578
|
Provide,
|
|
570
579
|
Storage,
|
|
571
580
|
Tag,
|
package/dist/index.mjs
CHANGED
|
@@ -263,6 +263,13 @@ function addDecoToClass(c, key, handler, type = "normal") {
|
|
|
263
263
|
handler(type === "normal" ? c.prototype : c, key);
|
|
264
264
|
}
|
|
265
265
|
__name(addDecoToClass, "addDecoToClass");
|
|
266
|
+
function Pipeline(...decos) {
|
|
267
|
+
return (...args) => {
|
|
268
|
+
for (const d of decos)
|
|
269
|
+
d(...args);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
__name(Pipeline, "Pipeline");
|
|
266
273
|
|
|
267
274
|
// src/decorators.ts
|
|
268
275
|
function Init(target, key) {
|
|
@@ -492,6 +499,7 @@ export {
|
|
|
492
499
|
Init,
|
|
493
500
|
Inject,
|
|
494
501
|
Nested,
|
|
502
|
+
Pipeline,
|
|
495
503
|
Provide,
|
|
496
504
|
Storage,
|
|
497
505
|
Tag,
|