phecda-core 2.0.0-alpha.5 → 2.0.0-alpha.7
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.global.js +9 -4
- package/dist/index.js +9 -4
- package/dist/index.mjs +9 -4
- package/dist/preset/index.global.js +8 -0
- package/dist/preset/index.js +8 -0
- package/dist/preset/index.mjs +8 -0
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -370,13 +370,13 @@ var Phecda = (() => {
|
|
|
370
370
|
init(target.prototype);
|
|
371
371
|
setModelVar(target.prototype, "__CLASS");
|
|
372
372
|
regisHandler(target.prototype, "__CLASS", {
|
|
373
|
-
init: async () => {
|
|
374
|
-
const tag =
|
|
373
|
+
init: async (instance) => {
|
|
374
|
+
const tag = instance.__TAG__;
|
|
375
375
|
if (!tag)
|
|
376
376
|
return;
|
|
377
377
|
if (!globalThis.__PHECDA__)
|
|
378
378
|
globalThis.__PHECDA__ = {};
|
|
379
|
-
globalThis.__PHECDA__[tag] =
|
|
379
|
+
globalThis.__PHECDA__[tag] = instance.constructor;
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
382
|
}
|
|
@@ -389,8 +389,13 @@ var Phecda = (() => {
|
|
|
389
389
|
DataMap[key] = value;
|
|
390
390
|
}
|
|
391
391
|
__name(Provide, "Provide");
|
|
392
|
+
var EmptyProxy = new Proxy(Empty, {
|
|
393
|
+
apply() {
|
|
394
|
+
return EmptyProxy;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
392
397
|
function Inject(key) {
|
|
393
|
-
return DataMap[key] ||
|
|
398
|
+
return DataMap[key] || EmptyProxy;
|
|
394
399
|
}
|
|
395
400
|
__name(Inject, "Inject");
|
|
396
401
|
|
package/dist/index.js
CHANGED
|
@@ -370,13 +370,13 @@ function Global(target) {
|
|
|
370
370
|
init(target.prototype);
|
|
371
371
|
setModelVar(target.prototype, "__CLASS");
|
|
372
372
|
regisHandler(target.prototype, "__CLASS", {
|
|
373
|
-
init: async () => {
|
|
374
|
-
const tag =
|
|
373
|
+
init: async (instance) => {
|
|
374
|
+
const tag = instance.__TAG__;
|
|
375
375
|
if (!tag)
|
|
376
376
|
return;
|
|
377
377
|
if (!globalThis.__PHECDA__)
|
|
378
378
|
globalThis.__PHECDA__ = {};
|
|
379
|
-
globalThis.__PHECDA__[tag] =
|
|
379
|
+
globalThis.__PHECDA__[tag] = instance.constructor;
|
|
380
380
|
}
|
|
381
381
|
});
|
|
382
382
|
}
|
|
@@ -389,8 +389,13 @@ function Provide(key, value) {
|
|
|
389
389
|
DataMap[key] = value;
|
|
390
390
|
}
|
|
391
391
|
__name(Provide, "Provide");
|
|
392
|
+
var EmptyProxy = new Proxy(Empty, {
|
|
393
|
+
apply() {
|
|
394
|
+
return EmptyProxy;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
392
397
|
function Inject(key) {
|
|
393
|
-
return DataMap[key] ||
|
|
398
|
+
return DataMap[key] || EmptyProxy;
|
|
394
399
|
}
|
|
395
400
|
__name(Inject, "Inject");
|
|
396
401
|
|
package/dist/index.mjs
CHANGED
|
@@ -279,13 +279,13 @@ function Global(target) {
|
|
|
279
279
|
init(target.prototype);
|
|
280
280
|
setModelVar(target.prototype, "__CLASS");
|
|
281
281
|
regisHandler(target.prototype, "__CLASS", {
|
|
282
|
-
init: async () => {
|
|
283
|
-
const tag =
|
|
282
|
+
init: async (instance) => {
|
|
283
|
+
const tag = instance.__TAG__;
|
|
284
284
|
if (!tag)
|
|
285
285
|
return;
|
|
286
286
|
if (!globalThis.__PHECDA__)
|
|
287
287
|
globalThis.__PHECDA__ = {};
|
|
288
|
-
globalThis.__PHECDA__[tag] =
|
|
288
|
+
globalThis.__PHECDA__[tag] = instance.constructor;
|
|
289
289
|
}
|
|
290
290
|
});
|
|
291
291
|
}
|
|
@@ -298,8 +298,13 @@ function Provide(key, value) {
|
|
|
298
298
|
DataMap[key] = value;
|
|
299
299
|
}
|
|
300
300
|
__name(Provide, "Provide");
|
|
301
|
+
var EmptyProxy = new Proxy(Empty, {
|
|
302
|
+
apply() {
|
|
303
|
+
return EmptyProxy;
|
|
304
|
+
}
|
|
305
|
+
});
|
|
301
306
|
function Inject(key) {
|
|
302
|
-
return DataMap[key] ||
|
|
307
|
+
return DataMap[key] || EmptyProxy;
|
|
303
308
|
}
|
|
304
309
|
__name(Inject, "Inject");
|
|
305
310
|
|
|
@@ -105,6 +105,14 @@ var Phecda = (() => {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
__name(Pipe, "Pipe");
|
|
108
|
+
function Empty(_target) {
|
|
109
|
+
}
|
|
110
|
+
__name(Empty, "Empty");
|
|
111
|
+
var EmptyProxy = new Proxy(Empty, {
|
|
112
|
+
apply() {
|
|
113
|
+
return EmptyProxy;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
108
116
|
|
|
109
117
|
// src/preset/rule.ts
|
|
110
118
|
function isOption() {
|
package/dist/preset/index.js
CHANGED
|
@@ -105,6 +105,14 @@ function Pipe(v) {
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
__name(Pipe, "Pipe");
|
|
108
|
+
function Empty(_target) {
|
|
109
|
+
}
|
|
110
|
+
__name(Empty, "Empty");
|
|
111
|
+
var EmptyProxy = new Proxy(Empty, {
|
|
112
|
+
apply() {
|
|
113
|
+
return EmptyProxy;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
108
116
|
|
|
109
117
|
// src/preset/rule.ts
|
|
110
118
|
function isOption() {
|
package/dist/preset/index.mjs
CHANGED
|
@@ -64,6 +64,14 @@ function Pipe(v) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
__name(Pipe, "Pipe");
|
|
67
|
+
function Empty(_target) {
|
|
68
|
+
}
|
|
69
|
+
__name(Empty, "Empty");
|
|
70
|
+
var EmptyProxy = new Proxy(Empty, {
|
|
71
|
+
apply() {
|
|
72
|
+
return EmptyProxy;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
67
75
|
|
|
68
76
|
// src/preset/rule.ts
|
|
69
77
|
function isOption() {
|