phecda-core 2.0.0-alpha.4 → 2.0.0-alpha.6

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.
@@ -367,18 +367,18 @@ var Phecda = (() => {
367
367
  }
368
368
  __name(Assign, "Assign");
369
369
  function Global(target) {
370
- const tag = target.prototype.__TAG__;
371
- if (tag) {
372
- init(target.prototype);
373
- setModelVar(target.prototype, "__CLASS");
374
- regisHandler(target.prototype, "__CLASS", {
375
- init: async () => {
376
- if (!globalThis.__PHECDA__)
377
- globalThis.__PHECDA__ = {};
378
- globalThis.__PHECDA__[tag] = target;
379
- }
380
- });
381
- }
370
+ init(target.prototype);
371
+ setModelVar(target.prototype, "__CLASS");
372
+ regisHandler(target.prototype, "__CLASS", {
373
+ init: async (instance) => {
374
+ const tag = instance.__TAG__;
375
+ if (!tag)
376
+ return;
377
+ if (!globalThis.__PHECDA__)
378
+ globalThis.__PHECDA__ = {};
379
+ globalThis.__PHECDA__[tag] = instance.constructor;
380
+ }
381
+ });
382
382
  }
383
383
  __name(Global, "Global");
384
384
  function Empty(_target) {
package/dist/index.js CHANGED
@@ -367,18 +367,18 @@ function Assign(cb) {
367
367
  }
368
368
  __name(Assign, "Assign");
369
369
  function Global(target) {
370
- const tag = target.prototype.__TAG__;
371
- if (tag) {
372
- init(target.prototype);
373
- setModelVar(target.prototype, "__CLASS");
374
- regisHandler(target.prototype, "__CLASS", {
375
- init: async () => {
376
- if (!globalThis.__PHECDA__)
377
- globalThis.__PHECDA__ = {};
378
- globalThis.__PHECDA__[tag] = target;
379
- }
380
- });
381
- }
370
+ init(target.prototype);
371
+ setModelVar(target.prototype, "__CLASS");
372
+ regisHandler(target.prototype, "__CLASS", {
373
+ init: async (instance) => {
374
+ const tag = instance.__TAG__;
375
+ if (!tag)
376
+ return;
377
+ if (!globalThis.__PHECDA__)
378
+ globalThis.__PHECDA__ = {};
379
+ globalThis.__PHECDA__[tag] = instance.constructor;
380
+ }
381
+ });
382
382
  }
383
383
  __name(Global, "Global");
384
384
  function Empty(_target) {
package/dist/index.mjs CHANGED
@@ -276,18 +276,18 @@ function Assign(cb) {
276
276
  }
277
277
  __name(Assign, "Assign");
278
278
  function Global(target) {
279
- const tag = target.prototype.__TAG__;
280
- if (tag) {
281
- init(target.prototype);
282
- setModelVar(target.prototype, "__CLASS");
283
- regisHandler(target.prototype, "__CLASS", {
284
- init: async () => {
285
- if (!globalThis.__PHECDA__)
286
- globalThis.__PHECDA__ = {};
287
- globalThis.__PHECDA__[tag] = target;
288
- }
289
- });
290
- }
279
+ init(target.prototype);
280
+ setModelVar(target.prototype, "__CLASS");
281
+ regisHandler(target.prototype, "__CLASS", {
282
+ init: async (instance) => {
283
+ const tag = instance.__TAG__;
284
+ if (!tag)
285
+ return;
286
+ if (!globalThis.__PHECDA__)
287
+ globalThis.__PHECDA__ = {};
288
+ globalThis.__PHECDA__[tag] = instance.constructor;
289
+ }
290
+ });
291
291
  }
292
292
  __name(Global, "Global");
293
293
  function Empty(_target) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-core",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.6",
4
4
  "description": "provide base function and abstract limit to other phecda module ",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",